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: acir-simulator -> simulator #4439

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

Maddiaa0
Copy link
Member

@Maddiaa0 Maddiaa0 commented Feb 6, 2024

Renaming acir-simulator -> simulator as it also has avm simulator within now :)

This is just a ctrl f and replace, so should be fairly uncontroversial

Base automatically changed from md/02-05-feat_avm_bake_in_avm_context_with_macro to master February 6, 2024 00:28
@AztecBot
Copy link
Collaborator

AztecBot commented Feb 6, 2024

Benchmark results

Metrics with a significant change:

  • note_history_trial_decrypting_time_in_ms (5): 179 (+118%)
  • note_trial_decrypting_time_in_ms (8): 110 (+658%)
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 92fb2b09 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,444 871,008 3,465,612
l1_rollup_execution_gas 314,931 988,748 3,685,269
l2_block_processing_time_in_ms 1,160 4,382 (+1%) 17,433 (+1%)
note_successful_decrypting_time_in_ms 300 (-1%) 988 (+2%) 3,664
note_trial_decrypting_time_in_ms ⚠️ 110 (+658%) 119 (+12%) 145 (-1%)
l2_block_building_time_in_ms 17,919 (-1%) 70,918 284,376
l2_block_rollup_simulation_time_in_ms 13,088 51,821 207,978
l2_block_public_tx_process_time_in_ms 4,803 (-2%) 19,015 76,133

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,715 26,346
note_history_successful_decrypting_time_in_ms 2,300 (-8%) 4,534 (-1%)
note_history_trial_decrypting_time_in_ms ⚠️ 179 (+118%) 222 (+5%)
node_database_size_in_bytes 17,354,832 33,038,416
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 44,512 26,225
private-kernel-ordering 198 (-1%) 44,545 16,625
base-rollup 1,404 129,002 881
root-rollup 83.0 4,088 677
private-kernel-inner 444 71,703 26,225
public-kernel-private-input 247 32,647 26,225
public-kernel-non-first-iteration 245 32,689 26,225
merge-rollup 7.64 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.6 (+4%) 12.7 (-1%) 16.8 (-3%) 22.9 (+1%) 65.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.650 (+4%) 0.540 (-1%) 0.519 (-3%) 0.479 (+1%) 0.449 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 74.7 47.5 240 461 902 3,595 (+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.462 0.488 0.437 0.432 0.429 0.432 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A N/A N/A N/A 104 (+1%) 56.7 352 687 1,372 (+1%) 5,481 (+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.495 0.497 0.475 0.473 0.474 0.476 (+1%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A 56.5 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.578 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 17,271 40,063

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 560 (+1%) 1,318
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 0.537 (+1%) 590

@Maddiaa0 Maddiaa0 marked this pull request as ready for review February 6, 2024 01:11
Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename looks fine, but there are a bunch of other unrelated changes (especially noir/aztec_macros/src/lib.rs, aside from the context refactor). If it's easy to do, I'd split them into different PRs. If not, too bad, and let's merge.

@@ -6,7 +6,7 @@

### Main Components in an PXE Service

- [Acir Simulator](../acir-simulator/)
- [Acir Simulator](../simulator/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this one!

Suggested change
- [Acir Simulator](../simulator/)
- [Simulator](../simulator/)

@dbanks12
Copy link
Contributor

dbanks12 commented Feb 6, 2024

Rename looks fine, but there are a bunch of other unrelated changes (especially noir/aztec_macros/src/lib.rs, aside from the context refactor). If it's easy to do, I'd split them into different PRs. If not, too bad, and let's merge.

This PR may have been stacked on some others and it just hasn't been updated after they were merged.

@Maddiaa0 Maddiaa0 force-pushed the md/02-06-chore_acir-simulator_-_simulator branch from b250b0d to 33f189b Compare February 6, 2024 16:51
Copy link
Contributor

@dbanks12 dbanks12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbanks12 dbanks12 merged commit bccd809 into master Feb 6, 2024
86 checks passed
@dbanks12 dbanks12 deleted the md/02-06-chore_acir-simulator_-_simulator branch February 6, 2024 17:30
Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a reminder that we should deprecate acir-simulator in npm after we release it under the new name.

TomAFrench pushed a commit that referenced this pull request Feb 7, 2024
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
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.

4 participants