Skip to content

Commit 884e84e

Browse files
committed
chore: update Noir to v1.0.0-beta.22 (v5-next)
1 parent b82384a commit 884e84e

4 files changed

Lines changed: 91 additions & 38 deletions

File tree

avm-transpiler/Cargo.lock

Lines changed: 86 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

noir-projects/aztec-nr/aztec/src/note/note_getter.nr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,7 @@ where
258258
};
259259
}
260260

261-
// We can use `from_parts_unchecked` instead of `from_parts` because we know that `confirmed_notes_bvec_storage`
262-
// contains all zeroes past `hinted_notes.len()` due to how it was initialized.
263-
BoundedVec::from_parts_unchecked(confirmed_notes_bvec_storage, hinted_notes.len())
261+
BoundedVec::from_parts(confirmed_notes_bvec_storage, hinted_notes.len())
264262
}
265263

266264
pub unconstrained fn view_note<Note>(owner: Option<AztecAddress>, storage_slot: Field) -> HintedNote<Note>

noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ pub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(
1919
bvec: BoundedVec<T, SrcMaxLen>,
2020
offset: u32,
2121
) -> BoundedVec<T, DstMaxLen> {
22-
// from_parts_unchecked does not verify that the elements past len are zeroed, but that is not an issue in our case
23-
// because we're constructing the new storage array as a subarray of the original one (which should have zeroed
24-
// storage past len), guaranteeing correctness. This is because `subarray` does not allow extending arrays past
25-
// their original length.
26-
BoundedVec::from_parts_unchecked(array::subarray(bvec.storage(), offset), bvec.len() - offset)
22+
// The new storage array is a subarray of the original one (which has zeroed storage past len), so elements past
23+
// the new len remain zeroed: `subarray` does not allow extending arrays past their original length.
24+
BoundedVec::from_parts(array::subarray(bvec.storage(), offset), bvec.len() - offset)
2725
}
2826

2927
mod test {

noir/noir-repo

Submodule noir-repo updated 1075 files

0 commit comments

Comments
 (0)