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: bootstrap_cache.sh script to prime bb and noir ts packages. #3866

Closed
wants to merge 1 commit into from

Conversation

charlielye
Copy link
Contributor

@charlielye charlielye commented Jan 6, 2024

As title.
Not tested much beyond that it actually extracted things to right locations.

@charlielye charlielye changed the title bootstrap_cache.sh script to prime bb and noir ts packages. feat: bootstrap_cache.sh script to prime bb and noir ts packages. Jan 6, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 6, 2024

Benchmark results

Metrics with a significant change:

  • note_successful_decrypting_time_in_ms (8): 559 (+46%)
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 88fcf8d3 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,444 179,588 716,132
l1_rollup_calldata_gas 222,984 868,244 3,449,756
l1_rollup_execution_gas 867,093 3,746,297 23,306,521
l2_block_processing_time_in_ms 1,318 (-13%) 5,084 21,050
note_successful_decrypting_time_in_ms ⚠️ 559 (+46%) 1,107 (+1%) 4,156 (+1%)
note_trial_decrypting_time_in_ms 67.6 (-28%) 37.5 (+6%) 139 (+2%)
l2_block_building_time_in_ms 14,895 62,312 (+5%) 249,001 (+5%)
l2_block_rollup_simulation_time_in_ms 10,585 44,630 (+6%) 179,133 (+6%)
l2_block_public_tx_process_time_in_ms 4,279 17,602 (+3%) 69,600 (+2%)

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,107 (-2%) 28,911 (+1%)
note_history_successful_decrypting_time_in_ms 2,669 (-5%) 5,434
note_history_trial_decrypting_time_in_ms 157 (+8%) 146 (-11%)
node_database_size_in_bytes 3,618,752 3,725,063
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 215 (+3%) 44,709 25,561
private-kernel-ordering 142 (+4%) 30,953 14,809
base-rollup 1,110 (+3%) 128,374 881
root-rollup 86.1 4,088 889
private-kernel-inner 289 (+1%) 71,236 25,561
public-kernel-private-input 205 (+1%) 31,891 25,561
public-kernel-non-first-iteration 204 (+2%) 31,933 25,561
merge-rollup 9.68 2,608 881

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,487 31,878

spalladino added a commit that referenced this pull request Jan 9, 2024
Builds on top of @charlielye's #3866. Tested by doing `bootstrap_cache`
+ `l1-contracts/bootstrap` + `yarn-project/bootstrap` on an fresh clone.

- Extracts missing folders
- Removes global bootstrap_cache in favor of individual ones on each
root folder
- Manually builds the ts for bb.js (it's pretty fast, the main
bottleneck was getting the wasm)
- Adds missing foundation build step in yarn project bootstrap
- Fixes `query_manifest` to handle alternate version of yq that return
different strings for `type`
- Installs foundry only if needed

---------

Co-authored-by: Charlie Lye <[email protected]>
@charlielye charlielye closed this Jan 10, 2024
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
Builds on top of @charlielye's AztecProtocol#3866. Tested by doing `bootstrap_cache`
+ `l1-contracts/bootstrap` + `yarn-project/bootstrap` on an fresh clone.

- Extracts missing folders
- Removes global bootstrap_cache in favor of individual ones on each
root folder
- Manually builds the ts for bb.js (it's pretty fast, the main
bottleneck was getting the wasm)
- Adds missing foundation build step in yarn project bootstrap
- Fixes `query_manifest` to handle alternate version of yq that return
different strings for `type`
- Installs foundry only if needed

---------

Co-authored-by: Charlie Lye <[email protected]>
@ludamad ludamad deleted the cl/bootstrap_cache branch August 22, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants