@aztec/end-to-end 4.0.0-nightly.20260114 → 4.0.0-nightly.20260115
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.d.ts +3 -4
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +13 -8
- package/dest/bench/utils.d.ts +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +3 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +7 -4
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -4
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +10 -5
- package/dest/e2e_deploy_contract/deploy_test.d.ts +3 -3
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +7 -4
- package/dest/e2e_epochs/epochs_test.js +1 -1
- package/dest/e2e_fees/fees_test.d.ts +4 -4
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +14 -11
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +3 -3
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +6 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts +4 -5
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +11 -5
- package/dest/e2e_token_contract/token_contract_test.d.ts +3 -3
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +6 -4
- package/dest/fixtures/e2e_prover_test.d.ts +3 -3
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +9 -7
- package/dest/fixtures/setup.d.ts +216 -0
- package/dest/fixtures/setup.d.ts.map +1 -0
- package/dest/fixtures/setup.js +683 -0
- package/dest/fixtures/utils.d.ts +5 -191
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +4 -615
- package/dest/shared/cross_chain_test_harness.d.ts +12 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.d.ts +11 -1
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.d.ts +5 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/package.json +39 -39
- package/src/bench/client_flows/client_flows_benchmark.ts +16 -11
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +9 -12
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +15 -10
- package/src/e2e_deploy_contract/deploy_test.ts +8 -5
- package/src/e2e_epochs/epochs_test.ts +1 -1
- package/src/e2e_fees/fees_test.ts +21 -18
- package/src/e2e_nested_contract/nested_contract_test.ts +9 -6
- package/src/e2e_p2p/inactivity_slash_test.ts +4 -4
- package/src/e2e_p2p/p2p_network.ts +24 -10
- package/src/e2e_token_contract/token_contract_test.ts +6 -10
- package/src/fixtures/e2e_prover_test.ts +17 -13
- package/src/fixtures/setup.ts +1009 -0
- package/src/fixtures/utils.ts +27 -901
- package/dest/fixtures/snapshot_manager.d.ts +0 -59
- package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
- package/dest/fixtures/snapshot_manager.js +0 -245
- package/src/fixtures/snapshot_manager.ts +0 -333
|
@@ -6,15 +6,15 @@ import { ChildContract } from '@aztec/noir-test-contracts.js/Child';
|
|
|
6
6
|
import { ParentContract } from '@aztec/noir-test-contracts.js/Parent';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
type
|
|
9
|
+
type EndToEndContext,
|
|
10
10
|
deployAccounts,
|
|
11
11
|
publicDeployAccounts,
|
|
12
|
-
|
|
12
|
+
setup,
|
|
13
13
|
teardown as teardownSubsystems,
|
|
14
|
-
} from '../fixtures/
|
|
14
|
+
} from '../fixtures/setup.js';
|
|
15
15
|
|
|
16
16
|
export class NestedContractTest {
|
|
17
|
-
context!:
|
|
17
|
+
context!: EndToEndContext;
|
|
18
18
|
logger: Logger;
|
|
19
19
|
wallet!: Wallet;
|
|
20
20
|
defaultAccountAddress!: AztecAddress;
|
|
@@ -44,7 +44,7 @@ export class NestedContractTest {
|
|
|
44
44
|
});
|
|
45
45
|
this.wallet = this.context.wallet;
|
|
46
46
|
[{ address: this.defaultAccountAddress }] = deployedAccounts;
|
|
47
|
-
this.aztecNode = this.context.
|
|
47
|
+
this.aztecNode = this.context.aztecNodeService!;
|
|
48
48
|
|
|
49
49
|
this.logger.info('Public deploy accounts');
|
|
50
50
|
await publicDeployAccounts(this.wallet, [this.defaultAccountAddress]);
|
|
@@ -52,7 +52,10 @@ export class NestedContractTest {
|
|
|
52
52
|
|
|
53
53
|
async setup() {
|
|
54
54
|
this.logger.info('Setting up fresh subsystems');
|
|
55
|
-
this.context = await
|
|
55
|
+
this.context = await setup(0, {
|
|
56
|
+
fundSponsoredFPC: true,
|
|
57
|
+
skipAccountDeployment: true,
|
|
58
|
+
});
|
|
56
59
|
await this.applyBaseSetup();
|
|
57
60
|
}
|
|
58
61
|
|
|
@@ -98,13 +98,13 @@ export class P2PInactivityTest {
|
|
|
98
98
|
this.rollup = rollup;
|
|
99
99
|
|
|
100
100
|
if (!this.keepInitialNode) {
|
|
101
|
-
await this.test.ctx.
|
|
101
|
+
await this.test.ctx.aztecNodeService!.stop();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// Create all active nodes
|
|
105
105
|
this.activeNodes = await createNodes(
|
|
106
106
|
this.test.ctx.aztecNodeConfig,
|
|
107
|
-
this.test.ctx.dateProvider
|
|
107
|
+
this.test.ctx.dateProvider!,
|
|
108
108
|
this.test.bootstrapNodeEnr,
|
|
109
109
|
NUM_NODES - this.inactiveNodeCount - Number(this.keepInitialNode),
|
|
110
110
|
BOOT_NODE_UDP_PORT,
|
|
@@ -118,7 +118,7 @@ export class P2PInactivityTest {
|
|
|
118
118
|
const inactiveConfig = { ...this.test.ctx.aztecNodeConfig, dontStartSequencer: true };
|
|
119
119
|
this.inactiveNodes = await createNodes(
|
|
120
120
|
inactiveConfig,
|
|
121
|
-
this.test.ctx.dateProvider
|
|
121
|
+
this.test.ctx.dateProvider!,
|
|
122
122
|
this.test.bootstrapNodeEnr,
|
|
123
123
|
this.inactiveNodeCount,
|
|
124
124
|
BOOT_NODE_UDP_PORT,
|
|
@@ -129,7 +129,7 @@ export class P2PInactivityTest {
|
|
|
129
129
|
);
|
|
130
130
|
|
|
131
131
|
this.nodes = [
|
|
132
|
-
...(this.keepInitialNode ? [this.test.ctx.
|
|
132
|
+
...(this.keepInitialNode ? [this.test.ctx.aztecNodeService!] : []),
|
|
133
133
|
...this.activeNodes,
|
|
134
134
|
...this.inactiveNodes,
|
|
135
135
|
];
|
|
@@ -34,13 +34,20 @@ import getPort from 'get-port';
|
|
|
34
34
|
import { type GetContractReturnType, getAddress, getContract } from 'viem';
|
|
35
35
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
36
36
|
|
|
37
|
+
import {
|
|
38
|
+
type EndToEndContext,
|
|
39
|
+
type SetupOptions,
|
|
40
|
+
deployAccounts,
|
|
41
|
+
getPrivateKeyFromIndex,
|
|
42
|
+
getSponsoredFPCAddress,
|
|
43
|
+
setup,
|
|
44
|
+
teardown,
|
|
45
|
+
} from '../fixtures/setup.js';
|
|
37
46
|
import {
|
|
38
47
|
ATTESTER_PRIVATE_KEYS_START_INDEX,
|
|
39
48
|
createValidatorConfig,
|
|
40
49
|
generatePrivateKeys,
|
|
41
50
|
} from '../fixtures/setup_p2p_test.js';
|
|
42
|
-
import { type SubsystemsContext, deployAccounts, setupFromFresh, teardown } from '../fixtures/snapshot_manager.js';
|
|
43
|
-
import { type SetupOptions, getPrivateKeyFromIndex, getSponsoredFPCAddress } from '../fixtures/utils.js';
|
|
44
51
|
import { getEndToEndTestTelemetryClient } from '../fixtures/with_telemetry_utils.js';
|
|
45
52
|
|
|
46
53
|
// Use a fixed bootstrap node private key so that we can re-use the same snapshot and the nodes can find each other
|
|
@@ -55,14 +62,14 @@ export const SHORTENED_BLOCK_TIME_CONFIG_NO_PRUNES = {
|
|
|
55
62
|
};
|
|
56
63
|
|
|
57
64
|
export class P2PNetworkTest {
|
|
58
|
-
public context!:
|
|
65
|
+
public context!: EndToEndContext;
|
|
59
66
|
public baseAccountPrivateKey: `0x${string}`;
|
|
60
67
|
public baseAccount;
|
|
61
68
|
|
|
62
69
|
public logger: Logger;
|
|
63
70
|
public monitor!: ChainMonitor;
|
|
64
71
|
|
|
65
|
-
public ctx!:
|
|
72
|
+
public ctx!: EndToEndContext;
|
|
66
73
|
public attesterPrivateKeys: `0x${string}`[] = [];
|
|
67
74
|
public attesterPublicKeys: string[] = [];
|
|
68
75
|
public peerIdPrivateKeys: string[] = [];
|
|
@@ -196,7 +203,7 @@ export class P2PNetworkTest {
|
|
|
196
203
|
BOOTSTRAP_NODE_PRIVATE_KEY,
|
|
197
204
|
this.bootNodePort,
|
|
198
205
|
telemetry,
|
|
199
|
-
this.context.
|
|
206
|
+
this.context.config,
|
|
200
207
|
);
|
|
201
208
|
// Overwrite enr with updated info
|
|
202
209
|
this.bootstrapNodeEnr = this.bootstrapNode.getENR().encodeTxt();
|
|
@@ -325,9 +332,9 @@ export class P2PNetworkTest {
|
|
|
325
332
|
const block = await this.context.deployL1ContractsValues.l1Client.getBlock({
|
|
326
333
|
blockNumber: receipt.blockNumber,
|
|
327
334
|
});
|
|
328
|
-
this.context.dateProvider
|
|
335
|
+
this.context.dateProvider!.setTime(Number(block.timestamp) * 1000);
|
|
329
336
|
|
|
330
|
-
await this.context.
|
|
337
|
+
await this.context.aztecNodeService!.stop();
|
|
331
338
|
}
|
|
332
339
|
|
|
333
340
|
async sendDummyTx() {
|
|
@@ -344,7 +351,14 @@ export class P2PNetworkTest {
|
|
|
344
351
|
|
|
345
352
|
async setup() {
|
|
346
353
|
this.logger.info('Setting up subsystems from fresh');
|
|
347
|
-
this.context = await
|
|
354
|
+
this.context = await setup(0, {
|
|
355
|
+
...this.setupOptions,
|
|
356
|
+
fundSponsoredFPC: true,
|
|
357
|
+
skipAccountDeployment: true,
|
|
358
|
+
slasherFlavor: this.setupOptions.slasherFlavor ?? this.deployL1ContractsArgs.slasherFlavor ?? 'none',
|
|
359
|
+
aztecTargetCommitteeSize: 0,
|
|
360
|
+
l1ContractsArgs: this.deployL1ContractsArgs,
|
|
361
|
+
});
|
|
348
362
|
this.ctx = this.context;
|
|
349
363
|
|
|
350
364
|
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
@@ -354,8 +368,8 @@ export class P2PNetworkTest {
|
|
|
354
368
|
this.prefilledPublicData = prefilledPublicData;
|
|
355
369
|
|
|
356
370
|
const rollupContract = RollupContract.getFromL1ContractsValues(this.context.deployL1ContractsValues);
|
|
357
|
-
this.monitor = new ChainMonitor(rollupContract, this.context.dateProvider).start();
|
|
358
|
-
this.monitor.on('l1-block', ({ timestamp }) => this.context.dateProvider
|
|
371
|
+
this.monitor = new ChainMonitor(rollupContract, this.context.dateProvider!).start();
|
|
372
|
+
this.monitor.on('l1-block', ({ timestamp }) => this.context.dateProvider!.setTime(Number(timestamp) * 1000));
|
|
359
373
|
}
|
|
360
374
|
|
|
361
375
|
async stopNodes(nodes: AztecNodeService[]) {
|
|
@@ -7,13 +7,7 @@ import type { TestWallet } from '@aztec/test-wallet/server';
|
|
|
7
7
|
|
|
8
8
|
import { jest } from '@jest/globals';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
type SubsystemsContext,
|
|
12
|
-
deployAccounts,
|
|
13
|
-
publicDeployAccounts,
|
|
14
|
-
setupFromFresh,
|
|
15
|
-
teardown,
|
|
16
|
-
} from '../fixtures/snapshot_manager.js';
|
|
10
|
+
import { type EndToEndContext, deployAccounts, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
17
11
|
import { mintTokensToPrivate } from '../fixtures/token_utils.js';
|
|
18
12
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
19
13
|
|
|
@@ -23,7 +17,7 @@ export class TokenContractTest {
|
|
|
23
17
|
static TOKEN_NAME = 'USDC';
|
|
24
18
|
static TOKEN_SYMBOL = 'USD';
|
|
25
19
|
static TOKEN_DECIMALS = 18n;
|
|
26
|
-
context!:
|
|
20
|
+
context!: EndToEndContext;
|
|
27
21
|
logger: Logger;
|
|
28
22
|
metricsPort?: number;
|
|
29
23
|
asset!: TokenContract;
|
|
@@ -76,7 +70,7 @@ export class TokenContractTest {
|
|
|
76
70
|
initialFundedAccounts: this.context.initialFundedAccounts,
|
|
77
71
|
});
|
|
78
72
|
|
|
79
|
-
this.node = this.context.
|
|
73
|
+
this.node = this.context.aztecNodeService!;
|
|
80
74
|
this.wallet = this.context.wallet;
|
|
81
75
|
[this.adminAddress, this.account1Address, this.account2Address] = deployedAccounts.map(acc => acc.address);
|
|
82
76
|
|
|
@@ -111,8 +105,10 @@ export class TokenContractTest {
|
|
|
111
105
|
}
|
|
112
106
|
|
|
113
107
|
async setup() {
|
|
114
|
-
this.context = await
|
|
108
|
+
this.context = await setup(0, {
|
|
115
109
|
metricsPort: this.metricsPort,
|
|
110
|
+
fundSponsoredFPC: true,
|
|
111
|
+
skipAccountDeployment: true,
|
|
116
112
|
});
|
|
117
113
|
|
|
118
114
|
if (this.shouldApplyBaseSetup) {
|
|
@@ -30,13 +30,15 @@ import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
|
30
30
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
31
31
|
import { getBBConfig } from './get_bb_config.js';
|
|
32
32
|
import {
|
|
33
|
-
type
|
|
33
|
+
type EndToEndContext,
|
|
34
34
|
deployAccounts,
|
|
35
|
+
getPrivateKeyFromIndex,
|
|
36
|
+
getSponsoredFPCAddress,
|
|
35
37
|
publicDeployAccounts,
|
|
36
|
-
|
|
38
|
+
setup,
|
|
39
|
+
setupPXEAndGetWallet,
|
|
37
40
|
teardown,
|
|
38
|
-
} from './
|
|
39
|
-
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEAndGetWallet } from './utils.js';
|
|
41
|
+
} from './setup.js';
|
|
40
42
|
|
|
41
43
|
type ProvenSetup = {
|
|
42
44
|
wallet: TestWallet;
|
|
@@ -70,7 +72,7 @@ export class FullProverTest {
|
|
|
70
72
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
71
73
|
circuitProofVerifier?: ClientProtocolCircuitVerifier;
|
|
72
74
|
provenAsset!: TokenContract;
|
|
73
|
-
context!:
|
|
75
|
+
context!: EndToEndContext;
|
|
74
76
|
private proverNode!: ProverNode;
|
|
75
77
|
private simulatedProverNode!: ProverNode;
|
|
76
78
|
public l1Contracts!: DeployAztecL1ContractsReturnType;
|
|
@@ -130,11 +132,13 @@ export class FullProverTest {
|
|
|
130
132
|
|
|
131
133
|
async setup() {
|
|
132
134
|
this.logger.info('Setting up subsystems from fresh');
|
|
133
|
-
this.context = await
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
this.context = await setup(0, {
|
|
136
|
+
startProverNode: true,
|
|
137
|
+
coinbase: this.coinbase,
|
|
138
|
+
fundSponsoredFPC: true,
|
|
139
|
+
skipAccountDeployment: true,
|
|
140
|
+
l1ContractsArgs: { realVerifier: this.realProofs },
|
|
141
|
+
});
|
|
138
142
|
|
|
139
143
|
await this.applyBaseSetup();
|
|
140
144
|
await this.applyMint();
|
|
@@ -142,7 +146,7 @@ export class FullProverTest {
|
|
|
142
146
|
this.logger.info(`Enabling proving`, { realProofs: this.realProofs });
|
|
143
147
|
|
|
144
148
|
// We don't wish to mark as proven automatically, so we set the flag to false
|
|
145
|
-
this.context.watcher
|
|
149
|
+
this.context.watcher!.setIsMarkingAsProven(false);
|
|
146
150
|
|
|
147
151
|
this.simulatedProverNode = this.context.proverNode!;
|
|
148
152
|
({
|
|
@@ -150,7 +154,7 @@ export class FullProverTest {
|
|
|
150
154
|
deployL1ContractsValues: this.l1Contracts,
|
|
151
155
|
cheatCodes: this.cheatCodes,
|
|
152
156
|
} = this.context);
|
|
153
|
-
this.aztecNodeAdmin = this.context.
|
|
157
|
+
this.aztecNodeAdmin = this.context.aztecNodeService!;
|
|
154
158
|
|
|
155
159
|
const config = this.context.aztecNodeConfig;
|
|
156
160
|
const blobClient = await createBlobClientWithFileStores(config, this.logger);
|
|
@@ -223,7 +227,7 @@ export class FullProverTest {
|
|
|
223
227
|
this.logger.verbose('Starting archiver for new prover node');
|
|
224
228
|
const archiver = await createArchiver(
|
|
225
229
|
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
226
|
-
{ blobClient, dateProvider: this.context.dateProvider },
|
|
230
|
+
{ blobClient, dateProvider: this.context.dateProvider! },
|
|
227
231
|
{ blockUntilSync: true },
|
|
228
232
|
);
|
|
229
233
|
|