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

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 (190) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +3 -2
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/benchmark.js +21 -1
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +14 -15
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  6. package/dest/bench/client_flows/client_flows_benchmark.js +123 -136
  7. package/dest/bench/client_flows/data_extractor.js +3 -1
  8. package/dest/bench/utils.d.ts +9 -8
  9. package/dest/bench/utils.d.ts.map +1 -1
  10. package/dest/bench/utils.js +27 -18
  11. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +6 -7
  12. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  13. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +96 -112
  14. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +19 -13
  15. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  16. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +91 -71
  17. package/dest/e2e_deploy_contract/deploy_test.d.ts +4 -3
  18. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  19. package/dest/e2e_deploy_contract/deploy_test.js +18 -13
  20. package/dest/e2e_epochs/epochs_test.d.ts +3 -2
  21. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  22. package/dest/e2e_epochs/epochs_test.js +16 -11
  23. package/dest/e2e_fees/bridging_race.notest.js +4 -6
  24. package/dest/e2e_fees/fees_test.d.ts +18 -15
  25. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  26. package/dest/e2e_fees/fees_test.js +126 -141
  27. package/dest/e2e_l1_publisher/write_json.d.ts +2 -2
  28. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  29. package/dest/e2e_l1_publisher/write_json.js +19 -15
  30. package/dest/e2e_multi_validator/utils.js +1 -1
  31. package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -9
  32. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  33. package/dest/e2e_nested_contract/nested_contract_test.js +31 -39
  34. package/dest/e2e_p2p/inactivity_slash_test.d.ts +4 -4
  35. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  36. package/dest/e2e_p2p/inactivity_slash_test.js +6 -9
  37. package/dest/e2e_p2p/p2p_network.d.ts +13 -11
  38. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  39. package/dest/e2e_p2p/p2p_network.js +120 -111
  40. package/dest/e2e_p2p/shared.d.ts +7 -7
  41. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  42. package/dest/e2e_p2p/shared.js +11 -18
  43. package/dest/e2e_token_contract/token_contract_test.d.ts +16 -9
  44. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  45. package/dest/e2e_token_contract/token_contract_test.js +89 -91
  46. package/dest/fixtures/e2e_prover_test.d.ts +10 -18
  47. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  48. package/dest/fixtures/e2e_prover_test.js +90 -102
  49. package/dest/fixtures/fixtures.d.ts +2 -3
  50. package/dest/fixtures/fixtures.d.ts.map +1 -1
  51. package/dest/fixtures/fixtures.js +1 -2
  52. package/dest/fixtures/get_acvm_config.js +1 -1
  53. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  54. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  55. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  56. package/dest/fixtures/setup.d.ts +218 -0
  57. package/dest/fixtures/setup.d.ts.map +1 -0
  58. package/dest/fixtures/setup.js +690 -0
  59. package/dest/fixtures/setup_p2p_test.js +3 -3
  60. package/dest/fixtures/token_utils.d.ts +1 -1
  61. package/dest/fixtures/token_utils.d.ts.map +1 -1
  62. package/dest/fixtures/token_utils.js +7 -4
  63. package/dest/fixtures/utils.d.ts +5 -638
  64. package/dest/fixtures/utils.d.ts.map +1 -1
  65. package/dest/fixtures/utils.js +4 -647
  66. package/dest/fixtures/web3signer.js +1 -1
  67. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  68. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  69. package/dest/fixtures/with_telemetry_utils.js +2 -2
  70. package/dest/quality_of_service/grafana_client.d.ts +41 -0
  71. package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
  72. package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
  73. package/dest/quality_of_service/prometheus_client.d.ts +38 -0
  74. package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
  75. package/dest/quality_of_service/prometheus_client.js +67 -0
  76. package/dest/shared/cross_chain_test_harness.d.ts +18 -7
  77. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  78. package/dest/shared/cross_chain_test_harness.js +14 -14
  79. package/dest/shared/gas_portal_test_harness.d.ts +12 -2
  80. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  81. package/dest/shared/gas_portal_test_harness.js +1 -1
  82. package/dest/shared/index.d.ts +2 -2
  83. package/dest/shared/index.d.ts.map +1 -1
  84. package/dest/shared/submit-transactions.d.ts +3 -3
  85. package/dest/shared/submit-transactions.d.ts.map +1 -1
  86. package/dest/shared/submit-transactions.js +9 -11
  87. package/dest/shared/uniswap_l1_l2.d.ts +3 -27
  88. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  89. package/dest/shared/uniswap_l1_l2.js +55 -35
  90. package/dest/simulators/lending_simulator.d.ts +6 -2
  91. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  92. package/dest/simulators/lending_simulator.js +2 -2
  93. package/dest/spartan/setup_test_wallets.d.ts +4 -3
  94. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  95. package/dest/spartan/setup_test_wallets.js +63 -35
  96. package/dest/spartan/tx_metrics.d.ts +54 -0
  97. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  98. package/dest/spartan/tx_metrics.js +272 -0
  99. package/dest/spartan/utils/bot.d.ts +27 -0
  100. package/dest/spartan/utils/bot.d.ts.map +1 -0
  101. package/dest/spartan/utils/bot.js +141 -0
  102. package/dest/spartan/utils/chaos.d.ts +79 -0
  103. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  104. package/dest/spartan/utils/chaos.js +142 -0
  105. package/dest/spartan/utils/clients.d.ts +39 -0
  106. package/dest/spartan/utils/clients.d.ts.map +1 -0
  107. package/dest/spartan/utils/clients.js +90 -0
  108. package/dest/spartan/utils/config.d.ts +36 -0
  109. package/dest/spartan/utils/config.d.ts.map +1 -0
  110. package/dest/spartan/utils/config.js +20 -0
  111. package/dest/spartan/utils/health.d.ts +63 -0
  112. package/dest/spartan/utils/health.d.ts.map +1 -0
  113. package/dest/spartan/utils/health.js +202 -0
  114. package/dest/spartan/utils/helm.d.ts +15 -0
  115. package/dest/spartan/utils/helm.d.ts.map +1 -0
  116. package/dest/spartan/utils/helm.js +47 -0
  117. package/dest/spartan/utils/index.d.ts +9 -0
  118. package/dest/spartan/utils/index.d.ts.map +1 -0
  119. package/dest/spartan/utils/index.js +18 -0
  120. package/dest/spartan/utils/k8s.d.ts +98 -0
  121. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  122. package/dest/spartan/utils/k8s.js +257 -0
  123. package/dest/spartan/utils/nodes.d.ts +31 -0
  124. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  125. package/dest/spartan/utils/nodes.js +290 -0
  126. package/dest/spartan/utils/scripts.d.ts +16 -0
  127. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  128. package/dest/spartan/utils/scripts.js +66 -0
  129. package/dest/spartan/utils.d.ts +2 -221
  130. package/dest/spartan/utils.d.ts.map +1 -1
  131. package/dest/spartan/utils.js +1 -782
  132. package/package.json +40 -39
  133. package/src/bench/client_flows/benchmark.ts +24 -2
  134. package/src/bench/client_flows/client_flows_benchmark.ts +145 -208
  135. package/src/bench/client_flows/data_extractor.ts +1 -1
  136. package/src/bench/utils.ts +30 -20
  137. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +104 -142
  138. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +140 -125
  139. package/src/e2e_deploy_contract/deploy_test.ts +21 -14
  140. package/src/e2e_epochs/epochs_test.ts +54 -36
  141. package/src/e2e_fees/bridging_race.notest.ts +4 -10
  142. package/src/e2e_fees/fees_test.ts +177 -220
  143. package/src/e2e_l1_publisher/write_json.ts +21 -16
  144. package/src/e2e_multi_validator/utils.ts +1 -1
  145. package/src/e2e_nested_contract/nested_contract_test.ts +33 -56
  146. package/src/e2e_p2p/inactivity_slash_test.ts +9 -12
  147. package/src/e2e_p2p/p2p_network.ts +180 -183
  148. package/src/e2e_p2p/shared.ts +21 -26
  149. package/src/e2e_token_contract/token_contract_test.ts +103 -118
  150. package/src/fixtures/e2e_prover_test.ts +103 -140
  151. package/src/fixtures/fixtures.ts +1 -3
  152. package/src/fixtures/get_acvm_config.ts +1 -1
  153. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  154. package/src/fixtures/setup.ts +1017 -0
  155. package/src/fixtures/setup_p2p_test.ts +3 -3
  156. package/src/fixtures/token_utils.ts +6 -5
  157. package/src/fixtures/utils.ts +27 -966
  158. package/src/fixtures/web3signer.ts +1 -1
  159. package/src/fixtures/with_telemetry_utils.ts +2 -2
  160. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
  161. package/src/quality_of_service/prometheus_client.ts +113 -0
  162. package/src/shared/cross_chain_test_harness.ts +19 -37
  163. package/src/shared/gas_portal_test_harness.ts +2 -2
  164. package/src/shared/index.ts +1 -1
  165. package/src/shared/submit-transactions.ts +9 -15
  166. package/src/shared/uniswap_l1_l2.ts +65 -86
  167. package/src/simulators/lending_simulator.ts +3 -3
  168. package/src/spartan/setup_test_wallets.ts +81 -26
  169. package/src/spartan/tx_metrics.ts +250 -0
  170. package/src/spartan/utils/bot.ts +185 -0
  171. package/src/spartan/utils/chaos.ts +253 -0
  172. package/src/spartan/utils/clients.ts +100 -0
  173. package/src/spartan/utils/config.ts +26 -0
  174. package/src/spartan/utils/health.ts +255 -0
  175. package/src/spartan/utils/helm.ts +84 -0
  176. package/src/spartan/utils/index.ts +62 -0
  177. package/src/spartan/utils/k8s.ts +375 -0
  178. package/src/spartan/utils/nodes.ts +323 -0
  179. package/src/spartan/utils/scripts.ts +63 -0
  180. package/src/spartan/utils.ts +1 -983
  181. package/dest/fixtures/setup_l1_contracts.d.ts +0 -477
  182. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  183. package/dest/fixtures/setup_l1_contracts.js +0 -17
  184. package/dest/fixtures/snapshot_manager.d.ts +0 -95
  185. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  186. package/dest/fixtures/snapshot_manager.js +0 -505
  187. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  188. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  189. package/src/fixtures/setup_l1_contracts.ts +0 -26
  190. package/src/fixtures/snapshot_manager.ts +0 -665
@@ -1,648 +1,5 @@
1
- import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
2
- import { generateSchnorrAccounts, getInitialTestAccountsData } from '@aztec/accounts/testing';
3
- import { createArchiver } from '@aztec/archiver';
4
- import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
5
- import { BatchCall } from '@aztec/aztec.js/contracts';
6
- import { publishContractClass, publishInstance } from '@aztec/aztec.js/deployment';
7
- import { createLogger } from '@aztec/aztec.js/log';
8
- import { createAztecNodeClient, waitForNode } from '@aztec/aztec.js/node';
9
- import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
10
- import { createBlobSinkClient } from '@aztec/blob-sink/client';
11
- import { createBlobSinkServer } from '@aztec/blob-sink/server';
12
- import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
13
- import { FeeAssetArtifact, NULL_KEY, RollupContract, createExtendedL1Client, deployL1Contracts, deployMulticall3, getL1ContractsConfigEnvVars, isAnvilTestChain } from '@aztec/ethereum';
14
- import { DelayedTxUtils, EthCheatCodes, EthCheatCodesWithState, createDelayedL1TxUtilsFromViemWallet, startAnvil } from '@aztec/ethereum/test';
15
- import { EpochNumber } from '@aztec/foundation/branded-types';
16
- import { SecretValue } from '@aztec/foundation/config';
17
- import { randomBytes } from '@aztec/foundation/crypto';
18
- import { EthAddress } from '@aztec/foundation/eth-address';
19
- import { Fr } from '@aztec/foundation/fields';
20
- import { tryRmDir } from '@aztec/foundation/fs';
21
- import { withLogNameSuffix } from '@aztec/foundation/log';
22
- import { retryUntil } from '@aztec/foundation/retry';
23
- import { sleep } from '@aztec/foundation/sleep';
24
- import { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
25
- import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
26
- import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
27
- import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
28
- import { protocolContractsHash } from '@aztec/protocol-contracts';
29
- import { createProverNode } from '@aztec/prover-node';
30
- import { getPXEConfig } from '@aztec/pxe/server';
31
- import { getContractClassFromArtifact, getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
32
- import { tryStop } from '@aztec/stdlib/interfaces/server';
33
- import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
34
- import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
35
- import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
36
- import { getGenesisValues } from '@aztec/world-state/testing';
37
- import fs from 'fs/promises';
38
- import getPort from 'get-port';
39
- import { tmpdir } from 'os';
40
- import * as path from 'path';
41
- import { getContract } from 'viem';
42
- import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
43
- import { foundry } from 'viem/chains';
44
- import { MNEMONIC, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
45
- import { getACVMConfig } from './get_acvm_config.js';
46
- import { getBBConfig } from './get_bb_config.js';
47
- import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js';
48
- export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
49
- export { startAnvil };
50
- const { AZTEC_NODE_URL = '' } = process.env;
51
- const getAztecUrl = ()=>AZTEC_NODE_URL;
52
- let telemetry = undefined;
53
- function getTelemetryClient(partialConfig = {}) {
54
- if (!telemetry) {
55
- const config = {
56
- ...getTelemetryConfig(),
57
- ...partialConfig
58
- };
59
- telemetry = config.benchmark ? new BenchmarkTelemetryClient() : initTelemetryClient(config);
60
- }
61
- return telemetry;
62
- }
63
- if (typeof afterAll === 'function') {
64
- afterAll(async ()=>{
65
- await telemetry?.stop();
66
- });
67
- }
68
- export const getPrivateKeyFromIndex = (index)=>{
69
- const hdAccount = mnemonicToAccount(MNEMONIC, {
70
- addressIndex: index
71
- });
72
- const privKeyRaw = hdAccount.getHdKey().privateKey;
73
- return privKeyRaw === null ? null : Buffer.from(privKeyRaw);
74
- };
75
- export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, chain = foundry)=>{
76
- const l1Data = await deployL1Contracts(l1RpcUrls, account, chain, logger, {
77
- vkTreeRoot: getVKTreeRoot(),
78
- protocolContractsHash,
79
- genesisArchiveRoot: args.genesisArchiveRoot ?? new Fr(GENESIS_ARCHIVE_ROOT),
80
- salt: args.salt,
81
- initialValidators: args.initialValidators,
82
- ...getL1ContractsConfigEnvVars(),
83
- realVerifier: false,
84
- ...args
85
- }, {
86
- priorityFeeBumpPercentage: 0,
87
- priorityFeeRetryBumpPercentage: 0
88
- });
89
- return l1Data;
90
- };
91
- /**
92
- * Sets up Private eXecution Environment (PXE) and returns the corresponding test wallet.
93
- * @param aztecNode - An instance of Aztec Node.
94
- * @param opts - Partial configuration for the PXE.
95
- * @param logger - The logger to be used.
96
- * @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
97
- * @returns A test wallet, logger and teardown function.
98
- */ export async function setupPXEAndGetWallet(aztecNode, opts = {}, logger = getLogger(), useLogSuffix = false) {
99
- const PXEConfig = {
100
- ...getPXEConfig(),
101
- ...opts
102
- };
103
- // For tests we only want proving enabled if specifically requested
104
- PXEConfig.proverEnabled = !!opts.proverEnabled;
105
- // If no data directory provided, create a temp directory and clean up afterwards
106
- const configuredDataDirectory = PXEConfig.dataDirectory;
107
- if (!configuredDataDirectory) {
108
- PXEConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
109
- }
110
- const teardown = configuredDataDirectory ? ()=>Promise.resolve() : ()=>tryRmDir(PXEConfig.dataDirectory);
111
- const wallet = await TestWallet.create(aztecNode, PXEConfig, {
112
- useLogSuffix
113
- });
114
- return {
115
- wallet,
116
- logger,
117
- teardown
118
- };
119
- }
120
- /**
121
- * Function to setup the test against a remote deployment. It is assumed that L1 contract are already deployed
122
- * @param account - The account for use in create viem wallets.
123
- * @param config - The aztec Node Configuration
124
- * @param logger - The logger to be used
125
- * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
126
- * (will create extra accounts if the environment doesn't already have enough accounts)
127
- * @returns Private eXecution Environment (PXE) client, viem wallets, contract addresses etc.
128
- */ async function setupWithRemoteEnvironment(account, config, logger, numberOfAccounts) {
129
- // we are setting up against a remote environment, l1 contracts are already deployed
130
- const aztecNodeUrl = getAztecUrl();
131
- logger.verbose(`Creating Aztec Node client to remote host ${aztecNodeUrl}`);
132
- const aztecNode = createAztecNodeClient(aztecNodeUrl);
133
- await waitForNode(aztecNode, logger);
134
- logger.verbose('JSON RPC client connected to Aztec Node');
135
- logger.verbose(`Retrieving contract addresses from ${aztecNodeUrl}`);
136
- const { l1ContractAddresses, rollupVersion } = await aztecNode.getNodeInfo();
137
- const l1Client = createExtendedL1Client(config.l1RpcUrls, account, foundry);
138
- const deployL1ContractsValues = {
139
- l1ContractAddresses,
140
- l1Client,
141
- rollupVersion
142
- };
143
- const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls, new DateProvider());
144
- const wallet = await TestWallet.create(aztecNode);
145
- const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNode, new DateProvider());
146
- const teardown = ()=>Promise.resolve();
147
- logger.verbose('Populating wallet from already registered accounts...');
148
- const initialFundedAccounts = await getInitialTestAccountsData();
149
- if (initialFundedAccounts.length < numberOfAccounts) {
150
- throw new Error(`Required ${numberOfAccounts} accounts. Found ${initialFundedAccounts.length}.`);
151
- // Deploy new accounts if there's a test that requires more funded accounts in the remote environment.
152
- }
153
- const testAccounts = await Promise.all(initialFundedAccounts.slice(0, numberOfAccounts).map(async (account)=>{
154
- const accountManager = await wallet.createSchnorrAccount(account.secret, account.salt, account.signingKey);
155
- return accountManager.address;
156
- }));
157
- return {
158
- aztecNode,
159
- aztecNodeAdmin: undefined,
160
- sequencer: undefined,
161
- proverNode: undefined,
162
- deployL1ContractsValues,
163
- config,
164
- initialFundedAccounts,
165
- wallet,
166
- accounts: testAccounts,
167
- logger,
168
- cheatCodes,
169
- ethCheatCodes,
170
- prefilledPublicData: undefined,
171
- mockGossipSubNetwork: undefined,
172
- watcher: undefined,
173
- dateProvider: undefined,
174
- blobSink: undefined,
175
- telemetryClient: undefined,
176
- teardown
177
- };
178
- }
179
- /**
180
- * Sets up the environment for the end-to-end tests.
181
- * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
182
- * @param opts - Options to pass to the node initialization and to the setup script.
183
- * @param pxeOpts - Options to pass to the PXE initialization.
184
- */ export async function setup(numberOfAccounts = 1, opts = {}, pxeOpts = {}, chain = foundry) {
185
- let anvil;
186
- try {
187
- opts.aztecTargetCommitteeSize ??= 0;
188
- opts.slasherFlavor ??= 'none';
189
- const config = {
190
- ...getConfigEnvVars(),
191
- ...opts
192
- };
193
- // use initialValidators for the node config
194
- config.validatorPrivateKeys = new SecretValue(opts.initialValidators?.map((v)=>v.privateKey) ?? []);
195
- config.peerCheckIntervalMS = TEST_PEER_CHECK_INTERVAL_MS;
196
- // For tests we only want proving enabled if specifically requested
197
- config.realProofs = !!opts.realProofs;
198
- // Only enforce the time table if requested
199
- config.enforceTimeTable = !!opts.enforceTimeTable;
200
- const logger = getLogger();
201
- // Create a temp directory for any services that need it and cleanup later
202
- const directoryToCleanup = path.join(tmpdir(), randomBytes(8).toString('hex'));
203
- await fs.mkdir(directoryToCleanup, {
204
- recursive: true
205
- });
206
- if (!config.dataDirectory) {
207
- config.dataDirectory = directoryToCleanup;
208
- }
209
- if (!config.l1RpcUrls?.length) {
210
- if (!isAnvilTestChain(chain.id)) {
211
- throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
212
- }
213
- if (AZTEC_NODE_URL) {
214
- throw new Error(`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`);
215
- }
216
- const res = await startAnvil({
217
- l1BlockTime: opts.ethereumSlotDuration,
218
- accounts: opts.anvilAccounts,
219
- port: opts.anvilPort
220
- });
221
- anvil = res.anvil;
222
- config.l1RpcUrls = [
223
- res.rpcUrl
224
- ];
225
- }
226
- // Enable logging metrics to a local file named after the test suite
227
- if (isMetricsLoggingRequested()) {
228
- const filename = path.join('log', getJobName() + '.jsonl');
229
- logger.info(`Logging metrics to ${filename}`);
230
- setupMetricsLogger(filename);
231
- }
232
- const dateProvider = new TestDateProvider();
233
- const ethCheatCodes = new EthCheatCodesWithState(config.l1RpcUrls, dateProvider);
234
- if (opts.stateLoad) {
235
- await ethCheatCodes.loadChainState(opts.stateLoad);
236
- }
237
- if (opts.l1StartTime) {
238
- await ethCheatCodes.warp(opts.l1StartTime, {
239
- resetBlockInterval: true
240
- });
241
- }
242
- let publisherPrivKey = undefined;
243
- let publisherHdAccount = undefined;
244
- if (opts.l1PublisherKey && opts.l1PublisherKey.getValue() && opts.l1PublisherKey.getValue() != NULL_KEY) {
245
- publisherHdAccount = privateKeyToAccount(opts.l1PublisherKey.getValue());
246
- } else if (config.publisherPrivateKeys && config.publisherPrivateKeys.length > 0 && config.publisherPrivateKeys[0].getValue() != NULL_KEY) {
247
- publisherHdAccount = privateKeyToAccount(config.publisherPrivateKeys[0].getValue());
248
- } else if (!MNEMONIC) {
249
- throw new Error(`Mnemonic not provided and no publisher private key`);
250
- } else {
251
- publisherHdAccount = mnemonicToAccount(MNEMONIC, {
252
- addressIndex: 0
253
- });
254
- const publisherPrivKeyRaw = publisherHdAccount.getHdKey().privateKey;
255
- publisherPrivKey = publisherPrivKeyRaw === null ? null : Buffer.from(publisherPrivKeyRaw);
256
- config.publisherPrivateKeys = [
257
- new SecretValue(`0x${publisherPrivKey.toString('hex')}`)
258
- ];
259
- }
260
- config.coinbase = EthAddress.fromString(publisherHdAccount.address);
261
- if (AZTEC_NODE_URL) {
262
- // we are setting up against a remote environment, l1 contracts are assumed to already be deployed
263
- return await setupWithRemoteEnvironment(publisherHdAccount, config, logger, numberOfAccounts);
264
- }
265
- const initialFundedAccounts = opts.initialFundedAccounts ?? await generateSchnorrAccounts(opts.numberOfInitialFundedAccounts ?? numberOfAccounts);
266
- const { genesisArchiveRoot, prefilledPublicData, fundingNeeded } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address), opts.initialAccountFeeJuice, opts.genesisPublicData);
267
- const wasAutomining = await ethCheatCodes.isAutoMining();
268
- const enableAutomine = opts.automineL1Setup && !wasAutomining && isAnvilTestChain(chain.id);
269
- if (enableAutomine) {
270
- await ethCheatCodes.setAutomine(true);
271
- }
272
- const l1Client = createExtendedL1Client(config.l1RpcUrls, publisherHdAccount, chain);
273
- await deployMulticall3(l1Client, logger);
274
- const deployL1ContractsValues = opts.deployL1ContractsValues ?? await setupL1Contracts(config.l1RpcUrls, publisherHdAccount, logger, {
275
- ...opts,
276
- genesisArchiveRoot,
277
- feeJuicePortalInitialBalance: fundingNeeded,
278
- initialValidators: opts.initialValidators
279
- }, chain);
280
- config.l1Contracts = deployL1ContractsValues.l1ContractAddresses;
281
- config.rollupVersion = deployL1ContractsValues.rollupVersion;
282
- if (opts.fundRewardDistributor) {
283
- // Mints block rewards for 10000 blocks to the rewardDistributor contract
284
- const rollup = new RollupContract(deployL1ContractsValues.l1Client, deployL1ContractsValues.l1ContractAddresses.rollupAddress);
285
- const blockReward = await rollup.getCheckpointReward();
286
- const mintAmount = 10_000n * blockReward;
287
- const feeJuice = getContract({
288
- address: deployL1ContractsValues.l1ContractAddresses.feeJuiceAddress.toString(),
289
- abi: FeeAssetArtifact.contractAbi,
290
- client: deployL1ContractsValues.l1Client
291
- });
292
- const rewardDistributorMintTxHash = await feeJuice.write.mint([
293
- deployL1ContractsValues.l1ContractAddresses.rewardDistributorAddress.toString(),
294
- mintAmount
295
- ], {});
296
- await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
297
- hash: rewardDistributorMintTxHash
298
- });
299
- logger.info(`Funding rewardDistributor in ${rewardDistributorMintTxHash}`);
300
- }
301
- if (enableAutomine) {
302
- await ethCheatCodes.setAutomine(false);
303
- await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
304
- dateProvider.setTime(await ethCheatCodes.timestamp() * 1000);
305
- }
306
- if (opts.l2StartTime) {
307
- // This should only be used in synching test or when you need to have a stable
308
- // timestamp for the first l2 block.
309
- await ethCheatCodes.warp(opts.l2StartTime, {
310
- resetBlockInterval: true
311
- });
312
- }
313
- const watcher = new AnvilTestWatcher(new EthCheatCodesWithState(config.l1RpcUrls, dateProvider), deployL1ContractsValues.l1ContractAddresses.rollupAddress, deployL1ContractsValues.l1Client, dateProvider);
314
- if (!opts.disableAnvilTestWatcher) {
315
- await watcher.start();
316
- }
317
- const telemetry = getTelemetryClient(opts.telemetryConfig);
318
- // Blob sink service - blobs get posted here and served from here
319
- const blobSinkPort = await getPort();
320
- const blobSink = await createBlobSinkServer({
321
- l1ChainId: config.l1ChainId,
322
- l1RpcUrls: config.l1RpcUrls,
323
- l1Contracts: config.l1Contracts,
324
- port: blobSinkPort,
325
- dataDirectory: config.dataDirectory,
326
- dataStoreMapSizeKb: config.dataStoreMapSizeKb
327
- }, telemetry);
328
- await blobSink.start();
329
- config.blobSinkUrl = `http://localhost:${blobSinkPort}`;
330
- logger.verbose('Creating and synching an aztec node', config);
331
- const acvmConfig = await getACVMConfig(logger);
332
- if (acvmConfig) {
333
- config.acvmWorkingDirectory = acvmConfig.acvmWorkingDirectory;
334
- config.acvmBinaryPath = acvmConfig.acvmBinaryPath;
335
- }
336
- const bbConfig = await getBBConfig(logger);
337
- if (bbConfig) {
338
- config.bbBinaryPath = bbConfig.bbBinaryPath;
339
- config.bbWorkingDirectory = bbConfig.bbWorkingDirectory;
340
- }
341
- const blobSinkClient = createBlobSinkClient(config, {
342
- logger: createLogger('node:blob-sink:client')
343
- });
344
- let mockGossipSubNetwork;
345
- let p2pClientDeps = undefined;
346
- if (opts.mockGossipSubNetwork) {
347
- mockGossipSubNetwork = new MockGossipSubNetwork();
348
- p2pClientDeps = {
349
- p2pServiceFactory: getMockPubSubP2PServiceFactory(mockGossipSubNetwork)
350
- };
351
- }
352
- // Transactions built against the genesis state must be included in block 1, otherwise they are dropped.
353
- // To avoid test failures from dropped transactions, we ensure progression beyond genesis before proceeding.
354
- // For account deployments, we set minTxsPerBlock=1 and deploy accounts sequentially for guaranteed success.
355
- // If no accounts need deployment, we await an empty block to confirm network progression. After either path
356
- // completes, we restore the original minTxsPerBlock setting. The deployment and waiting for empty block is
357
- // handled by the if-else branches on line 632.
358
- // For more details on why the tx would be dropped see `validate_include_by_timestamp` function in
359
- // `noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/validation_requests.nr`.
360
- //
361
- // Note: If the following seems too convoluted or if it starts making problems, we could drop the "progressing
362
- // past genesis via an account contract deployment" optimization and just call flush() on the sequencer and wait
363
- // for an empty block to be mined. This would simplify it all quite a bit but the setup would be slower for tests
364
- // deploying accounts.
365
- const originalMinTxsPerBlock = config.minTxsPerBlock;
366
- if (originalMinTxsPerBlock === undefined) {
367
- throw new Error('minTxsPerBlock is undefined in e2e test setup');
368
- }
369
- config.minTxsPerBlock = numberOfAccounts === 0 ? 0 : 1;
370
- config.p2pEnabled = opts.mockGossipSubNetwork || config.p2pEnabled;
371
- config.p2pIp = opts.p2pIp ?? config.p2pIp ?? '127.0.0.1';
372
- if (!config.disableValidator) {
373
- if ((config.validatorPrivateKeys?.getValue().length ?? 0) === 0) {
374
- config.validatorPrivateKeys = new SecretValue([
375
- generatePrivateKey()
376
- ]);
377
- }
378
- }
379
- const aztecNode = await AztecNodeService.createAndSync(config, {
380
- dateProvider,
381
- blobSinkClient,
382
- telemetry,
383
- p2pClientDeps,
384
- logger: createLogger('node:MAIN-aztec-node')
385
- }, {
386
- prefilledPublicData
387
- });
388
- const sequencerClient = aztecNode.getSequencer();
389
- if (sequencerClient) {
390
- const publisher = sequencerClient.sequencer.publisher;
391
- publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration, l1Client);
392
- }
393
- let proverNode = undefined;
394
- if (opts.startProverNode) {
395
- logger.verbose('Creating and syncing a simulated prover node...');
396
- const proverNodePrivateKey = getPrivateKeyFromIndex(2);
397
- const proverNodePrivateKeyHex = `0x${proverNodePrivateKey.toString('hex')}`;
398
- const proverNodeDataDirectory = path.join(directoryToCleanup, randomBytes(8).toString('hex'));
399
- const proverNodeConfig = {
400
- ...config.proverNodeConfig,
401
- dataDirectory: proverNodeDataDirectory
402
- };
403
- proverNode = await createAndSyncProverNode(proverNodePrivateKeyHex, config, proverNodeConfig, aztecNode, prefilledPublicData);
404
- }
405
- logger.verbose('Creating a pxe...');
406
- const { wallet, teardown: pxeTeardown } = await setupPXEAndGetWallet(aztecNode, pxeOpts, logger);
407
- const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNode, dateProvider);
408
- if (opts.aztecTargetCommitteeSize && opts.aztecTargetCommitteeSize > 0 || opts.initialValidators && opts.initialValidators.length > 0) {
409
- // We need to advance such that the committee is set up.
410
- await cheatCodes.rollup.advanceToEpoch(EpochNumber.fromBigInt(BigInt(await cheatCodes.rollup.getEpoch()) + BigInt(config.lagInEpochsForValidatorSet + 1)));
411
- await cheatCodes.rollup.setupEpoch();
412
- await cheatCodes.rollup.debugRollup();
413
- }
414
- let accounts = [];
415
- // Below we continue with what we described in the long comment on line 571.
416
- if (numberOfAccounts === 0) {
417
- logger.info('No accounts are being deployed, waiting for an empty block 1 to be mined');
418
- while(await aztecNode.getBlockNumber() === 0){
419
- await sleep(2000);
420
- }
421
- } else {
422
- logger.info(`${numberOfAccounts} accounts are being deployed. Reliably progressing past genesis by setting minTxsPerBlock to 1 and waiting for the accounts to be deployed`);
423
- const accountsData = initialFundedAccounts.slice(0, numberOfAccounts);
424
- const accountManagers = await deployFundedSchnorrAccounts(wallet, aztecNode, accountsData);
425
- accounts = accountManagers.map((accountManager)=>accountManager.address);
426
- }
427
- // Now we restore the original minTxsPerBlock setting.
428
- sequencerClient.getSequencer().updateConfig({
429
- minTxsPerBlock: originalMinTxsPerBlock
430
- });
431
- if (initialFundedAccounts.length < numberOfAccounts) {
432
- // TODO: Create (numberOfAccounts - initialFundedAccounts.length) wallets without funds.
433
- throw new Error(`Unable to deploy ${numberOfAccounts} accounts. Only ${initialFundedAccounts.length} accounts were funded.`);
434
- }
435
- const teardown = async ()=>{
436
- try {
437
- await pxeTeardown();
438
- await tryStop(aztecNode, logger);
439
- await tryStop(proverNode, logger);
440
- if (acvmConfig?.cleanup) {
441
- await acvmConfig.cleanup();
442
- }
443
- if (bbConfig?.cleanup) {
444
- await bbConfig.cleanup();
445
- }
446
- await tryStop(watcher, logger);
447
- await tryStop(anvil, logger);
448
- await tryStop(blobSink, logger);
449
- await tryRmDir(directoryToCleanup, logger);
450
- } catch (err) {
451
- logger.error(`Error during e2e test teardown`, err);
452
- }
453
- };
454
- return {
455
- aztecNode,
456
- aztecNodeAdmin: aztecNode,
457
- blobSink,
458
- cheatCodes,
459
- ethCheatCodes,
460
- config,
461
- dateProvider,
462
- deployL1ContractsValues,
463
- initialFundedAccounts,
464
- logger,
465
- mockGossipSubNetwork,
466
- prefilledPublicData,
467
- proverNode,
468
- sequencer: sequencerClient,
469
- teardown,
470
- telemetryClient: telemetry,
471
- wallet,
472
- accounts,
473
- watcher
474
- };
475
- } catch (err) {
476
- // TODO: Just hoisted anvil for now to ensure cleanup. Prob need to hoist the rest.
477
- await anvil?.stop();
478
- throw err;
479
- }
480
- }
481
- /**
482
- * Registers the contract class used for test accounts and publicly deploys the instances requested.
483
- * Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
484
- * @param sender - Wallet to send the deployment tx.
485
- * @param accountsToDeploy - Which accounts to publicly deploy.
486
- */ export async function ensureAccountContractsPublished(wallet, accountsToDeploy) {
487
- // We have to check whether the accounts are already deployed. This can happen if the test runs against
488
- // the local network and the test accounts exist
489
- const accountsAndAddresses = await Promise.all(accountsToDeploy.map(async (address)=>{
490
- return {
491
- address,
492
- deployed: (await wallet.getContractMetadata(address)).isContractPublished
493
- };
494
- }));
495
- const instances = (await Promise.all(accountsAndAddresses.filter(({ deployed })=>!deployed).map(({ address })=>wallet.getContractMetadata(address)))).map((contractMetadata)=>contractMetadata.contractInstance);
496
- const contractClass = await getContractClassFromArtifact(SchnorrAccountContractArtifact);
497
- if (!(await wallet.getContractClassMetadata(contractClass.id, true)).isContractClassPubliclyRegistered) {
498
- await (await publishContractClass(wallet, SchnorrAccountContractArtifact)).send({
499
- from: accountsToDeploy[0]
500
- }).wait();
501
- }
502
- const requests = await Promise.all(instances.map(async (instance)=>await publishInstance(wallet, instance)));
503
- const batch = new BatchCall(wallet, requests);
504
- await batch.send({
505
- from: accountsToDeploy[0]
506
- }).wait();
507
- }
508
- /** Returns the job name for the current test. */ function getJobName() {
509
- return process.env.JOB_NAME ?? expect.getState().currentTestName?.split(' ')[0].replaceAll('/', '_') ?? 'unknown';
510
- }
511
1
  /**
512
- * Returns a logger instance for the current test.
513
- * @returns a logger instance for the current test.
514
- */ export function getLogger() {
515
- const describeBlockName = expect.getState().currentTestName?.split(' ')[0].replaceAll('/', ':');
516
- if (!describeBlockName) {
517
- const name = expect.getState().testPath?.split('/').pop()?.split('.')[0] ?? 'unknown';
518
- return createLogger('e2e:' + name);
519
- }
520
- return createLogger('e2e:' + describeBlockName);
521
- }
522
- export function getBalancesFn(symbol, method, from, logger) {
523
- const balances = async (...addressLikes)=>{
524
- const addresses = addressLikes.map((addressLike)=>'address' in addressLike ? addressLike.address : addressLike);
525
- const b = await Promise.all(addresses.map((address)=>method(address).simulate({
526
- from
527
- })));
528
- const debugString = `${symbol} balances: ${addresses.map((address, i)=>`${address}: ${b[i]}`).join(', ')}`;
529
- logger.verbose(debugString);
530
- return b;
531
- };
532
- return balances;
533
- }
534
- export async function expectMapping(fn, inputs, expectedOutputs) {
535
- expect(inputs.length).toBe(expectedOutputs.length);
536
- const outputs = await fn(...inputs);
537
- expect(outputs).toEqual(expectedOutputs);
538
- }
539
- export async function expectMappingDelta(initialValues, fn, inputs, expectedDiffs) {
540
- expect(inputs.length).toBe(expectedDiffs.length);
541
- const outputs = await fn(...inputs);
542
- const diffs = outputs.map((output, i)=>output - initialValues[i]);
543
- expect(diffs).toEqual(expectedDiffs);
544
- }
545
- /**
546
- * Computes the address of the "canonical" SponsoredFPCContract. This is not a protocol contract
547
- * but by conventions its address is computed with a salt of 0.
548
- * @returns The address of the sponsored FPC contract
549
- */ export function getSponsoredFPCInstance() {
550
- return Promise.resolve(getContractInstanceFromInstantiationParams(SponsoredFPCContract.artifact, {
551
- salt: new Fr(SPONSORED_FPC_SALT)
552
- }));
553
- }
554
- /**
555
- * Computes the address of the "canonical" SponsoredFPCContract. This is not a protocol contract
556
- * but by conventions its address is computed with a salt of 0.
557
- * @returns The address of the sponsored FPC contract
558
- */ export async function getSponsoredFPCAddress() {
559
- const sponsoredFPCInstance = await getSponsoredFPCInstance();
560
- return sponsoredFPCInstance.address;
561
- }
562
- /**
563
- * Deploy a sponsored FPC contract to a running instance.
564
- */ export async function setupSponsoredFPC(wallet) {
565
- const instance = await getContractInstanceFromInstantiationParams(SponsoredFPCContract.artifact, {
566
- salt: new Fr(SPONSORED_FPC_SALT)
567
- });
568
- await wallet.registerContract(instance, SponsoredFPCContract.artifact);
569
- getLogger().info(`SponsoredFPC: ${instance.address}`);
570
- return instance;
571
- }
572
- /**
573
- * Registers the SponsoredFPC in this PXE instance
574
- * @param wallet - The wallet
575
- */ export async function registerSponsoredFPC(wallet) {
576
- await wallet.registerContract(await getSponsoredFPCInstance(), SponsoredFPCContract.artifact);
577
- }
578
- export async function waitForProvenChain(node, targetBlock, timeoutSec = 60, intervalSec = 1) {
579
- targetBlock ??= await node.getBlockNumber();
580
- await retryUntil(async ()=>await node.getProvenBlockNumber() >= targetBlock, 'proven chain status', timeoutSec, intervalSec);
581
- }
582
- export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, proverNodeConfig, aztecNode, prefilledPublicData = [], proverNodeDeps = {}) {
583
- return withLogNameSuffix('prover-node', async ()=>{
584
- // Disable stopping the aztec node as the prover coordination test will kill it otherwise
585
- // This is only required when stopping the prover node for testing
586
- const aztecNodeTxProvider = aztecNode && {
587
- getTxByHash: aztecNode.getTxByHash.bind(aztecNode),
588
- getTxsByHash: aztecNode.getTxsByHash.bind(aztecNode),
589
- stop: ()=>Promise.resolve()
590
- };
591
- const blobSinkClient = createBlobSinkClient(aztecNodeConfig);
592
- // Creating temp store and archiver for simulated prover node
593
- const archiverConfig = {
594
- ...aztecNodeConfig,
595
- dataDirectory: proverNodeConfig.dataDirectory
596
- };
597
- const archiver = await createArchiver(archiverConfig, {
598
- blobSinkClient,
599
- dateProvider: proverNodeDeps.dateProvider
600
- }, {
601
- blockUntilSync: true
602
- });
603
- // Prover node config is for simulated proofs
604
- const proverConfig = {
605
- ...aztecNodeConfig,
606
- txCollectionNodeRpcUrls: [],
607
- realProofs: false,
608
- proverAgentCount: 2,
609
- publisherPrivateKeys: [
610
- new SecretValue(proverNodePrivateKey)
611
- ],
612
- proverNodeMaxPendingJobs: 10,
613
- proverNodeMaxParallelBlocksPerEpoch: 32,
614
- proverNodePollingIntervalMs: 200,
615
- txGatheringIntervalMs: 1000,
616
- txGatheringBatchSize: 10,
617
- txGatheringMaxParallelRequestsPerNode: 10,
618
- txGatheringTimeoutMs: 24_000,
619
- proverNodeFailedEpochStore: undefined,
620
- proverId: EthAddress.fromNumber(1),
621
- proverNodeEpochProvingDelayMs: undefined,
622
- ...proverNodeConfig
623
- };
624
- const l1TxUtils = createDelayedL1TxUtils(aztecNodeConfig, proverNodePrivateKey, 'prover-node', proverNodeDeps.dateProvider);
625
- const proverNode = await createProverNode(proverConfig, {
626
- ...proverNodeDeps,
627
- aztecNodeTxProvider,
628
- archiver: archiver,
629
- l1TxUtils
630
- }, {
631
- prefilledPublicData
632
- });
633
- getLogger().info(`Created and synced prover node`, {
634
- publisherAddress: l1TxUtils.client.account.address
635
- });
636
- if (!proverNodeConfig.dontStart) {
637
- await proverNode.start();
638
- }
639
- return proverNode;
640
- });
641
- }
642
- function createDelayedL1TxUtils(aztecNodeConfig, privateKey, logName, dateProvider) {
643
- const l1Client = createExtendedL1Client(aztecNodeConfig.l1RpcUrls, privateKey, foundry);
644
- const log = createLogger(logName);
645
- const l1TxUtils = createDelayedL1TxUtilsFromViemWallet(l1Client, log, dateProvider, aztecNodeConfig);
646
- l1TxUtils.enableDelayer(aztecNodeConfig.ethereumSlotDuration);
647
- return l1TxUtils;
648
- }
2
+ * Re-exports from the unified setup module for backward compatibility.
3
+ * Tests that previously used utils.ts should continue to work.
4
+ */ export { createAndSyncProverNode, deployAccounts, ensureAccountContractsPublished, expectMapping, expectMappingDelta, getBalancesFn, getLogger, getPrivateKeyFromIndex, getSponsoredFPCAddress, getSponsoredFPCInstance, publicDeployAccounts, registerSponsoredFPC, setup, setupPXEAndGetWallet, setupSharedBlobStorage, setupSponsoredFPC, startAnvil, teardown, waitForProvenChain } from './setup.js';
5
+ export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
@@ -1,4 +1,4 @@
1
- import { randomBytes } from '@aztec/foundation/crypto';
1
+ import { randomBytes } from '@aztec/foundation/crypto/random';
2
2
  import { retryUntil } from '@aztec/foundation/retry';
3
3
  import { sleep } from '@aztec/foundation/sleep';
4
4
  import { RemoteSigner } from '@aztec/node-keystore';
@@ -1,3 +1,3 @@
1
1
  import { type TelemetryClient } from '@aztec/telemetry-client';
2
- export declare function getEndToEndTestTelemetryClient(metricsPort?: number): TelemetryClient;
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aF90ZWxlbWV0cnlfdXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy93aXRoX3RlbGVtZXRyeV91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQ0wsS0FBSyxlQUFlLEVBSXJCLE1BQU0seUJBQXlCLENBQUM7QUFHakMsd0JBQWdCLDhCQUE4QixDQUFDLFdBQVcsQ0FBQyxFQUFFLE1BQU0sR0FBRyxlQUFlLENBTXBGIn0=
2
+ export declare function getEndToEndTestTelemetryClient(metricsPort?: number): Promise<TelemetryClient>;
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aF90ZWxlbWV0cnlfdXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy93aXRoX3RlbGVtZXRyeV91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQ0wsS0FBSyxlQUFlLEVBSXJCLE1BQU0seUJBQXlCLENBQUM7QUFHakMsd0JBQXNCLDhCQUE4QixDQUFDLFdBQVcsQ0FBQyxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsZUFBZSxDQUFDLENBTW5HIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"with_telemetry_utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/with_telemetry_utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAGjC,wBAAgB,8BAA8B,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,CAMpF"}
1
+ {"version":3,"file":"with_telemetry_utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/with_telemetry_utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAGjC,wBAAsB,8BAA8B,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAMnG"}