-
Notifications
You must be signed in to change notification settings - Fork 272
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: refactor shared mutable to include private and unconstrained getters #7465
feat: refactor shared mutable to include private and unconstrained getters #7465
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. |
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 | | |
26fc989
to
4efbe51
Compare
7471bf1
to
77b0685
Compare
4efbe51
to
42518ef
Compare
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'm not sure I'm a fan of the approach of methods for external reads, since it deviates quite a bit from other state variables, and will likely be quite dangerous. Raw acess to external contract state is not something we want to encourage: key rotation is an exception due to the massive performance impact, plus clear semantics around keys. But those kind of usecases are I think better served by helper functions, not core methods.
In my mind the largest issue with methods is the redundancy in the context object: we've modeled storage access in some execution, but then break that model by not using some of the context's values (in this case the address). The notion of 'my storage includes a shared mutable state variable, which I can read and write, but I can also use to read/write external variables as long as they look exactly like it' seems bizarre.
For the concrete SharedMutablePrivateGetter
issue, I think I'd much rather have the struct be removed and replaced with a free-standing function, instead of trying to bundle it in the basic SharedMutable
. But even then we're likely not going to use SharedMutable
for key rotation (the major use case for the private getter), so we might as well not worry about this issue for the time being, and come back to it once our plans have better solidified.
77b0685
to
f70bcaf
Compare
42518ef
to
6898030
Compare
f70bcaf
to
2deb1bb
Compare
6898030
to
c391ca7
Compare
556fe66
to
e6fedda
Compare
e6fedda
to
9a2fb8b
Compare
Please read contributing guidelines and remove this line.