Skip to content

feat(docs): Historical trees docs#3895

Merged
catmcgee merged 33 commits into
masterfrom
historical-trees-docs
Jan 24, 2024
Merged

feat(docs): Historical trees docs#3895
catmcgee merged 33 commits into
masterfrom
historical-trees-docs

Conversation

@catmcgee

@catmcgee catmcgee commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

Please provide a paragraph or two giving a summary of the change, including relevant motivation and context.

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@catmcgee catmcgee changed the title Historical trees docs feat(docs): historical trees docs Jan 9, 2024
@catmcgee catmcgee changed the title feat(docs): historical trees docs feat(docs): Historical trees docs Jan 9, 2024
@AztecBot

AztecBot commented Jan 9, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • batch_insert_into_append_only_tree_32_depth_ms (512): 412 (+62%)
  • batch_insert_into_append_only_tree_32_depth_hash_ms (512): 0.643 (+44%)
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 6dac6504 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 45,412 179,524 716,068
l1_rollup_calldata_gas 221,536 866,368 3,448,384
l1_rollup_execution_gas 313,955 984,040 3,667,973
l2_block_processing_time_in_ms 1,556 (+11%) 5,221 (-3%) 20,645
note_successful_decrypting_time_in_ms 286 (-1%) 841 (-5%) 3,208
note_trial_decrypting_time_in_ms 96.1 (-4%) 66.0 (-41%) 137 (-7%)
l2_block_building_time_in_ms 16,064 (-1%) 63,783 255,419
l2_block_rollup_simulation_time_in_ms 11,691 (-1%) 46,502 (-1%) 186,463
l2_block_public_tx_process_time_in_ms 4,339 17,191 68,665

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 15,963 (-7%) 30,124 (-3%)
note_history_successful_decrypting_time_in_ms 1,948 (-3%) 3,825 (-1%)
note_history_trial_decrypting_time_in_ms 124 (-27%) 235
node_database_size_in_bytes 3,518,270 3,553,910
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 214 44,681 25,561
private-kernel-ordering 167 (+1%) 43,753 14,809
base-rollup 1,208 (+1%) 128,338 881
root-rollup 80.8 (+2%) 4,088 677
private-kernel-inner 294 (+1%) 71,208 25,561
public-kernel-private-input 207 31,863 25,561
public-kernel-non-first-iteration 204 31,905 25,561
merge-rollup 7.65 2,608 881

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 12.3 (+1%) 18.4 (-10%) 13.2 (-2%) 19.3 (-2%) 24.4 (-4%) 68.8 (+5%) 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.630 (+1%) 0.670 (-3%) 0.538 (-1%) 0.539 (-2%) 0.482 (-1%) 0.443 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 82.6 (-4%) 51.6 ⚠️ 412 (+62%) 478 (-1%) 910 (-1%) 3,552 (-1%)
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.476 (-3%) 0.498 ⚠️ 0.643 (+44%) 0.437 (-1%) 0.428 (-1%) 0.426
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 118 (-1%) 61.9 (-1%) 367 (-2%) 765 (-5%) 1,424 (-4%) 5,610
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.512 0.504 0.476 (-2%) 0.486 (-4%) 0.472 (-2%) 0.473
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 67.1 (-1%) N/A 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 94.1 N/A 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 0.596 (-1%) N/A 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,455 32,223

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 375 (+1%) 1,089
Metric 1 public data writes
tx_sequencer_processing_time_ms 537

@catmcgee catmcgee requested review from a team, benesjan and rahul-kothari January 11, 2024 11:53
@catmcgee catmcgee marked this pull request as ready for review January 11, 2024 11:53
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated

@benesjan benesjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But the naming needs to be aligned with yellow paper.

Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_trees.md Outdated
catmcgee and others added 5 commits January 15, 2024 08:57
Co-authored-by: josh crites <critesjosh@gmail.com>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/history_lib_reference.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/history_lib_reference.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/history_lib_reference.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/history_lib_reference.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/history_lib_reference.md Outdated
Comment thread docs/docs/concepts/advanced/data_structures/trees.md Outdated
Co-authored-by: Rahul Kothari <rahul.kothari.201@gmail.com>

@critesjosh critesjosh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits and just need to update those dead links.

Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/how_to_prove_history.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/how_to_prove_history.md Outdated
Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/how_to_prove_history.md Outdated
catmcgee and others added 3 commits January 24, 2024 03:04
@catmcgee catmcgee requested a review from critesjosh January 24, 2024 03:06

@benesjan benesjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a nit.

Comment thread docs/docs/dev_docs/contracts/syntax/historical_access/how_to_prove_history.md Outdated
catmcgee and others added 2 commits January 24, 2024 09:04
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
@catmcgee catmcgee enabled auto-merge (squash) January 24, 2024 09:04
@catmcgee catmcgee dismissed stale reviews from critesjosh and rahul-kothari January 24, 2024 09:45

resovled

@catmcgee catmcgee merged commit 8c3efba into master Jan 24, 2024
@catmcgee catmcgee deleted the historical-trees-docs branch January 24, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants