@aztec/end-to-end 0.0.0-test.0 → 0.0.1-commit.001888fc

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 (293) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +62 -0
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
  3. package/dest/bench/client_flows/benchmark.js +281 -0
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +79 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
  6. package/dest/bench/client_flows/client_flows_benchmark.js +329 -0
  7. package/dest/bench/client_flows/config.d.ts +14 -0
  8. package/dest/bench/client_flows/config.d.ts.map +1 -0
  9. package/dest/bench/client_flows/config.js +124 -0
  10. package/dest/bench/client_flows/data_extractor.d.ts +2 -0
  11. package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
  12. package/dest/bench/client_flows/data_extractor.js +79 -0
  13. package/dest/bench/utils.d.ts +16 -41
  14. package/dest/bench/utils.d.ts.map +1 -1
  15. package/dest/bench/utils.js +44 -72
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +28 -19
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  18. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +125 -103
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +32 -32
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  21. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +105 -104
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts +19 -10
  23. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  24. package/dest/e2e_deploy_contract/deploy_test.js +26 -27
  25. package/dest/e2e_epochs/epochs_test.d.ts +75 -24
  26. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  27. package/dest/e2e_epochs/epochs_test.js +290 -58
  28. package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
  29. package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
  30. package/dest/e2e_fees/bridging_race.notest.js +61 -0
  31. package/dest/e2e_fees/fees_test.d.ts +38 -23
  32. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  33. package/dest/e2e_fees/fees_test.js +169 -183
  34. package/dest/e2e_l1_publisher/write_json.d.ts +11 -0
  35. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
  36. package/dest/e2e_l1_publisher/write_json.js +56 -0
  37. package/dest/e2e_multi_validator/utils.d.ts +12 -0
  38. package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
  39. package/dest/e2e_multi_validator/utils.js +214 -0
  40. package/dest/e2e_nested_contract/nested_contract_test.d.ts +15 -15
  41. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  42. package/dest/e2e_nested_contract/nested_contract_test.js +36 -42
  43. package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
  44. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
  45. package/dest/e2e_p2p/inactivity_slash_test.js +136 -0
  46. package/dest/e2e_p2p/p2p_network.d.ts +282 -27
  47. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  48. package/dest/e2e_p2p/p2p_network.js +255 -176
  49. package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
  50. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
  51. package/dest/e2e_p2p/reqresp/utils.js +190 -0
  52. package/dest/e2e_p2p/shared.d.ts +64 -8
  53. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  54. package/dest/e2e_p2p/shared.js +200 -27
  55. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  56. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  57. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  58. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  59. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  60. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  61. package/dest/e2e_token_contract/token_contract_test.d.ts +29 -14
  62. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  63. package/dest/e2e_token_contract/token_contract_test.js +107 -75
  64. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  65. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  66. package/dest/fixtures/authwit_proxy.js +30 -0
  67. package/dest/fixtures/e2e_prover_test.d.ts +55 -0
  68. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
  69. package/dest/fixtures/e2e_prover_test.js +271 -0
  70. package/dest/fixtures/elu_monitor.d.ts +21 -0
  71. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  72. package/dest/fixtures/elu_monitor.js +102 -0
  73. package/dest/fixtures/fixtures.d.ts +10 -8
  74. package/dest/fixtures/fixtures.d.ts.map +1 -1
  75. package/dest/fixtures/fixtures.js +11 -5
  76. package/dest/fixtures/get_acvm_config.d.ts +2 -2
  77. package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
  78. package/dest/fixtures/get_acvm_config.js +3 -15
  79. package/dest/fixtures/get_bb_config.d.ts +2 -2
  80. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  81. package/dest/fixtures/get_bb_config.js +10 -17
  82. package/dest/fixtures/ha_setup.d.ts +71 -0
  83. package/dest/fixtures/ha_setup.d.ts.map +1 -0
  84. package/dest/fixtures/ha_setup.js +116 -0
  85. package/dest/fixtures/index.d.ts +2 -1
  86. package/dest/fixtures/index.d.ts.map +1 -1
  87. package/dest/fixtures/index.js +1 -0
  88. package/dest/fixtures/l1_to_l2_messaging.d.ts +11 -7
  89. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  90. package/dest/fixtures/l1_to_l2_messaging.js +45 -19
  91. package/dest/fixtures/logging.d.ts +1 -1
  92. package/dest/fixtures/setup.d.ts +239 -0
  93. package/dest/fixtures/setup.d.ts.map +1 -0
  94. package/dest/fixtures/setup.js +606 -0
  95. package/dest/fixtures/setup_p2p_test.d.ts +23 -15
  96. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  97. package/dest/fixtures/setup_p2p_test.js +102 -31
  98. package/dest/fixtures/token_utils.d.ts +10 -4
  99. package/dest/fixtures/token_utils.d.ts.map +1 -1
  100. package/dest/fixtures/token_utils.js +33 -13
  101. package/dest/fixtures/utils.d.ts +5 -153
  102. package/dest/fixtures/utils.d.ts.map +1 -1
  103. package/dest/fixtures/utils.js +4 -552
  104. package/dest/fixtures/web3signer.d.ts +5 -0
  105. package/dest/fixtures/web3signer.d.ts.map +1 -0
  106. package/dest/fixtures/web3signer.js +53 -0
  107. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  108. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  109. package/dest/fixtures/with_telemetry_utils.js +2 -2
  110. package/dest/index.d.ts +1 -1
  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 +44 -27
  118. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  119. package/dest/shared/cross_chain_test_harness.js +107 -53
  120. package/dest/shared/gas_portal_test_harness.d.ts +33 -25
  121. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  122. package/dest/shared/gas_portal_test_harness.js +51 -30
  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.d.ts +1 -1
  127. package/dest/shared/jest_setup.js +42 -2
  128. package/dest/shared/mock_state_view.d.ts +86 -0
  129. package/dest/shared/mock_state_view.d.ts.map +1 -0
  130. package/dest/shared/mock_state_view.js +186 -0
  131. package/dest/shared/submit-transactions.d.ts +6 -4
  132. package/dest/shared/submit-transactions.d.ts.map +1 -1
  133. package/dest/shared/submit-transactions.js +15 -16
  134. package/dest/shared/uniswap_l1_l2.d.ts +3 -25
  135. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  136. package/dest/shared/uniswap_l1_l2.js +175 -126
  137. package/dest/simulators/index.d.ts +1 -1
  138. package/dest/simulators/lending_simulator.d.ts +7 -7
  139. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  140. package/dest/simulators/lending_simulator.js +17 -18
  141. package/dest/simulators/token_simulator.d.ts +6 -3
  142. package/dest/simulators/token_simulator.d.ts.map +1 -1
  143. package/dest/simulators/token_simulator.js +12 -30
  144. package/dest/spartan/setup_test_wallets.d.ts +36 -11
  145. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  146. package/dest/spartan/setup_test_wallets.js +276 -62
  147. package/dest/spartan/tx_metrics.d.ts +88 -0
  148. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  149. package/dest/spartan/tx_metrics.js +422 -0
  150. package/dest/spartan/utils/bot.d.ts +28 -0
  151. package/dest/spartan/utils/bot.d.ts.map +1 -0
  152. package/dest/spartan/utils/bot.js +142 -0
  153. package/dest/spartan/utils/chaos.d.ts +79 -0
  154. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  155. package/dest/spartan/utils/chaos.js +142 -0
  156. package/dest/spartan/utils/clients.d.ts +39 -0
  157. package/dest/spartan/utils/clients.d.ts.map +1 -0
  158. package/dest/spartan/utils/clients.js +90 -0
  159. package/dest/spartan/utils/config.d.ts +45 -0
  160. package/dest/spartan/utils/config.d.ts.map +1 -0
  161. package/dest/spartan/utils/config.js +23 -0
  162. package/dest/spartan/utils/health.d.ts +63 -0
  163. package/dest/spartan/utils/health.d.ts.map +1 -0
  164. package/dest/spartan/utils/health.js +202 -0
  165. package/dest/spartan/utils/helm.d.ts +15 -0
  166. package/dest/spartan/utils/helm.d.ts.map +1 -0
  167. package/dest/spartan/utils/helm.js +47 -0
  168. package/dest/spartan/utils/index.d.ts +11 -0
  169. package/dest/spartan/utils/index.d.ts.map +1 -0
  170. package/dest/spartan/utils/index.js +22 -0
  171. package/dest/spartan/utils/k8s.d.ts +128 -0
  172. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  173. package/dest/spartan/utils/k8s.js +381 -0
  174. package/dest/spartan/utils/nodes.d.ts +40 -0
  175. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  176. package/dest/spartan/utils/nodes.js +461 -0
  177. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  178. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  179. package/dest/spartan/utils/pod_logs.js +74 -0
  180. package/dest/spartan/utils/scripts.d.ts +30 -0
  181. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  182. package/dest/spartan/utils/scripts.js +81 -0
  183. package/dest/spartan/utils.d.ts +2 -415
  184. package/dest/spartan/utils.d.ts.map +1 -1
  185. package/dest/spartan/utils.js +1 -445
  186. package/dest/test-wallet/test_wallet.d.ts +83 -0
  187. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  188. package/dest/test-wallet/test_wallet.js +214 -0
  189. package/dest/test-wallet/utils.d.ts +41 -0
  190. package/dest/test-wallet/utils.d.ts.map +1 -0
  191. package/dest/test-wallet/utils.js +71 -0
  192. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  193. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  194. package/dest/test-wallet/wallet_worker_script.js +48 -0
  195. package/dest/test-wallet/worker_wallet.d.ts +52 -0
  196. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  197. package/dest/test-wallet/worker_wallet.js +151 -0
  198. package/dest/test-wallet/worker_wallet_schema.d.ts +274 -0
  199. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  200. package/dest/test-wallet/worker_wallet_schema.js +10 -0
  201. package/package.json +72 -62
  202. package/src/bench/client_flows/benchmark.ts +363 -0
  203. package/src/bench/client_flows/client_flows_benchmark.ts +388 -0
  204. package/src/bench/client_flows/config.ts +69 -0
  205. package/src/bench/client_flows/data_extractor.ts +89 -0
  206. package/src/bench/utils.ts +47 -86
  207. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +149 -171
  208. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +155 -182
  209. package/src/e2e_deploy_contract/deploy_test.ts +40 -48
  210. package/src/e2e_epochs/epochs_test.ts +364 -93
  211. package/src/e2e_fees/bridging_race.notest.ts +74 -0
  212. package/src/e2e_fees/fees_test.ts +213 -259
  213. package/src/e2e_l1_publisher/write_json.ts +77 -0
  214. package/src/e2e_multi_validator/utils.ts +258 -0
  215. package/src/e2e_nested_contract/nested_contract_test.ts +48 -59
  216. package/src/e2e_p2p/inactivity_slash_test.ts +179 -0
  217. package/src/e2e_p2p/p2p_network.ts +367 -234
  218. package/src/e2e_p2p/reqresp/utils.ts +256 -0
  219. package/src/e2e_p2p/shared.ts +315 -39
  220. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  221. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  222. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  223. package/src/e2e_token_contract/token_contract_test.ts +132 -126
  224. package/src/fixtures/authwit_proxy.ts +50 -0
  225. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  226. package/src/fixtures/e2e_prover_test.ts +332 -0
  227. package/src/fixtures/elu_monitor.ts +126 -0
  228. package/src/fixtures/fixtures.ts +15 -7
  229. package/src/fixtures/get_acvm_config.ts +4 -12
  230. package/src/fixtures/get_bb_config.ts +18 -13
  231. package/src/fixtures/ha_setup.ts +186 -0
  232. package/src/fixtures/index.ts +1 -0
  233. package/src/fixtures/l1_to_l2_messaging.ts +56 -24
  234. package/src/fixtures/setup.ts +903 -0
  235. package/src/fixtures/setup_p2p_test.ts +134 -50
  236. package/src/fixtures/token_utils.ts +37 -16
  237. package/src/fixtures/utils.ts +27 -820
  238. package/src/fixtures/web3signer.ts +63 -0
  239. package/src/fixtures/with_telemetry_utils.ts +2 -2
  240. package/src/guides/up_quick_start.sh +9 -17
  241. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +2 -2
  242. package/src/quality_of_service/prometheus_client.ts +113 -0
  243. package/src/shared/cross_chain_test_harness.ts +110 -94
  244. package/src/shared/gas_portal_test_harness.ts +59 -50
  245. package/src/shared/index.ts +2 -1
  246. package/src/shared/jest_setup.ts +52 -2
  247. package/src/shared/mock_state_view.ts +188 -0
  248. package/src/shared/submit-transactions.ts +19 -20
  249. package/src/shared/uniswap_l1_l2.ts +207 -226
  250. package/src/simulators/lending_simulator.ts +18 -17
  251. package/src/simulators/token_simulator.ts +18 -34
  252. package/src/spartan/DEVELOP.md +128 -0
  253. package/src/spartan/setup_test_wallets.ts +393 -95
  254. package/src/spartan/tx_metrics.ts +376 -0
  255. package/src/spartan/utils/bot.ts +188 -0
  256. package/src/spartan/utils/chaos.ts +253 -0
  257. package/src/spartan/utils/clients.ts +100 -0
  258. package/src/spartan/utils/config.ts +29 -0
  259. package/src/spartan/utils/health.ts +255 -0
  260. package/src/spartan/utils/helm.ts +84 -0
  261. package/src/spartan/utils/index.ts +71 -0
  262. package/src/spartan/utils/k8s.ts +535 -0
  263. package/src/spartan/utils/nodes.ts +543 -0
  264. package/src/spartan/utils/pod_logs.ts +99 -0
  265. package/src/spartan/utils/scripts.ts +99 -0
  266. package/src/spartan/utils.ts +1 -582
  267. package/src/test-wallet/test_wallet.ts +306 -0
  268. package/src/test-wallet/utils.ts +112 -0
  269. package/src/test-wallet/wallet_worker_script.ts +60 -0
  270. package/src/test-wallet/worker_wallet.ts +213 -0
  271. package/src/test-wallet/worker_wallet_schema.ts +13 -0
  272. package/dest/e2e_prover/e2e_prover_test.d.ts +0 -56
  273. package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
  274. package/dest/e2e_prover/e2e_prover_test.js +0 -291
  275. package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
  276. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  277. package/dest/fixtures/setup_l1_contracts.js +0 -17
  278. package/dest/fixtures/snapshot_manager.d.ts +0 -87
  279. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  280. package/dest/fixtures/snapshot_manager.js +0 -479
  281. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  282. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  283. package/dest/sample-dapp/connect.js +0 -12
  284. package/dest/sample-dapp/contracts.js +0 -10
  285. package/dest/sample-dapp/deploy.js +0 -35
  286. package/dest/sample-dapp/index.js +0 -98
  287. package/src/e2e_prover/e2e_prover_test.ts +0 -418
  288. package/src/fixtures/setup_l1_contracts.ts +0 -27
  289. package/src/fixtures/snapshot_manager.ts +0 -617
  290. package/src/sample-dapp/connect.mjs +0 -16
  291. package/src/sample-dapp/contracts.mjs +0 -14
  292. package/src/sample-dapp/deploy.mjs +0 -40
  293. package/src/sample-dapp/index.mjs +0 -128
@@ -1,12 +1,10 @@
1
- import { BatchCall, INITIAL_L2_BLOCK_NUM } from '@aztec/aztec.js';
2
- import { mean, stdDev, timesParallel } from '@aztec/foundation/collection';
3
- import { randomInt } from '@aztec/foundation/crypto';
4
- import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking';
5
- import { createPXEService } from '@aztec/pxe/server';
6
- import { writeFileSync } from 'fs';
7
- import { mkdirpSync } from 'fs-extra';
8
- import { globSync } from 'glob';
9
- import { join } from 'path';
1
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { BatchCall, NO_WAIT } from '@aztec/aztec.js/contracts';
3
+ import { waitForTx } from '@aztec/aztec.js/node';
4
+ import { mean, stdDev, times } from '@aztec/foundation/collection';
5
+ import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
6
+ import { mkdirSync, writeFileSync } from 'fs';
7
+ import path from 'path';
10
8
  import { setup } from '../fixtures/utils.js';
11
9
  /**
12
10
  * Setup for benchmarks. Initializes a remote node with a single account and deploys a benchmark contract.
@@ -17,7 +15,10 @@ import { setup } from '../fixtures/utils.js';
17
15
  benchmark: true
18
16
  }
19
17
  });
20
- const contract = await BenchmarkingContract.deploy(context.wallet).send().deployed();
18
+ const defaultAccountAddress = context.accounts[0];
19
+ const { contract } = await BenchmarkingContract.deploy(context.wallet).send({
20
+ from: defaultAccountAddress
21
+ });
21
22
  context.logger.info(`Deployed benchmarking contract at ${contract.address}`);
22
23
  const sequencer = context.aztecNode.getSequencer();
23
24
  const telemetry = context.telemetryClient;
@@ -28,7 +29,13 @@ import { setup } from '../fixtures/utils.js';
28
29
  await telemetry.flush();
29
30
  const data = telemetry.getMeters();
30
31
  const formatted = formatMetricsForGithubBenchmarkAction(data, opts.metrics);
32
+ if (formatted.length === 0) {
33
+ throw new Error(`No benchmark data generated. Please review your test setup.`);
34
+ }
31
35
  const benchOutput = opts.benchOutput ?? process.env.BENCH_OUTPUT ?? 'bench.json';
36
+ mkdirSync(path.dirname(benchOutput), {
37
+ recursive: true
38
+ });
32
39
  writeFileSync(benchOutput, JSON.stringify(formatted));
33
40
  context.logger.info(`Wrote ${data.length} metrics to ${benchOutput}`);
34
41
  await origTeardown();
@@ -40,17 +47,20 @@ import { setup } from '../fixtures/utils.js';
40
47
  sequencer
41
48
  };
42
49
  }
50
+ function isMetricDefinition(f) {
51
+ return 'description' in f;
52
+ }
43
53
  function formatMetricsForGithubBenchmarkAction(data, filter) {
44
- const allFilters = filter.map((f)=>typeof f === 'string' ? {
45
- name: f,
54
+ const allFilters = filter.map((f)=>isMetricDefinition(f) ? {
55
+ name: f.name,
46
56
  source: f,
47
57
  transform: (x)=>x,
48
- unit: undefined
58
+ unit: f.unit
49
59
  } : f);
50
60
  return data.flatMap((meter)=>{
51
- return meter.metrics.filter((metric)=>allFilters.map((f)=>f.source).includes(metric.name)).map((metric)=>[
61
+ return meter.metrics.filter((metric)=>allFilters.map((f)=>f.source.name).includes(metric.name)).map((metric)=>[
52
62
  metric,
53
- allFilters.find((f)=>f.source === metric.name)
63
+ allFilters.find((f)=>f.source.name === metric.name)
54
64
  ]).map(([metric, filter])=>({
55
65
  name: `${meter.name}/${filter.name}`,
56
66
  unit: filter.unit ?? metric.unit ?? 'unknown',
@@ -76,28 +86,6 @@ function getMetricValues(points) {
76
86
  };
77
87
  }
78
88
  }
79
- /**
80
- * Creates and returns a directory with the current job name and a random number.
81
- * @param index - Index to merge into the dir path.
82
- * @returns A path to a created dir.
83
- */ export function makeDataDirectory(index) {
84
- const testName = expect.getState().currentTestName.split(' ')[0].replaceAll('/', '_');
85
- const db = join('data', testName, index.toString(), `${randomInt(99)}`);
86
- mkdirpSync(db);
87
- return db;
88
- }
89
- /**
90
- * Returns the size in disk of a folder.
91
- * @param path - Path to the folder.
92
- * @returns Size in bytes.
93
- */ export function getFolderSize(path) {
94
- return globSync('**', {
95
- stat: true,
96
- cwd: path,
97
- nodir: true,
98
- withFileTypes: true
99
- }).reduce((accum, file)=>accum + file.size, 0);
100
- }
101
89
  /**
102
90
  * Returns a call to the benchmark contract. Each call has a private execution (account entrypoint),
103
91
  * a nested private call (create_note), a public call (increment_balance), and a nested public
@@ -108,17 +96,19 @@ function getMetricValues(points) {
108
96
  * @param contract - Benchmarking contract.
109
97
  * @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
110
98
  * @returns A BatchCall instance.
111
- */ export async function makeCall(index, context, contract, heavyPublicCompute) {
112
- const owner = context.wallet.getAddress();
113
- const sender = owner;
99
+ */ async function makeCall(index, context, contract, heavyPublicCompute) {
114
100
  if (heavyPublicCompute) {
115
101
  return new BatchCall(context.wallet, [
116
- await contract.methods.sha256_hash_2048(randomBytesAsBigInts(2048)).request()
102
+ contract.methods.sha256_hash_1024(randomBytesAsBigInts(1024))
117
103
  ]);
118
104
  } else {
105
+ // We use random address for the new note owner because we can emit at most UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN
106
+ // logs for a given sender-recipient-contract tuple.
107
+ const ownerOfNewNote = await AztecAddress.random();
108
+ const [ownerOfBalance] = context.accounts;
119
109
  return new BatchCall(context.wallet, [
120
- await contract.methods.create_note(owner, sender, index + 1).request(),
121
- await contract.methods.increment_balance(owner, index + 1).request()
110
+ contract.methods.create_note(ownerOfNewNote, index + 1),
111
+ contract.methods.increment_balance(ownerOfBalance, index + 1)
122
112
  ]);
123
113
  }
124
114
  }
@@ -131,40 +121,22 @@ function getMetricValues(points) {
131
121
  * @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
132
122
  * @returns Array of sent txs.
133
123
  */ export async function sendTxs(txCount, context, contract, heavyPublicCompute = false) {
134
- const calls = await timesParallel(txCount, (index)=>makeCall(index, context, contract, heavyPublicCompute));
124
+ const calls = await Promise.all(times(txCount, (index)=>makeCall(index, context, contract, heavyPublicCompute)));
135
125
  context.logger.info(`Creating ${txCount} txs`);
136
- const provenTxs = await Promise.all(calls.map((call)=>call.prove({
137
- skipPublicSimulation: true
138
- })));
126
+ const [from] = context.accounts;
139
127
  context.logger.info(`Sending ${txCount} txs`);
140
- return provenTxs.map((tx)=>tx.send());
128
+ return Promise.all(calls.map(async (call)=>{
129
+ const { txHash } = await call.send({
130
+ from,
131
+ wait: NO_WAIT
132
+ });
133
+ return txHash;
134
+ }));
141
135
  }
142
136
  export async function waitTxs(txs, context, txWaitOpts) {
143
137
  context.logger.info(`Awaiting ${txs.length} txs to be mined`);
144
- await Promise.all(txs.map((tx)=>tx.wait(txWaitOpts)));
145
- context.logger.info(`All ${txs.length} txs have been mined`);
146
- }
147
- /**
148
- * Creates a new PXE
149
- * @param node - Node to connect the pxe to.
150
- * @param contract - Benchmark contract to add to the pxe.
151
- * @param startingBlock - First l2 block to process.
152
- * @returns The new PXE.
153
- */ export async function createNewPXE(node, contract, startingBlock = INITIAL_L2_BLOCK_NUM) {
154
- const l1Contracts = await node.getL1ContractAddresses();
155
- const { l1ChainId, protocolVersion } = await node.getNodeInfo();
156
- const pxeConfig = {
157
- l2StartingBlock: startingBlock,
158
- l2BlockPollingIntervalMS: 100,
159
- dataDirectory: undefined,
160
- dataStoreMapSizeKB: 1024 * 1024,
161
- l1Contracts,
162
- l1ChainId,
163
- version: protocolVersion
164
- };
165
- const pxe = await createPXEService(node, pxeConfig);
166
- await pxe.registerContract(contract);
167
- return pxe;
138
+ await Promise.all(txs.map((txHash)=>waitForTx(context.aztecNode, txHash, txWaitOpts)));
139
+ context.logger.info(`${txs.length} txs have been mined`);
168
140
  }
169
141
  function randomBytesAsBigInts(length) {
170
142
  return [
@@ -1,8 +1,16 @@
1
- import { type AccountWallet, type CompleteAddress, Fr, type Logger, type TxHash } from '@aztec/aztec.js';
2
- import { DocsExampleContract } from '@aztec/noir-contracts.js/DocsExample';
1
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { Fr } from '@aztec/aztec.js/fields';
3
+ import { type Logger } from '@aztec/aztec.js/log';
4
+ import type { AztecNode } from '@aztec/aztec.js/node';
5
+ import type { TxHash } from '@aztec/aztec.js/tx';
6
+ import type { CheatCodes } from '@aztec/aztec/testing';
3
7
  import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
4
- import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
8
+ import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
9
+ import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
10
+ import type { SequencerClient } from '@aztec/sequencer-client';
11
+ import { type EndToEndContext } from '../fixtures/setup.js';
5
12
  import { TokenSimulator } from '../simulators/token_simulator.js';
13
+ import type { TestWallet } from '../test-wallet/test_wallet.js';
6
14
  export declare class Role {
7
15
  private isAdmin;
8
16
  private isMinter;
@@ -17,30 +25,31 @@ export declare class Role {
17
25
  };
18
26
  }
19
27
  export declare class BlacklistTokenContractTest {
20
- #private;
21
- static DELAY: number;
22
- private snapshotManager;
28
+ static CHANGE_ROLES_DELAY: number;
29
+ context: EndToEndContext;
23
30
  logger: Logger;
24
- wallets: AccountWallet[];
25
- accounts: CompleteAddress[];
31
+ wallet: TestWallet;
26
32
  asset: TokenBlacklistContract;
27
33
  tokenSim: TokenSimulator;
28
- badAccount: DocsExampleContract;
29
- admin: AccountWallet;
30
- other: AccountWallet;
31
- blacklisted: AccountWallet;
34
+ badAccount: InvalidAccountContract;
35
+ authwitProxy: GenericProxyContract;
36
+ cheatCodes: CheatCodes;
37
+ sequencer: SequencerClient;
38
+ aztecNode: AztecNode;
39
+ adminAddress: AztecAddress;
40
+ otherAddress: AztecAddress;
41
+ blacklistedAddress: AztecAddress;
32
42
  constructor(testName: string);
33
- mineBlocks(amount?: number): Promise<void>;
43
+ crossTimestampOfChange(): Promise<void>;
34
44
  /**
35
- * Adds two state shifts to snapshot manager.
45
+ * Applies base setup:
36
46
  * 1. Add 3 accounts.
37
47
  * 2. Publicly deploy accounts, deploy token contract and a "bad account".
38
48
  */
39
- applyBaseSnapshots(): Promise<void>;
49
+ applyBaseSetup(): Promise<void>;
40
50
  setup(): Promise<void>;
41
- snapshot: <T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>) => Promise<void>;
42
51
  teardown(): Promise<void>;
43
- addPendingShieldNoteToPXE(contract: TokenBlacklistContract, wallet: AccountWallet, amount: bigint, secretHash: Fr, txHash: TxHash): Promise<void>;
44
- applyMintSnapshot(): Promise<void>;
52
+ addPendingShieldNoteToPXE(contract: TokenBlacklistContract, recipient: AztecAddress, amount: bigint, secretHash: Fr, txHash: TxHash): Promise<void>;
53
+ applyMint(): Promise<void>;
45
54
  }
46
- //# sourceMappingURL=blacklist_token_contract_test.d.ts.map
55
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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BTSxpQkFjZjtJQUVLLFNBQVMsa0JBbURkO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,EAAE,EACF,KAAK,MAAM,EACX,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAIjF,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIlE,qBAAa,IAAI;IACf,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAE9B,SAAS;IAKT,UAAU;IAKV,eAAe;IAKf,YAAY;;;;;CAKb;AAED,qBAAa,0BAA0B;;IAGrC,MAAM,CAAC,KAAK,SAAK;IAEjB,OAAO,CAAC,eAAe,CAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,aAAa,EAAE,CAAM;IAC9B,QAAQ,EAAE,eAAe,EAAE,CAAM;IACjC,KAAK,EAAG,sBAAsB,CAAC;IAC/B,QAAQ,EAAG,cAAc,CAAC;IAC1B,UAAU,EAAG,mBAAmB,CAAC;IAEjC,KAAK,EAAG,aAAa,CAAC;IACtB,KAAK,EAAG,aAAa,CAAC;IACtB,WAAW,EAAG,aAAa,CAAC;gBAEhB,QAAQ,EAAE,MAAM;IAKtB,UAAU,CAAC,MAAM,GAAE,MAAyC;IAMlE;;;;OAIG;IACG,kBAAkB;IA0DlB,KAAK;IAIX,QAAQ,YACA,MAAM,SACL,CAAC,OAAO,EAAE,iBAAiB,KAAK,QAAQ,CAAC,CAAC,YACxC,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,QAAQ,IAAI,CAAC,KACtE,QAAQ,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAQR,yBAAyB,CAC7B,QAAQ,EAAE,sBAAsB,EAChC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,EACd,MAAM,EAAE,MAAM;IAgBV,iBAAiB;CAmExB"}
1
+ {"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,EAAE,KAAK,eAAe,EAAyD,MAAM,sBAAsB,CAAC;AACnH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,IAAI;IACf,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAE9B,SAAS,SAGR;IAED,UAAU,SAGT;IAED,eAAe,SAGd;IAED,YAAY;;;;MAIX;CACF;AAED,qBAAa,0BAA0B;IAErC,MAAM,CAAC,kBAAkB,SAAS;IAElC,OAAO,EAAG,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAG,UAAU,CAAC;IACpB,KAAK,EAAG,sBAAsB,CAAC;IAC/B,QAAQ,EAAG,cAAc,CAAC;IAC1B,UAAU,EAAG,sBAAsB,CAAC;IACpC,YAAY,EAAG,oBAAoB,CAAC;IACpC,UAAU,EAAG,UAAU,CAAC;IACxB,SAAS,EAAG,eAAe,CAAC;IAC5B,SAAS,EAAG,SAAS,CAAC;IAEtB,YAAY,EAAG,YAAY,CAAC;IAC5B,YAAY,EAAG,YAAY,CAAC;IAC5B,kBAAkB,EAAG,YAAY,CAAC;IAElC,YAAY,QAAQ,EAAE,MAAM,EAE3B;IAEK,sBAAsB,kBAM3B;IAED;;;;OAIG;IACG,cAAc,kBA4DnB;IAEK,KAAK,kBAOV;IAEK,QAAQ,kBAEb;IAEK,yBAAyB,CAC7B,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,EACd,MAAM,EAAE,MAAM,iBAcf;IAEK,SAAS,kBAmDd;CACF"}
@@ -1,12 +1,12 @@
1
- import { getSchnorrWallet } from '@aztec/accounts/schnorr';
2
- import { Fr, computeSecretHash, createLogger } from '@aztec/aztec.js';
3
- import { MAX_NOTE_HASHES_PER_TX } from '@aztec/constants';
4
- import { DocsExampleContract } from '@aztec/noir-contracts.js/DocsExample';
1
+ import { computeSecretHash } from '@aztec/aztec.js/crypto';
2
+ import { Fr } from '@aztec/aztec.js/fields';
3
+ import { createLogger } from '@aztec/aztec.js/log';
5
4
  import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
5
+ import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
6
+ import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
6
7
  import { jest } from '@jest/globals';
7
- import { createSnapshotManager, deployAccounts, publicDeployAccounts } from '../fixtures/snapshot_manager.js';
8
+ import { deployAccounts, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
8
9
  import { TokenSimulator } from '../simulators/token_simulator.js';
9
- const { E2E_DATA_PATH: dataPath } = process.env;
10
10
  export class Role {
11
11
  isAdmin = false;
12
12
  isMinter = false;
@@ -34,124 +34,146 @@ export class Role {
34
34
  }
35
35
  }
36
36
  export class BlacklistTokenContractTest {
37
- // A low delay is really poor ux, but we need to keep it low for the tests to run "quickly".
38
37
  // This value MUST match the same value that we have in the contract
39
- static DELAY = 2;
40
- snapshotManager;
38
+ static CHANGE_ROLES_DELAY = 86400;
39
+ context;
41
40
  logger;
42
- wallets = [];
43
- accounts = [];
41
+ wallet;
44
42
  asset;
45
43
  tokenSim;
46
44
  badAccount;
47
- admin;
48
- other;
49
- blacklisted;
45
+ authwitProxy;
46
+ cheatCodes;
47
+ sequencer;
48
+ aztecNode;
49
+ adminAddress;
50
+ otherAddress;
51
+ blacklistedAddress;
50
52
  constructor(testName){
51
53
  this.logger = createLogger(`e2e:e2e_blacklist_token_contract:${testName}`);
52
- this.snapshotManager = createSnapshotManager(`e2e_blacklist_token_contract/${testName}`, dataPath);
53
54
  }
54
- async mineBlocks(amount = BlacklistTokenContractTest.DELAY) {
55
- for(let i = 0; i < amount; ++i){
56
- await this.asset.methods.get_roles(this.admin.getAddress()).send().wait();
57
- }
55
+ async crossTimestampOfChange() {
56
+ await this.cheatCodes.warpL2TimeAtLeastBy(this.sequencer, this.aztecNode, BlacklistTokenContractTest.CHANGE_ROLES_DELAY);
58
57
  }
59
58
  /**
60
- * Adds two state shifts to snapshot manager.
59
+ * Applies base setup:
61
60
  * 1. Add 3 accounts.
62
61
  * 2. Publicly deploy accounts, deploy token contract and a "bad account".
63
- */ async applyBaseSnapshots() {
62
+ */ async applyBaseSetup() {
64
63
  // Adding a timeout of 2 minutes in here such that it is propagated to the underlying tests
65
64
  jest.setTimeout(120_000);
66
- await this.snapshotManager.snapshot('3_accounts', deployAccounts(3, this.logger), async ({ deployedAccounts }, { pxe })=>{
67
- this.wallets = await Promise.all(deployedAccounts.map((a)=>getSchnorrWallet(pxe, a.address, a.signingKey)));
68
- this.admin = this.wallets[0];
69
- this.other = this.wallets[1];
70
- this.blacklisted = this.wallets[2];
71
- this.accounts = this.wallets.map((w)=>w.getCompleteAddress());
72
- });
73
- await this.snapshotManager.snapshot('e2e_blacklist_token_contract', async ()=>{
74
- // Create the token contract state.
75
- // Move this account thing to addAccounts above?
76
- this.logger.verbose(`Public deploy accounts...`);
77
- await publicDeployAccounts(this.wallets[0], this.accounts.slice(0, 3));
78
- this.logger.verbose(`Deploying TokenContract...`);
79
- this.asset = await TokenBlacklistContract.deploy(this.admin, this.admin.getAddress()).send().deployed();
80
- this.logger.verbose(`Token deployed to ${this.asset.address}`);
81
- this.logger.verbose(`Deploying bad account...`);
82
- this.badAccount = await DocsExampleContract.deploy(this.wallets[0]).send().deployed();
83
- this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
84
- await this.mineBlocks();
85
- return {
86
- tokenContractAddress: this.asset.address,
87
- badAccountAddress: this.badAccount.address
88
- };
89
- }, async ({ tokenContractAddress, badAccountAddress })=>{
90
- // Restore the token contract state.
91
- this.asset = await TokenBlacklistContract.at(tokenContractAddress, this.wallets[0]);
92
- this.logger.verbose(`Token contract address: ${this.asset.address}`);
93
- this.tokenSim = new TokenSimulator(this.asset, this.wallets[0], this.logger, this.accounts.map((a)=>a.address));
94
- this.badAccount = await DocsExampleContract.at(badAccountAddress, this.wallets[0]);
95
- this.logger.verbose(`Bad account address: ${this.badAccount.address}`);
96
- expect(await this.asset.methods.get_roles(this.admin.getAddress()).simulate()).toEqual(new Role().withAdmin().toNoirStruct());
65
+ this.logger.info('Deploying 3 accounts');
66
+ const { deployedAccounts } = await deployAccounts(3, this.logger)({
67
+ wallet: this.context.wallet,
68
+ initialFundedAccounts: this.context.initialFundedAccounts
97
69
  });
70
+ this.cheatCodes = this.context.cheatCodes;
71
+ this.aztecNode = this.context.aztecNodeService;
72
+ this.sequencer = this.context.sequencer;
73
+ this.wallet = this.context.wallet;
74
+ this.adminAddress = deployedAccounts[0].address;
75
+ this.otherAddress = deployedAccounts[1].address;
76
+ this.blacklistedAddress = deployedAccounts[2].address;
77
+ this.logger.info('Setting up blacklist token contract');
78
+ // Create the token contract state.
79
+ this.logger.verbose(`Public deploy accounts...`);
80
+ await publicDeployAccounts(this.wallet, [
81
+ this.adminAddress,
82
+ this.otherAddress,
83
+ this.blacklistedAddress
84
+ ]);
85
+ this.logger.verbose(`Deploying TokenContract...`);
86
+ ({ contract: this.asset } = await TokenBlacklistContract.deploy(this.wallet, this.adminAddress).send({
87
+ from: this.adminAddress
88
+ }));
89
+ this.logger.verbose(`Token deployed to ${this.asset.address}`);
90
+ this.logger.verbose(`Deploying bad account...`);
91
+ ({ contract: this.badAccount } = await InvalidAccountContract.deploy(this.wallet).send({
92
+ from: this.adminAddress
93
+ }));
94
+ this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
95
+ // Deploy a proxy contract for "on behalf of other" tests. The note owner must be the tx sender
96
+ // (so their notes are in scope), but msg_sender in the target must differ from the note owner
97
+ // to trigger authwit validation. The proxy forwards calls so that msg_sender != tx sender.
98
+ this.logger.verbose(`Deploying generic proxy...`);
99
+ ({ contract: this.authwitProxy } = await GenericProxyContract.deploy(this.wallet).send({
100
+ from: this.adminAddress
101
+ }));
102
+ this.logger.verbose(`Deployed to ${this.authwitProxy.address}.`);
103
+ await this.crossTimestampOfChange();
104
+ this.tokenSim = new TokenSimulator(this.asset, this.wallet, this.adminAddress, this.logger, [
105
+ this.adminAddress,
106
+ this.otherAddress,
107
+ this.blacklistedAddress
108
+ ]);
109
+ expect((await this.asset.methods.get_roles(this.adminAddress).simulate({
110
+ from: this.adminAddress
111
+ })).result).toEqual(new Role().withAdmin().toNoirStruct());
98
112
  }
99
113
  async setup() {
100
- await this.snapshotManager.setup();
114
+ this.logger.info('Setting up fresh context');
115
+ this.context = await setup(0, {
116
+ fundSponsoredFPC: true,
117
+ skipAccountDeployment: true
118
+ });
119
+ await this.applyBaseSetup();
101
120
  }
102
- snapshot = (name, apply, restore = ()=>Promise.resolve())=>this.snapshotManager.snapshot(name, apply, restore);
103
121
  async teardown() {
104
- await this.snapshotManager.teardown();
122
+ await teardown(this.context);
105
123
  }
106
- #toBoundedVec(arr, maxLen) {
107
- return {
108
- len: arr.length,
109
- storage: arr.concat(new Array(maxLen - arr.length).fill(new Fr(0)))
110
- };
111
- }
112
- async addPendingShieldNoteToPXE(contract, wallet, amount, secretHash, txHash) {
113
- const txEffects = await wallet.getTxEffect(txHash);
114
- await contract.methods.deliver_transparent_note(contract.address, amount, secretHash, txHash.hash, this.#toBoundedVec(txEffects.data.noteHashes, MAX_NOTE_HASHES_PER_TX), txEffects.data.nullifiers[0], wallet.getAddress()).simulate();
124
+ async addPendingShieldNoteToPXE(contract, recipient, amount, secretHash, txHash) {
125
+ const txEffects = await this.aztecNode.getTxEffect(txHash);
126
+ await contract.methods.process_transparent_note(contract.address, amount, secretHash, txHash.hash, txEffects.data.noteHashes, txEffects.data.nullifiers[0], recipient).simulate({
127
+ from: recipient
128
+ });
115
129
  }
116
- async applyMintSnapshot() {
117
- await this.snapshotManager.snapshot('mint', async ()=>{
118
- const { asset, accounts, wallets } = this;
119
- const amount = 10000n;
120
- const adminMinterRole = new Role().withAdmin().withMinter();
121
- await this.asset.withWallet(this.admin).methods.update_roles(this.admin.getAddress(), adminMinterRole.toNoirStruct()).send().wait();
122
- const blacklistRole = new Role().withBlacklisted();
123
- await this.asset.withWallet(this.admin).methods.update_roles(this.blacklisted.getAddress(), blacklistRole.toNoirStruct()).send().wait();
124
- await this.mineBlocks(); // This gets us past the block of change
125
- expect(await this.asset.methods.get_roles(this.admin.getAddress()).simulate()).toEqual(adminMinterRole.toNoirStruct());
126
- this.logger.verbose(`Minting ${amount} publicly...`);
127
- await asset.methods.mint_public(accounts[0].address, amount).send().wait();
128
- this.logger.verbose(`Minting ${amount} privately...`);
129
- const secret = Fr.random();
130
- const secretHash = await computeSecretHash(secret);
131
- const receipt = await asset.methods.mint_private(amount, secretHash).send().wait();
132
- await this.addPendingShieldNoteToPXE(asset, wallets[0], amount, secretHash, receipt.txHash);
133
- const txClaim = asset.methods.redeem_shield(accounts[0].address, amount, secret).send();
134
- await txClaim.wait({
135
- debug: true
136
- });
137
- this.logger.verbose(`Minting complete.`);
138
- return {
139
- amount
140
- };
141
- }, async ({ amount })=>{
142
- const { asset, accounts: [{ address }], tokenSim } = this;
143
- tokenSim.mintPublic(address, amount);
144
- const publicBalance = await asset.methods.balance_of_public(address).simulate();
145
- this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
146
- expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
147
- tokenSim.mintPrivate(address, amount);
148
- const privateBalance = await asset.methods.balance_of_private(address).simulate();
149
- this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
150
- expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
151
- const totalSupply = await asset.methods.total_supply().simulate();
152
- this.logger.verbose(`Total supply: ${totalSupply}`);
153
- expect(totalSupply).toEqual(tokenSim.totalSupply);
154
- return Promise.resolve();
130
+ async applyMint() {
131
+ this.logger.info('Applying mint setup');
132
+ const { asset, tokenSim } = this;
133
+ const amount = 10000n;
134
+ const adminMinterRole = new Role().withAdmin().withMinter();
135
+ await this.asset.methods.update_roles(this.adminAddress, adminMinterRole.toNoirStruct()).send({
136
+ from: this.adminAddress
137
+ });
138
+ const blacklistRole = new Role().withBlacklisted();
139
+ await this.asset.methods.update_roles(this.blacklistedAddress, blacklistRole.toNoirStruct()).send({
140
+ from: this.adminAddress
141
+ });
142
+ await this.crossTimestampOfChange();
143
+ expect((await this.asset.methods.get_roles(this.adminAddress).simulate({
144
+ from: this.adminAddress
145
+ })).result).toEqual(adminMinterRole.toNoirStruct());
146
+ this.logger.verbose(`Minting ${amount} publicly...`);
147
+ await asset.methods.mint_public(this.adminAddress, amount).send({
148
+ from: this.adminAddress
149
+ });
150
+ this.logger.verbose(`Minting ${amount} privately...`);
151
+ const secret = Fr.random();
152
+ const secretHash = await computeSecretHash(secret);
153
+ const { receipt } = await asset.methods.mint_private(amount, secretHash).send({
154
+ from: this.adminAddress
155
+ });
156
+ await this.addPendingShieldNoteToPXE(asset, this.adminAddress, amount, secretHash, receipt.txHash);
157
+ await asset.methods.redeem_shield(this.adminAddress, amount, secret).send({
158
+ from: this.adminAddress
159
+ });
160
+ this.logger.verbose(`Minting complete.`);
161
+ tokenSim.mintPublic(this.adminAddress, amount);
162
+ const { result: publicBalance } = await asset.methods.balance_of_public(this.adminAddress).simulate({
163
+ from: this.adminAddress
164
+ });
165
+ this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
166
+ expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(this.adminAddress));
167
+ tokenSim.mintPrivate(this.adminAddress, amount);
168
+ const { result: privateBalance } = await asset.methods.balance_of_private(this.adminAddress).simulate({
169
+ from: this.adminAddress
170
+ });
171
+ this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
172
+ expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(this.adminAddress));
173
+ const { result: totalSupply } = await asset.methods.total_supply().simulate({
174
+ from: this.adminAddress
155
175
  });
176
+ this.logger.verbose(`Total supply: ${totalSupply}`);
177
+ expect(totalSupply).toEqual(tokenSim.totalSupply);
156
178
  }
157
179
  }
@@ -1,47 +1,47 @@
1
1
  import type { AztecNodeConfig } from '@aztec/aztec-node';
2
- import { type AccountWallet, AztecAddress, type AztecNode, CheatCodes, type CompleteAddress, EthAddress, type Logger, type PXE } from '@aztec/aztec.js';
3
- import { type ViemPublicClient } from '@aztec/ethereum';
2
+ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
3
+ import { type Logger } from '@aztec/aztec.js/log';
4
+ import type { AztecNode } from '@aztec/aztec.js/node';
5
+ import type { TxReceipt } from '@aztec/aztec.js/tx';
6
+ import { CheatCodes } from '@aztec/aztec/testing';
7
+ import { InboxContract, OutboxContract, RollupContract } from '@aztec/ethereum/contracts';
8
+ import type { DeployAztecL1ContractsArgs, DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
9
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
10
+ import { EpochNumber } from '@aztec/foundation/branded-types';
4
11
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
5
12
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
6
- import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
13
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
14
+ import { type EndToEndContext, type SetupOptions } from '../fixtures/setup.js';
7
15
  import { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js';
16
+ import type { TestWallet } from '../test-wallet/test_wallet.js';
8
17
  export declare class CrossChainMessagingTest {
9
- private snapshotManager;
18
+ private requireEpochProven;
19
+ private setupOptions;
20
+ private deployL1ContractsArgs;
10
21
  logger: Logger;
11
- wallets: AccountWallet[];
12
- accounts: CompleteAddress[];
22
+ context: EndToEndContext;
13
23
  aztecNode: AztecNode;
14
- pxe: PXE;
15
24
  aztecNodeConfig: AztecNodeConfig;
16
- publicClient: ViemPublicClient | undefined;
17
- user1Wallet: AccountWallet;
18
- user2Wallet: AccountWallet;
25
+ aztecNodeAdmin: AztecNodeAdmin;
26
+ l1Client: ExtendedViemWalletClient | undefined;
27
+ wallet: TestWallet;
28
+ ownerAddress: AztecAddress;
29
+ user1Address: AztecAddress;
30
+ user2Address: AztecAddress;
19
31
  crossChainTestHarness: CrossChainTestHarness;
20
32
  ethAccount: EthAddress;
21
- ownerAddress: AztecAddress;
22
33
  l2Token: TokenContract;
23
34
  l2Bridge: TokenBridgeContract;
24
- rollup: any;
25
- inbox: any;
26
- outbox: any;
27
- cheatcodes: CheatCodes;
28
- constructor(testName: string);
29
- assumeProven(): Promise<void>;
35
+ rollup: RollupContract;
36
+ inbox: InboxContract;
37
+ outbox: OutboxContract;
38
+ cheatCodes: CheatCodes;
39
+ deployL1ContractsValues: DeployAztecL1ContractsReturnType;
40
+ constructor(testName: string, opts?: SetupOptions, deployL1ContractsArgs?: Partial<DeployAztecL1ContractsArgs>);
30
41
  setup(): Promise<void>;
31
- snapshot: <T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>) => Promise<void>;
42
+ advanceToEpochProven(l2TxReceipt: TxReceipt): Promise<EpochNumber>;
43
+ catchUpProvenChain(): Promise<void>;
32
44
  teardown(): Promise<void>;
33
- applyBaseSnapshots(): Promise<void>;
34
- toCrossChainContext(): CrossChainContext;
45
+ applyBaseSetup(): Promise<void>;
35
46
  }
36
- type CrossChainContext = {
37
- l2Token: AztecAddress;
38
- l2Bridge: AztecAddress;
39
- tokenPortal: EthAddress;
40
- underlying: EthAddress;
41
- ethAccount: EthAddress;
42
- ownerAddress: AztecAddress;
43
- inbox: EthAddress;
44
- outbox: EthAddress;
45
- };
46
- export {};
47
- //# sourceMappingURL=cross_chain_messaging_test.d.ts.map
47
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3Jvc3NfY2hhaW5fbWVzc2FnaW5nX3Rlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lMmVfY3Jvc3NfY2hhaW5fbWVzc2FnaW5nL2Nyb3NzX2NoYWluX21lc3NhZ2luZ190ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3pELE9BQU8sRUFB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sa0JBRWI7SUFFSyxjQUFjLGtCQWtGbkI7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,SAAS,EACd,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EAET,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,gBAAgB,EAAqC,MAAM,iBAAiB,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAK3E,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAI9E,qBAAa,uBAAuB;IAClC,OAAO,CAAC,eAAe,CAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,aAAa,EAAE,CAAM;IAC9B,QAAQ,EAAE,eAAe,EAAE,CAAM;IACjC,SAAS,EAAG,SAAS,CAAC;IACtB,GAAG,EAAG,GAAG,CAAC;IACV,eAAe,EAAG,eAAe,CAAC;IAElC,YAAY,EAAG,gBAAgB,GAAG,SAAS,CAAC;IAE5C,WAAW,EAAG,aAAa,CAAC;IAC5B,WAAW,EAAG,aAAa,CAAC;IAC5B,qBAAqB,EAAG,qBAAqB,CAAC;IAC9C,UAAU,EAAG,UAAU,CAAC;IACxB,YAAY,EAAG,YAAY,CAAC;IAC5B,OAAO,EAAG,aAAa,CAAC;IACxB,QAAQ,EAAG,mBAAmB,CAAC;IAE/B,MAAM,EAAG,GAAG,CAAC;IACb,KAAK,EAAG,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