Skip to content

chore: Remove Noir builtin comptime mutable methods from macros (#21801) [v4-next backport]#22032

Closed
AztecBot wants to merge 8 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21801-remove-noir-comptime
Closed

chore: Remove Noir builtin comptime mutable methods from macros (#21801) [v4-next backport]#22032
AztecBot wants to merge 8 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21801-remove-noir-comptime

Conversation

@AztecBot

@AztecBot AztecBot commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Backport of #21801 to v4-next.

All original changes are now applied as-is, including add_abi and function.disable() calls, since the noir submodule has been updated to the next version (f7a7e6c161) which includes these APIs.

Changes

  • events.nr: s.add_attribute("abi(events)")s.add_abi("events")
  • functions/mod.nr: removed f.add_attribute("noinitcheck") from only_self
  • internals_functions_generation/mod.nr: replaced manual body/params manipulation with function.disable(error_message)
  • utils.nr: fn_has_noinitcheck now also checks is_fn_only_self(f)
  • noir/noir-repo: updated submodule to next version
  • .test_patterns.yml: added flaky test entry

Commits

  1. Cherry-pick with conflict markers (.test_patterns.yml)
  2. Conflict resolution
  3. API workaround (now reverted)
  4. Revert API workaround
  5. Update noir submodule to next version

jfecher and others added 3 commits March 26, 2026 02:22
The add_abi and disable comptime methods are not available in the v4-next
Noir compiler. Reverted events.nr to use add_attribute("abi(events)") and
internals_functions_generation/mod.nr to use the old set_body/set_parameters/
add_attribute/set_return_public pattern.

The only_self noinitcheck logic change (functions/mod.nr + utils.nr) is kept
as it only uses existing APIs (has_named_attribute, is_fn_only_self).
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 26, 2026
Updates noir-repo to match the version on next branch, which includes
the add_abi and disable comptime APIs needed by the original PR changes.
@socket-security

socket-security Bot commented Mar 26, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​libc@​0.2.182 ⏵ 0.2.1808010093100100

View full report

@benesjan

Copy link
Copy Markdown
Contributor

Chamo took over this PR in #22020

@benesjan benesjan closed this Mar 26, 2026
@benesjan benesjan deleted the claudebox/backport-21801-remove-noir-comptime branch March 26, 2026 03:32
@benesjan benesjan restored the claudebox/backport-21801-remove-noir-comptime branch March 27, 2026 02:28
@benesjan

Copy link
Copy Markdown
Contributor

Closed this by mistake. I thought I am in a different PR.

@benesjan benesjan reopened this Mar 27, 2026
benesjan and others added 2 commits March 27, 2026 10:28
Backports changes from PR #20702 which are required for the Noir compiler
change that disallows comptime globals in runtime contexts:
- Update poseidon dependency from v0.2.3 to v0.2.6
- Update bignum from v0.9.0 to v0.9.2 and bigcurve from v0.13.0 to v0.13.2
- Remove comptime keyword from VK tree constant declarations
- Fix comptime global RATE in poseidon2.nr
@benesjan

Copy link
Copy Markdown
Contributor

As mentioned here backporting this is currently not planned so I am closing this.

@benesjan benesjan closed this Mar 27, 2026
@benesjan benesjan deleted the claudebox/backport-21801-remove-noir-comptime branch March 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants