Skip to content

chore: Update poseidon version & remove unnecessary comptime globals#20702

Merged
AztecBot merged 1 commit into
nextfrom
jf/update-poseidon
Feb 20, 2026
Merged

chore: Update poseidon version & remove unnecessary comptime globals#20702
AztecBot merged 1 commit into
nextfrom
jf/update-poseidon

Conversation

@jfecher

@jfecher jfecher commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Changes necessary for a breaking Noir change: noir-lang/noir#11627 requiring comptime globals to only be evaluated in comptime contexts.

  • Updates the poseidon version used to 0.2.4. The previous version used a comptime global in runtime code which did not need to be comptime, so it was changed.
  • bigcurve and bignum versions also had to be updated since they also require poseidon internally
  • Makes the various VK tree constants no longer comptime - it was unnecessary and lead to errors with the above change.
  • There is a full copy of poseidon in noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr which has a comment suggesting it should be removed now that there is a standalone poseidon. I did not remove it here but it should be considered.

@jfecher jfecher changed the title chore: Update poseidon version & remove unnecessary comptime global chore: Update poseidon version & remove unnecessary comptime globals Feb 19, 2026
Comment thread noir-projects/noir-protocol-circuits/crates/types/Nargo.toml Outdated
Comment thread noir-projects/aztec-nr/aztec/Nargo.toml Outdated
Changes necessary for a breaking Noir change: noir-lang/noir#11627 requiring comptime globals to only be evaluated in comptime contexts.
- Updates the `poseidon` version used to `0.2.4`. The previous version used a `comptime global` in runtime code which did not need to be comptime, so it was changed.
- bigcurve and bignum versions also had to be updated since they also require poseidon internally
- Makes the various VK tree constants no longer `comptime` - it was unnecessary and lead to errors with the above change.
- There is a full copy of poseidon in `noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nr` which has a comment suggesting it should be removed now that there is a standalone poseidon. I did not remove it here but it should be considered.

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@AztecBot AztecBot enabled auto-merge February 20, 2026 12:52
@AztecBot AztecBot added this pull request to the merge queue Feb 20, 2026
Merged via the queue into next with commit b2b258d Feb 20, 2026
19 checks passed
@AztecBot AztecBot deleted the jf/update-poseidon branch February 20, 2026 13:36
AztecBot added a commit that referenced this pull request Mar 27, 2026
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
AztecBot added a commit that referenced this pull request Apr 11, 2026
Cherry-pick of b2b258d — removes comptime qualifier from VK tree constants
and updates poseidon2 hash function. Nargo.toml conflicts resolved by keeping
our newer dependency versions from #22393.
Thunkar added a commit that referenced this pull request Apr 13, 2026
…#22485)

## Summary

Backport of #22393
(Update Noir to nightly-2026-04-10) to v4-next, plus 3 companion PRs
needed for Noir compatibility since v4-next was still on
nightly-2026-02-12.

## Companion PRs included

Since v4-next hadn't updated Noir since nightly-2026-02-12 (~2 months
behind), several intermediate Noir-adaptation PRs were also needed:

1. **#20702** — Remove unnecessary `comptime` qualifier from VK tree
constants (Noir broke comptime globals used in non-comptime contexts)
2. **#20798** — Remove unnecessary `let mut` across noir-projects (newer
Noir errors on this)
3. **#21801** — Replace deprecated Noir comptime APIs: `add_attribute()`
→ `add_abi()`, `set_body()`/`set_parameters()`/`set_return_public()` →
`function.disable()`, update `fn_has_noinitcheck` to also check
`is_fn_only_self()`

## Commits
1. **Cherry-pick with conflict markers** — raw cherry-pick of #22393
2. **Conflict resolution** — version bumps + reformatting resolved
3. **Cherry-pick #20702** — comptime globals + poseidon2 hash fix
4. **Cherry-pick #20798** — unnecessary mut removal (24 files)
5. **Cherry-pick #21801** — macro API migration (4 files)
6. **Remaining fixes** — private_context.nr mut + utils.nr style
alignment
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.

4 participants