@aztec/end-to-end 3.0.0-devnet.2 → 3.0.0-devnet.20251212

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 (149) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +1 -1
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/benchmark.js +2 -2
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +9 -2
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  6. package/dest/bench/client_flows/client_flows_benchmark.js +58 -33
  7. package/dest/bench/client_flows/config.d.ts +1 -1
  8. package/dest/bench/client_flows/data_extractor.d.ts +1 -1
  9. package/dest/bench/client_flows/data_extractor.js +8 -30
  10. package/dest/bench/utils.d.ts +2 -2
  11. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -1
  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 +2 -2
  14. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -2
  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 +6 -4
  17. package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
  18. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  19. package/dest/e2e_epochs/epochs_test.d.ts +10 -9
  20. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  21. package/dest/e2e_epochs/epochs_test.js +11 -9
  22. package/dest/e2e_fees/bridging_race.notest.d.ts +1 -1
  23. package/dest/e2e_fees/bridging_race.notest.js +2 -2
  24. package/dest/e2e_fees/fees_test.d.ts +5 -3
  25. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  26. package/dest/e2e_fees/fees_test.js +14 -10
  27. package/dest/e2e_l1_publisher/write_json.d.ts +1 -1
  28. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  29. package/dest/e2e_l1_publisher/write_json.js +5 -4
  30. package/dest/e2e_multi_validator/utils.d.ts +1 -1
  31. package/dest/e2e_multi_validator/utils.js +1 -1
  32. package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
  33. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  34. package/dest/e2e_nested_contract/nested_contract_test.js +4 -3
  35. package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
  36. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  37. package/dest/e2e_p2p/inactivity_slash_test.js +6 -2
  38. package/dest/e2e_p2p/p2p_network.d.ts +218 -11
  39. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  40. package/dest/e2e_p2p/p2p_network.js +11 -5
  41. package/dest/e2e_p2p/shared.d.ts +6 -6
  42. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  43. package/dest/e2e_p2p/shared.js +6 -5
  44. package/dest/e2e_token_contract/token_contract_test.d.ts +1 -1
  45. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  46. package/dest/e2e_token_contract/token_contract_test.js +2 -2
  47. package/dest/fixtures/e2e_prover_test.d.ts +4 -2
  48. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  49. package/dest/fixtures/e2e_prover_test.js +18 -14
  50. package/dest/fixtures/fixtures.d.ts +1 -1
  51. package/dest/fixtures/fixtures.d.ts.map +1 -1
  52. package/dest/fixtures/fixtures.js +1 -1
  53. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  54. package/dest/fixtures/get_acvm_config.js +1 -1
  55. package/dest/fixtures/get_bb_config.d.ts +1 -1
  56. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  57. package/dest/fixtures/index.d.ts +1 -1
  58. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  59. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  60. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  61. package/dest/fixtures/logging.d.ts +1 -1
  62. package/dest/fixtures/setup_l1_contracts.d.ts +475 -4
  63. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
  64. package/dest/fixtures/setup_l1_contracts.js +1 -1
  65. package/dest/fixtures/setup_p2p_test.d.ts +4 -4
  66. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  67. package/dest/fixtures/setup_p2p_test.js +18 -10
  68. package/dest/fixtures/snapshot_manager.d.ts +3 -3
  69. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  70. package/dest/fixtures/snapshot_manager.js +6 -4
  71. package/dest/fixtures/token_utils.d.ts +5 -2
  72. package/dest/fixtures/token_utils.d.ts.map +1 -1
  73. package/dest/fixtures/token_utils.js +7 -4
  74. package/dest/fixtures/utils.d.ts +453 -7
  75. package/dest/fixtures/utils.d.ts.map +1 -1
  76. package/dest/fixtures/utils.js +26 -19
  77. package/dest/fixtures/web3signer.d.ts +1 -1
  78. package/dest/fixtures/web3signer.js +1 -1
  79. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  80. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  81. package/dest/fixtures/with_telemetry_utils.js +2 -2
  82. package/dest/index.d.ts +1 -1
  83. package/dest/quality_of_service/alert_checker.d.ts +1 -1
  84. package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
  85. package/dest/shared/cross_chain_test_harness.d.ts +5 -14
  86. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  87. package/dest/shared/cross_chain_test_harness.js +1 -1
  88. package/dest/shared/gas_portal_test_harness.d.ts +2 -12
  89. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  90. package/dest/shared/gas_portal_test_harness.js +1 -1
  91. package/dest/shared/index.d.ts +1 -1
  92. package/dest/shared/jest_setup.d.ts +1 -1
  93. package/dest/shared/submit-transactions.d.ts +1 -1
  94. package/dest/shared/submit-transactions.d.ts.map +1 -1
  95. package/dest/shared/uniswap_l1_l2.d.ts +3 -2
  96. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  97. package/dest/shared/uniswap_l1_l2.js +15 -13
  98. package/dest/simulators/index.d.ts +1 -1
  99. package/dest/simulators/lending_simulator.d.ts +2 -6
  100. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  101. package/dest/simulators/lending_simulator.js +5 -3
  102. package/dest/simulators/token_simulator.d.ts +1 -1
  103. package/dest/simulators/token_simulator.d.ts.map +1 -1
  104. package/dest/spartan/setup_test_wallets.d.ts +5 -3
  105. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  106. package/dest/spartan/setup_test_wallets.js +45 -10
  107. package/dest/spartan/tx_metrics.d.ts +39 -0
  108. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  109. package/dest/spartan/tx_metrics.js +95 -0
  110. package/dest/spartan/utils.d.ts +31 -21
  111. package/dest/spartan/utils.d.ts.map +1 -1
  112. package/dest/spartan/utils.js +93 -33
  113. package/package.json +42 -40
  114. package/src/bench/client_flows/benchmark.ts +2 -2
  115. package/src/bench/client_flows/client_flows_benchmark.ts +80 -33
  116. package/src/bench/client_flows/data_extractor.ts +9 -31
  117. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +2 -2
  118. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -6
  119. package/src/e2e_deploy_contract/deploy_test.ts +1 -1
  120. package/src/e2e_epochs/epochs_test.ts +19 -16
  121. package/src/e2e_fees/bridging_race.notest.ts +2 -2
  122. package/src/e2e_fees/fees_test.ts +18 -12
  123. package/src/e2e_l1_publisher/write_json.ts +5 -4
  124. package/src/e2e_multi_validator/utils.ts +1 -1
  125. package/src/e2e_nested_contract/nested_contract_test.ts +4 -3
  126. package/src/e2e_p2p/inactivity_slash_test.ts +9 -3
  127. package/src/e2e_p2p/p2p_network.ts +15 -12
  128. package/src/e2e_p2p/shared.ts +13 -6
  129. package/src/e2e_token_contract/token_contract_test.ts +2 -2
  130. package/src/fixtures/e2e_prover_test.ts +16 -17
  131. package/src/fixtures/fixtures.ts +1 -2
  132. package/src/fixtures/get_acvm_config.ts +1 -1
  133. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  134. package/src/fixtures/setup_l1_contracts.ts +2 -1
  135. package/src/fixtures/setup_p2p_test.ts +23 -9
  136. package/src/fixtures/snapshot_manager.ts +7 -10
  137. package/src/fixtures/token_utils.ts +4 -4
  138. package/src/fixtures/utils.ts +51 -31
  139. package/src/fixtures/web3signer.ts +1 -1
  140. package/src/fixtures/with_telemetry_utils.ts +2 -2
  141. package/src/guides/up_quick_start.sh +1 -1
  142. package/src/shared/cross_chain_test_harness.ts +5 -2
  143. package/src/shared/gas_portal_test_harness.ts +2 -2
  144. package/src/shared/uniswap_l1_l2.ts +16 -19
  145. package/src/simulators/lending_simulator.ts +6 -4
  146. package/src/spartan/DEVELOP.md +7 -0
  147. package/src/spartan/setup_test_wallets.ts +49 -12
  148. package/src/spartan/tx_metrics.ts +130 -0
  149. package/src/spartan/utils.ts +107 -33
@@ -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';
@@ -137,9 +138,35 @@ export async function startPortForward({ resource, namespace, containerPort, hos
137
138
  port
138
139
  };
139
140
  }
140
- export function startPortForwardForRPC(namespace) {
141
+ export function getExternalIP(namespace, serviceName) {
142
+ const { promise, resolve, reject } = promiseWithResolvers();
143
+ const process1 = spawn('kubectl', [
144
+ 'get',
145
+ 'service',
146
+ '-n',
147
+ namespace,
148
+ `${namespace}-${serviceName}`,
149
+ '--output',
150
+ "jsonpath='{.status.loadBalancer.ingress[0].ip}'"
151
+ ], {
152
+ stdio: 'pipe'
153
+ });
154
+ let ip = '';
155
+ process1.stdout.on('data', (data)=>{
156
+ ip += data;
157
+ });
158
+ process1.on('error', (err)=>{
159
+ reject(err);
160
+ });
161
+ process1.on('exit', ()=>{
162
+ // kubectl prints JSON. Remove the quotes
163
+ resolve(ip.replace(/"|'/g, ''));
164
+ });
165
+ return promise;
166
+ }
167
+ export function startPortForwardForRPC(namespace, index = 0) {
141
168
  return startPortForward({
142
- resource: `services/${namespace}-rpc-aztec-node`,
169
+ resource: `pod/${namespace}-rpc-aztec-node-${index}`,
143
170
  namespace,
144
171
  containerPort: 8080
145
172
  });
@@ -197,6 +224,33 @@ async function execHelmCommand(args) {
197
224
  const { stdout } = await execAsync(helmCommand);
198
225
  return stdout;
199
226
  }
227
+ export async function uninstallChaosMesh(instanceName, namespace, logger) {
228
+ // uninstall the helm chart if it exists
229
+ logger.info(`Uninstalling helm chart ${instanceName}`);
230
+ await execAsync(`helm uninstall ${instanceName} --namespace ${namespace} --wait --ignore-not-found`);
231
+ // and delete the chaos-mesh resources created by this release
232
+ const deleteByLabel = async (resource)=>{
233
+ const args = {
234
+ resource,
235
+ namespace: namespace,
236
+ label: `app.kubernetes.io/instance=${instanceName}`
237
+ };
238
+ logger.info(`Deleting ${resource} resources for release ${instanceName}`);
239
+ await deleteResourceByLabel(args).catch((e)=>{
240
+ logger.error(`Error deleting ${resource}: ${e}`);
241
+ logger.info(`Force deleting ${resource}`);
242
+ return deleteResourceByLabel({
243
+ ...args,
244
+ force: true
245
+ });
246
+ });
247
+ };
248
+ await deleteByLabel('podchaos');
249
+ await deleteByLabel('networkchaos');
250
+ await deleteByLabel('podnetworkchaos');
251
+ await deleteByLabel('workflows');
252
+ await deleteByLabel('workflownodes');
253
+ }
200
254
  /**
201
255
  * Installs a Helm chart with the given parameters.
202
256
  * @param instanceName - The name of the Helm chart instance.
@@ -213,35 +267,14 @@ async function execHelmCommand(args) {
213
267
  * const stdout = await installChaosMeshChart({ instanceName: 'force-reorg', targetNamespace: 'smoke', valuesFile: 'prover-failure.yaml'});
214
268
  * console.log(stdout);
215
269
  * ```
216
- */ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, chaosMeshNamespace = 'chaos-mesh', timeout = '10m', clean = true, values = {}, logger }) {
270
+ */ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, timeout = '10m', clean = true, values = {}, logger }) {
217
271
  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');
272
+ await uninstallChaosMesh(instanceName, targetNamespace, logger);
240
273
  }
241
274
  return execHelmCommand({
242
275
  instanceName,
243
276
  helmChartDir,
244
- namespace: chaosMeshNamespace,
277
+ namespace: targetNamespace,
245
278
  valuesFile,
246
279
  timeout,
247
280
  values: {
@@ -313,19 +346,19 @@ export function applyNetworkShaping({ valuesFile, namespace, spartanDir, logger
313
346
  logger
314
347
  });
315
348
  }
316
- export async function awaitL2BlockNumber(rollupCheatCodes, blockNumber, timeoutSeconds, logger) {
317
- logger.info(`Waiting for L2 Block ${blockNumber}`);
349
+ export async function awaitCheckpointNumber(rollupCheatCodes, checkpointNumber, timeoutSeconds, logger) {
350
+ logger.info(`Waiting for checkpoint ${checkpointNumber}`);
318
351
  let tips = await rollupCheatCodes.getTips();
319
352
  const endTime = Date.now() + timeoutSeconds * 1000;
320
- while(tips.pending < blockNumber && Date.now() < endTime){
321
- logger.info(`At L2 Block ${tips.pending}`);
353
+ while(tips.pending < checkpointNumber && Date.now() < endTime){
354
+ logger.info(`At checkpoint ${tips.pending}`);
322
355
  await sleep(1000);
323
356
  tips = await rollupCheatCodes.getTips();
324
357
  }
325
- if (tips.pending < blockNumber) {
326
- throw new Error(`Timeout waiting for L2 Block ${blockNumber}, only reached ${tips.pending}`);
358
+ if (tips.pending < checkpointNumber) {
359
+ throw new Error(`Timeout waiting for checkpoint ${checkpointNumber}, only reached ${tips.pending}`);
327
360
  } else {
328
- logger.info(`Reached L2 Block ${tips.pending}`);
361
+ logger.info(`Reached checkpoint ${tips.pending}`);
329
362
  }
330
363
  }
331
364
  export async function restartBot(namespace, logger) {
@@ -720,3 +753,30 @@ export async function withSequencersAdmin(env, fn) {
720
753
  throw new Error(`Failed to determine git project root: ${error}`);
721
754
  }
722
755
  }
756
+ /** Returns a client to the RPC of the given sequencer (defaults to first) */ export async function getNodeClient(env, index = 0) {
757
+ const namespace = env.NAMESPACE;
758
+ const containerPort = 8080;
759
+ const sequencers = await getSequencers(namespace);
760
+ const sequencer = sequencers[index];
761
+ if (!sequencer) {
762
+ throw new Error(`No sequencer found at index ${index} in namespace ${namespace}`);
763
+ }
764
+ const { process: process1, port } = await startPortForward({
765
+ resource: `pod/${sequencer}`,
766
+ namespace,
767
+ containerPort
768
+ });
769
+ const url = `http://localhost:${port}`;
770
+ await retry(()=>fetch(`${url}/status`).then((res)=>res.status === 200), 'forward port', makeBackoff([
771
+ 1,
772
+ 1,
773
+ 2,
774
+ 6
775
+ ]), logger, true);
776
+ const client = createAztecNodeClient(url);
777
+ return {
778
+ node: client,
779
+ port,
780
+ process: process1
781
+ };
782
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "3.0.0-devnet.2",
3
+ "version": "3.0.0-devnet.20251212",
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 && tsc -b",
12
- "build:dev": "tsc -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,42 +25,43 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "3.0.0-devnet.2",
29
- "@aztec/archiver": "3.0.0-devnet.2",
30
- "@aztec/aztec": "3.0.0-devnet.2",
31
- "@aztec/aztec-node": "3.0.0-devnet.2",
32
- "@aztec/aztec.js": "3.0.0-devnet.2",
33
- "@aztec/bb-prover": "3.0.0-devnet.2",
34
- "@aztec/blob-lib": "3.0.0-devnet.2",
35
- "@aztec/blob-sink": "3.0.0-devnet.2",
36
- "@aztec/bot": "3.0.0-devnet.2",
37
- "@aztec/cli": "3.0.0-devnet.2",
38
- "@aztec/constants": "3.0.0-devnet.2",
39
- "@aztec/entrypoints": "3.0.0-devnet.2",
40
- "@aztec/epoch-cache": "3.0.0-devnet.2",
41
- "@aztec/ethereum": "3.0.0-devnet.2",
42
- "@aztec/foundation": "3.0.0-devnet.2",
43
- "@aztec/kv-store": "3.0.0-devnet.2",
44
- "@aztec/l1-artifacts": "3.0.0-devnet.2",
45
- "@aztec/merkle-tree": "3.0.0-devnet.2",
46
- "@aztec/node-keystore": "3.0.0-devnet.2",
47
- "@aztec/noir-contracts.js": "3.0.0-devnet.2",
48
- "@aztec/noir-noirc_abi": "3.0.0-devnet.2",
49
- "@aztec/noir-protocol-circuits-types": "3.0.0-devnet.2",
50
- "@aztec/noir-test-contracts.js": "3.0.0-devnet.2",
51
- "@aztec/p2p": "3.0.0-devnet.2",
52
- "@aztec/protocol-contracts": "3.0.0-devnet.2",
53
- "@aztec/prover-client": "3.0.0-devnet.2",
54
- "@aztec/prover-node": "3.0.0-devnet.2",
55
- "@aztec/pxe": "3.0.0-devnet.2",
56
- "@aztec/sequencer-client": "3.0.0-devnet.2",
57
- "@aztec/simulator": "3.0.0-devnet.2",
58
- "@aztec/slasher": "3.0.0-devnet.2",
59
- "@aztec/stdlib": "3.0.0-devnet.2",
60
- "@aztec/telemetry-client": "3.0.0-devnet.2",
61
- "@aztec/test-wallet": "3.0.0-devnet.2",
62
- "@aztec/validator-client": "3.0.0-devnet.2",
63
- "@aztec/world-state": "3.0.0-devnet.2",
28
+ "@aztec/accounts": "3.0.0-devnet.20251212",
29
+ "@aztec/archiver": "3.0.0-devnet.20251212",
30
+ "@aztec/aztec": "3.0.0-devnet.20251212",
31
+ "@aztec/aztec-node": "3.0.0-devnet.20251212",
32
+ "@aztec/aztec.js": "3.0.0-devnet.20251212",
33
+ "@aztec/bb-prover": "3.0.0-devnet.20251212",
34
+ "@aztec/bb.js": "3.0.0-devnet.20251212",
35
+ "@aztec/blob-lib": "3.0.0-devnet.20251212",
36
+ "@aztec/blob-sink": "3.0.0-devnet.20251212",
37
+ "@aztec/bot": "3.0.0-devnet.20251212",
38
+ "@aztec/cli": "3.0.0-devnet.20251212",
39
+ "@aztec/constants": "3.0.0-devnet.20251212",
40
+ "@aztec/entrypoints": "3.0.0-devnet.20251212",
41
+ "@aztec/epoch-cache": "3.0.0-devnet.20251212",
42
+ "@aztec/ethereum": "3.0.0-devnet.20251212",
43
+ "@aztec/foundation": "3.0.0-devnet.20251212",
44
+ "@aztec/kv-store": "3.0.0-devnet.20251212",
45
+ "@aztec/l1-artifacts": "3.0.0-devnet.20251212",
46
+ "@aztec/merkle-tree": "3.0.0-devnet.20251212",
47
+ "@aztec/node-keystore": "3.0.0-devnet.20251212",
48
+ "@aztec/noir-contracts.js": "3.0.0-devnet.20251212",
49
+ "@aztec/noir-noirc_abi": "3.0.0-devnet.20251212",
50
+ "@aztec/noir-protocol-circuits-types": "3.0.0-devnet.20251212",
51
+ "@aztec/noir-test-contracts.js": "3.0.0-devnet.20251212",
52
+ "@aztec/p2p": "3.0.0-devnet.20251212",
53
+ "@aztec/protocol-contracts": "3.0.0-devnet.20251212",
54
+ "@aztec/prover-client": "3.0.0-devnet.20251212",
55
+ "@aztec/prover-node": "3.0.0-devnet.20251212",
56
+ "@aztec/pxe": "3.0.0-devnet.20251212",
57
+ "@aztec/sequencer-client": "3.0.0-devnet.20251212",
58
+ "@aztec/simulator": "3.0.0-devnet.20251212",
59
+ "@aztec/slasher": "3.0.0-devnet.20251212",
60
+ "@aztec/stdlib": "3.0.0-devnet.20251212",
61
+ "@aztec/telemetry-client": "3.0.0-devnet.20251212",
62
+ "@aztec/test-wallet": "3.0.0-devnet.20251212",
63
+ "@aztec/validator-client": "3.0.0-devnet.20251212",
64
+ "@aztec/world-state": "3.0.0-devnet.20251212",
64
65
  "@iarna/toml": "^2.2.5",
65
66
  "@jest/globals": "^30.0.0",
66
67
  "@noble/curves": "=1.0.0",
@@ -97,7 +98,7 @@
97
98
  "tslib": "^2.4.0",
98
99
  "typescript": "^5.3.3",
99
100
  "util": "^0.12.5",
100
- "viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
101
+ "viem": "npm:@aztec/viem@2.38.2",
101
102
  "zod": "^3.23.8"
102
103
  },
103
104
  "devDependencies": {
@@ -106,6 +107,7 @@
106
107
  "@types/jest": "^30.0.0",
107
108
  "@types/js-yaml": "^4.0.9",
108
109
  "@types/lodash.chunk": "^4.2.9",
110
+ "@typescript/native-preview": "7.0.0-dev.20251126.1",
109
111
  "concurrently": "^7.6.0",
110
112
  "jest": "^30.0.0",
111
113
  "jest-extended": "^6.0.0",
@@ -315,12 +315,12 @@ export async function captureProfile(
315
315
 
316
316
  const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
317
317
  if (ivcFolder) {
318
- logger.info(`Capturing client ivc execution profile for ${label}`);
318
+ logger.info(`Capturing chonk execution profile for ${label}`);
319
319
 
320
320
  const resultsDirectory = join(ivcFolder, label);
321
321
  logger.info(`Writing private execution steps to ${resultsDirectory}`);
322
322
  await mkdir(resultsDirectory, { recursive: true });
323
- // Write the client IVC files read by the prover.
323
+ // Write the chonk files read by the prover.
324
324
  const ivcInputsPath = join(resultsDirectory, 'ivc-inputs.msgpack');
325
325
  await writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
326
326
  await writeFile(join(resultsDirectory, 'logs.json'), JSON.stringify(logs, null, 2));
@@ -5,11 +5,13 @@ 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 DeployL1ContractsArgs, deployL1Contract } from '@aztec/ethereum/deploy-l1-contracts';
9
11
  import { ChainMonitor } from '@aztec/ethereum/test';
10
- import { randomBytes } from '@aztec/foundation/crypto';
12
+ import { randomBytes } from '@aztec/foundation/crypto/random';
13
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
14
  import { EthAddress } from '@aztec/foundation/eth-address';
12
- import { Fr } from '@aztec/foundation/fields';
13
15
  import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
14
16
  import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
15
17
  import { AMMContract } from '@aztec/noir-contracts.js/AMM';
@@ -20,6 +22,7 @@ import { TokenContract as BananaCoin, TokenContract } from '@aztec/noir-contract
20
22
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
21
23
  import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
22
24
  import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server';
25
+ import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
23
26
  import { GasSettings } from '@aztec/stdlib/gas';
24
27
  import { deriveSigningKey } from '@aztec/stdlib/keys';
25
28
  import { TestWallet } from '@aztec/test-wallet/server';
@@ -69,15 +72,21 @@ export class ClientFlowsBenchmark {
69
72
  public feeJuiceContract!: FeeJuiceContract;
70
73
  // Asset in which fees are paid via FPC
71
74
  public bananaCoin!: BananaCoin;
75
+ public bananaCoinInstance!: ContractInstanceWithAddress;
72
76
  public bananaFPC!: FPCContract;
77
+ public bananaFPCInstance!: ContractInstanceWithAddress;
73
78
  // Random asset we want to trade
74
79
  public candyBarCoin!: TokenContract;
80
+ public candyBarCoinInstance!: ContractInstanceWithAddress;
75
81
  // AMM contract
76
82
  public amm!: AMMContract;
83
+ public ammInstance!: ContractInstanceWithAddress;
77
84
  // Liquidity token for AMM
78
85
  public liquidityToken!: TokenContract;
86
+ public liquidityTokenInstance!: ContractInstanceWithAddress;
79
87
  // Sponsored FPC contract
80
88
  public sponsoredFPC!: SponsoredFPCContract;
89
+ public sponsoredFPCInstance!: ContractInstanceWithAddress;
81
90
 
82
91
  // PXE and Wallet used by the benchmarking user. It can be set up with client-side proving enabled
83
92
  public userWallet!: TestWallet;
@@ -204,7 +213,7 @@ export class ClientFlowsBenchmark {
204
213
  this.sequencerAddress = sequencerAddress;
205
214
 
206
215
  const canonicalFeeJuice = await getCanonicalFeeJuice();
207
- this.feeJuiceContract = await FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
216
+ this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
208
217
  this.coinbase = EthAddress.random();
209
218
 
210
219
  const userPXEConfig = getPXEConfig();
@@ -229,7 +238,7 @@ export class ClientFlowsBenchmark {
229
238
  async (_data, context) => {
230
239
  this.context = context;
231
240
 
232
- this.feeJuiceContract = await FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
241
+ this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
233
242
 
234
243
  this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
235
244
  aztecNode: context.aztecNode,
@@ -246,14 +255,22 @@ export class ClientFlowsBenchmark {
246
255
  await this.snapshotManager.snapshot(
247
256
  'deploy_banana_token',
248
257
  async () => {
249
- const bananaCoin = await BananaCoin.deploy(this.adminWallet, this.adminAddress, 'BC', 'BC', 18n)
258
+ const { contract: bananaCoin, instance: bananaCoinInstance } = await BananaCoin.deploy(
259
+ this.adminWallet,
260
+ this.adminAddress,
261
+ 'BC',
262
+ 'BC',
263
+ 18n,
264
+ )
250
265
  .send({ from: this.adminAddress })
251
- .deployed();
266
+ .wait();
252
267
  this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
253
- return { bananaCoinAddress: bananaCoin.address };
268
+ return { bananaCoinAddress: bananaCoin.address, bananaCoinInstance };
254
269
  },
255
- async ({ bananaCoinAddress }) => {
256
- this.bananaCoin = await BananaCoin.at(bananaCoinAddress, this.adminWallet);
270
+ ({ bananaCoinAddress, bananaCoinInstance }) => {
271
+ this.bananaCoin = BananaCoin.at(bananaCoinAddress, this.adminWallet);
272
+ this.bananaCoinInstance = bananaCoinInstance;
273
+ return Promise.resolve();
257
274
  },
258
275
  );
259
276
  }
@@ -262,14 +279,22 @@ export class ClientFlowsBenchmark {
262
279
  await this.snapshotManager.snapshot(
263
280
  'deploy_candy_bar_token',
264
281
  async () => {
265
- const candyBarCoin = await TokenContract.deploy(this.adminWallet, this.adminAddress, 'CBC', 'CBC', 18n)
282
+ const { contract: candyBarCoin, instance: candyBarCoinInstance } = await TokenContract.deploy(
283
+ this.adminWallet,
284
+ this.adminAddress,
285
+ 'CBC',
286
+ 'CBC',
287
+ 18n,
288
+ )
266
289
  .send({ from: this.adminAddress })
267
- .deployed();
290
+ .wait();
268
291
  this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
269
- return { candyBarCoinAddress: candyBarCoin.address };
292
+ return { candyBarCoinAddress: candyBarCoin.address, candyBarCoinInstance };
270
293
  },
271
- async ({ candyBarCoinAddress }) => {
272
- this.candyBarCoin = await TokenContract.at(candyBarCoinAddress, this.adminWallet);
294
+ ({ candyBarCoinAddress, candyBarCoinInstance }) => {
295
+ this.candyBarCoin = TokenContract.at(candyBarCoinAddress, this.adminWallet);
296
+ this.candyBarCoinInstance = candyBarCoinInstance;
297
+ return Promise.resolve();
273
298
  },
274
299
  );
275
300
  }
@@ -282,18 +307,24 @@ export class ClientFlowsBenchmark {
282
307
  expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
283
308
 
284
309
  const bananaCoin = this.bananaCoin;
285
- const bananaFPC = await FPCContract.deploy(this.adminWallet, bananaCoin.address, this.adminAddress)
310
+ const { contract: bananaFPC, instance: bananaFPCInstance } = await FPCContract.deploy(
311
+ this.adminWallet,
312
+ bananaCoin.address,
313
+ this.adminAddress,
314
+ )
286
315
  .send({ from: this.adminAddress })
287
- .deployed();
316
+ .wait();
288
317
 
289
318
  this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
290
319
 
291
320
  await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.adminAddress);
292
321
 
293
- return { bananaFPCAddress: bananaFPC.address };
322
+ return { bananaFPCAddress: bananaFPC.address, bananaFPCInstance };
294
323
  },
295
- async data => {
296
- this.bananaFPC = await FPCContract.at(data.bananaFPCAddress, this.adminWallet);
324
+ data => {
325
+ this.bananaFPC = FPCContract.at(data.bananaFPCAddress, this.adminWallet);
326
+ this.bananaFPCInstance = data.bananaFPCInstance;
327
+ return Promise.resolve();
297
328
  },
298
329
  );
299
330
  }
@@ -302,12 +333,14 @@ export class ClientFlowsBenchmark {
302
333
  await this.snapshotManager.snapshot(
303
334
  'deploy_sponsored_fpc',
304
335
  async () => {
305
- const sponsoredFPC = await setupSponsoredFPC(this.adminWallet);
306
- this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
307
- return { sponsoredFPCAddress: sponsoredFPC.address };
336
+ const sponsoredFPCInstance = await setupSponsoredFPC(this.adminWallet);
337
+ this.logger.info(`SponsoredFPC at ${sponsoredFPCInstance.address}`);
338
+ return { sponsoredFPCAddress: sponsoredFPCInstance.address, sponsoredFPCInstance };
308
339
  },
309
- async ({ sponsoredFPCAddress }) => {
310
- this.sponsoredFPC = await SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
340
+ ({ sponsoredFPCAddress, sponsoredFPCInstance }) => {
341
+ this.sponsoredFPC = SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
342
+ this.sponsoredFPCInstance = sponsoredFPCInstance;
343
+ return Promise.resolve();
311
344
  },
312
345
  );
313
346
  }
@@ -361,24 +394,38 @@ export class ClientFlowsBenchmark {
361
394
  await this.snapshotManager.snapshot(
362
395
  'deploy_amm',
363
396
  async () => {
364
- const liquidityToken = await TokenContract.deploy(this.adminWallet, this.adminAddress, 'LPT', 'LPT', 18n)
397
+ const { contract: liquidityToken, instance: liquidityTokenInstance } = await TokenContract.deploy(
398
+ this.adminWallet,
399
+ this.adminAddress,
400
+ 'LPT',
401
+ 'LPT',
402
+ 18n,
403
+ )
365
404
  .send({ from: this.adminAddress })
366
- .deployed();
367
- const amm = await AMMContract.deploy(
405
+ .wait();
406
+ const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
368
407
  this.adminWallet,
369
408
  this.bananaCoin.address,
370
409
  this.candyBarCoin.address,
371
410
  liquidityToken.address,
372
411
  )
373
412
  .send({ from: this.adminAddress })
374
- .deployed();
413
+ .wait();
375
414
  this.logger.info(`AMM deployed at ${amm.address}`);
376
415
  await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress }).wait();
377
- return { ammAddress: amm.address, liquidityTokenAddress: liquidityToken.address };
416
+ return {
417
+ ammAddress: amm.address,
418
+ ammInstance,
419
+ liquidityTokenAddress: liquidityToken.address,
420
+ liquidityTokenInstance,
421
+ };
378
422
  },
379
- async ({ ammAddress, liquidityTokenAddress }) => {
380
- this.liquidityToken = await TokenContract.at(liquidityTokenAddress, this.adminWallet);
381
- this.amm = await AMMContract.at(ammAddress, this.adminWallet);
423
+ ({ ammAddress, ammInstance, liquidityTokenAddress, liquidityTokenInstance }) => {
424
+ this.liquidityToken = TokenContract.at(liquidityTokenAddress, this.adminWallet);
425
+ this.liquidityTokenInstance = liquidityTokenInstance;
426
+ this.amm = AMMContract.at(ammAddress, this.adminWallet);
427
+ this.ammInstance = ammInstance;
428
+ return Promise.resolve();
382
429
  },
383
430
  );
384
431
  }
@@ -1,6 +1,4 @@
1
- import type { Logger } from '@aztec/aztec.js/log';
2
- import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
3
- import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
1
+ import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
4
2
  import { createLogger, logger } from '@aztec/foundation/log';
5
3
  import { Timer } from '@aztec/foundation/timer';
6
4
  import { WASMSimulator } from '@aztec/simulator/client';
@@ -11,26 +9,7 @@ import { Decoder } from 'msgpackr';
11
9
  import { readFile, readdir, writeFile } from 'node:fs/promises';
12
10
  import { join } from 'node:path';
13
11
 
14
- import { type Log, type ProverType, ProxyLogger, generateBenchmark } from './benchmark.js';
15
-
16
- type NativeProverConfig = { bbBinaryPath?: string; bbWorkingDirectory?: string };
17
-
18
- async function createProver(config: NativeProverConfig = {}, log: Logger) {
19
- const simulator = new WASMSimulator();
20
- if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
21
- return { prover: new BBWASMBundlePrivateKernelProver(simulator, 16, log), type: 'wasm' as ProverType };
22
- } else {
23
- const bbConfig = config as Required<NativeProverConfig>;
24
- return {
25
- prover: await BBNativePrivateKernelProver.new(
26
- { bbSkipCleanup: false, numConcurrentIVCVerifiers: 1, bbIVCConcurrency: 1, ...bbConfig },
27
- simulator,
28
- log,
29
- ),
30
- type: 'native' as ProverType,
31
- };
32
- }
33
- }
12
+ import { type Log, ProxyLogger, generateBenchmark } from './benchmark.js';
34
13
 
35
14
  async function main() {
36
15
  ProxyLogger.create();
@@ -41,12 +20,11 @@ async function main() {
41
20
  }
42
21
  const flows = await readdir(ivcFolder);
43
22
  logger.info(`Flows in ${ivcFolder}: \n${flows.map(flowName => `\t- ${flowName}`).join('\n')}`);
44
- const { prover, type: proverType } = await createProver(
45
- { bbBinaryPath: process.env.BB_BINARY_PATH, bbWorkingDirectory: process.env.BB_WORKING_DIRECTORY },
46
- proxyLogger.createLogger('bb:prover'),
47
- );
23
+ const simulator = new WASMSimulator();
24
+ const log = proxyLogger.createLogger('bb:prover');
25
+ const prover = new BBBundlePrivateKernelProver(simulator, log);
48
26
 
49
- const userLog = createLogger('client_ivc_flows:data_processor');
27
+ const userLog = createLogger('chonk_flows:data_processor');
50
28
 
51
29
  for (const flow of flows) {
52
30
  userLog.info(`Processing flow ${flow}`);
@@ -84,10 +62,10 @@ async function main() {
84
62
  let provingTime;
85
63
  try {
86
64
  const provingTimer = new Timer();
87
- await prover.createClientIvcProof(privateExecutionSteps);
65
+ await prover.createChonkProof(privateExecutionSteps);
88
66
  provingTime = provingTimer.ms();
89
67
  } catch (e) {
90
- userLog.error(`Failed to generate client ivc proof for ${flow}`, e);
68
+ userLog.error(`Failed to generate chonk proof for ${flow}`, e);
91
69
  error = (e as Error).message;
92
70
  }
93
71
  // Extract logs from this run from the proxy and write them to disk unconditionally
@@ -96,7 +74,7 @@ async function main() {
96
74
  if (!(profile.stats.timings as ProvingTimings).proving) {
97
75
  (profile.stats.timings as ProvingTimings).proving = provingTime;
98
76
  }
99
- const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, proverType, error);
77
+ const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, 'native', error);
100
78
  await writeFile(join(ivcFolder, flow, 'benchmark.json'), JSON.stringify(benchmark, null, 2));
101
79
  proxyLogger.flushLogs();
102
80
  }
@@ -130,7 +130,7 @@ export class BlacklistTokenContractTest {
130
130
  },
131
131
  async ({ tokenContractAddress, badAccountAddress }) => {
132
132
  // Restore the token contract state.
133
- this.asset = await TokenBlacklistContract.at(tokenContractAddress, this.wallet);
133
+ this.asset = TokenBlacklistContract.at(tokenContractAddress, this.wallet);
134
134
  this.logger.verbose(`Token contract address: ${this.asset.address}`);
135
135
 
136
136
  this.tokenSim = new TokenSimulator(
@@ -141,7 +141,7 @@ export class BlacklistTokenContractTest {
141
141
  [this.adminAddress, this.otherAddress, this.blacklistedAddress],
142
142
  );
143
143
 
144
- this.badAccount = await InvalidAccountContract.at(badAccountAddress, this.wallet);
144
+ this.badAccount = InvalidAccountContract.at(badAccountAddress, this.wallet);
145
145
  this.logger.verbose(`Bad account address: ${this.badAccount.address}`);
146
146
 
147
147
  expect(await this.asset.methods.get_roles(this.adminAddress).simulate({ from: this.adminAddress })).toEqual(
@@ -3,13 +3,13 @@ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
3
3
  import { type Logger, createLogger } from '@aztec/aztec.js/log';
4
4
  import type { AztecNode } from '@aztec/aztec.js/node';
5
5
  import { CheatCodes } from '@aztec/aztec/testing';
6
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
6
7
  import {
7
8
  type DeployL1ContractsArgs,
8
9
  type DeployL1ContractsReturnType,
9
- type ExtendedViemWalletClient,
10
- createExtendedL1Client,
11
10
  deployL1Contract,
12
- } from '@aztec/ethereum';
11
+ } from '@aztec/ethereum/deploy-l1-contracts';
12
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
13
13
  import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
14
14
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
15
15
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
@@ -134,9 +134,9 @@ export class CrossChainMessagingTest {
134
134
 
135
135
  return this.crossChainTestHarness.toCrossChainContext();
136
136
  },
137
- async crossChainContext => {
138
- this.l2Token = await TokenContract.at(crossChainContext.l2Token, this.wallet);
139
- this.l2Bridge = await TokenBridgeContract.at(crossChainContext.l2Bridge, this.wallet);
137
+ crossChainContext => {
138
+ this.l2Token = TokenContract.at(crossChainContext.l2Token, this.wallet);
139
+ this.l2Bridge = TokenBridgeContract.at(crossChainContext.l2Bridge, this.wallet);
140
140
 
141
141
  // There is an issue with the reviver so we are getting strings sometimes. Working around it here.
142
142
  this.ethAccount = EthAddress.fromString(crossChainContext.ethAccount.toString());
@@ -172,6 +172,7 @@ export class CrossChainMessagingTest {
172
172
  this.l1Client = l1Client;
173
173
  this.inbox = inbox;
174
174
  this.outbox = outbox;
175
+ return Promise.resolve();
175
176
  },
176
177
  );
177
178
  }