@aztec/end-to-end 0.86.0-nightly.20250429 → 0.86.0-nightly.20250430
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.
|
@@ -5,14 +5,15 @@ import { RollupContract } from '@aztec/ethereum/contracts';
|
|
|
5
5
|
import { ChainMonitor, type Delayer } from '@aztec/ethereum/test';
|
|
6
6
|
import { ProverNode } from '@aztec/prover-node';
|
|
7
7
|
import type { L2BlockNumber } from '@aztec/stdlib/block';
|
|
8
|
-
import type
|
|
8
|
+
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
9
9
|
import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
|
|
10
10
|
export declare const L1_BLOCK_TIME_IN_S: number;
|
|
11
11
|
export declare const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
|
|
12
|
+
export declare const L2_SLOT_DURATION_IN_S: number;
|
|
12
13
|
export declare const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
13
14
|
export declare const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
14
15
|
export declare const ARCHIVER_POLL_INTERVAL = 50;
|
|
15
|
-
export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | 'aztecProofSubmissionWindow' | 'aztecEpochDuration' | 'proverTestDelayMs' | 'proverNodeConfig'>>;
|
|
16
|
+
export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | 'aztecProofSubmissionWindow' | 'aztecEpochDuration' | 'proverTestDelayMs' | 'l1PublishRetryIntervalMS' | 'txPropagationMaxQueryAttempts' | 'proverNodeConfig'>>;
|
|
16
17
|
/**
|
|
17
18
|
* Tests building of epochs using fast block times and short epochs.
|
|
18
19
|
* Spawns an aztec node and a prover node with fake proofs.
|
|
@@ -41,7 +42,9 @@ export declare class EpochsTestContext {
|
|
|
41
42
|
/** Waits until the given L2 block number is mined. */
|
|
42
43
|
waitUntilL2BlockNumber(target: number, timeout?: number): Promise<void>;
|
|
43
44
|
/** Waits until the given L2 block number is marked as proven. */
|
|
44
|
-
waitUntilProvenL2BlockNumber(t: number, timeout?: number): Promise<
|
|
45
|
+
waitUntilProvenL2BlockNumber(t: number, timeout?: number): Promise<number>;
|
|
46
|
+
/** Waits until the end of the proof submission window for a given epoch. */
|
|
47
|
+
waitUntilEndOfProofSubmissionWindow(epochNumber: number | bigint): Promise<void>;
|
|
45
48
|
/** Waits for the aztec node to sync to the target block number. */
|
|
46
49
|
waitForNodeToSync(blockNumber: number, type: 'finalised' | 'historic'): Promise<void>;
|
|
47
50
|
/** Verifies whether the given block number is found on the aztec node. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAM,KAAK,MAAM,EAA8D,MAAM,iBAAiB,CAAC;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAkB,KAAK,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAC;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAM,KAAK,MAAM,EAA8D,MAAM,iBAAiB,CAAC;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,C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,gBAAgB;IAgBhB,sBAAsB;IAcnC,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,4EAA4E;IAC/D,mCAAmC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAO7E,mEAAmE;IACtD,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU;IAclF,0EAA0E;IAC7D,mBAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO;CAUtF"}
|
|
@@ -4,11 +4,13 @@ import { RollupContract } from '@aztec/ethereum/contracts';
|
|
|
4
4
|
import { ChainMonitor, waitUntilL1Timestamp } from '@aztec/ethereum/test';
|
|
5
5
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
6
6
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
7
|
+
import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
7
8
|
import { join } from 'path';
|
|
8
9
|
import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
|
|
9
10
|
// This can be lowered to as much as 2s in non-CI
|
|
10
11
|
export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
|
|
11
12
|
export const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
|
|
13
|
+
export const L2_SLOT_DURATION_IN_S = L2_SLOT_DURATION_IN_L1_SLOTS * L1_BLOCK_TIME_IN_S;
|
|
12
14
|
export const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
13
15
|
export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
14
16
|
export const ARCHIVER_POLL_INTERVAL = 50;
|
|
@@ -133,10 +135,19 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
133
135
|
return start;
|
|
134
136
|
}
|
|
135
137
|
/** Waits until the given L2 block number is mined. */ async waitUntilL2BlockNumber(target, timeout = 60) {
|
|
136
|
-
await retryUntil(()=>Promise.resolve(target
|
|
138
|
+
await retryUntil(()=>Promise.resolve(target <= this.monitor.l2BlockNumber), `Wait until L2 block ${target}`, timeout, 0.1);
|
|
137
139
|
}
|
|
138
140
|
/** Waits until the given L2 block number is marked as proven. */ async waitUntilProvenL2BlockNumber(t, timeout = 60) {
|
|
139
|
-
await retryUntil(()=>Promise.resolve(t
|
|
141
|
+
await retryUntil(()=>Promise.resolve(t <= this.monitor.l2ProvenBlockNumber), `Wait proven L2 block ${t}`, timeout, 0.1);
|
|
142
|
+
return this.monitor.l2ProvenBlockNumber;
|
|
143
|
+
}
|
|
144
|
+
/** Waits until the end of the proof submission window for a given epoch. */ async waitUntilEndOfProofSubmissionWindow(epochNumber) {
|
|
145
|
+
const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
|
|
146
|
+
const date = new Date(Number(deadline) * 1000);
|
|
147
|
+
this.logger.info(`Waiting until end of submission window for epoch ${epochNumber} at ${date}`, {
|
|
148
|
+
deadline
|
|
149
|
+
});
|
|
150
|
+
await waitUntilL1Timestamp(this.l1Client, deadline);
|
|
140
151
|
}
|
|
141
152
|
/** Waits for the aztec node to sync to the target block number. */ async waitForNodeToSync(blockNumber, type) {
|
|
142
153
|
const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.86.0-nightly.
|
|
3
|
+
"version": "0.86.0-nightly.20250430",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,39 +25,39 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "0.86.0-nightly.
|
|
29
|
-
"@aztec/archiver": "0.86.0-nightly.
|
|
30
|
-
"@aztec/aztec": "0.86.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "0.86.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "0.86.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "0.86.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "0.86.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "0.86.0-nightly.
|
|
36
|
-
"@aztec/bot": "0.86.0-nightly.
|
|
37
|
-
"@aztec/cli": "0.86.0-nightly.
|
|
38
|
-
"@aztec/constants": "0.86.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "0.86.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "0.86.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "0.86.0-nightly.
|
|
42
|
-
"@aztec/foundation": "0.86.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "0.86.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "0.86.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "0.86.0-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "0.86.0-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "0.86.0-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "0.86.0-nightly.
|
|
49
|
-
"@aztec/noir-test-contracts.js": "0.86.0-nightly.
|
|
50
|
-
"@aztec/p2p": "0.86.0-nightly.
|
|
51
|
-
"@aztec/protocol-contracts": "0.86.0-nightly.
|
|
52
|
-
"@aztec/prover-client": "0.86.0-nightly.
|
|
53
|
-
"@aztec/prover-node": "0.86.0-nightly.
|
|
54
|
-
"@aztec/pxe": "0.86.0-nightly.
|
|
55
|
-
"@aztec/sequencer-client": "0.86.0-nightly.
|
|
56
|
-
"@aztec/simulator": "0.86.0-nightly.
|
|
57
|
-
"@aztec/stdlib": "0.86.0-nightly.
|
|
58
|
-
"@aztec/telemetry-client": "0.86.0-nightly.
|
|
59
|
-
"@aztec/validator-client": "0.86.0-nightly.
|
|
60
|
-
"@aztec/world-state": "0.86.0-nightly.
|
|
28
|
+
"@aztec/accounts": "0.86.0-nightly.20250430",
|
|
29
|
+
"@aztec/archiver": "0.86.0-nightly.20250430",
|
|
30
|
+
"@aztec/aztec": "0.86.0-nightly.20250430",
|
|
31
|
+
"@aztec/aztec-node": "0.86.0-nightly.20250430",
|
|
32
|
+
"@aztec/aztec.js": "0.86.0-nightly.20250430",
|
|
33
|
+
"@aztec/bb-prover": "0.86.0-nightly.20250430",
|
|
34
|
+
"@aztec/blob-lib": "0.86.0-nightly.20250430",
|
|
35
|
+
"@aztec/blob-sink": "0.86.0-nightly.20250430",
|
|
36
|
+
"@aztec/bot": "0.86.0-nightly.20250430",
|
|
37
|
+
"@aztec/cli": "0.86.0-nightly.20250430",
|
|
38
|
+
"@aztec/constants": "0.86.0-nightly.20250430",
|
|
39
|
+
"@aztec/entrypoints": "0.86.0-nightly.20250430",
|
|
40
|
+
"@aztec/epoch-cache": "0.86.0-nightly.20250430",
|
|
41
|
+
"@aztec/ethereum": "0.86.0-nightly.20250430",
|
|
42
|
+
"@aztec/foundation": "0.86.0-nightly.20250430",
|
|
43
|
+
"@aztec/kv-store": "0.86.0-nightly.20250430",
|
|
44
|
+
"@aztec/l1-artifacts": "0.86.0-nightly.20250430",
|
|
45
|
+
"@aztec/merkle-tree": "0.86.0-nightly.20250430",
|
|
46
|
+
"@aztec/noir-contracts.js": "0.86.0-nightly.20250430",
|
|
47
|
+
"@aztec/noir-noirc_abi": "0.86.0-nightly.20250430",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "0.86.0-nightly.20250430",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "0.86.0-nightly.20250430",
|
|
50
|
+
"@aztec/p2p": "0.86.0-nightly.20250430",
|
|
51
|
+
"@aztec/protocol-contracts": "0.86.0-nightly.20250430",
|
|
52
|
+
"@aztec/prover-client": "0.86.0-nightly.20250430",
|
|
53
|
+
"@aztec/prover-node": "0.86.0-nightly.20250430",
|
|
54
|
+
"@aztec/pxe": "0.86.0-nightly.20250430",
|
|
55
|
+
"@aztec/sequencer-client": "0.86.0-nightly.20250430",
|
|
56
|
+
"@aztec/simulator": "0.86.0-nightly.20250430",
|
|
57
|
+
"@aztec/stdlib": "0.86.0-nightly.20250430",
|
|
58
|
+
"@aztec/telemetry-client": "0.86.0-nightly.20250430",
|
|
59
|
+
"@aztec/validator-client": "0.86.0-nightly.20250430",
|
|
60
|
+
"@aztec/world-state": "0.86.0-nightly.20250430",
|
|
61
61
|
"@iarna/toml": "^2.2.5",
|
|
62
62
|
"@jest/globals": "^29.5.0",
|
|
63
63
|
"@noble/curves": "^1.0.0",
|
|
@@ -10,7 +10,7 @@ import type { TestProverNode } from '@aztec/prover-node/test';
|
|
|
10
10
|
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
|
-
import type
|
|
13
|
+
import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
14
14
|
|
|
15
15
|
import { join } from 'path';
|
|
16
16
|
import type { Hex } from 'viem';
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
// This can be lowered to as much as 2s in non-CI
|
|
27
27
|
export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
|
|
28
28
|
export const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
|
|
29
|
+
export const L2_SLOT_DURATION_IN_S = L2_SLOT_DURATION_IN_L1_SLOTS * L1_BLOCK_TIME_IN_S;
|
|
30
|
+
|
|
29
31
|
export const WORLD_STATE_BLOCK_HISTORY = 2;
|
|
30
32
|
export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
31
33
|
export const ARCHIVER_POLL_INTERVAL = 50;
|
|
@@ -33,7 +35,13 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
33
35
|
export type EpochsTestOpts = Partial<
|
|
34
36
|
Pick<
|
|
35
37
|
SetupOptions,
|
|
36
|
-
|
|
38
|
+
| 'startProverNode'
|
|
39
|
+
| 'aztecProofSubmissionWindow'
|
|
40
|
+
| 'aztecEpochDuration'
|
|
41
|
+
| 'proverTestDelayMs'
|
|
42
|
+
| 'l1PublishRetryIntervalMS'
|
|
43
|
+
| 'txPropagationMaxQueryAttempts'
|
|
44
|
+
| 'proverNodeConfig'
|
|
37
45
|
>
|
|
38
46
|
>;
|
|
39
47
|
|
|
@@ -184,7 +192,7 @@ export class EpochsTestContext {
|
|
|
184
192
|
/** Waits until the given L2 block number is mined. */
|
|
185
193
|
public async waitUntilL2BlockNumber(target: number, timeout = 60) {
|
|
186
194
|
await retryUntil(
|
|
187
|
-
() => Promise.resolve(target
|
|
195
|
+
() => Promise.resolve(target <= this.monitor.l2BlockNumber),
|
|
188
196
|
`Wait until L2 block ${target}`,
|
|
189
197
|
timeout,
|
|
190
198
|
0.1,
|
|
@@ -194,11 +202,20 @@ export class EpochsTestContext {
|
|
|
194
202
|
/** Waits until the given L2 block number is marked as proven. */
|
|
195
203
|
public async waitUntilProvenL2BlockNumber(t: number, timeout = 60) {
|
|
196
204
|
await retryUntil(
|
|
197
|
-
() => Promise.resolve(t
|
|
205
|
+
() => Promise.resolve(t <= this.monitor.l2ProvenBlockNumber),
|
|
198
206
|
`Wait proven L2 block ${t}`,
|
|
199
207
|
timeout,
|
|
200
208
|
0.1,
|
|
201
209
|
);
|
|
210
|
+
return this.monitor.l2ProvenBlockNumber;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** Waits until the end of the proof submission window for a given epoch. */
|
|
214
|
+
public async waitUntilEndOfProofSubmissionWindow(epochNumber: number | bigint) {
|
|
215
|
+
const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
|
|
216
|
+
const date = new Date(Number(deadline) * 1000);
|
|
217
|
+
this.logger.info(`Waiting until end of submission window for epoch ${epochNumber} at ${date}`, { deadline });
|
|
218
|
+
await waitUntilL1Timestamp(this.l1Client, deadline);
|
|
202
219
|
}
|
|
203
220
|
|
|
204
221
|
/** Waits for the aztec node to sync to the target block number. */
|