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

docs(yellow-paper): Update function broadcasting functions #5350

Conversation

spalladino
Copy link
Collaborator

Updates yellow paper with changes from the two PRs below in this stack.

Copy link
Collaborator Author

spalladino commented Mar 20, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spalladino and the rest of your teammates on Graphite Graphite

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 20, 2024

Benchmark results

No metrics with a significant change found.

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 5d669b93 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,424 6,424 6,424
l1_rollup_execution_gas 585,757 585,757 585,757
l2_block_processing_time_in_ms 1,342 (+4%) 4,659 (-2%) 8,901 (-1%)
note_successful_decrypting_time_in_ms 147 (-21%) 532 (+2%) 1,038 (+9%)
note_trial_decrypting_time_in_ms 53.0 (-43%) 47.4 (+29%) 64.5 (-23%)
l2_block_building_time_in_ms 16,637 (-3%) 62,882 (-3%) 126,852 (-3%)
l2_block_rollup_simulation_time_in_ms 7,671 (-4%) 27,299 (-3%) 54,530 (-5%)
l2_block_public_tx_process_time_in_ms 8,947 (-3%) 35,532 (-3%) 72,227 (-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,341 (+1%) 26,686 (+1%)
note_history_successful_decrypting_time_in_ms 1,262 (+1%) 2,545 (+5%)
note_history_trial_decrypting_time_in_ms 92.3 (-2%) 103 (-16%)
node_database_size_in_bytes 18,657,360 34,943,056
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 246 (+3%) 44,344 28,181
private-kernel-ordering 216 (+1%) 52,847 14,263
base-parity 4,452 (+1%) 128 311
root-parity 1,606 (-7%) 1,244 311
base-rollup 17,817 (-4%) 165,727 861
root-rollup 49.8 4,359 725
private-kernel-inner 598 (+1%) 73,728 28,181
public-kernel-app-logic 397 (-1%) 35,185 28,151
public-kernel-tail 170 (-1%) 40,862 28,151
merge-rollup 8.78 (+6%) 2,568 861

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.89 (-1%) 15.8 (-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.577 (-1%) 0.489 (-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 45.2 (-2%) 71.1 (-2%) 223 (-6%) 445 859 (-1%) 1,710 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.464 (-2%) 0.439 (-2%) 0.408 (-5%) 0.416 0.408 (-1%) 0.410 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 52.9 (-2%) 106 (-1%) 324 (-3%) 662 1,298 2,547 (-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.471 (-2%) 0.476 (-1%) 0.441 (-3%) 0.455 0.452 0.443 (-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.7 (-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.531 (-1%)

Miscellaneous

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

Metric 0 registered classes
tx_size_in_bytes 21,991

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 3,054 (-1%) 1,651
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 10.8 1,136 (-1%)

@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from a6738ed to 296e328 Compare March 21, 2024 18:17
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from fcaac51 to ceb8fbd Compare March 21, 2024 18:18
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from 296e328 to d00aec0 Compare March 21, 2024 19:34
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from ceb8fbd to 0bf1666 Compare March 21, 2024 19:34
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from d00aec0 to 4bd7d7d Compare March 22, 2024 12:15
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 0bf1666 to 6ac9469 Compare March 22, 2024 12:15
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from 4bd7d7d to 3977ff5 Compare March 22, 2024 12:59
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 6ac9469 to 3b98e59 Compare March 22, 2024 12:59
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from 3977ff5 to 276ae7e Compare March 22, 2024 14:07
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 3b98e59 to 92e98de Compare March 22, 2024 14:07
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from 276ae7e to cc50036 Compare March 22, 2024 15:01
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 92e98de to 8ff82fe Compare March 22, 2024 15:02
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from cc50036 to 1cfac27 Compare March 22, 2024 15:40
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 8ff82fe to 9c3e8fd Compare March 22, 2024 15:40
@spalladino spalladino force-pushed the palla/capture-broadcasted-unconstrained-fns branch from 1cfac27 to 3361f37 Compare March 22, 2024 16:59
@spalladino spalladino force-pushed the palla/update-yp-function-broadcast branch from 9c3e8fd to 7636803 Compare March 22, 2024 16:59
@spalladino
Copy link
Collaborator Author

Closing in favor of merging everything in one go in #5353

@spalladino spalladino closed this Mar 22, 2024
spalladino added a commit that referenced this pull request Mar 22, 2024
Includes:
- #5351
- #5350
- #5349
- #5318
- And deletes isInternal flag from functions in contract classes since
it's no longer required by kernel.
@ludamad ludamad deleted the palla/update-yp-function-broadcast branch August 22, 2024 15:19
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.

3 participants