-
Notifications
You must be signed in to change notification settings - Fork 240
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: Switch pedersen to poseidon (WIP) #5523
Conversation
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
A major slowdown appears to happenning with poseidon in private functions, the execution of the private function for benchmarking appears to have gone from ~400ms to ~7000ms . The bytecode size hasn't increased that much and the flamegraph seems to report that this slowdown comes from a lot of field inversions and ¿circuit deserializing?. This is very weird. Attaching the before and after flamegraph for a benchmarking run with 8 txs |
I think the slowdown comes from call stack item hashes. I think that it makes the account contracts blow up in size, not the app contracts, which makes sense, since call stack items are very large and probably all the conditional logic to condition the permutations is hurting performance |
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 size based on fee payment method
Transaction processing duration by data writes.
|
Yup it's the account contract. It goes from 14k ACIR opcodes to 400k opcodes, they are apparently related to the conditional logic to hash all the call stack items, which is consistent with the flamegraph and the fix. |
Please read contributing guidelines and remove this line.