Skip to content

chore!: remove fixed-length keccak256#5617

Merged
vezenovm merged 12 commits into
masterfrom
tf/remove-fixed-length-keccak
Apr 9, 2024
Merged

chore!: remove fixed-length keccak256#5617
vezenovm merged 12 commits into
masterfrom
tf/remove-fixed-length-keccak

Conversation

@TomAFrench

Copy link
Copy Markdown
Member

Cleaning up some tech debt. We never actually create this opcode so we can just remove it in favour of the variable length version.

@TomAFrench TomAFrench changed the title chore: remove fixed-length keccak256 chore!: remove fixed-length keccak256 Apr 8, 2024
@AztecBot

AztecBot commented Apr 8, 2024

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • note_trial_decrypting_time_in_ms (32): 62.4 (+190%)
  • note_trial_decrypting_time_in_ms (64): 68.3 (+94%)
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 633a711f 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,412 6,388 (-1%) 6,424
l1_rollup_execution_gas 585,745 585,721 585,757
l2_block_processing_time_in_ms 1,309 (-1%) 4,928 (+3%) 9,505 (+2%)
note_successful_decrypting_time_in_ms 249 (-1%) 554 (-10%) 952 (-7%)
note_trial_decrypting_time_in_ms 52.0 (+2%) ⚠️ 62.4 (+190%) ⚠️ 68.3 (+94%)
l2_block_building_time_in_ms 11,874 (+1%) 43,202 (+1%) 84,483
l2_block_rollup_simulation_time_in_ms 11,838 (+1%) 43,081 (+1%) 84,253
l2_block_public_tx_process_time_in_ms 6,210 (+2%) 24,268 (+1%) 48,505

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,639 27,301 (+5%)
note_history_successful_decrypting_time_in_ms 1,336 (+4%) 2,497 (+7%)
note_history_trial_decrypting_time_in_ms 66.4 (+9%) 109 (+20%)
node_database_size_in_bytes 18,632,784 35,065,936
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 181 (+3%) 44,377 26,164
private-kernel-ordering 164 (+4%) 50,830 39,026
base-parity 3,940 (+2%) 128 311
root-parity 1,071 (+2%) 1,244 311
base-rollup 14,337 (+2%) 110,464 861
root-rollup 49.8 (+2%) 4,359 725
private-kernel-inner 219 (+3%) 71,744 26,164
public-kernel-app-logic 121 (+3%) 47,695 40,661
public-kernel-tail 164 (+2%) 53,372 7,125
merge-rollup 9.21 2,568 861
public-kernel-teardown 118 (+2%) 47,695 40,661
public-kernel-setup 117 (+2%) 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.1 (+3%) 16.1 (+3%) 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.590 (+2%) 0.498 (+3%) 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.3 (+3%) 72.5 (+2%) 232 453 (+5%) 869 1,734 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.474 (+2%) 0.447 (+2%) 0.422 0.422 (+5%) 0.413 0.414 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.5 (+3%) 107 (+2%) 339 (+1%) 668 (+5%) 1,308 2,620 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.480 (+2%) 0.484 (+2%) 0.459 (+1%) 0.458 (+4%) 0.453 0.454 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 61.4 (+3%)
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 (+3%)

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,700 1,087 (+4%) 5,361
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 579 (+3%) 406 (+3%) 1,075 (+1%) 520 1,755 (+1%) 596 (+3%)

@TomAFrench TomAFrench marked this pull request as ready for review April 8, 2024 21:37
@TomAFrench TomAFrench requested a review from vezenovm April 8, 2024 21:37
@TomAFrench TomAFrench requested a review from michaeljklein April 9, 2024 15:12
@socket-security

socket-security Bot commented Apr 9, 2024

Copy link
Copy Markdown

@vezenovm vezenovm enabled auto-merge (squash) April 9, 2024 19:07
@vezenovm vezenovm merged commit 40480b3 into master Apr 9, 2024
@vezenovm vezenovm deleted the tf/remove-fixed-length-keccak branch April 9, 2024 19:46
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.

4 participants