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

chore: publish kv store to npm #4475

Closed
wants to merge 1 commit into from
Closed

Conversation

rahul-kothari
Copy link
Contributor

@rahul-kothari rahul-kothari commented Feb 7, 2024

to help with using @aztec/merkle-tree for people using slow updates tree.

Later we can revisit internalising this package (as detailed in #4413)

@AztecBot
Copy link
Collaborator

AztecBot commented Feb 7, 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 545b3341 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,636 180,516 720,036
l1_rollup_calldata_gas 222,432 871,008 3,465,792
l1_rollup_execution_gas 314,919 988,748 3,685,449
l2_block_processing_time_in_ms 1,161 4,393 (+1%) 17,372 (+1%)
note_successful_decrypting_time_in_ms 306 996 (+4%) 3,743 (+4%)
note_trial_decrypting_time_in_ms 17.3 (-14%) 123 (+33%) 147 (+4%)
l2_block_building_time_in_ms 17,877 70,727 283,926
l2_block_rollup_simulation_time_in_ms 13,128 51,883 (+1%) 208,904 (+1%)
l2_block_public_tx_process_time_in_ms 4,719 (-2%) 18,760 (-1%) 74,761 (-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,832 (-10%) 26,528 (-9%)
note_history_successful_decrypting_time_in_ms 2,528 (+5%) 4,550
note_history_trial_decrypting_time_in_ms 136 (+59%) 209 (+4%)
node_database_size_in_bytes 17,342,544 33,042,512
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 309 (-1%) 44,476 25,773 (-1%)
private-kernel-ordering 194 (-2%) 44,093 (-1%) 16,173 (-2%)
base-rollup 1,406 128,550 881
root-rollup 82.7 (+1%) 4,088 677
private-kernel-inner 438 (-1%) 71,227 (-1%) 25,773 (-1%)
public-kernel-private-input 240 (-2%) 32,183 (-1%) 25,773 (-1%)
public-kernel-non-first-iteration 240 (-2%) 32,225 (-1%) 25,773 (-1%)
merge-rollup 7.68 (+2%) 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 10.2 11.4 (+4%) 12.7 17.2 (+1%) 28.2 (+24%) 64.1 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.594 0.634 (+4%) 0.539 0.533 (+1%) 0.591 (+24%) 0.441 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 75.7 (+1%) 47.7 239 467 (+1%) 903 (+1%) 3,567 (+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.464 0.489 0.437 0.437 (+1%) 0.430 0.428
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 104 (+1%) 56.8 353 (+1%) 687 1,377 (+1%) 5,446 (+1%)
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.494 0.496 0.475 0.472 0.476 (+1%) 0.474 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.7 (+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.579 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 16,807 (-2%) 39,611 (-1%)

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 548 (-1%) 1,307 (-1%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.573 (-4%) 578 (-2%)

@ludamad ludamad deleted the rk/kv_store_deploy branch August 22, 2024 14:18
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.

2 participants