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: GossipSub #6113

Closed
wants to merge 39 commits into from
Closed

feat: GossipSub #6113

wants to merge 39 commits into from

Conversation

spypsy
Copy link
Member

@spypsy spypsy commented May 1, 2024

Fixes #5056

@AztecBot
Copy link
Collaborator

AztecBot commented May 1, 2024

Docs Preview

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

@AztecBot
Copy link
Collaborator

AztecBot commented May 1, 2024

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (private-kernel-ordering): 139 (-44%)
  • circuit_simulation_time_in_ms (root-parity): 129 (-92%)
  • circuit_simulation_time_in_ms (root-rollup): 50.1 (-35%)
  • circuit_simulation_time_in_ms (public-kernel-app-logic): 1,690 (-17%)
  • circuit_simulation_time_in_ms (merge-rollup): 3,169 (-41%)
  • circuit_simulation_time_in_ms (public-kernel-teardown): 111 (-35%)
  • circuit_simulation_time_in_ms (public-kernel-setup): 122 (-46%)
  • circuit_input_size_in_bytes (root-parity): 1,244 (-95%)
  • circuit_input_size_in_bytes (root-rollup): 4,551 (-60%)
  • circuit_output_size_in_bytes (private-kernel-ordering): 49,888 (+17%)
  • circuit_output_size_in_bytes (base-parity): 265 (+314%)
  • circuit_output_size_in_bytes (root-parity): 265 (+314%)
  • circuit_output_size_in_bytes (public-kernel-app-logic): 52,067 (+130%)
  • circuit_output_size_in_bytes (public-kernel-tail): 7,491 (+92%)
  • circuit_output_size_in_bytes (public-kernel-teardown): 52,067 (+73%)
  • circuit_output_size_in_bytes (public-kernel-setup): 52,067 (+73%)
  • tx_pxe_processing_time_ms (0): 1,262 (-29%)
  • tx_pxe_processing_time_ms (1): 883 (-20%)
  • tx_pxe_processing_time_ms (2): 3,494 (-16%)
  • batch_insert_into_append_only_tree_32_depth_ms (512): 263 (-24%)
  • tx_sequencer_processing_time_ms (2): 691 (-32%)
  • tx_sequencer_processing_time_ms (4): 906 (-26%)
  • tx_sequencer_processing_time_ms (5): 2,071 (-22%)
  • tx_sequencer_processing_time_ms (8): 1,163 (-24%)
  • l2_block_building_time_in_ms (8): 18,822 (-28%)
  • l2_block_building_time_in_ms (32): 73,666 (-18%)
  • l2_block_rollup_simulation_time_in_ms (8): 18,612 (-27%)
  • l2_block_rollup_simulation_time_in_ms (32): 72,907 (-18%)
  • l2_block_public_tx_process_time_in_ms (8): 8,539 (-23%)
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.

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 772 (+4%) 772 (+4%) 772 (+4%)
l1_rollup_calldata_gas 6,832 (+2%) 6,844 (+2%) 6,832 (+2%)
l1_rollup_execution_gas 587,313 587,325 587,313
l2_block_processing_time_in_ms 1,431 (-15%) 5,372 (+3%) 10,542 (+7%)
note_successful_decrypting_time_in_ms 200 420 811
note_trial_decrypting_time_in_ms 94.8 21.7 118
l2_block_building_time_in_ms ⚠️ 18,822 (-28%) ⚠️ 73,666 (-18%) 147,521 (-13%)
l2_block_rollup_simulation_time_in_ms ⚠️ 18,612 (-27%) ⚠️ 72,907 (-18%) 145,816 (-13%)
l2_block_public_tx_process_time_in_ms ⚠️ 8,539 (-23%) 33,394 (-12%) 66,890 (-5%)

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,584 (+12%) 31,066 (+15%)
note_history_successful_decrypting_time_in_ms 1,065 1,886
note_history_trial_decrypting_time_in_ms 130 95.4
node_database_size_in_bytes 19,144,784 (-8%) 35,758,160 (-4%)
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 158 (-17%) 47,815 (+2%) 31,978 (+11%)
private-kernel-inner 180 (-21%) 80,846 (+5%) 31,978 (+11%)
private-kernel-ordering ⚠️ 139 (-44%) 57,732 (+9%) ⚠️ 49,888 (+17%)
base-parity 76.6 (-5%) 128 ⚠️ 265 (+314%)
root-parity ⚠️ 129 (-92%) ⚠️ 1,244 (-95%) ⚠️ 265 (+314%)
base-rollup 12,443 (-15%) 110,926 957 (+3%)
root-rollup ⚠️ 50.1 (-35%) ⚠️ 4,551 (-60%) 821 (+4%)
public-kernel-app-logic ⚠️ 1,690 (-17%) 62,069 (+14%) ⚠️ 52,067 (+130%)
public-kernel-tail 4,314 (-13%) 168,566 (+6%) ⚠️ 7,491 (+92%)
merge-rollup ⚠️ 3,169 (-41%) 2,760 (+2%) 957 (+3%)
public-kernel-teardown ⚠️ 111 (-35%) 62,069 (+14%) ⚠️ 52,067 (+73%)
public-kernel-setup ⚠️ 122 (-46%) 62,069 (+14%) ⚠️ 52,067 (+73%)

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 11.1 (-4%) 18.0 (-8%) 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.643 (-4%) 0.556 (-8%) 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 51.6 (-5%) 82.2 ⚠️ 263 (-24%) 516 (+6%) 983 (-1%) 1,973 (+2%) 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.528 (-5%) 0.506 0.478 (-24%) 0.480 (+5%) 0.468 0.470 (+2%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 60.8 (-4%) 121 (-5%) 375 (-14%) 759 (+6%) 1,460 (-5%) 2,921 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 105 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.536 (-4%) 0.541 (-5%) 0.510 (-14%) 0.519 (+5%) 0.507 (-4%) 0.507 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 68.3 (+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 (+1%)
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.593

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 51,450 (+15%) 537,961

Transaction size based on fee payment method

Metric native fee payment method fpc_public fee payment method fpc_private fee payment method
tx_with_fee_size_in_bytes 897 1,145 1,345

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms ⚠️ 1,262 (-29%) ⚠️ 883 (-20%) ⚠️ 3,494 (-16%)
Metric 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 845 (-7%) ⚠️ 691 (-32%) 1,344 (-15%) ⚠️ 906 (-26%) ⚠️ 2,071 (-22%) ⚠️ 1,163 (-24%)

@spypsy spypsy closed this May 3, 2024
@spypsy spypsy deleted the spy/p2p-test-app branch May 3, 2024 09:23
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.

[P2P Specification] Update aztec nodes to use GossipSub
2 participants