chore: Update poseidon version & remove unnecessary comptime globals#20702
Merged
Conversation
66a9141 to
4341a05
Compare
LeilaWang
approved these changes
Feb 20, 2026
TomAFrench
reviewed
Feb 20, 2026
TomAFrench
reviewed
Feb 20, 2026
TomAFrench
approved these changes
Feb 20, 2026
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>
5dab3d1 to
c8b17ef
Compare
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes necessary for a breaking Noir change: noir-lang/noir#11627 requiring comptime globals to only be evaluated in comptime contexts.
poseidonversion used to0.2.4. The previous version used acomptime globalin runtime code which did not need to be comptime, so it was changed.comptime- it was unnecessary and lead to errors with the above change.noir-projects/noir-protocol-circuits/crates/types/src/poseidon2.nrwhich 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.