@aztec/end-to-end 0.0.1-commit.d3ec352c → 0.0.1-commit.fcb71a6

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 (97) 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 +3 -2
  11. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  12. package/dest/e2e_epochs/epochs_test.js +11 -9
  13. package/dest/e2e_fees/bridging_race.notest.js +1 -1
  14. package/dest/e2e_fees/fees_test.d.ts +6 -3
  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 +1 -2
  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 +18 -462
  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 +3 -2
  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 +40 -8
  65. package/dest/spartan/utils.d.ts.map +1 -1
  66. package/dest/spartan/utils.js +139 -29
  67. package/package.json +38 -38
  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 +24 -11
  72. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  73. package/src/e2e_fees/fees_test.ts +7 -2
  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 +1 -3
  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 +77 -136
  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 +3 -1
  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/setup_test_wallets.ts +2 -1
  92. package/src/spartan/tx_metrics.ts +130 -0
  93. package/src/spartan/utils.ts +196 -21
  94. package/dest/fixtures/setup_l1_contracts.d.ts +0 -477
  95. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  96. package/dest/fixtures/setup_l1_contracts.js +0 -17
  97. 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.d3ec352c",
3
+ "version": "0.0.1-commit.fcb71a6",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -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.d3ec352c",
29
- "@aztec/archiver": "0.0.1-commit.d3ec352c",
30
- "@aztec/aztec": "0.0.1-commit.d3ec352c",
31
- "@aztec/aztec-node": "0.0.1-commit.d3ec352c",
32
- "@aztec/aztec.js": "0.0.1-commit.d3ec352c",
33
- "@aztec/bb-prover": "0.0.1-commit.d3ec352c",
34
- "@aztec/bb.js": "0.0.1-commit.d3ec352c",
35
- "@aztec/blob-lib": "0.0.1-commit.d3ec352c",
36
- "@aztec/blob-sink": "0.0.1-commit.d3ec352c",
37
- "@aztec/bot": "0.0.1-commit.d3ec352c",
38
- "@aztec/cli": "0.0.1-commit.d3ec352c",
39
- "@aztec/constants": "0.0.1-commit.d3ec352c",
40
- "@aztec/entrypoints": "0.0.1-commit.d3ec352c",
41
- "@aztec/epoch-cache": "0.0.1-commit.d3ec352c",
42
- "@aztec/ethereum": "0.0.1-commit.d3ec352c",
43
- "@aztec/foundation": "0.0.1-commit.d3ec352c",
44
- "@aztec/kv-store": "0.0.1-commit.d3ec352c",
45
- "@aztec/l1-artifacts": "0.0.1-commit.d3ec352c",
46
- "@aztec/merkle-tree": "0.0.1-commit.d3ec352c",
47
- "@aztec/node-keystore": "0.0.1-commit.d3ec352c",
48
- "@aztec/noir-contracts.js": "0.0.1-commit.d3ec352c",
49
- "@aztec/noir-noirc_abi": "0.0.1-commit.d3ec352c",
50
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.d3ec352c",
51
- "@aztec/noir-test-contracts.js": "0.0.1-commit.d3ec352c",
52
- "@aztec/p2p": "0.0.1-commit.d3ec352c",
53
- "@aztec/protocol-contracts": "0.0.1-commit.d3ec352c",
54
- "@aztec/prover-client": "0.0.1-commit.d3ec352c",
55
- "@aztec/prover-node": "0.0.1-commit.d3ec352c",
56
- "@aztec/pxe": "0.0.1-commit.d3ec352c",
57
- "@aztec/sequencer-client": "0.0.1-commit.d3ec352c",
58
- "@aztec/simulator": "0.0.1-commit.d3ec352c",
59
- "@aztec/slasher": "0.0.1-commit.d3ec352c",
60
- "@aztec/stdlib": "0.0.1-commit.d3ec352c",
61
- "@aztec/telemetry-client": "0.0.1-commit.d3ec352c",
62
- "@aztec/test-wallet": "0.0.1-commit.d3ec352c",
63
- "@aztec/validator-client": "0.0.1-commit.d3ec352c",
64
- "@aztec/world-state": "0.0.1-commit.d3ec352c",
28
+ "@aztec/accounts": "0.0.1-commit.fcb71a6",
29
+ "@aztec/archiver": "0.0.1-commit.fcb71a6",
30
+ "@aztec/aztec": "0.0.1-commit.fcb71a6",
31
+ "@aztec/aztec-node": "0.0.1-commit.fcb71a6",
32
+ "@aztec/aztec.js": "0.0.1-commit.fcb71a6",
33
+ "@aztec/bb-prover": "0.0.1-commit.fcb71a6",
34
+ "@aztec/bb.js": "0.0.1-commit.fcb71a6",
35
+ "@aztec/blob-client": "0.0.1-commit.fcb71a6",
36
+ "@aztec/blob-lib": "0.0.1-commit.fcb71a6",
37
+ "@aztec/bot": "0.0.1-commit.fcb71a6",
38
+ "@aztec/cli": "0.0.1-commit.fcb71a6",
39
+ "@aztec/constants": "0.0.1-commit.fcb71a6",
40
+ "@aztec/entrypoints": "0.0.1-commit.fcb71a6",
41
+ "@aztec/epoch-cache": "0.0.1-commit.fcb71a6",
42
+ "@aztec/ethereum": "0.0.1-commit.fcb71a6",
43
+ "@aztec/foundation": "0.0.1-commit.fcb71a6",
44
+ "@aztec/kv-store": "0.0.1-commit.fcb71a6",
45
+ "@aztec/l1-artifacts": "0.0.1-commit.fcb71a6",
46
+ "@aztec/merkle-tree": "0.0.1-commit.fcb71a6",
47
+ "@aztec/node-keystore": "0.0.1-commit.fcb71a6",
48
+ "@aztec/noir-contracts.js": "0.0.1-commit.fcb71a6",
49
+ "@aztec/noir-noirc_abi": "0.0.1-commit.fcb71a6",
50
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.fcb71a6",
51
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.fcb71a6",
52
+ "@aztec/p2p": "0.0.1-commit.fcb71a6",
53
+ "@aztec/protocol-contracts": "0.0.1-commit.fcb71a6",
54
+ "@aztec/prover-client": "0.0.1-commit.fcb71a6",
55
+ "@aztec/prover-node": "0.0.1-commit.fcb71a6",
56
+ "@aztec/pxe": "0.0.1-commit.fcb71a6",
57
+ "@aztec/sequencer-client": "0.0.1-commit.fcb71a6",
58
+ "@aztec/simulator": "0.0.1-commit.fcb71a6",
59
+ "@aztec/slasher": "0.0.1-commit.fcb71a6",
60
+ "@aztec/stdlib": "0.0.1-commit.fcb71a6",
61
+ "@aztec/telemetry-client": "0.0.1-commit.fcb71a6",
62
+ "@aztec/test-wallet": "0.0.1-commit.fcb71a6",
63
+ "@aztec/validator-client": "0.0.1-commit.fcb71a6",
64
+ "@aztec/world-state": "0.0.1-commit.fcb71a6",
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';
13
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
12
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';
@@ -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
 
@@ -292,7 +305,7 @@ export class EpochsTestContext {
292
305
  }
293
306
 
294
307
  /** Waits until the given checkpoint number is mined. */
295
- public async waitUntilCheckpointNumber(target: CheckpointNumber, timeout = 60) {
308
+ public async waitUntilCheckpointNumber(target: CheckpointNumber, timeout = 120) {
296
309
  await retryUntil(
297
310
  () => Promise.resolve(target <= this.monitor.checkpointNumber),
298
311
  `Wait until checkpoint ${target}`,
@@ -302,7 +315,7 @@ export class EpochsTestContext {
302
315
  }
303
316
 
304
317
  /** Waits until the given checkpoint number is marked as proven. */
305
- public async waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout = 60) {
318
+ public async waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout = 120) {
306
319
  await retryUntil(
307
320
  () => Promise.resolve(target <= this.monitor.provenCheckpointNumber),
308
321
  `Wait proven checkpoint ${target}`,
@@ -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,7 +2,9 @@ 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';
7
9
  import { BlockNumber } from '@aztec/foundation/branded-types';
8
10
  import { EthAddress } from '@aztec/foundation/eth-address';
@@ -17,6 +19,7 @@ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
17
19
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
18
20
  import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
19
21
  import { GasSettings } from '@aztec/stdlib/gas';
22
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
20
23
  import { TestWallet } from '@aztec/test-wallet/server';
21
24
 
22
25
  import { getContract } from 'viem';
@@ -56,6 +59,7 @@ export class FeesTest {
56
59
 
57
60
  public logger: Logger;
58
61
  public aztecNode!: AztecNode;
62
+ public aztecNodeAdmin!: AztecNodeAdmin;
59
63
  public cheatCodes!: CheatCodes;
60
64
 
61
65
  public wallet!: TestWallet;
@@ -95,7 +99,7 @@ export class FeesTest {
95
99
  constructor(
96
100
  testName: string,
97
101
  private numberOfAccounts = 3,
98
- setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {},
102
+ setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {},
99
103
  ) {
100
104
  if (!numberOfAccounts) {
101
105
  throw new Error('There must be at least 1 initial account.');
@@ -188,6 +192,7 @@ export class FeesTest {
188
192
  async ({ deployedAccounts }, { wallet, aztecNode, cheatCodes }) => {
189
193
  this.wallet = wallet;
190
194
  this.aztecNode = aztecNode;
195
+ this.aztecNodeAdmin = aztecNode;
191
196
  this.gasSettings = GasSettings.default({ maxFeesPerGas: (await this.aztecNode.getCurrentBaseFees()).mul(2) });
192
197
  this.cheatCodes = cheatCodes;
193
198
  this.accounts = deployedAccounts.map(a => a.address);
@@ -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
  );
@@ -8,7 +8,7 @@ export const shouldCollectMetrics = () => {
8
8
  };
9
9
 
10
10
  export const TEST_PEER_CHECK_INTERVAL_MS = 1000;
11
- export const TEST_MAX_TX_POOL_SIZE = 2 * 1024 * 1024 * 1024; // 2GB
11
+ export const TEST_MAX_PENDING_TX_POOL_COUNT = 10_000; // Number of max pending TXs ~ 1.56GB
12
12
 
13
13
  export const MNEMONIC = 'test test test test test test test test test test test junk';
14
14
  export const privateKey = Buffer.from('ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', 'hex');
@@ -24,5 +24,3 @@ export const NO_L1_TO_L2_MSG_ERROR =
24
24
  /No non-nullified L1 to L2 message found for message hash|Tried to consume nonexistent L1-to-L2 message/;
25
25
  export const STATIC_CALL_STATE_MODIFICATION_ERROR = /Static call cannot update the state.*/;
26
26
  export const STATIC_CONTEXT_ASSERTION_ERROR = /Assertion failed: Function .* can only be called statically.*/;
27
-
28
- export const DEFAULT_BLOB_SINK_PORT = '5052';
@@ -1,6 +1,6 @@
1
1
  import type { Logger } from '@aztec/aztec.js/log';
2
2
  import { parseBooleanEnv } from '@aztec/foundation/config';
3
- import { randomBytes } from '@aztec/foundation/crypto';
3
+ import { randomBytes } from '@aztec/foundation/crypto/random';
4
4
  import { tryRmDir } from '@aztec/foundation/fs';
5
5
 
6
6
  import { promises as fs } from 'fs';
@@ -1,5 +1,7 @@
1
- import { type ExtendedViemWalletClient, type L1ContractAddresses, RollupContract } from '@aztec/ethereum';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import { RollupContract } from '@aztec/ethereum/contracts';
2
+ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
3
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
5
  import { tryJsonStringify } from '@aztec/foundation/json-rpc';
4
6
  import { InboxAbi } from '@aztec/l1-artifacts';
5
7
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
@@ -99,7 +99,7 @@ export async function createNode(
99
99
  ) {
100
100
  const createNode = async () => {
101
101
  const validatorConfig = await createValidatorConfig(config, bootstrapNode, tcpPort, addressIndex, dataDirectory);
102
- const telemetry = getEndToEndTestTelemetryClient(metricsPort);
102
+ const telemetry = await getEndToEndTestTelemetryClient(metricsPort);
103
103
  return await AztecNodeService.createAndSync(
104
104
  validatorConfig,
105
105
  { telemetry, dateProvider },
@@ -128,7 +128,7 @@ export async function createNonValidatorNode(
128
128
  validatorPrivateKeys: undefined,
129
129
  publisherPrivateKeys: [],
130
130
  };
131
- const telemetry = getEndToEndTestTelemetryClient(metricsPort);
131
+ const telemetry = await getEndToEndTestTelemetryClient(metricsPort);
132
132
  return await AztecNodeService.createAndSync(config, { telemetry, dateProvider }, { prefilledPublicData });
133
133
  };
134
134
  return loggerIdStorage ? await loggerIdStorage.run(tcpPort.toString(), createNode) : createNode();
@@ -147,7 +147,7 @@ export async function createProverNode(
147
147
  ) {
148
148
  const createProverNode = async () => {
149
149
  const proverNodePrivateKey = getPrivateKeyFromIndex(ATTESTER_PRIVATE_KEYS_START_INDEX + addressIndex)!;
150
- const telemetry = getEndToEndTestTelemetryClient(metricsPort);
150
+ const telemetry = await getEndToEndTestTelemetryClient(metricsPort);
151
151
 
152
152
  const proverConfig: Partial<ProverNodeConfig> = await createP2PConfig(
153
153
  config,