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

fix: noir mirror merge strat #5166

Merged
merged 3 commits into from
Mar 12, 2024
Merged

fix: noir mirror merge strat #5166

merged 3 commits into from
Mar 12, 2024

Conversation

ludamad
Copy link
Collaborator

@ludamad ludamad commented Mar 12, 2024

This should be prioritizing manual changes in noir's aztec-packages

This should be prioritizing manual changes in noir's aztec-packages
@ludamad ludamad requested a review from TomAFrench March 12, 2024 17:46
@ludamad ludamad enabled auto-merge (squash) March 12, 2024 17:51
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 12, 2024

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (private-kernel-inner): 359 (-43%)
  • circuit_simulation_time_in_ms (public-kernel-app-logic): 183 (-58%)
  • tx_pxe_processing_time_ms (0): 3,166 (-20%)
  • tx_pxe_processing_time_ms (1): 1,426 (-18%)
  • tx_sequencer_processing_time_ms (1): 710 (-42%)
  • l2_block_building_time_in_ms (8): 12,823 (-25%)
  • l2_block_building_time_in_ms (32): 51,084 (-25%)
  • l2_block_building_time_in_ms (64): 101,465 (-25%)
  • l2_block_public_tx_process_time_in_ms (8): 5,870 (-41%)
  • l2_block_public_tx_process_time_in_ms (32): 23,135 (-42%)
  • l2_block_public_tx_process_time_in_ms (64): 45,926 (-42%)
  • note_trial_decrypting_time_in_ms (32): 88.9 (+91%)
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 58e15edf 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 18,820 36,356
l1_rollup_calldata_gas 66,052 238,672 469,400
l1_rollup_execution_gas 666,684 953,533 1,336,708
l2_block_processing_time_in_ms 1,210 (-8%) 4,779 (-1%) 8,951 (-1%)
note_successful_decrypting_time_in_ms 136 (-3%) 475 (-11%) 933 (-2%)
note_trial_decrypting_time_in_ms 40.5 (-8%) ⚠️ 88.9 (+91%) 65.4 (-26%)
l2_block_building_time_in_ms ⚠️ 12,823 (-25%) ⚠️ 51,084 (-25%) ⚠️ 101,465 (-25%)
l2_block_rollup_simulation_time_in_ms 6,926 (-2%) 27,892 (-1%) 55,436 (-1%)
l2_block_public_tx_process_time_in_ms ⚠️ 5,870 (-41%) ⚠️ 23,135 (-42%) ⚠️ 45,926 (-42%)

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,034 (+1%) 26,586 (+2%)
note_history_successful_decrypting_time_in_ms 1,197 (+1%) 2,360 (-2%)
note_history_trial_decrypting_time_in_ms 65.3 (-3%) 117 (-4%)
node_database_size_in_bytes 19,054,672 35,659,856
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 271 (-3%) 44,338 27,700
private-kernel-ordering 205 (-6%) 52,324 14,326
base-rollup 622 (-2%) 177,083 925
root-rollup 69.0 (+1%) 4,176 789
private-kernel-inner ⚠️ 359 (-43%) 73,197 27,700
public-kernel-app-logic ⚠️ 183 (-58%) 35,198 28,215
public-kernel-tail 175 (-1%) 40,926 28,215
merge-rollup 8.32 (+1%) 2,696 925

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 9.85 (-2%) 15.7 (-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 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.575 (-2%) 0.488 (-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 45.7 71.1 (-2%) 230 435 (-2%) 862 (-1%) 1,711 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.470 0.440 (-1%) 0.419 0.407 (-2%) 0.411 0.411 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 52.6 (-2%) 106 336 (+1%) 646 (-2%) 1,303 (-1%) 2,597 (-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.470 (-1%) 0.477 (-1%) 0.456 0.446 (-2%) 0.452 (-1%) 0.451 (-1%) 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 60.0 (-2%)
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.526 (-2%)

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes
tx_size_in_bytes 22,014

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms ⚠️ 3,166 (-20%) ⚠️ 1,426 (-18%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 12.9 (-1%) ⚠️ 710 (-42%)

@ludamad ludamad merged commit 74fa8d6 into master Mar 12, 2024
95 of 96 checks passed
@ludamad ludamad deleted the ad/fix-noir-mirror-merge-strat branch March 12, 2024 18:55
Copy link
Contributor

Changes to circuit sizes

Generated at commit: 48f8c6dc69f946c46c30ecd86e6cee153a103d82, compared to commit: a84ed21dd0b475720c89051d13be8061ce6ad889

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail +49,354 ❌ +13.23% +49,739 ❌ +5.93%
private_kernel_init +2,211 ❌ +4.76% +2,211 ❌ +0.63%
rollup_base +10,496 ❌ +6.52% +10,496 ❌ +0.61%
private_kernel_inner +2,214 ❌ +2.36% +2,214 ❌ +0.43%
public_kernel_tail +824 ❌ +0.65% +824 ❌ +0.23%
public_kernel_app_logic +593 ❌ +1.08% +593 ❌ +0.19%
public_kernel_setup +191 ❌ +0.70% +191 ❌ +0.11%
public_kernel_teardown +191 ❌ +0.65% +191 ❌ +0.11%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail 422,493 (+49,354) +13.23% 888,984 (+49,739) +5.93%
private_kernel_init 48,685 (+2,211) +4.76% 350,742 (+2,211) +0.63%
rollup_base 171,586 (+10,496) +6.52% 1,730,898 (+10,496) +0.61%
private_kernel_inner 95,968 (+2,214) +2.36% 521,696 (+2,214) +0.43%
public_kernel_tail 127,111 (+824) +0.65% 365,170 (+824) +0.23%
public_kernel_app_logic 55,521 (+593) +1.08% 313,315 (+593) +0.19%
public_kernel_setup 27,607 (+191) +0.70% 179,676 (+191) +0.11%
public_kernel_teardown 29,353 (+191) +0.65% 181,423 (+191) +0.11%

critesjosh pushed a commit that referenced this pull request Mar 13, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.27.2</summary>

##
[0.27.2](aztec-package-v0.27.1...aztec-package-v0.27.2)
(2024-03-13)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.27.2</summary>

##
[0.27.2](barretenberg.js-v0.27.1...barretenberg.js-v0.27.2)
(2024-03-13)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-cli: 0.27.2</summary>

##
[0.27.2](aztec-cli-v0.27.1...aztec-cli-v0.27.2)
(2024-03-13)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.27.2</summary>

##
[0.27.2](aztec-packages-v0.27.1...aztec-packages-v0.27.2)
(2024-03-13)


### Features

* Check initialization arguments in constructors
([#5144](#5144))
([d003bd6](d003bd6))
* Multithreaded prover folding
([#5147](#5147))
([94922fc](94922fc))
* Run tests in parallel in `nargo test`
(noir-lang/noir#4484)
([58e15ed](58e15ed))
* Track stack frames and their variables in the debugger
(noir-lang/noir#4188)
([58e15ed](58e15ed))


### Bug Fixes

* **acir_gen:** More granular element sizes array check
(noir-lang/noir#4528)
([58e15ed](58e15ed))
* Add `follow_bindings` to follow `Type::Alias` links
(noir-lang/noir#4521)
([58e15ed](58e15ed))
* Allow type aliases in main
(noir-lang/noir#4505)
([58e15ed](58e15ed))
* Constant gen
([#5172](#5172))
([394a0e0](394a0e0))
* **docs:** Update quickstart.md
([#5021](#5021))
([be9f8a1](be9f8a1))
* Dynamic assert messages in brillig
(noir-lang/noir#4531)
([58e15ed](58e15ed))
* Fix brillig slowdown when assigning arrays in loops
(noir-lang/noir#4472)
([58e15ed](58e15ed))
* Fix deployments
([#5183](#5183))
([596253b](596253b))
* Force src impl for == on slices
(noir-lang/noir#4507)
([58e15ed](58e15ed))
* Handling of gh deps in noir_wasm
(noir-lang/noir#4499)
([58e15ed](58e15ed))
* Intermittent invert 0 in Goblin
([#5174](#5174))
([3e68b49](3e68b49))
* Iterative flattening pass
(noir-lang/noir#4492)
([58e15ed](58e15ed))
* Noir mirror merge strat
([#5166](#5166))
([74fa8d6](74fa8d6))
* **ssa:** Handle mergers of slices returned from calls
(noir-lang/noir#4496)
([58e15ed](58e15ed))


### Miscellaneous

* Add `ModuleDeclaration` struct
(noir-lang/noir#4512)
([58e15ed](58e15ed))
* Add HashMap docs (noir-lang/noir#4457)
([58e15ed](58e15ed))
* Add regression test for issue 4449
(noir-lang/noir#4503)
([58e15ed](58e15ed))
* Better output in ci_deploy_contracts.sh
([#5171](#5171))
([8d73f8a](8d73f8a))
* Bump bb to 0.26.3 (noir-lang/noir#4488)
([58e15ed](58e15ed))
* **ci:** Fix JS publishing workflow checking out inconsistent commits
(noir-lang/noir#4493)
([58e15ed](58e15ed))
* Custom hash for eddsa (noir-lang/noir#4440)
([58e15ed](58e15ed))
* Deterministic mode
([#5155](#5155))
([e68b56a](e68b56a))
* Document big integers (noir-lang/noir#4487)
([58e15ed](58e15ed))
* Generalise `FunctionVisibility` to `ItemVisibility`
(noir-lang/noir#4495)
([58e15ed](58e15ed))
* Interaction for a mock first circuit handled inside the `EccOpQueue`
([#4854](#4854))
([d9cbdc8](d9cbdc8))
* Move `check_method_signatures` to type checking phase
(noir-lang/noir#4516)
([58e15ed](58e15ed))
* Move templated code for assert_message into the stdlib
(noir-lang/noir#4475)
([58e15ed](58e15ed))
* Organize the `blackbox_solver` crate
(noir-lang/noir#4519)
([58e15ed](58e15ed))
* Pass `import_directive` by reference
(noir-lang/noir#4511)
([58e15ed](58e15ed))
* Pass macro processors by reference
(noir-lang/noir#4501)
([58e15ed](58e15ed))
* Pull out separate function for compiling and running a test
([58e15ed](58e15ed))
* Release Noir(0.25.0) (noir-lang/noir#4352)
([58e15ed](58e15ed))
* Update cargo deny config (noir-lang/noir#4486)
([58e15ed](58e15ed))
* Update various dependencies
(noir-lang/noir#4513)
([58e15ed](58e15ed))
</details>

<details><summary>barretenberg: 0.27.2</summary>

##
[0.27.2](barretenberg-v0.27.1...barretenberg-v0.27.2)
(2024-03-13)


### Features

* Multithreaded prover folding
([#5147](#5147))
([94922fc](94922fc))


### Bug Fixes

* Intermittent invert 0 in Goblin
([#5174](#5174))
([3e68b49](3e68b49))


### Miscellaneous

* Interaction for a mock first circuit handled inside the `EccOpQueue`
([#4854](#4854))
([d9cbdc8](d9cbdc8))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Mar 14, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.27.2</summary>

##
[0.27.2](AztecProtocol/aztec-packages@aztec-package-v0.27.1...aztec-package-v0.27.2)
(2024-03-13)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.27.2</summary>

##
[0.27.2](AztecProtocol/aztec-packages@barretenberg.js-v0.27.1...barretenberg.js-v0.27.2)
(2024-03-13)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-cli: 0.27.2</summary>

##
[0.27.2](AztecProtocol/aztec-packages@aztec-cli-v0.27.1...aztec-cli-v0.27.2)
(2024-03-13)


### Miscellaneous

* **aztec-cli:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.27.2</summary>

##
[0.27.2](AztecProtocol/aztec-packages@aztec-packages-v0.27.1...aztec-packages-v0.27.2)
(2024-03-13)


### Features

* Check initialization arguments in constructors
([#5144](AztecProtocol/aztec-packages#5144))
([d003bd6](AztecProtocol/aztec-packages@d003bd6))
* Multithreaded prover folding
([#5147](AztecProtocol/aztec-packages#5147))
([94922fc](AztecProtocol/aztec-packages@94922fc))
* Run tests in parallel in `nargo test`
(noir-lang/noir#4484)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Track stack frames and their variables in the debugger
(noir-lang/noir#4188)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))


### Bug Fixes

* **acir_gen:** More granular element sizes array check
(noir-lang/noir#4528)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Add `follow_bindings` to follow `Type::Alias` links
(noir-lang/noir#4521)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Allow type aliases in main
(noir-lang/noir#4505)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Constant gen
([#5172](AztecProtocol/aztec-packages#5172))
([394a0e0](AztecProtocol/aztec-packages@394a0e0))
* **docs:** Update quickstart.md
([#5021](AztecProtocol/aztec-packages#5021))
([be9f8a1](AztecProtocol/aztec-packages@be9f8a1))
* Dynamic assert messages in brillig
(noir-lang/noir#4531)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Fix brillig slowdown when assigning arrays in loops
(noir-lang/noir#4472)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Fix deployments
([#5183](AztecProtocol/aztec-packages#5183))
([596253b](AztecProtocol/aztec-packages@596253b))
* Force src impl for == on slices
(noir-lang/noir#4507)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Handling of gh deps in noir_wasm
(noir-lang/noir#4499)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Intermittent invert 0 in Goblin
([#5174](AztecProtocol/aztec-packages#5174))
([3e68b49](AztecProtocol/aztec-packages@3e68b49))
* Iterative flattening pass
(noir-lang/noir#4492)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Noir mirror merge strat
([#5166](AztecProtocol/aztec-packages#5166))
([74fa8d6](AztecProtocol/aztec-packages@74fa8d6))
* **ssa:** Handle mergers of slices returned from calls
(noir-lang/noir#4496)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))


### Miscellaneous

* Add `ModuleDeclaration` struct
(noir-lang/noir#4512)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Add HashMap docs (noir-lang/noir#4457)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Add regression test for issue 4449
(noir-lang/noir#4503)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Better output in ci_deploy_contracts.sh
([#5171](AztecProtocol/aztec-packages#5171))
([8d73f8a](AztecProtocol/aztec-packages@8d73f8a))
* Bump bb to 0.26.3 (noir-lang/noir#4488)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* **ci:** Fix JS publishing workflow checking out inconsistent commits
(noir-lang/noir#4493)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Custom hash for eddsa (noir-lang/noir#4440)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Deterministic mode
([#5155](AztecProtocol/aztec-packages#5155))
([e68b56a](AztecProtocol/aztec-packages@e68b56a))
* Document big integers (noir-lang/noir#4487)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Generalise `FunctionVisibility` to `ItemVisibility`
(noir-lang/noir#4495)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Interaction for a mock first circuit handled inside the `EccOpQueue`
([#4854](AztecProtocol/aztec-packages#4854))
([d9cbdc8](AztecProtocol/aztec-packages@d9cbdc8))
* Move `check_method_signatures` to type checking phase
(noir-lang/noir#4516)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Move templated code for assert_message into the stdlib
(noir-lang/noir#4475)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Organize the `blackbox_solver` crate
(noir-lang/noir#4519)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Pass `import_directive` by reference
(noir-lang/noir#4511)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Pass macro processors by reference
(noir-lang/noir#4501)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Pull out separate function for compiling and running a test
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Release Noir(0.25.0) (noir-lang/noir#4352)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Update cargo deny config (noir-lang/noir#4486)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
* Update various dependencies
(noir-lang/noir#4513)
([58e15ed](AztecProtocol/aztec-packages@58e15ed))
</details>

<details><summary>barretenberg: 0.27.2</summary>

##
[0.27.2](AztecProtocol/aztec-packages@barretenberg-v0.27.1...barretenberg-v0.27.2)
(2024-03-13)


### Features

* Multithreaded prover folding
([#5147](AztecProtocol/aztec-packages#5147))
([94922fc](AztecProtocol/aztec-packages@94922fc))


### Bug Fixes

* Intermittent invert 0 in Goblin
([#5174](AztecProtocol/aztec-packages#5174))
([3e68b49](AztecProtocol/aztec-packages@3e68b49))


### Miscellaneous

* Interaction for a mock first circuit handled inside the `EccOpQueue`
([#4854](AztecProtocol/aztec-packages#4854))
([d9cbdc8](AztecProtocol/aztec-packages@d9cbdc8))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
ludamad added a commit that referenced this pull request Mar 15, 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.

3 participants