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

test: new cow optimization #5105

Closed
wants to merge 4 commits into from
Closed

Conversation

sirasistant
Copy link
Contributor

…ir/noir-repo

subrepo:
subdir: "noir/noir-repo"
merged: "85ba5f688e"
upstream:
origin: "https://github.com/noir-lang/noir"
branch: "jf/brillig-cow-assign2"
commit: "85ba5f688e"
git-subrepo:
version: "0.4.6"
origin: "???"
commit: "???"

Please read contributing guidelines and remove this line.

@sirasistant sirasistant force-pushed the arv/test_now_cow_optimization branch from bbe25fc to 4f2a52c Compare March 11, 2024 09:41
Copy link
Contributor

github-actions bot commented Mar 11, 2024

Changes to circuit sizes

Generated at commit: 3cc24647f3edb44a0784d9a3518a1573101983dd, compared to commit: 1519d3b07664f471a43d3f6bbb3dbe2d387289fc

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail +49,026 ❌ +13.14% +49,411 ❌ +5.89%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail 422,165 (+49,026) +13.14% 888,656 (+49,411) +5.89%

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 11, 2024

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (private-kernel-inner): 645 (+76%)
  • circuit_simulation_time_in_ms (public-kernel-app-logic): 429 (+122%)
  • tx_pxe_processing_time_ms (0): 3,821 (+31%)
  • tx_pxe_processing_time_ms (1): 1,772 (+20%)
  • tx_sequencer_processing_time_ms (1): 1,120 (+72%)
  • l2_block_building_time_in_ms (8): 16,365 (+27%)
  • l2_block_building_time_in_ms (32): 65,670 (+30%)
  • l2_block_building_time_in_ms (64): 130,103 (+28%)
  • l2_block_public_tx_process_time_in_ms (8): 8,931 (+72%)
  • l2_block_public_tx_process_time_in_ms (32): 36,116 (+76%)
  • l2_block_public_tx_process_time_in_ms (64): 71,017 (+74%)
  • note_successful_decrypting_time_in_ms (8): 153 (-35%)
  • note_trial_decrypting_time_in_ms (32): 100 (+163%)
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 dc2fd9e5 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 5,668 (-1%) 18,820 36,356
l1_rollup_calldata_gas 65,728 (-1%) 238,372 469,364
l1_rollup_execution_gas 666,208 (-1%) 953,081 (-3%) 1,336,520 (-4%)
l2_block_processing_time_in_ms 1,298 (-3%) 4,819 (+1%) 9,534 (+6%)
note_successful_decrypting_time_in_ms ⚠️ 153 (-35%) 577 (-8%) 1,024 (+9%)
note_trial_decrypting_time_in_ms 58.1 (+46%) ⚠️ 100 (+163%) 58.0 (-24%)
l2_block_building_time_in_ms ⚠️ 16,365 (+27%) ⚠️ 65,670 (+30%) ⚠️ 130,103 (+28%)
l2_block_rollup_simulation_time_in_ms 7,396 (-3%) 29,429 (-2%) 58,901 (-3%)
l2_block_public_tx_process_time_in_ms ⚠️ 8,931 (+72%) ⚠️ 36,116 (+76%) ⚠️ 71,017 (+74%)

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,833 (-1%) 27,333 (-1%)
note_history_successful_decrypting_time_in_ms 1,231 (-13%) 2,464 (-8%)
note_history_trial_decrypting_time_in_ms 59.4 (-59%) 162 (+42%)
node_database_size_in_bytes 18,722,896 (-1%) 35,340,368 (-1%)
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 284 44,338 (-1%) 27,700 (-1%)
private-kernel-ordering 224 (+6%) 52,324 (-1%) 14,326 (-2%)
base-rollup 668 (-3%) 177,083 925 (-7%)
root-rollup 68.2 (-4%) 4,176 (-3%) 789 (-4%)
private-kernel-inner ⚠️ 645 (+76%) 73,197 (-1%) 27,700 (-1%)
public-kernel-app-logic ⚠️ 429 (+122%) 34,582 (-1%) 27,671 (-1%)
public-kernel-tail 93.2 (-1%) 34,206 (-1%) 27,671 (-1%)
merge-rollup 8.29 (-8%) 2,696 (-5%) 925 (-7%)

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.2 (+3%) 15.9 (-1%) 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 (-1%) 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.597 (+3%) 0.491 (-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.3 (-1%) 72.5 (+1%) 230 442 883 (+2%) 1,720 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.475 0.447 (+1%) 0.420 0.415 0.419 (+2%) 0.412 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 53.6 (-3%) 106 343 (+1%) 656 (-2%) 1,319 (+1%) 2,630 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.478 (-3%) 0.480 0.464 (+1%) 0.453 (-2%) 0.456 (+1%) 0.457 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.2 (-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
tx_size_in_bytes 19,661

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms ⚠️ 3,821 (+31%) ⚠️ 1,772 (+20%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 9.50 (+5%) ⚠️ 1,120 (+72%)

@TomAFrench
Copy link
Member

Closing in favour of #5136 and #5134

@TomAFrench TomAFrench closed this Mar 11, 2024
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.

None yet

3 participants