-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(avm): kernel trace and finalization (#8049)
The original objective of this PR was to just remove kernel `finalize()` from `trace.cpp`. Other things were done on top but I do not claim to have solved or constrained everything. Something that I realized while working on this: right now gas is broken for SLOAD/SSTORE/UNENCRYPTEDLOG because they still either use SET or take multiple lines (or should). However, if they take multiple lines, we have to move them to their own gadget, and if we do so, then their kernel accesses (1 per item) will make the kernel trace not be 1-1 anymore. So, we might need to rethink this whole trace. ----- PIL * Made kernel trace officially virtual * Moved most constraints, lookups, etc from main to kernel * Changed a few constraints; now we will constrain all rows of the execution trace (this bleeds to "last + 1" using the shifts, on purpose) * Changed some names and added some comments to make it more understandable, but still needs love CPP * Encapsulated kernel finalization in its own finalize * Changed `sel_last` to actually be the last row of the execution trace, as PIL says. (in any case, it's not used now) * Other misc changes: * error reporting in check circuit now only reports first failure for each subrelation (otherwise rows were spammed, but it didn't mean that the actual row didn't satisfy it, just that the accumulator was already "dirty") * Moved execution hints to their own hpp
- Loading branch information
Showing
27 changed files
with
1,731 additions
and
1,564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.