-
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
feat(avm-simulator): individual storage access #5095
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @fcarreiro and the rest of your teammates on Graphite |
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. Values are compared against data from master at commit 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 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
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 processing duration by data writes.
|
35fd8f0
to
dce0bae
Compare
a959041
to
6f3eeb5
Compare
noir-projects/noir-contracts/contracts/avm_test_contract/src/main.nr
Outdated
Show resolved
Hide resolved
a8ed02a
to
00aa89a
Compare
1581cb6
to
6bd2e17
Compare
f91d4b6
to
9c5ab33
Compare
9c5ab33
to
891c81a
Compare
891c81a
to
a13d83e
Compare
WARNING: PR waiting for resolution of blowup. See below.
This PR updates the oracle
storageRead/Write
interface to take and return just 1 value, instead of an array of values. However, the functionstorage_write<N>
actually used in Noir still takes/returns an array, and does a loop calling the oracle.storageWrite
was returning a value which was not used. This is due to an ACVM limitation, see below.The reason for the change is, quoting Sean: "that it's easier for the AVM to prove single-access to memory". IIUC, we want the traces to contain single access, and our AVM opcodes handle that.
This change is NOT trivial, since it implied changing the ACVM and oracle interface. In particular
void
oracles are possible.NOTE FOR THE REVIEWER: Sean gave an informal approval on the AVM side, please review everything else. If you are not familiar with the code please let me know of a possible reviewer.
This causes a blowup in instructions for storage access.
Before
After (name changed)