@aztec/end-to-end 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2

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