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: remove outdated kernel vk tree stuff #4692

Closed

Conversation

benesjan
Copy link
Contributor

Fixes #3441

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Contributor

Changes to circuit sizes

Generated at commit: a603a271bbe86cff0b539e28761a86f9cce5edec, compared to commit: 9cb6daff6330a5675a070334cc88773d6e0bae3a

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root -2 ✅ -0.10% 0 ➖ 0.00%
rollup_merge -2 ✅ -0.70% 0 ➖ 0.00%
rollup_base 0 ➖ 0.00% -2 ✅ -0.00%
rollup_base_simulated 0 ➖ 0.00% -2 ✅ -5.41%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_root 1,956 (-2) -0.10% 99,124 (0) 0.00%
rollup_merge 283 (-2) -0.70% 40,983 (0) 0.00%
rollup_base 254,154 (0) 0.00% 1,941,534 (-2) -0.00%
rollup_base_simulated 1 (0) 0.00% 35 (-2) -5.41%

@benesjan benesjan closed this Feb 21, 2024
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (32): 139 (+137%)
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 9cb6daff 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 54,212 214,436 855,332
l1_rollup_calldata_gas 259,868 1,019,636 4,059,932
l1_rollup_execution_gas 354,054 1,139,084 4,281,333
l2_block_processing_time_in_ms 1,265 (-1%) 4,746 18,952
note_successful_decrypting_time_in_ms 221 (-2%) 601 (-3%) 2,191 (-3%)
note_trial_decrypting_time_in_ms 30.9 (-29%) ⚠️ 139 (+137%) 200 (+2%)
l2_block_building_time_in_ms 21,295 (-1%) 84,499 343,341
l2_block_rollup_simulation_time_in_ms 15,983 63,360 258,850
l2_block_public_tx_process_time_in_ms 5,286 (-1%) 21,061 (-1%) 84,237

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 16,424 (+1%) 32,430 (+2%)
note_history_successful_decrypting_time_in_ms 1,395 (-1%) 2,800 (+3%)
note_history_trial_decrypting_time_in_ms 167 (-2%) 268 (+19%)
node_database_size_in_bytes 18,661,456 35,819,600
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 334 44,664 27,457
private-kernel-ordering 214 45,777 14,627
base-rollup 1,740 175,280 869 (-7%)
root-rollup 82.8 4,064 (-3%) 825
private-kernel-inner 444 73,099 27,457
public-kernel-app-logic 275 32,254 25,379
merge-rollup 7.71 (-2%) 2,584 (-5%) 869 (-7%)

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 128 leaves 64 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_16_depth_ms 10.3 11.2 (-1%) 13.1 (-18%) 17.1 (+1%) 23.1 64.0 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.9 17.5 23.0 31.6 47.0 143 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.594 0.621 (-1%) 0.551 (-18%) 0.526 (+1%) 0.482 0.441 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A N/A N/A N/A 74.5 (-1%) 48.3 (+1%) 239 (-1%) 467 (+1%) 908 3,560
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A N/A N/A N/A 159 96.0 543 1,055 2,079 8,223
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A N/A N/A N/A 0.460 (-1%) 0.494 (+1%) 0.436 0.436 (+1%) 0.432 (+1%) 0.428
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 105 57.1 (-1%) 354 (-1%) 689 (-1%) 1,360 (-1%) 5,446
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A N/A N/A N/A 197 104 691 1,363 2,707 10,771
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A N/A N/A N/A 0.495 0.496 (-1%) 0.482 (+1%) 0.472 (-1%) 0.472 (-1%) 0.473
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A 64.5 (-1%) N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A 110 N/A N/A N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A 0.556 N/A N/A N/A N/A N/A N/A

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,388 36,001

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 577 1,508
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.0311 (-4%) 655

@ludamad ludamad deleted the 02-21-refactor_remove_outdated_kernel_vk_tree_stuff branch August 22, 2024 15:26
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.

Remove outdated kernel vk tree stuff
2 participants