@aztec/end-to-end 0.84.0-nightly.20250415 → 0.85.0

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.
@@ -18,7 +18,230 @@ export declare class P2PNetworkTest {
18
18
  private numberOfNodes;
19
19
  private metricsPort?;
20
20
  private snapshotManager;
21
- private baseAccount;
21
+ baseAccountPrivateKey: `0x${string}`;
22
+ baseAccount: {
23
+ address: `0x${string}`;
24
+ nonceManager?: import("viem").NonceManager | undefined;
25
+ sign: (parameters: {
26
+ hash: `0x${string}`;
27
+ }) => Promise<`0x${string}`>;
28
+ experimental_signAuthorization: (parameters: import("viem/experimental").Authorization) => Promise<import("viem/accounts").SignAuthorizationReturnType>;
29
+ signMessage: ({ message }: {
30
+ message: import("viem").SignableMessage;
31
+ }) => Promise<`0x${string}`>;
32
+ signTransaction: <serializer extends import("viem").SerializeTransactionFn<import("viem").TransactionSerializable> = import("viem").SerializeTransactionFn<import("viem").TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
33
+ serializer?: serializer | undefined;
34
+ } | undefined) => Promise<import("viem").IsNarrowable<import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>>, `0x${string}`> extends true ? import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>> : `0x${string}`>;
35
+ signTypedData: <const typedData extends Record<string, unknown> | {
36
+ [x: string]: readonly import("viem").TypedDataParameter[];
37
+ [x: `string[${string}]`]: undefined;
38
+ [x: `function[${string}]`]: undefined;
39
+ [x: `address[${string}]`]: undefined;
40
+ [x: `bool[${string}]`]: undefined;
41
+ [x: `bytes[${string}]`]: undefined;
42
+ [x: `bytes8[${string}]`]: undefined;
43
+ [x: `bytes18[${string}]`]: undefined;
44
+ [x: `bytes4[${string}]`]: undefined;
45
+ [x: `bytes1[${string}]`]: undefined;
46
+ [x: `bytes23[${string}]`]: undefined;
47
+ [x: `bytes2[${string}]`]: undefined;
48
+ [x: `bytes3[${string}]`]: undefined;
49
+ [x: `bytes5[${string}]`]: undefined;
50
+ [x: `bytes6[${string}]`]: undefined;
51
+ [x: `bytes7[${string}]`]: undefined;
52
+ [x: `bytes9[${string}]`]: undefined;
53
+ [x: `bytes10[${string}]`]: undefined;
54
+ [x: `bytes11[${string}]`]: undefined;
55
+ [x: `bytes12[${string}]`]: undefined;
56
+ [x: `bytes13[${string}]`]: undefined;
57
+ [x: `bytes14[${string}]`]: undefined;
58
+ [x: `bytes15[${string}]`]: undefined;
59
+ [x: `bytes16[${string}]`]: undefined;
60
+ [x: `bytes17[${string}]`]: undefined;
61
+ [x: `bytes19[${string}]`]: undefined;
62
+ [x: `bytes20[${string}]`]: undefined;
63
+ [x: `bytes21[${string}]`]: undefined;
64
+ [x: `bytes22[${string}]`]: undefined;
65
+ [x: `bytes24[${string}]`]: undefined;
66
+ [x: `bytes25[${string}]`]: undefined;
67
+ [x: `bytes26[${string}]`]: undefined;
68
+ [x: `bytes27[${string}]`]: undefined;
69
+ [x: `bytes28[${string}]`]: undefined;
70
+ [x: `bytes29[${string}]`]: undefined;
71
+ [x: `bytes30[${string}]`]: undefined;
72
+ [x: `bytes31[${string}]`]: undefined;
73
+ [x: `bytes32[${string}]`]: undefined;
74
+ [x: `int[${string}]`]: undefined;
75
+ [x: `int8[${string}]`]: undefined;
76
+ [x: `int16[${string}]`]: undefined;
77
+ [x: `int24[${string}]`]: undefined;
78
+ [x: `int32[${string}]`]: undefined;
79
+ [x: `int40[${string}]`]: undefined;
80
+ [x: `int48[${string}]`]: undefined;
81
+ [x: `int56[${string}]`]: undefined;
82
+ [x: `int64[${string}]`]: undefined;
83
+ [x: `int72[${string}]`]: undefined;
84
+ [x: `int80[${string}]`]: undefined;
85
+ [x: `int88[${string}]`]: undefined;
86
+ [x: `int96[${string}]`]: undefined;
87
+ [x: `int104[${string}]`]: undefined;
88
+ [x: `int112[${string}]`]: undefined;
89
+ [x: `int120[${string}]`]: undefined;
90
+ [x: `int128[${string}]`]: undefined;
91
+ [x: `int136[${string}]`]: undefined;
92
+ [x: `int144[${string}]`]: undefined;
93
+ [x: `int152[${string}]`]: undefined;
94
+ [x: `int160[${string}]`]: undefined;
95
+ [x: `int168[${string}]`]: undefined;
96
+ [x: `int176[${string}]`]: undefined;
97
+ [x: `int184[${string}]`]: undefined;
98
+ [x: `int192[${string}]`]: undefined;
99
+ [x: `int200[${string}]`]: undefined;
100
+ [x: `int208[${string}]`]: undefined;
101
+ [x: `int216[${string}]`]: undefined;
102
+ [x: `int224[${string}]`]: undefined;
103
+ [x: `int232[${string}]`]: undefined;
104
+ [x: `int240[${string}]`]: undefined;
105
+ [x: `int248[${string}]`]: undefined;
106
+ [x: `int256[${string}]`]: undefined;
107
+ [x: `uint[${string}]`]: undefined;
108
+ [x: `uint8[${string}]`]: undefined;
109
+ [x: `uint16[${string}]`]: undefined;
110
+ [x: `uint24[${string}]`]: undefined;
111
+ [x: `uint32[${string}]`]: undefined;
112
+ [x: `uint40[${string}]`]: undefined;
113
+ [x: `uint48[${string}]`]: undefined;
114
+ [x: `uint56[${string}]`]: undefined;
115
+ [x: `uint64[${string}]`]: undefined;
116
+ [x: `uint72[${string}]`]: undefined;
117
+ [x: `uint80[${string}]`]: undefined;
118
+ [x: `uint88[${string}]`]: undefined;
119
+ [x: `uint96[${string}]`]: undefined;
120
+ [x: `uint104[${string}]`]: undefined;
121
+ [x: `uint112[${string}]`]: undefined;
122
+ [x: `uint120[${string}]`]: undefined;
123
+ [x: `uint128[${string}]`]: undefined;
124
+ [x: `uint136[${string}]`]: undefined;
125
+ [x: `uint144[${string}]`]: undefined;
126
+ [x: `uint152[${string}]`]: undefined;
127
+ [x: `uint160[${string}]`]: undefined;
128
+ [x: `uint168[${string}]`]: undefined;
129
+ [x: `uint176[${string}]`]: undefined;
130
+ [x: `uint184[${string}]`]: undefined;
131
+ [x: `uint192[${string}]`]: undefined;
132
+ [x: `uint200[${string}]`]: undefined;
133
+ [x: `uint208[${string}]`]: undefined;
134
+ [x: `uint216[${string}]`]: undefined;
135
+ [x: `uint224[${string}]`]: undefined;
136
+ [x: `uint232[${string}]`]: undefined;
137
+ [x: `uint240[${string}]`]: undefined;
138
+ [x: `uint248[${string}]`]: undefined;
139
+ [x: `uint256[${string}]`]: undefined;
140
+ string?: undefined;
141
+ address?: undefined;
142
+ bool?: undefined;
143
+ bytes?: undefined;
144
+ bytes8?: undefined;
145
+ bytes18?: undefined;
146
+ bytes4?: undefined;
147
+ bytes1?: undefined;
148
+ bytes23?: undefined;
149
+ bytes2?: undefined;
150
+ bytes3?: undefined;
151
+ bytes5?: undefined;
152
+ bytes6?: undefined;
153
+ bytes7?: undefined;
154
+ bytes9?: undefined;
155
+ bytes10?: undefined;
156
+ bytes11?: undefined;
157
+ bytes12?: undefined;
158
+ bytes13?: undefined;
159
+ bytes14?: undefined;
160
+ bytes15?: undefined;
161
+ bytes16?: undefined;
162
+ bytes17?: undefined;
163
+ bytes19?: undefined;
164
+ bytes20?: undefined;
165
+ bytes21?: undefined;
166
+ bytes22?: undefined;
167
+ bytes24?: undefined;
168
+ bytes25?: undefined;
169
+ bytes26?: undefined;
170
+ bytes27?: undefined;
171
+ bytes28?: undefined;
172
+ bytes29?: undefined;
173
+ bytes30?: undefined;
174
+ bytes31?: undefined;
175
+ bytes32?: undefined;
176
+ int8?: undefined;
177
+ int16?: undefined;
178
+ int24?: undefined;
179
+ int32?: undefined;
180
+ int40?: undefined;
181
+ int48?: undefined;
182
+ int56?: undefined;
183
+ int64?: undefined;
184
+ int72?: undefined;
185
+ int80?: undefined;
186
+ int88?: undefined;
187
+ int96?: undefined;
188
+ int104?: undefined;
189
+ int112?: undefined;
190
+ int120?: undefined;
191
+ int128?: undefined;
192
+ int136?: undefined;
193
+ int144?: undefined;
194
+ int152?: undefined;
195
+ int160?: undefined;
196
+ int168?: undefined;
197
+ int176?: undefined;
198
+ int184?: undefined;
199
+ int192?: undefined;
200
+ int200?: undefined;
201
+ int208?: undefined;
202
+ int216?: undefined;
203
+ int224?: undefined;
204
+ int232?: undefined;
205
+ int240?: undefined;
206
+ int248?: undefined;
207
+ int256?: undefined;
208
+ uint8?: undefined;
209
+ uint16?: undefined;
210
+ uint24?: undefined;
211
+ uint32?: undefined;
212
+ uint40?: undefined;
213
+ uint48?: undefined;
214
+ uint56?: undefined;
215
+ uint64?: undefined;
216
+ uint72?: undefined;
217
+ uint80?: undefined;
218
+ uint88?: undefined;
219
+ uint96?: undefined;
220
+ uint104?: undefined;
221
+ uint112?: undefined;
222
+ uint120?: undefined;
223
+ uint128?: undefined;
224
+ uint136?: undefined;
225
+ uint144?: undefined;
226
+ uint152?: undefined;
227
+ uint160?: undefined;
228
+ uint168?: undefined;
229
+ uint176?: undefined;
230
+ uint184?: undefined;
231
+ uint192?: undefined;
232
+ uint200?: undefined;
233
+ uint208?: undefined;
234
+ uint216?: undefined;
235
+ uint224?: undefined;
236
+ uint232?: undefined;
237
+ uint240?: undefined;
238
+ uint248?: undefined;
239
+ uint256?: undefined;
240
+ }, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
241
+ publicKey: `0x${string}`;
242
+ source: "privateKey";
243
+ type: "local";
244
+ };
22
245
  logger: Logger;
23
246
  monitor: ChainMonitor;
24
247
  ctx: SubsystemsContext;
@@ -30,6 +253,7 @@ export declare class P2PNetworkTest {
30
253
  attester: `0x${string}`;
31
254
  proposer: `0x${string}`;
32
255
  withdrawer: `0x${string}`;
256
+ amount: bigint;
33
257
  }[];
34
258
  deployedAccounts: InitialAccountData[];
35
259
  prefilledPublicData: PublicDataTreeLeaf[];
@@ -55,6 +279,16 @@ export declare class P2PNetworkTest {
55
279
  * When using fake timers, we need to keep the system and anvil clocks in sync.
56
280
  */
57
281
  syncMockSystemTime(): Promise<void>;
282
+ addBootstrapNode(): Promise<void>;
283
+ getValidators(): {
284
+ validators: {
285
+ readonly attester: `0x${string}`;
286
+ readonly proposer: `0x${string}`;
287
+ readonly withdrawer: `0x${string}`;
288
+ readonly amount: bigint;
289
+ }[];
290
+ proposerEOAs: string[];
291
+ };
58
292
  applyBaseSnapshots(): Promise<void>;
59
293
  setupAccount(): Promise<void>;
60
294
  deploySpamContract(): 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,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,YAAY,EAA0B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAa9D,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,iCAAiC,CAAC;AAOzC,eAAO,MAAM,mBAAmB,QAA0C,CAAC;AAE3E,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC;AAEF,qBAAa,cAAc;IA4BhB,gBAAgB,EAAE,MAAM;IACxB,YAAY,EAAE,MAAM;IAC3B,OAAO,CAAC,aAAa;IAGrB,OAAO,CAAC,WAAW,CAAC;IAhCtB,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,WAAW,CAAC;IAEb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAG,YAAY,CAAC;IAEvB,GAAG,EAAG,iBAAiB,CAAC;IACxB,mBAAmB,EAAE,KAAK,MAAM,EAAE,EAAE,CAAM;IAC1C,kBAAkB,E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IAiElB,YAAY;IAYZ,kBAAkB;IAoBlB,iBAAiB;IAsBjB,KAAK;IA2BL,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAanC,QAAQ;CAQf"}
@@ -28,6 +28,7 @@ export class P2PNetworkTest {
28
28
  numberOfNodes;
29
29
  metricsPort;
30
30
  snapshotManager;
31
+ baseAccountPrivateKey;
31
32
  baseAccount;
32
33
  logger;
33
34
  monitor;
@@ -62,7 +63,8 @@ export class P2PNetworkTest {
62
63
  this.gasUtils = undefined;
63
64
  this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
64
65
  // Set up the base account and node private keys for the initial network deployment
65
- this.baseAccount = privateKeyToAccount(`0x${getPrivateKeyFromIndex(0).toString('hex')}`);
66
+ this.baseAccountPrivateKey = `0x${getPrivateKeyFromIndex(0).toString('hex')}`;
67
+ this.baseAccount = privateKeyToAccount(this.baseAccountPrivateKey);
66
68
  this.proposerPrivateKeys = generatePrivateKeys(PROPOSER_PRIVATE_KEYS_START_INDEX, numberOfNodes);
67
69
  this.attesterPrivateKeys = generatePrivateKeys(ATTESTER_PRIVATE_KEYS_START_INDEX, numberOfNodes);
68
70
  this.attesterPublicKeys = this.attesterPrivateKeys.map((privateKey)=>privateKeyToAccount(privateKey).address);
@@ -121,13 +123,39 @@ export class P2PNetworkTest {
121
123
  this.logger.info(`Timestamp: ${timestamp.timestamp}`);
122
124
  dateProvider.setTime(Number(timestamp.timestamp) * 1000);
123
125
  }
124
- async applyBaseSnapshots() {
126
+ async addBootstrapNode() {
125
127
  await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig })=>{
126
128
  const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
127
129
  this.bootstrapNode = await createBootstrapNodeFromPrivateKey(BOOTSTRAP_NODE_PRIVATE_KEY, this.bootNodePort, telemetry, aztecNodeConfig);
128
130
  // Overwrite enr with updated info
129
131
  this.bootstrapNodeEnr = this.bootstrapNode.getENR().encodeTxt();
130
132
  });
133
+ }
134
+ getValidators() {
135
+ const validators = [];
136
+ const proposerEOAs = [];
137
+ for(let i = 0; i < this.numberOfNodes; i++){
138
+ const attester = privateKeyToAccount(this.attesterPrivateKeys[i]);
139
+ const proposerEOA = privateKeyToAccount(this.proposerPrivateKeys[i]);
140
+ proposerEOAs.push(proposerEOA.address);
141
+ const forwarder = getExpectedAddress(ForwarderAbi, ForwarderBytecode, [
142
+ proposerEOA.address
143
+ ], proposerEOA.address).address;
144
+ validators.push({
145
+ attester: attester.address,
146
+ proposer: forwarder,
147
+ withdrawer: attester.address,
148
+ amount: l1ContractsConfig.minimumStake
149
+ });
150
+ this.logger.info(`Adding attester ${attester.address} proposer ${forwarder} as validator`);
151
+ }
152
+ return {
153
+ validators,
154
+ proposerEOAs
155
+ };
156
+ }
157
+ async applyBaseSnapshots() {
158
+ await this.addBootstrapNode();
131
159
  await this.snapshotManager.snapshot('add-validators', async ({ deployL1ContractsValues, aztecNodeConfig, dateProvider })=>{
132
160
  const rollup = getContract({
133
161
  address: deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(),
@@ -153,25 +181,11 @@ export class P2PNetworkTest {
153
181
  ].map((txHash)=>deployL1ContractsValues.publicClient.waitForTransactionReceipt({
154
182
  hash: txHash
155
183
  })));
156
- const validators = [];
157
- for(let i = 0; i < this.numberOfNodes; i++){
158
- const attester = privateKeyToAccount(this.attesterPrivateKeys[i]);
159
- const proposerEOA = privateKeyToAccount(this.proposerPrivateKeys[i]);
160
- const forwarder = getExpectedAddress(ForwarderAbi, ForwarderBytecode, [
161
- proposerEOA.address
162
- ], proposerEOA.address).address;
163
- validators.push({
164
- attester: attester.address,
165
- proposer: forwarder,
166
- withdrawer: attester.address,
167
- amount: l1ContractsConfig.minimumStake
168
- });
169
- this.logger.info(`Adding attester ${attester.address} proposer ${forwarder} as validator`);
170
- }
184
+ const { validators } = this.getValidators();
171
185
  this.validators = validators;
172
186
  await deployL1ContractsValues.publicClient.waitForTransactionReceipt({
173
187
  hash: await rollup.write.cheat__InitialiseValidatorSet([
174
- validators
188
+ this.validators
175
189
  ])
176
190
  });
177
191
  const slotsInEpoch = await rollup.read.getEpochDuration();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.84.0-nightly.20250415",
3
+ "version": "0.85.0",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -26,37 +26,38 @@
26
26
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
27
27
  },
28
28
  "dependencies": {
29
- "@aztec/accounts": "0.84.0-nightly.20250415",
30
- "@aztec/archiver": "0.84.0-nightly.20250415",
31
- "@aztec/aztec": "0.84.0-nightly.20250415",
32
- "@aztec/aztec-node": "0.84.0-nightly.20250415",
33
- "@aztec/aztec.js": "0.84.0-nightly.20250415",
34
- "@aztec/bb-prover": "0.84.0-nightly.20250415",
35
- "@aztec/blob-lib": "0.84.0-nightly.20250415",
36
- "@aztec/blob-sink": "0.84.0-nightly.20250415",
37
- "@aztec/bot": "0.84.0-nightly.20250415",
38
- "@aztec/constants": "0.84.0-nightly.20250415",
39
- "@aztec/entrypoints": "0.84.0-nightly.20250415",
40
- "@aztec/epoch-cache": "0.84.0-nightly.20250415",
41
- "@aztec/ethereum": "0.84.0-nightly.20250415",
42
- "@aztec/foundation": "0.84.0-nightly.20250415",
43
- "@aztec/kv-store": "0.84.0-nightly.20250415",
44
- "@aztec/l1-artifacts": "0.84.0-nightly.20250415",
45
- "@aztec/merkle-tree": "0.84.0-nightly.20250415",
46
- "@aztec/noir-contracts.js": "0.84.0-nightly.20250415",
47
- "@aztec/noir-noirc_abi": "0.84.0-nightly.20250415",
48
- "@aztec/noir-protocol-circuits-types": "0.84.0-nightly.20250415",
49
- "@aztec/p2p": "0.84.0-nightly.20250415",
50
- "@aztec/protocol-contracts": "0.84.0-nightly.20250415",
51
- "@aztec/prover-client": "0.84.0-nightly.20250415",
52
- "@aztec/prover-node": "0.84.0-nightly.20250415",
53
- "@aztec/pxe": "0.84.0-nightly.20250415",
54
- "@aztec/sequencer-client": "0.84.0-nightly.20250415",
55
- "@aztec/simulator": "0.84.0-nightly.20250415",
56
- "@aztec/stdlib": "0.84.0-nightly.20250415",
57
- "@aztec/telemetry-client": "0.84.0-nightly.20250415",
58
- "@aztec/validator-client": "0.84.0-nightly.20250415",
59
- "@aztec/world-state": "0.84.0-nightly.20250415",
29
+ "@aztec/accounts": "0.85.0",
30
+ "@aztec/archiver": "0.85.0",
31
+ "@aztec/aztec": "0.85.0",
32
+ "@aztec/aztec-node": "0.85.0",
33
+ "@aztec/aztec.js": "0.85.0",
34
+ "@aztec/bb-prover": "0.85.0",
35
+ "@aztec/blob-lib": "0.85.0",
36
+ "@aztec/blob-sink": "0.85.0",
37
+ "@aztec/bot": "0.85.0",
38
+ "@aztec/cli": "0.85.0",
39
+ "@aztec/constants": "0.85.0",
40
+ "@aztec/entrypoints": "0.85.0",
41
+ "@aztec/epoch-cache": "0.85.0",
42
+ "@aztec/ethereum": "0.85.0",
43
+ "@aztec/foundation": "0.85.0",
44
+ "@aztec/kv-store": "0.85.0",
45
+ "@aztec/l1-artifacts": "0.85.0",
46
+ "@aztec/merkle-tree": "0.85.0",
47
+ "@aztec/noir-contracts.js": "0.85.0",
48
+ "@aztec/noir-noirc_abi": "0.85.0",
49
+ "@aztec/noir-protocol-circuits-types": "0.85.0",
50
+ "@aztec/p2p": "0.85.0",
51
+ "@aztec/protocol-contracts": "0.85.0",
52
+ "@aztec/prover-client": "0.85.0",
53
+ "@aztec/prover-node": "0.85.0",
54
+ "@aztec/pxe": "0.85.0",
55
+ "@aztec/sequencer-client": "0.85.0",
56
+ "@aztec/simulator": "0.85.0",
57
+ "@aztec/stdlib": "0.85.0",
58
+ "@aztec/telemetry-client": "0.85.0",
59
+ "@aztec/validator-client": "0.85.0",
60
+ "@aztec/world-state": "0.85.0",
60
61
  "@iarna/toml": "^2.2.5",
61
62
  "@jest/globals": "^29.5.0",
62
63
  "@msgpack/msgpack": "^3.0.0-beta2",
@@ -44,7 +44,8 @@ export const SHORTENED_BLOCK_TIME_CONFIG = {
44
44
 
45
45
  export class P2PNetworkTest {
46
46
  private snapshotManager: ISnapshotManager;
47
- private baseAccount;
47
+ public baseAccountPrivateKey: `0x${string}`;
48
+ public baseAccount;
48
49
 
49
50
  public logger: Logger;
50
51
  public monitor!: ChainMonitor;
@@ -54,7 +55,8 @@ export class P2PNetworkTest {
54
55
  public attesterPublicKeys: string[] = [];
55
56
  public proposerPrivateKeys: `0x${string}`[] = [];
56
57
  public peerIdPrivateKeys: string[] = [];
57
- public validators: { attester: `0x${string}`; proposer: `0x${string}`; withdrawer: `0x${string}` }[] = [];
58
+ public validators: { attester: `0x${string}`; proposer: `0x${string}`; withdrawer: `0x${string}`; amount: bigint }[] =
59
+ [];
58
60
 
59
61
  public deployedAccounts: InitialAccountData[] = [];
60
62
  public prefilledPublicData: PublicDataTreeLeaf[] = [];
@@ -80,7 +82,8 @@ export class P2PNetworkTest {
80
82
  this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
81
83
 
82
84
  // Set up the base account and node private keys for the initial network deployment
83
- this.baseAccount = privateKeyToAccount(`0x${getPrivateKeyFromIndex(0)!.toString('hex')}`);
85
+ this.baseAccountPrivateKey = `0x${getPrivateKeyFromIndex(0)!.toString('hex')}`;
86
+ this.baseAccount = privateKeyToAccount(this.baseAccountPrivateKey);
84
87
  this.proposerPrivateKeys = generatePrivateKeys(PROPOSER_PRIVATE_KEYS_START_INDEX, numberOfNodes);
85
88
  this.attesterPrivateKeys = generatePrivateKeys(ATTESTER_PRIVATE_KEYS_START_INDEX, numberOfNodes);
86
89
  this.attesterPublicKeys = this.attesterPrivateKeys.map(privateKey => privateKeyToAccount(privateKey).address);
@@ -170,7 +173,7 @@ export class P2PNetworkTest {
170
173
  dateProvider.setTime(Number(timestamp.timestamp) * 1000);
171
174
  }
172
175
 
173
- async applyBaseSnapshots() {
176
+ async addBootstrapNode() {
174
177
  await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig }) => {
175
178
  const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
176
179
  this.bootstrapNode = await createBootstrapNodeFromPrivateKey(
@@ -182,6 +185,36 @@ export class P2PNetworkTest {
182
185
  // Overwrite enr with updated info
183
186
  this.bootstrapNodeEnr = this.bootstrapNode.getENR().encodeTxt();
184
187
  });
188
+ }
189
+
190
+ getValidators() {
191
+ const validators = [];
192
+ const proposerEOAs = [];
193
+
194
+ for (let i = 0; i < this.numberOfNodes; i++) {
195
+ const attester = privateKeyToAccount(this.attesterPrivateKeys[i]!);
196
+ const proposerEOA = privateKeyToAccount(this.proposerPrivateKeys[i]!);
197
+ proposerEOAs.push(proposerEOA.address);
198
+ const forwarder = getExpectedAddress(
199
+ ForwarderAbi,
200
+ ForwarderBytecode,
201
+ [proposerEOA.address],
202
+ proposerEOA.address,
203
+ ).address;
204
+ validators.push({
205
+ attester: attester.address,
206
+ proposer: forwarder,
207
+ withdrawer: attester.address,
208
+ amount: l1ContractsConfig.minimumStake,
209
+ } as const);
210
+
211
+ this.logger.info(`Adding attester ${attester.address} proposer ${forwarder} as validator`);
212
+ }
213
+ return { validators, proposerEOAs };
214
+ }
215
+
216
+ async applyBaseSnapshots() {
217
+ await this.addBootstrapNode();
185
218
 
186
219
  await this.snapshotManager.snapshot(
187
220
  'add-validators',
@@ -214,30 +247,10 @@ export class P2PNetworkTest {
214
247
  ].map(txHash => deployL1ContractsValues.publicClient.waitForTransactionReceipt({ hash: txHash })),
215
248
  );
216
249
 
217
- const validators = [];
218
-
219
- for (let i = 0; i < this.numberOfNodes; i++) {
220
- const attester = privateKeyToAccount(this.attesterPrivateKeys[i]!);
221
- const proposerEOA = privateKeyToAccount(this.proposerPrivateKeys[i]!);
222
- const forwarder = getExpectedAddress(
223
- ForwarderAbi,
224
- ForwarderBytecode,
225
- [proposerEOA.address],
226
- proposerEOA.address,
227
- ).address;
228
- validators.push({
229
- attester: attester.address,
230
- proposer: forwarder,
231
- withdrawer: attester.address,
232
- amount: l1ContractsConfig.minimumStake,
233
- } as const);
234
-
235
- this.logger.info(`Adding attester ${attester.address} proposer ${forwarder} as validator`);
236
- }
237
-
250
+ const { validators } = this.getValidators();
238
251
  this.validators = validators;
239
252
  await deployL1ContractsValues.publicClient.waitForTransactionReceipt({
240
- hash: await rollup.write.cheat__InitialiseValidatorSet([validators]),
253
+ hash: await rollup.write.cheat__InitialiseValidatorSet([this.validators]),
241
254
  });
242
255
 
243
256
  const slotsInEpoch = await rollup.read.getEpochDuration();