Skip to content

chore(ssa): Additional unrolling and mem2reg passes #8017

Merged
vezenovm merged 26 commits intomasterfrom
mv/additional-unrolling-and-mem2reg
Apr 14, 2025
Merged

chore(ssa): Additional unrolling and mem2reg passes #8017
vezenovm merged 26 commits intomasterfrom
mv/additional-unrolling-and-mem2reg

Conversation

@vezenovm
Copy link
Contributor

@vezenovm vezenovm commented Apr 10, 2025

Description

Problem*

Resolves #7995 (comment)

From that PRs description:

I don't think the regressions are as bad as they look if we chose not to go with #8017 [this PR]. The sample program is very small and is only regressing due to no longer triggering a loop unroll. A larger loop already would not have had triggered an unroll, and perhaps with more aggressive loop unrolling in the future it will not be an issue.

We are getting some large regressions in #7995:
Screenshot 2025-04-10 at 3 16 04 PM

Looking at the SSA on master we have the following before and after unrolling:

Details

After Loop Invariant Code Motion:
brillig(inline) predicate_pure fn main f0 {
  b0():
    v3 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v3
    v4 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v4
    inc_rc v3
    inc_rc v4
    v5 = allocate -> &mut [Field; 2]
    store v3 at v5
    v6 = allocate -> &mut u32
    store u32 0 at v6
    v8 = allocate -> &mut [Field; 2]
    store v4 at v8
    v9 = allocate -> &mut u32
    store u32 0 at v9
    jmp b1(u32 0)
  b1(v0: u32):
    v11 = lt v0, u32 2
    jmpif v11 then: b2, else: b3
  b2():
    jmpif u1 1 then: b4, else: b5
  b3():
    v12 = load v5 -> [Field; 2]
    v13 = load v6 -> u32
    v14 = load v8 -> [Field; 2]
    v15 = load v9 -> u32
    v18 = array_set v14, index u32 1, value Field 27
    store v18 at v8
    store v15 at v9
    inc_rc v12
    v19 = array_get v12, index u32 0 -> Field
    v20 = array_get v12, index u32 1 -> Field
    v21 = array_get v12, index u32 0 -> Field
    v22 = array_set v12, index u32 1, value v21
    v23 = array_set v22, index u32 0, value v20
    store v23 at v5
    store v13 at v6
    jmp b6(u32 0)
  b4():
    v29 = cast v0 as Field
    v30 = load v5 -> [Field; 2]
    v31 = load v6 -> u32
    v32 = lt v31, u32 2
    constrain v32 == u1 1, "push out of bounds"
    v33 = array_set v30, index v31, value v29
    v34 = add v31, u32 1
    store v33 at v5
    store v34 at v6
    jmp b5()
  b5():
    v35 = unchecked_add v0, u32 1
    jmp b1(v35)
  b6(v1: u32):
    v24 = eq v1, u32 0
    jmpif v24 then: b7, else: b8
  b7():
    v25 = array_get v12, index v1 -> Field
    v26 = eq v25, v19
    constrain v25 == v19
    v27 = unchecked_add v1, u32 1
    jmp b6(v27)
  b8():
    return
}

After Unrolling:
brillig(inline) predicate_pure fn main f0 {
  b0():
    v1 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v1
    v2 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v2
    inc_rc v1
    inc_rc v2
    v3 = allocate -> &mut [Field; 2]
    store v1 at v3
    v4 = allocate -> &mut u32
    store u32 0 at v4
    v6 = allocate -> &mut [Field; 2]
    store v2 at v6
    v7 = allocate -> &mut u32
    store u32 0 at v7
    jmp b3()
  b1():
    v22 = load v3 -> [Field; 2]
    v23 = load v4 -> u32
    v24 = load v6 -> [Field; 2]
    v25 = load v7 -> u32
    v27 = array_set v24, index u32 1, value Field 27
    store v27 at v6
    store v25 at v7
    inc_rc v22
    v28 = array_get v22, index u32 0 -> Field
    v29 = array_get v22, index u32 1 -> Field
    v30 = array_get v22, index u32 0 -> Field
    v31 = array_set v22, index u32 1, value v30
    v32 = array_set v31, index u32 0, value v29
    store v32 at v3
    store v23 at v4
    v33 = array_get v22, index u32 0 -> Field
    v34 = eq v33, v28
    constrain v33 == v28
    jmp b2()
  b2():
    return
  b3():
    v8 = load v3 -> [Field; 2]
    v9 = load v4 -> u32
    v11 = lt v9, u32 2
    constrain v11 == u1 1, "push out of bounds"
    v13 = array_set v8, index v9, value Field 0
    v15 = add v9, u32 1
    store v13 at v3
    store v15 at v4
    jmp b4()
  b4():
    jmp b5()
  b5():
    v16 = load v3 -> [Field; 2]
    v17 = load v4 -> u32
    v18 = lt v17, u32 2
    constrain v18 == u1 1, "push out of bounds"
    v20 = array_set v16, index v17, value Field 1
    v21 = add v17, u32 1
    store v20 at v3
    store v21 at v4
    jmp b6()
  b6():
    jmp b1()
}

And the following after #7995

Details

After Loop Invariant Code Motion:
brillig(inline) predicate_pure fn main f0 {
  b0():
    v3 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v3
    v4 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v4
    inc_rc v3
    inc_rc v4
    v5 = allocate -> &mut [Field; 2]
    store v3 at v5
    v6 = allocate -> &mut u32
    store u32 0 at v6
    v8 = allocate -> &mut [Field; 2]
    store v4 at v8
    v9 = allocate -> &mut u32
    store u32 0 at v9
    jmp b1(u32 0)
  b1(v0: u32):
    v11 = lt v0, u32 2
    jmpif v11 then: b2, else: b3
  b2():
    jmpif u1 1 then: b4, else: b5
  b3():
    v12 = load v5 -> [Field; 2]
    v13 = load v6 -> u32
    v14 = load v8 -> [Field; 2]
    v15 = load v9 -> u32
    v18 = array_set v14, index u32 1, value Field 27
    store v18 at v8
    store v15 at v9
    inc_rc v12
    v19 = array_get v12, index u32 0 -> Field
    v20 = array_get v12, index u32 1 -> Field
    v21 = array_get v12, index u32 0 -> Field
    v22 = array_set v12, index u32 1, value v21
    v23 = array_set v22, index u32 0, value v20
    store v23 at v5
    store v13 at v6
    jmp b6(u32 0)
  b4():
    v29 = cast v0 as Field
    v30 = load v5 -> [Field; 2]
    v31 = load v6 -> u32
    v32 = lt v31, u32 2
    constrain v32 == u1 1, "push out of bounds"
    v33 = lt v31, u32 2
    constrain v33 == u1 1, "Index out of bounds"
    v34 = array_set v30, index v31, value v29
    v35 = add v31, u32 1
    store v34 at v5
    store v35 at v6
    jmp b5()
  b5():
    v36 = unchecked_add v0, u32 1
    jmp b1(v36)
  b6(v1: u32):
    v24 = eq v1, u32 0
    jmpif v24 then: b7, else: b8
  b7():
    v25 = array_get v12, index v1 -> Field
    v26 = eq v25, v19
    constrain v25 == v19
    v27 = unchecked_add v1, u32 1
    jmp b6(v27)
  b8():
    return
}

After Unrolling:
brillig(inline) predicate_pure fn main f0 {
  b0():
    v2 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v2
    v3 = make_array [Field 0, Field 0] : [Field; 2]
    inc_rc v3
    inc_rc v2
    inc_rc v3
    v4 = allocate -> &mut [Field; 2]
    store v2 at v4
    v5 = allocate -> &mut u32
    store u32 0 at v5
    v7 = allocate -> &mut [Field; 2]
    store v3 at v7
    v8 = allocate -> &mut u32
    store u32 0 at v8
    jmp b1(u32 0)
  b1(v0: u32):
    v10 = lt v0, u32 2
    jmpif v10 then: b2, else: b3
  b2():
    jmpif u1 1 then: b4, else: b5
  b3():
    v11 = load v4 -> [Field; 2]
    v12 = load v5 -> u32
    v13 = load v7 -> [Field; 2]
    v14 = load v8 -> u32
    v17 = array_set v13, index u32 1, value Field 27
    store v17 at v7
    store v14 at v8
    inc_rc v11
    v18 = array_get v11, index u32 0 -> Field
    v19 = array_get v11, index u32 1 -> Field
    v20 = array_get v11, index u32 0 -> Field
    v21 = array_set v11, index u32 1, value v20
    v22 = array_set v21, index u32 0, value v19
    store v22 at v4
    store v12 at v5
    v23 = array_get v11, index u32 0 -> Field
    v24 = eq v23, v18
    constrain v23 == v18
    jmp b6()
  b4():
    v26 = cast v0 as Field
    v27 = load v4 -> [Field; 2]
    v28 = load v5 -> u32
    v29 = lt v28, u32 2
    constrain v29 == u1 1, "push out of bounds"
    v30 = lt v28, u32 2
    constrain v30 == u1 1, "Index out of bounds"
    v31 = array_set v27, index v28, value v26
    v32 = add v28, u32 1
    store v31 at v4
    store v32 at v5
    jmp b5()
  b5():
    v33 = unchecked_add v0, u32 1
    jmp b1(v33)
  b6():
    return
}

We have constrain the BoundedVec len field when we push, but we now have an additional index OOB check on the array set. This is preventing us from unrolling this small Brillig loop.

Summary*

This regression can be solved with an additional unrolling pass following constant folding as we should be able to remove the repeat constrain instructions. We then need another mem2reg pass following simplify_cfg in case the blocks have been sufficiently simplified to remove more load/stores.

I was not sure if we wanted to include this optimization so I split it out from #7995. Two more passes for a very specific case seems a bit overblown. Loop unrolling should not be very expensive the second time as most loops that were not unrolled previously will be not be unrolled again. Most of the cost would be the additional mem2reg pass.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@vezenovm vezenovm changed the base branch from master to mv/do-not-insert-oob-check-in-dir April 10, 2025 19:29
@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2025

Changes to Brillig bytecode sizes

Generated at commit: 7c633ab8786ce5178804adda008d24881c87032f, compared to commit: 511cb2fa0d9e910eac9375fc357dc7567ce7d92a

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
missing_closure_env_inliner_zero -16 ✅ -38.10%
brillig_rc_regression_6123_inliner_max -121 ✅ -85.82%
brillig_rc_regression_6123_inliner_zero -121 ✅ -85.82%

Full diff report 👇
Program Brillig opcodes (+/-) %
slice_regex_inliner_max 2,303 (-4) -0.17%
hashmap_inliner_zero 6,842 (-12) -0.18%
slice_regex_inliner_zero 1,657 (-16) -0.96%
slice_regex_inliner_min 2,041 (-24) -1.16%
slices_inliner_max 1,696 (-36) -2.08%
references_inliner_zero 232 (-8) -3.33%
array_to_slice_inliner_max 471 (-17) -3.48%
fold_complex_outputs_inliner_max 385 (-17) -4.23%
uhashmap_inliner_max 10,366 (-523) -4.80%
hashmap_inliner_max 16,022 (-1,256) -7.27%
derive_inliner_max 128 (-11) -7.91%
side_effects_constrain_array_inliner_max 88 (-17) -16.19%
tuples_inliner_max 32 (-9) -21.95%
tuples_inliner_min 32 (-9) -21.95%
tuples_inliner_zero 32 (-9) -21.95%
references_inliner_max 99 (-29) -22.66%
closures_mut_ref_inliner_zero 34 (-17) -33.33%
missing_closure_env_inliner_zero 26 (-16) -38.10%
brillig_rc_regression_6123_inliner_max 20 (-121) -85.82%
brillig_rc_regression_6123_inliner_zero 20 (-121) -85.82%

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2025

Changes to number of Brillig opcodes executed

Generated at commit: 7c633ab8786ce5178804adda008d24881c87032f, compared to commit: 511cb2fa0d9e910eac9375fc357dc7567ce7d92a

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
side_effects_constrain_array_inliner_max -35 ✅ -46.05%
brillig_rc_regression_6123_inliner_max -235 ✅ -92.89%
brillig_rc_regression_6123_inliner_zero -235 ✅ -92.89%

Full diff report 👇
Program Brillig opcodes (+/-) %
hashmap_inliner_zero 67,665 (-12) -0.02%
slice_regex_inliner_min 8,438 (-24) -0.28%
slice_regex_inliner_zero 3,997 (-16) -0.40%
slices_inliner_max 2,570 (-57) -2.17%
uhashmap_inliner_max 123,665 (-2,814) -2.22%
slice_regex_inliner_max 3,220 (-90) -2.72%
array_to_slice_inliner_max 1,046 (-31) -2.88%
hashmap_inliner_max 42,059 (-1,596) -3.66%
references_inliner_zero 366 (-14) -3.68%
derive_inliner_max 127 (-9) -6.62%
fold_complex_outputs_inliner_max 599 (-45) -6.99%
references_inliner_max 162 (-30) -15.63%
tuples_inliner_max 26 (-5) -16.13%
tuples_inliner_min 26 (-5) -16.13%
tuples_inliner_zero 26 (-5) -16.13%
closures_mut_ref_inliner_zero 34 (-13) -27.66%
missing_closure_env_inliner_zero 22 (-12) -35.29%
side_effects_constrain_array_inliner_max 41 (-35) -46.05%
brillig_rc_regression_6123_inliner_max 18 (-235) -92.89%
brillig_rc_regression_6123_inliner_zero 18 (-235) -92.89%

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2025

Changes to circuit sizes

Generated at commit: 7c633ab8786ce5178804adda008d24881c87032f, compared to commit: 511cb2fa0d9e910eac9375fc357dc7567ce7d92a

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
regression -4 ✅ -1.36% -5 ✅ -0.13%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
regression 290 (-4) -1.36% 3,833 (-5) -0.13%

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: d9e5306 Previous: 511cb2f Ratio
test_report_noir-lang_noir_bigcurve_ 266 s 220 s 1.21

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@vezenovm
Copy link
Contributor Author

regression_6674_1_inliner_zero 199 (+46) +30.07%
regression_6674_2_inliner_zero 199 (+46) +30.07%
regression_6674_1_inliner_max 221 (+24) +12.18%
regression_6674_2_inliner_max 221 (+24) +12.18%
regression_7062_inliner_max 95 (+8) +9.20%
regression_7062_inliner_min 95 (+8) +9.20%
regression_7062_inliner_zero 95 (+8) +9.20%

This report was run against master. It looks like we did not get rid of these regressions with the extra passes, but the largest regression from #7995 (comment) has been removed and we in fact got some improvements in various unreleated programs.

@vezenovm vezenovm requested a review from a team April 10, 2025 19:41
@vezenovm vezenovm marked this pull request as ready for review April 10, 2025 19:41
@vezenovm vezenovm changed the title chore: Additional unrolling and mem2reg passes chore(ssa): Additional unrolling and mem2reg passes Apr 10, 2025
@jfecher
Copy link
Contributor

jfecher commented Apr 11, 2025

Wonder if the 50s compilation time increase on bigcurve is spurious or related

Copy link
Contributor

@michaeljklein michaeljklein left a comment

Choose a reason for hiding this comment

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

LGTM, though this might be something to enable with a flag if we see more compile duration regressions

@vezenovm
Copy link
Contributor Author

Wonder if the 50s compilation time increase on bigcurve is spurious or related

I just updated the branch again so we shall see. If you look at the edit history for that alert it does seem spurious. In the first alert bigcurve did not trigger an alert, in the second alert is was 300s current vs. 219s previous for bigcurve, and the third alert was 260s vs 210s previous for bigcurve.

@vezenovm
Copy link
Contributor Author

The next alert gave us 283s current vs 224s previous for bigcurve. So it does look like we have a compilation regression here. I'm going to run this PR with bench-show

@vezenovm vezenovm added the bench-show Display benchmark results on PR label Apr 11, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ACVM Benchmarks

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
purely_sequential_opcodes 264431 ns/iter (± 1578) 267669 ns/iter (± 7119) 0.99
perfectly_parallel_opcodes 232558 ns/iter (± 7246) 235345 ns/iter (± 9465) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Time

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
regression_4709 0.641 s 0.653 s 0.98
ram_blowup_regression 14.7 s 14.7 s 1
global_var_regression_entry_points 0.46 s 0.451 s 1.02
private-kernel-inner 2.294 s 2.456 s 0.93
private-kernel-reset 7.04 s 7.038 s 1.00
private-kernel-tail 1.072 s 1.072 s 1
rollup-base-private 18.34 s 18.56 s 0.99
rollup-base-public 13.92 s 13.88 s 1.00
rollup-block-root-empty 0.896 s 0.904 s 0.99
rollup-block-root-single-tx 128 s 128 s 1
rollup-block-root 130 s 130 s 1
rollup-merge 0.881 s 0.849 s 1.04
rollup-root 1.528 s 1.482 s 1.03

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Time

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
private-kernel-inner 0.028 s 0.029 s 0.97
private-kernel-reset 0.164 s 0.163 s 1.01
private-kernel-tail 0.017 s 0.017 s 1
rollup-base-private 0.334 s 0.337 s 0.99
rollup-base-public 0.215 s 0.214 s 1.00
rollup-block-root 16.3 s 16.5 s 0.99
rollup-merge 0.004 s 0.004 s 1
rollup-root 0.013 s 0.013 s 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Test Suite Duration

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
test_report_AztecProtocol_aztec-packages_noir-projects_aztec-nr 51 s 50 s 1.02
test_report_AztecProtocol_aztec-packages_noir-projects_noir-contracts 88 s 89 s 0.99
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 48 s 50 s 0.96
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_private-kernel-lib 171 s 171 s 1
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_rollup-lib 173 s 168 s 1.03
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_types 51 s 53 s 0.96
test_report_noir-lang_noir-bignum_ 76 s 79 s 0.96
test_report_noir-lang_noir_bigcurve_ 252 s 220 s 1.15
test_report_noir-lang_sha512_ 32 s 31 s 1.03

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Compilation Memory

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
private-kernel-inner 270.85 MB 270.14 MB 1.00
private-kernel-reset 688.39 MB 603.74 MB 1.14
private-kernel-tail 199.53 MB 199.52 MB 1.00
rollup-base-private 1560 MB 1560 MB 1
rollup-base-public 1320 MB 1320 MB 1
rollup-block-root-empty 270.22 MB 270.2 MB 1.00
rollup-block-root-single-tx 7770 MB 7770 MB 1
rollup-block-root 7780 MB 7780 MB 1
rollup-merge 271.42 MB 271.41 MB 1.00
rollup-root 321.92 MB 321.93 MB 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Execution Memory

Details
Benchmark suite Current: fa26c5d Previous: 511cb2f Ratio
private-kernel-inner 209.31 MB 209.31 MB 1
private-kernel-reset 246.05 MB 246.07 MB 1.00
private-kernel-tail 183.15 MB 183.15 MB 1
rollup-base-private 486.79 MB 486.79 MB 1
rollup-base-public 462.77 MB 462.77 MB 1
rollup-block-root 1710 MB 1710 MB 1
rollup-merge 254.16 MB 254.16 MB 1
rollup-root 260.72 MB 260.72 MB 1

This comment was automatically generated by workflow using github-action-benchmark.

Base automatically changed from mv/do-not-insert-oob-check-in-dir to master April 11, 2025 18:01
@vezenovm vezenovm added this pull request to the merge queue Apr 14, 2025
Merged via the queue into master with commit a1fab4a Apr 14, 2025
113 checks passed
@vezenovm vezenovm deleted the mv/additional-unrolling-and-mem2reg branch April 14, 2025 15:37
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Apr 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: allow keywords in function names in SSA parser
(noir-lang/noir#8063)
chore: don't use `set_value_from_id` in `as_slice_length`
(noir-lang/noir#8039)
fix(ssa): Do not use inner else condition when collapsing IfElse based
upon the then condition (noir-lang/noir#8040)
chore(test): AST generation calibration test
(noir-lang/noir#8054)
chore(ssa): Remove IfElse pass basic SSA tests
(noir-lang/noir#8058)
chore(ssa): Additional unrolling and mem2reg passes
(noir-lang/noir#8017)
chore: bump external pinned commits
(noir-lang/noir#8045)
chore: bump bb to 0.84.0 (noir-lang/noir#8047)
chore: Add `GITHUB_TOKEN` to more workflow steps
(noir-lang/noir#8046)
feat: skip inverting field elements with values +-1 in ACVM
(noir-lang/noir#8049)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <tom@tomfren.ch>
Co-authored-by: AztecBot <tech@aztecprotocol.com>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Apr 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: allow keywords in function names in SSA parser
(noir-lang/noir#8063)
chore: don't use `set_value_from_id` in `as_slice_length`
(noir-lang/noir#8039)
fix(ssa): Do not use inner else condition when collapsing IfElse based
upon the then condition (noir-lang/noir#8040)
chore(test): AST generation calibration test
(noir-lang/noir#8054)
chore(ssa): Remove IfElse pass basic SSA tests
(noir-lang/noir#8058)
chore(ssa): Additional unrolling and mem2reg passes
(noir-lang/noir#8017)
chore: bump external pinned commits
(noir-lang/noir#8045)
chore: bump bb to 0.84.0 (noir-lang/noir#8047)
chore: Add `GITHUB_TOKEN` to more workflow steps
(noir-lang/noir#8046)
feat: skip inverting field elements with values +-1 in ACVM
(noir-lang/noir#8049)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <tom@tomfren.ch>
Co-authored-by: AztecBot <tech@aztecprotocol.com>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Apr 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: allow keywords in function names in SSA parser
(noir-lang/noir#8063)
chore: don't use `set_value_from_id` in `as_slice_length`
(noir-lang/noir#8039)
fix(ssa): Do not use inner else condition when collapsing IfElse based
upon the then condition (noir-lang/noir#8040)
chore(test): AST generation calibration test
(noir-lang/noir#8054)
chore(ssa): Remove IfElse pass basic SSA tests
(noir-lang/noir#8058)
chore(ssa): Additional unrolling and mem2reg passes
(noir-lang/noir#8017)
chore: bump external pinned commits
(noir-lang/noir#8045)
chore: bump bb to 0.84.0 (noir-lang/noir#8047)
chore: Add `GITHUB_TOKEN` to more workflow steps
(noir-lang/noir#8046)
feat: skip inverting field elements with values +-1 in ACVM
(noir-lang/noir#8049)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <tom@tomfren.ch>
Co-authored-by: AztecBot <tech@aztecprotocol.com>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Apr 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: allow keywords in function names in SSA parser
(noir-lang/noir#8063)
chore: don't use `set_value_from_id` in `as_slice_length`
(noir-lang/noir#8039)
fix(ssa): Do not use inner else condition when collapsing IfElse based
upon the then condition (noir-lang/noir#8040)
chore(test): AST generation calibration test
(noir-lang/noir#8054)
chore(ssa): Remove IfElse pass basic SSA tests
(noir-lang/noir#8058)
chore(ssa): Additional unrolling and mem2reg passes
(noir-lang/noir#8017)
chore: bump external pinned commits
(noir-lang/noir#8045)
chore: bump bb to 0.84.0 (noir-lang/noir#8047)
chore: Add `GITHUB_TOKEN` to more workflow steps
(noir-lang/noir#8046)
feat: skip inverting field elements with values +-1 in ACVM
(noir-lang/noir#8049)
END_COMMIT_OVERRIDE

---------

Co-authored-by: TomAFrench <tom@tomfren.ch>
Co-authored-by: AztecBot <tech@aztecprotocol.com>
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Apr 24, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.86.0](v0.85.0...v0.86.0)
(2025-04-24)


### ⚠ BREAKING CHANGES

* Use combined p2p and http prover coordination
([#13760](#13760))
* use single extended viem client
([#13715](#13715))
* remove slice read from CALL
([#13729](#13729))

### Features

* `#[allow(dead_code)]` (noir-lang/noir#8066)
([366d980](366d980))
* add aztec-up amm test w/ proving & sponsoredfpc
([#13209](#13209))
([f54c8a1](f54c8a1))
* Add Rollup to registry and produce blocks
([#13556](#13556))
([9ed10d3](9ed10d3))
* adding devnet tests
([#12808](#12808))
([7687a1f](7687a1f))
* audit tracking tooling
([#13639](#13639))
([e50d8e0](e50d8e0))
* **avm:** fast entity indexing without macros
([#13737](#13737))
([5c8a993](5c8a993))
* **avm:** quick n dirty memory trace
([#13659](#13659))
([062c6a9](062c6a9))
* **avm:** support col arrays and add keccak cols
([#13711](#13711))
([9c4345a](9c4345a))
* **avm:** tagged value type in C++
([#13540](#13540))
([b30b5b3](b30b5b3))
* avoid unnecessary zero check in brillig overflow check
(noir-lang/noir#8109)
([366d980](366d980))
* **contracts:** static + snapshotted validator set
([#13046](#13046))
([90033f2](90033f2))
* enable mempool limiter on devnet
([#13722](#13722))
([36fb0a1](36fb0a1))
* exec opcode spec table
([#13594](#13594))
([d4d503a](d4d503a))
* **experimental:** Implement separate `-Zownership` analysis for
ownership pass (noir-lang/noir#7861)
([366d980](366d980))
* expose mempool limit through helm chart
([#13616](#13616))
([822e8d9](822e8d9))
* Garaga UltraStarknet[Zk]Honk flavours
([#11489](#11489))
([6bc34a1](6bc34a1))
* IPA claim as public component
([#13429](#13429))
([1ce3c43](1ce3c43))
* no longer recompute vk's in CIVC proofs
([#13590](#13590))
([66a61ba](66a61ba))
* **p2p:** add private peers
([#12585](#12585))
([4264c8c](4264c8c))
* **p2p:** optional P2P_BROADCAST_PORT
([#13525](#13525))
([f709fab](f709fab))
* Port callstack resolution from aztec to noirjs
(noir-lang/noir#7642)
([366d980](366d980))
* Refactor IPA claim handling in acir format to support them for AVM
([#13547](#13547))
([df73c05](df73c05))
* remove slice read from CALL
([#13729](#13729))
([7e7eb85](7e7eb85))
* replace field divisions by constants with multiplication by inv…
(noir-lang/noir#8053)
([366d980](366d980))
* report world state size on disk
([#13706](#13706))
([0dd8a7e](0dd8a7e))
* skip inverting field elements with values +-1 in ACVM
(noir-lang/noir#8049)
([44c1347](44c1347))
* SMT Verificaiton Module: Data Structures
([#13658](#13658))
([2de3bc5](2de3bc5))
* SMT verification module updates
([#13551](#13551))
([f02123d](f02123d))
* ssa fuzzer (noir-lang/noir#7641)
([366d980](366d980))
* Tighter timing on ACVM
([#13743](#13743))
([45cd39b](45cd39b))
* track rewards and slots
([#13546](#13546))
([489c6cf](489c6cf))
* Use combined p2p and http prover coordination
([#13760](#13760))
([4d04e62](4d04e62))
* VK generation test for HonkRecursionConstraint
([#13637](#13637))
([71e81ce](71e81ce))


### Bug Fixes

* **acir:** Check whether opcodes were laid down for non-equality check
before fetching payload locations
(noir-lang/noir#8133)
([366d980](366d980))
* add proper handling for `u128` in comptime interpreter
(noir-lang/noir#8079)
([366d980](366d980))
* Add version to gossipsub protocol
([#13567](#13567))
([8ce4829](8ce4829))
* allow keywords in function names in SSA parser
(noir-lang/noir#8063)
([44c1347](44c1347))
* Allow more slack in AST calibration for CI
(noir-lang/noir#8076)
([366d980](366d980))
* amm bot
([#13553](#13553))
([6b93832](6b93832)),
closes
[#13544](#13544)
* **avm:** cpp addressing
([#13652](#13652))
([9d941b6](9d941b6))
* blob sink waits for reg address when needed
([#13628](#13628))
([486a42a](486a42a))
* **brillig:** SliceRefCount reads from the appropriate pointer
(noir-lang/noir#8148)
([366d980](366d980))
* Check against multiple aws profiles in build instance credentails
([#13421](#13421))
([71a408a](71a408a))
* dependency cycles in public simulator - part 0 (sim -&gt; context)
([#13678](#13678))
([e00089f](e00089f))
* dependency cycles in public simulator - part 1 (errors/revertReason)
([#13679](#13679))
([c75e365](c75e365))
* dependency cycles in public simulator part 2 (serializable bytecode)
([#13680](#13680))
([5d3e24c](5d3e24c))
* discv5 test failure
([#13653](#13653))
([58c143b](58c143b))
* **docs:** Make viewing (outdated) protocol specs work locally
([#13534](#13534))
([694537d](694537d))
* Increase timeout for p2p integration test
([#13720](#13720))
([c244b2e](c244b2e))
* mac bb --version
([#13690](#13690))
([9f8b64f](9f8b64f))
* make translator use ultra rather than eccvm ops
([#13489](#13489))
([53c070d](53c070d))
* more worker fixes
([#13759](#13759))
([080485a](080485a))
* move helm lint to build
([#13532](#13532))
([7768ff8](7768ff8))
* native ivc benches not publishing
([#13665](#13665))
([7ab712d](7ab712d))
* no exports of simulator should depend on jest-mock-extended
([#13694](#13694))
([65a9f33](65a9f33))
* only clear trailing zeros on logs
([#13727](#13727))
([e392d7c](e392d7c))
* **p2p:** better batch connection sampling
([#13674](#13674))
([9c1d9f1](9c1d9f1))
* **p2p:** reqresp types + batch request tx pool filtering
([#13666](#13666))
([8e2a3c9](8e2a3c9))
* **parser:** error on missing let semicolon in trait (and others)
(noir-lang/noir#8101)
([366d980](366d980))
* pass along coinbase
([#13560](#13560))
([593f810](593f810)),
closes
[#13643](#13643)
* prover-node start
([#13627](#13627))
([5d87f7a](5d87f7a))
* quote numbers
([#13654](#13654))
([f0d1ec1](f0d1ec1))
* remove all txs from a failed epoch
([#13771](#13771))
([abc4623](abc4623))
* remove insecure dummy round derivation from sumcheck and shplemini
([#13488](#13488))
([9a3bb46](9a3bb46))
* replace values in data_bus too
(noir-lang/noir#8086)
([366d980](366d980))
* retry deploy npm
([#13691](#13691))
([76cab3f](76cab3f))
* run yarn
([#13713](#13713))
([0e51259](0e51259))
* squash nightly foundry warning
([#13640](#13640))
([e21f9fd](e21f9fd))
* SSA pass print filter to include the count
(noir-lang/noir#8074)
([366d980](366d980))
* **ssa:** Do not inline simple recursive functions
(noir-lang/noir#8127)
([366d980](366d980))
* **ssa:** Do not unroll loop with break
(noir-lang/noir#8090)
([366d980](366d980))
* **ssa:** Do not use inner else condition when collapsing IfElse based
upon the then condition (noir-lang/noir#8040)
([44c1347](44c1347))
* **ssa:** fix possibility to `Field % Field` operaions in Brillig from
SSA (noir-lang/noir#8105)
([366d980](366d980))
* **ssa:** Loop range with u1
(noir-lang/noir#8131)
([366d980](366d980))
* update metric name to avoid conflicts
([#13629](#13629))
([70c58ab](70c58ab)),
closes
[#13626](#13626)
* wasm memory benchmark
([#13573](#13573))
([9a73c4a](9a73c4a))
* wrapping mul support for u128
(noir-lang/noir#7941)
([366d980](366d980))


### Miscellaneous

* Accept optional test path for emitting integration tests
(noir-lang/noir#8062)
([366d980](366d980))
* Add `GITHUB_TOKEN` to more workflow steps
(noir-lang/noir#8046)
([44c1347](44c1347))
* add a benchmark for opcodes which need a batchable inversion
(noir-lang/noir#8110)
([366d980](366d980))
* add hacky faster bootstrap for bb-centric e2e flow
([#13587](#13587))
([498d433](498d433))
* address some visibility warnings
([#13728](#13728))
([35dec90](35dec90))
* **avm:** less codegen for lookups
([#13741](#13741))
([ec468d9](ec468d9))
* **avm:** move interaction jobs to trace builders
([#13621](#13621))
([caac1c9](caac1c9))
* bb.js non-inlined web workers
([#13736](#13736))
([0e604a1](0e604a1))
* **bb:** debugging helpers
([#13584](#13584))
([0ebb29e](0ebb29e))
* **bb:** Make goblin a proper source module
([#13580](#13580))
([3048a14](3048a14))
* bespoke export for client native prover / PXE server store lazy load
([#13783](#13783))
([640dd08](640dd08))
* Blob and archiver syncing improvements
([#13542](#13542))
([629aa2a](629aa2a)),
closes
[#13530](#13530)
* blob archive client factory code
([#13648](#13648))
([7b16791](7b16791))
* bug list
([#13773](#13773))
([c6d4fb8](c6d4fb8))
* bump axois
([#13453](#13453))
([1c20920](1c20920))
* bump bb to 0.84.0 (noir-lang/noir#8047)
([44c1347](44c1347))
* bump bignum timeout (noir-lang/noir#8080)
([366d980](366d980))
* bump external pinned commits
(noir-lang/noir#8045)
([44c1347](44c1347))
* **ci:** run non dependent bootstrap build steps in parallel
([#13454](#13454))
([b17e18d](b17e18d))
* cleanup aztec up amm test
([#13754](#13754))
([3d92afe](3d92afe))
* Cleanup scripts in package jsons in yarn-project
([#13527](#13527))
([a296945](a296945))
* **contracts:** core/staking -&gt; core/slashing
([#13748](#13748))
([5d93a0e](5d93a0e))
* create module for array handling in acirgen
(noir-lang/noir#8119)
([366d980](366d980))
* dashboards use ${data_source} variable
([#13613](#13613))
([45533d9](45533d9))
* delete honk_recursion for building ACIR
([#13664](#13664))
([ac95729](ac95729))
* delete Ultra Vanilla CIVC
([#13669](#13669))
([ae578a2](ae578a2))
* delete zeromorph
([#13667](#13667))
([c8acae0](c8acae0))
* Disable blobscan by default
([#13742](#13742))
([c55088e](c55088e))
* **docs:** `aztec` and `aztec-wallet` cli reference updates
([#13692](#13692))
([d11d154](d11d154))
* **docs:** add 0.85.0 docs
([#13578](#13578))
([cf07358](cf07358))
* **docs:** add AND/XOR bug to bug list
([#13784](#13784))
([797ae6d](797ae6d))
* **docs:** Add architecture docs
(noir-lang/noir#7992)
([366d980](366d980))
* **docs:** adding redirects for node guide
([#13768](#13768))
([e96e5bf](e96e5bf))
* **docs:** bugfix + deploy on master
([#13717](#13717))
([010975a](010975a))
* **docs:** Fix some stuff on fees, rm confusing storage example
([#13501](#13501))
([c00b20b](c00b20b))
* **docs:** Sequencer and Prover Guide
([#13433](#13433))
([55b9a2b](55b9a2b))
* **docs:** update bb commands to match 0.84.0
(noir-lang/noir#8050)
([366d980](366d980))
* **docs:** Update docs bootrap to to include release
([#13615](#13615))
([2154d5e](2154d5e))
* don't use `set_from_value_id` in `remove_if_else`
(noir-lang/noir#8070)
([366d980](366d980))
* don't use `set_value_from_id` in `as_slice_length`
(noir-lang/noir#8039)
([44c1347](44c1347))
* don't use `set_value_from_id` in `constant_folding`
(noir-lang/noir#8091)
([366d980](366d980))
* don't use `set_value_from_id` in `loop_invariant`
(noir-lang/noir#8085)
([366d980](366d980))
* don't use `set_value_from_id` in `remove_bit_shifts`
(noir-lang/noir#8071)
([366d980](366d980))
* don't use `set_value_from_id` in `simplify_cfg`
(noir-lang/noir#8072)
([366d980](366d980))
* **experimental:** Function::simple_optimization for SSA optimizations
(noir-lang/noir#8102)
([366d980](366d980))
* Fetch rollup address using version as index
([#13620](#13620))
([60e73f9](60e73f9))
* Fix license files
([#13695](#13695))
([9931fb8](9931fb8))
* mempool limit
([#13735](#13735))
([def1287](def1287))
* mint block rewards for 200K blocks at deployment
([#13537](#13537))
([1a3a326](1a3a326))
* move check_circuit functionality from `TranslatorCircuitBuilder` into
a `TranslatorCircuitChecker`
([#13761](#13761))
([e4e7fca](e4e7fca))
* noir test flake addition
([#13663](#13663))
([c302fdd](c302fdd))
* **noir-contracts:** update readme
([#13563](#13563))
([42dfbbf](42dfbbf))
* **optimization:** Enable experimental ownership clone scheme by
default (noir-lang/noir#8097)
([366d980](366d980))
* parse nop in SSA parser (noir-lang/noir#8141)
([366d980](366d980))
* ping luke instead of cody on bb benchmark regressions
([#13718](#13718))
([2802f5a](2802f5a))
* playground improvements
([#13588](#13588))
([4c3453b](4c3453b))
* **playground:** bump vite
([#13750](#13750))
([7e72420](7e72420))
* Print `unsafe { ... }` around calls to Brillig from ACIR in AST
(noir-lang/noir#8077)
([366d980](366d980))
* **public/avm:** from hints to the end of the world
([#13459](#13459))
([a89de5d](a89de5d))
* redo typo PR by dizer-ti
([#13757](#13757))
([075d3a8](075d3a8))
* release playground on s3.
([#13582](#13582))
([2f9458a](2f9458a))
* **release:** give aztec release image sensible default entrypoint
([#13517](#13517))
([a864c06](a864c06))
* remove circuit simulator
([#13689](#13689))
([a00566c](a00566c))
* Remove code of the fake AVM recursive verifier
([#13614](#13614))
([048dfed](048dfed))
* remove msm sorter
([#13668](#13668))
([ff29d86](ff29d86))
* remove old terraform configs
([#13716](#13716))
([49ac1db](49ac1db)),
closes
[#13651](#13651)
* remove omit param from serialize derivation
([#13703](#13703))
([6af5943](6af5943))
* remove pcs vk from vk
([#13638](#13638))
([0e941ef](0e941ef))
* remove try_merge_only_changed_indices
(noir-lang/noir#8142)
([366d980](366d980))
* replace relative paths to noir-protocol-circuits
([78c87b5](78c87b5))
* replace relative paths to noir-protocol-circuits
([4e53cd1](4e53cd1))
* replace relative paths to noir-protocol-circuits
([3a33c47](3a33c47))
* replace relative paths to noir-protocol-circuits
([eaaa85b](eaaa85b))
* replace relative paths to noir-protocol-circuits
([648a4fe](648a4fe))
* replace relative paths to noir-protocol-circuits
([b3f4745](b3f4745))
* replace relative paths to noir-protocol-circuits
([269b316](269b316))
* replace relative paths to noir-protocol-circuits
([1330efe](1330efe))
* replace relative paths to noir-protocol-circuits
([a739284](a739284))
* Sanity check block number from archiver before returning it
([#13631](#13631))
([e459b2a](e459b2a))
* simpler `make_mutable` in `array_set` optimization
(noir-lang/noir#8106)
([366d980](366d980))
* **spartan:** bump default kind resources
([#13747](#13747))
([8ca828f](8ca828f))
* **ssa:** Additional unrolling and mem2reg passes
(noir-lang/noir#8017)
([44c1347](44c1347))
* **ssa:** Remove IfElse pass basic SSA tests
(noir-lang/noir#8058)
([44c1347](44c1347))
* **ssa:** Test terminator value constant folding and resolve cache for
data bus (noir-lang/noir#8132)
([366d980](366d980))
* starknet feature flag
([#13681](#13681))
([2b6c627](2b6c627))
* stop prover node swallowing start prover job errors
([#13676](#13676))
([90c2b7b](90c2b7b))
* **test:** AST generation calibration test
(noir-lang/noir#8054)
([44c1347](44c1347))
* update ACVM doc (noir-lang/noir#8004)
([366d980](366d980))
* Update docs snippet
([#13739](#13739))
([7fb333a](7fb333a))
* update staking asset handler address
([#13566](#13566))
([daa09f2](daa09f2))
* Updated contract addresses for alpha-testnet
([#13585](#13585))
([9f0ff4a](9f0ff4a))
* Use chain monitor to sync system time in p2p tests
([#13632](#13632))
([abbad4c](abbad4c))
* use public component key for pairing inputs
([#13705](#13705))
([467166f](467166f))
* use PublicComponentKeys
([#13686](#13686))
([68e4b6f](68e4b6f))
* use single extended viem client
([#13715](#13715))
([cf637dc](cf637dc))
* validate block header hash in circuits
([#13094](#13094))
([f19c182](f19c182))
* wasm proof verifying with native bb
([#13499](#13499))
([1ad9249](1ad9249))


### Documentation

* fees tutorial
([#13357](#13357))
([c580657](c580657))
* move snippets all versions
([#13650](#13650))
([a2f5553](a2f5553))
* Update glossary & snippets
([#13661](#13661))
([d55816d](d55816d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench-show Display benchmark results on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants