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: update L2 block structure #3924

Closed
wants to merge 2 commits into from
Closed

Conversation

benesjan
Copy link
Contributor

Fixes #3868

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@benesjan benesjan marked this pull request as draft January 10, 2024 16:06
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • circuit_output_size_in_bytes (root-rollup): 709 (-20%)
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 f127e5a4 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 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 220,956 (-1%) 866,276 3,447,848
l1_rollup_execution_gas 934,132 3,968,782 24,791,416
l2_block_processing_time_in_ms 1,346 (-5%) 5,114 (-1%) 21,197
note_successful_decrypting_time_in_ms 464 1,003 (-2%) 3,705 (+1%)
note_trial_decrypting_time_in_ms 73.7 (-3%) 32.9 (-16%) 145 (+1%)
l2_block_building_time_in_ms 14,981 59,632 239,129
l2_block_rollup_simulation_time_in_ms 10,647 42,433 170,583
l2_block_public_tx_process_time_in_ms 4,301 17,104 68,279

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 15,403 (+2%) 28,927
note_history_successful_decrypting_time_in_ms 2,622 (+11%) 4,901 (+4%)
note_history_trial_decrypting_time_in_ms 135 (+71%) 146 (-22%)
node_database_size_in_bytes 3,619,961 3,717,001
pxe_database_size_in_bytes 29,923 59,478

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 211 44,709 25,561
private-kernel-ordering 138 (+1%) 30,953 14,809
base-rollup 1,080 128,374 881
root-rollup 83.1 (-2%) 4,088 ⚠️ 709 (-20%)
private-kernel-inner 288 71,236 25,561
public-kernel-private-input 203 31,891 25,561
public-kernel-non-first-iteration 201 31,933 25,561
merge-rollup 9.84 (+1%) 2,608 881

Tree insertion stats

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

Metric 1 leaves 2 leaves 8 leaves 16 leaves 32 leaves 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_ms 11.2 (+1%) 87.0 13.7 (-10%) 18.0 23.9 (-6%) 50.2 (+1%) 87.8 243 471 (+1%) 911 3,569
batch_insert_into_indexed_tree_ms N/A N/A N/A 64.5 N/A 59.7 111 (+1%) 360 (-3%) 742 (+1%) 1,408 5,581

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 15,487 31,904

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 343 967
Metric 1 public data writes
tx_sequencer_processing_time_ms 530

@benesjan benesjan force-pushed the janb/updated-l2-block branch from fac1c41 to f602ec7 Compare January 11, 2024 16:31
@benesjan
Copy link
Contributor Author

benesjan commented Feb 7, 2024

Closing the PR as the task was taking over by @sklppy88

@benesjan benesjan closed this Feb 7, 2024
@ludamad ludamad deleted the janb/updated-l2-block branch August 22, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update L2 block structure to include Body struct
2 participants