Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 86 additions & 29 deletions avm-transpiler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions noir-projects/aztec-nr/aztec/src/note/note_getter.nr
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ where
};
}

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

pub unconstrained fn view_note<Note>(owner: Option<AztecAddress>, storage_slot: Field) -> HintedNote<Note>
Expand Down
8 changes: 3 additions & 5 deletions noir-projects/aztec-nr/aztec/src/utils/array/subbvec.nr
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ pub fn subbvec<T, let SrcMaxLen: u32, let DstMaxLen: u32>(
bvec: BoundedVec<T, SrcMaxLen>,
offset: u32,
) -> BoundedVec<T, DstMaxLen> {
// from_parts_unchecked does not verify that the elements past len are zeroed, but that is not an issue in our case
// because we're constructing the new storage array as a subarray of the original one (which should have zeroed
// storage past len), guaranteeing correctness. This is because `subarray` does not allow extending arrays past
// their original length.
BoundedVec::from_parts_unchecked(array::subarray(bvec.storage(), offset), bvec.len() - offset)
// The new storage array is a subarray of the original one (which has zeroed storage past len), so elements past
// the new len remain zeroed: `subarray` does not allow extending arrays past their original length.
BoundedVec::from_parts(array::subarray(bvec.storage(), offset), bvec.len() - offset)
}

mod test {
Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo
Submodule noir-repo updated 1075 files
6 changes: 3 additions & 3 deletions yarn-project/aztec/src/mainnet_compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { getGenesisValues } from '@aztec/world-state/testing';
*/
describe('Mainnet compatibility', () => {
it('has expected VK tree root', () => {
const expectedRoots = [Fr.fromHexString('0x1e6494058514e655b4c479e25dc41590b7db8179f2fd71af38cee41f09b895c6')];
const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')];
expect(expectedRoots).toContainEqual(getVKTreeRoot());
});
it('has expected Protocol Contracts tree root', () => {
expect(protocolContractsHash).toEqual(
Fr.fromHexString('0x2672340d9a0107a7b81e6d10d25b854debe613f3272e8738e8df0ca2ff297141'),
Fr.fromHexString('0x2d0277dcfbd0213fa60233bb3edb87acabedcaff904a4e65830be9f30b881f70'),
);
});
it('has expected Genesis tree roots', async () => {
Expand All @@ -25,7 +25,7 @@ describe('Mainnet compatibility', () => {
/* initial public data leaves */ [],
);
expect(genesisArchiveRoot).toEqual(
Fr.fromHexString('0x15684c8c3d2106918d3860f777e50555b7166adff47df13cc652e2e5a50bf5c7'),
Fr.fromHexString('0x177a4955b31ecaafad999753938a44e526b54c5ba5d536688227f85f15cfbdf5'),
);
});
});
6 changes: 3 additions & 3 deletions yarn-project/aztec/src/testnet_compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import { getGenesisValues } from '@aztec/world-state/testing';
*/
describe('Testnet compatibility', () => {
it('has expected VK tree root', () => {
const expectedRoots = [Fr.fromHexString('0x1e6494058514e655b4c479e25dc41590b7db8179f2fd71af38cee41f09b895c6')];
const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')];
expect(expectedRoots).toContainEqual(getVKTreeRoot());
});
it('has expected Protocol Contracts hash', () => {
expect(protocolContractsHash).toEqual(
Fr.fromHexString('0x2672340d9a0107a7b81e6d10d25b854debe613f3272e8738e8df0ca2ff297141'),
Fr.fromHexString('0x2d0277dcfbd0213fa60233bb3edb87acabedcaff904a4e65830be9f30b881f70'),
);
});
it('has expected Genesis tree roots', async () => {
Expand All @@ -26,7 +26,7 @@ describe('Testnet compatibility', () => {
const { genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts);

expect(genesisArchiveRoot).toEqual(
Fr.fromHexString('0x2727683df35594b1f073a681532520056ca8a775398c8b5a94574c67ef1ce6de'),
Fr.fromHexString('0x1166dcb89990c7e99ee40ae5cd2bb2ea2542a28e5e72aa6c11daa4a7b1fa1e12'),
);
});
});
Loading
Loading