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: returning non-nullified messages only #5278

Closed

Conversation

benesjan
Copy link
Contributor

Fixes #3976

Copy link
Contributor Author

benesjan commented Mar 18, 2024

@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from 1348fdc to 268d641 Compare March 18, 2024 10:46
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from d877fd6 to 52d85f4 Compare March 18, 2024 10:46
@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from 268d641 to 8754701 Compare March 18, 2024 11:11
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from 52d85f4 to ecbf1dd Compare March 18, 2024 11:12
@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from 8754701 to 422191a Compare March 18, 2024 11:28
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from ecbf1dd to 3bdb8bd Compare March 18, 2024 11:28
@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from 422191a to 2da0404 Compare March 18, 2024 11:56
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from 3bdb8bd to e4f4a4a Compare March 18, 2024 11:56
@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from 2da0404 to fee8bd3 Compare March 18, 2024 12:37
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch 2 times, most recently from 9dc3042 to e95d801 Compare March 18, 2024 12:48
@benesjan benesjan force-pushed the 03-18-refactor_nuking_L1_block_number_from_L2_block branch from fee8bd3 to b33b3d8 Compare March 18, 2024 12:51
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from e95d801 to 7b96bc8 Compare March 18, 2024 12:52
Base automatically changed from 03-18-refactor_nuking_L1_block_number_from_L2_block to 03-17-refactor_l1_l2_messages_cleanup March 18, 2024 12:52
@benesjan benesjan force-pushed the 03-17-refactor_l1_l2_messages_cleanup branch 6 times, most recently from 5fc9687 to e779f92 Compare March 19, 2024 10:36
Base automatically changed from 03-17-refactor_l1_l2_messages_cleanup to master March 19, 2024 11:13
@benesjan benesjan force-pushed the 03-18-feat_returning_non-nullified_messages_only branch from 7b96bc8 to d7fe9da Compare March 21, 2024 15:46
@benesjan benesjan closed this Mar 21, 2024
@benesjan benesjan deleted the 03-18-feat_returning_non-nullified_messages_only branch March 21, 2024 15:49
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (32): 103 (+165%)
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 ee176d23 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,460 6,424 6,436
l1_rollup_execution_gas 582,697 582,661 582,673
l2_block_processing_time_in_ms 1,255 (-5%) 4,439 (-8%) 8,940 (-1%)
note_successful_decrypting_time_in_ms 192 (+2%) 487 (-6%) 988 (+2%)
note_trial_decrypting_time_in_ms 94.5 (-3%) ⚠️ 103 (+165%) 121 (+16%)
l2_block_building_time_in_ms 17,427 (-2%) 65,527 (-2%) 131,801 (-1%)
l2_block_rollup_simulation_time_in_ms 7,917 (-2%) 27,906 (-1%) 55,419 (-2%)
l2_block_public_tx_process_time_in_ms 9,490 (-3%) 37,565 (-3%) 76,288 (-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 13,858 27,172 (+2%)
note_history_successful_decrypting_time_in_ms 1,263 (+2%) 2,483 (+2%)
note_history_trial_decrypting_time_in_ms 113 (+31%) 105 (-33%)
node_database_size_in_bytes 18,640,976 35,020,880
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 277 (-1%) 44,366 28,245
private-kernel-ordering 213 (-1%) 52,869 14,327
base-parity 1,782 (-3%) 128 311
base-rollup 710 165,788 925
root-parity 1,649 (+4%) 1,244 311
root-rollup 51.1 (-1%) 4,487 725
private-kernel-inner 638 (-1%) 73,772 28,245
public-kernel-app-logic 422 (-1%) 35,260 28,215
public-kernel-tail 171 (-1%) 40,926 28,215
merge-rollup 8.21 (-2%) 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 9.88 (-1%) 15.9 (-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.576 (-1%) 0.491 (-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 46.6 (+2%) 71.0 (-2%) 227 (-3%) 446 849 (-3%) 1,670 (-3%) 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 (+2%) 0.438 (-2%) 0.413 (-2%) 0.417 0.403 (-3%) 0.399 (-4%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 53.3 (-1%) 105 (-2%) 328 (-2%) 660 1,273 (-3%) 2,538 (-3%) 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.473 (-1%) 0.473 (-2%) 0.446 (-2%) 0.455 0.440 (-3%) 0.441 (-3%) 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 60.6 (-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.530 (-1%)

Miscellaneous

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

Metric 0 registered classes
tx_size_in_bytes 22,013

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 3,099 (-3%) 1,734 (-1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 11.9 (-15%) 1,192 (-1%)

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(Inbox): getL1ToL2MessageAndIndex should return the first non-nullified message, not the first message
2 participants