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: in memory kv store. #5520

Closed
wants to merge 3 commits into from
Closed

feat: in memory kv store. #5520

wants to merge 3 commits into from

Conversation

charlielye
Copy link
Contributor

Please read contributing guidelines and remove this line.

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 30, 2024

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (base-parity): 5,789 (+46%)
  • circuit_simulation_time_in_ms (root-parity): 1,792 (+65%)
  • circuit_simulation_time_in_ms (base-rollup): 16,451 (+16%)
  • circuit_simulation_time_in_ms (merge-rollup): 7.76 (-30%)
  • batch_insert_into_indexed_tree_20_depth_ms (64): 80.9 (+47%)
  • tx_sequencer_processing_time_ms (8): 605 (-16%)
  • node_history_sync_time_in_ms (5): 93,421 (+558%)
  • node_history_sync_time_in_ms (10): 263,896 (+865%)
  • note_history_successful_decrypting_time_in_ms (5): 1,573 (+21%)
  • note_history_successful_decrypting_time_in_ms (10): 2,957 (+22%)
  • note_history_trial_decrypting_time_in_ms (5): 296 (+332%)
  • note_trial_decrypting_time_in_ms (8): 69.3 (+111%)
  • note_trial_decrypting_time_in_ms (64): 146 (+99%)
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 f038b704 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,400 6,424 6,424
l1_rollup_execution_gas 585,733 585,757 585,757
l2_block_processing_time_in_ms 1,168 (-11%) 4,492 (-5%) 8,903 (-4%)
note_successful_decrypting_time_in_ms 202 (-13%) 558 (-1%) 1,075 (+1%)
note_trial_decrypting_time_in_ms ⚠️ 69.3 (+111%) 107 (+47%) ⚠️ 146 (+99%)
l2_block_building_time_in_ms 12,066 (+2%) 43,315 (+1%) 84,588 (+1%)
l2_block_rollup_simulation_time_in_ms 12,013 (+2%) 43,178 (+1%) 84,343 (+1%)
l2_block_public_tx_process_time_in_ms 6,158 24,272 (+1%) 48,511 (+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 ⚠️ 93,421 (+558%) ⚠️ 263,896 (+865%)
note_history_successful_decrypting_time_in_ms ⚠️ 1,573 (+21%) ⚠️ 2,957 (+22%)
note_history_trial_decrypting_time_in_ms ⚠️ 296 (+332%) 50.3 (-52%)
node_database_size_in_bytes 18,645,072 34,971,728
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 182 (+2%) 44,377 26,164
private-kernel-ordering 161 50,830 39,026
base-parity ⚠️ 5,789 (+46%) 128 311
root-parity ⚠️ 1,792 (+65%) 1,244 311
base-rollup ⚠️ 16,451 (+16%) 110,464 861
root-rollup 49.6 (-1%) 4,359 725
private-kernel-inner 216 71,744 26,164
public-kernel-app-logic 119 47,695 40,661
public-kernel-tail 165 (+1%) 53,372 7,125
merge-rollup ⚠️ 7.76 (-30%) 2,568 861
public-kernel-teardown 118 (-17%) 47,695 40,661
public-kernel-setup 117 47,695 40,661

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 10.0 16.1 (-2%) 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.585 0.499 (-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 46.0 (-1%) 79.5 (+9%) 230 (-1%) 452 (+1%) 869 1,715 (-1%) 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.472 (-1%) 0.456 (+2%) 0.420 (-1%) 0.421 (+1%) 0.413 0.411 (-1%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A ⚠️ 80.9 (+47%) 109 (+2%) 355 (+5%) 665 1,390 (+6%) 2,762 (+6%) 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.481 (-1%) 0.482 0.457 (-1%) 0.457 0.452 0.453 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 73.1 (+18%)
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.535

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 40,372 496,534

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 905 1,161 1,377

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,681 (-1%) 1,129 (+5%) 5,491 (+2%)
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 577 (+1%) 427 (+6%) 1,129 (+5%) 511 (-2%) 1,821 (-14%) ⚠️ 605 (-16%)

@charlielye charlielye force-pushed the cl/explicit_type_imports branch from 8277f73 to 28516d6 Compare April 1, 2024 17:31
@charlielye charlielye changed the base branch from cl/explicit_type_imports to cl/auto_anvil_e2e April 1, 2024 18:26
@charlielye charlielye force-pushed the cl/auto_anvil_e2e branch 2 times, most recently from 8606d04 to 6a3be9c Compare April 5, 2024 12:44
Base automatically changed from cl/auto_anvil_e2e to master April 5, 2024 15:03
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 25.7 kB types
npm/@types/[email protected] None +4 3.99 MB types
npm/@types/[email protected] None +4 3.95 MB types
npm/@types/[email protected] None 0 4.09 kB types
npm/@types/[email protected] None +2 3.94 MB types
npm/@webassemblyjs/[email protected] None +5 341 kB xtuc
npm/@webassemblyjs/[email protected] None +7 329 kB xtuc
npm/[email protected] None +3 268 kB dougwilson
npm/[email protected] None 0 494 kB marijn
npm/[email protected] None +1 1.55 MB lahmatiy
npm/[email protected] network 0 28.6 kB rubenverborgh
npm/[email protected] None 0 2.46 kB sindresorhus
npm/[email protected] None +1 183 kB dougwilson
npm/[email protected] environment, filesystem +2 31.5 kB dominictarr

🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 25.7 kB types
npm/@types/[email protected] None +4 3.99 MB types
npm/@types/[email protected] None +4 3.95 MB types
npm/@types/[email protected] None 0 4.09 kB types
npm/@types/[email protected] None +2 3.94 MB types
npm/@webassemblyjs/[email protected] None +5 341 kB xtuc
npm/@webassemblyjs/[email protected] None +7 329 kB xtuc
npm/[email protected] None +3 268 kB dougwilson
npm/[email protected] None 0 494 kB marijn
npm/[email protected] None +1 1.55 MB lahmatiy
npm/[email protected] network 0 28.6 kB rubenverborgh
npm/[email protected] None 0 2.46 kB sindresorhus
npm/[email protected] None +1 183 kB dougwilson
npm/[email protected] environment, filesystem +2 31.5 kB dominictarr

🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@ludamad ludamad closed this Dec 17, 2024
@ludamad ludamad deleted the cl/mem_kv_store branch December 17, 2024 19:48
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