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
33 changes: 33 additions & 0 deletions yarn-project/aztec/src/test/testnet_compatibility.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { InitialAccountData } from '@aztec/accounts/testing';
import { Fr } from '@aztec/aztec.js';
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
import { getGenesisValues } from '@aztec/world-state/testing';

/**
* This test suit makes sure that the code in the monorepo is still compatible with the latest version of testnet
* Only update these values after a governance update that changes the protocol is enacted
*/
describe('Testnet compatibility', () => {
it('has expected VK tree root', () => {
expect(getVKTreeRoot()).toEqual(
Fr.fromHexString('0x2339da454741e2360c4e27c6f68767215a5b6ce150527d32d6b6c95aa92ec8c9'),
);
});
it('has expected Protocol Contracts tree root', () => {
expect(protocolContractTreeRoot).toEqual(
Fr.fromHexString('0x2efd3fd6b542f09e9f76c84337f46370f67729ce54c815d35866b4cb2a267203'),
);
});
it('has expected Genesis tree roots', async () => {
const initialAccounts: InitialAccountData[] = [];
const sponsoredFPCAddress = await getSponsoredFPCAddress();
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
const { genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts);

expect(genesisArchiveRoot).toEqual(
Fr.fromHexString('0x1f9a1f495b0a8f12ebc07e1bea931ea1e2b6f862b6da9d5395ab11c5374ccabb'),
);
});
});
7 changes: 0 additions & 7 deletions yarn-project/aztec/src/test/upgrade.test.ts

This file was deleted.

6 changes: 5 additions & 1 deletion yarn-project/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function test_cmds {
# end-to-end: e2e tests handled separately with end-to-end/bootstrap.sh.
# kv-store: Uses mocha so will need different treatment.
# noir-bb-bench: A slow pain. Figure out later.
for test in !(end-to-end|kv-store|noir-bb-bench)/src/**/*.test.ts; do
for test in !(end-to-end|kv-store|noir-bb-bench|aztec)/src/**/*.test.ts; do
local prefix=$hash
local cmd_env=""

Expand Down Expand Up @@ -144,6 +144,10 @@ function test_cmds {
# Uses mocha for browser tests, so we have to treat it differently.
echo "$hash cd yarn-project/kv-store && yarn test"
echo "$hash cd yarn-project/ivc-integration && yarn test:browser"

if [ "$CI" -eq 0 ] || [ "${TARGET_BRANCH:-}" != "next" ]; then
echo "$hash yarn-project/scripts/run_test.sh aztec/src/test/testnet_compatibility.test.ts"
fi
Comment on lines +147 to +150
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should create aztec/bootstrap.sh and move this inside it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why make the exception? only other place with a nested bootstrap is end-to-end - which is a bit more complex.

}

function test {
Expand Down