Skip to content

fix(aztec-nr): replace deprecated BoundedVec::from_parts_unchecked#23687

Closed
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
cb/fix-aztec-nr-from-parts
Closed

fix(aztec-nr): replace deprecated BoundedVec::from_parts_unchecked#23687
AztecBot wants to merge 1 commit into
merge-train/spartanfrom
cb/fix-aztec-nr-from-parts

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Problem

CI on merge-train/spartan fails in the aztec-nr step (log, sub-log 092552235c1aadfc):

error: `BoundedVec::from_parts` no longer requires an extra loop, `BoundedVec::from_parts_unchecked` is no longer required
    ┌─ aztec/src/note/note_getter.nr:263:17
   ┌─ aztec/src/utils/array/subbvec.nr:26:17

A noir submodule bump deprecated BoundedVec::from_parts_unchecked. aztec-nr runs nargo check --deny-warnings, so the two remaining call sites turn the deprecation into a hard error and fail the build.

Fix

The new from_parts is now identical to the old from_parts_unchecked (it no longer does the extra zeroing loop — it sets storage/len directly), so it is a drop-in replacement. Swapped both call sites and removed the now-obsolete comments explaining the old unchecked-vs-checked trade-off.

Other from_parts_unchecked usages exist in noir-protocol-circuits tests and l1-contracts/lib/circuits, but those packages built successfully in the failing run (they don't deny warnings on these paths), so they are left untouched to keep the diff focused.

Verification

Built nargo from the pinned submodule and ran the exact failing check against aztec-nr:

  • Red (before fix): nargo check --deny-warnings → 2 deprecation errors, exit 1 (matches CI).
  • Green (after fix): nargo check --deny-warnings → exit 0.
  • nargo test subbvec → 8/8 pass (behavior unchanged).

Note: verification targeted the specific failing check rather than the full heavyweight bootstrap.sh ci run, since this is a Noir-only deprecation fix and the rest of ci-full (wasm/cross-compiles/fuzzing) is unrelated.


Created by claudebox · group: slackbot

@AztecBot AztecBot added ci-skip claudebox Owned by claudebox. it can push to this PR. labels May 29, 2026
PhilWindle pushed a commit that referenced this pull request May 29, 2026
)

## Problem

CI on `merge-train/spartan` is failing in the `aztec-nr` step
([log](http://ci.aztec-labs.com/1780053790683323)) with
`BoundedVec::from_parts_unchecked` deprecation errors under `nargo check
--deny-warnings`.

The train's noir submodule had diverged from `next`:

| Branch | noir pin | date | `from_parts_unchecked` deprecated? |
|---|---|---|---|
| `next` | `f1a4575` | May 11 | no |
| `merge-train/spartan` | `4d039268` | May 28 | **yes** |

The newer pin (`4d039268`) was pulled onto the train by **PR #23675**
("fix(cheat-codes): warpL2TimeAtLeastBy…"), which bumped
`noir/noir-repo` from the May-11 pin to a May-28 nightly. That nightly
added `#[deprecated]` to `BoundedVec::from_parts_unchecked`, and since
aztec-nr builds with `--deny-warnings`, the two remaining call sites
became hard errors. The two noir commits are on divergent lines (neither
is an ancestor of the other), so the train was simply ahead of `next` on
noir.

## Fix

Pin the train's noir back to exactly what `next` uses. Only two files
differed from `next`:

- `noir/noir-repo` → `f1a4575` (next's pin)
- `avm-transpiler/Cargo.lock` → next's version (it had been re-synced to
the May-28 noir by #23683; restored to match the May-11 pin)

This restores parity with `next` and removes the deprecated API
entirely, so no aztec-nr source change is needed.

## Verification

Built `nargo` from the `f1a4575` pin and ran the failing check against
the **unmodified** aztec-nr source:

- `nargo check --deny-warnings` → exit 0 (the deprecation attribute is
absent in `f1a4575`).

## Note

This is an alternative to #23687, which fixed the same failure by
patching the two aztec-nr call sites to use `from_parts` against the
newer noir. Pick one: this PR keeps the train aligned with `next`'s
noir; #23687 keeps the newer noir and updates the source. Closing
whichever isn't chosen.

---
*Created by
[claudebox](https://claudebox.work/v2/sessions/2f980b2000011f91) ·
group: `slackbot`*
@PhilWindle PhilWindle closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-skip claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants