@aztec/end-to-end 0.0.1-commit.5476d83 → 0.0.1-commit.6230efd

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.
Files changed (98) hide show
  1. package/dest/bench/client_flows/client_flows_benchmark.d.ts +3 -3
  2. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/client_flows_benchmark.js +5 -3
  4. package/dest/bench/utils.d.ts +2 -2
  5. package/dest/bench/utils.d.ts.map +1 -1
  6. package/dest/bench/utils.js +10 -6
  7. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +5 -4
  8. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  9. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +2 -1
  10. package/dest/e2e_epochs/epochs_test.d.ts +11 -9
  11. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  12. package/dest/e2e_epochs/epochs_test.js +13 -11
  13. package/dest/e2e_fees/bridging_race.notest.js +1 -1
  14. package/dest/e2e_fees/fees_test.d.ts +8 -4
  15. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  16. package/dest/e2e_fees/fees_test.js +4 -1
  17. package/dest/e2e_multi_validator/utils.js +1 -1
  18. package/dest/e2e_p2p/inactivity_slash_test.d.ts +2 -2
  19. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  20. package/dest/e2e_p2p/inactivity_slash_test.js +3 -6
  21. package/dest/e2e_p2p/p2p_network.d.ts +7 -6
  22. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  23. package/dest/e2e_p2p/p2p_network.js +10 -8
  24. package/dest/e2e_p2p/shared.d.ts +2 -2
  25. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  26. package/dest/fixtures/e2e_prover_test.d.ts +3 -5
  27. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  28. package/dest/fixtures/e2e_prover_test.js +6 -9
  29. package/dest/fixtures/fixtures.d.ts +2 -3
  30. package/dest/fixtures/fixtures.d.ts.map +1 -1
  31. package/dest/fixtures/fixtures.js +2 -3
  32. package/dest/fixtures/get_acvm_config.js +1 -1
  33. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  34. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  35. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  36. package/dest/fixtures/setup_p2p_test.js +3 -3
  37. package/dest/fixtures/snapshot_manager.d.ts +6 -8
  38. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  39. package/dest/fixtures/snapshot_manager.js +34 -46
  40. package/dest/fixtures/utils.d.ts +20 -463
  41. package/dest/fixtures/utils.d.ts.map +1 -1
  42. package/dest/fixtures/utils.js +50 -78
  43. package/dest/fixtures/web3signer.js +1 -1
  44. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  45. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  46. package/dest/fixtures/with_telemetry_utils.js +2 -2
  47. package/dest/shared/cross_chain_test_harness.d.ts +5 -3
  48. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  49. package/dest/shared/cross_chain_test_harness.js +1 -1
  50. package/dest/shared/gas_portal_test_harness.d.ts +2 -2
  51. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  52. package/dest/shared/uniswap_l1_l2.d.ts +4 -3
  53. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  54. package/dest/shared/uniswap_l1_l2.js +4 -2
  55. package/dest/simulators/lending_simulator.d.ts +2 -2
  56. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  57. package/dest/simulators/lending_simulator.js +1 -1
  58. package/dest/spartan/setup_test_wallets.d.ts +1 -1
  59. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  60. package/dest/spartan/setup_test_wallets.js +2 -1
  61. package/dest/spartan/tx_metrics.d.ts +39 -0
  62. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  63. package/dest/spartan/tx_metrics.js +95 -0
  64. package/dest/spartan/utils.d.ts +43 -10
  65. package/dest/spartan/utils.d.ts.map +1 -1
  66. package/dest/spartan/utils.js +148 -38
  67. package/package.json +40 -40
  68. package/src/bench/client_flows/client_flows_benchmark.ts +7 -4
  69. package/src/bench/utils.ts +11 -7
  70. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +13 -9
  71. package/src/e2e_epochs/epochs_test.ts +33 -20
  72. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  73. package/src/e2e_fees/fees_test.ts +10 -4
  74. package/src/e2e_multi_validator/utils.ts +1 -1
  75. package/src/e2e_p2p/inactivity_slash_test.ts +4 -7
  76. package/src/e2e_p2p/p2p_network.ts +9 -16
  77. package/src/e2e_p2p/shared.ts +5 -1
  78. package/src/fixtures/e2e_prover_test.ts +8 -10
  79. package/src/fixtures/fixtures.ts +2 -5
  80. package/src/fixtures/get_acvm_config.ts +1 -1
  81. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  82. package/src/fixtures/setup_p2p_test.ts +3 -3
  83. package/src/fixtures/snapshot_manager.ts +51 -65
  84. package/src/fixtures/utils.ts +79 -138
  85. package/src/fixtures/web3signer.ts +1 -1
  86. package/src/fixtures/with_telemetry_utils.ts +2 -2
  87. package/src/shared/cross_chain_test_harness.ts +5 -2
  88. package/src/shared/gas_portal_test_harness.ts +1 -1
  89. package/src/shared/uniswap_l1_l2.ts +8 -10
  90. package/src/simulators/lending_simulator.ts +2 -2
  91. package/src/spartan/DEVELOP.md +7 -0
  92. package/src/spartan/setup_test_wallets.ts +2 -1
  93. package/src/spartan/tx_metrics.ts +130 -0
  94. package/src/spartan/utils.ts +207 -31
  95. package/dest/fixtures/setup_l1_contracts.d.ts +0 -477
  96. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  97. package/dest/fixtures/setup_l1_contracts.js +0 -17
  98. package/src/fixtures/setup_l1_contracts.ts +0 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.0.1-commit.5476d83",
3
+ "version": "0.0.1-commit.6230efd",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -8,8 +8,8 @@
8
8
  "./package.local.json"
9
9
  ],
10
10
  "scripts": {
11
- "build": "yarn clean && tsgo -b",
12
- "build:dev": "tsgo -b --watch",
11
+ "build": "yarn clean && ../scripts/tsc.sh",
12
+ "build:dev": "../scripts/tsc.sh --watch",
13
13
  "clean": "rm -rf ./dest .tsbuildinfo",
14
14
  "test:with-alerts": "./scripts/test-with-alerts.sh",
15
15
  "test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
@@ -25,43 +25,43 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.0.1-commit.5476d83",
29
- "@aztec/archiver": "0.0.1-commit.5476d83",
30
- "@aztec/aztec": "0.0.1-commit.5476d83",
31
- "@aztec/aztec-node": "0.0.1-commit.5476d83",
32
- "@aztec/aztec.js": "0.0.1-commit.5476d83",
33
- "@aztec/bb-prover": "0.0.1-commit.5476d83",
34
- "@aztec/bb.js": "0.0.1-commit.5476d83",
35
- "@aztec/blob-lib": "0.0.1-commit.5476d83",
36
- "@aztec/blob-sink": "0.0.1-commit.5476d83",
37
- "@aztec/bot": "0.0.1-commit.5476d83",
38
- "@aztec/cli": "0.0.1-commit.5476d83",
39
- "@aztec/constants": "0.0.1-commit.5476d83",
40
- "@aztec/entrypoints": "0.0.1-commit.5476d83",
41
- "@aztec/epoch-cache": "0.0.1-commit.5476d83",
42
- "@aztec/ethereum": "0.0.1-commit.5476d83",
43
- "@aztec/foundation": "0.0.1-commit.5476d83",
44
- "@aztec/kv-store": "0.0.1-commit.5476d83",
45
- "@aztec/l1-artifacts": "0.0.1-commit.5476d83",
46
- "@aztec/merkle-tree": "0.0.1-commit.5476d83",
47
- "@aztec/node-keystore": "0.0.1-commit.5476d83",
48
- "@aztec/noir-contracts.js": "0.0.1-commit.5476d83",
49
- "@aztec/noir-noirc_abi": "0.0.1-commit.5476d83",
50
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.5476d83",
51
- "@aztec/noir-test-contracts.js": "0.0.1-commit.5476d83",
52
- "@aztec/p2p": "0.0.1-commit.5476d83",
53
- "@aztec/protocol-contracts": "0.0.1-commit.5476d83",
54
- "@aztec/prover-client": "0.0.1-commit.5476d83",
55
- "@aztec/prover-node": "0.0.1-commit.5476d83",
56
- "@aztec/pxe": "0.0.1-commit.5476d83",
57
- "@aztec/sequencer-client": "0.0.1-commit.5476d83",
58
- "@aztec/simulator": "0.0.1-commit.5476d83",
59
- "@aztec/slasher": "0.0.1-commit.5476d83",
60
- "@aztec/stdlib": "0.0.1-commit.5476d83",
61
- "@aztec/telemetry-client": "0.0.1-commit.5476d83",
62
- "@aztec/test-wallet": "0.0.1-commit.5476d83",
63
- "@aztec/validator-client": "0.0.1-commit.5476d83",
64
- "@aztec/world-state": "0.0.1-commit.5476d83",
28
+ "@aztec/accounts": "0.0.1-commit.6230efd",
29
+ "@aztec/archiver": "0.0.1-commit.6230efd",
30
+ "@aztec/aztec": "0.0.1-commit.6230efd",
31
+ "@aztec/aztec-node": "0.0.1-commit.6230efd",
32
+ "@aztec/aztec.js": "0.0.1-commit.6230efd",
33
+ "@aztec/bb-prover": "0.0.1-commit.6230efd",
34
+ "@aztec/bb.js": "0.0.1-commit.6230efd",
35
+ "@aztec/blob-client": "0.0.1-commit.6230efd",
36
+ "@aztec/blob-lib": "0.0.1-commit.6230efd",
37
+ "@aztec/bot": "0.0.1-commit.6230efd",
38
+ "@aztec/cli": "0.0.1-commit.6230efd",
39
+ "@aztec/constants": "0.0.1-commit.6230efd",
40
+ "@aztec/entrypoints": "0.0.1-commit.6230efd",
41
+ "@aztec/epoch-cache": "0.0.1-commit.6230efd",
42
+ "@aztec/ethereum": "0.0.1-commit.6230efd",
43
+ "@aztec/foundation": "0.0.1-commit.6230efd",
44
+ "@aztec/kv-store": "0.0.1-commit.6230efd",
45
+ "@aztec/l1-artifacts": "0.0.1-commit.6230efd",
46
+ "@aztec/merkle-tree": "0.0.1-commit.6230efd",
47
+ "@aztec/node-keystore": "0.0.1-commit.6230efd",
48
+ "@aztec/noir-contracts.js": "0.0.1-commit.6230efd",
49
+ "@aztec/noir-noirc_abi": "0.0.1-commit.6230efd",
50
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.6230efd",
51
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.6230efd",
52
+ "@aztec/p2p": "0.0.1-commit.6230efd",
53
+ "@aztec/protocol-contracts": "0.0.1-commit.6230efd",
54
+ "@aztec/prover-client": "0.0.1-commit.6230efd",
55
+ "@aztec/prover-node": "0.0.1-commit.6230efd",
56
+ "@aztec/pxe": "0.0.1-commit.6230efd",
57
+ "@aztec/sequencer-client": "0.0.1-commit.6230efd",
58
+ "@aztec/simulator": "0.0.1-commit.6230efd",
59
+ "@aztec/slasher": "0.0.1-commit.6230efd",
60
+ "@aztec/stdlib": "0.0.1-commit.6230efd",
61
+ "@aztec/telemetry-client": "0.0.1-commit.6230efd",
62
+ "@aztec/test-wallet": "0.0.1-commit.6230efd",
63
+ "@aztec/validator-client": "0.0.1-commit.6230efd",
64
+ "@aztec/world-state": "0.0.1-commit.6230efd",
65
65
  "@iarna/toml": "^2.2.5",
66
66
  "@jest/globals": "^30.0.0",
67
67
  "@noble/curves": "=1.0.0",
@@ -5,11 +5,14 @@ import { type Logger, createLogger } from '@aztec/aztec.js/log';
5
5
  import type { AztecNode } from '@aztec/aztec.js/node';
6
6
  import type { Wallet } from '@aztec/aztec.js/wallet';
7
7
  import { CheatCodes } from '@aztec/aztec/testing';
8
- import { type DeployL1ContractsArgs, RollupContract, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
8
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
9
+ import { RollupContract } from '@aztec/ethereum/contracts';
10
+ import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
11
+ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
9
12
  import { ChainMonitor } from '@aztec/ethereum/test';
10
- import { randomBytes } from '@aztec/foundation/crypto';
13
+ import { randomBytes } from '@aztec/foundation/crypto/random';
14
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
15
  import { EthAddress } from '@aztec/foundation/eth-address';
12
- import { Fr } from '@aztec/foundation/fields';
13
16
  import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
14
17
  import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
15
18
  import { AMMContract } from '@aztec/noir-contracts.js/AMM';
@@ -123,7 +126,7 @@ export class ClientFlowsBenchmark {
123
126
 
124
127
  private proxyLogger: ProxyLogger;
125
128
 
126
- constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {}) {
129
+ constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {}) {
127
130
  this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
128
131
  this.snapshotManager = createSnapshotManager(
129
132
  `bench_client_flows${testName ? `/${testName}` : ''}`,
@@ -1,4 +1,5 @@
1
1
  import type { AztecNodeService } from '@aztec/aztec-node';
2
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
3
  import { BatchCall, type SentTx, type WaitOpts } from '@aztec/aztec.js/contracts';
3
4
  import { mean, stdDev, times } from '@aztec/foundation/collection';
4
5
  import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
@@ -103,19 +104,22 @@ function getMetricValues(points: BenchmarkDataPoint[]) {
103
104
  * @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
104
105
  * @returns A BatchCall instance.
105
106
  */
106
- function makeCall(
107
+ async function makeCall(
107
108
  index: number,
108
109
  context: EndToEndContext,
109
110
  contract: BenchmarkingContract,
110
111
  heavyPublicCompute: boolean,
111
112
  ) {
112
- const [owner] = context.accounts;
113
113
  if (heavyPublicCompute) {
114
114
  return new BatchCall(context.wallet, [contract.methods.sha256_hash_1024(randomBytesAsBigInts(1024))]);
115
115
  } else {
116
+ // We use random address for the new note owner because we can emit at most UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN
117
+ // logs for a given sender-recipient-contract tuple.
118
+ const ownerOfNewNote = await AztecAddress.random();
119
+ const [ownerOfBalance] = context.accounts;
116
120
  return new BatchCall(context.wallet, [
117
- contract.methods.create_note(owner, index + 1),
118
- contract.methods.increment_balance(owner, index + 1),
121
+ contract.methods.create_note(ownerOfNewNote, index + 1),
122
+ contract.methods.increment_balance(ownerOfBalance, index + 1),
119
123
  ]);
120
124
  }
121
125
  }
@@ -129,13 +133,13 @@ function makeCall(
129
133
  * @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
130
134
  * @returns Array of sent txs.
131
135
  */
132
- export function sendTxs(
136
+ export async function sendTxs(
133
137
  txCount: number,
134
138
  context: EndToEndContext,
135
139
  contract: BenchmarkingContract,
136
140
  heavyPublicCompute: boolean = false,
137
- ): SentTx[] {
138
- const calls = times(txCount, index => makeCall(index, context, contract, heavyPublicCompute));
141
+ ): Promise<SentTx[]> {
142
+ const calls = await Promise.all(times(txCount, index => makeCall(index, context, contract, heavyPublicCompute)));
139
143
  context.logger.info(`Creating ${txCount} txs`);
140
144
  const [from] = context.accounts;
141
145
  context.logger.info(`Sending ${txCount} txs`);
@@ -3,13 +3,13 @@ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
3
3
  import { type Logger, createLogger } from '@aztec/aztec.js/log';
4
4
  import type { AztecNode } from '@aztec/aztec.js/node';
5
5
  import { CheatCodes } from '@aztec/aztec/testing';
6
- import {
7
- type DeployL1ContractsArgs,
8
- type DeployL1ContractsReturnType,
9
- type ExtendedViemWalletClient,
10
- createExtendedL1Client,
11
- deployL1Contract,
12
- } from '@aztec/ethereum';
6
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
7
+ import type {
8
+ DeployAztecL1ContractsArgs,
9
+ DeployAztecL1ContractsReturnType,
10
+ } from '@aztec/ethereum/deploy-aztec-l1-contracts';
11
+ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
12
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
13
13
  import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
14
14
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
15
15
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
@@ -54,9 +54,13 @@ export class CrossChainMessagingTest {
54
54
  outbox!: any; // GetContractReturnType<typeof OutboxAbi> | undefined;
55
55
  cheatCodes!: CheatCodes;
56
56
 
57
- deployL1ContractsValues!: DeployL1ContractsReturnType;
57
+ deployL1ContractsValues!: DeployAztecL1ContractsReturnType;
58
58
 
59
- constructor(testName: string, opts: SetupOptions = {}, deployL1ContractsArgs: Partial<DeployL1ContractsArgs> = {}) {
59
+ constructor(
60
+ testName: string,
61
+ opts: SetupOptions = {},
62
+ deployL1ContractsArgs: Partial<DeployAztecL1ContractsArgs> = {},
63
+ ) {
60
64
  this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
61
65
  this.snapshotManager = createSnapshotManager(`e2e_cross_chain_messaging/${testName}`, dataPath, opts, {
62
66
  initialValidators: [],
@@ -6,12 +6,14 @@ import type { Logger } from '@aztec/aztec.js/log';
6
6
  import { MerkleTreeId } from '@aztec/aztec.js/trees';
7
7
  import type { Wallet } from '@aztec/aztec.js/wallet';
8
8
  import { EpochCache } from '@aztec/epoch-cache';
9
- import { DefaultL1ContractsConfig, type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
9
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
10
+ import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
10
11
  import { RollupContract } from '@aztec/ethereum/contracts';
11
12
  import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
12
- import { EpochNumber } from '@aztec/foundation/branded-types';
13
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
14
+ import { BlockNumber, CheckpointNumber, EpochNumber } from '@aztec/foundation/branded-types';
13
15
  import { SecretValue } from '@aztec/foundation/config';
14
- import { randomBytes } from '@aztec/foundation/crypto';
16
+ import { randomBytes } from '@aztec/foundation/crypto/random';
15
17
  import { withLogNameSuffix } from '@aztec/foundation/log';
16
18
  import { retryUntil } from '@aztec/foundation/retry';
17
19
  import { sleep } from '@aztec/foundation/sleep';
@@ -26,7 +28,7 @@ import {
26
28
  SequencerState,
27
29
  } from '@aztec/sequencer-client';
28
30
  import type { TestSequencerClient } from '@aztec/sequencer-client/test';
29
- import { EthAddress, type L2BlockNumber } from '@aztec/stdlib/block';
31
+ import { type BlockParameter, EthAddress } from '@aztec/stdlib/block';
30
32
  import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
31
33
  import { tryStop } from '@aztec/stdlib/interfaces/server';
32
34
 
@@ -95,12 +97,24 @@ export class EpochsTestContext {
95
97
  const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
96
98
  const aztecEpochDuration = opts.aztecEpochDuration ?? 6;
97
99
  const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
98
- return { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs };
100
+ const l1PublishingTime = opts.l1PublishingTime ?? 1;
101
+ return {
102
+ l1PublishingTime,
103
+ ethereumSlotDuration,
104
+ aztecSlotDuration,
105
+ aztecEpochDuration,
106
+ aztecProofSubmissionEpochs,
107
+ };
99
108
  }
100
109
 
101
110
  public async setup(opts: EpochsTestOpts = {}) {
102
- const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs } =
103
- EpochsTestContext.getSlotDurations(opts);
111
+ const {
112
+ ethereumSlotDuration,
113
+ aztecSlotDuration,
114
+ aztecEpochDuration,
115
+ aztecProofSubmissionEpochs,
116
+ l1PublishingTime,
117
+ } = EpochsTestContext.getSlotDurations(opts);
104
118
 
105
119
  this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
106
120
  this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
@@ -112,8 +126,6 @@ export class EpochsTestContext {
112
126
  checkIntervalMs: 50,
113
127
  archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
114
128
  worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
115
- skipProtocolContracts: true,
116
- salt: 1,
117
129
  aztecEpochDuration,
118
130
  aztecSlotDuration,
119
131
  ethereumSlotDuration,
@@ -130,6 +142,7 @@ export class EpochsTestContext {
130
142
  worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
131
143
  exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
132
144
  slasherFlavor: 'none',
145
+ l1PublishingTime,
133
146
  ...opts,
134
147
  });
135
148
 
@@ -291,21 +304,21 @@ export class EpochsTestContext {
291
304
  return start;
292
305
  }
293
306
 
294
- /** Waits until the given L2 block number is mined. */
295
- public async waitUntilL2BlockNumber(target: number, timeout = 60) {
307
+ /** Waits until the given checkpoint number is mined. */
308
+ public async waitUntilCheckpointNumber(target: CheckpointNumber, timeout = 120) {
296
309
  await retryUntil(
297
310
  () => Promise.resolve(target <= this.monitor.checkpointNumber),
298
- `Wait until L2 block ${target}`,
311
+ `Wait until checkpoint ${target}`,
299
312
  timeout,
300
313
  0.1,
301
314
  );
302
315
  }
303
316
 
304
- /** Waits until the given L2 block number is marked as proven. */
305
- public async waitUntilProvenL2BlockNumber(t: number, timeout = 60) {
317
+ /** Waits until the given checkpoint number is marked as proven. */
318
+ public async waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout = 120) {
306
319
  await retryUntil(
307
- () => Promise.resolve(t <= this.monitor.provenCheckpointNumber),
308
- `Wait proven L2 block ${t}`,
320
+ () => Promise.resolve(target <= this.monitor.provenCheckpointNumber),
321
+ `Wait proven checkpoint ${target}`,
309
322
  timeout,
310
323
  0.1,
311
324
  );
@@ -324,7 +337,7 @@ export class EpochsTestContext {
324
337
  }
325
338
 
326
339
  /** Waits for the aztec node to sync to the target block number. */
327
- public async waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalized' | 'historic') {
340
+ public async waitForNodeToSync(blockNumber: BlockNumber, type: 'proven' | 'finalized' | 'historic') {
328
341
  const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
329
342
  let synched = false;
330
343
  while (!synched) {
@@ -373,7 +386,7 @@ export class EpochsTestContext {
373
386
  }
374
387
 
375
388
  /** Verifies whether the given block number is found on the aztec node. */
376
- public async verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean) {
389
+ public async verifyHistoricBlock(blockNumber: BlockParameter, expectedSuccess: boolean) {
377
390
  // We use `findLeavesIndexes` here, but could use any function that queries the world-state
378
391
  // at a particular block, so we know whether that historic block is available or has been
379
392
  // pruned. Note that `getBlock` would not work here, since it only hits the archiver.
@@ -391,11 +404,11 @@ export class EpochsTestContext {
391
404
  const stateChanges: TrackedSequencerEvent[] = [];
392
405
  const failEvents: TrackedSequencerEvent[] = [];
393
406
 
394
- // Note we do not include the 'tx-count-check-failed' event here, since it is fine if we dont build
407
+ // Note we do not include the 'block-tx-count-check-failed' event here, since it is fine if we dont build
395
408
  // due to lack of txs available.
396
409
  const failEventsKeys: (keyof SequencerEvents)[] = [
397
410
  'block-build-failed',
398
- 'block-publish-failed',
411
+ 'checkpoint-publish-failed',
399
412
  'proposer-rollup-check-failed',
400
413
  ];
401
414
 
@@ -1,7 +1,7 @@
1
1
  import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
2
2
  import { Fr } from '@aztec/aztec.js/fields';
3
3
  import type { Logger } from '@aztec/aztec.js/log';
4
- import { Fq } from '@aztec/foundation/fields';
4
+ import { Fq } from '@aztec/foundation/curves/bn254';
5
5
  import { sleep } from '@aztec/foundation/sleep';
6
6
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
7
7
  import type { TestWallet } from '@aztec/test-wallet/server';
@@ -2,8 +2,11 @@ import type { AztecAddress } from '@aztec/aztec.js/addresses';
2
2
  import { type Logger, createLogger } from '@aztec/aztec.js/log';
3
3
  import type { AztecNode } from '@aztec/aztec.js/node';
4
4
  import { CheatCodes } from '@aztec/aztec/testing';
5
- import { type DeployL1ContractsArgs, RollupContract, createExtendedL1Client } from '@aztec/ethereum';
5
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
6
+ import { RollupContract } from '@aztec/ethereum/contracts';
7
+ import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
6
8
  import { ChainMonitor } from '@aztec/ethereum/test';
9
+ import { BlockNumber } from '@aztec/foundation/branded-types';
7
10
  import { EthAddress } from '@aztec/foundation/eth-address';
8
11
  import { sleep } from '@aztec/foundation/sleep';
9
12
  import { TestERC20Abi } from '@aztec/l1-artifacts';
@@ -16,6 +19,7 @@ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
16
19
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
17
20
  import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
18
21
  import { GasSettings } from '@aztec/stdlib/gas';
22
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
19
23
  import { TestWallet } from '@aztec/test-wallet/server';
20
24
 
21
25
  import { getContract } from 'viem';
@@ -55,6 +59,7 @@ export class FeesTest {
55
59
 
56
60
  public logger: Logger;
57
61
  public aztecNode!: AztecNode;
62
+ public aztecNodeAdmin!: AztecNodeAdmin;
58
63
  public cheatCodes!: CheatCodes;
59
64
 
60
65
  public wallet!: TestWallet;
@@ -85,7 +90,7 @@ export class FeesTest {
85
90
  public getGasBalanceFn!: BalancesFn;
86
91
  public getBananaPublicBalanceFn!: BalancesFn;
87
92
  public getBananaPrivateBalanceFn!: BalancesFn;
88
- public getProverFee!: (blockNumber: number) => Promise<bigint>;
93
+ public getProverFee!: (blockNumber: BlockNumber) => Promise<bigint>;
89
94
 
90
95
  public readonly ALICE_INITIAL_BANANAS = BigInt(1e22);
91
96
  public readonly SUBSCRIPTION_AMOUNT = BigInt(1e19);
@@ -94,7 +99,7 @@ export class FeesTest {
94
99
  constructor(
95
100
  testName: string,
96
101
  private numberOfAccounts = 3,
97
- setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {},
102
+ setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {},
98
103
  ) {
99
104
  if (!numberOfAccounts) {
100
105
  throw new Error('There must be at least 1 initial account.');
@@ -187,6 +192,7 @@ export class FeesTest {
187
192
  async ({ deployedAccounts }, { wallet, aztecNode, cheatCodes }) => {
188
193
  this.wallet = wallet;
189
194
  this.aztecNode = aztecNode;
195
+ this.aztecNodeAdmin = aztecNode;
190
196
  this.gasSettings = GasSettings.default({ maxFeesPerGas: (await this.aztecNode.getCurrentBaseFees()).mul(2) });
191
197
  this.cheatCodes = cheatCodes;
192
198
  this.accounts = deployedAccounts.map(a => a.address);
@@ -306,7 +312,7 @@ export class FeesTest {
306
312
  return await this.rollupContract.getSequencerRewards(this.coinbase);
307
313
  };
308
314
 
309
- this.getProverFee = async (blockNumber: number) => {
315
+ this.getProverFee = async (blockNumber: BlockNumber) => {
310
316
  const block = await this.aztecNode.getBlock(blockNumber);
311
317
 
312
318
  // @todo @lherskind As we deal with #13601
@@ -1,5 +1,5 @@
1
1
  import { AztecAddress } from '@aztec/aztec.js/addresses';
2
- import { getAddressFromPrivateKey } from '@aztec/ethereum';
2
+ import { getAddressFromPrivateKey } from '@aztec/ethereum/account';
3
3
  import { EthAddress } from '@aztec/foundation/eth-address';
4
4
  import type { EthPrivateKey } from '@aztec/node-keystore';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { EthAddress } from '@aztec/aztec.js/addresses';
3
- import { RollupContract } from '@aztec/ethereum';
3
+ import { RollupContract } from '@aztec/ethereum/contracts';
4
4
  import { EpochNumber } from '@aztec/foundation/branded-types';
5
5
 
6
6
  import fs from 'fs';
@@ -24,7 +24,7 @@ const SLASHING_UNIT = BigInt(1e18);
24
24
  const SLASHING_AMOUNT = SLASHING_UNIT * 3n;
25
25
 
26
26
  // How many epochs it may take to set everything up, so we dont slash during this period
27
- const SETUP_EPOCH_DURATION = 5;
27
+ const SETUP_EPOCH_DURATION = 8;
28
28
 
29
29
  export class P2PInactivityTest {
30
30
  public nodes!: AztecNodeService[];
@@ -151,11 +151,8 @@ export class P2PInactivityTest {
151
151
  // This prevents race conditions where validators propose blocks before the network is ready
152
152
  await this.test.waitForP2PMeshConnectivity(this.nodes, NUM_NODES);
153
153
 
154
- const ethereumSlotDuration = this.test.ctx.aztecNodeConfig.ethereumSlotDuration!;
155
- this.test.logger.warn(`Advancing to the L1 slot before epoch ${SETUP_EPOCH_DURATION + 1} to start slashing`);
156
- await this.test.ctx.cheatCodes.rollup.advanceToEpoch(EpochNumber(SETUP_EPOCH_DURATION + 1), {
157
- offset: -ethereumSlotDuration,
158
- });
154
+ this.test.logger.warn(`Advancing to epoch ${SETUP_EPOCH_DURATION - 1} (slashing will start after it is completed)`);
155
+ await this.test.ctx.cheatCodes.rollup.advanceToEpoch(EpochNumber(SETUP_EPOCH_DURATION - 1));
159
156
 
160
157
  return this;
161
158
  }
@@ -2,20 +2,19 @@ import type { InitialAccountData } from '@aztec/accounts/testing';
2
2
  import type { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
3
3
  import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
4
4
  import { Fr } from '@aztec/aztec.js/fields';
5
+ import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
5
6
  import {
6
7
  type EmpireSlashingProposerContract,
7
- type ExtendedViemWalletClient,
8
8
  GSEContract,
9
- MultiAdderArtifact,
10
- type Operator,
11
9
  RollupContract,
12
10
  type TallySlashingProposerContract,
13
- type ViemClient,
14
- createL1TxUtilsFromViemWallet,
15
- deployL1Contract,
16
- getL1ContractsConfigEnvVars,
17
- } from '@aztec/ethereum';
11
+ } from '@aztec/ethereum/contracts';
12
+ import type { Operator } from '@aztec/ethereum/deploy-aztec-l1-contracts';
13
+ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
14
+ import { MultiAdderArtifact } from '@aztec/ethereum/l1-artifacts';
15
+ import { createL1TxUtilsFromViemWallet } from '@aztec/ethereum/l1-tx-utils';
18
16
  import { ChainMonitor } from '@aztec/ethereum/test';
17
+ import type { ExtendedViemWalletClient, ViemClient } from '@aztec/ethereum/types';
19
18
  import { EpochNumber } from '@aztec/foundation/branded-types';
20
19
  import { SecretValue } from '@aztec/foundation/config';
21
20
  import { type Logger, createLogger } from '@aztec/foundation/log';
@@ -94,7 +93,6 @@ export class P2PNetworkTest {
94
93
  // If set enable metrics collection
95
94
  private metricsPort?: number,
96
95
  startProverNode?: boolean,
97
- mockZkPassportVerifier?: boolean,
98
96
  ) {
99
97
  this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
100
98
 
@@ -123,7 +121,6 @@ export class P2PNetworkTest {
123
121
  initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
124
122
  slasherFlavor: initialValidatorConfig.slasherFlavor ?? 'tally',
125
123
  aztecTargetCommitteeSize: numberOfValidators,
126
- salt: 420,
127
124
  metricsPort: metricsPort,
128
125
  numberOfInitialFundedAccounts: 2,
129
126
  startProverNode,
@@ -142,7 +139,6 @@ export class P2PNetworkTest {
142
139
  aztecTargetCommitteeSize: numberOfValidators,
143
140
  initialValidators: [],
144
141
  zkPassportArgs: {
145
- mockZkPassportVerifier,
146
142
  zkPassportDomain: zkPassportParams.domain,
147
143
  zkPassportScope: zkPassportParams.scope,
148
144
  },
@@ -158,7 +154,6 @@ export class P2PNetworkTest {
158
154
  metricsPort,
159
155
  initialConfig,
160
156
  startProverNode,
161
- mockZkPassportVerifier,
162
157
  }: {
163
158
  testName: string;
164
159
  numberOfNodes: number;
@@ -167,7 +162,6 @@ export class P2PNetworkTest {
167
162
  metricsPort?: number;
168
163
  initialConfig?: SetupOptions;
169
164
  startProverNode?: boolean;
170
- mockZkPassportVerifier?: boolean;
171
165
  }) {
172
166
  const port = basePort || (await getPort());
173
167
 
@@ -188,7 +182,6 @@ export class P2PNetworkTest {
188
182
  numberOfNodes,
189
183
  metricsPort,
190
184
  startProverNode,
191
- mockZkPassportVerifier,
192
185
  );
193
186
  }
194
187
 
@@ -201,7 +194,7 @@ export class P2PNetworkTest {
201
194
 
202
195
  async addBootstrapNode() {
203
196
  await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig }) => {
204
- const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
197
+ const telemetry = await getEndToEndTestTelemetryClient(this.metricsPort);
205
198
  this.bootstrapNode = await createBootstrapNodeFromPrivateKey(
206
199
  BOOTSTRAP_NODE_PRIVATE_KEY,
207
200
  this.bootNodePort,
@@ -449,7 +442,7 @@ export class P2PNetworkTest {
449
442
  slashFactory: SlashFactoryContract;
450
443
  }> {
451
444
  if (!this.ctx.deployL1ContractsValues) {
452
- throw new Error('DeployL1ContractsValues not set');
445
+ throw new Error('DeployAztecL1ContractsValues not set');
453
446
  }
454
447
 
455
448
  const rollup = new RollupContract(
@@ -6,7 +6,11 @@ import { Fr } from '@aztec/aztec.js/fields';
6
6
  import type { Logger } from '@aztec/aztec.js/log';
7
7
  import { Tx, TxStatus } from '@aztec/aztec.js/tx';
8
8
  import type { RollupCheatCodes } from '@aztec/aztec/testing';
9
- import type { EmpireSlashingProposerContract, RollupContract, TallySlashingProposerContract } from '@aztec/ethereum';
9
+ import type {
10
+ EmpireSlashingProposerContract,
11
+ RollupContract,
12
+ TallySlashingProposerContract,
13
+ } from '@aztec/ethereum/contracts';
10
14
  import { EpochNumber } from '@aztec/foundation/branded-types';
11
15
  import { timesAsync, unique } from '@aztec/foundation/collection';
12
16
  import { retryUntil } from '@aztec/foundation/retry';
@@ -11,9 +11,8 @@ import {
11
11
  TestCircuitVerifier,
12
12
  } from '@aztec/bb-prover';
13
13
  import { BackendType, Barretenberg } from '@aztec/bb.js';
14
- import { createBlobSinkClient } from '@aztec/blob-sink/client';
15
- import type { BlobSinkServer } from '@aztec/blob-sink/server';
16
- import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
14
+ import { createBlobClientWithFileStores } from '@aztec/blob-client/client';
15
+ import type { DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
17
16
  import { Buffer32 } from '@aztec/foundation/buffer';
18
17
  import { SecretValue } from '@aztec/foundation/config';
19
18
  import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
@@ -69,7 +68,6 @@ export class FullProverTest {
69
68
  aztecNode!: AztecNode;
70
69
  aztecNodeAdmin!: AztecNodeAdmin;
71
70
  cheatCodes!: CheatCodes;
72
- blobSink!: BlobSinkServer;
73
71
  private provenComponents: ProvenSetup[] = [];
74
72
  private bbConfigCleanup?: () => Promise<void>;
75
73
  private acvmConfigCleanup?: () => Promise<void>;
@@ -78,7 +76,7 @@ export class FullProverTest {
78
76
  private context!: SubsystemsContext;
79
77
  private proverNode!: ProverNode;
80
78
  private simulatedProverNode!: ProverNode;
81
- public l1Contracts!: DeployL1ContractsReturnType;
79
+ public l1Contracts!: DeployAztecL1ContractsReturnType;
82
80
  public proverAddress!: EthAddress;
83
81
 
84
82
  constructor(
@@ -91,7 +89,7 @@ export class FullProverTest {
91
89
  this.snapshotManager = createSnapshotManager(
92
90
  `full_prover_integration/${testName}`,
93
91
  dataPath,
94
- { startProverNode: true, fundRewardDistributor: true, coinbase },
92
+ { startProverNode: true, coinbase },
95
93
  {
96
94
  realVerifier: realProofs,
97
95
  },
@@ -169,11 +167,11 @@ export class FullProverTest {
169
167
  aztecNode: this.aztecNode,
170
168
  deployL1ContractsValues: this.l1Contracts,
171
169
  cheatCodes: this.cheatCodes,
172
- blobSink: this.blobSink,
173
170
  } = this.context);
174
171
  this.aztecNodeAdmin = this.context.aztecNode;
175
172
 
176
- const blobSinkClient = createBlobSinkClient({ blobSinkUrl: `http://localhost:${this.blobSink.port}` });
173
+ const config = this.context.aztecNodeConfig;
174
+ const blobClient = await createBlobClientWithFileStores(config, this.logger);
177
175
 
178
176
  // Configure a full prover PXE
179
177
  let acvmConfig: Awaited<ReturnType<typeof getACVMConfig>> | undefined;
@@ -243,7 +241,7 @@ export class FullProverTest {
243
241
  this.logger.verbose('Starting archiver for new prover node');
244
242
  const archiver = await createArchiver(
245
243
  { ...this.context.aztecNodeConfig, dataDirectory: undefined },
246
- { blobSinkClient, dateProvider: this.context.dateProvider },
244
+ { blobClient, dateProvider: this.context.dateProvider },
247
245
  { blockUntilSync: true },
248
246
  );
249
247
 
@@ -283,7 +281,7 @@ export class FullProverTest {
283
281
  {
284
282
  aztecNodeTxProvider: this.aztecNode,
285
283
  archiver: archiver as Archiver,
286
- blobSinkClient,
284
+ blobClient,
287
285
  },
288
286
  { prefilledPublicData },
289
287
  );