Skip to content
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!: remove backend interactions from nargo #6369

Merged
merged 7 commits into from
May 16, 2024

Conversation

TomAFrench
Copy link
Member

This is the nuclear option of separating nargo and bb. Nargo no longer downloads or interacts with bb at all.

@TomAFrench TomAFrench force-pushed the tf/remove-prove-verify branch 2 times, most recently from 3f8f614 to a77c447 Compare May 16, 2024 13:18
@TomAFrench TomAFrench requested a review from vezenovm May 16, 2024 14:27
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • circuit_witness_generation_time_in_ms (root-parity): 295 (+47%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 64 txs
l1_rollup_calldata_size_in_bytes 740 740 740
l1_rollup_calldata_gas 6,668 6,692 6,692
l1_rollup_execution_gas 586,853 586,877 586,877
l2_block_processing_time_in_ms 1,620 6,065 12,066 (-1%)
l2_block_building_time_in_ms 27,201 107,016 213,240 (-1%)
l2_block_rollup_simulation_time_in_ms 27,014 106,356 211,966 (-1%)
l2_block_public_tx_process_time_in_ms 11,199 43,948 (-1%) 87,518 (-2%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 18,366 (+2%) 34,100 (+2%)
node_database_size_in_bytes 22,929,488 39,612,496
pxe_database_size_in_bytes 29,868 59,425

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes circuit_witness_generation_time_in_ms circuit_proving_time_in_ms circuit_proof_size_in_bytes
private-kernel-init 143 (+2%) 19,396 46,118 N/A N/A N/A
private-kernel-inner 419 72,583 46,118 N/A N/A N/A
private-kernel-reset 680 (+1%) 219,992 46,118 N/A N/A N/A
private-kernel-ordering 446 (+1%) 70,968 64,163 N/A N/A N/A
base-parity 8.22 128 64.0 286 (-6%) 12,815 (+1%) 2,208
root-parity 51.6 (+1%) 27,064 64.0 ⚠️ 295 (+47%) 157,477 (+2%) 2,720
base-rollup 721 111,126 925 9,046 139,288 3,104
root-rollup 73.2 (+1%) 11,454 789 189 (-3%) 15,303 (-1%) 3,424
public-kernel-app-logic 156 (+1%) 78,057 68,775 312 (+6%) 486 (-5%) 90,432
public-kernel-tail 537 183,482 7,723 542 (+5%) 383 (-3%) 10,144
public-kernel-setup 127 (-2%) 78,057 68,775 343 (-3%) 466 (+2%) 90,432
public-kernel-teardown 130 (-1%) 78,057 68,775 286 (-1%) 406 (-1%) 90,432
merge-rollup 6.88 (+3%) 2,696 925 223 (+7%) 3,331 (-4%) 3,104

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 16 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 13.2 (+1%) 21.5 (+1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.7 31.8 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.771 (+1%) 0.662 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 61.9 99.8 319 613 (+2%) 1,203 2,381 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 543 1,055 2,079 4,127 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.635 0.617 0.580 0.573 (+1%) 0.571 0.569 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 73.3 144 (+1%) 455 899 (+2%) 1,781 3,548 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 106 208 692 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.643 0.648 0.619 0.619 (+1%) 0.617 0.617 N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A N/A 80.9 (+1%)
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A N/A 108
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A N/A 0.711

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes 1 registered classes
tx_size_in_bytes 67,453 1,052,013

Transaction size based on fee payment method

| Metric | |
| - | |

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 2,952 3,075 (+1%) 7,529 (+1%)
Metric 0 public data writes 1 public data writes 2 public data writes 4 public data writes 8 public data writes
tx_sequencer_processing_time_ms 817 (-1%) 1,122 1,183 2,192 (-1%) 1,361

@TomAFrench TomAFrench marked this pull request as ready for review May 16, 2024 19:25
Base automatically changed from tf/remove-prove-verify to tf/remove-codegen-verifier May 16, 2024 19:48
@TomAFrench TomAFrench merged commit 7dcc7da into tf/remove-codegen-verifier May 16, 2024
28 of 31 checks passed
@TomAFrench TomAFrench deleted the tf/remove-backend branch May 16, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants