@aztec/end-to-end 0.0.1-commit.5daedc8 → 0.0.1-commit.6201a7b05

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 (283) hide show
  1. package/README.md +27 -0
  2. package/dest/bench/client_flows/benchmark.d.ts +3 -2
  3. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  4. package/dest/bench/client_flows/benchmark.js +21 -1
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts +15 -16
  6. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  7. package/dest/bench/client_flows/client_flows_benchmark.js +125 -145
  8. package/dest/bench/client_flows/config.d.ts +2 -2
  9. package/dest/bench/client_flows/config.d.ts.map +1 -1
  10. package/dest/bench/client_flows/config.js +18 -0
  11. package/dest/bench/client_flows/data_extractor.js +3 -1
  12. package/dest/bench/utils.d.ts +9 -8
  13. package/dest/bench/utils.d.ts.map +1 -1
  14. package/dest/bench/utils.js +31 -19
  15. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +11 -9
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +108 -114
  18. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +20 -14
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +92 -71
  21. package/dest/e2e_deploy_contract/deploy_test.d.ts +5 -4
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  23. package/dest/e2e_deploy_contract/deploy_test.js +18 -13
  24. package/dest/e2e_epochs/epochs_test.d.ts +42 -15
  25. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  26. package/dest/e2e_epochs/epochs_test.js +159 -59
  27. package/dest/e2e_fees/bridging_race.notest.js +4 -6
  28. package/dest/e2e_fees/fees_test.d.ts +21 -17
  29. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  30. package/dest/e2e_fees/fees_test.js +139 -147
  31. package/dest/e2e_l1_publisher/write_json.d.ts +4 -3
  32. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  33. package/dest/e2e_l1_publisher/write_json.js +14 -16
  34. package/dest/e2e_multi_validator/utils.js +1 -1
  35. package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -9
  36. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  37. package/dest/e2e_nested_contract/nested_contract_test.js +30 -40
  38. package/dest/e2e_p2p/inactivity_slash_test.d.ts +4 -4
  39. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  40. package/dest/e2e_p2p/inactivity_slash_test.js +9 -12
  41. package/dest/e2e_p2p/p2p_network.d.ts +25 -21
  42. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  43. package/dest/e2e_p2p/p2p_network.js +175 -130
  44. package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
  45. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
  46. package/dest/e2e_p2p/reqresp/utils.js +193 -0
  47. package/dest/e2e_p2p/shared.d.ts +30 -12
  48. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  49. package/dest/e2e_p2p/shared.js +84 -67
  50. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  51. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  52. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  53. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  54. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  55. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  56. package/dest/e2e_token_contract/token_contract_test.d.ts +19 -10
  57. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  58. package/dest/e2e_token_contract/token_contract_test.js +100 -92
  59. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  60. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  61. package/dest/fixtures/authwit_proxy.js +34 -0
  62. package/dest/fixtures/e2e_prover_test.d.ts +16 -23
  63. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  64. package/dest/fixtures/e2e_prover_test.js +115 -139
  65. package/dest/fixtures/elu_monitor.d.ts +21 -0
  66. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  67. package/dest/fixtures/elu_monitor.js +102 -0
  68. package/dest/fixtures/fixtures.d.ts +17 -3
  69. package/dest/fixtures/fixtures.d.ts.map +1 -1
  70. package/dest/fixtures/fixtures.js +18 -3
  71. package/dest/fixtures/get_acvm_config.js +1 -1
  72. package/dest/fixtures/get_bb_config.d.ts +1 -1
  73. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  74. package/dest/fixtures/get_bb_config.js +5 -5
  75. package/dest/fixtures/ha_setup.d.ts +71 -0
  76. package/dest/fixtures/ha_setup.d.ts.map +1 -0
  77. package/dest/fixtures/ha_setup.js +116 -0
  78. package/dest/fixtures/index.d.ts +2 -1
  79. package/dest/fixtures/index.d.ts.map +1 -1
  80. package/dest/fixtures/index.js +1 -0
  81. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  82. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  83. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  84. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
  85. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
  86. package/dest/fixtures/schnorr_hardcoded_account_contract.js +39 -0
  87. package/dest/fixtures/setup.d.ts +246 -0
  88. package/dest/fixtures/setup.d.ts.map +1 -0
  89. package/dest/fixtures/setup.js +625 -0
  90. package/dest/fixtures/setup_p2p_test.d.ts +18 -11
  91. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  92. package/dest/fixtures/setup_p2p_test.js +46 -35
  93. package/dest/fixtures/token_utils.d.ts +2 -2
  94. package/dest/fixtures/token_utils.d.ts.map +1 -1
  95. package/dest/fixtures/token_utils.js +7 -6
  96. package/dest/fixtures/utils.d.ts +5 -637
  97. package/dest/fixtures/utils.d.ts.map +1 -1
  98. package/dest/fixtures/utils.js +4 -647
  99. package/dest/fixtures/web3signer.js +1 -1
  100. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  101. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  102. package/dest/fixtures/with_telemetry_utils.js +2 -2
  103. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  104. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  105. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  106. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  107. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  108. package/dest/forward-compatibility/wallet_service.js +109 -0
  109. package/dest/legacy-jest-resolver.d.cts +3 -0
  110. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  111. package/dest/quality_of_service/grafana_client.d.ts +41 -0
  112. package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
  113. package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
  114. package/dest/quality_of_service/prometheus_client.d.ts +38 -0
  115. package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
  116. package/dest/quality_of_service/prometheus_client.js +67 -0
  117. package/dest/shared/cross_chain_test_harness.d.ts +18 -6
  118. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  119. package/dest/shared/cross_chain_test_harness.js +27 -27
  120. package/dest/shared/gas_portal_test_harness.d.ts +12 -2
  121. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  122. package/dest/shared/gas_portal_test_harness.js +4 -4
  123. package/dest/shared/index.d.ts +3 -2
  124. package/dest/shared/index.d.ts.map +1 -1
  125. package/dest/shared/index.js +1 -0
  126. package/dest/shared/jest_setup.js +41 -1
  127. package/dest/shared/mock_state_view.d.ts +86 -0
  128. package/dest/shared/mock_state_view.d.ts.map +1 -0
  129. package/dest/shared/mock_state_view.js +186 -0
  130. package/dest/shared/submit-transactions.d.ts +4 -4
  131. package/dest/shared/submit-transactions.d.ts.map +1 -1
  132. package/dest/shared/submit-transactions.js +9 -11
  133. package/dest/shared/uniswap_l1_l2.d.ts +3 -27
  134. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  135. package/dest/shared/uniswap_l1_l2.js +58 -43
  136. package/dest/simulators/lending_simulator.d.ts +6 -2
  137. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  138. package/dest/simulators/lending_simulator.js +6 -6
  139. package/dest/simulators/token_simulator.d.ts +1 -1
  140. package/dest/simulators/token_simulator.d.ts.map +1 -1
  141. package/dest/simulators/token_simulator.js +3 -24
  142. package/dest/spartan/setup_test_wallets.d.ts +15 -5
  143. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  144. package/dest/spartan/setup_test_wallets.js +132 -43
  145. package/dest/spartan/tx_metrics.d.ts +88 -0
  146. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  147. package/dest/spartan/tx_metrics.js +438 -0
  148. package/dest/spartan/utils/bot.d.ts +28 -0
  149. package/dest/spartan/utils/bot.d.ts.map +1 -0
  150. package/dest/spartan/utils/bot.js +142 -0
  151. package/dest/spartan/utils/chaos.d.ts +79 -0
  152. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  153. package/dest/spartan/utils/chaos.js +142 -0
  154. package/dest/spartan/utils/clients.d.ts +39 -0
  155. package/dest/spartan/utils/clients.d.ts.map +1 -0
  156. package/dest/spartan/utils/clients.js +90 -0
  157. package/dest/spartan/utils/config.d.ts +45 -0
  158. package/dest/spartan/utils/config.d.ts.map +1 -0
  159. package/dest/spartan/utils/config.js +23 -0
  160. package/dest/spartan/utils/health.d.ts +63 -0
  161. package/dest/spartan/utils/health.d.ts.map +1 -0
  162. package/dest/spartan/utils/health.js +202 -0
  163. package/dest/spartan/utils/helm.d.ts +15 -0
  164. package/dest/spartan/utils/helm.d.ts.map +1 -0
  165. package/dest/spartan/utils/helm.js +47 -0
  166. package/dest/spartan/utils/index.d.ts +11 -0
  167. package/dest/spartan/utils/index.d.ts.map +1 -0
  168. package/dest/spartan/utils/index.js +22 -0
  169. package/dest/spartan/utils/k8s.d.ts +128 -0
  170. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  171. package/dest/spartan/utils/k8s.js +381 -0
  172. package/dest/spartan/utils/nodes.d.ts +40 -0
  173. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  174. package/dest/spartan/utils/nodes.js +461 -0
  175. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  176. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  177. package/dest/spartan/utils/pod_logs.js +74 -0
  178. package/dest/spartan/utils/scripts.d.ts +30 -0
  179. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  180. package/dest/spartan/utils/scripts.js +81 -0
  181. package/dest/spartan/utils.d.ts +2 -220
  182. package/dest/spartan/utils.d.ts.map +1 -1
  183. package/dest/spartan/utils.js +1 -782
  184. package/dest/test-wallet/test_wallet.d.ts +84 -0
  185. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  186. package/dest/test-wallet/test_wallet.js +255 -0
  187. package/dest/test-wallet/utils.d.ts +41 -0
  188. package/dest/test-wallet/utils.d.ts.map +1 -0
  189. package/dest/test-wallet/utils.js +71 -0
  190. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  191. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  192. package/dest/test-wallet/wallet_worker_script.js +48 -0
  193. package/dest/test-wallet/worker_wallet.d.ts +52 -0
  194. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  195. package/dest/test-wallet/worker_wallet.js +151 -0
  196. package/dest/test-wallet/worker_wallet_schema.d.ts +279 -0
  197. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  198. package/dest/test-wallet/worker_wallet_schema.js +10 -0
  199. package/package.json +49 -45
  200. package/src/bench/client_flows/benchmark.ts +24 -2
  201. package/src/bench/client_flows/client_flows_benchmark.ts +166 -216
  202. package/src/bench/client_flows/config.ts +9 -1
  203. package/src/bench/client_flows/data_extractor.ts +1 -1
  204. package/src/bench/utils.ts +36 -21
  205. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +123 -151
  206. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +140 -126
  207. package/src/e2e_deploy_contract/deploy_test.ts +22 -15
  208. package/src/e2e_epochs/epochs_test.ts +222 -112
  209. package/src/e2e_fees/bridging_race.notest.ts +5 -11
  210. package/src/e2e_fees/fees_test.ts +182 -230
  211. package/src/e2e_l1_publisher/write_json.ts +16 -16
  212. package/src/e2e_multi_validator/utils.ts +1 -1
  213. package/src/e2e_nested_contract/nested_contract_test.ts +35 -56
  214. package/src/e2e_p2p/inactivity_slash_test.ts +10 -13
  215. package/src/e2e_p2p/p2p_network.ts +245 -204
  216. package/src/e2e_p2p/reqresp/utils.ts +257 -0
  217. package/src/e2e_p2p/shared.ts +111 -81
  218. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  219. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  220. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  221. package/src/e2e_token_contract/token_contract_test.ts +121 -119
  222. package/src/fixtures/authwit_proxy.ts +54 -0
  223. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  224. package/src/fixtures/e2e_prover_test.ts +143 -189
  225. package/src/fixtures/elu_monitor.ts +126 -0
  226. package/src/fixtures/fixtures.ts +34 -5
  227. package/src/fixtures/get_acvm_config.ts +1 -1
  228. package/src/fixtures/get_bb_config.ts +7 -6
  229. package/src/fixtures/ha_setup.ts +188 -0
  230. package/src/fixtures/index.ts +1 -0
  231. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  232. package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
  233. package/src/fixtures/setup.ts +932 -0
  234. package/src/fixtures/setup_p2p_test.ts +51 -55
  235. package/src/fixtures/token_utils.ts +7 -6
  236. package/src/fixtures/utils.ts +27 -966
  237. package/src/fixtures/web3signer.ts +1 -1
  238. package/src/fixtures/with_telemetry_utils.ts +2 -2
  239. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  240. package/src/forward-compatibility/wallet_service.ts +104 -0
  241. package/src/guides/up_quick_start.sh +3 -5
  242. package/src/legacy-jest-resolver.cjs +135 -0
  243. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
  244. package/src/quality_of_service/prometheus_client.ts +113 -0
  245. package/src/shared/cross_chain_test_harness.ts +30 -43
  246. package/src/shared/gas_portal_test_harness.ts +3 -4
  247. package/src/shared/index.ts +2 -1
  248. package/src/shared/jest_setup.ts +51 -1
  249. package/src/shared/mock_state_view.ts +188 -0
  250. package/src/shared/submit-transactions.ts +11 -16
  251. package/src/shared/uniswap_l1_l2.ts +86 -106
  252. package/src/simulators/lending_simulator.ts +11 -7
  253. package/src/simulators/token_simulator.ts +6 -30
  254. package/src/spartan/DEVELOP.md +7 -0
  255. package/src/spartan/setup_test_wallets.ts +192 -28
  256. package/src/spartan/tx_metrics.ts +388 -0
  257. package/src/spartan/utils/bot.ts +188 -0
  258. package/src/spartan/utils/chaos.ts +253 -0
  259. package/src/spartan/utils/clients.ts +100 -0
  260. package/src/spartan/utils/config.ts +29 -0
  261. package/src/spartan/utils/health.ts +255 -0
  262. package/src/spartan/utils/helm.ts +84 -0
  263. package/src/spartan/utils/index.ts +71 -0
  264. package/src/spartan/utils/k8s.ts +535 -0
  265. package/src/spartan/utils/nodes.ts +543 -0
  266. package/src/spartan/utils/pod_logs.ts +99 -0
  267. package/src/spartan/utils/scripts.ts +99 -0
  268. package/src/spartan/utils.ts +1 -982
  269. package/src/test-wallet/test_wallet.ts +357 -0
  270. package/src/test-wallet/utils.ts +112 -0
  271. package/src/test-wallet/wallet_worker_script.ts +60 -0
  272. package/src/test-wallet/worker_wallet.ts +214 -0
  273. package/src/test-wallet/worker_wallet_schema.ts +13 -0
  274. package/dest/fixtures/setup_l1_contracts.d.ts +0 -477
  275. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  276. package/dest/fixtures/setup_l1_contracts.js +0 -17
  277. package/dest/fixtures/snapshot_manager.d.ts +0 -95
  278. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  279. package/dest/fixtures/snapshot_manager.js +0 -505
  280. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  281. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  282. package/src/fixtures/setup_l1_contracts.ts +0 -26
  283. package/src/fixtures/snapshot_manager.ts +0 -665
@@ -7,7 +7,13 @@ import {
7
7
  import type { Logger } from '@aztec/aztec.js/log';
8
8
  import { createLogger } from '@aztec/foundation/log';
9
9
  import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
10
- import type { ProvingStats, ProvingTimings, SimulationStats, SimulationTimings } from '@aztec/stdlib/tx';
10
+ import type {
11
+ ProvingStats,
12
+ ProvingTimings,
13
+ RoundTripStats,
14
+ SimulationStats,
15
+ SimulationTimings,
16
+ } from '@aztec/stdlib/tx';
11
17
 
12
18
  import assert from 'node:assert';
13
19
  import { mkdir, writeFile } from 'node:fs/promises';
@@ -119,6 +125,7 @@ type ClientFlowBenchmark = {
119
125
  timings: Omit<ProvingTimings & SimulationTimings, 'perFunction'> & { witgen: number };
120
126
  maxMemory: number;
121
127
  rpc: Record<string, CallRecording>;
128
+ roundTrips: RoundTripStats;
122
129
  proverType: ProverType;
123
130
  minimumTrace: StructuredTrace;
124
131
  totalGateCount: number;
@@ -212,6 +219,10 @@ export function generateBenchmark(
212
219
  }, []);
213
220
  const timings = stats.timings;
214
221
  const totalGateCount = steps[steps.length - 1].accGateCount;
222
+ const nodeRPCCalls = stats.nodeRPCCalls ?? {
223
+ perMethod: {},
224
+ roundTrips: { roundTrips: 0, totalBlockingTime: 0, roundTripDurations: [], roundTripMethods: [] },
225
+ };
215
226
  return {
216
227
  name: flow,
217
228
  timings: {
@@ -221,7 +232,7 @@ export function generateBenchmark(
221
232
  unaccounted: timings.unaccounted,
222
233
  witgen: timings.perFunction.reduce((acc, fn) => acc + fn.time, 0),
223
234
  },
224
- rpc: Object.entries(stats.nodeRPCCalls ?? {}).reduce(
235
+ rpc: Object.entries(nodeRPCCalls.perMethod).reduce(
225
236
  (acc, [RPCName, RPCCalls]) => {
226
237
  const total = RPCCalls.times.reduce((sum, time) => sum + time, 0);
227
238
  const calls = RPCCalls.times.length;
@@ -236,6 +247,7 @@ export function generateBenchmark(
236
247
  },
237
248
  {} as Record<string, CallRecording>,
238
249
  ),
250
+ roundTrips: nodeRPCCalls.roundTrips,
239
251
  maxMemory,
240
252
  proverType,
241
253
  minimumTrace: minimumTrace!,
@@ -280,6 +292,16 @@ export function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): Git
280
292
  value: totalRPCCalls,
281
293
  unit: 'calls',
282
294
  },
295
+ {
296
+ name: `${benchmark.name}/round_trips`,
297
+ value: benchmark.roundTrips.roundTrips,
298
+ unit: 'round_trips',
299
+ },
300
+ {
301
+ name: `${benchmark.name}/round_trips_blocking_time`,
302
+ value: benchmark.roundTrips.totalBlockingTime,
303
+ unit: 'ms',
304
+ },
283
305
  ];
284
306
  if (benchmark.timings.proving) {
285
307
  benches.push({
@@ -1,15 +1,19 @@
1
+ import { NO_FROM } from '@aztec/aztec.js/account';
1
2
  import { AztecAddress } from '@aztec/aztec.js/addresses';
2
3
  import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
3
4
  import { type FeePaymentMethod, PrivateFeePaymentMethod, SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
4
5
  import { type Logger, createLogger } from '@aztec/aztec.js/log';
5
6
  import type { AztecNode } from '@aztec/aztec.js/node';
6
7
  import type { Wallet } from '@aztec/aztec.js/wallet';
7
- import { CheatCodes } from '@aztec/aztec/testing';
8
- import { type DeployL1ContractsArgs, RollupContract, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
8
+ import { CheatCodes, getTokenAllowedSetupFunctions } from '@aztec/aztec/testing';
9
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
10
+ import { RollupContract } from '@aztec/ethereum/contracts';
11
+ import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
12
+ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
9
13
  import { ChainMonitor } from '@aztec/ethereum/test';
10
- import { randomBytes } from '@aztec/foundation/crypto';
14
+ import { randomBytes } from '@aztec/foundation/crypto/random';
15
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
16
  import { EthAddress } from '@aztec/foundation/eth-address';
12
- import { Fr } from '@aztec/foundation/fields';
13
17
  import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
14
18
  import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
15
19
  import { AMMContract } from '@aztec/noir-contracts.js/AMM';
@@ -23,38 +27,31 @@ import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server';
23
27
  import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
24
28
  import { GasSettings } from '@aztec/stdlib/gas';
25
29
  import { deriveSigningKey } from '@aztec/stdlib/keys';
26
- import { TestWallet } from '@aztec/test-wallet/server';
27
30
 
28
- import { MNEMONIC } from '../../fixtures/fixtures.js';
29
- import {
30
- type ISnapshotManager,
31
- type SubsystemsContext,
32
- createSnapshotManager,
33
- deployAccounts,
34
- } from '../../fixtures/snapshot_manager.js';
31
+ import { MNEMONIC, getPaddedMaxFeesPerGas } from '../../fixtures/fixtures.js';
32
+ import { type EndToEndContext, type SetupOptions, deployAccounts, setup, teardown } from '../../fixtures/setup.js';
35
33
  import { mintTokensToPrivate } from '../../fixtures/token_utils.js';
36
- import { type SetupOptions, setupSponsoredFPC } from '../../fixtures/utils.js';
34
+ import { setupSponsoredFPC } from '../../fixtures/utils.js';
37
35
  import { CrossChainTestHarness } from '../../shared/cross_chain_test_harness.js';
38
36
  import {
39
37
  FeeJuicePortalTestingHarnessFactory,
40
38
  type GasBridgingTestHarness,
41
39
  } from '../../shared/gas_portal_test_harness.js';
40
+ import { TestWallet } from '../../test-wallet/test_wallet.js';
42
41
  import { ProxyLogger } from './benchmark.js';
43
42
  import { type ClientFlowsConfig, FULL_FLOWS_CONFIG, KEY_FLOWS_CONFIG } from './config.js';
44
43
 
45
- const { E2E_DATA_PATH: dataPath, BENCHMARK_CONFIG } = process.env;
44
+ const { BENCHMARK_CONFIG } = process.env;
46
45
 
47
46
  export type AccountType = 'ecdsar1' | 'schnorr';
48
47
  export type FeePaymentMethodGetter = (wallet: Wallet, sender: AztecAddress) => Promise<FeePaymentMethod | undefined>;
49
48
  export type BenchmarkingFeePaymentMethod = 'bridged_fee_juice' | 'private_fpc' | 'sponsored_fpc' | 'fee_juice';
50
49
 
51
50
  export class ClientFlowsBenchmark {
52
- private snapshotManager: ISnapshotManager;
53
-
54
51
  public logger: Logger;
55
52
  public aztecNode!: AztecNode;
56
53
  public cheatCodes!: CheatCodes;
57
- public context!: SubsystemsContext;
54
+ public context!: EndToEndContext;
58
55
  public chainMonitor!: ChainMonitor;
59
56
  public feeJuiceBridgeTestHarness!: GasBridgingTestHarness;
60
57
  public adminWallet!: TestWallet;
@@ -122,33 +119,41 @@ export class ClientFlowsBenchmark {
122
119
  public config: ClientFlowsConfig;
123
120
 
124
121
  private proxyLogger: ProxyLogger;
122
+ private setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs>;
125
123
 
126
- constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {}) {
124
+ constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {}) {
127
125
  this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
128
- this.snapshotManager = createSnapshotManager(
129
- `bench_client_flows${testName ? `/${testName}` : ''}`,
130
- dataPath,
131
- { startProverNode: true, ...setupOptions },
132
- { ...setupOptions },
133
- );
126
+ this.setupOptions = { startProverNode: true, ...setupOptions };
134
127
  this.config = BENCHMARK_CONFIG === 'key_flows' ? KEY_FLOWS_CONFIG : FULL_FLOWS_CONFIG;
135
128
  ProxyLogger.create();
136
129
  this.proxyLogger = ProxyLogger.getInstance();
137
130
  }
138
131
 
139
132
  async setup() {
140
- const context = await this.snapshotManager.setup();
141
- await context.aztecNode.setConfig({ feeRecipient: this.sequencerAddress, coinbase: this.coinbase });
133
+ this.logger.info('Setting up subsystems from fresh');
134
+ // Token allowlist entries are test-only: FPC-based fee payment with custom tokens won't work on mainnet alpha.
135
+ const tokenAllowList = await getTokenAllowedSetupFunctions();
136
+ this.context = await setup(0, {
137
+ ...this.setupOptions,
138
+ fundSponsoredFPC: true,
139
+ skipAccountDeployment: true,
140
+ l1ContractsArgs: this.setupOptions,
141
+ txPublicSetupAllowListExtend: [...(this.setupOptions.txPublicSetupAllowListExtend ?? []), ...tokenAllowList],
142
+ });
143
+ await this.applyBaseSetup();
144
+
145
+ await this.context.aztecNodeService.setConfig({ feeRecipient: this.sequencerAddress, coinbase: this.coinbase });
142
146
 
143
- const rollupContract = RollupContract.getFromConfig(context.aztecNodeConfig);
144
- this.chainMonitor = new ChainMonitor(rollupContract, context.dateProvider, this.logger, 200).start();
147
+ const rollupContract = RollupContract.getFromConfig(this.context.config);
148
+ this.chainMonitor = new ChainMonitor(rollupContract, this.context.dateProvider, this.logger, 200).start();
145
149
 
146
150
  return this;
147
151
  }
148
152
 
149
153
  async teardown() {
150
154
  await this.chainMonitor.stop();
151
- await this.snapshotManager.teardown();
155
+ await this.userWallet?.stop();
156
+ await teardown(this.context);
152
157
  }
153
158
 
154
159
  async mintAndBridgeFeeJuice(address: AztecAddress) {
@@ -156,21 +161,20 @@ export class ClientFlowsBenchmark {
156
161
  const { claimSecret: secret, messageLeafIndex: index } = claim;
157
162
  await this.feeJuiceContract.methods
158
163
  .claim(address, claim.claimAmount, secret, index)
159
- .send({ from: this.adminAddress })
160
- .wait();
164
+ .send({ from: this.adminAddress });
161
165
  }
162
166
 
163
167
  /** Admin mints bananaCoin tokens privately to the target address and redeems them. */
164
168
  async mintPrivateBananas(amount: bigint, address: AztecAddress) {
165
- const balanceBefore = await this.bananaCoin.methods
169
+ const { result: balanceBefore } = await this.bananaCoin.methods
166
170
  .balance_of_private(address)
167
- .simulate({ from: this.adminAddress });
171
+ .simulate({ from: address });
168
172
 
169
173
  await mintTokensToPrivate(this.bananaCoin, this.adminAddress, address, amount);
170
174
 
171
- const balanceAfter = await this.bananaCoin.methods
175
+ const { result: balanceAfter } = await this.bananaCoin.methods
172
176
  .balance_of_private(address)
173
- .simulate({ from: this.adminAddress });
177
+ .simulate({ from: address });
174
178
  expect(balanceAfter).toEqual(balanceBefore + amount);
175
179
  }
176
180
 
@@ -190,161 +194,124 @@ export class ClientFlowsBenchmark {
190
194
  }
191
195
  }
192
196
 
193
- public async applyBaseSnapshots() {
194
- await this.applyInitialAccountsSnapshot();
195
- await this.applySetupFeeJuiceSnapshot();
197
+ public async applyBaseSetup() {
198
+ await this.applyInitialAccounts();
199
+ await this.applySetupFeeJuice();
196
200
  }
197
201
 
198
- async applyInitialAccountsSnapshot() {
199
- await this.snapshotManager.snapshot(
200
- 'initial_accounts',
201
- deployAccounts(2, this.logger),
202
- async (
203
- { deployedAccounts: [{ address: adminAddress }, { address: sequencerAddress }] },
204
- { wallet, aztecNode, cheatCodes },
205
- ) => {
206
- this.adminWallet = wallet;
207
- this.aztecNode = aztecNode;
208
- this.cheatCodes = cheatCodes;
209
-
210
- this.adminAddress = adminAddress;
211
- this.sequencerAddress = sequencerAddress;
212
-
213
- const canonicalFeeJuice = await getCanonicalFeeJuice();
214
- this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
215
- this.coinbase = EthAddress.random();
216
-
217
- const userPXEConfig = getPXEConfig();
218
- const userPXEConfigWithContracts = {
219
- ...userPXEConfig,
220
- proverEnabled: this.realProofs,
221
- } as PXEConfig;
222
-
223
- this.userWallet = await TestWallet.create(this.aztecNode, userPXEConfigWithContracts, {
224
- loggers: {
225
- prover: this.proxyLogger.createLogger('pxe:bb:wasm:bundle:proxied'),
226
- },
227
- });
202
+ async applyInitialAccounts() {
203
+ this.logger.info('Applying initial accounts setup');
204
+ const { deployedAccounts } = await deployAccounts(
205
+ 2,
206
+ this.logger,
207
+ )({
208
+ wallet: this.context.wallet,
209
+ initialFundedAccounts: this.context.initialFundedAccounts,
210
+ });
211
+
212
+ const [{ address: adminAddress }, { address: sequencerAddress }] = deployedAccounts;
213
+
214
+ this.adminWallet = this.context.wallet;
215
+ this.aztecNode = this.context.aztecNodeService;
216
+ this.cheatCodes = this.context.cheatCodes;
217
+
218
+ this.adminAddress = adminAddress;
219
+ this.sequencerAddress = sequencerAddress;
220
+
221
+ const canonicalFeeJuice = await getCanonicalFeeJuice();
222
+ this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
223
+ this.coinbase = EthAddress.random();
224
+
225
+ const userPXEConfig = getPXEConfig();
226
+ const userPXEConfigWithContracts = {
227
+ ...userPXEConfig,
228
+ proverEnabled: this.realProofs,
229
+ } as PXEConfig;
230
+
231
+ this.userWallet = await TestWallet.create(this.aztecNode, userPXEConfigWithContracts, {
232
+ loggers: {
233
+ prover: this.proxyLogger.createLogger('pxe:bb:wasm:bundle:proxied'),
228
234
  },
229
- );
235
+ });
230
236
  }
231
237
 
232
- async applySetupFeeJuiceSnapshot() {
233
- await this.snapshotManager.snapshot(
234
- 'setup_fee_juice',
235
- async () => {},
236
- async (_data, context) => {
237
- this.context = context;
238
-
239
- this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
240
-
241
- this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
242
- aztecNode: context.aztecNode,
243
- aztecNodeAdmin: context.aztecNode,
244
- l1Client: context.deployL1ContractsValues.l1Client,
245
- wallet: this.adminWallet,
246
- logger: this.logger,
247
- });
248
- },
249
- );
238
+ async applySetupFeeJuice() {
239
+ this.logger.info('Applying fee juice setup');
240
+ this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
241
+
242
+ this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
243
+ aztecNode: this.context.aztecNodeService,
244
+ aztecNodeAdmin: this.context.aztecNodeService,
245
+ l1Client: this.context.deployL1ContractsValues.l1Client,
246
+ wallet: this.adminWallet,
247
+ logger: this.logger,
248
+ });
250
249
  }
251
250
 
252
- async applyDeployBananaTokenSnapshot() {
253
- await this.snapshotManager.snapshot(
254
- 'deploy_banana_token',
255
- async () => {
256
- const { contract: bananaCoin, instance: bananaCoinInstance } = await BananaCoin.deploy(
257
- this.adminWallet,
258
- this.adminAddress,
259
- 'BC',
260
- 'BC',
261
- 18n,
262
- )
263
- .send({ from: this.adminAddress })
264
- .wait();
265
- this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
266
- return { bananaCoinAddress: bananaCoin.address, bananaCoinInstance };
267
- },
268
- ({ bananaCoinAddress, bananaCoinInstance }) => {
269
- this.bananaCoin = BananaCoin.at(bananaCoinAddress, this.adminWallet);
270
- this.bananaCoinInstance = bananaCoinInstance;
271
- return Promise.resolve();
272
- },
273
- );
251
+ async applyDeployBananaToken() {
252
+ this.logger.info('Applying banana token deployment');
253
+ const { contract: bananaCoin, instance: bananaCoinInstance } = await BananaCoin.deploy(
254
+ this.adminWallet,
255
+ this.adminAddress,
256
+ 'BC',
257
+ 'BC',
258
+ 18n,
259
+ ).send({
260
+ from: this.adminAddress,
261
+ });
262
+ this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
263
+ this.bananaCoin = bananaCoin;
264
+ this.bananaCoinInstance = bananaCoinInstance;
274
265
  }
275
266
 
276
- async applyDeployCandyBarTokenSnapshot() {
277
- await this.snapshotManager.snapshot(
278
- 'deploy_candy_bar_token',
279
- async () => {
280
- const { contract: candyBarCoin, instance: candyBarCoinInstance } = await TokenContract.deploy(
281
- this.adminWallet,
282
- this.adminAddress,
283
- 'CBC',
284
- 'CBC',
285
- 18n,
286
- )
287
- .send({ from: this.adminAddress })
288
- .wait();
289
- this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
290
- return { candyBarCoinAddress: candyBarCoin.address, candyBarCoinInstance };
291
- },
292
- ({ candyBarCoinAddress, candyBarCoinInstance }) => {
293
- this.candyBarCoin = TokenContract.at(candyBarCoinAddress, this.adminWallet);
294
- this.candyBarCoinInstance = candyBarCoinInstance;
295
- return Promise.resolve();
296
- },
297
- );
267
+ async applyDeployCandyBarToken() {
268
+ this.logger.info('Applying candy bar token deployment');
269
+ const { contract: candyBarCoin, instance: candyBarCoinInstance } = await TokenContract.deploy(
270
+ this.adminWallet,
271
+ this.adminAddress,
272
+ 'CBC',
273
+ 'CBC',
274
+ 18n,
275
+ ).send({
276
+ from: this.adminAddress,
277
+ });
278
+ this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
279
+ this.candyBarCoin = candyBarCoin;
280
+ this.candyBarCoinInstance = candyBarCoinInstance;
298
281
  }
299
282
 
300
- public async applyFPCSetupSnapshot() {
301
- await this.snapshotManager.snapshot(
302
- 'fpc_setup',
303
- async context => {
304
- const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
305
- expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
283
+ public async applyFPCSetup() {
284
+ this.logger.info('Applying FPC setup');
285
+ const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
286
+ expect((await this.context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
306
287
 
307
- const bananaCoin = this.bananaCoin;
308
- const { contract: bananaFPC, instance: bananaFPCInstance } = await FPCContract.deploy(
309
- this.adminWallet,
310
- bananaCoin.address,
311
- this.adminAddress,
312
- )
313
- .send({ from: this.adminAddress })
314
- .wait();
288
+ const bananaCoin = this.bananaCoin;
289
+ const { contract: bananaFPC, instance: bananaFPCInstance } = await FPCContract.deploy(
290
+ this.adminWallet,
291
+ bananaCoin.address,
292
+ this.adminAddress,
293
+ ).send({
294
+ from: this.adminAddress,
295
+ });
315
296
 
316
- this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
297
+ this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
317
298
 
318
- await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.adminAddress);
299
+ await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.adminAddress);
319
300
 
320
- return { bananaFPCAddress: bananaFPC.address, bananaFPCInstance };
321
- },
322
- data => {
323
- this.bananaFPC = FPCContract.at(data.bananaFPCAddress, this.adminWallet);
324
- this.bananaFPCInstance = data.bananaFPCInstance;
325
- return Promise.resolve();
326
- },
327
- );
301
+ this.bananaFPC = bananaFPC;
302
+ this.bananaFPCInstance = bananaFPCInstance;
328
303
  }
329
304
 
330
- async applyDeploySponsoredFPCSnapshot() {
331
- await this.snapshotManager.snapshot(
332
- 'deploy_sponsored_fpc',
333
- async () => {
334
- const sponsoredFPCInstance = await setupSponsoredFPC(this.adminWallet);
335
- this.logger.info(`SponsoredFPC at ${sponsoredFPCInstance.address}`);
336
- return { sponsoredFPCAddress: sponsoredFPCInstance.address, sponsoredFPCInstance };
337
- },
338
- ({ sponsoredFPCAddress, sponsoredFPCInstance }) => {
339
- this.sponsoredFPC = SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
340
- this.sponsoredFPCInstance = sponsoredFPCInstance;
341
- return Promise.resolve();
342
- },
343
- );
305
+ async applyDeploySponsoredFPC() {
306
+ this.logger.info('Applying sponsored FPC deployment');
307
+ const sponsoredFPCInstance = await setupSponsoredFPC(this.adminWallet);
308
+ this.logger.info(`SponsoredFPC at ${sponsoredFPCInstance.address}`);
309
+ this.sponsoredFPC = SponsoredFPCContract.at(sponsoredFPCInstance.address, this.adminWallet);
310
+ this.sponsoredFPCInstance = sponsoredFPCInstance;
344
311
  }
345
312
 
346
313
  public async createCrossChainTestHarness(owner: AztecAddress) {
347
- const l1Client = createExtendedL1Client(this.context.aztecNodeConfig.l1RpcUrls, MNEMONIC);
314
+ const l1Client = createExtendedL1Client(this.context.config.l1RpcUrls, MNEMONIC);
348
315
 
349
316
  const underlyingERC20Address = await deployL1Contract(l1Client, TestERC20Abi, TestERC20Bytecode, [
350
317
  'Underlying',
@@ -373,12 +340,10 @@ export class ClientFlowsBenchmark {
373
340
  const benchysAddress = benchysAccountManager.address;
374
341
  const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(benchysAddress);
375
342
  const behchysDeployMethod = await benchysAccountManager.getDeployMethod();
376
- await behchysDeployMethod
377
- .send({
378
- from: AztecAddress.ZERO,
379
- fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
380
- })
381
- .wait();
343
+ await behchysDeployMethod.send({
344
+ from: NO_FROM,
345
+ fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
346
+ });
382
347
  // Register benchy on the user's Wallet, where we're going to be interacting from
383
348
  const accountManager = await this.userWallet.createAccount({
384
349
  secret: benchysAccount.getSecretKey(),
@@ -388,44 +353,29 @@ export class ClientFlowsBenchmark {
388
353
  return accountManager.address;
389
354
  }
390
355
 
391
- public async applyDeployAmmSnapshot() {
392
- await this.snapshotManager.snapshot(
393
- 'deploy_amm',
394
- async () => {
395
- const { contract: liquidityToken, instance: liquidityTokenInstance } = await TokenContract.deploy(
396
- this.adminWallet,
397
- this.adminAddress,
398
- 'LPT',
399
- 'LPT',
400
- 18n,
401
- )
402
- .send({ from: this.adminAddress })
403
- .wait();
404
- const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
405
- this.adminWallet,
406
- this.bananaCoin.address,
407
- this.candyBarCoin.address,
408
- liquidityToken.address,
409
- )
410
- .send({ from: this.adminAddress })
411
- .wait();
412
- this.logger.info(`AMM deployed at ${amm.address}`);
413
- await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress }).wait();
414
- return {
415
- ammAddress: amm.address,
416
- ammInstance,
417
- liquidityTokenAddress: liquidityToken.address,
418
- liquidityTokenInstance,
419
- };
420
- },
421
- ({ ammAddress, ammInstance, liquidityTokenAddress, liquidityTokenInstance }) => {
422
- this.liquidityToken = TokenContract.at(liquidityTokenAddress, this.adminWallet);
423
- this.liquidityTokenInstance = liquidityTokenInstance;
424
- this.amm = AMMContract.at(ammAddress, this.adminWallet);
425
- this.ammInstance = ammInstance;
426
- return Promise.resolve();
427
- },
428
- );
356
+ public async applyDeployAmm() {
357
+ this.logger.info('Applying AMM deployment');
358
+ const { contract: liquidityToken, instance: liquidityTokenInstance } = await TokenContract.deploy(
359
+ this.adminWallet,
360
+ this.adminAddress,
361
+ 'LPT',
362
+ 'LPT',
363
+ 18n,
364
+ ).send({
365
+ from: this.adminAddress,
366
+ });
367
+ const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
368
+ this.adminWallet,
369
+ this.bananaCoin.address,
370
+ this.candyBarCoin.address,
371
+ liquidityToken.address,
372
+ ).send({ from: this.adminAddress });
373
+ this.logger.info(`AMM deployed at ${amm.address}`);
374
+ await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress });
375
+ this.liquidityToken = liquidityToken;
376
+ this.liquidityTokenInstance = liquidityTokenInstance;
377
+ this.amm = amm;
378
+ this.ammInstance = ammInstance;
429
379
  }
430
380
 
431
381
  public async getBridgedFeeJuicePaymentMethodForWallet(_wallet: Wallet, sender: AztecAddress) {
@@ -436,8 +386,8 @@ export class ClientFlowsBenchmark {
436
386
  public async getPrivateFPCPaymentMethodForWallet(wallet: Wallet, sender: AztecAddress) {
437
387
  // The private fee paying method assembled on the app side requires knowledge of the maximum
438
388
  // fee the user is willing to pay
439
- const maxFeesPerGas = (await this.aztecNode.getCurrentBaseFees()).mul(1.5);
440
- const gasSettings = GasSettings.default({ maxFeesPerGas });
389
+ const maxFeesPerGas = await getPaddedMaxFeesPerGas(this.aztecNode);
390
+ const gasSettings = GasSettings.fallback({ maxFeesPerGas });
441
391
  return new PrivateFeePaymentMethod(this.bananaFPC.address, sender, wallet, gasSettings);
442
392
  }
443
393
 
@@ -6,7 +6,7 @@ export type ClientFlowConfig = {
6
6
  recursions?: number[];
7
7
  };
8
8
 
9
- type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm';
9
+ type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm' | 'storageProof';
10
10
 
11
11
  export type ClientFlowsConfig = {
12
12
  [key in ClientFlows]: ClientFlowConfig;
@@ -34,6 +34,10 @@ export const KEY_FLOWS_CONFIG: ClientFlowsConfig = {
34
34
  feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
35
35
  recursions: [0, 1],
36
36
  },
37
+ storageProof: {
38
+ accounts: ['ecdsar1'],
39
+ feePaymentMethods: ['sponsored_fpc'],
40
+ },
37
41
  };
38
42
 
39
43
  export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
@@ -58,4 +62,8 @@ export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
58
62
  feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
59
63
  recursions: [0, 1, 2],
60
64
  },
65
+ storageProof: {
66
+ accounts: ['ecdsar1', 'schnorr'],
67
+ feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
68
+ },
61
69
  };
@@ -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