Skip to content

feat: enable avm contract test#5497

Closed
IlyasRidhuan wants to merge 2 commits into
masterfrom
ir/enable-avm-contract-test
Closed

feat: enable avm contract test#5497
IlyasRidhuan wants to merge 2 commits into
masterfrom
ir/enable-avm-contract-test

Conversation

@IlyasRidhuan

Copy link
Copy Markdown
Contributor

Please read contributing guidelines and remove this line.

@IlyasRidhuan IlyasRidhuan requested a review from fcarreiro March 28, 2024 11:18
@AztecBot

Copy link
Copy Markdown
Collaborator

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (private-kernel-init): 240 (+29%)
  • circuit_simulation_time_in_ms (private-kernel-ordering): 211 (+23%)
  • circuit_simulation_time_in_ms (base-parity): 4,596 (+34%)
  • circuit_simulation_time_in_ms (root-parity): 1,594 (+27%)
  • circuit_simulation_time_in_ms (base-rollup): 18,559 (+26%)
  • circuit_simulation_time_in_ms (private-kernel-inner): 312 (+34%)
  • circuit_simulation_time_in_ms (public-kernel-app-logic): 128 (+36%)
  • tx_pxe_processing_time_ms (0): 2,392 (+37%)
  • tx_pxe_processing_time_ms (1): 1,425 (+17%)
  • tx_sequencer_processing_time_ms (0): 17.1 (+73%)
  • tx_sequencer_processing_time_ms (1): 744 (+29%)
  • l2_block_building_time_in_ms (8): 13,915 (+18%)
  • l2_block_building_time_in_ms (32): 52,846 (+23%)
  • l2_block_building_time_in_ms (64): 103,578 (+21%)
  • l2_block_rollup_simulation_time_in_ms (32): 29,354 (+17%)
  • l2_block_public_tx_process_time_in_ms (8): 5,926 (+30%)
  • l2_block_public_tx_process_time_in_ms (32): 23,444 (+30%)
  • l2_block_public_tx_process_time_in_ms (64): 46,897 (+29%)
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 4064e180 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,424 6,412
l1_rollup_execution_gas 585,745 585,757 585,745
l2_block_processing_time_in_ms 1,291 (-2%) 4,802 (+3%) 9,208 (+2%)
note_successful_decrypting_time_in_ms 183 (+12%) 523 (+2%) 997 (+2%)
note_trial_decrypting_time_in_ms 88.8 (+31%) 38.6 (+15%) 127 (+14%)
l2_block_building_time_in_ms ⚠️ 13,915 (+18%) ⚠️ 52,846 (+23%) ⚠️ 103,578 (+21%)
l2_block_rollup_simulation_time_in_ms 7,967 (+11%) ⚠️ 29,354 (+17%) 56,587 (+15%)
l2_block_public_tx_process_time_in_ms ⚠️ 5,926 (+30%) ⚠️ 23,444 (+30%) ⚠️ 46,897 (+29%)

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,930 (-6%) 28,412 (+1%)
note_history_successful_decrypting_time_in_ms 1,271 (-1%) 2,595 (+5%)
note_history_trial_decrypting_time_in_ms 98.4 (-25%) 196 (+32%)
node_database_size_in_bytes 18,653,264 34,992,208
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 ⚠️ 240 (+29%) 44,379 28,214
private-kernel-ordering ⚠️ 211 (+23%) 52,880 14,296
base-parity ⚠️ 4,596 (+34%) 128 311
root-parity ⚠️ 1,594 (+27%) 1,244 311
base-rollup ⚠️ 18,559 (+26%) 165,760 861
root-rollup 50.4 (+2%) 4,359 725
private-kernel-inner ⚠️ 312 (+34%) 73,795 28,214
public-kernel-app-logic ⚠️ 128 (+36%) 35,252 28,217
public-kernel-tail 172 (+26%) 40,928 28,217
merge-rollup 8.89 (-2%) 2,568 861

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.3 (+4%) 16.5 (+4%) 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.601 (+4%) 0.511 (+4%) 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.5 (+1%) 78.8 (+12%) 234 (+4%) 447 880 (+5%) 1,722 (+4%) 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.477 (+2%) 0.487 (+12%) 0.427 (+5%) 0.418 0.419 (+5%) 0.414 (+4%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.3 (-1%) 118 (+12%) 335 (+1%) 666 (+1%) 1,313 (+4%) 2,624 (+4%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 (-1%) 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.483 0.531 (+12%) 0.458 (+2%) 0.458 (+1%) 0.456 (+4%) 0.458 (+4%) 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 62.3 (+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.547 (+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 14,967 494,914

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms ⚠️ 2,392 (+37%) ⚠️ 1,425 (+17%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms ⚠️ 17.1 (+73%) ⚠️ 744 (+29%)

@fcarreiro fcarreiro 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.

I think this is now outdated and also the contract test will not (or should not) work until we pass the right calldata. See

const inputs = new AvmContextInputs(temporaryFunctionSelector.toField(), computeVarArgsHash(calldata));

@IlyasRidhuan

Copy link
Copy Markdown
Contributor Author

Closing in favor of #5584

@ludamad ludamad deleted the ir/enable-avm-contract-test branch August 22, 2024 14:45
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