Conversation
- Update deps: poseidon 0.3.0, bignum 0.10.0, bigcurve 0.14.0 - Remove `is_infinite` field from Point struct literals, use `is_infinite()` method - Replace `u1` with `bool` (type removed in new Noir) - Use `(tmp as u8) % 2 != 0` for lowest-bit extraction (replacing `as u1` truncation) - Fix `poseidon2_permutation` call sites (now takes 1 arg) - Fix `== 1` comparisons on AVM oracle fns that now return bool
… truncate in bool unpack
## Summary Fixes the ACIR test build failure introduced by the Noir nightly update in #22393. The external `poseidon` library v0.2.4 (`https://github.com/noir-lang/poseidon`) calls `poseidon2_permutation(self.state, 4)` with 2 arguments, but the current Noir nightly changed the stdlib signature to accept only 1 argument (`poseidon2_permutation(input)`). This causes 7 tests to fail compilation: - `bench_2_to_17` - `no_predicates_numeric_generic_poseidon` - `poseidon_bn254_hash_width_3` - `poseidonsponge_x5_254` - `regression_5252` - `regression_5615` - `uhashmap` These tests are already excluded in Noir's own CI (`POSEIDON_COMPILE_FAILURE_EXECUTION_TESTS` in `tooling/nargo_cli/build.rs`). This PR mirrors that exclusion in BB's `acir_tests/bootstrap.sh`. The exclusions should be removed once the external poseidon library is updated to be compatible with the new API. ClaudeBox log: https://claudebox.work/s/0ef46c61b9801d30?run=1
- Bump schnorr library from v0.1.3 to v0.2.0 (v0.1.3 uses the removed EmbeddedCurvePoint.is_infinite field) - Remove is_infinite field from Point struct literal in schnorr_hardcoded_account_contract - Remove is_infinite field from Point struct literals in avm_test_contract
…eld usages (#22414) ## Summary Fixes remaining noir-contracts compilation failures on PR #22393 (Noir nightly 2026-04-08). The Noir nightly removed the `is_infinite` field from `EmbeddedCurvePoint`, making it a 2-field struct `{ x, y }` with `is_infinite()` as a computed method. Changes: - Bump `schnorr` library from v0.1.3 to v0.2.0 in both schnorr account contracts. v0.1.3 constructs `EmbeddedCurvePoint { x, y, is_infinite }` which no longer compiles. v0.2.0 (released today) uses the new 2-field struct. - Remove `is_infinite: false` from `Point` struct literal in `schnorr_hardcoded_account_contract` - Remove `is_infinite: false` from `Point` struct literals in `avm_test_contract` ClaudeBox log: https://claudebox.work/s/0ef46c61b9801d30?run=2
to_le_bits now returns bool elements, so first_bit != 0 is a Field/bool type mismatch. Use assert(first_bit) instead.
The Noir nightly can emit AssertZero opcodes with only a constant term (no multiplication or linear terms). Previously, split_into_mul_quad_gates would assert-fail on these expressions. Now we handle them by: - Skipping trivially satisfied constraints (constant == 0) - Encoding unsatisfiable constraints (constant != 0) as a quad gate with witness 0 having zero scaling, so the circuit can be processed for VK generation even though it will never verify.
This reverts commit 86d2ffe.
Point::deserialize([1, 2, 3]) now fails because the new Noir nightly
validates the is_infinite flag: Point{x:1, y:2} is not infinite so
is_infinite()=false(0), but the flag was 3, making 0 == 3 an
unconditional failure. Changed to [1, 2, 0] (is_infinite=0).
TomAFrench
reviewed
Apr 8, 2026
noir-projects/noir-protocol-circuits/crates/serde/src/type_impls.nr
Outdated
Show resolved
Hide resolved
The Noir EmbeddedCurvePoint struct no longer has an is_infinite field; it is now derived from x == 0 && y == 0.
…removal
EmbeddedCurvePoint is now {x, y} (2 fields) with is_infinite() as a
computed method. The return_data mechanism uses the native struct layout
for field count, so all serialization must use 2 fields per Point.
Changes:
- Point Serialize/Deserialize/Packable impls: 3 fields -> 2 fields
- POINT_LENGTH/POINT_SIZE: 3 -> 2
- KEY_VALIDATION_REQUEST_LENGTH: 4 -> 3
- CONTRACT_INSTANCE_LENGTH: 16 -> 12
- PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH: 870 -> 854
- TS Point.toFields()/fromFields(): 3 fields -> 2 fields
- Removed is_infinite from all Prover.toml files
- Regenerated constants (TS, Solidity, C++, PIL)
Member
|
Ahhhh, claudebot why are you touching the pil? |
Contributor
It looks like all constants changed are generated by |
EmbeddedCurvePoint changed from (x, y, is_infinite) to (x, y). PublicKeys now serializes to 8 fields instead of 12. Updated array sizes, loop bounds, and function signature accordingly.
PublicKeys hash changed because EmbeddedCurvePoint now serializes as (x, y) instead of (x, y, is_infinite). Updated: - Contract address fixtures in contracts.nr (regenerated from TS) - Public keys hash expected values in public_keys.nr and aztec_address.nr - TS test snapshots for public_keys, derivation, and noir_test_gen - Fixed Point.fromFields missing isInfinite arg - Fixed noir_test_gen.test.ts fixture file paths
private-kernel-init and private-kernel-inner Prover.toml files contain contract addresses computed with the old 3-field EmbeddedCurvePoint hash. These can only be regenerated via the e2e test (full.test.ts). Removed them and skipped their nargo execute in bootstrap until regenerated.
Comments were accidentally written outside of comment delimiters, causing SWC compilation to fail with 'with statement not supported'.
The get_public_keys_and_partial_address oracle returned 13 fields (4 Points × 3 + 1 partial_address) but now needs 9 fields (4 Points × 2 + 1 partial_address) after EmbeddedCurvePoint lost is_infinite. - Noir oracle declaration: [Field; 13] → [Field; 9] - Noir oracle parsing: updated indices to be consecutive (no gaps) - TS PXE oracle handler: padding Array(13) → Array(9) - TS TXE oracle handler: padding Array(13) → Array(9) - Noir test mock: removed is_infinite slots, updated indices
TomAFrench
reviewed
Apr 9, 2026
…issues - Regenerate private-kernel-init and private-kernel-inner Prover.toml files and re-add them to circuits_to_execute in bootstrap.sh - Fix Point.toBuffer() to serialize infinite points as (0,0) instead of throwing - Fix getSharedSecret oracle handlers (PXE + TXE) for 2-field points (was 3) - Fix C++ AVM address derivation to not include is_infinity in public_keys_hash (both gadgets/address_derivation.cpp and lib/contract_crypto.cpp)
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.
Automated update of Noir submodule to latest nightly.
Current: unknown
New: nightly-2026-04-09
View changes in noir-lang/noir