Skip to content

chore(SimulateTx): cleanup#5434

Merged
LHerskind merged 7 commits intolh/2665-public-messyfrom
lh/2665-replace-simulate
Mar 27, 2024
Merged

chore(SimulateTx): cleanup#5434
LHerskind merged 7 commits intolh/2665-public-messyfrom
lh/2665-replace-simulate

Conversation

@LHerskind
Copy link
Contributor

Please read contributing guidelines and remove this line.

Copy link
Contributor Author

LHerskind commented Mar 25, 2024

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 25, 2024

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (32): 79.3 (+82%)
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 22922142 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 676 676 676
l1_rollup_calldata_gas 6,388 6,412 6,418
l1_rollup_execution_gas 585,721 585,745 585,751
l2_block_processing_time_in_ms 1,319 4,778 9,237 (-2%)
note_successful_decrypting_time_in_ms 210 (+14%) 515 (-2%) 1,058 (+11%)
note_trial_decrypting_time_in_ms 68.5 (-22%) ⚠️ 79.3 (+82%) 59.9 (-26%)
l2_block_building_time_in_ms 13,830 51,251 100,986 (+1%)
l2_block_rollup_simulation_time_in_ms 7,975 28,089 (-1%) 55,083 (+1%)
l2_block_public_tx_process_time_in_ms 5,832 (+2%) 23,109 (+2%) 45,800 (+1%)

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 14,349 (+2%) 26,935 (-1%)
note_history_successful_decrypting_time_in_ms 1,242 (+1%) 2,464 (-1%)
note_history_trial_decrypting_time_in_ms 94.2 (-7%) 152 (-7%)
node_database_size_in_bytes 18,686,032 34,949,200
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 232 (+2%) 44,378 28,214
private-kernel-ordering 206 (+2%) 52,880 14,296
base-parity 3,930 (+12%) 128 311
root-parity 1,421 (+10%) 1,244 311
base-rollup 17,165 (+5%) 165,760 861
root-rollup 49.7 4,359 725
private-kernel-inner 301 (+1%) 73,794 28,214
public-kernel-app-logic 123 (+3%) 35,251 28,217
public-kernel-tail 167 (+1%) 40,928 28,217
merge-rollup 9.24 (+12%) 2,568 861
public-kernel-teardown 118 (+1%) 35,252 28,217
public-kernel-setup 116 35,252 28,217

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.2 (+2%) 16.0 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.592 (+2%) 0.493 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 46.7 72.5 (+1%) 233 445 (+1%) 872 (-1%) 1,727 (-6%) 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.478 (-1%) 0.447 (+1%) 0.423 0.416 (+1%) 0.414 (-1%) 0.413 (-6%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.3 107 (+1%) 341 (+1%) 660 (+2%) 1,312 2,601 (-1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 (-1%) 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.480 0.481 (+1%) 0.461 (+1%) 0.455 (+2%) 0.454 0.452 (-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.537 (+1%)

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 14,967 495,185

Transaction size based on fee payment method

Metric none fee payment method native fee payment method fpc_public fee payment method fpc_private fee payment method
tx_with_fee_size_in_bytes 773 905 1,161 1,377

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,162 (+4%) 1,389 (+2%) 4,709
Metric 0 public data writes 1 public data writes 2 public data writes 3 public data writes 4 public data writes 5 public data writes 8 public data writes
tx_sequencer_processing_time_ms 12.5 (+20%) 717 (+3%) 531 1,433 581 2,490 671

@LHerskind LHerskind changed the title chore: cleanup chore(SimulateTx): cleanup Mar 26, 2024
@LHerskind LHerskind force-pushed the lh/2665-public-messy branch from 18ec152 to 8f45f03 Compare March 26, 2024 10:57
@LHerskind LHerskind force-pushed the lh/2665-replace-simulate branch from 20e30b1 to cbd32d8 Compare March 26, 2024 10:57
@LHerskind LHerskind force-pushed the lh/2665-public-messy branch from 8f45f03 to a5db86e Compare March 26, 2024 17:14
@LHerskind LHerskind force-pushed the lh/2665-replace-simulate branch 2 times, most recently from f86cb31 to bce8310 Compare March 26, 2024 22:17
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 26, 2024

Docs Preview

Hey there! 👋 You can check your preview at https://6603efff69f5d58916baf48e--aztec-docs-dev.netlify.app

@LHerskind LHerskind force-pushed the lh/2665-public-messy branch from a5db86e to 8b31044 Compare March 27, 2024 09:53
@LHerskind LHerskind force-pushed the lh/2665-replace-simulate branch from bce8310 to 809aab5 Compare March 27, 2024 09:53
@github-actions
Copy link
Contributor

Changes to circuit sizes

Generated at commit: b61bffea5922bae2b16cafb33f460ddf88d18e85, compared to commit: a5db86e4c93b875c49c6d740d0f1508680d11ef3

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_setup +2 ❌ +0.01% +7 ❌ +0.00%
public_kernel_teardown +2 ❌ +0.01% +7 ❌ +0.00%
public_kernel_app_logic +2 ❌ +0.00% +7 ❌ +0.00%
private_kernel_inner +2 ❌ +0.00% +7 ❌ +0.00%
public_kernel_tail +1 ❌ +0.00% +4 ❌ +0.00%
private_kernel_init +1 ❌ +0.00% +3 ❌ +0.00%
rollup_base +2 ❌ +0.00% +7 ❌ +0.00%
private_kernel_tail +1 ❌ +0.00% +3 ❌ +0.00%
rollup_merge +2 ❌ +0.56% 0 ➖ 0.00%
rollup_root +2 ❌ +0.21% 0 ➖ 0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_setup 29,344 (+2) +0.01% 183,098 (+7) +0.00%
public_kernel_teardown 29,429 (+2) +0.01% 183,184 (+7) +0.00%
public_kernel_app_logic 56,075 (+2) +0.00% 314,754 (+7) +0.00%
private_kernel_inner 95,867 (+2) +0.00% 520,372 (+7) +0.00%
public_kernel_tail 124,971 (+1) +0.00% 358,970 (+4) +0.00%
private_kernel_init 48,602 (+1) +0.00% 349,513 (+3) +0.00%
rollup_base 171,481 (+2) +0.00% 1,730,743 (+7) +0.00%
private_kernel_tail 373,477 (+1) +0.00% 839,583 (+3) +0.00%
rollup_merge 360 (+2) +0.56% 45,970 (0) 0.00%
rollup_root 934 (+2) +0.21% 77,898 (0) 0.00%

@LHerskind LHerskind marked this pull request as ready for review March 27, 2024 13:44
@LHerskind LHerskind merged commit 201a235 into lh/2665-public-messy Mar 27, 2024
@LHerskind LHerskind deleted the lh/2665-replace-simulate branch March 27, 2024 13:45
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.

2 participants