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

refactor: removing L1 block number from L2 block #5285

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 18, 2024

Fixes #5274

A copy of #5275 which got messed up when I tried to reorder branches in a stack.

@LHerskind LHerskind self-requested a review March 18, 2024 13:06
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@benesjan benesjan enabled auto-merge (squash) March 18, 2024 13:10
Copy link
Contributor

Changes to circuit sizes

Generated at commit: 26ea6d11902e2c32a7897a69bc7581f6f421d449, compared to commit: acffa7b4d41496dea0d16fd94ab98a1a977d14a8

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root -1,098 ✅ -50.14% -26,213 ✅ -25.18%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root 1,092 (-1,098) -50.14% 77,898 (-26,213) -25.18%

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (32): 120 (+78%)
  • note_trial_decrypting_time_in_ms (64): 113 (+142%)
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.

Values are compared against data from master at commit 30908eb0 and shown if the difference exceeds 1%.

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 5,668 18,820 36,356
l1_rollup_calldata_gas 66,316 238,672 469,580
l1_rollup_execution_gas 647,414 929,030 1,305,760
l2_block_processing_time_in_ms 1,352 (+2%) 4,859 (+1%) 9,350
note_successful_decrypting_time_in_ms 178 (-9%) 505 (-9%) 979 (-4%)
note_trial_decrypting_time_in_ms 81.4 (-21%) ⚠️ 120 (+78%) ⚠️ 113 (+142%)
l2_block_building_time_in_ms 18,321 68,874 (-1%) 136,816 (-4%)
l2_block_rollup_simulation_time_in_ms 8,116 (-1%) 28,750 56,573 (-6%)
l2_block_public_tx_process_time_in_ms 10,183 40,066 (-1%) 80,140 (-3%)

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 13,799 27,862 (+2%)
note_history_successful_decrypting_time_in_ms 1,254 (-1%) 2,486 (+1%)
note_history_trial_decrypting_time_in_ms 99.6 (+4%) 205 (+36%)
node_database_size_in_bytes 18,677,840 (-2%) 35,012,688 (-2%)
pxe_database_size_in_bytes 29,859 59,414

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
private-kernel-init 287 (-1%) 44,366 28,244
private-kernel-ordering 215 52,868 14,326
base-parity 1,883 (+3%) 128 311
base-rollup 717 (-1%) 165,787 925
root-parity 1,448 (-8%) 1,244 311
root-rollup 51.8 (-1%) 4,487 725
private-kernel-inner 646 (-1%) 73,771 28,244
public-kernel-app-logic 449 35,260 28,215
public-kernel-tail 174 (-1%) 40,926 28,215
merge-rollup 8.31 2,696 925

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 10.0 16.1 (+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.8 31.6 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.585 0.497 (+1%) 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 45.8 (-2%) 72.7 (+1%) 230 (-1%) 445 884 1,732 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 96.0 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.470 (-2%) 0.448 (+1%) 0.421 (-1%) 0.417 0.419 0.414 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 53.8 (-1%) 107 337 663 (+1%) 1,315 2,610 (-1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.479 (-1%) 0.481 0.458 0.457 (+1%) 0.455 0.453 (-1%) 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 61.5 (-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 109
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.538 (-1%)

Miscellaneous

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

Metric 0 registered classes
tx_size_in_bytes 22,012

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 3,224 1,756
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 11.1 (-8%) 1,250

@benesjan benesjan merged commit 57596d7 into master Mar 19, 2024
95 of 96 checks passed
@benesjan benesjan deleted the janb/nuking-l1-block-num-from-l2-block branch March 19, 2024 11:53
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.

refactor(Misc): Remove l1 block number from L2Block
3 participants