@aztec/end-to-end 1.0.0-nightly.20250606 → 1.0.0-nightly.20250607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bench/client_flows/client_flows_benchmark.js +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +4 -3
- package/dest/e2e_fees/fees_test.js +1 -1
- package/dest/e2e_p2p/p2p_network.d.ts +3 -2
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +8 -6
- package/dest/e2e_prover/e2e_prover_test.d.ts +1 -2
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +1 -1
- package/dest/e2e_prover/e2e_prover_test.js +4 -23
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_acvm_config.js +2 -14
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +2 -13
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +1 -0
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +11 -18
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +19 -43
- package/package.json +35 -35
- package/src/bench/client_flows/client_flows_benchmark.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +4 -3
- package/src/e2e_fees/fees_test.ts +1 -1
- package/src/e2e_p2p/p2p_network.ts +8 -2
- package/src/e2e_prover/e2e_prover_test.ts +5 -27
- package/src/fixtures/get_acvm_config.ts +2 -10
- package/src/fixtures/get_bb_config.ts +2 -10
- package/src/fixtures/setup_l1_contracts.ts +1 -0
- package/src/fixtures/snapshot_manager.ts +11 -14
- package/src/fixtures/utils.ts +20 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../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AAG,WAAW,GAAG,UAAU;IAoB7F,0EAA0E;IAC7D,mBAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO;CAUtF"}
|
|
@@ -5,6 +5,7 @@ import { ChainMonitor, waitUntilL1Timestamp } from '@aztec/ethereum/test';
|
|
|
5
5
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
6
6
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
7
7
|
import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
8
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
8
9
|
import { join } from 'path';
|
|
9
10
|
import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
|
|
10
11
|
export const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
@@ -107,9 +108,9 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
107
108
|
this.logger.info(`L2 genesis at L1 block ${this.constants.l1StartBlock} (timestamp ${this.constants.l1GenesisTime})`);
|
|
108
109
|
}
|
|
109
110
|
async teardown() {
|
|
110
|
-
this.monitor.stop();
|
|
111
|
-
await Promise.all(this.proverNodes.map((node)=>node.
|
|
112
|
-
await Promise.all(this.nodes.map((node)=>node.
|
|
111
|
+
await this.monitor.stop();
|
|
112
|
+
await Promise.all(this.proverNodes.map((node)=>tryStop(node, this.logger)));
|
|
113
|
+
await Promise.all(this.nodes.map((node)=>tryStop(node, this.logger)));
|
|
113
114
|
await this.context.teardown();
|
|
114
115
|
}
|
|
115
116
|
async createProverNode() {
|
|
@@ -51,14 +51,15 @@ export declare class P2PNetworkTest {
|
|
|
51
51
|
wallet?: AccountWalletWithSecretKey;
|
|
52
52
|
spamContract?: SpamContract;
|
|
53
53
|
bootstrapNode?: BootstrapNode;
|
|
54
|
-
constructor(testName: string, bootstrapNodeEnr: string, bootNodePort: number, numberOfNodes: number, initialValidatorConfig: AztecNodeConfig, metricsPort?: number | undefined, startProverNode?: boolean);
|
|
55
|
-
static create({ testName, numberOfNodes, basePort, metricsPort, initialConfig, startProverNode, }: {
|
|
54
|
+
constructor(testName: string, bootstrapNodeEnr: string, bootNodePort: number, numberOfNodes: number, initialValidatorConfig: AztecNodeConfig, metricsPort?: number | undefined, startProverNode?: boolean, mockZkPassportVerifier?: boolean);
|
|
55
|
+
static create({ testName, numberOfNodes, basePort, metricsPort, initialConfig, startProverNode, mockZkPassportVerifier, }: {
|
|
56
56
|
testName: string;
|
|
57
57
|
numberOfNodes: number;
|
|
58
58
|
basePort?: number;
|
|
59
59
|
metricsPort?: number;
|
|
60
60
|
initialConfig?: Partial<AztecNodeConfig>;
|
|
61
61
|
startProverNode?: boolean;
|
|
62
|
+
mockZkPassportVerifier?: boolean;
|
|
62
63
|
}): Promise<P2PNetworkTest>;
|
|
63
64
|
get fundedAccount(): InitialAccountData;
|
|
64
65
|
addBootstrapNode(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,KAAK,0BAA0B,EAAc,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAGL,KAAK,QAAQ,EAKd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names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E,kBAAkB,EAAE,CAAM;IAC5C,mBAAmB,EAAE,kBAAkB,EAAE,CAAM;IAE/C,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,aAAa,CAAC,EAAE,aAAa,CAAC;gBAGnC,QAAQ,EAAE,MAAM,EACT,gBAAgB,EAAE,MAAM,EACxB,YAAY,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EAC7B,sBAAsB,EAAE,eAAe,EAE/B,WAAW,CAAC,EAAE,MAAM,YAAA,EAC5B,eAAe,CAAC,EAAE,OAAO,EACzB,sBAAsB,CAAC,EAAE,OAAO;WAsCrB,MAAM,CAAC,EAClB,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,sBAAsB,GACvB,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;QACzC,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC;IAuBD,IAAI,aAAa,uBAKhB;IAEK,gBAAgB;IActB,aAAa;;;IAgBP,kBAAkB;IAkElB,YAAY;IAYZ,kBAAkB;IAoBlB,iBAAiB;IAgBjB,WAAW;;;;YAIH,YAAY;IAQpB,KAAK;IAaL,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAanC,QAAQ;CAKf"}
|
|
@@ -6,6 +6,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
6
6
|
import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
7
7
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
8
8
|
import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
|
|
9
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
9
10
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
10
11
|
import getPort from 'get-port';
|
|
11
12
|
import { getContract } from 'viem';
|
|
@@ -45,7 +46,7 @@ export class P2PNetworkTest {
|
|
|
45
46
|
spamContract;
|
|
46
47
|
bootstrapNode;
|
|
47
48
|
constructor(testName, bootstrapNodeEnr, bootNodePort, numberOfNodes, initialValidatorConfig, // If set enable metrics collection
|
|
48
|
-
metricsPort, startProverNode){
|
|
49
|
+
metricsPort, startProverNode, mockZkPassportVerifier){
|
|
49
50
|
this.bootstrapNodeEnr = bootstrapNodeEnr;
|
|
50
51
|
this.bootNodePort = bootNodePort;
|
|
51
52
|
this.numberOfNodes = numberOfNodes;
|
|
@@ -78,15 +79,16 @@ export class P2PNetworkTest {
|
|
|
78
79
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
79
80
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
80
81
|
aztecProofSubmissionWindow: initialValidatorConfig.aztecProofSubmissionWindow ?? l1ContractsConfig.aztecProofSubmissionWindow,
|
|
81
|
-
initialValidators: []
|
|
82
|
+
initialValidators: [],
|
|
83
|
+
mockZkPassportVerifier
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
|
-
static async create({ testName, numberOfNodes, basePort, metricsPort, initialConfig, startProverNode }) {
|
|
86
|
+
static async create({ testName, numberOfNodes, basePort, metricsPort, initialConfig, startProverNode, mockZkPassportVerifier }) {
|
|
85
87
|
const port = basePort || await getPort();
|
|
86
88
|
const bootstrapNodeENR = await getBootstrapNodeEnr(BOOTSTRAP_NODE_PRIVATE_KEY, port);
|
|
87
89
|
const bootstrapNodeEnr = bootstrapNodeENR.encodeTxt();
|
|
88
90
|
const initialValidatorConfig = await createValidatorConfig(initialConfig ?? {}, bootstrapNodeEnr);
|
|
89
|
-
return new P2PNetworkTest(testName, bootstrapNodeEnr, port, numberOfNodes, initialValidatorConfig, metricsPort, startProverNode);
|
|
91
|
+
return new P2PNetworkTest(testName, bootstrapNodeEnr, port, numberOfNodes, initialValidatorConfig, metricsPort, startProverNode, mockZkPassportVerifier);
|
|
90
92
|
}
|
|
91
93
|
get fundedAccount() {
|
|
92
94
|
if (!this.deployedAccounts[0]) {
|
|
@@ -232,8 +234,8 @@ export class P2PNetworkTest {
|
|
|
232
234
|
this.logger.info('Nodes stopped');
|
|
233
235
|
}
|
|
234
236
|
async teardown() {
|
|
235
|
-
this.monitor.stop();
|
|
236
|
-
await this.bootstrapNode
|
|
237
|
+
await this.monitor.stop();
|
|
238
|
+
await tryStop(this.bootstrapNode, this.logger);
|
|
237
239
|
await this.snapshotManager.teardown();
|
|
238
240
|
}
|
|
239
241
|
}
|
|
@@ -3,7 +3,7 @@ import { type AccountWalletWithSecretKey, type AztecNode, type CompleteAddress,
|
|
|
3
3
|
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
4
4
|
import { type ClientProtocolCircuitVerifier } from '@aztec/bb-prover';
|
|
5
5
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
6
|
-
import {
|
|
6
|
+
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
7
7
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
8
8
|
import type { PXEService } from '@aztec/pxe/server';
|
|
9
9
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
@@ -55,6 +55,5 @@ export declare class FullProverTest {
|
|
|
55
55
|
snapshot: <T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>) => Promise<void>;
|
|
56
56
|
teardown(): Promise<void>;
|
|
57
57
|
applyMintSnapshot(): Promise<void>;
|
|
58
|
-
deployVerifier(): Promise<void>;
|
|
59
58
|
}
|
|
60
59
|
//# sourceMappingURL=e2e_prover_test.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/e2e_prover/e2e_prover_test.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAqB,KAAK,6BAA6B,EAAuB,MAAM,kBAAkB,CAAC;AAE9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/e2e_prover/e2e_prover_test.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAqB,KAAK,6BAA6B,EAAuB,MAAM,kBAAkB,CAAC;AAE9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAQtE,OAAO,EAEL,KAAK,iBAAiB,EAIv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iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAeR,iBAAiB;CA8CxB"}
|
|
@@ -3,9 +3,8 @@ import { createArchiver } from '@aztec/archiver';
|
|
|
3
3
|
import { EthAddress, createLogger } from '@aztec/aztec.js';
|
|
4
4
|
import { BBCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
5
5
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
6
|
-
import { deployL1Contract } from '@aztec/ethereum';
|
|
7
6
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
8
|
-
import {
|
|
7
|
+
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
9
8
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
10
9
|
import { createProverNode } from '@aztec/prover-node';
|
|
11
10
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
@@ -64,7 +63,9 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
64
63
|
startProverNode: true,
|
|
65
64
|
fundRewardDistributor: true,
|
|
66
65
|
coinbase
|
|
67
|
-
}, {
|
|
66
|
+
}, {
|
|
67
|
+
realVerifier: realProofs
|
|
68
|
+
});
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
71
|
* Adds two state shifts to snapshot manager.
|
|
@@ -270,24 +271,4 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
270
271
|
return Promise.resolve();
|
|
271
272
|
});
|
|
272
273
|
}
|
|
273
|
-
async deployVerifier() {
|
|
274
|
-
if (!this.realProofs) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
if (!this.circuitProofVerifier) {
|
|
278
|
-
throw new Error('No verifier');
|
|
279
|
-
}
|
|
280
|
-
const { l1Client, l1ContractAddresses } = this.context.deployL1ContractsValues;
|
|
281
|
-
const rollup = getContract({
|
|
282
|
-
abi: RollupAbi,
|
|
283
|
-
address: l1ContractAddresses.rollupAddress.toString(),
|
|
284
|
-
client: l1Client
|
|
285
|
-
});
|
|
286
|
-
const { address: verifierAddress } = await deployL1Contract(l1Client, HonkVerifierAbi, HonkVerifierBytecode);
|
|
287
|
-
this.logger.info(`Deployed honk verifier at ${verifierAddress}`);
|
|
288
|
-
await rollup.write.setEpochVerifier([
|
|
289
|
-
verifierAddress.toString()
|
|
290
|
-
]);
|
|
291
|
-
this.logger.info('Rollup only accepts valid proofs now');
|
|
292
|
-
}
|
|
293
274
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_acvm_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_acvm_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"get_acvm_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_acvm_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAO9C,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AAWnG,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CACxD;IACE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,GACD,SAAS,CACZ,CAyBA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { parseBooleanEnv } from '@aztec/foundation/config';
|
|
2
2
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
3
4
|
import { promises as fs } from 'fs';
|
|
4
5
|
export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
|
|
5
6
|
const { NOIR_RELEASE_DIR = 'noir-repo/target/release', TEMP_DIR = '/tmp', ACVM_BINARY_PATH = '', ACVM_WORKING_DIRECTORY = '', ACVM_FORCE_WASM = '' } = process.env;
|
|
@@ -18,20 +19,7 @@ export async function getACVMConfig(logger) {
|
|
|
18
19
|
});
|
|
19
20
|
logger.verbose(`Using native ACVM binary at ${acvmBinaryPath} with working directory ${acvmWorkingDirectory}`);
|
|
20
21
|
const directoryToCleanup = ACVM_WORKING_DIRECTORY ? undefined : tempWorkingDirectory;
|
|
21
|
-
const cleanup =
|
|
22
|
-
if (directoryToCleanup) {
|
|
23
|
-
try {
|
|
24
|
-
logger.info(`Cleaning up ACVM temp directory ${directoryToCleanup}`);
|
|
25
|
-
await fs.rm(directoryToCleanup, {
|
|
26
|
-
recursive: true,
|
|
27
|
-
force: true,
|
|
28
|
-
maxRetries: 3
|
|
29
|
-
});
|
|
30
|
-
} catch (err) {
|
|
31
|
-
logger.warn(`Failed to delete ACVM temp directory at ${directoryToCleanup}: ${err}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
22
|
+
const cleanup = ()=>tryRmDir(directoryToCleanup, logger);
|
|
35
23
|
return {
|
|
36
24
|
acvmWorkingDirectory,
|
|
37
25
|
acvmBinaryPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_bb_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_bb_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"get_bb_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_bb_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAejD,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,KACb,OAAO,CAAC,CAAC,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,GAAG,SAAS,CA2BnE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from '@aztec/aztec.js';
|
|
2
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
2
3
|
import fs from 'node:fs/promises';
|
|
3
4
|
import { tmpdir } from 'node:os';
|
|
4
5
|
import path from 'path';
|
|
@@ -22,19 +23,7 @@ export const getBBConfig = async (logger)=>{
|
|
|
22
23
|
'1',
|
|
23
24
|
'true'
|
|
24
25
|
].includes(BB_SKIP_CLEANUP);
|
|
25
|
-
const cleanup =
|
|
26
|
-
if (directoryToCleanup && !bbSkipCleanup) {
|
|
27
|
-
try {
|
|
28
|
-
await fs.rm(directoryToCleanup, {
|
|
29
|
-
recursive: true,
|
|
30
|
-
force: true,
|
|
31
|
-
maxRetries: 3
|
|
32
|
-
});
|
|
33
|
-
} catch (err) {
|
|
34
|
-
logger.warn(`Failed to delete bb working directory at ${directoryToCleanup}: ${err}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
26
|
+
const cleanup = bbSkipCleanup ? ()=>Promise.resolve() : ()=>tryRmDir(directoryToCleanup);
|
|
38
27
|
return {
|
|
39
28
|
bbSkipCleanup,
|
|
40
29
|
bbBinaryPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_l1_contracts.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_l1_contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAqB,MAAM,iBAAiB,CAAC;AAIxG,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzD,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AAEnG,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,SAAS,SAAS,GAAG,iBAAiB,EACtC,QAAQ,MAAM,EACd,MAAM,IAAI,CAAC,qBAAqB,EAAE,oBAAoB,GAAG,mBAAmB,CAAC,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"setup_l1_contracts.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_l1_contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAqB,MAAM,iBAAiB,CAAC;AAIxG,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzD,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AAEnG,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,SAAS,SAAS,GAAG,iBAAiB,EACtC,QAAQ,MAAM,EACd,MAAM,IAAI,CAAC,qBAAqB,EAAE,oBAAoB,GAAG,mBAAmB,CAAC,GAAG,iBAAiB,mEAWlG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot_manager.d.ts","sourceRoot":"","sources":["../../src/fixtures/snapshot_manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAwD,MAAM,yBAAyB,CAAC;AACxH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,eAAe,EAGpB,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,MAAM,EAGZ,MAAM,iBAAiB,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AE,EACpD,eAAe,UAAQ,EACvB,SAAS,CAAC,EAAE,GAAG,GAAG,SAAS,iBAyB5B"}
|
|
@@ -9,10 +9,12 @@ import { createExtendedL1Client, getL1ContractsConfigEnvVars, l1Artifacts } from
|
|
|
9
9
|
import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
10
10
|
import { asyncMap } from '@aztec/foundation/async-map';
|
|
11
11
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
12
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
12
13
|
import { createLogger } from '@aztec/foundation/log';
|
|
13
14
|
import { resolver, reviver } from '@aztec/foundation/serialize';
|
|
14
15
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
15
16
|
import { createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
|
|
17
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
16
18
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
17
19
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
18
20
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
@@ -177,28 +179,19 @@ export function createSnapshotManager(testName, dataPath, config = {}, deployL1C
|
|
|
177
179
|
if (!context) {
|
|
178
180
|
return;
|
|
179
181
|
}
|
|
182
|
+
const logger = getLogger();
|
|
180
183
|
try {
|
|
181
|
-
|
|
182
|
-
await context.proverNode
|
|
183
|
-
await context.aztecNode
|
|
184
|
+
logger.info('Tearing down subsystems');
|
|
185
|
+
await tryStop(context.proverNode);
|
|
186
|
+
await tryStop(context.aztecNode);
|
|
184
187
|
await context.acvmConfig?.cleanup();
|
|
185
188
|
await context.bbConfig?.cleanup();
|
|
186
|
-
await context.anvil
|
|
187
|
-
await context.watcher
|
|
188
|
-
await context.blobSink
|
|
189
|
-
|
|
190
|
-
try {
|
|
191
|
-
await fs.rm(context.directoryToCleanup, {
|
|
192
|
-
recursive: true,
|
|
193
|
-
force: true,
|
|
194
|
-
maxRetries: 3
|
|
195
|
-
});
|
|
196
|
-
} catch (err) {
|
|
197
|
-
getLogger().warn(`Failed to delete tmp directory ${context.directoryToCleanup}: ${err}`);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
189
|
+
await tryStop(context.anvil);
|
|
190
|
+
await tryStop(context.watcher);
|
|
191
|
+
await tryStop(context.blobSink);
|
|
192
|
+
await tryRmDir(context.directoryToCleanup, logger);
|
|
200
193
|
} catch (err) {
|
|
201
|
-
|
|
194
|
+
logger.error('Error during teardown', err);
|
|
202
195
|
}
|
|
203
196
|
}
|
|
204
197
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAsC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,MAAM,EAMZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAEpF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,iBAAiB,EAEjB,KAAK,QAAQ,EAMd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAA0C,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG1F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EA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,CAAC,CAMf;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EACnE,aAAa,EAAE,CAAC,EAAE,EAClB,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC/B,MAAM,EAAE,CAAC,EAAE,EACX,aAAa,EAAE,CAAC,EAAE,GACjB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,0BAK3C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,GAAG,kEAQ/C;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,SAAK,EAAE,WAAW,SAAI,iBAS/G;AAED,wBAAgB,uBAAuB,CACrC,oBAAoB,EAAE,KAAK,MAAM,EAAE,EACnC,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,EACpF,SAAS,EAAE,SAAS,EACpB,mBAAmB,GAAE,kBAAkB,EAAO,uBA6C/C;AAWD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,aAAa,EAAE,GAAG,8BAKnB"}
|
package/dest/fixtures/utils.js
CHANGED
|
@@ -13,6 +13,7 @@ import { DelayedTxUtils, EthCheatCodesWithState, startAnvil } from '@aztec/ether
|
|
|
13
13
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
14
14
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
15
15
|
import { Fr } from '@aztec/foundation/fields';
|
|
16
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
16
17
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
17
18
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
18
19
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
@@ -24,6 +25,7 @@ import { createPXEServiceWithSimulator, getPXEServiceConfig } from '@aztec/pxe/s
|
|
|
24
25
|
import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
|
|
25
26
|
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
26
27
|
import { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
|
|
28
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
27
29
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
28
30
|
import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
29
31
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
@@ -73,6 +75,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
73
75
|
salt: args.salt,
|
|
74
76
|
initialValidators: args.initialValidators,
|
|
75
77
|
...getL1ContractsConfigEnvVars(),
|
|
78
|
+
realVerifier: false,
|
|
76
79
|
...args
|
|
77
80
|
});
|
|
78
81
|
return l1Data;
|
|
@@ -102,19 +105,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
102
105
|
const pxe = await createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, pxeServiceConfig, {
|
|
103
106
|
useLogSuffix
|
|
104
107
|
});
|
|
105
|
-
const teardown =
|
|
106
|
-
if (!configuredDataDirectory) {
|
|
107
|
-
try {
|
|
108
|
-
await fs.rm(pxeServiceConfig.dataDirectory, {
|
|
109
|
-
recursive: true,
|
|
110
|
-
force: true,
|
|
111
|
-
maxRetries: 3
|
|
112
|
-
});
|
|
113
|
-
} catch (err) {
|
|
114
|
-
logger.warn(`Failed to delete tmp PXE data directory ${pxeServiceConfig.dataDirectory}: ${err}`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
108
|
+
const teardown = configuredDataDirectory ? ()=>Promise.resolve() : ()=>tryRmDir(pxeServiceConfig.dataDirectory);
|
|
118
109
|
return {
|
|
119
110
|
pxe,
|
|
120
111
|
logger,
|
|
@@ -356,37 +347,22 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
356
347
|
}
|
|
357
348
|
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, pxe);
|
|
358
349
|
const teardown = async ()=>{
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
await aztecNode
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
logger.verbose(`Cleaning up ACVM state`);
|
|
369
|
-
await acvmConfig.cleanup();
|
|
370
|
-
}
|
|
371
|
-
if (bbConfig?.cleanup) {
|
|
372
|
-
// remove the temp directory created for the acvm
|
|
373
|
-
logger.verbose(`Cleaning up BB state`);
|
|
374
|
-
await bbConfig.cleanup();
|
|
375
|
-
}
|
|
376
|
-
await anvil?.stop().catch((err)=>getLogger().error(err));
|
|
377
|
-
await watcher.stop();
|
|
378
|
-
await blobSink?.stop();
|
|
379
|
-
if (directoryToCleanup) {
|
|
380
|
-
try {
|
|
381
|
-
logger.verbose(`Cleaning up data directory at ${directoryToCleanup}`);
|
|
382
|
-
await fs.rm(directoryToCleanup, {
|
|
383
|
-
recursive: true,
|
|
384
|
-
force: true,
|
|
385
|
-
maxRetries: 3
|
|
386
|
-
});
|
|
387
|
-
} catch (err) {
|
|
388
|
-
logger.warn(`Failed to delete data directory at ${directoryToCleanup}: ${err}`);
|
|
350
|
+
try {
|
|
351
|
+
await pxeTeardown();
|
|
352
|
+
await tryStop(aztecNode, logger);
|
|
353
|
+
await tryStop(proverNode, logger);
|
|
354
|
+
if (acvmConfig?.cleanup) {
|
|
355
|
+
await acvmConfig.cleanup();
|
|
356
|
+
}
|
|
357
|
+
if (bbConfig?.cleanup) {
|
|
358
|
+
await bbConfig.cleanup();
|
|
389
359
|
}
|
|
360
|
+
await tryStop(anvil, logger);
|
|
361
|
+
await tryStop(watcher, logger);
|
|
362
|
+
await tryStop(blobSink, logger);
|
|
363
|
+
await tryRmDir(directoryToCleanup, logger);
|
|
364
|
+
} catch (err) {
|
|
365
|
+
logger.error(`Error during e2e test teardown`, err);
|
|
390
366
|
}
|
|
391
367
|
};
|
|
392
368
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250607",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,40 +25,40 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
29
|
-
"@aztec/archiver": "1.0.0-nightly.
|
|
30
|
-
"@aztec/aztec": "1.0.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "1.0.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "1.0.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "1.0.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "1.0.0-nightly.
|
|
36
|
-
"@aztec/bot": "1.0.0-nightly.
|
|
37
|
-
"@aztec/cli": "1.0.0-nightly.
|
|
38
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "1.0.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "1.0.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
42
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "1.0.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "1.0.0-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "1.0.0-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
49
|
-
"@aztec/noir-test-contracts.js": "1.0.0-nightly.
|
|
50
|
-
"@aztec/p2p": "1.0.0-nightly.
|
|
51
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
52
|
-
"@aztec/prover-client": "1.0.0-nightly.
|
|
53
|
-
"@aztec/prover-node": "1.0.0-nightly.
|
|
54
|
-
"@aztec/pxe": "1.0.0-nightly.
|
|
55
|
-
"@aztec/sequencer-client": "1.0.0-nightly.
|
|
56
|
-
"@aztec/simulator": "1.0.0-nightly.
|
|
57
|
-
"@aztec/slasher": "1.0.0-nightly.
|
|
58
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
59
|
-
"@aztec/telemetry-client": "1.0.0-nightly.
|
|
60
|
-
"@aztec/validator-client": "1.0.0-nightly.
|
|
61
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
28
|
+
"@aztec/accounts": "1.0.0-nightly.20250607",
|
|
29
|
+
"@aztec/archiver": "1.0.0-nightly.20250607",
|
|
30
|
+
"@aztec/aztec": "1.0.0-nightly.20250607",
|
|
31
|
+
"@aztec/aztec-node": "1.0.0-nightly.20250607",
|
|
32
|
+
"@aztec/aztec.js": "1.0.0-nightly.20250607",
|
|
33
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250607",
|
|
34
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250607",
|
|
35
|
+
"@aztec/blob-sink": "1.0.0-nightly.20250607",
|
|
36
|
+
"@aztec/bot": "1.0.0-nightly.20250607",
|
|
37
|
+
"@aztec/cli": "1.0.0-nightly.20250607",
|
|
38
|
+
"@aztec/constants": "1.0.0-nightly.20250607",
|
|
39
|
+
"@aztec/entrypoints": "1.0.0-nightly.20250607",
|
|
40
|
+
"@aztec/epoch-cache": "1.0.0-nightly.20250607",
|
|
41
|
+
"@aztec/ethereum": "1.0.0-nightly.20250607",
|
|
42
|
+
"@aztec/foundation": "1.0.0-nightly.20250607",
|
|
43
|
+
"@aztec/kv-store": "1.0.0-nightly.20250607",
|
|
44
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250607",
|
|
45
|
+
"@aztec/merkle-tree": "1.0.0-nightly.20250607",
|
|
46
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250607",
|
|
47
|
+
"@aztec/noir-noirc_abi": "1.0.0-nightly.20250607",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250607",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "1.0.0-nightly.20250607",
|
|
50
|
+
"@aztec/p2p": "1.0.0-nightly.20250607",
|
|
51
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250607",
|
|
52
|
+
"@aztec/prover-client": "1.0.0-nightly.20250607",
|
|
53
|
+
"@aztec/prover-node": "1.0.0-nightly.20250607",
|
|
54
|
+
"@aztec/pxe": "1.0.0-nightly.20250607",
|
|
55
|
+
"@aztec/sequencer-client": "1.0.0-nightly.20250607",
|
|
56
|
+
"@aztec/simulator": "1.0.0-nightly.20250607",
|
|
57
|
+
"@aztec/slasher": "1.0.0-nightly.20250607",
|
|
58
|
+
"@aztec/stdlib": "1.0.0-nightly.20250607",
|
|
59
|
+
"@aztec/telemetry-client": "1.0.0-nightly.20250607",
|
|
60
|
+
"@aztec/validator-client": "1.0.0-nightly.20250607",
|
|
61
|
+
"@aztec/world-state": "1.0.0-nightly.20250607",
|
|
62
62
|
"@iarna/toml": "^2.2.5",
|
|
63
63
|
"@jest/globals": "^29.5.0",
|
|
64
64
|
"@noble/curves": "^1.0.0",
|
|
@@ -11,6 +11,7 @@ import type { SequencerPublisher } from '@aztec/sequencer-client';
|
|
|
11
11
|
import type { TestSequencerClient } from '@aztec/sequencer-client/test';
|
|
12
12
|
import type { L2BlockNumber } from '@aztec/stdlib/block';
|
|
13
13
|
import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
14
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
14
15
|
|
|
15
16
|
import { join } from 'path';
|
|
16
17
|
import type { Hex } from 'viem';
|
|
@@ -153,9 +154,9 @@ export class EpochsTestContext {
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
public async teardown() {
|
|
156
|
-
this.monitor.stop();
|
|
157
|
-
await Promise.all(this.proverNodes.map(node => node.
|
|
158
|
-
await Promise.all(this.nodes.map(node => node.
|
|
157
|
+
await this.monitor.stop();
|
|
158
|
+
await Promise.all(this.proverNodes.map(node => tryStop(node, this.logger)));
|
|
159
|
+
await Promise.all(this.nodes.map(node => tryStop(node, this.logger)));
|
|
159
160
|
await this.context.teardown();
|
|
160
161
|
}
|
|
161
162
|
|
|
@@ -17,6 +17,7 @@ import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
|
17
17
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
18
18
|
import type { BootstrapNode } from '@aztec/p2p/bootstrap';
|
|
19
19
|
import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
|
|
20
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
20
21
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
21
22
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
22
23
|
|
|
@@ -80,6 +81,7 @@ export class P2PNetworkTest {
|
|
|
80
81
|
// If set enable metrics collection
|
|
81
82
|
private metricsPort?: number,
|
|
82
83
|
startProverNode?: boolean,
|
|
84
|
+
mockZkPassportVerifier?: boolean,
|
|
83
85
|
) {
|
|
84
86
|
this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
|
|
85
87
|
|
|
@@ -112,6 +114,7 @@ export class P2PNetworkTest {
|
|
|
112
114
|
aztecProofSubmissionWindow:
|
|
113
115
|
initialValidatorConfig.aztecProofSubmissionWindow ?? l1ContractsConfig.aztecProofSubmissionWindow,
|
|
114
116
|
initialValidators: [],
|
|
117
|
+
mockZkPassportVerifier,
|
|
115
118
|
},
|
|
116
119
|
);
|
|
117
120
|
}
|
|
@@ -123,6 +126,7 @@ export class P2PNetworkTest {
|
|
|
123
126
|
metricsPort,
|
|
124
127
|
initialConfig,
|
|
125
128
|
startProverNode,
|
|
129
|
+
mockZkPassportVerifier,
|
|
126
130
|
}: {
|
|
127
131
|
testName: string;
|
|
128
132
|
numberOfNodes: number;
|
|
@@ -130,6 +134,7 @@ export class P2PNetworkTest {
|
|
|
130
134
|
metricsPort?: number;
|
|
131
135
|
initialConfig?: Partial<AztecNodeConfig>;
|
|
132
136
|
startProverNode?: boolean;
|
|
137
|
+
mockZkPassportVerifier?: boolean;
|
|
133
138
|
}) {
|
|
134
139
|
const port = basePort || (await getPort());
|
|
135
140
|
|
|
@@ -149,6 +154,7 @@ export class P2PNetworkTest {
|
|
|
149
154
|
initialValidatorConfig,
|
|
150
155
|
metricsPort,
|
|
151
156
|
startProverNode,
|
|
157
|
+
mockZkPassportVerifier,
|
|
152
158
|
);
|
|
153
159
|
}
|
|
154
160
|
|
|
@@ -342,8 +348,8 @@ export class P2PNetworkTest {
|
|
|
342
348
|
}
|
|
343
349
|
|
|
344
350
|
async teardown() {
|
|
345
|
-
this.monitor.stop();
|
|
346
|
-
await this.bootstrapNode
|
|
351
|
+
await this.monitor.stop();
|
|
352
|
+
await tryStop(this.bootstrapNode, this.logger);
|
|
347
353
|
await this.snapshotManager.teardown();
|
|
348
354
|
}
|
|
349
355
|
}
|
|
@@ -18,9 +18,9 @@ import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
|
18
18
|
import { BBCircuitVerifier, type ClientProtocolCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
19
19
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
20
20
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
21
|
-
import {
|
|
21
|
+
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
22
22
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
23
|
-
import {
|
|
23
|
+
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
24
24
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
25
25
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
26
26
|
import type { PXEService } from '@aztec/pxe/server';
|
|
@@ -94,7 +94,9 @@ export class FullProverTest {
|
|
|
94
94
|
`full_prover_integration/${testName}`,
|
|
95
95
|
dataPath,
|
|
96
96
|
{ startProverNode: true, fundRewardDistributor: true, coinbase },
|
|
97
|
-
{
|
|
97
|
+
{
|
|
98
|
+
realVerifier: realProofs,
|
|
99
|
+
},
|
|
98
100
|
);
|
|
99
101
|
}
|
|
100
102
|
|
|
@@ -390,28 +392,4 @@ export class FullProverTest {
|
|
|
390
392
|
},
|
|
391
393
|
);
|
|
392
394
|
}
|
|
393
|
-
|
|
394
|
-
async deployVerifier() {
|
|
395
|
-
if (!this.realProofs) {
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
if (!this.circuitProofVerifier) {
|
|
400
|
-
throw new Error('No verifier');
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
const { l1Client, l1ContractAddresses } = this.context.deployL1ContractsValues;
|
|
404
|
-
const rollup = getContract({
|
|
405
|
-
abi: RollupAbi,
|
|
406
|
-
address: l1ContractAddresses.rollupAddress.toString(),
|
|
407
|
-
client: l1Client,
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
const { address: verifierAddress } = await deployL1Contract(l1Client, HonkVerifierAbi, HonkVerifierBytecode);
|
|
411
|
-
this.logger.info(`Deployed honk verifier at ${verifierAddress}`);
|
|
412
|
-
|
|
413
|
-
await rollup.write.setEpochVerifier([verifierAddress.toString()]);
|
|
414
|
-
|
|
415
|
-
this.logger.info('Rollup only accepts valid proofs now');
|
|
416
|
-
}
|
|
417
395
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/aztec.js';
|
|
2
2
|
import { parseBooleanEnv } from '@aztec/foundation/config';
|
|
3
3
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
4
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
4
5
|
|
|
5
6
|
import { promises as fs } from 'fs';
|
|
6
7
|
|
|
@@ -36,16 +37,7 @@ export async function getACVMConfig(logger: Logger): Promise<
|
|
|
36
37
|
|
|
37
38
|
const directoryToCleanup = ACVM_WORKING_DIRECTORY ? undefined : tempWorkingDirectory;
|
|
38
39
|
|
|
39
|
-
const cleanup =
|
|
40
|
-
if (directoryToCleanup) {
|
|
41
|
-
try {
|
|
42
|
-
logger.info(`Cleaning up ACVM temp directory ${directoryToCleanup}`);
|
|
43
|
-
await fs.rm(directoryToCleanup, { recursive: true, force: true, maxRetries: 3 });
|
|
44
|
-
} catch (err) {
|
|
45
|
-
logger.warn(`Failed to delete ACVM temp directory at ${directoryToCleanup}: ${err}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
40
|
+
const cleanup = () => tryRmDir(directoryToCleanup, logger);
|
|
49
41
|
|
|
50
42
|
return {
|
|
51
43
|
acvmWorkingDirectory,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Logger, fileURLToPath } from '@aztec/aztec.js';
|
|
2
2
|
import type { BBConfig } from '@aztec/bb-prover';
|
|
3
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
3
4
|
|
|
4
5
|
import fs from 'node:fs/promises';
|
|
5
6
|
import { tmpdir } from 'node:os';
|
|
@@ -35,16 +36,7 @@ export const getBBConfig = async (
|
|
|
35
36
|
await fs.mkdir(bbWorkingDirectory, { recursive: true });
|
|
36
37
|
|
|
37
38
|
const bbSkipCleanup = ['1', 'true'].includes(BB_SKIP_CLEANUP);
|
|
38
|
-
|
|
39
|
-
const cleanup = async () => {
|
|
40
|
-
if (directoryToCleanup && !bbSkipCleanup) {
|
|
41
|
-
try {
|
|
42
|
-
await fs.rm(directoryToCleanup, { recursive: true, force: true, maxRetries: 3 });
|
|
43
|
-
} catch (err) {
|
|
44
|
-
logger.warn(`Failed to delete bb working directory at ${directoryToCleanup}: ${err}`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
39
|
+
const cleanup = bbSkipCleanup ? () => Promise.resolve() : () => tryRmDir(directoryToCleanup);
|
|
48
40
|
|
|
49
41
|
return { bbSkipCleanup, bbBinaryPath, bbWorkingDirectory, cleanup, numConcurrentIVCVerifiers: 1 };
|
|
50
42
|
} catch (err) {
|
|
@@ -27,11 +27,13 @@ import {
|
|
|
27
27
|
import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
28
28
|
import { asyncMap } from '@aztec/foundation/async-map';
|
|
29
29
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
30
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
30
31
|
import { createLogger } from '@aztec/foundation/log';
|
|
31
32
|
import { resolver, reviver } from '@aztec/foundation/serialize';
|
|
32
33
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
33
34
|
import type { ProverNode } from '@aztec/prover-node';
|
|
34
35
|
import { type PXEService, createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
|
|
36
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
35
37
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
36
38
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
37
39
|
|
|
@@ -264,24 +266,19 @@ async function teardown(context: SubsystemsContext | undefined) {
|
|
|
264
266
|
if (!context) {
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
269
|
+
const logger = getLogger();
|
|
267
270
|
try {
|
|
268
|
-
|
|
269
|
-
await context.proverNode
|
|
270
|
-
await context.aztecNode
|
|
271
|
+
logger.info('Tearing down subsystems');
|
|
272
|
+
await tryStop(context.proverNode);
|
|
273
|
+
await tryStop(context.aztecNode);
|
|
271
274
|
await context.acvmConfig?.cleanup();
|
|
272
275
|
await context.bbConfig?.cleanup();
|
|
273
|
-
await context.anvil
|
|
274
|
-
await context.watcher
|
|
275
|
-
await context.blobSink
|
|
276
|
-
|
|
277
|
-
try {
|
|
278
|
-
await fs.rm(context.directoryToCleanup, { recursive: true, force: true, maxRetries: 3 });
|
|
279
|
-
} catch (err) {
|
|
280
|
-
getLogger().warn(`Failed to delete tmp directory ${context.directoryToCleanup}: ${err}`);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
276
|
+
await tryStop(context.anvil);
|
|
277
|
+
await tryStop(context.watcher);
|
|
278
|
+
await tryStop(context.blobSink);
|
|
279
|
+
await tryRmDir(context.directoryToCleanup, logger);
|
|
283
280
|
} catch (err) {
|
|
284
|
-
|
|
281
|
+
logger.error('Error during teardown', err);
|
|
285
282
|
}
|
|
286
283
|
}
|
|
287
284
|
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -44,6 +44,7 @@ import { DelayedTxUtils, EthCheatCodesWithState, startAnvil } from '@aztec/ether
|
|
|
44
44
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
45
45
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
46
46
|
import { Fr } from '@aztec/foundation/fields';
|
|
47
|
+
import { tryRmDir } from '@aztec/foundation/fs';
|
|
47
48
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
48
49
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
49
50
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
@@ -64,6 +65,7 @@ import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '
|
|
|
64
65
|
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
65
66
|
import { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
|
|
66
67
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
68
|
+
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
67
69
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
68
70
|
import {
|
|
69
71
|
type TelemetryClient,
|
|
@@ -128,6 +130,7 @@ export const setupL1Contracts = async (
|
|
|
128
130
|
salt: args.salt,
|
|
129
131
|
initialValidators: args.initialValidators,
|
|
130
132
|
...getL1ContractsConfigEnvVars(),
|
|
133
|
+
realVerifier: false,
|
|
131
134
|
...args,
|
|
132
135
|
});
|
|
133
136
|
|
|
@@ -180,15 +183,7 @@ export async function setupPXEService(
|
|
|
180
183
|
useLogSuffix,
|
|
181
184
|
});
|
|
182
185
|
|
|
183
|
-
const teardown =
|
|
184
|
-
if (!configuredDataDirectory) {
|
|
185
|
-
try {
|
|
186
|
-
await fs.rm(pxeServiceConfig.dataDirectory!, { recursive: true, force: true, maxRetries: 3 });
|
|
187
|
-
} catch (err) {
|
|
188
|
-
logger.warn(`Failed to delete tmp PXE data directory ${pxeServiceConfig.dataDirectory}: ${err}`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
};
|
|
186
|
+
const teardown = configuredDataDirectory ? () => Promise.resolve() : () => tryRmDir(pxeServiceConfig.dataDirectory!);
|
|
192
187
|
|
|
193
188
|
return {
|
|
194
189
|
pxe,
|
|
@@ -565,39 +560,26 @@ export async function setup(
|
|
|
565
560
|
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, pxe!);
|
|
566
561
|
|
|
567
562
|
const teardown = async () => {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (aztecNode instanceof AztecNodeService) {
|
|
571
|
-
await aztecNode?.stop();
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
if (proverNode) {
|
|
575
|
-
await proverNode.stop();
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
if (acvmConfig?.cleanup) {
|
|
579
|
-
// remove the temp directory created for the acvm
|
|
580
|
-
logger.verbose(`Cleaning up ACVM state`);
|
|
581
|
-
await acvmConfig.cleanup();
|
|
582
|
-
}
|
|
563
|
+
try {
|
|
564
|
+
await pxeTeardown();
|
|
583
565
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
logger.verbose(`Cleaning up BB state`);
|
|
587
|
-
await bbConfig.cleanup();
|
|
588
|
-
}
|
|
566
|
+
await tryStop(aztecNode, logger);
|
|
567
|
+
await tryStop(proverNode, logger);
|
|
589
568
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
569
|
+
if (acvmConfig?.cleanup) {
|
|
570
|
+
await acvmConfig.cleanup();
|
|
571
|
+
}
|
|
593
572
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
logger.verbose(`Cleaning up data directory at ${directoryToCleanup}`);
|
|
597
|
-
await fs.rm(directoryToCleanup, { recursive: true, force: true, maxRetries: 3 });
|
|
598
|
-
} catch (err) {
|
|
599
|
-
logger.warn(`Failed to delete data directory at ${directoryToCleanup}: ${err}`);
|
|
573
|
+
if (bbConfig?.cleanup) {
|
|
574
|
+
await bbConfig.cleanup();
|
|
600
575
|
}
|
|
576
|
+
|
|
577
|
+
await tryStop(anvil, logger);
|
|
578
|
+
await tryStop(watcher, logger);
|
|
579
|
+
await tryStop(blobSink, logger);
|
|
580
|
+
await tryRmDir(directoryToCleanup, logger);
|
|
581
|
+
} catch (err) {
|
|
582
|
+
logger.error(`Error during e2e test teardown`, err);
|
|
601
583
|
}
|
|
602
584
|
};
|
|
603
585
|
|