@aztec/end-to-end 1.0.0-nightly.20250617 → 1.0.0-nightly.20250619
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/data_extractor.js +1 -0
- package/dest/e2e_epochs/epochs_test.d.ts +10 -5
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +31 -13
- package/dest/e2e_p2p/p2p_network.js +2 -2
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +3 -0
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +5 -3
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +5 -2
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +4 -3
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +10 -4
- package/dest/fixtures/utils.d.ts +2 -3
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +9 -11
- package/package.json +43 -42
- package/src/bench/client_flows/data_extractor.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +34 -15
- package/src/e2e_p2p/p2p_network.ts +4 -4
- package/src/e2e_p2p/shared.ts +3 -0
- package/src/fixtures/e2e_prover_test.ts +10 -3
- package/src/fixtures/get_bb_config.ts +13 -1
- package/src/fixtures/setup_p2p_test.ts +3 -2
- package/src/fixtures/snapshot_manager.ts +8 -2
- package/src/fixtures/utils.ts +10 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { Fr, type Logger, type Wallet } from '@aztec/aztec.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
4
4
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
5
5
|
import { ChainMonitor, type Delayer } from '@aztec/ethereum/test';
|
|
6
6
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
@@ -11,7 +11,7 @@ import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
|
|
|
11
11
|
export declare const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
12
12
|
export declare const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
13
13
|
export declare const ARCHIVER_POLL_INTERVAL = 50;
|
|
14
|
-
export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | '
|
|
14
|
+
export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | 'aztecProofSubmissionEpochs' | 'aztecEpochDuration' | 'proverTestDelayMs' | 'l1PublishRetryIntervalMS' | 'txPropagationMaxQueryAttempts' | 'proverNodeConfig' | 'ethereumSlotDuration' | 'aztecSlotDuration' | 'initialValidators' | 'mockGossipSubNetwork' | 'disableAnvilTestWatcher'>> & {
|
|
15
15
|
numberOfAccounts?: number;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
@@ -38,7 +38,7 @@ export declare class EpochsTestContext {
|
|
|
38
38
|
ethereumSlotDuration: number;
|
|
39
39
|
aztecSlotDuration: number;
|
|
40
40
|
aztecEpochDuration: number;
|
|
41
|
-
|
|
41
|
+
aztecProofSubmissionEpochs: number;
|
|
42
42
|
};
|
|
43
43
|
setup(opts?: EpochsTestOpts): Promise<void>;
|
|
44
44
|
teardown(): Promise<void>;
|
|
@@ -55,12 +55,17 @@ export declare class EpochsTestContext {
|
|
|
55
55
|
waitUntilL2BlockNumber(target: number, timeout?: number): Promise<void>;
|
|
56
56
|
/** Waits until the given L2 block number is marked as proven. */
|
|
57
57
|
waitUntilProvenL2BlockNumber(t: number, timeout?: number): Promise<number>;
|
|
58
|
-
/** Waits until the
|
|
59
|
-
|
|
58
|
+
/** Waits until the last slot of the proof submission window for a given epoch. */
|
|
59
|
+
waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint): Promise<void>;
|
|
60
60
|
/** Waits for the aztec node to sync to the target block number. */
|
|
61
61
|
waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalised' | 'historic'): Promise<void>;
|
|
62
62
|
/** Registers the SpamContract on the given wallet. */
|
|
63
63
|
registerSpamContract(wallet: Wallet, salt?: Fr): Promise<SpamContract>;
|
|
64
|
+
/** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
|
|
65
|
+
createL1Client(): Promise<{
|
|
66
|
+
client: ExtendedViemWalletClient;
|
|
67
|
+
delayer: Delayer;
|
|
68
|
+
}>;
|
|
64
69
|
/** Verifies whether the given block number is found on the aztec node. */
|
|
65
70
|
verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean): Promise<void>;
|
|
66
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,EAAE,EACF,KAAK,MAAM,EAEX,KAAK,MAAM,EAKZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,EAAE,EACF,KAAK,MAAM,EAEX,KAAK,MAAM,EAKZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,wBAAwB,EAA0B,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAkB,KAAK,OAAO,E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,GAAE,cAAmB;WAMrC,gBAAgB,CAAC,IAAI,GAAE,cAAmB;;;;;;IAS3C,KAAK,CAAC,IAAI,GAAE,cAAmB;IA6E/B,QAAQ;IAOR,gBAAgB;IAgBtB,sBAAsB,CAAC,IAAI,GAAE,OAAO,CAAC,eAAe,CAAM;IAK1D,mBAAmB,CACxB,WAAW,EAAE,KAAK,MAAM,EAAE,EAAE,EAC5B,IAAI,GAAE,OAAO,CAAC,eAAe,CAAC,GAAG;QAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAO;YAM1D,UAAU;IA+BxB,OAAO,CAAC,iBAAiB;IAKzB,0FAA0F;IAC7E,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAO/C,sDAAsD;IACzC,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,SAAK;IAShE,iEAAiE;IACpD,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,SAAK;IAUjE,kFAAkF;IACrE,wCAAwC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAUlF,mEAAmE;IACtD,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU;IAoB7F,sDAAsD;IACzC,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,KAAU;IAYhE,0GAA0G;IAC7F,cAAc;;;;IAa3B,0EAA0E;IAC7D,mBAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO;CAUtF"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { Fr, MerkleTreeId, getContractInstanceFromDeployParams, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
|
|
3
|
+
import { createExtendedL1Client } from '@aztec/ethereum';
|
|
3
4
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
4
|
-
import { ChainMonitor, waitUntilL1Timestamp } from '@aztec/ethereum/test';
|
|
5
|
+
import { ChainMonitor, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
|
|
6
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
5
7
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
6
8
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
7
9
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
@@ -9,6 +11,7 @@ import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
|
9
11
|
import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
10
12
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
11
13
|
import { join } from 'path';
|
|
14
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
12
15
|
import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
|
|
13
16
|
export const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
14
17
|
export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
@@ -41,16 +44,16 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
41
44
|
const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
|
|
42
45
|
const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
|
|
43
46
|
const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
|
|
44
|
-
const
|
|
47
|
+
const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
|
|
45
48
|
return {
|
|
46
49
|
ethereumSlotDuration,
|
|
47
50
|
aztecSlotDuration,
|
|
48
51
|
aztecEpochDuration,
|
|
49
|
-
|
|
52
|
+
aztecProofSubmissionEpochs
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
55
|
async setup(opts = {}) {
|
|
53
|
-
const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration,
|
|
56
|
+
const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs } = EpochsTestContext.getSlotDurations(opts);
|
|
54
57
|
this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
|
|
55
58
|
this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
|
|
56
59
|
// Set up system without any account nor protocol contracts
|
|
@@ -65,7 +68,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
65
68
|
aztecEpochDuration,
|
|
66
69
|
aztecSlotDuration,
|
|
67
70
|
ethereumSlotDuration,
|
|
68
|
-
|
|
71
|
+
aztecProofSubmissionEpochs,
|
|
69
72
|
aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
|
|
70
73
|
minTxsPerBlock: 0,
|
|
71
74
|
realProofs: false,
|
|
@@ -107,7 +110,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
107
110
|
l1StartBlock: await this.rollup.getL1StartBlock(),
|
|
108
111
|
l1GenesisTime: await this.rollup.getL1GenesisTime(),
|
|
109
112
|
ethereumSlotDuration,
|
|
110
|
-
|
|
113
|
+
proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs())
|
|
111
114
|
};
|
|
112
115
|
this.logger.info(`L2 genesis at L1 block ${this.constants.l1StartBlock} (timestamp ${this.constants.l1GenesisTime})`);
|
|
113
116
|
}
|
|
@@ -142,7 +145,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
142
145
|
return this.createNode({
|
|
143
146
|
...opts,
|
|
144
147
|
disableValidator: false,
|
|
145
|
-
validatorPrivateKeys: privateKeys
|
|
148
|
+
validatorPrivateKeys: new SecretValue(privateKeys)
|
|
146
149
|
});
|
|
147
150
|
}
|
|
148
151
|
async createNode(opts = {}) {
|
|
@@ -157,7 +160,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
157
160
|
const node = await withLogNameSuffix(suffix, ()=>AztecNodeService.createAndSync({
|
|
158
161
|
...resolvedConfig,
|
|
159
162
|
dataDirectory: join(this.context.config.dataDirectory, randomBytes(8).toString('hex')),
|
|
160
|
-
validatorPrivateKeys: opts.validatorPrivateKeys,
|
|
163
|
+
validatorPrivateKeys: opts.validatorPrivateKeys ?? new SecretValue([]),
|
|
161
164
|
p2pEnabled,
|
|
162
165
|
p2pIp
|
|
163
166
|
}, {
|
|
@@ -189,13 +192,14 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
189
192
|
await retryUntil(()=>Promise.resolve(t <= this.monitor.l2ProvenBlockNumber), `Wait proven L2 block ${t}`, timeout, 0.1);
|
|
190
193
|
return this.monitor.l2ProvenBlockNumber;
|
|
191
194
|
}
|
|
192
|
-
/** Waits until the
|
|
195
|
+
/** Waits until the last slot of the proof submission window for a given epoch. */ async waitUntilLastSlotOfProofSubmissionWindow(epochNumber) {
|
|
193
196
|
const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
|
|
198
|
+
const date = new Date(Number(oneSlotBefore) * 1000);
|
|
199
|
+
this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
|
|
200
|
+
oneSlotBefore
|
|
197
201
|
});
|
|
198
|
-
await waitUntilL1Timestamp(this.l1Client,
|
|
202
|
+
await waitUntilL1Timestamp(this.l1Client, oneSlotBefore);
|
|
199
203
|
}
|
|
200
204
|
/** Waits for the aztec node to sync to the target block number. */ async waitForNodeToSync(blockNumber, type) {
|
|
201
205
|
const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
|
|
@@ -235,6 +239,20 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
235
239
|
});
|
|
236
240
|
return SpamContract.at(instance.address, wallet);
|
|
237
241
|
}
|
|
242
|
+
/** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */ async createL1Client() {
|
|
243
|
+
const { client, delayer } = withDelayer(createExtendedL1Client([
|
|
244
|
+
...this.l1Client.chain.rpcUrls.default.http
|
|
245
|
+
], privateKeyToAccount(this.getNextPrivateKey()), this.l1Client.chain), {
|
|
246
|
+
ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S
|
|
247
|
+
});
|
|
248
|
+
expect(await client.getBalance({
|
|
249
|
+
address: client.account.address
|
|
250
|
+
})).toBeGreaterThan(0n);
|
|
251
|
+
return {
|
|
252
|
+
client,
|
|
253
|
+
delayer
|
|
254
|
+
};
|
|
255
|
+
}
|
|
238
256
|
/** Verifies whether the given block number is found on the aztec node. */ async verifyHistoricBlock(blockNumber, expectedSuccess) {
|
|
239
257
|
// We use `findLeavesIndexes` here, but could use any function that queries the world-state
|
|
240
258
|
// at a particular block, so we know whether that historic block is available or has been
|
|
@@ -68,7 +68,7 @@ export class P2PNetworkTest {
|
|
|
68
68
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
69
69
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
70
70
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
71
|
-
|
|
71
|
+
aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
72
72
|
aztecTargetCommitteeSize: numberOfNodes,
|
|
73
73
|
salt: 420,
|
|
74
74
|
metricsPort: metricsPort,
|
|
@@ -79,7 +79,7 @@ export class P2PNetworkTest {
|
|
|
79
79
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
80
80
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
81
81
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
82
|
-
|
|
82
|
+
aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
83
83
|
aztecTargetCommitteeSize: numberOfNodes,
|
|
84
84
|
initialValidators: [],
|
|
85
85
|
zkPassportArgs: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAEL,KAAK,MAAM,EACX,QAAQ,EACR,KAAK,MAAM,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAyD,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,OAAO,EAAmB,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,MAAM,EACd,cAAc,YAAY,EAC1B,QAAQ,MAAM,EACd,OAAM;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,sBAsBpC,CAAC;AAGF,eAAO,MAAM,qCAAqC,GAChD,QAAQ,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/e2e_p2p/shared.js
CHANGED
|
@@ -133,6 +133,9 @@ export async function awaitCommitteeExists({ rollup, logger }) {
|
|
|
133
133
|
// Check that status is Living
|
|
134
134
|
expect(attesterInfo.status).toEqual(2);
|
|
135
135
|
}
|
|
136
|
+
await cheatCodes.debugRollup();
|
|
137
|
+
await cheatCodes.advanceToNextEpoch();
|
|
138
|
+
await sendDummyTx();
|
|
136
139
|
await cheatCodes.advanceToNextEpoch();
|
|
137
140
|
await sendDummyTx();
|
|
138
141
|
await cheatCodes.debugRollup();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/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,
|
|
1
|
+
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/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,EAEL,KAAK,6BAA6B,EAGnC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAInE,OAAO,EAAE,aAAa,EAA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M,EACtC,QAAQ,EAAE,UAAU,EACZ,UAAU,UAAO;IAa3B;;;;OAIG;IACG,kBAAkB;IAqDlB,KAAK;YAgKG,WAAW;IAQzB,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SchnorrAccountContractArtifact, getSchnorrAccount, getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
|
|
2
2
|
import { createArchiver } from '@aztec/archiver';
|
|
3
3
|
import { EthAddress, createLogger } from '@aztec/aztec.js';
|
|
4
|
-
import { BBCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
4
|
+
import { BBCircuitVerifier, QueuedIVCVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
5
5
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
6
6
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
7
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
7
8
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
8
9
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
9
10
|
import { createProverNode } from '@aztec/prover-node';
|
|
@@ -123,7 +124,8 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
123
124
|
if (!bbConfig?.bbWorkingDirectory || !bbConfig?.bbBinaryPath) {
|
|
124
125
|
throw new Error(`Test must be run with BB native configuration`);
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
+
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
128
|
+
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
127
129
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
128
130
|
await this.aztecNodeAdmin.setConfig({
|
|
129
131
|
realProofs: true,
|
|
@@ -192,7 +194,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
192
194
|
proverId: this.proverAddress.toField(),
|
|
193
195
|
realProofs: this.realProofs,
|
|
194
196
|
proverAgentCount: 2,
|
|
195
|
-
publisherPrivateKey: `0x${proverNodePrivateKey.toString('hex')}
|
|
197
|
+
publisherPrivateKey: new SecretValue(`0x${proverNodePrivateKey.toString('hex')}`),
|
|
196
198
|
proverNodeMaxPendingJobs: 100,
|
|
197
199
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
198
200
|
proverNodePollingIntervalMs: 100,
|
|
@@ -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;AAiBjD,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,CAqCnE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { tryRmDir } from '@aztec/foundation/fs';
|
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
const { BB_RELEASE_DIR = 'barretenberg/cpp/build/bin', BB_BINARY_PATH, BB_SKIP_CLEANUP = '', TEMP_DIR = tmpdir(), BB_WORKING_DIRECTORY = '' } = process.env;
|
|
6
|
+
const { BB_RELEASE_DIR = 'barretenberg/cpp/build/bin', BB_BINARY_PATH, BB_SKIP_CLEANUP = '', TEMP_DIR = tmpdir(), BB_WORKING_DIRECTORY = '', BB_NUM_IVC_VERIFIERS = '1', BB_IVC_CONCURRENCY = '1' } = process.env;
|
|
7
7
|
export const getBBConfig = async (logger)=>{
|
|
8
8
|
try {
|
|
9
9
|
const bbBinaryPath = BB_BINARY_PATH ?? path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../', BB_RELEASE_DIR, 'bb');
|
|
@@ -24,12 +24,15 @@ export const getBBConfig = async (logger)=>{
|
|
|
24
24
|
'true'
|
|
25
25
|
].includes(BB_SKIP_CLEANUP);
|
|
26
26
|
const cleanup = bbSkipCleanup ? ()=>Promise.resolve() : ()=>tryRmDir(directoryToCleanup);
|
|
27
|
+
const numIvcVerifiers = Number(BB_NUM_IVC_VERIFIERS);
|
|
28
|
+
const ivcConcurrency = Number(BB_IVC_CONCURRENCY);
|
|
27
29
|
return {
|
|
28
30
|
bbSkipCleanup,
|
|
29
31
|
bbBinaryPath,
|
|
30
32
|
bbWorkingDirectory,
|
|
31
33
|
cleanup,
|
|
32
|
-
numConcurrentIVCVerifiers:
|
|
34
|
+
numConcurrentIVCVerifiers: numIvcVerifiers,
|
|
35
|
+
bbIVCConcurrency: ivcConcurrency
|
|
33
36
|
};
|
|
34
37
|
} catch (err) {
|
|
35
38
|
logger.error(`Native BB not available, error: ${err}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_p2p_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_p2p_test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,m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,SAAS,EACjC,YAAY,EAAE,MAAM,EACpB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,EAC1C,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,6BAQ5C;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,eAAe,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,MAAM,EACb,YAAY,GAAE,MAAU,EACxB,aAAa,CAAC,EAAE,MAAM,4BAuBvB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test fixtures and utilities to set up and run a test using multiple validators
|
|
3
3
|
*/ import { AztecNodeService } from '@aztec/aztec-node';
|
|
4
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
4
5
|
import { addLogNameHandler, removeLogNameHandler } from '@aztec/foundation/log';
|
|
5
6
|
import getPort from 'get-port';
|
|
6
7
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
@@ -56,10 +57,10 @@ export async function createNode(config, dateProvider, tcpPort, bootstrapNode, a
|
|
|
56
57
|
export async function createValidatorConfig(config, bootstrapNodeEnr, port, addressIndex = 1, dataDirectory) {
|
|
57
58
|
port = port ?? await getPort();
|
|
58
59
|
const attesterPrivateKey = `0x${getPrivateKeyFromIndex(ATTESTER_PRIVATE_KEYS_START_INDEX + addressIndex).toString('hex')}`;
|
|
59
|
-
config.validatorPrivateKeys = [
|
|
60
|
+
config.validatorPrivateKeys = new SecretValue([
|
|
60
61
|
attesterPrivateKey
|
|
61
|
-
];
|
|
62
|
-
config.publisherPrivateKey = attesterPrivateKey;
|
|
62
|
+
]);
|
|
63
|
+
config.publisherPrivateKey = new SecretValue(attesterPrivateKey);
|
|
63
64
|
const nodeConfig = {
|
|
64
65
|
...config,
|
|
65
66
|
p2pIp: `127.0.0.1`,
|
|
@@ -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,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACpF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,
|
|
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,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACpF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAKjC,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAA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KtB;AA0VD;;;GAGG;AACH,eAAO,MAAM,cAAc,GACxB,kBAAkB,MAAM,EAAE,QAAQ,MAAM,EAAE,yBAAuB,MAC3D,gCAAgC;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,qBAAqB,EAAE,kBAAkB,EAAE,CAAA;CAAE;;EAe/F,CAAC;AAEJ;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,CAAC,eAAe,GAAG,YAAY,CAAC,EAAE,EACpD,eAAe,UAAQ,EACvB,SAAS,CAAC,EAAE,GAAG,GAAG,SAAS,iBAyB5B"}
|
|
@@ -5,9 +5,10 @@ import { BatchCall, DefaultWaitForProvenOpts, getContractClassFromArtifact, wait
|
|
|
5
5
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
6
6
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
7
7
|
import { createBlobSinkServer } from '@aztec/blob-sink/server';
|
|
8
|
-
import { createExtendedL1Client, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum';
|
|
8
|
+
import { createExtendedL1Client, deployMulticall3, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum';
|
|
9
9
|
import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
10
10
|
import { asyncMap } from '@aztec/foundation/async-map';
|
|
11
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
11
12
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
12
13
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
13
14
|
import { createLogger } from '@aztec/foundation/log';
|
|
@@ -25,6 +26,7 @@ import { tmpdir } from 'os';
|
|
|
25
26
|
import path, { join } from 'path';
|
|
26
27
|
import { getContract } from 'viem';
|
|
27
28
|
import { mnemonicToAccount } from 'viem/accounts';
|
|
29
|
+
import { foundry } from 'viem/chains';
|
|
28
30
|
import { MNEMONIC, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
|
|
29
31
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
30
32
|
import { getBBConfig } from './get_bb_config.js';
|
|
@@ -247,10 +249,10 @@ export function createSnapshotManager(testName, dataPath, config = {}, deployL1C
|
|
|
247
249
|
const publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
248
250
|
const validatorPrivKey = getPrivateKeyFromIndex(0);
|
|
249
251
|
const proverNodePrivateKey = getPrivateKeyFromIndex(0);
|
|
250
|
-
aztecNodeConfig.publisherPrivateKey = `0x${publisherPrivKey.toString('hex')}
|
|
251
|
-
aztecNodeConfig.validatorPrivateKeys = [
|
|
252
|
+
aztecNodeConfig.publisherPrivateKey = new SecretValue(`0x${publisherPrivKey.toString('hex')}`);
|
|
253
|
+
aztecNodeConfig.validatorPrivateKeys = new SecretValue([
|
|
252
254
|
`0x${validatorPrivKey.toString('hex')}`
|
|
253
|
-
];
|
|
255
|
+
]);
|
|
254
256
|
const ethCheatCodes = new EthCheatCodesWithState(aztecNodeConfig.l1RpcUrls);
|
|
255
257
|
if (opts.l1StartTime) {
|
|
256
258
|
await ethCheatCodes.warp(opts.l1StartTime);
|
|
@@ -258,6 +260,10 @@ export function createSnapshotManager(testName, dataPath, config = {}, deployL1C
|
|
|
258
260
|
const initialFundedAccounts = await generateSchnorrAccounts(numberOfInitialFundedAccounts);
|
|
259
261
|
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
260
262
|
const { genesisArchiveRoot, prefilledPublicData, fundingNeeded } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress), opts.initialAccountFeeJuice);
|
|
263
|
+
const l1Client = createExtendedL1Client([
|
|
264
|
+
aztecNodeConfig.l1RpcUrls[0]
|
|
265
|
+
], hdAccount, foundry);
|
|
266
|
+
await deployMulticall3(l1Client, logger);
|
|
261
267
|
const deployL1ContractsValues = await setupL1Contracts(aztecNodeConfig.l1RpcUrls[0], hdAccount, logger, {
|
|
262
268
|
...getL1ContractsConfigEnvVars(),
|
|
263
269
|
genesisArchiveRoot,
|
package/dest/fixtures/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type AztecNodeConfig } from '@aztec/aztec-node';
|
|
|
3
3
|
import { type AccountWalletWithSecretKey, type AztecAddress, type AztecNode, type ContractMethod, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
|
|
4
4
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
5
5
|
import { type BlobSinkServer } from '@aztec/blob-sink/server';
|
|
6
|
-
import { type DeployL1ContractsArgs, type DeployL1ContractsReturnType,
|
|
6
|
+
import { type DeployL1ContractsArgs, type DeployL1ContractsReturnType, type Operator } from '@aztec/ethereum';
|
|
7
7
|
import { startAnvil } from '@aztec/ethereum/test';
|
|
8
8
|
import { Fr } from '@aztec/foundation/fields';
|
|
9
9
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
@@ -15,7 +15,7 @@ import type { SequencerClient } from '@aztec/sequencer-client';
|
|
|
15
15
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
16
16
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
17
17
|
import { type TelemetryClient, type TelemetryClientConfig } from '@aztec/telemetry-client';
|
|
18
|
-
import { type Chain, type HDAccount, type
|
|
18
|
+
import { type Chain, type HDAccount, type PrivateKeyAccount } from 'viem';
|
|
19
19
|
export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
|
|
20
20
|
export { startAnvil };
|
|
21
21
|
export declare const getPrivateKeyFromIndex: (index: number) => Buffer | null;
|
|
@@ -171,5 +171,4 @@ export declare function getSponsoredFPCAddress(): Promise<AztecAddress>;
|
|
|
171
171
|
export declare function setupSponsoredFPC(pxe: PXE): Promise<import("@aztec/aztec.js").ContractInstanceWithAddress>;
|
|
172
172
|
export declare function waitForProvenChain(node: AztecNode, targetBlock?: number, timeoutSec?: number, intervalSec?: number): Promise<void>;
|
|
173
173
|
export declare function createAndSyncProverNode(proverNodePrivateKey: `0x${string}`, aztecNodeConfig: AztecNodeConfig, proverNodeConfig: Partial<ProverNodeConfig> & Pick<DataStoreConfig, 'dataDirectory'>, aztecNode: AztecNode, prefilledPublicData?: PublicDataTreeLeaf[]): Promise<ProverNode>;
|
|
174
|
-
export declare function createForwarderContract(aztecNodeConfig: AztecNodeConfig, privateKey: `0x${string}`, rollupAddress: Hex): Promise<ForwarderContract>;
|
|
175
174
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -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,
|
|
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,M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EAAE,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC/B,MAAM,EAAE,CAAC,EAAE,EACX,eAAe,EAAE,CAAC,EAAE,GACnB,OAAO,CAAC,IAAI,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"}
|
package/dest/fixtures/utils.js
CHANGED
|
@@ -8,8 +8,9 @@ import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
|
8
8
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
9
9
|
import { createBlobSinkServer } from '@aztec/blob-sink/server';
|
|
10
10
|
import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
11
|
-
import {
|
|
11
|
+
import { NULL_KEY, createExtendedL1Client, deployL1Contracts, deployMulticall3, getL1ContractsConfigEnvVars, isAnvilTestChain, l1Artifacts } from '@aztec/ethereum';
|
|
12
12
|
import { DelayedTxUtils, EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
13
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
13
14
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
14
15
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
15
16
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -189,7 +190,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
189
190
|
...opts
|
|
190
191
|
};
|
|
191
192
|
// use initialValidators for the node config
|
|
192
|
-
config.validatorPrivateKeys = opts.initialValidators?.map((v)=>v.privateKey);
|
|
193
|
+
config.validatorPrivateKeys = new SecretValue(opts.initialValidators?.map((v)=>v.privateKey) ?? []);
|
|
193
194
|
config.peerCheckIntervalMS = TEST_PEER_CHECK_INTERVAL_MS;
|
|
194
195
|
// For tests we only want proving enabled if specifically requested
|
|
195
196
|
config.realProofs = !!opts.realProofs;
|
|
@@ -234,8 +235,8 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
234
235
|
}
|
|
235
236
|
let publisherPrivKey = undefined;
|
|
236
237
|
let publisherHdAccount = undefined;
|
|
237
|
-
if (config.publisherPrivateKey && config.publisherPrivateKey != NULL_KEY) {
|
|
238
|
-
publisherHdAccount = privateKeyToAccount(config.publisherPrivateKey);
|
|
238
|
+
if (config.publisherPrivateKey && config.publisherPrivateKey.getValue() != NULL_KEY) {
|
|
239
|
+
publisherHdAccount = privateKeyToAccount(config.publisherPrivateKey.getValue());
|
|
239
240
|
} else if (!MNEMONIC) {
|
|
240
241
|
throw new Error(`Mnemonic not provided and no publisher private key`);
|
|
241
242
|
} else {
|
|
@@ -244,7 +245,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
244
245
|
});
|
|
245
246
|
const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
|
|
246
247
|
publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
247
|
-
config.publisherPrivateKey = `0x${publisherPrivKey.toString('hex')}
|
|
248
|
+
config.publisherPrivateKey = new SecretValue(`0x${publisherPrivKey.toString('hex')}`);
|
|
248
249
|
}
|
|
249
250
|
if (PXE_URL) {
|
|
250
251
|
// we are setting up against a remote environment, l1 contracts are assumed to already be deployed
|
|
@@ -257,6 +258,8 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
257
258
|
if (enableAutomine) {
|
|
258
259
|
await ethCheatCodes.setAutomine(true);
|
|
259
260
|
}
|
|
261
|
+
const l1Client = createExtendedL1Client(config.l1RpcUrls, publisherHdAccount, chain);
|
|
262
|
+
await deployMulticall3(l1Client, logger);
|
|
260
263
|
const deployL1ContractsValues = opts.deployL1ContractsValues ?? await setupL1Contracts(config.l1RpcUrls, publisherHdAccount, logger, {
|
|
261
264
|
...opts,
|
|
262
265
|
genesisArchiveRoot,
|
|
@@ -555,7 +558,7 @@ export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, p
|
|
|
555
558
|
proverCoordinationNodeUrls: [],
|
|
556
559
|
realProofs: false,
|
|
557
560
|
proverAgentCount: 2,
|
|
558
|
-
publisherPrivateKey: proverNodePrivateKey,
|
|
561
|
+
publisherPrivateKey: new SecretValue(proverNodePrivateKey),
|
|
559
562
|
proverNodeMaxPendingJobs: 10,
|
|
560
563
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
561
564
|
proverNodePollingIntervalMs: 200,
|
|
@@ -587,8 +590,3 @@ function createDelayedL1TxUtils(aztecNodeConfig, privateKey, logName) {
|
|
|
587
590
|
l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
|
|
588
591
|
return l1TxUtils;
|
|
589
592
|
}
|
|
590
|
-
export async function createForwarderContract(aztecNodeConfig, privateKey, rollupAddress) {
|
|
591
|
-
const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
|
|
592
|
-
const forwarderContract = await ForwarderContract.create(l1Client, createLogger('forwarder'), rollupAddress);
|
|
593
|
-
return forwarderContract;
|
|
594
|
-
}
|
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.20250619",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,47 +25,47 @@
|
|
|
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.20250619",
|
|
29
|
+
"@aztec/archiver": "1.0.0-nightly.20250619",
|
|
30
|
+
"@aztec/aztec": "1.0.0-nightly.20250619",
|
|
31
|
+
"@aztec/aztec-node": "1.0.0-nightly.20250619",
|
|
32
|
+
"@aztec/aztec.js": "1.0.0-nightly.20250619",
|
|
33
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250619",
|
|
34
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250619",
|
|
35
|
+
"@aztec/blob-sink": "1.0.0-nightly.20250619",
|
|
36
|
+
"@aztec/bot": "1.0.0-nightly.20250619",
|
|
37
|
+
"@aztec/cli": "1.0.0-nightly.20250619",
|
|
38
|
+
"@aztec/constants": "1.0.0-nightly.20250619",
|
|
39
|
+
"@aztec/entrypoints": "1.0.0-nightly.20250619",
|
|
40
|
+
"@aztec/epoch-cache": "1.0.0-nightly.20250619",
|
|
41
|
+
"@aztec/ethereum": "1.0.0-nightly.20250619",
|
|
42
|
+
"@aztec/foundation": "1.0.0-nightly.20250619",
|
|
43
|
+
"@aztec/kv-store": "1.0.0-nightly.20250619",
|
|
44
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250619",
|
|
45
|
+
"@aztec/merkle-tree": "1.0.0-nightly.20250619",
|
|
46
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250619",
|
|
47
|
+
"@aztec/noir-noirc_abi": "1.0.0-nightly.20250619",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250619",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "1.0.0-nightly.20250619",
|
|
50
|
+
"@aztec/p2p": "1.0.0-nightly.20250619",
|
|
51
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250619",
|
|
52
|
+
"@aztec/prover-client": "1.0.0-nightly.20250619",
|
|
53
|
+
"@aztec/prover-node": "1.0.0-nightly.20250619",
|
|
54
|
+
"@aztec/pxe": "1.0.0-nightly.20250619",
|
|
55
|
+
"@aztec/sequencer-client": "1.0.0-nightly.20250619",
|
|
56
|
+
"@aztec/simulator": "1.0.0-nightly.20250619",
|
|
57
|
+
"@aztec/slasher": "1.0.0-nightly.20250619",
|
|
58
|
+
"@aztec/stdlib": "1.0.0-nightly.20250619",
|
|
59
|
+
"@aztec/telemetry-client": "1.0.0-nightly.20250619",
|
|
60
|
+
"@aztec/validator-client": "1.0.0-nightly.20250619",
|
|
61
|
+
"@aztec/world-state": "1.0.0-nightly.20250619",
|
|
62
62
|
"@iarna/toml": "^2.2.5",
|
|
63
|
-
"@jest/globals": "^
|
|
63
|
+
"@jest/globals": "^30.0.0",
|
|
64
64
|
"@noble/curves": "^1.0.0",
|
|
65
65
|
"@swc/core": "^1.4.11",
|
|
66
66
|
"@swc/jest": "^0.2.36",
|
|
67
67
|
"@types/fs-extra": "^11.0.2",
|
|
68
|
-
"@types/jest": "^
|
|
68
|
+
"@types/jest": "^30.0.0",
|
|
69
69
|
"@types/koa": "^2.15.0",
|
|
70
70
|
"@types/koa-static": "^4.0.2",
|
|
71
71
|
"@types/lodash.every": "^4.6.7",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"fs-extra": "^11.2.0",
|
|
77
77
|
"get-port": "^7.1.0",
|
|
78
78
|
"glob": "^10.3.10",
|
|
79
|
-
"jest": "^
|
|
80
|
-
"jest-extended": "^
|
|
81
|
-
"jest-mock-extended": "^
|
|
79
|
+
"jest": "^30.0.0",
|
|
80
|
+
"jest-extended": "^6.0.0",
|
|
81
|
+
"jest-mock-extended": "^4.0.0",
|
|
82
82
|
"koa": "^2.16.1",
|
|
83
83
|
"koa-static": "^5.0.0",
|
|
84
84
|
"lodash.chunk": "^4.2.0",
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"0x": "^5.7.0",
|
|
103
103
|
"@jest/globals": "^30.0.0",
|
|
104
|
-
"@types/jest": "^
|
|
104
|
+
"@types/jest": "^30.0.0",
|
|
105
105
|
"@types/js-yaml": "^4.0.9",
|
|
106
106
|
"@types/lodash.chunk": "^4.2.9",
|
|
107
107
|
"concurrently": "^7.6.0",
|
|
108
108
|
"jest": "^30.0.0",
|
|
109
|
-
"jest-extended": "^
|
|
109
|
+
"jest-extended": "^6.0.0",
|
|
110
110
|
"js-yaml": "^4.1.0",
|
|
111
111
|
"ts-node": "^10.9.1",
|
|
112
112
|
"typescript": "^5.3.3"
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
"jest": {
|
|
124
124
|
"slowTestThreshold": 300,
|
|
125
125
|
"setupFilesAfterEnv": [
|
|
126
|
+
"../../foundation/src/jest/setupAfterEnv.mjs",
|
|
126
127
|
"jest-extended/all",
|
|
127
128
|
"./shared/jest_setup.ts"
|
|
128
129
|
],
|
|
@@ -23,7 +23,7 @@ async function createProver(config: NativeProverConfig = {}, log: Logger) {
|
|
|
23
23
|
const bbConfig = config as Required<NativeProverConfig>;
|
|
24
24
|
return {
|
|
25
25
|
prover: await BBNativePrivateKernelProver.new(
|
|
26
|
-
{ bbSkipCleanup: false, numConcurrentIVCVerifiers: 1, ...bbConfig },
|
|
26
|
+
{ bbSkipCleanup: false, numConcurrentIVCVerifiers: 1, bbIVCConcurrency: 1, ...bbConfig },
|
|
27
27
|
simulator,
|
|
28
28
|
log,
|
|
29
29
|
),
|
|
@@ -9,9 +9,10 @@ import {
|
|
|
9
9
|
retryUntil,
|
|
10
10
|
sleep,
|
|
11
11
|
} from '@aztec/aztec.js';
|
|
12
|
-
import type
|
|
12
|
+
import { type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
|
|
13
13
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
14
|
-
import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp } from '@aztec/ethereum/test';
|
|
14
|
+
import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
|
|
15
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
15
16
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
16
17
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
17
18
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
@@ -26,6 +27,7 @@ import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
|
26
27
|
|
|
27
28
|
import { join } from 'path';
|
|
28
29
|
import type { Hex } from 'viem';
|
|
30
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
29
31
|
|
|
30
32
|
import {
|
|
31
33
|
type EndToEndContext,
|
|
@@ -43,7 +45,7 @@ export type EpochsTestOpts = Partial<
|
|
|
43
45
|
Pick<
|
|
44
46
|
SetupOptions,
|
|
45
47
|
| 'startProverNode'
|
|
46
|
-
| '
|
|
48
|
+
| 'aztecProofSubmissionEpochs'
|
|
47
49
|
| 'aztecEpochDuration'
|
|
48
50
|
| 'proverTestDelayMs'
|
|
49
51
|
| 'l1PublishRetryIntervalMS'
|
|
@@ -91,12 +93,12 @@ export class EpochsTestContext {
|
|
|
91
93
|
const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
|
|
92
94
|
const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
|
|
93
95
|
const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
|
|
94
|
-
const
|
|
95
|
-
return { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration,
|
|
96
|
+
const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
|
|
97
|
+
return { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs };
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
public async setup(opts: EpochsTestOpts = {}) {
|
|
99
|
-
const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration,
|
|
101
|
+
const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs } =
|
|
100
102
|
EpochsTestContext.getSlotDurations(opts);
|
|
101
103
|
|
|
102
104
|
this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
|
|
@@ -114,7 +116,7 @@ export class EpochsTestContext {
|
|
|
114
116
|
aztecEpochDuration,
|
|
115
117
|
aztecSlotDuration,
|
|
116
118
|
ethereumSlotDuration,
|
|
117
|
-
|
|
119
|
+
aztecProofSubmissionEpochs,
|
|
118
120
|
aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
|
|
119
121
|
minTxsPerBlock: 0,
|
|
120
122
|
realProofs: false,
|
|
@@ -164,7 +166,7 @@ export class EpochsTestContext {
|
|
|
164
166
|
l1StartBlock: await this.rollup.getL1StartBlock(),
|
|
165
167
|
l1GenesisTime: await this.rollup.getL1GenesisTime(),
|
|
166
168
|
ethereumSlotDuration,
|
|
167
|
-
|
|
169
|
+
proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs()),
|
|
168
170
|
};
|
|
169
171
|
|
|
170
172
|
this.logger.info(
|
|
@@ -205,7 +207,7 @@ export class EpochsTestContext {
|
|
|
205
207
|
opts: Partial<AztecNodeConfig> & { dontStartSequencer?: boolean } = {},
|
|
206
208
|
) {
|
|
207
209
|
this.logger.warn('Creating and syncing a validator node...');
|
|
208
|
-
return this.createNode({ ...opts, disableValidator: false, validatorPrivateKeys: privateKeys });
|
|
210
|
+
return this.createNode({ ...opts, disableValidator: false, validatorPrivateKeys: new SecretValue(privateKeys) });
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
private async createNode(opts: Partial<AztecNodeConfig> & { dontStartSequencer?: boolean } = {}) {
|
|
@@ -219,7 +221,7 @@ export class EpochsTestContext {
|
|
|
219
221
|
{
|
|
220
222
|
...resolvedConfig,
|
|
221
223
|
dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')),
|
|
222
|
-
validatorPrivateKeys: opts.validatorPrivateKeys,
|
|
224
|
+
validatorPrivateKeys: opts.validatorPrivateKeys ?? new SecretValue([]),
|
|
223
225
|
p2pEnabled,
|
|
224
226
|
p2pIp,
|
|
225
227
|
},
|
|
@@ -273,12 +275,15 @@ export class EpochsTestContext {
|
|
|
273
275
|
return this.monitor.l2ProvenBlockNumber;
|
|
274
276
|
}
|
|
275
277
|
|
|
276
|
-
/** Waits until the
|
|
277
|
-
public async
|
|
278
|
+
/** Waits until the last slot of the proof submission window for a given epoch. */
|
|
279
|
+
public async waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint) {
|
|
278
280
|
const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
281
|
+
const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
|
|
282
|
+
const date = new Date(Number(oneSlotBefore) * 1000);
|
|
283
|
+
this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
|
|
284
|
+
oneSlotBefore,
|
|
285
|
+
});
|
|
286
|
+
await waitUntilL1Timestamp(this.l1Client, oneSlotBefore);
|
|
282
287
|
}
|
|
283
288
|
|
|
284
289
|
/** Waits for the aztec node to sync to the target block number. */
|
|
@@ -315,6 +320,20 @@ export class EpochsTestContext {
|
|
|
315
320
|
return SpamContract.at(instance.address, wallet);
|
|
316
321
|
}
|
|
317
322
|
|
|
323
|
+
/** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
|
|
324
|
+
public async createL1Client() {
|
|
325
|
+
const { client, delayer } = withDelayer(
|
|
326
|
+
createExtendedL1Client(
|
|
327
|
+
[...this.l1Client.chain.rpcUrls.default.http],
|
|
328
|
+
privateKeyToAccount(this.getNextPrivateKey()),
|
|
329
|
+
this.l1Client.chain,
|
|
330
|
+
),
|
|
331
|
+
{ ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S },
|
|
332
|
+
);
|
|
333
|
+
expect(await client.getBalance({ address: client.account.address })).toBeGreaterThan(0n);
|
|
334
|
+
return { client, delayer };
|
|
335
|
+
}
|
|
336
|
+
|
|
318
337
|
/** Verifies whether the given block number is found on the aztec node. */
|
|
319
338
|
public async verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean) {
|
|
320
339
|
// We use `findLeavesIndexes` here, but could use any function that queries the world-state
|
|
@@ -100,8 +100,8 @@ export class P2PNetworkTest {
|
|
|
100
100
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
101
101
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
102
102
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
103
|
-
|
|
104
|
-
initialValidatorConfig.
|
|
103
|
+
aztecProofSubmissionEpochs:
|
|
104
|
+
initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
105
105
|
aztecTargetCommitteeSize: numberOfNodes,
|
|
106
106
|
salt: 420,
|
|
107
107
|
metricsPort: metricsPort,
|
|
@@ -113,8 +113,8 @@ export class P2PNetworkTest {
|
|
|
113
113
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
114
114
|
ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
|
|
115
115
|
aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
|
|
116
|
-
|
|
117
|
-
initialValidatorConfig.
|
|
116
|
+
aztecProofSubmissionEpochs:
|
|
117
|
+
initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
|
|
118
118
|
aztecTargetCommitteeSize: numberOfNodes,
|
|
119
119
|
initialValidators: [],
|
|
120
120
|
zkPassportArgs: {
|
package/src/e2e_p2p/shared.ts
CHANGED
|
@@ -225,6 +225,9 @@ export async function awaitCommitteeKicked({
|
|
|
225
225
|
expect(attesterInfo.status).toEqual(2);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
await cheatCodes.debugRollup();
|
|
229
|
+
await cheatCodes.advanceToNextEpoch();
|
|
230
|
+
await sendDummyTx();
|
|
228
231
|
await cheatCodes.advanceToNextEpoch();
|
|
229
232
|
await sendDummyTx();
|
|
230
233
|
await cheatCodes.debugRollup();
|
|
@@ -15,11 +15,17 @@ import {
|
|
|
15
15
|
createLogger,
|
|
16
16
|
} from '@aztec/aztec.js';
|
|
17
17
|
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
BBCircuitVerifier,
|
|
20
|
+
type ClientProtocolCircuitVerifier,
|
|
21
|
+
QueuedIVCVerifier,
|
|
22
|
+
TestCircuitVerifier,
|
|
23
|
+
} from '@aztec/bb-prover';
|
|
19
24
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
20
25
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
21
26
|
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
22
27
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
28
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
23
29
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
24
30
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
25
31
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
@@ -192,7 +198,8 @@ export class FullProverTest {
|
|
|
192
198
|
throw new Error(`Test must be run with BB native configuration`);
|
|
193
199
|
}
|
|
194
200
|
|
|
195
|
-
|
|
201
|
+
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
202
|
+
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
196
203
|
|
|
197
204
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
198
205
|
await this.aztecNodeAdmin.setConfig({
|
|
@@ -289,7 +296,7 @@ export class FullProverTest {
|
|
|
289
296
|
proverId: this.proverAddress.toField(),
|
|
290
297
|
realProofs: this.realProofs,
|
|
291
298
|
proverAgentCount: 2,
|
|
292
|
-
publisherPrivateKey: `0x${proverNodePrivateKey!.toString('hex')}
|
|
299
|
+
publisherPrivateKey: new SecretValue(`0x${proverNodePrivateKey!.toString('hex')}` as const),
|
|
293
300
|
proverNodeMaxPendingJobs: 100,
|
|
294
301
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
295
302
|
proverNodePollingIntervalMs: 100,
|
|
@@ -12,6 +12,8 @@ const {
|
|
|
12
12
|
BB_SKIP_CLEANUP = '',
|
|
13
13
|
TEMP_DIR = tmpdir(),
|
|
14
14
|
BB_WORKING_DIRECTORY = '',
|
|
15
|
+
BB_NUM_IVC_VERIFIERS = '1',
|
|
16
|
+
BB_IVC_CONCURRENCY = '1',
|
|
15
17
|
} = process.env;
|
|
16
18
|
|
|
17
19
|
export const getBBConfig = async (
|
|
@@ -38,7 +40,17 @@ export const getBBConfig = async (
|
|
|
38
40
|
const bbSkipCleanup = ['1', 'true'].includes(BB_SKIP_CLEANUP);
|
|
39
41
|
const cleanup = bbSkipCleanup ? () => Promise.resolve() : () => tryRmDir(directoryToCleanup);
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
const numIvcVerifiers = Number(BB_NUM_IVC_VERIFIERS);
|
|
44
|
+
const ivcConcurrency = Number(BB_IVC_CONCURRENCY);
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
bbSkipCleanup,
|
|
48
|
+
bbBinaryPath,
|
|
49
|
+
bbWorkingDirectory,
|
|
50
|
+
cleanup,
|
|
51
|
+
numConcurrentIVCVerifiers: numIvcVerifiers,
|
|
52
|
+
bbIVCConcurrency: ivcConcurrency,
|
|
53
|
+
};
|
|
42
54
|
} catch (err) {
|
|
43
55
|
logger.error(`Native BB not available, error: ${err}`);
|
|
44
56
|
return undefined;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
5
5
|
import type { SentTx } from '@aztec/aztec.js';
|
|
6
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
6
7
|
import { addLogNameHandler, removeLogNameHandler } from '@aztec/foundation/log';
|
|
7
8
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
8
9
|
import type { PXEService } from '@aztec/pxe/server';
|
|
@@ -113,8 +114,8 @@ export async function createValidatorConfig(
|
|
|
113
114
|
ATTESTER_PRIVATE_KEYS_START_INDEX + addressIndex,
|
|
114
115
|
)!.toString('hex')}`;
|
|
115
116
|
|
|
116
|
-
config.validatorPrivateKeys = [attesterPrivateKey];
|
|
117
|
-
config.publisherPrivateKey = attesterPrivateKey;
|
|
117
|
+
config.validatorPrivateKeys = new SecretValue([attesterPrivateKey]);
|
|
118
|
+
config.publisherPrivateKey = new SecretValue(attesterPrivateKey);
|
|
118
119
|
|
|
119
120
|
const nodeConfig: AztecNodeConfig = {
|
|
120
121
|
...config,
|
|
@@ -21,11 +21,13 @@ import {
|
|
|
21
21
|
type DeployL1ContractsArgs,
|
|
22
22
|
type DeployL1ContractsReturnType,
|
|
23
23
|
createExtendedL1Client,
|
|
24
|
+
deployMulticall3,
|
|
24
25
|
getL1ContractsConfigEnvVars,
|
|
25
26
|
l1Artifacts,
|
|
26
27
|
} from '@aztec/ethereum';
|
|
27
28
|
import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
28
29
|
import { asyncMap } from '@aztec/foundation/async-map';
|
|
30
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
29
31
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
30
32
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
31
33
|
import { createLogger } from '@aztec/foundation/log';
|
|
@@ -46,6 +48,7 @@ import { tmpdir } from 'os';
|
|
|
46
48
|
import path, { join } from 'path';
|
|
47
49
|
import { type Hex, getContract } from 'viem';
|
|
48
50
|
import { mnemonicToAccount } from 'viem/accounts';
|
|
51
|
+
import { foundry } from 'viem/chains';
|
|
49
52
|
|
|
50
53
|
import { MNEMONIC, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
|
|
51
54
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
@@ -338,8 +341,8 @@ async function setupFromFresh(
|
|
|
338
341
|
const validatorPrivKey = getPrivateKeyFromIndex(0);
|
|
339
342
|
const proverNodePrivateKey = getPrivateKeyFromIndex(0);
|
|
340
343
|
|
|
341
|
-
aztecNodeConfig.publisherPrivateKey = `0x${publisherPrivKey!.toString('hex')}
|
|
342
|
-
aztecNodeConfig.validatorPrivateKeys = [`0x${validatorPrivKey!.toString('hex')}`];
|
|
344
|
+
aztecNodeConfig.publisherPrivateKey = new SecretValue<`0x${string}`>(`0x${publisherPrivKey!.toString('hex')}`);
|
|
345
|
+
aztecNodeConfig.validatorPrivateKeys = new SecretValue([`0x${validatorPrivKey!.toString('hex')}`]);
|
|
343
346
|
|
|
344
347
|
const ethCheatCodes = new EthCheatCodesWithState(aztecNodeConfig.l1RpcUrls);
|
|
345
348
|
|
|
@@ -354,6 +357,9 @@ async function setupFromFresh(
|
|
|
354
357
|
opts.initialAccountFeeJuice,
|
|
355
358
|
);
|
|
356
359
|
|
|
360
|
+
const l1Client = createExtendedL1Client([aztecNodeConfig.l1RpcUrls[0]], hdAccount, foundry);
|
|
361
|
+
await deployMulticall3(l1Client, logger);
|
|
362
|
+
|
|
357
363
|
const deployL1ContractsValues = await setupL1Contracts(aztecNodeConfig.l1RpcUrls[0], hdAccount, logger, {
|
|
358
364
|
...getL1ContractsConfigEnvVars(),
|
|
359
365
|
genesisArchiveRoot,
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -31,16 +31,17 @@ import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
|
31
31
|
import {
|
|
32
32
|
type DeployL1ContractsArgs,
|
|
33
33
|
type DeployL1ContractsReturnType,
|
|
34
|
-
ForwarderContract,
|
|
35
34
|
NULL_KEY,
|
|
36
35
|
type Operator,
|
|
37
36
|
createExtendedL1Client,
|
|
38
37
|
deployL1Contracts,
|
|
38
|
+
deployMulticall3,
|
|
39
39
|
getL1ContractsConfigEnvVars,
|
|
40
40
|
isAnvilTestChain,
|
|
41
41
|
l1Artifacts,
|
|
42
42
|
} from '@aztec/ethereum';
|
|
43
43
|
import { DelayedTxUtils, EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
44
|
+
import { SecretValue } from '@aztec/foundation/config';
|
|
44
45
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
45
46
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
46
47
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -367,7 +368,7 @@ export async function setup(
|
|
|
367
368
|
|
|
368
369
|
const config = { ...getConfigEnvVars(), ...opts };
|
|
369
370
|
// use initialValidators for the node config
|
|
370
|
-
config.validatorPrivateKeys = opts.initialValidators?.map(v => v.privateKey);
|
|
371
|
+
config.validatorPrivateKeys = new SecretValue(opts.initialValidators?.map(v => v.privateKey) ?? []);
|
|
371
372
|
|
|
372
373
|
config.peerCheckIntervalMS = TEST_PEER_CHECK_INTERVAL_MS;
|
|
373
374
|
// For tests we only want proving enabled if specifically requested
|
|
@@ -419,15 +420,15 @@ export async function setup(
|
|
|
419
420
|
let publisherPrivKey = undefined;
|
|
420
421
|
let publisherHdAccount = undefined;
|
|
421
422
|
|
|
422
|
-
if (config.publisherPrivateKey && config.publisherPrivateKey != NULL_KEY) {
|
|
423
|
-
publisherHdAccount = privateKeyToAccount(config.publisherPrivateKey);
|
|
423
|
+
if (config.publisherPrivateKey && config.publisherPrivateKey.getValue() != NULL_KEY) {
|
|
424
|
+
publisherHdAccount = privateKeyToAccount(config.publisherPrivateKey.getValue());
|
|
424
425
|
} else if (!MNEMONIC) {
|
|
425
426
|
throw new Error(`Mnemonic not provided and no publisher private key`);
|
|
426
427
|
} else {
|
|
427
428
|
publisherHdAccount = mnemonicToAccount(MNEMONIC, { addressIndex: 0 });
|
|
428
429
|
const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
|
|
429
430
|
publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
430
|
-
config.publisherPrivateKey = `0x${publisherPrivKey!.toString('hex')}
|
|
431
|
+
config.publisherPrivateKey = new SecretValue(`0x${publisherPrivKey!.toString('hex')}` as const);
|
|
431
432
|
}
|
|
432
433
|
|
|
433
434
|
if (PXE_URL) {
|
|
@@ -450,6 +451,9 @@ export async function setup(
|
|
|
450
451
|
await ethCheatCodes.setAutomine(true);
|
|
451
452
|
}
|
|
452
453
|
|
|
454
|
+
const l1Client = createExtendedL1Client(config.l1RpcUrls, publisherHdAccount!, chain);
|
|
455
|
+
await deployMulticall3(l1Client, logger);
|
|
456
|
+
|
|
453
457
|
const deployL1ContractsValues =
|
|
454
458
|
opts.deployL1ContractsValues ??
|
|
455
459
|
(await setupL1Contracts(
|
|
@@ -839,7 +843,7 @@ export function createAndSyncProverNode(
|
|
|
839
843
|
proverCoordinationNodeUrls: [],
|
|
840
844
|
realProofs: false,
|
|
841
845
|
proverAgentCount: 2,
|
|
842
|
-
publisherPrivateKey: proverNodePrivateKey,
|
|
846
|
+
publisherPrivateKey: new SecretValue(proverNodePrivateKey),
|
|
843
847
|
proverNodeMaxPendingJobs: 10,
|
|
844
848
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
845
849
|
proverNodePollingIntervalMs: 200,
|
|
@@ -871,13 +875,3 @@ function createDelayedL1TxUtils(aztecNodeConfig: AztecNodeConfig, privateKey: `0
|
|
|
871
875
|
l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
|
|
872
876
|
return l1TxUtils;
|
|
873
877
|
}
|
|
874
|
-
|
|
875
|
-
export async function createForwarderContract(
|
|
876
|
-
aztecNodeConfig: AztecNodeConfig,
|
|
877
|
-
privateKey: `0x${string}`,
|
|
878
|
-
rollupAddress: Hex,
|
|
879
|
-
) {
|
|
880
|
-
const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
|
|
881
|
-
const forwarderContract = await ForwarderContract.create(l1Client, createLogger('forwarder'), rollupAddress);
|
|
882
|
-
return forwarderContract;
|
|
883
|
-
}
|