Skip to content

fix: assert types are not mutated in constant folding#9481

Merged
TomAFrench merged 6 commits intomasterfrom
tf/assert-no-type-mutations-in-constant-folding
Aug 13, 2025
Merged

fix: assert types are not mutated in constant folding#9481
TomAFrench merged 6 commits intomasterfrom
tf/assert-no-type-mutations-in-constant-folding

Conversation

@TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Aug 13, 2025

Description

Problem*

Resolves #9477
Resolves #9480

Summary*

This PR adds tests to catch types being mutated inside of constant folding.

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.

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: c1f9de8 Previous: b51b616 Ratio
test_report_zkpassport_noir-ecdsa_ 2 s 1 s 2
test_report_zkpassport_noir_rsa_ 2 s 1 s 2

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

CC: @TomAFrench

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 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 05939f9 Previous: b51b616 Ratio
private-kernel-tail 0.013 s 0.01 s 1.30

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

CC: @TomAFrench

@github-actions
Copy link
Contributor

github-actions bot commented Aug 13, 2025

Changes to Brillig bytecode sizes

Generated at commit: 70091bd28b8f78ddf27cc36bc1dfb3418cba0c30, compared to commit: b51b6164e5e49243bb65adb64638a821131568dd

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
to_le_bytes_inliner_max +9 ❌ +7.56%
to_le_bytes_inliner_zero +9 ❌ +7.56%

Full diff report 👇
Program Brillig opcodes (+/-) %
to_le_bytes_inliner_max 128 (+9) +7.56%
to_le_bytes_inliner_zero 128 (+9) +7.56%
to_le_bytes_inliner_min 137 (+9) +7.03%

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 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 05939f9 Previous: b51b616 Ratio
private-kernel-tail 1.788 s 1.328 s 1.35

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

CC: @TomAFrench

@TomAFrench TomAFrench marked this pull request as ready for review August 13, 2025 14:06
@TomAFrench TomAFrench requested a review from a team August 13, 2025 14:06
@TomAFrench TomAFrench added this pull request to the merge queue Aug 13, 2025
Merged via the queue into master with commit ee2ac1a Aug 13, 2025
124 checks passed
@TomAFrench TomAFrench deleted the tf/assert-no-type-mutations-in-constant-folding branch August 13, 2025 23:24
AztecBot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
AztecBot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI
(noir-lang/noir#9499)
feat!: new semantic for bit-shifts
(noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled
(noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults
(noir-lang/noir#9489)
fix: assert types are not mutated in constant folding
(noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning false
unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
mralj pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Oct 13, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
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.

ACIR vs Brillig: array confusion Constraint Folding using constraints removes to_le_radix of different sizes;

2 participants