Skip to content

Commit 2081226

Browse files
authored
Merge branch 'v5-next' into merge-train/fairies-v5
2 parents b8088f7 + 8b53caa commit 2081226

6 files changed

Lines changed: 97 additions & 44 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)