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: switch field comparisons to efficient approach #4013

Closed
wants to merge 2 commits into from

Conversation

sirasistant
Copy link
Collaborator

Please read contributing guidelines and remove this line.

@AztecBot
Copy link
Collaborator

AztecBot commented Jan 15, 2024

Benchmark results

Metrics with a significant change:

  • node_database_size_in_bytes (10): 3,731,075 (-30%)
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 fd1f619f 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,444 179,588 716,132
l1_rollup_calldata_gas 221,028 866,312 3,446,312
l1_rollup_execution_gas 934,172 3,968,786 24,789,848
l2_block_processing_time_in_ms 1,552 (+1%) 5,101 (-1%) 21,323
note_successful_decrypting_time_in_ms 307 (-11%) 938 (-3%) 3,406 (-3%)
note_trial_decrypting_time_in_ms 17.9 (-66%) 64.9 (-29%) 136 (-3%)
l2_block_building_time_in_ms 16,018 (+7%) 63,764 (+7%) 255,104 (+7%)
l2_block_rollup_simulation_time_in_ms 11,630 (+10%) 46,357 (+10%) 185,892 (+10%)
l2_block_public_tx_process_time_in_ms 4,354 17,310 68,823 (-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 14,989 (-2%) 28,718 (-1%)
note_history_successful_decrypting_time_in_ms 2,186 (-4%) 4,251 (-7%)
note_history_trial_decrypting_time_in_ms 121 (-23%) 160 (-29%)
node_database_size_in_bytes 3,623,248 ⚠️ 3,731,075 (-30%)
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 213 44,681 25,561
private-kernel-ordering 165 (-1%) 43,753 14,809
base-rollup 1,198 (+13%) 128,338 881
root-rollup 80.2 (-3%) 4,088 709
private-kernel-inner 292 71,208 25,561
public-kernel-private-input 205 31,863 25,561
public-kernel-non-first-iteration 203 31,905 25,561
merge-rollup 8.21 (-1%) 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 64 leaves 128 leaves 512 leaves 1024 leaves 2048 leaves 8192 leaves
batch_insert_into_append_only_tree_ms 11.1 (-1%) 17.3 (+3%) 14.4 (+4%) 17.8 (-1%) 23.9 49.9 (-1%) 87.2 (+13%) 244 468 (-1%) 910 (-1%) 3,614 (+1%)
batch_insert_into_indexed_tree_ms N/A N/A N/A 63.8 (-2%) N/A 59.5 (-1%) 110 (-1%) 359 (-1%) 738 1,412 5,578

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 15,455 32,224

Transaction processing duration by data writes.

Metric 0 new commitments 1 new commitments
tx_pxe_processing_time_ms 373 (-1%) 1,082 (-1%)
Metric 1 public data writes
tx_sequencer_processing_time_ms 536

Copy link
Contributor

github-actions bot commented Jan 15, 2024

Changes to circuit sizes

Generated at commit: 292031f2f3e8dcdb4c4e712de800f55a702e4aaa, compared to commit: fd1f619f443916c172b6311aa71a84153145ef4d

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base -120,480 ✅ -50.46% -97,520 ✅ -6.73%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
rollup_base 118,276 (-120,480) -50.46% 1,350,632 (-97,520) -6.73%

@sirasistant
Copy link
Collaborator Author

noir PR noir-lang/noir#4042

@ludamad ludamad deleted the arv/assert_gt branch August 22, 2024 14:17
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.

2 participants