@aztec/end-to-end 0.0.1-commit.2ed92850 → 0.0.1-commit.343b43af6
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.
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +19 -11
- package/dest/bench/client_flows/config.d.ts +2 -2
- package/dest/bench/client_flows/config.d.ts.map +1 -1
- package/dest/bench/client_flows/config.js +18 -0
- package/dest/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +6 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +4 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +22 -12
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +3 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +15 -7
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +86 -41
- package/dest/e2e_fees/fees_test.d.ts +2 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +18 -11
- package/dest/e2e_l1_publisher/write_json.d.ts +3 -2
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +1 -7
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +4 -6
- package/dest/e2e_p2p/p2p_network.d.ts +5 -4
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +24 -7
- package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
- package/dest/e2e_p2p/reqresp/utils.js +190 -0
- package/dest/e2e_p2p/shared.d.ts +22 -2
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +40 -5
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
- package/dest/e2e_token_contract/token_contract_test.d.ts +4 -2
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +19 -9
- package/dest/fixtures/authwit_proxy.d.ts +15 -0
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
- package/dest/fixtures/authwit_proxy.js +30 -0
- package/dest/fixtures/e2e_prover_test.d.ts +4 -4
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +34 -41
- package/dest/fixtures/elu_monitor.d.ts +21 -0
- package/dest/fixtures/elu_monitor.d.ts.map +1 -0
- package/dest/fixtures/elu_monitor.js +102 -0
- package/dest/fixtures/fixtures.d.ts +5 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +6 -0
- package/dest/fixtures/ha_setup.d.ts +71 -0
- package/dest/fixtures/ha_setup.d.ts.map +1 -0
- package/dest/fixtures/ha_setup.js +116 -0
- package/dest/fixtures/index.d.ts +2 -1
- package/dest/fixtures/index.d.ts.map +1 -1
- package/dest/fixtures/index.js +1 -0
- package/dest/fixtures/setup.d.ts +46 -25
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +83 -167
- package/dest/fixtures/setup_p2p_test.d.ts +16 -9
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +40 -29
- package/dest/fixtures/token_utils.d.ts +2 -2
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +5 -4
- package/dest/shared/cross_chain_test_harness.d.ts +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +13 -13
- package/dest/shared/gas_portal_test_harness.js +2 -2
- package/dest/shared/index.d.ts +2 -1
- package/dest/shared/index.d.ts.map +1 -1
- package/dest/shared/index.js +1 -0
- package/dest/shared/jest_setup.js +41 -1
- package/dest/shared/mock_state_view.d.ts +86 -0
- package/dest/shared/mock_state_view.d.ts.map +1 -0
- package/dest/shared/mock_state_view.js +186 -0
- package/dest/shared/submit-transactions.d.ts +2 -2
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +13 -11
- package/dest/simulators/lending_simulator.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +2 -2
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +3 -24
- package/dest/spartan/setup_test_wallets.d.ts +12 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +54 -11
- package/dest/spartan/tx_metrics.d.ts +35 -1
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +151 -1
- package/dest/spartan/utils/bot.d.ts +3 -2
- package/dest/spartan/utils/bot.d.ts.map +1 -1
- package/dest/spartan/utils/bot.js +2 -1
- package/dest/spartan/utils/config.d.ts +10 -1
- package/dest/spartan/utils/config.d.ts.map +1 -1
- package/dest/spartan/utils/config.js +4 -1
- package/dest/spartan/utils/index.d.ts +6 -4
- package/dest/spartan/utils/index.d.ts.map +1 -1
- package/dest/spartan/utils/index.js +6 -2
- package/dest/spartan/utils/k8s.d.ts +31 -1
- package/dest/spartan/utils/k8s.d.ts.map +1 -1
- package/dest/spartan/utils/k8s.js +124 -0
- package/dest/spartan/utils/nodes.d.ts +14 -5
- package/dest/spartan/utils/nodes.d.ts.map +1 -1
- package/dest/spartan/utils/nodes.js +204 -33
- package/dest/spartan/utils/pod_logs.d.ts +25 -0
- package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
- package/dest/spartan/utils/pod_logs.js +74 -0
- package/dest/spartan/utils/scripts.d.ts +18 -4
- package/dest/spartan/utils/scripts.d.ts.map +1 -1
- package/dest/spartan/utils/scripts.js +19 -4
- package/dest/test-wallet/test_wallet.d.ts +83 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +214 -0
- package/dest/test-wallet/utils.d.ts +41 -0
- package/dest/test-wallet/utils.d.ts.map +1 -0
- package/dest/test-wallet/utils.js +71 -0
- package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
- package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
- package/dest/test-wallet/wallet_worker_script.js +48 -0
- package/dest/test-wallet/worker_wallet.d.ts +52 -0
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet.js +151 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts +274 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet_schema.js +10 -0
- package/package.json +46 -43
- package/src/bench/client_flows/client_flows_benchmark.ts +42 -38
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/utils.ts +8 -3
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +28 -15
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -8
- package/src/e2e_deploy_contract/deploy_test.ts +3 -3
- package/src/e2e_epochs/epochs_test.ts +104 -72
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +20 -28
- package/src/e2e_l1_publisher/write_json.ts +1 -6
- package/src/e2e_nested_contract/nested_contract_test.ts +7 -5
- package/src/e2e_p2p/inactivity_slash_test.ts +4 -4
- package/src/e2e_p2p/p2p_network.ts +36 -10
- package/src/e2e_p2p/reqresp/utils.ts +256 -0
- package/src/e2e_p2p/shared.ts +68 -5
- package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
- package/src/e2e_token_contract/token_contract_test.ts +26 -9
- package/src/fixtures/authwit_proxy.ts +50 -0
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +40 -44
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +10 -0
- package/src/fixtures/ha_setup.ts +186 -0
- package/src/fixtures/index.ts +1 -0
- package/src/fixtures/setup.ts +113 -227
- package/src/fixtures/setup_p2p_test.ts +40 -44
- package/src/fixtures/token_utils.ts +6 -3
- package/src/guides/up_quick_start.sh +3 -3
- package/src/shared/cross_chain_test_harness.ts +13 -9
- package/src/shared/gas_portal_test_harness.ts +1 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/jest_setup.ts +51 -1
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +3 -2
- package/src/shared/uniswap_l1_l2.ts +15 -15
- package/src/simulators/lending_simulator.ts +4 -2
- package/src/simulators/token_simulator.ts +6 -30
- package/src/spartan/setup_test_wallets.ts +102 -17
- package/src/spartan/tx_metrics.ts +127 -1
- package/src/spartan/utils/bot.ts +4 -1
- package/src/spartan/utils/config.ts +3 -0
- package/src/spartan/utils/index.ts +10 -1
- package/src/spartan/utils/k8s.ts +160 -0
- package/src/spartan/utils/nodes.ts +251 -31
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/spartan/utils/scripts.ts +43 -7
- package/src/test-wallet/test_wallet.ts +306 -0
- package/src/test-wallet/utils.ts +112 -0
- package/src/test-wallet/wallet_worker_script.ts +60 -0
- package/src/test-wallet/worker_wallet.ts +213 -0
- package/src/test-wallet/worker_wallet_schema.ts +13 -0
package/src/fixtures/setup.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
|
|
2
|
-
import { type InitialAccountData, generateSchnorrAccounts
|
|
3
|
-
import { type Archiver, createArchiver } from '@aztec/archiver';
|
|
2
|
+
import { type InitialAccountData, generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
4
3
|
import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
5
4
|
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
6
5
|
import {
|
|
@@ -13,10 +12,9 @@ import {
|
|
|
13
12
|
import { publishContractClass, publishInstance } from '@aztec/aztec.js/deployment';
|
|
14
13
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
15
14
|
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
16
|
-
import {
|
|
15
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
17
16
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
18
17
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
|
|
19
|
-
import { createBlobClientWithFileStores } from '@aztec/blob-client/client';
|
|
20
18
|
import { SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
21
19
|
import { isAnvilTestChain } from '@aztec/ethereum/chain';
|
|
22
20
|
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
@@ -30,35 +28,28 @@ import {
|
|
|
30
28
|
type ZKPassportArgs,
|
|
31
29
|
deployAztecL1Contracts,
|
|
32
30
|
} from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
33
|
-
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
EthCheatCodesWithState,
|
|
37
|
-
createDelayedL1TxUtilsFromViemWallet,
|
|
38
|
-
startAnvil,
|
|
39
|
-
} from '@aztec/ethereum/test';
|
|
31
|
+
import type { Delayer } from '@aztec/ethereum/l1-tx-utils';
|
|
32
|
+
import { EthCheatCodes, EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test';
|
|
33
|
+
import type { Anvil } from '@aztec/ethereum/test';
|
|
40
34
|
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
41
35
|
import { SecretValue } from '@aztec/foundation/config';
|
|
42
36
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
43
37
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
44
|
-
import {
|
|
38
|
+
import { withLoggerBindings } from '@aztec/foundation/log/server';
|
|
45
39
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
46
40
|
import { sleep } from '@aztec/foundation/sleep';
|
|
47
41
|
import { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
|
|
48
|
-
import type { DataStoreConfig } from '@aztec/kv-store/config';
|
|
49
42
|
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
50
43
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
51
44
|
import type { P2PClientDeps } from '@aztec/p2p';
|
|
52
45
|
import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
53
46
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
54
|
-
import
|
|
47
|
+
import type { ProverNodeConfig } from '@aztec/prover-node';
|
|
55
48
|
import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server';
|
|
56
49
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
57
|
-
import type { TestSequencerClient } from '@aztec/sequencer-client/test';
|
|
58
50
|
import { type ContractInstanceWithAddress, getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
59
51
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
60
52
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
61
|
-
import type { P2PClientType } from '@aztec/stdlib/p2p';
|
|
62
53
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
63
54
|
import {
|
|
64
55
|
type TelemetryClient,
|
|
@@ -67,10 +58,9 @@ import {
|
|
|
67
58
|
initTelemetryClient,
|
|
68
59
|
} from '@aztec/telemetry-client';
|
|
69
60
|
import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
70
|
-
import {
|
|
61
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
71
62
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
72
63
|
|
|
73
|
-
import type { Anvil } from '@viem/anvil';
|
|
74
64
|
import fs from 'fs/promises';
|
|
75
65
|
import { tmpdir } from 'os';
|
|
76
66
|
import path from 'path';
|
|
@@ -84,6 +74,7 @@ import {
|
|
|
84
74
|
} from 'viem/accounts';
|
|
85
75
|
import { type Chain, foundry } from 'viem/chains';
|
|
86
76
|
|
|
77
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
87
78
|
import { MNEMONIC, TEST_MAX_PENDING_TX_POOL_COUNT, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
|
|
88
79
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
89
80
|
import { getBBConfig } from './get_bb_config.js';
|
|
@@ -92,9 +83,6 @@ import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
|
|
|
92
83
|
|
|
93
84
|
export { startAnvil };
|
|
94
85
|
|
|
95
|
-
const { AZTEC_NODE_URL = '' } = process.env;
|
|
96
|
-
const getAztecUrl = () => AZTEC_NODE_URL;
|
|
97
|
-
|
|
98
86
|
let telemetry: TelemetryClient | undefined = undefined;
|
|
99
87
|
async function getTelemetryClient(partialConfig: Partial<TelemetryClientConfig> & { benchmark?: boolean } = {}) {
|
|
100
88
|
if (!telemetry) {
|
|
@@ -125,14 +113,14 @@ export async function setupSharedBlobStorage(config: { dataDirectory?: string }
|
|
|
125
113
|
* @param aztecNode - An instance of Aztec Node.
|
|
126
114
|
* @param opts - Partial configuration for the PXE.
|
|
127
115
|
* @param logger - The logger to be used.
|
|
128
|
-
* @param
|
|
116
|
+
* @param actor - Actor label to include in log output (e.g., 'pxe-test').
|
|
129
117
|
* @returns A test wallet, logger and teardown function.
|
|
130
118
|
*/
|
|
131
119
|
export async function setupPXEAndGetWallet(
|
|
132
120
|
aztecNode: AztecNode,
|
|
133
121
|
opts: Partial<PXEConfig> = {},
|
|
134
122
|
logger = getLogger(),
|
|
135
|
-
|
|
123
|
+
actor?: string,
|
|
136
124
|
): Promise<{
|
|
137
125
|
wallet: TestWallet;
|
|
138
126
|
logger: Logger;
|
|
@@ -150,9 +138,7 @@ export async function setupPXEAndGetWallet(
|
|
|
150
138
|
|
|
151
139
|
const teardown = configuredDataDirectory ? () => Promise.resolve() : () => tryRmDir(PXEConfig.dataDirectory!);
|
|
152
140
|
|
|
153
|
-
const wallet = await TestWallet.create(aztecNode, PXEConfig, {
|
|
154
|
-
useLogSuffix,
|
|
155
|
-
});
|
|
141
|
+
const wallet = await TestWallet.create(aztecNode, PXEConfig, { loggerActorLabel: actor });
|
|
156
142
|
|
|
157
143
|
return {
|
|
158
144
|
wallet,
|
|
@@ -199,6 +185,11 @@ export type SetupOptions = {
|
|
|
199
185
|
anvilAccounts?: number;
|
|
200
186
|
/** Port to start anvil (defaults to 8545) */
|
|
201
187
|
anvilPort?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Number of slots per epoch for Anvil's finality simulation.
|
|
190
|
+
* Anvil reports `finalized = latest - slotsInAnEpoch * 2`.
|
|
191
|
+
*/
|
|
192
|
+
anvilSlotsInAnEpoch?: number;
|
|
202
193
|
/** Key to use for publishing L1 contracts */
|
|
203
194
|
l1PublisherKey?: SecretValue<`0x${string}`>;
|
|
204
195
|
/** ZkPassport configuration (domain, scope, mock verifier) */
|
|
@@ -219,13 +210,13 @@ export type EndToEndContext = {
|
|
|
219
210
|
anvil: Anvil | undefined;
|
|
220
211
|
/** The Aztec Node service or client a connected to it. */
|
|
221
212
|
aztecNode: AztecNode;
|
|
222
|
-
/** The Aztec Node as a service
|
|
223
|
-
aztecNodeService: AztecNodeService
|
|
224
|
-
/** Client to the Aztec Node admin interface
|
|
225
|
-
aztecNodeAdmin: AztecNodeAdmin
|
|
226
|
-
/** The prover node
|
|
227
|
-
proverNode:
|
|
228
|
-
/** A client to the sequencer service
|
|
213
|
+
/** The Aztec Node as a service. */
|
|
214
|
+
aztecNodeService: AztecNodeService;
|
|
215
|
+
/** Client to the Aztec Node admin interface. */
|
|
216
|
+
aztecNodeAdmin: AztecNodeAdmin;
|
|
217
|
+
/** The aztec node running the prover node subsystem (only set if startProverNode is true). */
|
|
218
|
+
proverNode: AztecNodeService | undefined;
|
|
219
|
+
/** A client to the sequencer service. */
|
|
229
220
|
sequencer: SequencerClient | undefined;
|
|
230
221
|
/** Return values from deployAztecL1Contracts function. */
|
|
231
222
|
deployL1ContractsValues: DeployAztecL1ContractsReturnType;
|
|
@@ -245,14 +236,18 @@ export type EndToEndContext = {
|
|
|
245
236
|
cheatCodes: CheatCodes;
|
|
246
237
|
/** The cheat codes for L1 */
|
|
247
238
|
ethCheatCodes: EthCheatCodes;
|
|
248
|
-
/** The anvil test watcher
|
|
249
|
-
watcher: AnvilTestWatcher
|
|
250
|
-
/** Allows tweaking current system time, used by the epoch cache only
|
|
251
|
-
dateProvider: TestDateProvider
|
|
239
|
+
/** The anvil test watcher. */
|
|
240
|
+
watcher: AnvilTestWatcher;
|
|
241
|
+
/** Allows tweaking current system time, used by the epoch cache only. */
|
|
242
|
+
dateProvider: TestDateProvider;
|
|
252
243
|
/** Telemetry client */
|
|
253
|
-
telemetryClient: TelemetryClient
|
|
244
|
+
telemetryClient: TelemetryClient;
|
|
254
245
|
/** Mock gossip sub network used for gossipping messages (only if mockGossipSubNetwork was set to true in opts) */
|
|
255
246
|
mockGossipSubNetwork: MockGossipSubNetwork | undefined;
|
|
247
|
+
/** Delayer for sequencer L1 txs (only when enableDelayer is true). */
|
|
248
|
+
sequencerDelayer: Delayer | undefined;
|
|
249
|
+
/** Delayer for prover node L1 txs (only when enableDelayer and startProverNode are true). */
|
|
250
|
+
proverDelayer: Delayer | undefined;
|
|
256
251
|
/** Prefilled public data used for setting up nodes. */
|
|
257
252
|
prefilledPublicData: PublicDataTreeLeaf[] | undefined;
|
|
258
253
|
/** ACVM config (only set if running locally). */
|
|
@@ -260,87 +255,11 @@ export type EndToEndContext = {
|
|
|
260
255
|
/** BB config (only set if running locally). */
|
|
261
256
|
bbConfig: Awaited<ReturnType<typeof getBBConfig>>;
|
|
262
257
|
/** Directory to cleanup on teardown. */
|
|
263
|
-
directoryToCleanup: string
|
|
258
|
+
directoryToCleanup: string;
|
|
264
259
|
/** Function to stop the started services. */
|
|
265
260
|
teardown: () => Promise<void>;
|
|
266
261
|
};
|
|
267
262
|
|
|
268
|
-
/**
|
|
269
|
-
* Function to setup the test against a remote deployment. It is assumed that L1 contract are already deployed
|
|
270
|
-
*/
|
|
271
|
-
async function setupWithRemoteEnvironment(
|
|
272
|
-
account: HDAccount | PrivateKeyAccount,
|
|
273
|
-
config: AztecNodeConfig & SetupOptions,
|
|
274
|
-
logger: Logger,
|
|
275
|
-
numberOfAccounts: number,
|
|
276
|
-
): Promise<EndToEndContext> {
|
|
277
|
-
const aztecNodeUrl = getAztecUrl();
|
|
278
|
-
logger.verbose(`Creating Aztec Node client to remote host ${aztecNodeUrl}`);
|
|
279
|
-
const aztecNode = createAztecNodeClient(aztecNodeUrl);
|
|
280
|
-
await waitForNode(aztecNode, logger);
|
|
281
|
-
logger.verbose('JSON RPC client connected to Aztec Node');
|
|
282
|
-
logger.verbose(`Retrieving contract addresses from ${aztecNodeUrl}`);
|
|
283
|
-
const { l1ContractAddresses, rollupVersion } = await aztecNode.getNodeInfo();
|
|
284
|
-
|
|
285
|
-
const l1Client = createExtendedL1Client(config.l1RpcUrls, account, foundry);
|
|
286
|
-
|
|
287
|
-
const deployL1ContractsValues: DeployAztecL1ContractsReturnType = {
|
|
288
|
-
l1ContractAddresses,
|
|
289
|
-
l1Client,
|
|
290
|
-
rollupVersion,
|
|
291
|
-
};
|
|
292
|
-
const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls, new DateProvider());
|
|
293
|
-
const wallet = await TestWallet.create(aztecNode);
|
|
294
|
-
|
|
295
|
-
if (config.walletMinFeePadding !== undefined) {
|
|
296
|
-
wallet.setMinFeePadding(config.walletMinFeePadding);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNode, new DateProvider());
|
|
300
|
-
const teardown = () => Promise.resolve();
|
|
301
|
-
|
|
302
|
-
logger.verbose('Populating wallet from already registered accounts...');
|
|
303
|
-
const initialFundedAccounts = await getInitialTestAccountsData();
|
|
304
|
-
|
|
305
|
-
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
306
|
-
throw new Error(`Required ${numberOfAccounts} accounts. Found ${initialFundedAccounts.length}.`);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
const testAccounts = await Promise.all(
|
|
310
|
-
initialFundedAccounts.slice(0, numberOfAccounts).map(async account => {
|
|
311
|
-
const accountManager = await wallet.createSchnorrAccount(account.secret, account.salt, account.signingKey);
|
|
312
|
-
return accountManager.address;
|
|
313
|
-
}),
|
|
314
|
-
);
|
|
315
|
-
|
|
316
|
-
return {
|
|
317
|
-
anvil: undefined,
|
|
318
|
-
aztecNode,
|
|
319
|
-
aztecNodeService: undefined,
|
|
320
|
-
aztecNodeAdmin: undefined,
|
|
321
|
-
sequencer: undefined,
|
|
322
|
-
proverNode: undefined,
|
|
323
|
-
deployL1ContractsValues,
|
|
324
|
-
config,
|
|
325
|
-
aztecNodeConfig: config,
|
|
326
|
-
initialFundedAccounts,
|
|
327
|
-
wallet,
|
|
328
|
-
accounts: testAccounts,
|
|
329
|
-
logger,
|
|
330
|
-
cheatCodes,
|
|
331
|
-
ethCheatCodes,
|
|
332
|
-
prefilledPublicData: undefined,
|
|
333
|
-
mockGossipSubNetwork: undefined,
|
|
334
|
-
watcher: undefined,
|
|
335
|
-
dateProvider: undefined,
|
|
336
|
-
telemetryClient: undefined,
|
|
337
|
-
acvmConfig: undefined,
|
|
338
|
-
bbConfig: undefined,
|
|
339
|
-
directoryToCleanup: undefined,
|
|
340
|
-
teardown,
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
263
|
/**
|
|
345
264
|
* Sets up the environment for the end-to-end tests.
|
|
346
265
|
* @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
|
|
@@ -368,8 +287,12 @@ export async function setup(
|
|
|
368
287
|
config.realProofs = !!opts.realProofs;
|
|
369
288
|
// Only enforce the time table if requested
|
|
370
289
|
config.enforceTimeTable = !!opts.enforceTimeTable;
|
|
290
|
+
// Enable the tx delayer for tests (default config has it disabled, so we force-enable it here)
|
|
291
|
+
config.enableDelayer = true;
|
|
371
292
|
config.listenAddress = '127.0.0.1';
|
|
372
293
|
|
|
294
|
+
config.minTxPoolAgeMs = opts.minTxPoolAgeMs ?? 0;
|
|
295
|
+
|
|
373
296
|
const logger = getLogger();
|
|
374
297
|
|
|
375
298
|
// Create a temp directory for any services that need it and cleanup later
|
|
@@ -383,16 +306,11 @@ export async function setup(
|
|
|
383
306
|
if (!isAnvilTestChain(chain.id)) {
|
|
384
307
|
throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
|
|
385
308
|
}
|
|
386
|
-
if (AZTEC_NODE_URL) {
|
|
387
|
-
throw new Error(
|
|
388
|
-
`AZTEC_NODE_URL provided but no ETHEREUM_HOSTS set. Refusing to run, please set both variables so tests can deploy L1 contracts to the same Anvil instance`,
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
309
|
const res = await startAnvil({
|
|
393
310
|
l1BlockTime: opts.ethereumSlotDuration,
|
|
394
311
|
accounts: opts.anvilAccounts,
|
|
395
|
-
port: opts.anvilPort,
|
|
312
|
+
port: opts.anvilPort ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : undefined),
|
|
313
|
+
slotsInAnEpoch: opts.anvilSlotsInAnEpoch,
|
|
396
314
|
});
|
|
397
315
|
anvil = res.anvil;
|
|
398
316
|
config.l1RpcUrls = [res.rpcUrl];
|
|
@@ -423,11 +341,11 @@ export async function setup(
|
|
|
423
341
|
publisherPrivKeyHex = opts.l1PublisherKey.getValue();
|
|
424
342
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
425
343
|
} else if (
|
|
426
|
-
config.
|
|
427
|
-
config.
|
|
428
|
-
config.
|
|
344
|
+
config.sequencerPublisherPrivateKeys &&
|
|
345
|
+
config.sequencerPublisherPrivateKeys.length > 0 &&
|
|
346
|
+
config.sequencerPublisherPrivateKeys[0].getValue() != NULL_KEY
|
|
429
347
|
) {
|
|
430
|
-
publisherPrivKeyHex = config.
|
|
348
|
+
publisherPrivKeyHex = config.sequencerPublisherPrivateKeys[0].getValue();
|
|
431
349
|
publisherHdAccount = privateKeyToAccount(publisherPrivKeyHex);
|
|
432
350
|
} else if (!MNEMONIC) {
|
|
433
351
|
throw new Error(`Mnemonic not provided and no publisher private key`);
|
|
@@ -436,18 +354,13 @@ export async function setup(
|
|
|
436
354
|
const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
|
|
437
355
|
const publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
|
|
438
356
|
publisherPrivKeyHex = `0x${publisherPrivKey!.toString('hex')}` as const;
|
|
439
|
-
config.
|
|
357
|
+
config.sequencerPublisherPrivateKeys = [new SecretValue(publisherPrivKeyHex)];
|
|
440
358
|
}
|
|
441
359
|
|
|
442
360
|
if (config.coinbase === undefined) {
|
|
443
361
|
config.coinbase = EthAddress.fromString(publisherHdAccount.address);
|
|
444
362
|
}
|
|
445
363
|
|
|
446
|
-
if (AZTEC_NODE_URL) {
|
|
447
|
-
// we are setting up against a remote environment, l1 contracts are assumed to already be deployed
|
|
448
|
-
return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
364
|
// Determine which addresses to fund in genesis
|
|
452
365
|
const initialFundedAccounts =
|
|
453
366
|
opts.initialFundedAccounts ??
|
|
@@ -504,9 +417,14 @@ export async function setup(
|
|
|
504
417
|
if (enableAutomine) {
|
|
505
418
|
await ethCheatCodes.setAutomine(false);
|
|
506
419
|
await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
|
|
507
|
-
dateProvider.setTime((await ethCheatCodes.timestamp()) * 1000);
|
|
508
420
|
}
|
|
509
421
|
|
|
422
|
+
// Always sync dateProvider to L1 time after deploying L1 contracts, regardless of mining mode.
|
|
423
|
+
// In compose mode, L1 time may have drifted ahead of system time due to the local-network watcher
|
|
424
|
+
// warping time forward on each filled slot. Without this sync, the sequencer computes the wrong
|
|
425
|
+
// slot from its dateProvider and cannot propose blocks.
|
|
426
|
+
dateProvider.setTime((await ethCheatCodes.timestamp()) * 1000);
|
|
427
|
+
|
|
510
428
|
if (opts.l2StartTime) {
|
|
511
429
|
await ethCheatCodes.warp(opts.l2StartTime, { resetBlockInterval: true });
|
|
512
430
|
}
|
|
@@ -543,7 +461,7 @@ export async function setup(
|
|
|
543
461
|
}
|
|
544
462
|
|
|
545
463
|
let mockGossipSubNetwork: MockGossipSubNetwork | undefined;
|
|
546
|
-
let p2pClientDeps: P2PClientDeps
|
|
464
|
+
let p2pClientDeps: P2PClientDeps | undefined = undefined;
|
|
547
465
|
|
|
548
466
|
if (opts.mockGossipSubNetwork) {
|
|
549
467
|
mockGossipSubNetwork = new MockGossipSubNetwork();
|
|
@@ -574,44 +492,48 @@ export async function setup(
|
|
|
574
492
|
}
|
|
575
493
|
}
|
|
576
494
|
|
|
577
|
-
const aztecNodeService = await
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
495
|
+
const aztecNodeService = await withLoggerBindings({ actor: 'node-0' }, () =>
|
|
496
|
+
AztecNodeService.createAndSync(
|
|
497
|
+
config,
|
|
498
|
+
{ dateProvider, telemetry: telemetryClient, p2pClientDeps },
|
|
499
|
+
{ prefilledPublicData },
|
|
500
|
+
),
|
|
581
501
|
);
|
|
582
502
|
const sequencerClient = aztecNodeService.getSequencer();
|
|
583
503
|
|
|
584
|
-
|
|
585
|
-
const publisher = (sequencerClient as TestSequencerClient).sequencer.publisher;
|
|
586
|
-
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration, l1Client);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
let proverNode: ProverNode | undefined = undefined;
|
|
504
|
+
let proverNode: AztecNodeService | undefined = undefined;
|
|
590
505
|
if (opts.startProverNode) {
|
|
591
506
|
logger.verbose('Creating and syncing a simulated prover node...');
|
|
592
507
|
const proverNodePrivateKey = getPrivateKeyFromIndex(2);
|
|
593
508
|
const proverNodePrivateKeyHex: Hex = `0x${proverNodePrivateKey!.toString('hex')}`;
|
|
594
509
|
const proverNodeDataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
510
|
+
|
|
511
|
+
const p2pClientDeps: Partial<P2PClientDeps> = {
|
|
512
|
+
p2pServiceFactory: mockGossipSubNetwork && getMockPubSubP2PServiceFactory(mockGossipSubNetwork!),
|
|
513
|
+
rpcTxProviders: [aztecNodeService],
|
|
599
514
|
};
|
|
600
|
-
|
|
515
|
+
|
|
516
|
+
({ proverNode } = await createAndSyncProverNode(
|
|
601
517
|
proverNodePrivateKeyHex,
|
|
602
518
|
config,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
519
|
+
{
|
|
520
|
+
...config.proverNodeConfig,
|
|
521
|
+
dataDirectory: proverNodeDataDirectory,
|
|
522
|
+
},
|
|
523
|
+
{ dateProvider, p2pClientDeps, telemetry: telemetryClient },
|
|
524
|
+
{ prefilledPublicData },
|
|
525
|
+
));
|
|
607
526
|
}
|
|
608
527
|
|
|
528
|
+
const sequencerDelayer = sequencerClient?.getDelayer();
|
|
529
|
+
const proverDelayer = proverNode?.getProverNode()?.getDelayer();
|
|
530
|
+
|
|
609
531
|
logger.verbose('Creating a pxe...');
|
|
610
532
|
const pxeConfig = { ...getPXEConfig(), ...pxeOpts };
|
|
611
533
|
pxeConfig.dataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
612
534
|
// For tests we only want proving enabled if specifically requested
|
|
613
535
|
pxeConfig.proverEnabled = !!pxeOpts.proverEnabled;
|
|
614
|
-
const wallet = await TestWallet.create(aztecNodeService, pxeConfig);
|
|
536
|
+
const wallet = await TestWallet.create(aztecNodeService, pxeConfig, { loggerActorLabel: 'pxe-0' });
|
|
615
537
|
|
|
616
538
|
if (opts.walletMinFeePadding !== undefined) {
|
|
617
539
|
wallet.setMinFeePadding(opts.walletMinFeePadding);
|
|
@@ -683,7 +605,7 @@ export async function setup(
|
|
|
683
605
|
logger.error(`Error during e2e test teardown`, err);
|
|
684
606
|
} finally {
|
|
685
607
|
try {
|
|
686
|
-
await telemetryClient
|
|
608
|
+
await telemetryClient.stop();
|
|
687
609
|
} catch (err) {
|
|
688
610
|
logger.error(`Error during telemetry client stop`, err);
|
|
689
611
|
}
|
|
@@ -706,6 +628,8 @@ export async function setup(
|
|
|
706
628
|
mockGossipSubNetwork,
|
|
707
629
|
prefilledPublicData,
|
|
708
630
|
proverNode,
|
|
631
|
+
sequencerDelayer,
|
|
632
|
+
proverDelayer,
|
|
709
633
|
sequencer: sequencerClient,
|
|
710
634
|
teardown,
|
|
711
635
|
telemetryClient,
|
|
@@ -789,93 +713,55 @@ export async function waitForProvenChain(node: AztecNode, targetBlock?: BlockNum
|
|
|
789
713
|
);
|
|
790
714
|
}
|
|
791
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Creates an AztecNodeService with the prover node enabled as a subsystem.
|
|
718
|
+
* Returns both the aztec node service (for lifecycle management) and the prover node (for test internals access).
|
|
719
|
+
*/
|
|
792
720
|
export function createAndSyncProverNode(
|
|
793
721
|
proverNodePrivateKey: `0x${string}`,
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
const proverConfig: ProverNodeConfig = {
|
|
817
|
-
...aztecNodeConfig,
|
|
818
|
-
txCollectionNodeRpcUrls: [],
|
|
819
|
-
realProofs: false,
|
|
820
|
-
proverAgentCount: 2,
|
|
821
|
-
publisherPrivateKeys: [new SecretValue(proverNodePrivateKey)],
|
|
822
|
-
proverNodeMaxPendingJobs: 10,
|
|
823
|
-
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
824
|
-
proverNodePollingIntervalMs: 200,
|
|
825
|
-
txGatheringIntervalMs: 1000,
|
|
826
|
-
txGatheringBatchSize: 10,
|
|
827
|
-
txGatheringMaxParallelRequestsPerNode: 10,
|
|
828
|
-
txGatheringTimeoutMs: 24_000,
|
|
829
|
-
proverNodeFailedEpochStore: undefined,
|
|
830
|
-
proverId: EthAddress.fromNumber(1),
|
|
831
|
-
proverNodeEpochProvingDelayMs: undefined,
|
|
832
|
-
...proverNodeConfig,
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
const l1TxUtils = createDelayedL1TxUtils(
|
|
836
|
-
aztecNodeConfig,
|
|
837
|
-
proverNodePrivateKey,
|
|
838
|
-
'prover-node',
|
|
839
|
-
proverNodeDeps.dateProvider,
|
|
722
|
+
baseConfig: AztecNodeConfig,
|
|
723
|
+
configOverrides: Pick<AztecNodeConfig, 'dataDirectory'>,
|
|
724
|
+
deps: {
|
|
725
|
+
telemetry?: TelemetryClient;
|
|
726
|
+
dateProvider: DateProvider;
|
|
727
|
+
p2pClientDeps?: P2PClientDeps;
|
|
728
|
+
},
|
|
729
|
+
options: { prefilledPublicData: PublicDataTreeLeaf[]; dontStart?: boolean },
|
|
730
|
+
): Promise<{ proverNode: AztecNodeService }> {
|
|
731
|
+
return withLoggerBindings({ actor: 'prover-0' }, async () => {
|
|
732
|
+
const proverNode = await AztecNodeService.createAndSync(
|
|
733
|
+
{
|
|
734
|
+
...baseConfig,
|
|
735
|
+
...configOverrides,
|
|
736
|
+
p2pPort: 0,
|
|
737
|
+
enableProverNode: true,
|
|
738
|
+
disableValidator: true,
|
|
739
|
+
proverPublisherPrivateKeys: [new SecretValue(proverNodePrivateKey)],
|
|
740
|
+
},
|
|
741
|
+
deps,
|
|
742
|
+
{ ...options, dontStartProverNode: options.dontStart },
|
|
840
743
|
);
|
|
841
744
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
{ ...proverNodeDeps, aztecNodeTxProvider, archiver: archiver as Archiver, l1TxUtils },
|
|
845
|
-
{ prefilledPublicData },
|
|
846
|
-
);
|
|
847
|
-
getLogger().info(`Created and synced prover node`, { publisherAddress: l1TxUtils.client.account!.address });
|
|
848
|
-
if (!proverNodeConfig.dontStart) {
|
|
849
|
-
await proverNode.start();
|
|
745
|
+
if (!proverNode.getProverNode()) {
|
|
746
|
+
throw new Error('Prover node subsystem was not created despite enableProverNode being set');
|
|
850
747
|
}
|
|
851
|
-
return proverNode;
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
748
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
logName: string,
|
|
859
|
-
dateProvider?: DateProvider,
|
|
860
|
-
) {
|
|
861
|
-
const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
|
|
862
|
-
|
|
863
|
-
const log = createLogger(logName);
|
|
864
|
-
const l1TxUtils = createDelayedL1TxUtilsFromViemWallet(l1Client, log, dateProvider, aztecNodeConfig);
|
|
865
|
-
l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
|
|
866
|
-
return l1TxUtils;
|
|
749
|
+
getLogger().info(`Created and synced prover node`);
|
|
750
|
+
return { proverNode };
|
|
751
|
+
});
|
|
867
752
|
}
|
|
868
753
|
|
|
869
754
|
export type BalancesFn = ReturnType<typeof getBalancesFn>;
|
|
870
755
|
export function getBalancesFn(
|
|
871
756
|
symbol: string,
|
|
872
757
|
method: ContractMethod,
|
|
873
|
-
from: AztecAddress,
|
|
874
758
|
logger: any,
|
|
875
759
|
): (...addresses: (AztecAddress | { address: AztecAddress })[]) => Promise<bigint[]> {
|
|
876
760
|
const balances = async (...addressLikes: (AztecAddress | { address: AztecAddress })[]) => {
|
|
877
761
|
const addresses = addressLikes.map(addressLike => ('address' in addressLike ? addressLike.address : addressLike));
|
|
878
|
-
const b = await Promise.all(
|
|
762
|
+
const b = await Promise.all(
|
|
763
|
+
addresses.map(async address => (await method(address).simulate({ from: address })).result),
|
|
764
|
+
);
|
|
879
765
|
const debugString = `${symbol} balances: ${addresses.map((address, i) => `${address}: ${b[i]}`).join(', ')}`;
|
|
880
766
|
logger.verbose(debugString);
|
|
881
767
|
return b;
|
|
@@ -993,7 +879,7 @@ export async function publicDeployAccounts(
|
|
|
993
879
|
|
|
994
880
|
const batch = new BatchCall(wallet, calls);
|
|
995
881
|
|
|
996
|
-
const txReceipt = await batch.send({ from: accountsToDeploy[0] });
|
|
882
|
+
const { receipt: txReceipt } = await batch.send({ from: accountsToDeploy[0] });
|
|
997
883
|
if (waitUntilProven) {
|
|
998
884
|
if (!node) {
|
|
999
885
|
throw new Error('Need to provide an AztecNode to wait for proven.');
|