@aztec/end-to-end 0.78.0 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dest/bench/utils.d.ts +1 -13
  2. package/dest/bench/utils.d.ts.map +1 -1
  3. package/dest/bench/utils.js +6 -6
  4. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -1
  5. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  6. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +2 -1
  7. package/dest/e2e_epochs/epochs_test.d.ts +1 -1
  8. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  9. package/dest/e2e_epochs/epochs_test.js +1 -1
  10. package/dest/e2e_fees/fees_test.d.ts +3 -1
  11. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  12. package/dest/e2e_fees/fees_test.js +3 -1
  13. package/dest/e2e_p2p/p2p_network.d.ts +1 -1
  14. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  15. package/dest/e2e_p2p/p2p_network.js +1 -2
  16. package/dest/e2e_prover/e2e_prover_test.d.ts +3 -1
  17. package/dest/e2e_prover/e2e_prover_test.d.ts.map +1 -1
  18. package/dest/e2e_prover/e2e_prover_test.js +2 -1
  19. package/dest/fixtures/setup_l1_contracts.d.ts +3 -3
  20. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
  21. package/dest/fixtures/setup_l1_contracts.js +1 -1
  22. package/dest/fixtures/snapshot_manager.d.ts +3 -2
  23. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  24. package/dest/fixtures/snapshot_manager.js +27 -23
  25. package/dest/fixtures/utils.d.ts +3 -2
  26. package/dest/fixtures/utils.d.ts.map +1 -1
  27. package/dest/fixtures/utils.js +16 -14
  28. package/dest/shared/cross_chain_test_harness.d.ts +1 -1
  29. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  30. package/dest/shared/cross_chain_test_harness.js +2 -1
  31. package/dest/shared/uniswap_l1_l2.d.ts +2 -1
  32. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  33. package/dest/simulators/lending_simulator.d.ts +2 -1
  34. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  35. package/dest/simulators/token_simulator.d.ts.map +1 -1
  36. package/dest/simulators/token_simulator.js +3 -8
  37. package/dest/spartan/setup_test_wallets.d.ts +1 -1
  38. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  39. package/dest/spartan/setup_test_wallets.js +4 -6
  40. package/dest/spartan/utils.d.ts +1 -1
  41. package/dest/spartan/utils.d.ts.map +1 -1
  42. package/package.json +32 -32
  43. package/src/bench/utils.ts +6 -8
  44. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
  45. package/src/e2e_epochs/epochs_test.ts +1 -1
  46. package/src/e2e_fees/fees_test.ts +2 -2
  47. package/src/e2e_p2p/p2p_network.ts +1 -2
  48. package/src/e2e_prover/e2e_prover_test.ts +2 -3
  49. package/src/fixtures/setup_l1_contracts.ts +2 -2
  50. package/src/fixtures/snapshot_manager.ts +42 -30
  51. package/src/fixtures/utils.ts +21 -16
  52. package/src/shared/cross_chain_test_harness.ts +6 -2
  53. package/src/shared/uniswap_l1_l2.ts +1 -1
  54. package/src/simulators/lending_simulator.ts +2 -1
  55. package/src/simulators/token_simulator.ts +5 -8
  56. package/src/spartan/setup_test_wallets.ts +4 -4
  57. package/src/spartan/utils.ts +1 -1
@@ -83,11 +83,9 @@ export class TokenSimulator {
83
83
  async checkPublic() {
84
84
  // public calls
85
85
  const calls = [
86
- await this.token.methods.total_supply().request()
86
+ this.token.methods.total_supply(),
87
+ ...this.accounts.map((address)=>this.token.methods.balance_of_public(address))
87
88
  ];
88
- for (const address of this.accounts){
89
- calls.push(await this.token.methods.balance_of_public(address).request());
90
- }
91
89
  const results = (await Promise.all(chunk(calls, 4).map((batch)=>new BatchCall(this.defaultWallet, batch).simulate()))).flat();
92
90
  expect(results[0]).toEqual(this.totalSupply);
93
91
  // Check that all our balances match
@@ -106,10 +104,7 @@ export class TokenSimulator {
106
104
  defaultLookups.push(address);
107
105
  }
108
106
  }
109
- const defaultCalls = [];
110
- for (const address of defaultLookups){
111
- defaultCalls.push(await this.token.methods.balance_of_private(address).request());
112
- }
107
+ const defaultCalls = defaultLookups.map((address)=>this.token.methods.balance_of_private(address));
113
108
  const results = (await Promise.all(chunk(defaultCalls, 4).map((batch)=>new BatchCall(this.defaultWallet, batch).simulate()))).flat();
114
109
  for(let i = 0; i < defaultLookups.length; i++){
115
110
  expect(results[i]).toEqual(this.balanceOfPrivate(defaultLookups[i]));
@@ -10,7 +10,7 @@ export interface TestWallets {
10
10
  tokenAddress: AztecAddress;
11
11
  }
12
12
  export declare function setupTestWalletsWithTokens(pxeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestWallets>;
13
- export declare function deployTestWalletWithTokens(pxeUrl: string, nodeUrl: string, l1RpcUrl: string, mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number, initialFeeJuice?: bigint): Promise<TestWallets>;
13
+ export declare function deployTestWalletWithTokens(pxeUrl: string, nodeUrl: string, l1RpcUrls: string[], mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number, initialFeeJuice?: bigint): Promise<TestWallets>;
14
14
  export declare function performTransfers({ testWallets, rounds, transferAmount, logger, }: {
15
15
  testWallets: TestWallets;
16
16
  rounds: number;
@@ -1 +1 @@
1
- {"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EAKjB,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,g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BAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,0BAA0B,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,CAYtB;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,EACzB,eAAe,SAAa,GAC3B,OAAO,CAAC,WAAW,CAAC,CAsCtB;AA2DD,wBAAsB,gBAAgB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,iBAkBA"}
@@ -22,13 +22,13 @@ export async function setupTestWalletsWithTokens(pxeUrl, mintAmount, logger) {
22
22
  recipientWallet
23
23
  };
24
24
  }
25
- export async function deployTestWalletWithTokens(pxeUrl, nodeUrl, l1RpcUrl, mnemonicOrPrivateKey, mintAmount, logger, numberOfFundedWallets = 1, initialFeeJuice = 10n ** 22n) {
25
+ export async function deployTestWalletWithTokens(pxeUrl, nodeUrl, l1RpcUrls, mnemonicOrPrivateKey, mintAmount, logger, numberOfFundedWallets = 1, initialFeeJuice = 10n ** 22n) {
26
26
  const pxe = await createCompatibleClient(pxeUrl, logger);
27
27
  const node = createAztecNodeClient(nodeUrl);
28
28
  const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
29
29
  const recipientWallet = await getSchnorrWalletWithSecretKey(pxe, recipient.secret, recipient.signingKey, recipient.salt);
30
30
  const fundedAccounts = await Promise.all(funded.map((a)=>getSchnorrAccount(pxe, a.secret, a.signingKey, a.salt)));
31
- const claims = await Promise.all(fundedAccounts.map((a)=>bridgeL1FeeJuice(l1RpcUrl, mnemonicOrPrivateKey, pxe, a.getAddress(), initialFeeJuice, logger)));
31
+ const claims = await Promise.all(fundedAccounts.map((a)=>bridgeL1FeeJuice(l1RpcUrls, mnemonicOrPrivateKey, pxe, a.getAddress(), initialFeeJuice, logger)));
32
32
  // Progress by 2 L2 blocks so that the l1ToL2Message added above will be available to use on L2.
33
33
  await advanceL2Block(node);
34
34
  await advanceL2Block(node);
@@ -55,11 +55,9 @@ export async function deployTestWalletWithTokens(pxeUrl, nodeUrl, l1RpcUrl, mnem
55
55
  recipientWallet
56
56
  };
57
57
  }
58
- async function bridgeL1FeeJuice(l1RpcUrl, mnemonicOrPrivateKey, pxe, recipient, amount, log) {
58
+ async function bridgeL1FeeJuice(l1RpcUrls, mnemonicOrPrivateKey, pxe, recipient, amount, log) {
59
59
  const { l1ChainId } = await pxe.getNodeInfo();
60
- const chain = createEthereumChain([
61
- l1RpcUrl
62
- ], l1ChainId);
60
+ const chain = createEthereumChain(l1RpcUrls, l1ChainId);
63
61
  const { publicClient, walletClient } = createL1Clients(chain.rpcUrls, mnemonicOrPrivateKey, chain.chainInfo);
64
62
  const portal = await L1FeeJuicePortalManager.new(pxe, publicClient, walletClient, log);
65
63
  const claim = await portal.bridgeTokensPublic(recipient, amount, true);
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
- import type { RollupCheatCodes } from '@aztec/aztec.js/ethereum';
2
+ import type { RollupCheatCodes } from '@aztec/aztec.js/testing';
3
3
  import type { Logger } from '@aztec/foundation/log';
4
4
  import type { SequencerConfig } from '@aztec/sequencer-client';
5
5
  import { ChildProcess } from 'child_process';
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/spartan/utils.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MAAM,qBAIpD;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAClC,iBAcA;AAED,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,iBAU5F;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,iBAcpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -26,36 +26,36 @@
26
26
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
27
27
  },
28
28
  "dependencies": {
29
- "@aztec/accounts": "0.78.0",
30
- "@aztec/archiver": "0.78.0",
31
- "@aztec/aztec": "0.78.0",
32
- "@aztec/aztec-node": "0.78.0",
33
- "@aztec/aztec.js": "0.78.0",
34
- "@aztec/bb-prover": "0.78.0",
35
- "@aztec/blob-lib": "0.78.0",
36
- "@aztec/blob-sink": "0.78.0",
37
- "@aztec/bot": "0.78.0",
38
- "@aztec/constants": "0.78.0",
39
- "@aztec/entrypoints": "0.78.0",
40
- "@aztec/epoch-cache": "0.78.0",
41
- "@aztec/ethereum": "0.78.0",
42
- "@aztec/foundation": "0.78.0",
43
- "@aztec/kv-store": "0.78.0",
44
- "@aztec/l1-artifacts": "0.78.0",
45
- "@aztec/merkle-tree": "0.78.0",
46
- "@aztec/noir-contracts.js": "0.78.0",
47
- "@aztec/noir-protocol-circuits-types": "0.78.0",
48
- "@aztec/p2p": "0.78.0",
49
- "@aztec/protocol-contracts": "0.78.0",
50
- "@aztec/prover-client": "0.78.0",
51
- "@aztec/prover-node": "0.78.0",
52
- "@aztec/pxe": "0.78.0",
53
- "@aztec/sequencer-client": "0.78.0",
54
- "@aztec/simulator": "0.78.0",
55
- "@aztec/stdlib": "0.78.0",
56
- "@aztec/telemetry-client": "0.78.0",
57
- "@aztec/validator-client": "0.78.0",
58
- "@aztec/world-state": "0.78.0",
29
+ "@aztec/accounts": "0.79.0",
30
+ "@aztec/archiver": "0.79.0",
31
+ "@aztec/aztec": "0.79.0",
32
+ "@aztec/aztec-node": "0.79.0",
33
+ "@aztec/aztec.js": "0.79.0",
34
+ "@aztec/bb-prover": "0.79.0",
35
+ "@aztec/blob-lib": "0.79.0",
36
+ "@aztec/blob-sink": "0.79.0",
37
+ "@aztec/bot": "0.79.0",
38
+ "@aztec/constants": "0.79.0",
39
+ "@aztec/entrypoints": "0.79.0",
40
+ "@aztec/epoch-cache": "0.79.0",
41
+ "@aztec/ethereum": "0.79.0",
42
+ "@aztec/foundation": "0.79.0",
43
+ "@aztec/kv-store": "0.79.0",
44
+ "@aztec/l1-artifacts": "0.79.0",
45
+ "@aztec/merkle-tree": "0.79.0",
46
+ "@aztec/noir-contracts.js": "0.79.0",
47
+ "@aztec/noir-protocol-circuits-types": "0.79.0",
48
+ "@aztec/p2p": "0.79.0",
49
+ "@aztec/protocol-contracts": "0.79.0",
50
+ "@aztec/prover-client": "0.79.0",
51
+ "@aztec/prover-node": "0.79.0",
52
+ "@aztec/pxe": "0.79.0",
53
+ "@aztec/sequencer-client": "0.79.0",
54
+ "@aztec/simulator": "0.79.0",
55
+ "@aztec/stdlib": "0.79.0",
56
+ "@aztec/telemetry-client": "0.79.0",
57
+ "@aztec/validator-client": "0.79.0",
58
+ "@aztec/world-state": "0.79.0",
59
59
  "@iarna/toml": "^2.2.5",
60
60
  "@jest/globals": "^29.5.0",
61
61
  "@noble/curves": "^1.0.0",
@@ -94,7 +94,7 @@
94
94
  "tslib": "^2.4.0",
95
95
  "typescript": "^5.0.4",
96
96
  "util": "^0.12.5",
97
- "viem": "2.22.8",
97
+ "viem": "2.23.7",
98
98
  "zod": "^3.23.8"
99
99
  },
100
100
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  import type { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { type AztecNode, BatchCall, INITIAL_L2_BLOCK_NUM, type SentTx, type WaitOpts } from '@aztec/aztec.js';
3
- import { mean, stdDev, timesParallel } from '@aztec/foundation/collection';
3
+ import { mean, stdDev, times } from '@aztec/foundation/collection';
4
4
  import { randomInt } from '@aztec/foundation/crypto';
5
5
  import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking';
6
6
  import { type PXEService, type PXEServiceConfig, createPXEService } from '@aztec/pxe/server';
@@ -126,7 +126,7 @@ export function getFolderSize(path: string): number {
126
126
  * @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
127
127
  * @returns A BatchCall instance.
128
128
  */
129
- export async function makeCall(
129
+ function makeCall(
130
130
  index: number,
131
131
  context: EndToEndContext,
132
132
  contract: BenchmarkingContract,
@@ -135,13 +135,11 @@ export async function makeCall(
135
135
  const owner = context.wallet.getAddress();
136
136
  const sender = owner;
137
137
  if (heavyPublicCompute) {
138
- return new BatchCall(context.wallet, [
139
- await contract.methods.sha256_hash_2048(randomBytesAsBigInts(2048)).request(),
140
- ]);
138
+ return new BatchCall(context.wallet, [contract.methods.sha256_hash_2048(randomBytesAsBigInts(2048))]);
141
139
  } else {
142
140
  return new BatchCall(context.wallet, [
143
- await contract.methods.create_note(owner, sender, index + 1).request(),
144
- await contract.methods.increment_balance(owner, index + 1).request(),
141
+ contract.methods.create_note(owner, sender, index + 1),
142
+ contract.methods.increment_balance(owner, index + 1),
145
143
  ]);
146
144
  }
147
145
  }
@@ -161,7 +159,7 @@ export async function sendTxs(
161
159
  contract: BenchmarkingContract,
162
160
  heavyPublicCompute: boolean = false,
163
161
  ): Promise<SentTx[]> {
164
- const calls = await timesParallel(txCount, index => makeCall(index, context, contract, heavyPublicCompute));
162
+ const calls = times(txCount, index => makeCall(index, context, contract, heavyPublicCompute));
165
163
  context.logger.info(`Creating ${txCount} txs`);
166
164
  const provenTxs = await Promise.all(calls.map(call => call.prove({ skipPublicSimulation: true })));
167
165
  context.logger.info(`Sending ${txCount} txs`);
@@ -4,13 +4,13 @@ import {
4
4
  type AccountWallet,
5
5
  AztecAddress,
6
6
  type AztecNode,
7
- CheatCodes,
8
7
  type CompleteAddress,
9
8
  EthAddress,
10
9
  type Logger,
11
10
  type PXE,
12
11
  createLogger,
13
12
  } from '@aztec/aztec.js';
13
+ import { CheatCodes } from '@aztec/aztec.js/testing';
14
14
  import { type ViemPublicClient, createL1Clients, deployL1Contract } from '@aztec/ethereum';
15
15
  import { InboxAbi, OutboxAbi, RollupAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
16
16
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
@@ -1,7 +1,7 @@
1
1
  import { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { Fr, type Logger, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
3
- import { ChainMonitor } from '@aztec/aztec.js/ethereum';
4
3
  import { RollupContract } from '@aztec/ethereum/contracts';
4
+ import { ChainMonitor } from '@aztec/ethereum/test';
5
5
  import { DelayedTxUtils, type Delayer, waitUntilL1Timestamp } from '@aztec/ethereum/test';
6
6
  import { randomBytes } from '@aztec/foundation/crypto';
7
7
  import { withLogNameSuffix } from '@aztec/foundation/log';
@@ -3,15 +3,15 @@ import {
3
3
  type AccountWallet,
4
4
  type AztecAddress,
5
5
  type AztecNode,
6
- ChainMonitor,
7
- CheatCodes,
8
6
  type Logger,
9
7
  type PXE,
10
8
  createLogger,
11
9
  sleep,
12
10
  } from '@aztec/aztec.js';
11
+ import { CheatCodes } from '@aztec/aztec.js/testing';
13
12
  import { FEE_FUNDING_FOR_TESTER_ACCOUNT } from '@aztec/constants';
14
13
  import { type DeployL1ContractsArgs, RollupContract, createL1Clients } from '@aztec/ethereum';
14
+ import { ChainMonitor } from '@aztec/ethereum/test';
15
15
  import { EthAddress } from '@aztec/foundation/eth-address';
16
16
  import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
17
17
  import { AppSubscriptionContract } from '@aztec/noir-contracts.js/AppSubscription';
@@ -2,10 +2,9 @@ import { getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
2
2
  import type { InitialAccountData } from '@aztec/accounts/testing';
3
3
  import type { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
4
4
  import type { AccountWalletWithSecretKey } from '@aztec/aztec.js';
5
- import { ChainMonitor } from '@aztec/aztec.js/ethereum';
6
5
  import { RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
7
6
  import { L1TxUtilsWithBlobs } from '@aztec/ethereum/l1-tx-utils-with-blobs';
8
- import { EthCheatCodesWithState } from '@aztec/ethereum/test';
7
+ import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
9
8
  import { type Logger, createLogger } from '@aztec/foundation/log';
10
9
  import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
11
10
  import { SpamContract } from '@aztec/noir-contracts.js/Spam';
@@ -8,18 +8,17 @@ import { type Archiver, createArchiver } from '@aztec/archiver';
8
8
  import {
9
9
  type AccountWalletWithSecretKey,
10
10
  type AztecNode,
11
- type CheatCodes,
12
11
  type CompleteAddress,
13
- type DeployL1ContractsReturnType,
14
12
  EthAddress,
15
13
  type Logger,
16
14
  type PXE,
17
15
  createLogger,
18
- deployL1Contract,
19
16
  } from '@aztec/aztec.js';
17
+ import { CheatCodes } from '@aztec/aztec.js/testing';
20
18
  import { BBCircuitVerifier, type ClientProtocolCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
21
19
  import { createBlobSinkClient } from '@aztec/blob-sink/client';
22
20
  import type { BlobSinkServer } from '@aztec/blob-sink/server';
21
+ import { type DeployL1ContractsReturnType, deployL1Contract } from '@aztec/ethereum';
23
22
  import { Buffer32 } from '@aztec/foundation/buffer';
24
23
  import { HonkVerifierAbi, HonkVerifierBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
25
24
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
@@ -1,5 +1,5 @@
1
- import { type Logger, deployL1Contracts } from '@aztec/aztec.js';
2
- import type { DeployL1ContractsArgs, L1ContractsConfig } from '@aztec/ethereum';
1
+ import type { Logger } from '@aztec/aztec.js';
2
+ import { type DeployL1ContractsArgs, type L1ContractsConfig, deployL1Contracts } from '@aztec/ethereum';
3
3
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
4
4
  import { ProtocolContractAddress, protocolContractTreeRoot } from '@aztec/protocol-contracts';
5
5
 
@@ -2,23 +2,25 @@ import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
2
2
  import { type InitialAccountData, deployFundedSchnorrAccounts, generateSchnorrAccounts } from '@aztec/accounts/testing';
3
3
  import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
4
4
  import {
5
- AnvilTestWatcher,
6
5
  type AztecAddress,
7
6
  BatchCall,
8
- type Capsule,
9
- CheatCodes,
10
7
  type CompleteAddress,
11
8
  type ContractFunctionInteraction,
12
- type DeployL1ContractsReturnType,
13
- type FunctionCall,
14
9
  type Logger,
15
10
  type PXE,
16
11
  type Wallet,
17
12
  getContractClassFromArtifact,
18
13
  } from '@aztec/aztec.js';
19
14
  import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
15
+ import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
20
16
  import { type BlobSinkServer, createBlobSinkServer } from '@aztec/blob-sink/server';
21
- import { type DeployL1ContractsArgs, createL1Clients, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum';
17
+ import {
18
+ type DeployL1ContractsArgs,
19
+ type DeployL1ContractsReturnType,
20
+ createL1Clients,
21
+ getL1ContractsConfigEnvVars,
22
+ l1Artifacts,
23
+ } from '@aztec/ethereum';
22
24
  import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
23
25
  import { asyncMap } from '@aztec/foundation/async-map';
24
26
  import { randomBytes } from '@aztec/foundation/crypto';
@@ -306,16 +308,6 @@ async function setupFromFresh(
306
308
  }
307
309
  aztecNodeConfig.blobSinkUrl = `http://localhost:${blobSinkPort}`;
308
310
 
309
- // Setup blob sink service
310
- const blobSink = await createBlobSinkServer({
311
- port: blobSinkPort,
312
- dataStoreConfig: {
313
- dataDirectory: aztecNodeConfig.dataDirectory,
314
- dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
315
- },
316
- });
317
- await blobSink.start();
318
-
319
311
  // Start anvil. We go via a wrapper script to ensure if the parent dies, anvil dies.
320
312
  logger.verbose('Starting anvil...');
321
313
  const res = await startAnvil({ l1BlockTime: opts.ethereumSlotDuration });
@@ -401,6 +393,22 @@ async function setupFromFresh(
401
393
 
402
394
  const telemetry = getEndToEndTestTelemetryClient(opts.metricsPort);
403
395
 
396
+ // Setup blob sink service
397
+ const blobSink = await createBlobSinkServer(
398
+ {
399
+ l1ChainId: aztecNodeConfig.l1ChainId,
400
+ l1RpcUrls: aztecNodeConfig.l1RpcUrls,
401
+ rollupAddress: aztecNodeConfig.l1Contracts.rollupAddress,
402
+ port: blobSinkPort,
403
+ dataStoreConfig: {
404
+ dataDirectory: aztecNodeConfig.dataDirectory,
405
+ dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
406
+ },
407
+ },
408
+ telemetry,
409
+ );
410
+ await blobSink.start();
411
+
404
412
  logger.verbose('Creating and synching an aztec node...');
405
413
  const dateProvider = new TestDateProvider();
406
414
  const aztecNode = await AztecNodeService.createAndSync(
@@ -475,15 +483,6 @@ async function setupFromState(statePath: string, logger: Logger): Promise<Subsys
475
483
  JSON.parse(readFileSync(`${statePath}/accounts.json`, 'utf-8'), reviver) || [];
476
484
  const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts.map(a => a.address));
477
485
 
478
- const blobSink = await createBlobSinkServer({
479
- port: blobSinkPort,
480
- dataStoreConfig: {
481
- dataDirectory: statePath,
482
- dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
483
- },
484
- });
485
- await blobSink.start();
486
-
487
486
  // Start anvil. We go via a wrapper script to ensure if the parent dies, anvil dies.
488
487
  const { anvil, rpcUrl } = await startAnvil();
489
488
  aztecNodeConfig.l1RpcUrls = [rpcUrl];
@@ -515,9 +514,24 @@ async function setupFromState(statePath: string, logger: Logger): Promise<Subsys
515
514
  );
516
515
  await watcher.start();
517
516
 
518
- logger.verbose('Creating aztec node...');
519
517
  const telemetry = initTelemetryClient(getTelemetryConfig());
520
518
  const dateProvider = new TestDateProvider();
519
+ const blobSink = await createBlobSinkServer(
520
+ {
521
+ l1ChainId: aztecNodeConfig.l1ChainId,
522
+ l1RpcUrls: aztecNodeConfig.l1RpcUrls,
523
+ rollupAddress: aztecNodeConfig.l1Contracts.rollupAddress,
524
+ port: blobSinkPort,
525
+ dataStoreConfig: {
526
+ dataDirectory: statePath,
527
+ dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
528
+ },
529
+ },
530
+ telemetry,
531
+ );
532
+ await blobSink.start();
533
+
534
+ logger.verbose('Creating aztec node...');
521
535
  const aztecNode = await AztecNodeService.createAndSync(
522
536
  aztecNodeConfig,
523
537
  { telemetry, dateProvider },
@@ -604,14 +618,12 @@ export async function publicDeployAccounts(
604
618
  const contractClass = await getContractClassFromArtifact(SchnorrAccountContractArtifact);
605
619
  const alreadyRegistered = (await sender.getContractClassMetadata(contractClass.id)).isContractClassPubliclyRegistered;
606
620
 
607
- const fns: ContractFunctionInteraction[] = await Promise.all([
621
+ const calls: ContractFunctionInteraction[] = await Promise.all([
608
622
  ...(!alreadyRegistered ? [registerContractClass(sender, SchnorrAccountContractArtifact)] : []),
609
623
  ...instances.map(instance => deployInstance(sender, instance!)),
610
624
  ]);
611
- const calls: FunctionCall[] = await Promise.all(fns.map(fn => fn.request()));
612
- const capsules: Capsule[] = fns.map(fn => fn.getCapsules()).flat();
613
625
 
614
626
  const batch = new BatchCall(sender, calls);
615
- batch.addCapsules(capsules);
627
+
616
628
  await batch.send().wait({ proven: waitUntilProven });
617
629
  }
@@ -10,13 +10,10 @@ import { type Archiver, createArchiver } from '@aztec/archiver';
10
10
  import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
11
11
  import {
12
12
  type AccountWalletWithSecretKey,
13
- AnvilTestWatcher,
14
13
  type AztecAddress,
15
14
  type AztecNode,
16
15
  BatchCall,
17
- CheatCodes,
18
16
  type ContractMethod,
19
- type DeployL1ContractsReturnType,
20
17
  FeeJuicePaymentMethod,
21
18
  type Logger,
22
19
  type PXE,
@@ -25,20 +22,22 @@ import {
25
22
  createAztecNodeClient,
26
23
  createLogger,
27
24
  createPXEClient,
28
- deployL1Contracts,
29
25
  makeFetch,
30
26
  waitForPXE,
31
27
  } from '@aztec/aztec.js';
32
28
  import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
29
+ import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
33
30
  import type { BBNativePrivateKernelProver } from '@aztec/bb-prover';
34
31
  import { createBlobSinkClient } from '@aztec/blob-sink/client';
35
32
  import { type BlobSinkServer, createBlobSinkServer } from '@aztec/blob-sink/server';
36
33
  import { FEE_JUICE_INITIAL_MINT, GENESIS_ARCHIVE_ROOT, GENESIS_BLOCK_HASH } from '@aztec/constants';
37
34
  import {
38
35
  type DeployL1ContractsArgs,
36
+ type DeployL1ContractsReturnType,
39
37
  ForwarderContract,
40
38
  NULL_KEY,
41
39
  createL1Clients,
40
+ deployL1Contracts,
42
41
  getL1ContractsConfigEnvVars,
43
42
  isAnvilTestChain,
44
43
  l1Artifacts,
@@ -408,12 +407,6 @@ export async function setup(
408
407
  return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts);
409
408
  }
410
409
 
411
- // Blob sink service - blobs get posted here and served from here
412
- const blobSinkPort = await getPort();
413
- const blobSink = await createBlobSinkServer({ port: blobSinkPort });
414
- await blobSink.start();
415
- config.blobSinkUrl = `http://localhost:${blobSinkPort}`;
416
-
417
410
  const initialFundedAccounts =
418
411
  opts.initialFundedAccounts ??
419
412
  (await generateSchnorrAccounts(opts.numberOfInitialFundedAccounts ?? numberOfAccounts));
@@ -475,6 +468,22 @@ export async function setup(
475
468
 
476
469
  await watcher.start();
477
470
 
471
+ const telemetry = getTelemetryClient(opts.telemetryConfig);
472
+
473
+ // Blob sink service - blobs get posted here and served from here
474
+ const blobSinkPort = await getPort();
475
+ const blobSink = await createBlobSinkServer(
476
+ {
477
+ l1ChainId: config.l1ChainId,
478
+ l1RpcUrls: config.l1RpcUrls,
479
+ rollupAddress: config.l1Contracts.rollupAddress,
480
+ port: blobSinkPort,
481
+ },
482
+ telemetry,
483
+ );
484
+ await blobSink.start();
485
+ config.blobSinkUrl = `http://localhost:${blobSinkPort}`;
486
+
478
487
  logger.verbose('Creating and synching an aztec node...');
479
488
 
480
489
  const acvmConfig = await getACVMConfig(logger);
@@ -490,8 +499,6 @@ export async function setup(
490
499
  }
491
500
  config.l1PublishRetryIntervalMS = 100;
492
501
 
493
- const telemetry = getTelemetryClient(opts.telemetryConfig);
494
-
495
502
  const blobSinkClient = createBlobSinkClient(config);
496
503
  const aztecNode = await AztecNodeService.createAndSync(
497
504
  config,
@@ -628,10 +635,8 @@ export async function ensureAccountsPubliclyDeployed(sender: Wallet, accountsToD
628
635
  if (!(await sender.getContractClassMetadata(contractClass.id, true)).isContractClassPubliclyRegistered) {
629
636
  await (await registerContractClass(sender, SchnorrAccountContractArtifact)).send().wait();
630
637
  }
631
- const requests = await Promise.all(
632
- instances.map(async instance => (await deployInstance(sender, instance!)).request()),
633
- );
634
- const batch = new BatchCall(sender, [...requests]);
638
+ const requests = await Promise.all(instances.map(async instance => await deployInstance(sender, instance!)));
639
+ const batch = new BatchCall(sender, requests);
635
640
  await batch.send().wait();
636
641
  }
637
642
  // docs:end:public_deploy_accounts
@@ -15,10 +15,14 @@ import {
15
15
  type SiblingPath,
16
16
  type TxReceipt,
17
17
  type Wallet,
18
- deployL1Contract,
19
18
  retryUntil,
20
19
  } from '@aztec/aztec.js';
21
- import type { L1ContractAddresses, ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
20
+ import {
21
+ type L1ContractAddresses,
22
+ type ViemPublicClient,
23
+ type ViemWalletClient,
24
+ deployL1Contract,
25
+ } from '@aztec/ethereum';
22
26
  import { TestERC20Abi, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-artifacts';
23
27
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
24
28
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
@@ -2,7 +2,6 @@ import {
2
2
  type AccountWallet,
3
3
  AztecAddress,
4
4
  type AztecNode,
5
- type CheatCodes,
6
5
  EthAddress,
7
6
  Fr,
8
7
  type Logger,
@@ -10,6 +9,7 @@ import {
10
9
  computeAuthWitMessageHash,
11
10
  generateClaimSecret,
12
11
  } from '@aztec/aztec.js';
12
+ import { CheatCodes } from '@aztec/aztec.js/testing';
13
13
  import {
14
14
  type DeployL1ContractsReturnType,
15
15
  type ViemPublicClient,
@@ -1,5 +1,6 @@
1
1
  // Convenience struct to hold an account's address and secret that can easily be passed around.
2
- import { AztecAddress, type CheatCodes, Fr } from '@aztec/aztec.js';
2
+ import { AztecAddress, Fr } from '@aztec/aztec.js';
3
+ import { CheatCodes } from '@aztec/aztec.js/testing';
3
4
  import { pedersenHash } from '@aztec/foundation/crypto';
4
5
  import type { TestDateProvider } from '@aztec/foundation/timer';
5
6
  import type { RollupAbi } from '@aztec/l1-artifacts';
@@ -97,10 +97,10 @@ export class TokenSimulator {
97
97
 
98
98
  async checkPublic() {
99
99
  // public calls
100
- const calls = [await this.token.methods.total_supply().request()];
101
- for (const address of this.accounts) {
102
- calls.push(await this.token.methods.balance_of_public(address).request());
103
- }
100
+ const calls = [
101
+ this.token.methods.total_supply(),
102
+ ...this.accounts.map(address => this.token.methods.balance_of_public(address)),
103
+ ];
104
104
 
105
105
  const results = (
106
106
  await Promise.all(chunk(calls, 4).map(batch => new BatchCall(this.defaultWallet, batch).simulate()))
@@ -126,10 +126,7 @@ export class TokenSimulator {
126
126
  }
127
127
  }
128
128
 
129
- const defaultCalls = [];
130
- for (const address of defaultLookups) {
131
- defaultCalls.push(await this.token.methods.balance_of_private(address).request());
132
- }
129
+ const defaultCalls = defaultLookups.map(address => this.token.methods.balance_of_private(address));
133
130
  const results = (
134
131
  await Promise.all(chunk(defaultCalls, 4).map(batch => new BatchCall(this.defaultWallet, batch).simulate()))
135
132
  ).flat();