@aztec/end-to-end 0.86.0-nightly.20250513 → 0.86.0-starknet.1

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.
@@ -7,10 +7,13 @@ import { ProverNode } from '@aztec/prover-node';
7
7
  import type { L2BlockNumber } from '@aztec/stdlib/block';
8
8
  import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
9
9
  import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
10
+ export declare const L1_BLOCK_TIME_IN_S: number;
11
+ export declare const L2_SLOT_DURATION_IN_L1_SLOTS = 2;
12
+ export declare const L2_SLOT_DURATION_IN_S: number;
10
13
  export declare const WORLD_STATE_BLOCK_HISTORY = 2;
11
14
  export declare const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
12
15
  export declare const ARCHIVER_POLL_INTERVAL = 50;
13
- export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | 'aztecProofSubmissionWindow' | 'aztecEpochDuration' | 'proverTestDelayMs' | 'l1PublishRetryIntervalMS' | 'txPropagationMaxQueryAttempts' | 'proverNodeConfig' | 'ethereumSlotDuration' | 'aztecSlotDuration'>>;
16
+ export type EpochsTestOpts = Partial<Pick<SetupOptions, 'startProverNode' | 'aztecProofSubmissionWindow' | 'aztecEpochDuration' | 'proverTestDelayMs' | 'l1PublishRetryIntervalMS' | 'txPropagationMaxQueryAttempts' | 'proverNodeConfig'>>;
14
17
  /**
15
18
  * Tests building of epochs using fast block times and short epochs.
16
19
  * Spawns an aztec node and a prover node with fake proofs.
@@ -28,15 +31,7 @@ export declare class EpochsTestContext {
28
31
  proverNodes: ProverNode[];
29
32
  nodes: AztecNodeService[];
30
33
  epochDuration: number;
31
- L1_BLOCK_TIME_IN_S: number;
32
- L2_SLOT_DURATION_IN_S: number;
33
34
  static setup(opts?: EpochsTestOpts): Promise<EpochsTestContext>;
34
- static getSlotDurations(opts?: EpochsTestOpts): {
35
- ethereumSlotDuration: number;
36
- aztecSlotDuration: number;
37
- aztecEpochDuration: number;
38
- aztecProofSubmissionWindow: number;
39
- };
40
35
  setup(opts?: EpochsTestOpts): Promise<void>;
41
36
  teardown(): Promise<void>;
42
37
  createProverNode(): Promise<ProverNode>;
@@ -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,EAAE,KAAK,iBAAiB,EAAuC,MAAM,6BAA6B,CAAC;AAK1G,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EAIlB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,gCAAgC,KAAK,CAAC;AACnD,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,IAAI,CACF,YAAY,EACV,iBAAiB,GACjB,4BAA4B,GAC5B,oBAAoB,GACpB,mBAAmB,GACnB,0BAA0B,GAC1B,+BAA+B,GAC/B,kBAAkB,GAClB,sBAAsB,GACtB,mBAAmB,CACtB,CACF,CAAC;AAEF;;;;GAIG;AACH,qBAAa,iBAAiB;IACrB,OAAO,EAAG,eAAe,CAAC;IAC1B,QAAQ,EAAG,UAAU,CAAC;IACtB,MAAM,E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AMtC,KAAK,CAAC,IAAI,GAAE,cAAmB;IAoE/B,QAAQ;IAOR,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"}
@@ -7,6 +7,10 @@ import { withLogNameSuffix } from '@aztec/foundation/log';
7
7
  import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
8
8
  import { join } from 'path';
9
9
  import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
10
+ // This can be lowered to as much as 2s in non-CI
11
+ export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
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;
10
14
  export const WORLD_STATE_BLOCK_HISTORY = 2;
11
15
  export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
12
16
  export const ARCHIVER_POLL_INTERVAL = 50;
@@ -26,32 +30,16 @@ export const ARCHIVER_POLL_INTERVAL = 50;
26
30
  proverNodes = [];
27
31
  nodes = [];
28
32
  epochDuration;
29
- L1_BLOCK_TIME_IN_S;
30
- L2_SLOT_DURATION_IN_S;
31
33
  static async setup(opts = {}) {
32
34
  const test = new EpochsTestContext();
33
35
  await test.setup(opts);
34
36
  return test;
35
37
  }
36
- static getSlotDurations(opts = {}) {
37
- const envEthereumSlotDuration = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
38
- const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
39
- const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
40
- const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
41
- const aztecProofSubmissionWindow = opts.aztecProofSubmissionWindow ?? aztecEpochDuration * 2 - 1;
42
- return {
43
- ethereumSlotDuration,
44
- aztecSlotDuration,
45
- aztecEpochDuration,
46
- aztecProofSubmissionWindow
47
- };
48
- }
49
38
  async setup(opts = {}) {
50
- const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionWindow } = EpochsTestContext.getSlotDurations(opts);
51
- this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
52
- this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
53
39
  // Set up system without any account nor protocol contracts
54
40
  // and with faster block times and shorter epochs.
41
+ const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
42
+ const proofSubmissionWindow = opts.aztecProofSubmissionWindow ?? aztecEpochDuration * 2 - 1;
55
43
  const context = await setup(0, {
56
44
  checkIntervalMs: 50,
57
45
  archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
@@ -59,9 +47,9 @@ export const ARCHIVER_POLL_INTERVAL = 50;
59
47
  skipProtocolContracts: true,
60
48
  salt: 1,
61
49
  aztecEpochDuration,
62
- aztecSlotDuration,
63
- ethereumSlotDuration,
64
- aztecProofSubmissionWindow,
50
+ aztecSlotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
51
+ ethereumSlotDuration: L1_BLOCK_TIME_IN_S,
52
+ aztecProofSubmissionWindow: proofSubmissionWindow,
65
53
  minTxsPerBlock: 0,
66
54
  realProofs: false,
67
55
  startProverNode: true,
@@ -71,7 +59,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
71
59
  proverId: Fr.fromString('1'),
72
60
  // This must be enough so that the tx from the prover is delayed properly,
73
61
  // but not so much to hang the sequencer and timeout the teardown
74
- txPropagationMaxQueryAttempts: opts.txPropagationMaxQueryAttempts ?? 12,
62
+ txPropagationMaxQueryAttempts: 12,
75
63
  worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
76
64
  ...opts
77
65
  });
@@ -98,11 +86,11 @@ export const ARCHIVER_POLL_INTERVAL = 50;
98
86
  this.epochDuration = aztecEpochDuration;
99
87
  this.constants = {
100
88
  epochDuration: aztecEpochDuration,
101
- slotDuration: aztecSlotDuration,
89
+ slotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
102
90
  l1StartBlock: await this.rollup.getL1StartBlock(),
103
91
  l1GenesisTime: await this.rollup.getL1GenesisTime(),
104
- ethereumSlotDuration,
105
- proofSubmissionWindow: aztecProofSubmissionWindow
92
+ ethereumSlotDuration: L1_BLOCK_TIME_IN_S,
93
+ proofSubmissionWindow
106
94
  };
107
95
  this.logger.info(`L2 genesis at L1 block ${this.constants.l1StartBlock} (timestamp ${this.constants.l1GenesisTime})`);
108
96
  }
@@ -143,7 +131,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
143
131
  /** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */ async waitUntilEpochStarts(epoch) {
144
132
  const [start] = getTimestampRangeForEpoch(BigInt(epoch), this.constants);
145
133
  this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
146
- await waitUntilL1Timestamp(this.l1Client, start - BigInt(this.L1_BLOCK_TIME_IN_S));
134
+ await waitUntilL1Timestamp(this.l1Client, start - BigInt(L1_BLOCK_TIME_IN_S));
147
135
  return start;
148
136
  }
149
137
  /** Waits until the given L2 block number is mined. */ async wa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;IA0BP,kBAAkB;IAuDlB,YAAY;IAYZ,kBAAkB;IAoBlB,iBAAiB;IAgBjB,WAAW;;;;YAIH,YAAY;IAQpB,KAAK;IAaL,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAanC,QAAQ;CAKf"}
@@ -1,5 +1,5 @@
1
1
  import { getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
2
- import { L1TxUtils, RollupContract, deployL1Contract, getExpectedAddress, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum';
2
+ import { L1TxUtils, RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
3
3
  import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
4
4
  import { createLogger } from '@aztec/foundation/log';
5
5
  import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
@@ -139,19 +139,14 @@ export class P2PNetworkTest {
139
139
  abi: TestERC20Abi,
140
140
  client: deployL1ContractsValues.l1Client
141
141
  });
142
- const { address: multiAdderAddress } = await deployL1Contract(deployL1ContractsValues.l1Client, l1Artifacts.multiAdder.contractAbi, l1Artifacts.multiAdder.contractBytecode, [
143
- rollup.address,
144
- deployL1ContractsValues.l1Client.account.address
145
- ]);
146
- const multiAdder = getContract({
147
- address: multiAdderAddress.toString(),
148
- abi: l1Artifacts.multiAdder.contractAbi,
149
- client: deployL1ContractsValues.l1Client
150
- });
151
142
  const stakeNeeded = l1ContractsConfig.minimumStake * BigInt(this.numberOfNodes);
152
143
  await Promise.all([
153
144
  await stakingAsset.write.mint([
154
- multiAdder.address,
145
+ deployL1ContractsValues.l1Client.account.address,
146
+ stakeNeeded
147
+ ], {}),
148
+ await stakingAsset.write.approve([
149
+ deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(),
155
150
  stakeNeeded
156
151
  ], {})
157
152
  ].map((txHash)=>deployL1ContractsValues.l1Client.waitForTransactionReceipt({
@@ -160,7 +155,7 @@ export class P2PNetworkTest {
160
155
  const { validators } = this.getValidators();
161
156
  this.validators = validators;
162
157
  await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
163
- hash: await multiAdder.write.addValidators([
158
+ hash: await rollup.write.cheat__InitialiseValidatorSet([
164
159
  this.validators
165
160
  ])
166
161
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.86.0-nightly.20250513",
3
+ "version": "0.86.0-starknet.1",
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.20250513",
29
- "@aztec/archiver": "0.86.0-nightly.20250513",
30
- "@aztec/aztec": "0.86.0-nightly.20250513",
31
- "@aztec/aztec-node": "0.86.0-nightly.20250513",
32
- "@aztec/aztec.js": "0.86.0-nightly.20250513",
33
- "@aztec/bb-prover": "0.86.0-nightly.20250513",
34
- "@aztec/blob-lib": "0.86.0-nightly.20250513",
35
- "@aztec/blob-sink": "0.86.0-nightly.20250513",
36
- "@aztec/bot": "0.86.0-nightly.20250513",
37
- "@aztec/cli": "0.86.0-nightly.20250513",
38
- "@aztec/constants": "0.86.0-nightly.20250513",
39
- "@aztec/entrypoints": "0.86.0-nightly.20250513",
40
- "@aztec/epoch-cache": "0.86.0-nightly.20250513",
41
- "@aztec/ethereum": "0.86.0-nightly.20250513",
42
- "@aztec/foundation": "0.86.0-nightly.20250513",
43
- "@aztec/kv-store": "0.86.0-nightly.20250513",
44
- "@aztec/l1-artifacts": "0.86.0-nightly.20250513",
45
- "@aztec/merkle-tree": "0.86.0-nightly.20250513",
46
- "@aztec/noir-contracts.js": "0.86.0-nightly.20250513",
47
- "@aztec/noir-noirc_abi": "0.86.0-nightly.20250513",
48
- "@aztec/noir-protocol-circuits-types": "0.86.0-nightly.20250513",
49
- "@aztec/noir-test-contracts.js": "0.86.0-nightly.20250513",
50
- "@aztec/p2p": "0.86.0-nightly.20250513",
51
- "@aztec/protocol-contracts": "0.86.0-nightly.20250513",
52
- "@aztec/prover-client": "0.86.0-nightly.20250513",
53
- "@aztec/prover-node": "0.86.0-nightly.20250513",
54
- "@aztec/pxe": "0.86.0-nightly.20250513",
55
- "@aztec/sequencer-client": "0.86.0-nightly.20250513",
56
- "@aztec/simulator": "0.86.0-nightly.20250513",
57
- "@aztec/stdlib": "0.86.0-nightly.20250513",
58
- "@aztec/telemetry-client": "0.86.0-nightly.20250513",
59
- "@aztec/validator-client": "0.86.0-nightly.20250513",
60
- "@aztec/world-state": "0.86.0-nightly.20250513",
28
+ "@aztec/accounts": "0.86.0-starknet.1",
29
+ "@aztec/archiver": "0.86.0-starknet.1",
30
+ "@aztec/aztec": "0.86.0-starknet.1",
31
+ "@aztec/aztec-node": "0.86.0-starknet.1",
32
+ "@aztec/aztec.js": "0.86.0-starknet.1",
33
+ "@aztec/bb-prover": "0.86.0-starknet.1",
34
+ "@aztec/blob-lib": "0.86.0-starknet.1",
35
+ "@aztec/blob-sink": "0.86.0-starknet.1",
36
+ "@aztec/bot": "0.86.0-starknet.1",
37
+ "@aztec/cli": "0.86.0-starknet.1",
38
+ "@aztec/constants": "0.86.0-starknet.1",
39
+ "@aztec/entrypoints": "0.86.0-starknet.1",
40
+ "@aztec/epoch-cache": "0.86.0-starknet.1",
41
+ "@aztec/ethereum": "0.86.0-starknet.1",
42
+ "@aztec/foundation": "0.86.0-starknet.1",
43
+ "@aztec/kv-store": "0.86.0-starknet.1",
44
+ "@aztec/l1-artifacts": "0.86.0-starknet.1",
45
+ "@aztec/merkle-tree": "0.86.0-starknet.1",
46
+ "@aztec/noir-contracts.js": "0.86.0-starknet.1",
47
+ "@aztec/noir-noirc_abi": "0.86.0-starknet.1",
48
+ "@aztec/noir-protocol-circuits-types": "0.86.0-starknet.1",
49
+ "@aztec/noir-test-contracts.js": "0.86.0-starknet.1",
50
+ "@aztec/p2p": "0.86.0-starknet.1",
51
+ "@aztec/protocol-contracts": "0.86.0-starknet.1",
52
+ "@aztec/prover-client": "0.86.0-starknet.1",
53
+ "@aztec/prover-node": "0.86.0-starknet.1",
54
+ "@aztec/pxe": "0.86.0-starknet.1",
55
+ "@aztec/sequencer-client": "0.86.0-starknet.1",
56
+ "@aztec/simulator": "0.86.0-starknet.1",
57
+ "@aztec/stdlib": "0.86.0-starknet.1",
58
+ "@aztec/telemetry-client": "0.86.0-starknet.1",
59
+ "@aztec/validator-client": "0.86.0-starknet.1",
60
+ "@aztec/world-state": "0.86.0-starknet.1",
61
61
  "@iarna/toml": "^2.2.5",
62
62
  "@jest/globals": "^29.5.0",
63
63
  "@noble/curves": "^1.0.0",
@@ -23,6 +23,11 @@ import {
23
23
  setup,
24
24
  } from '../fixtures/utils.js';
25
25
 
26
+ // This can be lowered to as much as 2s in non-CI
27
+ export const L1_BLOCK_TIME_IN_S = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
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
+
26
31
  export const WORLD_STATE_BLOCK_HISTORY = 2;
27
32
  export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
28
33
  export const ARCHIVER_POLL_INTERVAL = 50;
@@ -37,8 +42,6 @@ export type EpochsTestOpts = Partial<
37
42
  | 'l1PublishRetryIntervalMS'
38
43
  | 'txPropagationMaxQueryAttempts'
39
44
  | 'proverNodeConfig'
40
- | 'ethereumSlotDuration'
41
- | 'aztecSlotDuration'
42
45
  >
43
46
  >;
44
47
 
@@ -62,33 +65,17 @@ export class EpochsTestContext {
62
65
 
63
66
  public epochDuration!: number;
64
67
 
65
- public L1_BLOCK_TIME_IN_S!: number;
66
- public L2_SLOT_DURATION_IN_S!: number;
67
-
68
68
  public static async setup(opts: EpochsTestOpts = {}) {
69
69
  const test = new EpochsTestContext();
70
70
  await test.setup(opts);
71
71
  return test;
72
72
  }
73
73
 
74
- public static getSlotDurations(opts: EpochsTestOpts = {}) {
75
- const envEthereumSlotDuration = process.env.L1_BLOCK_TIME ? parseInt(process.env.L1_BLOCK_TIME) : 8;
76
- const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
77
- const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
78
- const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
79
- const aztecProofSubmissionWindow = opts.aztecProofSubmissionWindow ?? aztecEpochDuration * 2 - 1;
80
- return { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionWindow };
81
- }
82
-
83
74
  public async setup(opts: EpochsTestOpts = {}) {
84
- const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionWindow } =
85
- EpochsTestContext.getSlotDurations(opts);
86
-
87
- this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
88
- this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
89
-
90
75
  // Set up system without any account nor protocol contracts
91
76
  // and with faster block times and shorter epochs.
77
+ const aztecEpochDuration = opts.aztecEpochDuration ?? 4;
78
+ const proofSubmissionWindow = opts.aztecProofSubmissionWindow ?? aztecEpochDuration * 2 - 1;
92
79
  const context = await setup(0, {
93
80
  checkIntervalMs: 50,
94
81
  archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
@@ -96,9 +83,9 @@ export class EpochsTestContext {
96
83
  skipProtocolContracts: true,
97
84
  salt: 1,
98
85
  aztecEpochDuration,
99
- aztecSlotDuration,
100
- ethereumSlotDuration,
101
- aztecProofSubmissionWindow,
86
+ aztecSlotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
87
+ ethereumSlotDuration: L1_BLOCK_TIME_IN_S,
88
+ aztecProofSubmissionWindow: proofSubmissionWindow,
102
89
  minTxsPerBlock: 0,
103
90
  realProofs: false,
104
91
  startProverNode: true,
@@ -108,7 +95,7 @@ export class EpochsTestContext {
108
95
  proverId: Fr.fromString('1'),
109
96
  // This must be enough so that the tx from the prover is delayed properly,
110
97
  // but not so much to hang the sequencer and timeout the teardown
111
- txPropagationMaxQueryAttempts: opts.txPropagationMaxQueryAttempts ?? 12,
98
+ txPropagationMaxQueryAttempts: 12,
112
99
  worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
113
100
  ...opts,
114
101
  });
@@ -140,11 +127,11 @@ export class EpochsTestContext {
140
127
  this.epochDuration = aztecEpochDuration;
141
128
  this.constants = {
142
129
  epochDuration: aztecEpochDuration,
143
- slotDuration: aztecSlotDuration,
130
+ slotDuration: L1_BLOCK_TIME_IN_S * L2_SLOT_DURATION_IN_L1_SLOTS,
144
131
  l1StartBlock: await this.rollup.getL1StartBlock(),
145
132
  l1GenesisTime: await this.rollup.getL1GenesisTime(),
146
- ethereumSlotDuration,
147
- proofSubmissionWindow: aztecProofSubmissionWindow,
133
+ ethereumSlotDuration: L1_BLOCK_TIME_IN_S,
134
+ proofSubmissionWindow,
148
135
  };
149
136
 
150
137
  this.logger.info(
@@ -198,7 +185,7 @@ export class EpochsTestContext {
198
185
  public async waitUntilEpochStarts(epoch: number) {
199
186
  const [start] = getTimestampRangeForEpoch(BigInt(epoch), this.constants);
200
187
  this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
201
- await waitUntilL1Timestamp(this.l1Client, start - BigInt(this.L1_BLOCK_TIME_IN_S));
188
+ await waitUntilL1Timestamp(this.l1Client, start - BigInt(L1_BLOCK_TIME_IN_S));
202
189
  return start;
203
190
  }
204
191
 
@@ -6,10 +6,8 @@ import {
6
6
  type ExtendedViemWalletClient,
7
7
  L1TxUtils,
8
8
  RollupContract,
9
- deployL1Contract,
10
9
  getExpectedAddress,
11
10
  getL1ContractsConfigEnvVars,
12
- l1Artifacts,
13
11
  } from '@aztec/ethereum';
14
12
  import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
15
13
  import { type Logger, createLogger } from '@aztec/foundation/log';
@@ -209,31 +207,21 @@ export class P2PNetworkTest {
209
207
  client: deployL1ContractsValues.l1Client,
210
208
  });
211
209
 
212
- const { address: multiAdderAddress } = await deployL1Contract(
213
- deployL1ContractsValues.l1Client,
214
- l1Artifacts.multiAdder.contractAbi,
215
- l1Artifacts.multiAdder.contractBytecode,
216
- [rollup.address, deployL1ContractsValues.l1Client.account.address],
217
- );
218
-
219
- const multiAdder = getContract({
220
- address: multiAdderAddress.toString(),
221
- abi: l1Artifacts.multiAdder.contractAbi,
222
- client: deployL1ContractsValues.l1Client,
223
- });
224
-
225
210
  const stakeNeeded = l1ContractsConfig.minimumStake * BigInt(this.numberOfNodes);
226
211
  await Promise.all(
227
- [await stakingAsset.write.mint([multiAdder.address, stakeNeeded], {} as any)].map(txHash =>
228
- deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash: txHash }),
229
- ),
212
+ [
213
+ await stakingAsset.write.mint([deployL1ContractsValues.l1Client.account.address, stakeNeeded], {} as any),
214
+ await stakingAsset.write.approve(
215
+ [deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(), stakeNeeded],
216
+ {} as any,
217
+ ),
218
+ ].map(txHash => deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash: txHash })),
230
219
  );
231
220
 
232
221
  const { validators } = this.getValidators();
233
222
  this.validators = validators;
234
-
235
223
  await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
236
- hash: await multiAdder.write.addValidators([this.validators]),
224
+ hash: await rollup.write.cheat__InitialiseValidatorSet([this.validators]),
237
225
  });
238
226
 
239
227
  const slotsInEpoch = await rollup.read.getEpochDuration();