-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Attach Brillig function ids to TS errors #7930
Conversation
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 8 txs.
Circuits statsStats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
AVM SimulationTime to simulate various public functions in the AVM.
Public DB AccessTime to access various public DBs.
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
BTreeMap<OpcodeLocation, Vec<Location>>, | ||
> = BTreeMap::new(); | ||
for (brillig_function_id, opcode_locations_map) in | ||
patched_debug_info.brillig_locations.iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the crux of the AVM changes in this PR @fcarreiro. All Brillig debug locations are going to be contained within a separate per function brillig locations map now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could just fetch at id 0 here as we make the assumption already that we have a single brillig function. Let me know what you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works I don't mind the solution! The transpiler is not a bottleneck now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on my side
BTreeMap<OpcodeLocation, Vec<Location>>, | ||
> = BTreeMap::new(); | ||
for (brillig_function_id, opcode_locations_map) in | ||
patched_debug_info.brillig_locations.iter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works I don't mind the solution! The transpiler is not a bottleneck now.
After noir-lang/noir#5696 Brillig locations have been split out from ACIR locations in the DebugMetadata. As to maintain appropriate call stacks in the simulator we need to attach a possible brillig function id (if we error'd out in a Brillig function) to our TS errors. The resolution of debug metadata locations was also updated to account for the additional optional brillig function id.