-
Notifications
You must be signed in to change notification settings - Fork 268
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): integrate new range and cmp gadgets #8165
Conversation
IlyasRidhuan
commented
Aug 23, 2024
•
edited
Loading
edited
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @IlyasRidhuan and the rest of your teammates on Graphite |
bd7b63d
to
ed96de3
Compare
93b1914
to
8ada417
Compare
ed96de3
to
80d9997
Compare
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 | | |
80d9997
to
c4db08c
Compare
8ada417
to
543aa2d
Compare
120f236
to
2ee0bc6
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.
Overall this is very good refactoring! Please try to address my feedback or add an explicit TODO (with potentially a ticket). My main concern is related to potential missing range checks (see comments.)
barretenberg/cpp/src/barretenberg/commitment_schemes/verification_key.hpp
Outdated
Show resolved
Hide resolved
543aa2d
to
a5d24a0
Compare
2ee0bc6
to
1daf82d
Compare
a5d24a0
to
b22d58e
Compare
1daf82d
to
7030d57
Compare
b22d58e
to
9915be7
Compare
7030d57
to
8decab9
Compare
9915be7
to
cf5d27f
Compare
f2b90b1
to
49bed9b
Compare
Merge activity
|
49bed9b
to
8a7b90c
Compare
8a7b90c
to
bcec33d
Compare
bcec33d
to
0a789bf
Compare
* master: (28 commits) chore: bump noir-bignum to 0.3.2 (#8276) feat: Populate epoch 0 from initial validator set (#8286) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore(master): Release 0.51.1 (#8218) feat(avm): integrate new range and cmp gadgets (#8165) chore: rename process to propose for clarity (#8265) chore: Bump provernet agents to 8 and speed up bot (#8280) feat(avm): avm recursive verifier cpp (#8162) feat: moving fee payout + make proof submission sequential (#8262) feat: Block cheat codes in anvil (#8277) feat: wallet tx management (#8246) refactor(avm): replace range and cmp with gadgets (#8164) fix(docs): Update entrypoint details on accounts page (#8184) feat: l1-publisher cleanup (#8148) feat(avm): range check gadget (#7967) fix(ci): spot-runner-action was not built (#8274) fix: ts codegen (#8267) ...
``` time AVM_ENABLE_FULL_PROVING=1 ./bb avm_prove --avm-bytecode /tmp/bb-dY93DM/tmp-ygXEjA/avm_bytecode.bin --avm-calldata /tmp/bb-dY93DM/tmp-ygXEjA/avm_calldata.bin --avm-public-inputs /tmp/bb-dY93DM/tmp-ygXEjA/avm_public_inputs.bin --avm-hints /tmp/bb-dY93DM/tmp-ygXEjA/avm_hints.bin -o /tmp/bb-dY93DM/tmp-ygXEjA/ -v bb command is: avm_prove bytecode size: 38126 calldata size: 6 public_inputs size: 691 hints.storage_value_hints size: 2 hints.note_hash_exists_hints size: 0 hints.nullifier_exists_hints size: 1 hints.l1_to_l2_message_exists_hints size: 0 hints.externalcall_hints size: 0 hints.contract_instance_hints size: 0 initializing crs with size: 1048576 using cached crs of size 33554433 at "/mnt/user-data/ilyas/.bb-crs/bn254_g1.dat" Deserialized 3322 instructions ------- GENERATING TRACE ------- Trace sizes before padding: main_trace_size: 65535 mem_trace_size: 2084 alu_trace_size: 410 range_check_size: 65536 conv_trace_size: 1 bin_trace_size: 0 sha256_trace_size: 0 poseidon2_trace_size: 0 pedersen_trace_size: 4 gas_trace_size: 890 fixed_gas_table_size: 66 slice_trace_size: 7 range_check_trace_size: 4266 cmp_trace_size: 39 Built trace size: 65536 Number of columns: 696 Number of non-zero elements: 236111/45613056 (0%) Relation degrees: alu: [5°: 2, 4°: 6, 3°: 11, 2°: 24, 1°: 5] binary: [3°: 1, 2°: 9] cmp: [4°: 3, 3°: 1, 2°: 21, 1°: 2] conversion: [2°: 1] gas: [4°: 2, 3°: 2, 2°: 2] keccakf1600: [2°: 1] kernel: [3°: 3, 2°: 41] main: [4°: 3, 3°: 7, 2°: 101, 1°: 3] mem: [5°: 1, 3°: 8, 2°: 41, 1°: 2] mem_slice: [3°: 3, 2°: 7, 1°: 1] pedersen: [2°: 1] poseidon2: [6°: 256, 2°: 17] range_check: [3°: 1, 2°: 15, 1°: 9] sha256: [2°: 1] Trace size after padding: 2^16 ------- PROVING EXECUTION ------- vk fields size: 66 circuit size: 0x0000000000000000000000000000000000000000000000000000000000010000 num of pub inputs: 0x0000000000000000000000000000000000000000000000000000000000000000 proof written to: "/tmp/bb-dY93DM/tmp-ygXEjA/proof" vk written to: "/tmp/bb-dY93DM/tmp-ygXEjA/vk" vk as fields written to: "/tmp/bb-dY93DM/tmp-ygXEjA/vk_fields.json" ------- STATS ------- prove/all_ms: 6953 prove/create_composer_ms: 0 prove/create_prover_ms: 1988 prove/create_verifier_ms: 41 prove/execute_log_derivative_inverse_commitments_round_ms: 344 prove/execute_log_derivative_inverse_round_ms: 205 prove/execute_pcs_rounds_ms: 760 prove/execute_relation_check_rounds_ms: 727 prove/execute_wire_commitments_round_ms: 616 prove/gen_trace_ms: 2150 AVM_ENABLE_FULL_PROVING=1 ./bb avm_prove --avm-bytecode --avm-calldata 71.13s user 69.17s system 1579% cpu 8.882 total ```