@aztec/end-to-end 0.0.1-commit.9593d84 → 0.0.1-commit.96bb3f7

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 (114) hide show
  1. package/dest/bench/client_flows/client_flows_benchmark.d.ts +3 -3
  2. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/client_flows_benchmark.js +6 -4
  4. package/dest/bench/client_flows/data_extractor.js +3 -1
  5. package/dest/bench/utils.d.ts +5 -5
  6. package/dest/bench/utils.d.ts.map +1 -1
  7. package/dest/bench/utils.js +18 -11
  8. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +14 -7
  9. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  10. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +36 -19
  11. package/dest/e2e_epochs/epochs_test.d.ts +11 -9
  12. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  13. package/dest/e2e_epochs/epochs_test.js +14 -12
  14. package/dest/e2e_fees/bridging_race.notest.js +1 -1
  15. package/dest/e2e_fees/fees_test.d.ts +8 -4
  16. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  17. package/dest/e2e_fees/fees_test.js +7 -4
  18. package/dest/e2e_l1_publisher/write_json.d.ts +1 -1
  19. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  20. package/dest/e2e_l1_publisher/write_json.js +2 -5
  21. package/dest/e2e_multi_validator/utils.js +1 -1
  22. package/dest/e2e_p2p/inactivity_slash_test.d.ts +2 -2
  23. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  24. package/dest/e2e_p2p/inactivity_slash_test.js +3 -6
  25. package/dest/e2e_p2p/p2p_network.d.ts +7 -6
  26. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  27. package/dest/e2e_p2p/p2p_network.js +11 -9
  28. package/dest/e2e_p2p/shared.d.ts +2 -2
  29. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  30. package/dest/e2e_p2p/shared.js +4 -4
  31. package/dest/fixtures/e2e_prover_test.d.ts +3 -5
  32. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  33. package/dest/fixtures/e2e_prover_test.js +6 -10
  34. package/dest/fixtures/fixtures.d.ts +2 -3
  35. package/dest/fixtures/fixtures.d.ts.map +1 -1
  36. package/dest/fixtures/fixtures.js +2 -3
  37. package/dest/fixtures/get_acvm_config.js +1 -1
  38. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  39. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  40. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  41. package/dest/fixtures/setup_p2p_test.js +3 -3
  42. package/dest/fixtures/snapshot_manager.d.ts +6 -8
  43. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  44. package/dest/fixtures/snapshot_manager.js +27 -44
  45. package/dest/fixtures/utils.d.ts +17 -463
  46. package/dest/fixtures/utils.d.ts.map +1 -1
  47. package/dest/fixtures/utils.js +45 -77
  48. package/dest/fixtures/web3signer.js +1 -1
  49. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  50. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  51. package/dest/fixtures/with_telemetry_utils.js +2 -2
  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/shared/cross_chain_test_harness.d.ts +5 -3
  56. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  57. package/dest/shared/cross_chain_test_harness.js +3 -3
  58. package/dest/shared/gas_portal_test_harness.d.ts +2 -2
  59. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  60. package/dest/shared/index.d.ts +2 -2
  61. package/dest/shared/index.d.ts.map +1 -1
  62. package/dest/shared/uniswap_l1_l2.d.ts +3 -27
  63. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  64. package/dest/shared/uniswap_l1_l2.js +43 -23
  65. package/dest/simulators/lending_simulator.d.ts +2 -2
  66. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  67. package/dest/simulators/lending_simulator.js +1 -1
  68. package/dest/spartan/setup_test_wallets.d.ts +4 -3
  69. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  70. package/dest/spartan/setup_test_wallets.js +2 -1
  71. package/dest/spartan/tx_metrics.d.ts +39 -0
  72. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  73. package/dest/spartan/tx_metrics.js +95 -0
  74. package/dest/spartan/utils.d.ts +45 -10
  75. package/dest/spartan/utils.d.ts.map +1 -1
  76. package/dest/spartan/utils.js +203 -60
  77. package/package.json +40 -40
  78. package/src/bench/client_flows/client_flows_benchmark.ts +8 -5
  79. package/src/bench/client_flows/data_extractor.ts +1 -1
  80. package/src/bench/utils.ts +22 -14
  81. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +53 -31
  82. package/src/e2e_epochs/epochs_test.ts +34 -21
  83. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  84. package/src/e2e_fees/fees_test.ts +13 -9
  85. package/src/e2e_l1_publisher/write_json.ts +2 -5
  86. package/src/e2e_multi_validator/utils.ts +1 -1
  87. package/src/e2e_p2p/inactivity_slash_test.ts +4 -7
  88. package/src/e2e_p2p/p2p_network.ts +10 -17
  89. package/src/e2e_p2p/shared.ts +11 -6
  90. package/src/fixtures/e2e_prover_test.ts +7 -10
  91. package/src/fixtures/fixtures.ts +2 -5
  92. package/src/fixtures/get_acvm_config.ts +1 -1
  93. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  94. package/src/fixtures/setup_p2p_test.ts +3 -3
  95. package/src/fixtures/snapshot_manager.ts +44 -63
  96. package/src/fixtures/utils.ts +74 -139
  97. package/src/fixtures/web3signer.ts +1 -1
  98. package/src/fixtures/with_telemetry_utils.ts +2 -2
  99. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
  100. package/src/shared/cross_chain_test_harness.ts +6 -9
  101. package/src/shared/gas_portal_test_harness.ts +1 -1
  102. package/src/shared/index.ts +1 -1
  103. package/src/shared/uniswap_l1_l2.ts +53 -67
  104. package/src/simulators/lending_simulator.ts +2 -2
  105. package/src/spartan/DEVELOP.md +7 -0
  106. package/src/spartan/setup_test_wallets.ts +9 -2
  107. package/src/spartan/tx_metrics.ts +130 -0
  108. package/src/spartan/utils.ts +267 -51
  109. package/dest/fixtures/setup_l1_contracts.d.ts +0 -477
  110. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  111. package/dest/fixtures/setup_l1_contracts.js +0 -17
  112. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  113. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  114. package/src/fixtures/setup_l1_contracts.ts +0 -26
@@ -1,4 +1,5 @@
1
1
  import { createLogger } from '@aztec/aztec.js/log';
2
+ import { promiseWithResolvers } from '@aztec/foundation/promise';
2
3
  import { makeBackoff, retry } from '@aztec/foundation/retry';
3
4
  import { schemas } from '@aztec/foundation/schemas';
4
5
  import { sleep } from '@aztec/foundation/sleep';
@@ -17,6 +18,7 @@ const testConfigSchema = z.object({
17
18
  L1_RPC_URLS_JSON: z.string().optional(),
18
19
  L1_ACCOUNT_MNEMONIC: z.string().optional(),
19
20
  AZTEC_SLOT_DURATION: z.coerce.number().optional().default(24),
21
+ AZTEC_EPOCH_DURATION: z.coerce.number().optional().default(32),
20
22
  AZTEC_PROOF_SUBMISSION_WINDOW: z.coerce.number().optional().default(5)
21
23
  });
22
24
  export function setupEnvironment(env) {
@@ -137,9 +139,35 @@ export async function startPortForward({ resource, namespace, containerPort, hos
137
139
  port
138
140
  };
139
141
  }
140
- export function startPortForwardForRPC(namespace, resourceType = 'services', index = 0) {
142
+ export function getExternalIP(namespace, serviceName) {
143
+ const { promise, resolve, reject } = promiseWithResolvers();
144
+ const process1 = spawn('kubectl', [
145
+ 'get',
146
+ 'service',
147
+ '-n',
148
+ namespace,
149
+ `${namespace}-${serviceName}`,
150
+ '--output',
151
+ "jsonpath='{.status.loadBalancer.ingress[0].ip}'"
152
+ ], {
153
+ stdio: 'pipe'
154
+ });
155
+ let ip = '';
156
+ process1.stdout.on('data', (data)=>{
157
+ ip += data;
158
+ });
159
+ process1.on('error', (err)=>{
160
+ reject(err);
161
+ });
162
+ process1.on('exit', ()=>{
163
+ // kubectl prints JSON. Remove the quotes
164
+ resolve(ip.replace(/"|'/g, ''));
165
+ });
166
+ return promise;
167
+ }
168
+ export function startPortForwardForRPC(namespace, index = 0) {
141
169
  return startPortForward({
142
- resource: `${resourceType}/${namespace}-rpc-aztec-node-${index}`,
170
+ resource: `pod/${namespace}-rpc-aztec-node-${index}`,
143
171
  namespace,
144
172
  containerPort: 8080
145
173
  });
@@ -158,9 +186,11 @@ export async function deleteResourceByName({ resource, namespace, name, force =
158
186
  return stdout;
159
187
  }
160
188
  export async function deleteResourceByLabel({ resource, namespace, label, timeout = '5m', force = false }) {
161
- // Check if the resource type exists before attempting to delete
162
189
  try {
163
- await execAsync(`kubectl api-resources --api-group="" --no-headers -o name | grep -q "^${resource}$" || kubectl api-resources --no-headers -o name | grep -q "^${resource}$"`);
190
+ // Match both plain and group-qualified names (e.g., "podchaos" or "podchaos.chaos-mesh.org")
191
+ const escaped = resource.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
192
+ const regex = `(^|\\.)${escaped}(\\.|$)`;
193
+ await execAsync(`kubectl api-resources --no-headers -o name | grep -Eq '${regex}'`);
164
194
  } catch (error) {
165
195
  logger.warn(`Resource type '${resource}' not found in cluster, skipping deletion ${error}`);
166
196
  return '';
@@ -176,6 +206,31 @@ export async function waitForResourceByLabel({ resource, label, namespace, condi
176
206
  const { stdout } = await execAsync(command);
177
207
  return stdout;
178
208
  }
209
+ export async function waitForResourceByName({ resource, name, namespace, condition = 'Ready', timeout = '10m' }) {
210
+ const command = `kubectl wait ${resource}/${name} --for=condition=${condition} -n ${namespace} --timeout=${timeout}`;
211
+ logger.info(`command: ${command}`);
212
+ const { stdout } = await execAsync(command);
213
+ return stdout;
214
+ }
215
+ export async function waitForResourcesByName({ resource, names, namespace, condition = 'Ready', timeout = '10m' }) {
216
+ if (!names.length) {
217
+ throw new Error(`No ${resource} names provided to waitForResourcesByName`);
218
+ }
219
+ // Wait all in parallel; if any fails, surface which one.
220
+ await Promise.all(names.map(async (name)=>{
221
+ try {
222
+ await waitForResourceByName({
223
+ resource,
224
+ name,
225
+ namespace,
226
+ condition,
227
+ timeout
228
+ });
229
+ } catch (err) {
230
+ throw new Error(`Failed waiting for ${resource}/${name} condition=${condition} timeout=${timeout} namespace=${namespace}: ${String(err)}`);
231
+ }
232
+ }));
233
+ }
179
234
  export function getChartDir(spartanDir, chartName) {
180
235
  return path.join(spartanDir.trim(), chartName);
181
236
  }
@@ -197,6 +252,57 @@ async function execHelmCommand(args) {
197
252
  const { stdout } = await execAsync(helmCommand);
198
253
  return stdout;
199
254
  }
255
+ async function getHelmReleaseStatus(instanceName, namespace) {
256
+ try {
257
+ const { stdout } = await execAsync(`helm list --namespace ${namespace} --all --filter '^${instanceName}$' --output json | cat`);
258
+ const parsed = JSON.parse(stdout);
259
+ const row = parsed.find((r)=>r.name === instanceName);
260
+ return row?.status;
261
+ } catch {
262
+ return undefined;
263
+ }
264
+ }
265
+ async function forceDeleteHelmReleaseRecord(instanceName, namespace, logger) {
266
+ const labelSelector = `owner=helm,name=${instanceName}`;
267
+ const cmd = `kubectl delete secret -n ${namespace} -l ${labelSelector} --ignore-not-found=true`;
268
+ logger.warn(`Force deleting Helm release record: ${cmd}`);
269
+ await execAsync(cmd).catch(()=>undefined);
270
+ }
271
+ async function hasDeployedHelmRelease(instanceName, namespace) {
272
+ try {
273
+ const status = await getHelmReleaseStatus(instanceName, namespace);
274
+ return status?.toLowerCase() === 'deployed';
275
+ } catch {
276
+ return false;
277
+ }
278
+ }
279
+ export async function uninstallChaosMesh(instanceName, namespace, logger) {
280
+ // uninstall the helm chart if it exists
281
+ logger.info(`Uninstalling helm chart ${instanceName}`);
282
+ await execAsync(`helm uninstall ${instanceName} --namespace ${namespace} --wait --ignore-not-found`);
283
+ // and delete the chaos-mesh resources created by this release
284
+ const deleteByLabel = async (resource)=>{
285
+ const args = {
286
+ resource,
287
+ namespace: namespace,
288
+ label: `app.kubernetes.io/instance=${instanceName}`
289
+ };
290
+ logger.info(`Deleting ${resource} resources for release ${instanceName}`);
291
+ await deleteResourceByLabel(args).catch((e)=>{
292
+ logger.error(`Error deleting ${resource}: ${e}`);
293
+ logger.info(`Force deleting ${resource}`);
294
+ return deleteResourceByLabel({
295
+ ...args,
296
+ force: true
297
+ });
298
+ });
299
+ };
300
+ await deleteByLabel('podchaos');
301
+ await deleteByLabel('networkchaos');
302
+ await deleteByLabel('podnetworkchaos');
303
+ await deleteByLabel('workflows');
304
+ await deleteByLabel('workflownodes');
305
+ }
200
306
  /**
201
307
  * Installs a Helm chart with the given parameters.
202
308
  * @param instanceName - The name of the Helm chart instance.
@@ -213,35 +319,14 @@ async function execHelmCommand(args) {
213
319
  * const stdout = await installChaosMeshChart({ instanceName: 'force-reorg', targetNamespace: 'smoke', valuesFile: 'prover-failure.yaml'});
214
320
  * console.log(stdout);
215
321
  * ```
216
- */ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, chaosMeshNamespace = 'chaos-mesh', timeout = '10m', clean = true, values = {}, logger }) {
322
+ */ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, timeout = '10m', clean = true, values = {}, logger }) {
217
323
  if (clean) {
218
- // uninstall the helm chart if it exists
219
- logger.info(`Uninstalling helm chart ${instanceName}`);
220
- await execAsync(`helm uninstall ${instanceName} --namespace ${chaosMeshNamespace} --wait --ignore-not-found`);
221
- // and delete the chaos-mesh resources created by this release
222
- const deleteByLabel = async (resource)=>{
223
- const args = {
224
- resource,
225
- namespace: chaosMeshNamespace,
226
- label: `app.kubernetes.io/instance=${instanceName}`
227
- };
228
- logger.info(`Deleting ${resource} resources for release ${instanceName}`);
229
- await deleteResourceByLabel(args).catch((e)=>{
230
- logger.error(`Error deleting ${resource}: ${e}`);
231
- logger.info(`Force deleting ${resource}`);
232
- return deleteResourceByLabel({
233
- ...args,
234
- force: true
235
- });
236
- });
237
- };
238
- await deleteByLabel('podchaos');
239
- await deleteByLabel('networkchaos');
324
+ await uninstallChaosMesh(instanceName, targetNamespace, logger);
240
325
  }
241
326
  return execHelmCommand({
242
327
  instanceName,
243
328
  helmChartDir,
244
- namespace: chaosMeshNamespace,
329
+ namespace: targetNamespace,
245
330
  valuesFile,
246
331
  timeout,
247
332
  values: {
@@ -262,70 +347,85 @@ export function applyProverFailure({ namespace, spartanDir, durationSeconds, log
262
347
  logger
263
348
  });
264
349
  }
265
- export function applyProverKill({ namespace, spartanDir, logger }) {
350
+ export function applyValidatorFailure({ namespace, spartanDir, logger, values, instanceName }) {
351
+ return installChaosMeshChart({
352
+ instanceName: instanceName ?? 'validator-failure',
353
+ targetNamespace: namespace,
354
+ valuesFile: 'validator-failure.yaml',
355
+ helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
356
+ values,
357
+ logger
358
+ });
359
+ }
360
+ export function applyProverKill({ namespace, spartanDir, logger, values }) {
266
361
  return installChaosMeshChart({
267
362
  instanceName: 'prover-kill',
268
363
  targetNamespace: namespace,
269
364
  valuesFile: 'prover-kill.yaml',
270
365
  helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
366
+ chaosMeshNamespace: namespace,
271
367
  clean: true,
272
- logger
368
+ logger,
369
+ values
273
370
  });
274
371
  }
275
- export function applyProverBrokerKill({ namespace, spartanDir, logger }) {
372
+ export function applyProverBrokerKill({ namespace, spartanDir, logger, values }) {
276
373
  return installChaosMeshChart({
277
374
  instanceName: 'prover-broker-kill',
278
375
  targetNamespace: namespace,
279
376
  valuesFile: 'prover-broker-kill.yaml',
280
377
  helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
281
378
  clean: true,
282
- logger
379
+ logger,
380
+ values
283
381
  });
284
382
  }
285
- export function applyBootNodeFailure({ namespace, spartanDir, durationSeconds, logger }) {
383
+ export function applyBootNodeFailure({ instanceName = 'boot-node-failure', namespace, spartanDir, durationSeconds, logger, values }) {
286
384
  return installChaosMeshChart({
287
- instanceName: 'boot-node-failure',
385
+ instanceName,
288
386
  targetNamespace: namespace,
289
387
  valuesFile: 'boot-node-failure.yaml',
290
388
  helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
291
389
  values: {
292
- 'bootNodeFailure.duration': `${durationSeconds}s`
390
+ 'bootNodeFailure.duration': `${durationSeconds}s`,
391
+ ...values ?? {}
293
392
  },
294
393
  logger
295
394
  });
296
395
  }
297
- export function applyValidatorKill({ namespace, spartanDir, logger, values }) {
396
+ export function applyValidatorKill({ instanceName = 'validator-kill', namespace, spartanDir, logger, values, clean = true }) {
298
397
  return installChaosMeshChart({
299
- instanceName: 'validator-kill',
398
+ instanceName: instanceName ?? 'validator-kill',
300
399
  targetNamespace: namespace,
301
400
  valuesFile: 'validator-kill.yaml',
302
401
  helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
402
+ clean,
303
403
  logger,
304
404
  values
305
405
  });
306
406
  }
307
- export function applyNetworkShaping({ valuesFile, namespace, spartanDir, logger }) {
407
+ export function applyNetworkShaping({ instanceName = 'network-shaping', valuesFile, namespace, spartanDir, logger }) {
308
408
  return installChaosMeshChart({
309
- instanceName: 'network-shaping',
409
+ instanceName,
310
410
  targetNamespace: namespace,
311
411
  valuesFile,
312
412
  helmChartDir: getChartDir(spartanDir, 'aztec-chaos-scenarios'),
313
413
  logger
314
414
  });
315
415
  }
316
- export async function awaitL2BlockNumber(rollupCheatCodes, blockNumber, timeoutSeconds, logger) {
317
- logger.info(`Waiting for L2 Block ${blockNumber}`);
416
+ export async function awaitCheckpointNumber(rollupCheatCodes, checkpointNumber, timeoutSeconds, logger) {
417
+ logger.info(`Waiting for checkpoint ${checkpointNumber}`);
318
418
  let tips = await rollupCheatCodes.getTips();
319
419
  const endTime = Date.now() + timeoutSeconds * 1000;
320
- while(tips.pending < blockNumber && Date.now() < endTime){
321
- logger.info(`At L2 Block ${tips.pending}`);
420
+ while(tips.pending < checkpointNumber && Date.now() < endTime){
421
+ logger.info(`At checkpoint ${tips.pending}`);
322
422
  await sleep(1000);
323
423
  tips = await rollupCheatCodes.getTips();
324
424
  }
325
- if (tips.pending < blockNumber) {
326
- throw new Error(`Timeout waiting for L2 Block ${blockNumber}, only reached ${tips.pending}`);
425
+ if (tips.pending < checkpointNumber) {
426
+ throw new Error(`Timeout waiting for checkpoint ${checkpointNumber}, only reached ${tips.pending}`);
327
427
  } else {
328
- logger.info(`Reached L2 Block ${tips.pending}`);
428
+ logger.info(`Reached checkpoint ${tips.pending}`);
329
429
  }
330
430
  }
331
431
  export async function restartBot(namespace, logger) {
@@ -369,7 +469,12 @@ export async function restartBot(namespace, logger) {
369
469
  // Provide L1 execution RPC for bridging fee juice
370
470
  'bot.node.env.ETHEREUM_HOSTS': `http://${namespace}-eth-execution.${namespace}.svc.cluster.local:8545`,
371
471
  // Provide L1 mnemonic for bridging (falls back to labs mnemonic)
372
- 'bot.node.env.BOT_L1_MNEMONIC': mnemonic
472
+ 'bot.node.env.BOT_L1_MNEMONIC': mnemonic,
473
+ // The bot does not need Kubernetes API access. Disable RBAC + ServiceAccount creation so the chart
474
+ // can be installed by users without cluster-scoped RBAC permissions.
475
+ 'bot.rbac.create': false,
476
+ 'bot.serviceAccount.create': false,
477
+ 'bot.serviceAccount.name': 'default'
373
478
  };
374
479
  // Ensure we derive a funded L1 key (index 0 is funded on anvil default mnemonic)
375
480
  if (mnemonicStartIndex === undefined) {
@@ -392,7 +497,7 @@ export async function restartBot(namespace, logger) {
392
497
  let tag = tagFromEnv;
393
498
  if (!repository || !tag) {
394
499
  try {
395
- const { stdout } = await execAsync(`kubectl get pods -l app.kubernetes.io/component=validator -n ${namespace} -o jsonpath='{.items[0].spec.containers[?(@.name=="aztec")].image}' | cat`);
500
+ const { stdout } = await execAsync(`kubectl get pods -l app.kubernetes.io/name=validator -n ${namespace} -o jsonpath='{.items[0].spec.containers[?(@.name=="aztec")].image}' | cat`);
396
501
  const image = stdout.trim().replace(/^'|'$/g, '');
397
502
  if (image && image.includes(':')) {
398
503
  const lastColon = image.lastIndexOf(':');
@@ -410,6 +515,22 @@ export async function restartBot(namespace, logger) {
410
515
  if (mnemonicStartIndex !== undefined) {
411
516
  values['bot.mnemonicStartIndex'] = typeof mnemonicStartIndex === 'string' ? mnemonicStartIndex : Number(mnemonicStartIndex);
412
517
  }
518
+ // If a previous install attempt left the release in a non-deployed state (e.g. FAILED),
519
+ // `helm upgrade --install` can error with "has no deployed releases".
520
+ // In that case, clear the release record and do a clean install.
521
+ const existingStatus = await getHelmReleaseStatus(instanceName, namespace);
522
+ if (existingStatus && existingStatus.toLowerCase() !== 'deployed') {
523
+ logger.warn(`Transfer bot release ${instanceName} is in status '${existingStatus}'. Reinstalling cleanly.`);
524
+ await execAsync(`helm uninstall ${instanceName} --namespace ${namespace} --wait --ignore-not-found`).catch(()=>undefined);
525
+ // If helm left the release in `uninstalling`, force-delete the record so we can reinstall.
526
+ const afterUninstallStatus = await getHelmReleaseStatus(instanceName, namespace);
527
+ if (afterUninstallStatus?.toLowerCase() === 'uninstalling') {
528
+ await forceDeleteHelmReleaseRecord(instanceName, namespace, logger);
529
+ }
530
+ }
531
+ // `--reuse-values` fails if the release has never successfully deployed (e.g. first install, or a previous failed install).
532
+ // Only reuse values when we have a deployed release to reuse from.
533
+ const effectiveReuseValues = reuseValues && await hasDeployedHelmRelease(instanceName, namespace);
413
534
  await execHelmCommand({
414
535
  instanceName,
415
536
  helmChartDir,
@@ -417,7 +538,7 @@ export async function restartBot(namespace, logger) {
417
538
  valuesFile: undefined,
418
539
  timeout,
419
540
  values: values,
420
- reuseValues
541
+ reuseValues: effectiveReuseValues
421
542
  });
422
543
  if (replicas > 0) {
423
544
  await waitForResourceByLabel({
@@ -449,8 +570,9 @@ export async function restartBot(namespace, logger) {
449
570
  const drop = enabled ? 'true' : 'false';
450
571
  const prob = String(probability);
451
572
  const selectors = [
452
- 'app=validator',
453
- 'app.kubernetes.io/component=validator'
573
+ 'app.kubernetes.io/name=validator',
574
+ 'app.kubernetes.io/component=validator',
575
+ 'app=validator'
454
576
  ];
455
577
  let updated = false;
456
578
  for (const selector of selectors){
@@ -477,8 +599,9 @@ export async function restartBot(namespace, logger) {
477
599
  }
478
600
  export async function restartValidators(namespace, logger) {
479
601
  const selectors = [
480
- 'app=validator',
481
- 'app.kubernetes.io/component=validator'
602
+ 'app.kubernetes.io/name=validator',
603
+ 'app.kubernetes.io/component=validator',
604
+ 'app=validator'
482
605
  ];
483
606
  let any = false;
484
607
  for (const selector of selectors){
@@ -532,11 +655,27 @@ export async function enableValidatorDynamicBootNode(instanceName, namespace, sp
532
655
  logger.info(`Validator dynamic boot node enabled`);
533
656
  }
534
657
  export async function getSequencers(namespace) {
535
- const command = `kubectl get pods -l app.kubernetes.io/component=validator -n ${namespace} -o jsonpath='{.items[*].metadata.name}'`;
536
- const { stdout } = await execAsync(command);
537
- const sequencers = stdout.split(' ');
538
- logger.verbose(`Found sequencer pods ${sequencers.join(', ')}`);
539
- return sequencers;
658
+ const selectors = [
659
+ 'app.kubernetes.io/name=validator',
660
+ 'app.kubernetes.io/component=validator',
661
+ 'app.kubernetes.io/component=sequencer-node',
662
+ 'app=validator'
663
+ ];
664
+ for (const selector of selectors){
665
+ try {
666
+ const command = `kubectl get pods -l ${selector} -n ${namespace} -o jsonpath='{.items[*].metadata.name}'`;
667
+ const { stdout } = await execAsync(command);
668
+ const sequencers = stdout.split(' ').map((s)=>s.trim()).filter(Boolean);
669
+ if (sequencers.length > 0) {
670
+ logger.verbose(`Found sequencer pods ${sequencers.join(', ')} (selector=${selector})`);
671
+ return sequencers;
672
+ }
673
+ } catch {
674
+ // try next selector
675
+ }
676
+ }
677
+ // Fail fast instead of returning [''] which leads to attempts to port-forward `pod/`.
678
+ throw new Error(`No sequencer/validator pods found in namespace ${namespace}. Tried selectors: ${selectors.join(', ')}`);
540
679
  }
541
680
  export function updateSequencersConfig(env, config) {
542
681
  return withSequencersAdmin(env, async (client)=>{
@@ -586,7 +725,9 @@ export async function withSequencersAdmin(env, fn) {
586
725
  const url = `http://127.0.0.1:${port}`;
587
726
  const client = createPublicClient({
588
727
  transport: fallback([
589
- http(url)
728
+ http(url, {
729
+ batch: false
730
+ })
590
731
  ])
591
732
  });
592
733
  if (processes) {
@@ -604,7 +745,9 @@ export async function withSequencersAdmin(env, fn) {
604
745
  }
605
746
  const client = createPublicClient({
606
747
  transport: fallback([
607
- http(L1_RPC_URLS_JSON)
748
+ http(L1_RPC_URLS_JSON, {
749
+ batch: false
750
+ })
608
751
  ])
609
752
  });
610
753
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.0.1-commit.9593d84",
3
+ "version": "0.0.1-commit.96bb3f7",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -8,8 +8,8 @@
8
8
  "./package.local.json"
9
9
  ],
10
10
  "scripts": {
11
- "build": "yarn clean && tsgo -b",
12
- "build:dev": "tsgo -b --watch",
11
+ "build": "yarn clean && ../scripts/tsc.sh",
12
+ "build:dev": "../scripts/tsc.sh --watch",
13
13
  "clean": "rm -rf ./dest .tsbuildinfo",
14
14
  "test:with-alerts": "./scripts/test-with-alerts.sh",
15
15
  "test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
@@ -25,43 +25,43 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.0.1-commit.9593d84",
29
- "@aztec/archiver": "0.0.1-commit.9593d84",
30
- "@aztec/aztec": "0.0.1-commit.9593d84",
31
- "@aztec/aztec-node": "0.0.1-commit.9593d84",
32
- "@aztec/aztec.js": "0.0.1-commit.9593d84",
33
- "@aztec/bb-prover": "0.0.1-commit.9593d84",
34
- "@aztec/bb.js": "0.0.1-commit.9593d84",
35
- "@aztec/blob-lib": "0.0.1-commit.9593d84",
36
- "@aztec/blob-sink": "0.0.1-commit.9593d84",
37
- "@aztec/bot": "0.0.1-commit.9593d84",
38
- "@aztec/cli": "0.0.1-commit.9593d84",
39
- "@aztec/constants": "0.0.1-commit.9593d84",
40
- "@aztec/entrypoints": "0.0.1-commit.9593d84",
41
- "@aztec/epoch-cache": "0.0.1-commit.9593d84",
42
- "@aztec/ethereum": "0.0.1-commit.9593d84",
43
- "@aztec/foundation": "0.0.1-commit.9593d84",
44
- "@aztec/kv-store": "0.0.1-commit.9593d84",
45
- "@aztec/l1-artifacts": "0.0.1-commit.9593d84",
46
- "@aztec/merkle-tree": "0.0.1-commit.9593d84",
47
- "@aztec/node-keystore": "0.0.1-commit.9593d84",
48
- "@aztec/noir-contracts.js": "0.0.1-commit.9593d84",
49
- "@aztec/noir-noirc_abi": "0.0.1-commit.9593d84",
50
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.9593d84",
51
- "@aztec/noir-test-contracts.js": "0.0.1-commit.9593d84",
52
- "@aztec/p2p": "0.0.1-commit.9593d84",
53
- "@aztec/protocol-contracts": "0.0.1-commit.9593d84",
54
- "@aztec/prover-client": "0.0.1-commit.9593d84",
55
- "@aztec/prover-node": "0.0.1-commit.9593d84",
56
- "@aztec/pxe": "0.0.1-commit.9593d84",
57
- "@aztec/sequencer-client": "0.0.1-commit.9593d84",
58
- "@aztec/simulator": "0.0.1-commit.9593d84",
59
- "@aztec/slasher": "0.0.1-commit.9593d84",
60
- "@aztec/stdlib": "0.0.1-commit.9593d84",
61
- "@aztec/telemetry-client": "0.0.1-commit.9593d84",
62
- "@aztec/test-wallet": "0.0.1-commit.9593d84",
63
- "@aztec/validator-client": "0.0.1-commit.9593d84",
64
- "@aztec/world-state": "0.0.1-commit.9593d84",
28
+ "@aztec/accounts": "0.0.1-commit.96bb3f7",
29
+ "@aztec/archiver": "0.0.1-commit.96bb3f7",
30
+ "@aztec/aztec": "0.0.1-commit.96bb3f7",
31
+ "@aztec/aztec-node": "0.0.1-commit.96bb3f7",
32
+ "@aztec/aztec.js": "0.0.1-commit.96bb3f7",
33
+ "@aztec/bb-prover": "0.0.1-commit.96bb3f7",
34
+ "@aztec/bb.js": "0.0.1-commit.96bb3f7",
35
+ "@aztec/blob-client": "0.0.1-commit.96bb3f7",
36
+ "@aztec/blob-lib": "0.0.1-commit.96bb3f7",
37
+ "@aztec/bot": "0.0.1-commit.96bb3f7",
38
+ "@aztec/cli": "0.0.1-commit.96bb3f7",
39
+ "@aztec/constants": "0.0.1-commit.96bb3f7",
40
+ "@aztec/entrypoints": "0.0.1-commit.96bb3f7",
41
+ "@aztec/epoch-cache": "0.0.1-commit.96bb3f7",
42
+ "@aztec/ethereum": "0.0.1-commit.96bb3f7",
43
+ "@aztec/foundation": "0.0.1-commit.96bb3f7",
44
+ "@aztec/kv-store": "0.0.1-commit.96bb3f7",
45
+ "@aztec/l1-artifacts": "0.0.1-commit.96bb3f7",
46
+ "@aztec/merkle-tree": "0.0.1-commit.96bb3f7",
47
+ "@aztec/node-keystore": "0.0.1-commit.96bb3f7",
48
+ "@aztec/noir-contracts.js": "0.0.1-commit.96bb3f7",
49
+ "@aztec/noir-noirc_abi": "0.0.1-commit.96bb3f7",
50
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.96bb3f7",
51
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.96bb3f7",
52
+ "@aztec/p2p": "0.0.1-commit.96bb3f7",
53
+ "@aztec/protocol-contracts": "0.0.1-commit.96bb3f7",
54
+ "@aztec/prover-client": "0.0.1-commit.96bb3f7",
55
+ "@aztec/prover-node": "0.0.1-commit.96bb3f7",
56
+ "@aztec/pxe": "0.0.1-commit.96bb3f7",
57
+ "@aztec/sequencer-client": "0.0.1-commit.96bb3f7",
58
+ "@aztec/simulator": "0.0.1-commit.96bb3f7",
59
+ "@aztec/slasher": "0.0.1-commit.96bb3f7",
60
+ "@aztec/stdlib": "0.0.1-commit.96bb3f7",
61
+ "@aztec/telemetry-client": "0.0.1-commit.96bb3f7",
62
+ "@aztec/test-wallet": "0.0.1-commit.96bb3f7",
63
+ "@aztec/validator-client": "0.0.1-commit.96bb3f7",
64
+ "@aztec/world-state": "0.0.1-commit.96bb3f7",
65
65
  "@iarna/toml": "^2.2.5",
66
66
  "@jest/globals": "^30.0.0",
67
67
  "@noble/curves": "=1.0.0",
@@ -5,11 +5,14 @@ import { type Logger, createLogger } from '@aztec/aztec.js/log';
5
5
  import type { AztecNode } from '@aztec/aztec.js/node';
6
6
  import type { Wallet } from '@aztec/aztec.js/wallet';
7
7
  import { CheatCodes } from '@aztec/aztec/testing';
8
- import { type DeployL1ContractsArgs, RollupContract, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
8
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
9
+ import { RollupContract } from '@aztec/ethereum/contracts';
10
+ import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
11
+ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
9
12
  import { ChainMonitor } from '@aztec/ethereum/test';
10
- import { randomBytes } from '@aztec/foundation/crypto';
13
+ import { randomBytes } from '@aztec/foundation/crypto/random';
14
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
15
  import { EthAddress } from '@aztec/foundation/eth-address';
12
- import { Fr } from '@aztec/foundation/fields';
13
16
  import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
14
17
  import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
15
18
  import { AMMContract } from '@aztec/noir-contracts.js/AMM';
@@ -123,7 +126,7 @@ export class ClientFlowsBenchmark {
123
126
 
124
127
  private proxyLogger: ProxyLogger;
125
128
 
126
- constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {}) {
129
+ constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {}) {
127
130
  this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
128
131
  this.snapshotManager = createSnapshotManager(
129
132
  `bench_client_flows${testName ? `/${testName}` : ''}`,
@@ -436,7 +439,7 @@ export class ClientFlowsBenchmark {
436
439
  public async getPrivateFPCPaymentMethodForWallet(wallet: Wallet, sender: AztecAddress) {
437
440
  // The private fee paying method assembled on the app side requires knowledge of the maximum
438
441
  // fee the user is willing to pay
439
- const maxFeesPerGas = (await this.aztecNode.getCurrentBaseFees()).mul(1.5);
442
+ const maxFeesPerGas = (await this.aztecNode.getCurrentMinFees()).mul(1.5);
440
443
  const gasSettings = GasSettings.default({ maxFeesPerGas });
441
444
  return new PrivateFeePaymentMethod(this.bananaFPC.address, sender, wallet, gasSettings);
442
445
  }
@@ -22,7 +22,7 @@ async function main() {
22
22
  logger.info(`Flows in ${ivcFolder}: \n${flows.map(flowName => `\t- ${flowName}`).join('\n')}`);
23
23
  const simulator = new WASMSimulator();
24
24
  const log = proxyLogger.createLogger('bb:prover');
25
- const prover = new BBBundlePrivateKernelProver(simulator, log);
25
+ const prover = new BBBundlePrivateKernelProver(simulator, { logger: log });
26
26
 
27
27
  const userLog = createLogger('chonk_flows:data_processor');
28
28