@aztec/end-to-end 1.0.0-nightly.20250708 → 1.0.0-staging.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dest/bench/client_flows/client_flows_benchmark.d.ts +1 -1
  2. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/client_flows_benchmark.js +2 -2
  4. package/dest/bench/utils.js +1 -1
  5. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +1 -1
  6. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  7. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +1 -1
  8. package/dest/e2e_epochs/epochs_test.d.ts +2 -15
  9. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  10. package/dest/e2e_epochs/epochs_test.js +3 -59
  11. package/dest/e2e_fees/fees_test.d.ts +1 -1
  12. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  13. package/dest/e2e_fees/fees_test.js +2 -2
  14. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  15. package/dest/e2e_p2p/p2p_network.js +2 -5
  16. package/dest/e2e_p2p/shared.d.ts +1 -1
  17. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  18. package/dest/fixtures/e2e_prover_test.d.ts +1 -1
  19. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  20. package/dest/fixtures/e2e_prover_test.js +1 -2
  21. package/dest/fixtures/setup_p2p_test.d.ts +0 -2
  22. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  23. package/dest/fixtures/setup_p2p_test.js +1 -27
  24. package/dest/fixtures/snapshot_manager.d.ts +1 -1
  25. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  26. package/dest/fixtures/snapshot_manager.js +4 -7
  27. package/dest/fixtures/utils.d.ts +4 -16
  28. package/dest/fixtures/utils.d.ts.map +1 -1
  29. package/dest/fixtures/utils.js +16 -67
  30. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  31. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  32. package/dest/simulators/lending_simulator.d.ts +1 -1
  33. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  34. package/dest/spartan/setup_test_wallets.d.ts +0 -5
  35. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  36. package/dest/spartan/setup_test_wallets.js +6 -70
  37. package/dest/spartan/utils.d.ts +2 -21
  38. package/dest/spartan/utils.d.ts.map +1 -1
  39. package/dest/spartan/utils.js +4 -6
  40. package/package.json +35 -35
  41. package/src/bench/client_flows/client_flows_benchmark.ts +2 -2
  42. package/src/bench/utils.ts +1 -1
  43. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
  44. package/src/e2e_epochs/epochs_test.ts +22 -90
  45. package/src/e2e_fees/fees_test.ts +2 -2
  46. package/src/e2e_p2p/p2p_network.ts +2 -3
  47. package/src/e2e_p2p/shared.ts +1 -1
  48. package/src/fixtures/e2e_prover_test.ts +2 -3
  49. package/src/fixtures/setup_p2p_test.ts +1 -39
  50. package/src/fixtures/snapshot_manager.ts +4 -4
  51. package/src/fixtures/utils.ts +19 -82
  52. package/src/shared/uniswap_l1_l2.ts +1 -1
  53. package/src/simulators/lending_simulator.ts +1 -1
  54. package/src/spartan/setup_test_wallets.ts +4 -81
  55. package/src/spartan/utils.ts +3 -7
@@ -5,11 +5,9 @@ import {
5
5
  type AztecAddress,
6
6
  type AztecNode,
7
7
  FeeJuicePaymentMethodWithClaim,
8
- type FeePaymentMethod,
9
8
  Fr,
10
9
  L1FeeJuicePortalManager,
11
10
  type PXE,
12
- SponsoredFeePaymentMethod,
13
11
  createAztecNodeClient,
14
12
  createCompatibleClient,
15
13
  retryUntil,
@@ -17,13 +15,8 @@ import {
17
15
  import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
18
16
  import type { Logger } from '@aztec/foundation/log';
19
17
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
20
- import { createPXEService } from '@aztec/pxe/server';
21
18
  import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
22
19
 
23
- import { getACVMConfig } from '../fixtures/get_acvm_config.js';
24
- import { getBBConfig } from '../fixtures/get_bb_config.js';
25
- import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
26
-
27
20
  export interface TestWallets {
28
21
  pxe: PXE;
29
22
  wallets: AccountWalletWithSecretKey[];
@@ -49,47 +42,7 @@ export async function setupTestWalletsWithTokens(
49
42
  const [recipientWallet, ...wallets] = (await getDeployedTestAccountsWallets(pxe)).slice(0, WALLET_COUNT + 1);
50
43
 
51
44
  const tokenAdmin = wallets[0];
52
- const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, undefined, logger);
53
- const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
54
-
55
- return { pxe, wallets, tokenAdminWallet, tokenName: TOKEN_NAME, tokenAddress, recipientWallet };
56
- }
57
-
58
- export async function deploySponsoredTestWallets(
59
- pxe: PXE,
60
- mintAmount: bigint,
61
- logger: Logger,
62
- numberOfFundedWallets = 1,
63
- ): Promise<TestWallets> {
64
- const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
65
- const recipientWallet = await getSchnorrWalletWithSecretKey(
66
- pxe,
67
- recipient.secret,
68
- recipient.signingKey,
69
- recipient.salt,
70
- );
71
- const fundedAccounts = await Promise.all(funded.map(a => getSchnorrAccount(pxe, a.secret, a.signingKey, a.salt)));
72
-
73
- await registerSponsoredFPC(pxe);
74
-
75
- const wallets = await Promise.all(
76
- fundedAccounts.map(async a => {
77
- const wallet = await a.getWallet();
78
- const paymentMethod = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
79
- await a.deploy({ fee: { paymentMethod } }).wait({ timeout: 2400 }); // increase timeout on purpose in order to account for two empty epochs
80
- logger.info(`Account deployed at ${a.getAddress()}`);
81
- return wallet;
82
- }),
83
- );
84
-
85
- const tokenAdmin = wallets[0];
86
- const tokenAddress = await deployTokenAndMint(
87
- wallets,
88
- tokenAdmin.getAddress(),
89
- mintAmount,
90
- new SponsoredFeePaymentMethod(await getSponsoredFPCAddress()),
91
- logger,
92
- );
45
+ const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
93
46
  const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
94
47
 
95
48
  return { pxe, wallets, tokenAdminWallet, tokenName: TOKEN_NAME, tokenAddress, recipientWallet };
@@ -136,7 +89,7 @@ export async function deployTestWalletWithTokens(
136
89
  );
137
90
 
138
91
  const tokenAdmin = wallets[0];
139
- const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, undefined, logger);
92
+ const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
140
93
  const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
141
94
 
142
95
  return { pxe, wallets, tokenAdminWallet, tokenName: TOKEN_NAME, tokenAddress, recipientWallet };
@@ -176,16 +129,11 @@ async function deployTokenAndMint(
176
129
  wallets: AccountWalletWithSecretKey[],
177
130
  admin: AztecAddress,
178
131
  mintAmount: bigint,
179
- paymentMethod: FeePaymentMethod | undefined,
180
132
  logger: Logger,
181
133
  ) {
182
134
  logger.verbose(`Deploying TokenContract...`);
183
135
  const tokenContract = await TokenContract.deploy(wallets[0], admin, TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS)
184
- .send({
185
- fee: {
186
- paymentMethod,
187
- },
188
- })
136
+ .send()
189
137
  .deployed({ timeout: 600 });
190
138
 
191
139
  const tokenAddress = tokenContract.address;
@@ -196,7 +144,7 @@ async function deployTokenAndMint(
196
144
  wallets.map(async w =>
197
145
  (await TokenContract.at(tokenAddress, w)).methods
198
146
  .mint_to_public(w.getAddress(), mintAmount)
199
- .send({ fee: { paymentMethod } })
147
+ .send()
200
148
  .wait({ timeout: 600 }),
201
149
  ),
202
150
  );
@@ -238,28 +186,3 @@ export async function performTransfers({
238
186
  logger.info(`Completed round ${i + 1} / ${rounds}`);
239
187
  }
240
188
  }
241
-
242
- export async function startCompatiblePXE(
243
- nodeUrl: string,
244
- proverEnabled: boolean,
245
- logger: Logger,
246
- ): Promise<{ pxe: PXE; cleanup: () => Promise<void> }> {
247
- const node = createAztecNodeClient(nodeUrl);
248
- const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
249
- const pxe = await createPXEService(node, {
250
- dataDirectory: undefined,
251
- dataStoreMapSizeKB: 1024 * 1024,
252
- ...bbConfig,
253
- ...acvmConfig,
254
- proverEnabled,
255
- });
256
-
257
- return {
258
- pxe,
259
- async cleanup() {
260
- await pxe.stop();
261
- await bbConfig?.cleanup();
262
- await acvmConfig?.cleanup();
263
- },
264
- };
265
- }
@@ -1,5 +1,5 @@
1
1
  import { createLogger, sleep } from '@aztec/aztec.js';
2
- import type { RollupCheatCodes } from '@aztec/aztec/testing';
2
+ import type { RollupCheatCodes } from '@aztec/aztec.js/testing';
3
3
  import type { Logger } from '@aztec/foundation/log';
4
4
  import { makeBackoff, retry } from '@aztec/foundation/retry';
5
5
  import type { SequencerConfig } from '@aztec/sequencer-client';
@@ -34,7 +34,6 @@ const k8sLocalConfigSchema = z.object({
34
34
  AZTEC_SLOT_DURATION: z.coerce.number().min(1, 'AZTEC_SLOT_DURATION env variable must be set'),
35
35
  AZTEC_EPOCH_DURATION: z.coerce.number().min(1, 'AZTEC_EPOCH_DURATION env variable must be set'),
36
36
  AZTEC_PROOF_SUBMISSION_WINDOW: z.coerce.number().min(1, 'AZTEC_PROOF_SUBMISSION_WINDOW env variable must be set'),
37
- AZTEC_REAL_PROOFS: z.string().default('false'),
38
37
  INSTANCE_NAME: z.string().min(1, 'INSTANCE_NAME env variable must be set'),
39
38
  NAMESPACE: z.string().min(1, 'NAMESPACE env variable must be set'),
40
39
  CONTAINER_NODE_PORT: z.coerce.number().default(8080),
@@ -57,7 +56,6 @@ const k8sGCloudConfigSchema = k8sLocalConfigSchema.extend({
57
56
  K8S: z.literal('gcloud'),
58
57
  CLUSTER_NAME: z.string().min(1, 'CLUSTER_NAME env variable must be set'),
59
58
  REGION: z.string().min(1, 'REGION env variable must be set'),
60
- PROJECT_ID: z.string().min(1, 'PROJECT_ID env variable must be set'),
61
59
  });
62
60
 
63
61
  const directConfigSchema = z.object({
@@ -86,7 +84,7 @@ export function isGCloudConfig(config: EnvConfig): config is K8sGCloudConfig {
86
84
  export function setupEnvironment(env: unknown): EnvConfig {
87
85
  const config = envSchema.parse(env);
88
86
  if (isGCloudConfig(config)) {
89
- const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION} --project=${config.PROJECT_ID}`;
87
+ const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION}`;
90
88
  execSync(command);
91
89
  }
92
90
  return config;
@@ -235,14 +233,12 @@ export async function deleteResourceByLabel({
235
233
  resource,
236
234
  namespace,
237
235
  label,
238
- timeout = '5m',
239
236
  }: {
240
237
  resource: string;
241
238
  namespace: string;
242
239
  label: string;
243
- timeout?: string;
244
240
  }) {
245
- const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true --timeout=${timeout}`;
241
+ const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true`;
246
242
  logger.info(`command: ${command}`);
247
243
  const { stdout } = await execAsync(command);
248
244
  return stdout;