@aztec/end-to-end 0.0.1-commit.b655e406 → 0.0.1-commit.b8a057fa

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 (410) hide show
  1. package/README.md +217 -14
  2. package/dest/automine/automine_test_context.d.ts +85 -0
  3. package/dest/automine/automine_test_context.d.ts.map +1 -0
  4. package/dest/automine/automine_test_context.js +98 -0
  5. package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts +2 -0
  6. package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  7. package/dest/automine/contracts/fixtures/storage_proof_fetcher.js +184 -0
  8. package/dest/automine/contracts/fixtures/storage_proof_fixture.d.ts +18 -0
  9. package/dest/automine/contracts/fixtures/storage_proof_fixture.d.ts.map +1 -0
  10. package/dest/automine/contracts/fixtures/storage_proof_fixture.js +120 -0
  11. package/dest/automine/delivery/onchain_delivery_harness.d.ts +17 -0
  12. package/dest/automine/delivery/onchain_delivery_harness.d.ts.map +1 -0
  13. package/dest/automine/delivery/onchain_delivery_harness.js +123 -0
  14. package/dest/automine/token/blacklist_token_contract_test.d.ts +49 -0
  15. package/dest/automine/token/blacklist_token_contract_test.d.ts.map +1 -0
  16. package/dest/automine/token/blacklist_token_contract_test.js +166 -0
  17. package/dest/automine/token/token_contract_test.d.ts +40 -0
  18. package/dest/automine/token/token_contract_test.d.ts.map +1 -0
  19. package/dest/automine/token/token_contract_test.js +119 -0
  20. package/dest/automine/token/token_test_helpers.d.ts +73 -0
  21. package/dest/automine/token/token_test_helpers.d.ts.map +1 -0
  22. package/dest/automine/token/token_test_helpers.js +97 -0
  23. package/dest/bench/client_flows/benchmark.d.ts +17 -2
  24. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  25. package/dest/bench/client_flows/benchmark.js +40 -1
  26. package/dest/bench/client_flows/client_flows_benchmark.d.ts +26 -20
  27. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  28. package/dest/bench/client_flows/client_flows_benchmark.js +159 -140
  29. package/dest/bench/client_flows/config.d.ts +2 -2
  30. package/dest/bench/client_flows/config.d.ts.map +1 -1
  31. package/dest/bench/client_flows/config.js +18 -0
  32. package/dest/bench/client_flows/data_extractor.d.ts +1 -1
  33. package/dest/bench/client_flows/data_extractor.js +8 -27
  34. package/dest/bench/utils.d.ts +10 -9
  35. package/dest/bench/utils.d.ts.map +1 -1
  36. package/dest/bench/utils.js +126 -23
  37. package/dest/composed/ha/ha_full_setup.d.ts +77 -0
  38. package/dest/composed/ha/ha_full_setup.d.ts.map +1 -0
  39. package/dest/composed/ha/ha_full_setup.js +383 -0
  40. package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts +12 -0
  41. package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts.map +1 -0
  42. package/dest/{e2e_multi_validator/utils.js → composed/web3signer/multi_validator_keystore_utils.js} +1 -1
  43. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  44. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  45. package/dest/fixtures/authwit_proxy.js +34 -0
  46. package/dest/fixtures/e2e_prover_test.d.ts +27 -29
  47. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  48. package/dest/fixtures/e2e_prover_test.js +156 -156
  49. package/dest/fixtures/elu_monitor.d.ts +21 -0
  50. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  51. package/dest/fixtures/elu_monitor.js +102 -0
  52. package/dest/fixtures/fixtures.d.ts +83 -3
  53. package/dest/fixtures/fixtures.d.ts.map +1 -1
  54. package/dest/fixtures/fixtures.js +86 -3
  55. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  56. package/dest/fixtures/get_acvm_config.js +1 -1
  57. package/dest/fixtures/get_bb_config.d.ts +1 -1
  58. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  59. package/dest/fixtures/get_bb_config.js +5 -5
  60. package/dest/fixtures/ha_setup.d.ts +71 -0
  61. package/dest/fixtures/ha_setup.d.ts.map +1 -0
  62. package/dest/fixtures/ha_setup.js +119 -0
  63. package/dest/fixtures/index.d.ts +3 -1
  64. package/dest/fixtures/index.d.ts.map +1 -1
  65. package/dest/fixtures/index.js +2 -0
  66. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  67. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  68. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  69. package/dest/fixtures/logging.d.ts +1 -1
  70. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
  71. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
  72. package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
  73. package/dest/fixtures/setup.d.ts +269 -0
  74. package/dest/fixtures/setup.d.ts.map +1 -0
  75. package/dest/fixtures/setup.js +688 -0
  76. package/dest/fixtures/setup_p2p_test.d.ts +22 -11
  77. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  78. package/dest/fixtures/setup_p2p_test.js +60 -41
  79. package/dest/fixtures/timing.d.ts +42 -0
  80. package/dest/fixtures/timing.d.ts.map +1 -0
  81. package/dest/fixtures/timing.js +72 -0
  82. package/dest/fixtures/token_utils.d.ts +26 -5
  83. package/dest/fixtures/token_utils.d.ts.map +1 -1
  84. package/dest/fixtures/token_utils.js +33 -9
  85. package/dest/fixtures/utils.d.ts +5 -192
  86. package/dest/fixtures/utils.d.ts.map +1 -1
  87. package/dest/fixtures/utils.js +4 -648
  88. package/dest/fixtures/wait_helpers.d.ts +135 -0
  89. package/dest/fixtures/wait_helpers.d.ts.map +1 -0
  90. package/dest/fixtures/wait_helpers.js +154 -0
  91. package/dest/fixtures/web3signer.d.ts +1 -1
  92. package/dest/fixtures/web3signer.js +1 -1
  93. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  94. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  95. package/dest/fixtures/with_telemetry_utils.js +2 -2
  96. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  97. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  98. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  99. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  100. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  101. package/dest/forward-compatibility/wallet_service.js +109 -0
  102. package/dest/index.d.ts +1 -1
  103. package/dest/install_legacy_contracts.d.cts +10 -0
  104. package/dest/install_legacy_contracts.d.cts.map +1 -0
  105. package/dest/legacy-jest-resolver.d.cts +3 -0
  106. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  107. package/dest/multi-node/block-production/setup.d.ts +97 -0
  108. package/dest/multi-node/block-production/setup.d.ts.map +1 -0
  109. package/dest/multi-node/block-production/setup.js +158 -0
  110. package/dest/multi-node/governance/setup.d.ts +67 -0
  111. package/dest/multi-node/governance/setup.d.ts.map +1 -0
  112. package/dest/multi-node/governance/setup.js +126 -0
  113. package/dest/multi-node/multi_node_test_context.d.ts +212 -0
  114. package/dest/multi-node/multi_node_test_context.d.ts.map +1 -0
  115. package/dest/multi-node/multi_node_test_context.js +347 -0
  116. package/dest/multi-node/slashing/inactivity_setup.d.ts +27 -0
  117. package/dest/multi-node/slashing/inactivity_setup.d.ts.map +1 -0
  118. package/dest/multi-node/slashing/inactivity_setup.js +111 -0
  119. package/dest/multi-node/slashing/setup.d.ts +167 -0
  120. package/dest/multi-node/slashing/setup.d.ts.map +1 -0
  121. package/dest/multi-node/slashing/setup.js +275 -0
  122. package/dest/p2p/p2p_network.d.ts +325 -0
  123. package/dest/p2p/p2p_network.d.ts.map +1 -0
  124. package/dest/p2p/p2p_network.js +389 -0
  125. package/dest/p2p/reqresp/utils.d.ts +19 -0
  126. package/dest/p2p/reqresp/utils.d.ts.map +1 -0
  127. package/dest/p2p/reqresp/utils.js +193 -0
  128. package/dest/p2p/shared.d.ts +72 -0
  129. package/dest/p2p/shared.d.ts.map +1 -0
  130. package/dest/p2p/shared.js +212 -0
  131. package/dest/quality_of_service/grafana_client.d.ts +41 -0
  132. package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
  133. package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
  134. package/dest/quality_of_service/prometheus_client.d.ts +38 -0
  135. package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
  136. package/dest/quality_of_service/prometheus_client.js +67 -0
  137. package/dest/shared/cross_chain_test_harness.d.ts +11 -8
  138. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  139. package/dest/shared/cross_chain_test_harness.js +45 -40
  140. package/dest/shared/gas_portal_test_harness.d.ts +9 -6
  141. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  142. package/dest/shared/gas_portal_test_harness.js +28 -16
  143. package/dest/shared/index.d.ts +3 -2
  144. package/dest/shared/index.d.ts.map +1 -1
  145. package/dest/shared/index.js +1 -0
  146. package/dest/shared/jest_setup.d.ts +1 -1
  147. package/dest/shared/jest_setup.js +41 -1
  148. package/dest/shared/mock_state_view.d.ts +86 -0
  149. package/dest/shared/mock_state_view.d.ts.map +1 -0
  150. package/dest/shared/mock_state_view.js +186 -0
  151. package/dest/shared/submit-transactions.d.ts +4 -4
  152. package/dest/shared/submit-transactions.d.ts.map +1 -1
  153. package/dest/shared/submit-transactions.js +19 -14
  154. package/dest/shared/timing_env.d.js +5 -0
  155. package/dest/shared/timing_env.js +365 -0
  156. package/dest/shared/uniswap_l1_l2.d.ts +3 -27
  157. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  158. package/dest/shared/uniswap_l1_l2.js +86 -54
  159. package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
  160. package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
  161. package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
  162. package/dest/simulators/index.d.ts +1 -1
  163. package/dest/simulators/lending_simulator.d.ts +11 -4
  164. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  165. package/dest/simulators/lending_simulator.js +33 -19
  166. package/dest/simulators/token_simulator.d.ts +1 -1
  167. package/dest/simulators/token_simulator.d.ts.map +1 -1
  168. package/dest/simulators/token_simulator.js +3 -24
  169. package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts +75 -0
  170. package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts.map +1 -0
  171. package/dest/single-node/cross-chain/cross_chain_messaging_test.js +209 -0
  172. package/dest/single-node/cross-chain/message_test_helpers.d.ts +38 -0
  173. package/dest/single-node/cross-chain/message_test_helpers.d.ts.map +1 -0
  174. package/dest/single-node/cross-chain/message_test_helpers.js +70 -0
  175. package/dest/single-node/fees/bridging_race.notest.d.ts +2 -0
  176. package/dest/single-node/fees/bridging_race.notest.d.ts.map +1 -0
  177. package/dest/{e2e_fees → single-node/fees}/bridging_race.notest.js +21 -10
  178. package/dest/single-node/fees/fees_test.d.ts +93 -0
  179. package/dest/single-node/fees/fees_test.d.ts.map +1 -0
  180. package/dest/single-node/fees/fees_test.js +274 -0
  181. package/dest/single-node/l1-reorgs/setup.d.ts +42 -0
  182. package/dest/single-node/l1-reorgs/setup.d.ts.map +1 -0
  183. package/dest/single-node/l1-reorgs/setup.js +57 -0
  184. package/dest/single-node/partial-proofs/setup.d.ts +5 -0
  185. package/dest/single-node/partial-proofs/setup.d.ts.map +1 -0
  186. package/dest/single-node/partial-proofs/setup.js +5 -0
  187. package/dest/single-node/proving/setup.d.ts +5 -0
  188. package/dest/single-node/proving/setup.d.ts.map +1 -0
  189. package/dest/single-node/proving/setup.js +5 -0
  190. package/dest/single-node/recovery/setup.d.ts +5 -0
  191. package/dest/single-node/recovery/setup.d.ts.map +1 -0
  192. package/dest/single-node/recovery/setup.js +5 -0
  193. package/dest/single-node/setup.d.ts +49 -0
  194. package/dest/single-node/setup.d.ts.map +1 -0
  195. package/dest/single-node/setup.js +56 -0
  196. package/dest/single-node/single_node_test_context.d.ts +360 -0
  197. package/dest/single-node/single_node_test_context.d.ts.map +1 -0
  198. package/dest/single-node/single_node_test_context.js +833 -0
  199. package/dest/spartan/setup_test_wallets.d.ts +18 -6
  200. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  201. package/dest/spartan/setup_test_wallets.js +169 -30
  202. package/dest/spartan/tx_metrics.d.ts +111 -0
  203. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  204. package/dest/spartan/tx_metrics.js +507 -0
  205. package/dest/spartan/utils/bot.d.ts +28 -0
  206. package/dest/spartan/utils/bot.d.ts.map +1 -0
  207. package/dest/spartan/utils/bot.js +142 -0
  208. package/dest/spartan/utils/chaos.d.ts +79 -0
  209. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  210. package/dest/spartan/utils/chaos.js +142 -0
  211. package/dest/spartan/utils/clients.d.ts +39 -0
  212. package/dest/spartan/utils/clients.d.ts.map +1 -0
  213. package/dest/spartan/utils/clients.js +90 -0
  214. package/dest/spartan/utils/config.d.ts +19 -0
  215. package/dest/spartan/utils/config.d.ts.map +1 -0
  216. package/dest/spartan/utils/config.js +23 -0
  217. package/dest/spartan/utils/health.d.ts +63 -0
  218. package/dest/spartan/utils/health.d.ts.map +1 -0
  219. package/dest/spartan/utils/health.js +202 -0
  220. package/dest/spartan/utils/helm.d.ts +15 -0
  221. package/dest/spartan/utils/helm.d.ts.map +1 -0
  222. package/dest/spartan/utils/helm.js +47 -0
  223. package/dest/spartan/utils/index.d.ts +11 -0
  224. package/dest/spartan/utils/index.d.ts.map +1 -0
  225. package/dest/spartan/utils/index.js +22 -0
  226. package/dest/spartan/utils/k8s.d.ts +128 -0
  227. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  228. package/dest/spartan/utils/k8s.js +381 -0
  229. package/dest/spartan/utils/nodes.d.ts +40 -0
  230. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  231. package/dest/spartan/utils/nodes.js +461 -0
  232. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  233. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  234. package/dest/spartan/utils/pod_logs.js +74 -0
  235. package/dest/spartan/utils/scripts.d.ts +30 -0
  236. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  237. package/dest/spartan/utils/scripts.js +81 -0
  238. package/dest/spartan/utils.d.ts +2 -218
  239. package/dest/spartan/utils.d.ts.map +1 -1
  240. package/dest/spartan/utils.js +1 -749
  241. package/dest/test-wallet/test_wallet.d.ts +105 -0
  242. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  243. package/dest/test-wallet/test_wallet.js +323 -0
  244. package/dest/test-wallet/utils.d.ts +76 -0
  245. package/dest/test-wallet/utils.d.ts.map +1 -0
  246. package/dest/test-wallet/utils.js +126 -0
  247. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  248. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  249. package/dest/test-wallet/wallet_worker_script.js +56 -0
  250. package/dest/test-wallet/worker_wallet.d.ts +53 -0
  251. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  252. package/dest/test-wallet/worker_wallet.js +155 -0
  253. package/dest/test-wallet/worker_wallet_schema.d.ts +4 -0
  254. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  255. package/dest/test-wallet/worker_wallet_schema.js +22 -0
  256. package/package.json +57 -47
  257. package/src/automine/README.md +60 -0
  258. package/src/automine/automine_test_context.ts +153 -0
  259. package/src/automine/contracts/fixtures/storage_proof.json +915 -0
  260. package/src/automine/contracts/fixtures/storage_proof_fetcher.ts +190 -0
  261. package/src/automine/contracts/fixtures/storage_proof_fixture.ts +173 -0
  262. package/src/automine/delivery/onchain_delivery_harness.ts +177 -0
  263. package/src/automine/token/blacklist_token_contract_test.ts +208 -0
  264. package/src/automine/token/token_contract_test.ts +146 -0
  265. package/src/automine/token/token_test_helpers.ts +138 -0
  266. package/src/bench/client_flows/benchmark.ts +45 -2
  267. package/src/bench/client_flows/client_flows_benchmark.ts +227 -211
  268. package/src/bench/client_flows/config.ts +9 -1
  269. package/src/bench/client_flows/data_extractor.ts +7 -28
  270. package/src/bench/utils.ts +144 -25
  271. package/src/composed/ha/ha_full_setup.ts +466 -0
  272. package/src/{e2e_multi_validator/utils.ts → composed/web3signer/multi_validator_keystore_utils.ts} +1 -1
  273. package/src/fixtures/authwit_proxy.ts +54 -0
  274. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  275. package/src/fixtures/e2e_prover_test.ts +175 -214
  276. package/src/fixtures/elu_monitor.ts +126 -0
  277. package/src/fixtures/fixtures.ts +110 -5
  278. package/src/fixtures/get_acvm_config.ts +1 -1
  279. package/src/fixtures/get_bb_config.ts +7 -6
  280. package/src/fixtures/ha_setup.ts +192 -0
  281. package/src/fixtures/index.ts +2 -0
  282. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  283. package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
  284. package/src/fixtures/setup.ts +987 -0
  285. package/src/fixtures/setup_p2p_test.ts +72 -58
  286. package/src/fixtures/timing.ts +97 -0
  287. package/src/fixtures/token_utils.ts +47 -11
  288. package/src/fixtures/utils.ts +26 -947
  289. package/src/fixtures/wait_helpers.ts +333 -0
  290. package/src/fixtures/web3signer.ts +1 -1
  291. package/src/fixtures/with_telemetry_utils.ts +2 -2
  292. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  293. package/src/forward-compatibility/wallet_service.ts +106 -0
  294. package/src/guides/up_quick_start.sh +8 -5
  295. package/src/infra/README.md +12 -0
  296. package/src/install_legacy_contracts.cjs +75 -0
  297. package/src/legacy-jest-resolver.cjs +112 -0
  298. package/src/multi-node/README.md +95 -0
  299. package/src/multi-node/block-production/setup.ts +272 -0
  300. package/src/multi-node/governance/setup.ts +172 -0
  301. package/src/multi-node/multi_node_test_context.ts +447 -0
  302. package/src/multi-node/slashing/inactivity_setup.ts +139 -0
  303. package/src/multi-node/slashing/setup.ts +433 -0
  304. package/src/p2p/README.md +78 -0
  305. package/src/p2p/p2p_network.ts +542 -0
  306. package/src/p2p/reqresp/utils.ts +263 -0
  307. package/src/p2p/shared.ts +329 -0
  308. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
  309. package/src/quality_of_service/prometheus_client.ts +113 -0
  310. package/src/shared/cross_chain_test_harness.ts +51 -43
  311. package/src/shared/gas_portal_test_harness.ts +36 -18
  312. package/src/shared/index.ts +2 -1
  313. package/src/shared/jest_setup.ts +51 -1
  314. package/src/shared/mock_state_view.ts +188 -0
  315. package/src/shared/submit-transactions.ts +22 -19
  316. package/src/shared/timing_env.d.mts +39 -0
  317. package/src/shared/timing_env.mjs +363 -0
  318. package/src/shared/uniswap_l1_l2.ts +136 -115
  319. package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
  320. package/src/simulators/lending_simulator.ts +40 -20
  321. package/src/simulators/token_simulator.ts +6 -30
  322. package/src/single-node/README.md +60 -0
  323. package/src/single-node/cross-chain/cross_chain_messaging_test.ts +302 -0
  324. package/src/single-node/cross-chain/message_test_helpers.ts +125 -0
  325. package/src/{e2e_fees → single-node/fees}/bridging_race.notest.ts +23 -15
  326. package/src/single-node/fees/fees_test.ts +368 -0
  327. package/src/single-node/l1-reorgs/setup.ts +93 -0
  328. package/src/single-node/partial-proofs/setup.ts +8 -0
  329. package/src/single-node/proving/setup.ts +15 -0
  330. package/src/single-node/recovery/setup.ts +8 -0
  331. package/src/single-node/setup.ts +63 -0
  332. package/src/single-node/single_node_test_context.ts +1041 -0
  333. package/src/spartan/DEVELOP.md +7 -0
  334. package/src/spartan/setup_test_wallets.ts +243 -32
  335. package/src/spartan/tx_metrics.ts +460 -0
  336. package/src/spartan/utils/bot.ts +188 -0
  337. package/src/spartan/utils/chaos.ts +253 -0
  338. package/src/spartan/utils/clients.ts +100 -0
  339. package/src/spartan/utils/config.ts +29 -0
  340. package/src/spartan/utils/health.ts +255 -0
  341. package/src/spartan/utils/helm.ts +84 -0
  342. package/src/spartan/utils/index.ts +71 -0
  343. package/src/spartan/utils/k8s.ts +535 -0
  344. package/src/spartan/utils/nodes.ts +543 -0
  345. package/src/spartan/utils/pod_logs.ts +99 -0
  346. package/src/spartan/utils/scripts.ts +99 -0
  347. package/src/spartan/utils.ts +1 -942
  348. package/src/test-wallet/test_wallet.ts +429 -0
  349. package/src/test-wallet/utils.ts +205 -0
  350. package/src/test-wallet/wallet_worker_script.ts +66 -0
  351. package/src/test-wallet/worker_wallet.ts +214 -0
  352. package/src/test-wallet/worker_wallet_schema.ts +14 -0
  353. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +0 -54
  354. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +0 -1
  355. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +0 -185
  356. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +0 -41
  357. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +0 -1
  358. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +0 -107
  359. package/dest/e2e_deploy_contract/deploy_test.d.ts +0 -36
  360. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +0 -1
  361. package/dest/e2e_deploy_contract/deploy_test.js +0 -45
  362. package/dest/e2e_epochs/epochs_test.d.ts +0 -92
  363. package/dest/e2e_epochs/epochs_test.d.ts.map +0 -1
  364. package/dest/e2e_epochs/epochs_test.js +0 -336
  365. package/dest/e2e_fees/bridging_race.notest.d.ts +0 -2
  366. package/dest/e2e_fees/bridging_race.notest.d.ts.map +0 -1
  367. package/dest/e2e_fees/fees_test.d.ts +0 -84
  368. package/dest/e2e_fees/fees_test.d.ts.map +0 -1
  369. package/dest/e2e_fees/fees_test.js +0 -260
  370. package/dest/e2e_l1_publisher/write_json.d.ts +0 -10
  371. package/dest/e2e_l1_publisher/write_json.d.ts.map +0 -1
  372. package/dest/e2e_l1_publisher/write_json.js +0 -57
  373. package/dest/e2e_multi_validator/utils.d.ts +0 -12
  374. package/dest/e2e_multi_validator/utils.d.ts.map +0 -1
  375. package/dest/e2e_nested_contract/nested_contract_test.d.ts +0 -29
  376. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +0 -1
  377. package/dest/e2e_nested_contract/nested_contract_test.js +0 -63
  378. package/dest/e2e_p2p/inactivity_slash_test.d.ts +0 -31
  379. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +0 -1
  380. package/dest/e2e_p2p/inactivity_slash_test.js +0 -135
  381. package/dest/e2e_p2p/p2p_network.d.ts +0 -108
  382. package/dest/e2e_p2p/p2p_network.d.ts.map +0 -1
  383. package/dest/e2e_p2p/p2p_network.js +0 -318
  384. package/dest/e2e_p2p/shared.d.ts +0 -46
  385. package/dest/e2e_p2p/shared.d.ts.map +0 -1
  386. package/dest/e2e_p2p/shared.js +0 -183
  387. package/dest/e2e_token_contract/token_contract_test.d.ts +0 -35
  388. package/dest/e2e_token_contract/token_contract_test.d.ts.map +0 -1
  389. package/dest/e2e_token_contract/token_contract_test.js +0 -126
  390. package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
  391. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  392. package/dest/fixtures/setup_l1_contracts.js +0 -17
  393. package/dest/fixtures/snapshot_manager.d.ts +0 -95
  394. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  395. package/dest/fixtures/snapshot_manager.js +0 -505
  396. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  397. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  398. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +0 -256
  399. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +0 -178
  400. package/src/e2e_deploy_contract/deploy_test.ts +0 -78
  401. package/src/e2e_epochs/epochs_test.ts +0 -437
  402. package/src/e2e_fees/fees_test.ts +0 -378
  403. package/src/e2e_l1_publisher/write_json.ts +0 -76
  404. package/src/e2e_nested_contract/nested_contract_test.ts +0 -95
  405. package/src/e2e_p2p/inactivity_slash_test.ts +0 -178
  406. package/src/e2e_p2p/p2p_network.ts +0 -472
  407. package/src/e2e_p2p/shared.ts +0 -282
  408. package/src/e2e_token_contract/token_contract_test.ts +0 -167
  409. package/src/fixtures/setup_l1_contracts.ts +0 -26
  410. package/src/fixtures/snapshot_manager.ts +0 -665
@@ -1,135 +0,0 @@
1
- import fs from 'fs';
2
- import 'jest-extended';
3
- import os from 'os';
4
- import path from 'path';
5
- import { createNodes } from '../fixtures/setup_p2p_test.js';
6
- import { P2PNetworkTest } from './p2p_network.js';
7
- const NUM_NODES = 6;
8
- const NUM_VALIDATORS = NUM_NODES;
9
- const COMMITTEE_SIZE = NUM_VALIDATORS;
10
- const SLASHING_QUORUM = 3;
11
- const EPOCH_DURATION = 2;
12
- const SLASHING_ROUND_SIZE_IN_EPOCHS = 2;
13
- const BOOT_NODE_UDP_PORT = 4500;
14
- const ETHEREUM_SLOT_DURATION = process.env.CI ? 8 : 4;
15
- const AZTEC_SLOT_DURATION = ETHEREUM_SLOT_DURATION * 2;
16
- const SLASHING_UNIT = BigInt(1e18);
17
- const SLASHING_AMOUNT = SLASHING_UNIT * 3n;
18
- // How many epochs it may take to set everything up, so we dont slash during this period
19
- const SETUP_EPOCH_DURATION = 5;
20
- export class P2PInactivityTest {
21
- test;
22
- nodes;
23
- activeNodes;
24
- inactiveNodes;
25
- rollup;
26
- offlineValidators;
27
- dataDir;
28
- inactiveNodeCount;
29
- keepInitialNode;
30
- constructor(test, opts){
31
- this.test = test;
32
- this.dataDir = fs.mkdtempSync(path.join(os.tmpdir(), test.testName));
33
- this.inactiveNodeCount = opts.inactiveNodeCount;
34
- this.keepInitialNode = opts.keepInitialNode ?? false;
35
- }
36
- static async create(testName, opts) {
37
- const test = await P2PNetworkTest.create({
38
- testName,
39
- numberOfNodes: 0,
40
- numberOfValidators: NUM_VALIDATORS,
41
- basePort: BOOT_NODE_UDP_PORT,
42
- startProverNode: true,
43
- initialConfig: {
44
- proverNodeConfig: {
45
- proverNodeEpochProvingDelayMs: AZTEC_SLOT_DURATION * 1000
46
- },
47
- aztecTargetCommitteeSize: COMMITTEE_SIZE,
48
- aztecSlotDuration: AZTEC_SLOT_DURATION,
49
- ethereumSlotDuration: ETHEREUM_SLOT_DURATION,
50
- aztecProofSubmissionEpochs: 1024,
51
- listenAddress: '127.0.0.1',
52
- minTxsPerBlock: 0,
53
- aztecEpochDuration: EPOCH_DURATION,
54
- validatorReexecute: false,
55
- sentinelEnabled: true,
56
- slashingQuorum: SLASHING_QUORUM,
57
- slashingRoundSizeInEpochs: SLASHING_ROUND_SIZE_IN_EPOCHS,
58
- slashInactivityTargetPercentage: 0.8,
59
- slashGracePeriodL2Slots: SETUP_EPOCH_DURATION * EPOCH_DURATION,
60
- slashAmountSmall: SLASHING_UNIT,
61
- slashAmountMedium: SLASHING_UNIT * 2n,
62
- slashAmountLarge: SLASHING_UNIT * 3n,
63
- ...opts
64
- }
65
- });
66
- return new P2PInactivityTest(test, opts);
67
- }
68
- async setup() {
69
- await this.test.applyBaseSnapshots();
70
- await this.test.setup();
71
- // Set slashing penalties for inactivity
72
- const { rollup } = await this.test.getContracts();
73
- const [activationThreshold, ejectionThreshold, localEjectionThreshold] = await Promise.all([
74
- rollup.getActivationThreshold(),
75
- rollup.getEjectionThreshold(),
76
- rollup.getLocalEjectionThreshold()
77
- ]);
78
- const biggestEjection = ejectionThreshold > localEjectionThreshold ? ejectionThreshold : localEjectionThreshold;
79
- expect(activationThreshold - SLASHING_AMOUNT).toBeLessThan(biggestEjection);
80
- this.test.ctx.aztecNodeConfig.slashInactivityPenalty = SLASHING_AMOUNT;
81
- this.rollup = rollup;
82
- if (!this.keepInitialNode) {
83
- await this.test.ctx.aztecNode.stop();
84
- }
85
- // Create all active nodes
86
- this.activeNodes = await createNodes(this.test.ctx.aztecNodeConfig, this.test.ctx.dateProvider, this.test.bootstrapNodeEnr, NUM_NODES - this.inactiveNodeCount - Number(this.keepInitialNode), BOOT_NODE_UDP_PORT, this.test.prefilledPublicData, this.dataDir, undefined, Number(this.keepInitialNode));
87
- // And the ones with an initially disabled sequencer
88
- const inactiveConfig = {
89
- ...this.test.ctx.aztecNodeConfig,
90
- dontStartSequencer: true
91
- };
92
- this.inactiveNodes = await createNodes(inactiveConfig, this.test.ctx.dateProvider, this.test.bootstrapNodeEnr, this.inactiveNodeCount, BOOT_NODE_UDP_PORT, this.test.prefilledPublicData, this.dataDir, undefined, NUM_NODES - this.inactiveNodeCount);
93
- this.nodes = [
94
- ...this.keepInitialNode ? [
95
- this.test.ctx.aztecNode
96
- ] : [],
97
- ...this.activeNodes,
98
- ...this.inactiveNodes
99
- ];
100
- if (this.nodes.length !== NUM_NODES) {
101
- throw new Error(`Expected ${NUM_NODES} nodes but got ${this.nodes.length}`);
102
- }
103
- this.offlineValidators = this.test.validators.slice(this.test.validators.length - this.inactiveNodeCount).map((a)=>a.attester);
104
- this.test.logger.warn(`Setup complete. Offline validators are ${this.offlineValidators.join(', ')}.`, {
105
- validators: this.test.validators,
106
- offlineValidators: this.offlineValidators
107
- });
108
- // Wait for P2P mesh to be fully formed before starting slashing period
109
- // This prevents race conditions where validators propose blocks before the network is ready
110
- await this.test.waitForP2PMeshConnectivity(this.nodes, NUM_NODES);
111
- this.test.logger.warn(`Advancing to epoch ${SETUP_EPOCH_DURATION + 1} to start slashing`);
112
- await this.test.ctx.cheatCodes.rollup.advanceToEpoch(SETUP_EPOCH_DURATION + 1);
113
- return this;
114
- }
115
- async teardown() {
116
- await this.test.stopNodes(this.nodes);
117
- await this.test.teardown();
118
- for(let i = 0; i < NUM_NODES; i++){
119
- fs.rmSync(`${this.dataDir}-${i}`, {
120
- recursive: true,
121
- force: true,
122
- maxRetries: 3
123
- });
124
- }
125
- }
126
- get ctx() {
127
- return this.test.ctx;
128
- }
129
- get logger() {
130
- return this.test.logger;
131
- }
132
- get slashingAmount() {
133
- return SLASHING_AMOUNT;
134
- }
135
- }
@@ -1,108 +0,0 @@
1
- import type { InitialAccountData } from '@aztec/accounts/testing';
2
- import type { AztecNodeService } from '@aztec/aztec-node';
3
- import { AztecAddress } from '@aztec/aztec.js/addresses';
4
- import { type EmpireSlashingProposerContract, type Operator, RollupContract, type TallySlashingProposerContract, type ViemClient } from '@aztec/ethereum';
5
- import { ChainMonitor } from '@aztec/ethereum/test';
6
- import { type Logger } from '@aztec/foundation/log';
7
- import { SlasherAbi } from '@aztec/l1-artifacts';
8
- import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
9
- import type { BootstrapNode } from '@aztec/p2p/bootstrap';
10
- import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
11
- import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
12
- import type { TestWallet } from '@aztec/test-wallet/server';
13
- import { type GetContractReturnType } from 'viem';
14
- import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
15
- import { type SetupOptions } from '../fixtures/utils.js';
16
- export declare const WAIT_FOR_TX_TIMEOUT: number;
17
- export declare const SHORTENED_BLOCK_TIME_CONFIG_NO_PRUNES: {
18
- aztecSlotDuration: number;
19
- ethereumSlotDuration: number;
20
- aztecProofSubmissionWindow: number;
21
- };
22
- export declare class P2PNetworkTest {
23
- readonly testName: string;
24
- bootstrapNodeEnr: string;
25
- bootNodePort: number;
26
- numberOfValidators: number;
27
- numberOfNodes: number;
28
- private metricsPort?;
29
- private snapshotManager;
30
- baseAccountPrivateKey: `0x${string}`;
31
- baseAccount: {
32
- address: import("viem").Address;
33
- nonceManager?: import("viem").NonceManager | undefined;
34
- sign: (parameters: {
35
- hash: import("viem").Hash;
36
- }) => Promise<import("viem").Hex>;
37
- signAuthorization: (parameters: import("viem").AuthorizationRequest) => Promise<import("viem/accounts").SignAuthorizationReturnType>;
38
- signMessage: ({ message }: {
39
- message: import("viem").SignableMessage;
40
- }) => Promise<import("viem").Hex>;
41
- signTransaction: <serializer extends import("viem").SerializeTransactionFn<import("viem").TransactionSerializable> = import("viem").SerializeTransactionFn<import("viem").TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
42
- serializer?: serializer | undefined;
43
- } | undefined) => Promise<import("viem").Hex>;
44
- signTypedData: <const typedData extends import("viem").TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
45
- publicKey: import("viem").Hex;
46
- source: "privateKey";
47
- type: "local";
48
- };
49
- logger: Logger;
50
- monitor: ChainMonitor;
51
- ctx: SubsystemsContext;
52
- attesterPrivateKeys: `0x${string}`[];
53
- attesterPublicKeys: string[];
54
- peerIdPrivateKeys: string[];
55
- validators: Operator[];
56
- deployedAccounts: InitialAccountData[];
57
- prefilledPublicData: PublicDataTreeLeaf[];
58
- wallet?: TestWallet;
59
- defaultAccountAddress?: AztecAddress;
60
- spamContract?: SpamContract;
61
- bootstrapNode?: BootstrapNode;
62
- constructor(testName: string, bootstrapNodeEnr: string, bootNodePort: number, numberOfValidators: number, initialValidatorConfig: SetupOptions, numberOfNodes?: number, metricsPort?: number | undefined, startProverNode?: boolean, mockZkPassportVerifier?: boolean);
63
- static create({ testName, numberOfNodes, numberOfValidators, basePort, metricsPort, initialConfig, startProverNode, mockZkPassportVerifier, }: {
64
- testName: string;
65
- numberOfNodes: number;
66
- numberOfValidators: number;
67
- basePort?: number;
68
- metricsPort?: number;
69
- initialConfig?: SetupOptions;
70
- startProverNode?: boolean;
71
- mockZkPassportVerifier?: boolean;
72
- }): Promise<P2PNetworkTest>;
73
- get fundedAccount(): InitialAccountData;
74
- addBootstrapNode(): Promise<void>;
75
- getValidators(): {
76
- validators: Operator[];
77
- };
78
- applyBaseSnapshots(): Promise<void>;
79
- setupAccount(): Promise<void>;
80
- deploySpamContract(): Promise<void>;
81
- removeInitialNode(): Promise<void>;
82
- sendDummyTx(): Promise<{
83
- receipt: import("viem").TransactionReceipt;
84
- state: import("@aztec/ethereum").L1TxState;
85
- }>;
86
- private _sendDummyTx;
87
- setup(): Promise<void>;
88
- stopNodes(nodes: AztecNodeService[]): Promise<void>;
89
- /**
90
- * Wait for P2P mesh to be fully formed across all nodes.
91
- * This ensures that all nodes are connected to each other before proceeding,
92
- * preventing race conditions where validators propose blocks before the network is ready.
93
- *
94
- * @param nodes - Array of nodes to check for P2P connectivity
95
- * @param expectedNodeCount - Expected number of nodes in the network (defaults to nodes.length)
96
- * @param timeoutSeconds - Maximum time to wait for connections (default: 30 seconds)
97
- * @param checkIntervalSeconds - How often to check connectivity (default: 0.1 seconds)
98
- */
99
- waitForP2PMeshConnectivity(nodes: AztecNodeService[], expectedNodeCount?: number, timeoutSeconds?: number, checkIntervalSeconds?: number): Promise<void>;
100
- teardown(): Promise<void>;
101
- getContracts(): Promise<{
102
- rollup: RollupContract;
103
- slasherContract: GetContractReturnType<typeof SlasherAbi, ViemClient>;
104
- slashingProposer: EmpireSlashingProposerContract | TallySlashingProposerContract | undefined;
105
- slashFactory: SlashFactoryContract;
106
- }>;
107
- }
108
- //# sourceMappingURL=p2p_network.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAc,MAAM,2BAA2B,CAAC;AAErE,OAAO,EACL,KAAK,8BAA8B,EAInC,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,6BAA6B,EAClC,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAa,UAAU,EAAgB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,aAA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AA6B,GAAG,SAAS,CAAC;QAC7F,YAAY,EAAE,oBAAoB,CAAC;KACpC,CAAC;CA0BH"}
@@ -1,318 +0,0 @@
1
- import { EthAddress } from '@aztec/aztec.js/addresses';
2
- import { Fr } from '@aztec/aztec.js/fields';
3
- import { GSEContract, MultiAdderArtifact, RollupContract, createL1TxUtilsFromViemWallet, deployL1Contract, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
4
- import { ChainMonitor } from '@aztec/ethereum/test';
5
- import { SecretValue } from '@aztec/foundation/config';
6
- import { createLogger } from '@aztec/foundation/log';
7
- import { retryUntil } from '@aztec/foundation/retry';
8
- import { RollupAbi, SlasherAbi, TestERC20Abi } from '@aztec/l1-artifacts';
9
- import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
10
- import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
11
- import { tryStop } from '@aztec/stdlib/interfaces/server';
12
- import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
13
- import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
14
- import { getGenesisValues } from '@aztec/world-state/testing';
15
- import getPort from 'get-port';
16
- import { getAddress, getContract } from 'viem';
17
- import { privateKeyToAccount } from 'viem/accounts';
18
- import { ATTESTER_PRIVATE_KEYS_START_INDEX, createValidatorConfig, generatePrivateKeys } from '../fixtures/setup_p2p_test.js';
19
- import { createSnapshotManager, deployAccounts } from '../fixtures/snapshot_manager.js';
20
- import { getPrivateKeyFromIndex, getSponsoredFPCAddress } from '../fixtures/utils.js';
21
- import { getEndToEndTestTelemetryClient } from '../fixtures/with_telemetry_utils.js';
22
- // Use a fixed bootstrap node private key so that we can re-use the same snapshot and the nodes can find each other
23
- const BOOTSTRAP_NODE_PRIVATE_KEY = '080212208f988fc0899e4a73a5aee4d271a5f20670603a756ad8d84f2c94263a6427c591';
24
- const l1ContractsConfig = getL1ContractsConfigEnvVars();
25
- export const WAIT_FOR_TX_TIMEOUT = l1ContractsConfig.aztecSlotDuration * 3;
26
- export const SHORTENED_BLOCK_TIME_CONFIG_NO_PRUNES = {
27
- aztecSlotDuration: 12,
28
- ethereumSlotDuration: 4,
29
- aztecProofSubmissionWindow: 640
30
- };
31
- export class P2PNetworkTest {
32
- testName;
33
- bootstrapNodeEnr;
34
- bootNodePort;
35
- numberOfValidators;
36
- numberOfNodes;
37
- metricsPort;
38
- snapshotManager;
39
- baseAccountPrivateKey;
40
- baseAccount;
41
- logger;
42
- monitor;
43
- ctx;
44
- attesterPrivateKeys;
45
- attesterPublicKeys;
46
- peerIdPrivateKeys;
47
- validators;
48
- deployedAccounts;
49
- prefilledPublicData;
50
- // The re-execution test needs a wallet and a spam contract
51
- wallet;
52
- defaultAccountAddress;
53
- spamContract;
54
- bootstrapNode;
55
- constructor(testName, bootstrapNodeEnr, bootNodePort, numberOfValidators, initialValidatorConfig, numberOfNodes = 0, // If set enable metrics collection
56
- metricsPort, startProverNode, mockZkPassportVerifier){
57
- this.testName = testName;
58
- this.bootstrapNodeEnr = bootstrapNodeEnr;
59
- this.bootNodePort = bootNodePort;
60
- this.numberOfValidators = numberOfValidators;
61
- this.numberOfNodes = numberOfNodes;
62
- this.metricsPort = metricsPort;
63
- this.attesterPrivateKeys = [];
64
- this.attesterPublicKeys = [];
65
- this.peerIdPrivateKeys = [];
66
- this.validators = [];
67
- this.deployedAccounts = [];
68
- this.prefilledPublicData = [];
69
- this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
70
- // Set up the base account and node private keys for the initial network deployment
71
- this.baseAccountPrivateKey = `0x${getPrivateKeyFromIndex(1).toString('hex')}`;
72
- this.baseAccount = privateKeyToAccount(this.baseAccountPrivateKey);
73
- this.attesterPrivateKeys = generatePrivateKeys(ATTESTER_PRIVATE_KEYS_START_INDEX + numberOfNodes, numberOfValidators);
74
- this.attesterPublicKeys = this.attesterPrivateKeys.map((privateKey)=>privateKeyToAccount(privateKey).address);
75
- const zkPassportParams = ZkPassportProofParams.random();
76
- this.snapshotManager = createSnapshotManager(`e2e_p2p_network/${testName}`, process.env.E2E_DATA_PATH, {
77
- ...initialValidatorConfig,
78
- ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
79
- aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
80
- aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
81
- aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
82
- slashingRoundSizeInEpochs: initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
83
- slasherFlavor: initialValidatorConfig.slasherFlavor ?? 'tally',
84
- aztecTargetCommitteeSize: numberOfValidators,
85
- salt: 420,
86
- metricsPort: metricsPort,
87
- numberOfInitialFundedAccounts: 2,
88
- startProverNode
89
- }, {
90
- ...initialValidatorConfig,
91
- aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
92
- slashingRoundSizeInEpochs: initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
93
- slasherFlavor: initialValidatorConfig.slasherFlavor ?? 'tally',
94
- ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration,
95
- aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration,
96
- aztecProofSubmissionEpochs: initialValidatorConfig.aztecProofSubmissionEpochs ?? l1ContractsConfig.aztecProofSubmissionEpochs,
97
- aztecTargetCommitteeSize: numberOfValidators,
98
- initialValidators: [],
99
- zkPassportArgs: {
100
- mockZkPassportVerifier,
101
- zkPassportDomain: zkPassportParams.domain,
102
- zkPassportScope: zkPassportParams.scope
103
- }
104
- });
105
- }
106
- static async create({ testName, numberOfNodes, numberOfValidators, basePort, metricsPort, initialConfig, startProverNode, mockZkPassportVerifier }) {
107
- const port = basePort || await getPort();
108
- const bootstrapNodeENR = await getBootstrapNodeEnr(BOOTSTRAP_NODE_PRIVATE_KEY, port);
109
- const bootstrapNodeEnr = bootstrapNodeENR.encodeTxt();
110
- const initialValidatorConfig = await createValidatorConfig(initialConfig ?? {}, bootstrapNodeEnr);
111
- return new P2PNetworkTest(testName, bootstrapNodeEnr, port, numberOfValidators, initialValidatorConfig, numberOfNodes, metricsPort, startProverNode, mockZkPassportVerifier);
112
- }
113
- get fundedAccount() {
114
- if (!this.deployedAccounts[0]) {
115
- throw new Error('Call snapshot t.setupAccount to create a funded account.');
116
- }
117
- return this.deployedAccounts[0];
118
- }
119
- async addBootstrapNode() {
120
- await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig })=>{
121
- const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
122
- this.bootstrapNode = await createBootstrapNodeFromPrivateKey(BOOTSTRAP_NODE_PRIVATE_KEY, this.bootNodePort, telemetry, aztecNodeConfig);
123
- // Overwrite enr with updated info
124
- this.bootstrapNodeEnr = this.bootstrapNode.getENR().encodeTxt();
125
- });
126
- }
127
- getValidators() {
128
- const validators = [];
129
- for(let i = 0; i < this.numberOfValidators; i++){
130
- const keyIndex = i;
131
- const attester = privateKeyToAccount(this.attesterPrivateKeys[keyIndex]);
132
- validators.push({
133
- attester: EthAddress.fromString(attester.address),
134
- withdrawer: EthAddress.fromString(attester.address),
135
- bn254SecretKey: new SecretValue(Fr.random().toBigInt())
136
- });
137
- this.logger.info(`Adding attester ${attester.address} as validator`);
138
- }
139
- return {
140
- validators
141
- };
142
- }
143
- async applyBaseSnapshots() {
144
- await this.addBootstrapNode();
145
- await this.snapshotManager.snapshot('add-validators', async ({ deployL1ContractsValues, cheatCodes })=>{
146
- const rollup = getContract({
147
- address: deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(),
148
- abi: RollupAbi,
149
- client: deployL1ContractsValues.l1Client
150
- });
151
- this.logger.info(`Adding ${this.numberOfValidators} validators`);
152
- const stakingAsset = getContract({
153
- address: deployL1ContractsValues.l1ContractAddresses.stakingAssetAddress.toString(),
154
- abi: TestERC20Abi,
155
- client: deployL1ContractsValues.l1Client
156
- });
157
- const { address: multiAdderAddress } = await deployL1Contract(deployL1ContractsValues.l1Client, MultiAdderArtifact.contractAbi, MultiAdderArtifact.contractBytecode, [
158
- rollup.address,
159
- deployL1ContractsValues.l1Client.account.address
160
- ]);
161
- const multiAdder = getContract({
162
- address: multiAdderAddress.toString(),
163
- abi: MultiAdderArtifact.contractAbi,
164
- client: deployL1ContractsValues.l1Client
165
- });
166
- const stakeNeeded = await rollup.read.getActivationThreshold() * BigInt(this.numberOfValidators);
167
- await Promise.all([
168
- await stakingAsset.write.mint([
169
- multiAdder.address,
170
- stakeNeeded
171
- ], {})
172
- ].map((txHash)=>deployL1ContractsValues.l1Client.waitForTransactionReceipt({
173
- hash: txHash
174
- })));
175
- const { validators } = this.getValidators();
176
- this.validators = validators;
177
- const gseAddress = deployL1ContractsValues.l1ContractAddresses.gseAddress;
178
- if (!gseAddress) {
179
- throw new Error('GSE contract not deployed');
180
- }
181
- const gseContract = new GSEContract(deployL1ContractsValues.l1Client, gseAddress.toString());
182
- const makeValidatorTuples = async (validator)=>{
183
- const registrationTuple = await gseContract.makeRegistrationTuple(validator.bn254SecretKey.getValue());
184
- return {
185
- attester: validator.attester.toString(),
186
- withdrawer: validator.withdrawer.toString(),
187
- ...registrationTuple
188
- };
189
- };
190
- const validatorTuples = await Promise.all(validators.map(makeValidatorTuples));
191
- await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
192
- hash: await multiAdder.write.addValidators([
193
- validatorTuples
194
- ])
195
- });
196
- await cheatCodes.rollup.advanceToEpoch(await cheatCodes.rollup.getEpoch() + await rollup.read.getLagInEpochs() + 1n);
197
- // Send and await a tx to make sure we mine a block for the warp to correctly progress.
198
- await this._sendDummyTx(deployL1ContractsValues.l1Client);
199
- });
200
- }
201
- async setupAccount() {
202
- await this.snapshotManager.snapshot('setup-account', deployAccounts(1, this.logger), ({ deployedAccounts }, { wallet })=>{
203
- this.deployedAccounts = deployedAccounts;
204
- [{ address: this.defaultAccountAddress }] = deployedAccounts;
205
- this.wallet = wallet;
206
- return Promise.resolve();
207
- });
208
- }
209
- async deploySpamContract() {
210
- await this.snapshotManager.snapshot('add-spam-contract', async ()=>{
211
- if (!this.wallet) {
212
- throw new Error('Call snapshot t.setupAccount before deploying account contract');
213
- }
214
- const spamContract = await SpamContract.deploy(this.wallet).send({
215
- from: this.defaultAccountAddress
216
- }).deployed();
217
- return {
218
- contractAddress: spamContract.address
219
- };
220
- }, async ({ contractAddress })=>{
221
- if (!this.wallet) {
222
- throw new Error('Call snapshot t.setupAccount before deploying account contract');
223
- }
224
- this.spamContract = await SpamContract.at(contractAddress, this.wallet);
225
- });
226
- }
227
- async removeInitialNode() {
228
- await this.snapshotManager.snapshot('remove-initial-validator', async ({ deployL1ContractsValues, aztecNode, dateProvider })=>{
229
- // Send and await a tx to make sure we mine a block for the warp to correctly progress.
230
- const { receipt } = await this._sendDummyTx(deployL1ContractsValues.l1Client);
231
- const block = await deployL1ContractsValues.l1Client.getBlock({
232
- blockNumber: receipt.blockNumber
233
- });
234
- dateProvider.setTime(Number(block.timestamp) * 1000);
235
- await aztecNode.stop();
236
- });
237
- }
238
- async sendDummyTx() {
239
- return await this._sendDummyTx(this.ctx.deployL1ContractsValues.l1Client);
240
- }
241
- async _sendDummyTx(l1Client) {
242
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client);
243
- return await l1TxUtils.sendAndMonitorTransaction({
244
- to: l1Client.account.address,
245
- value: 1n
246
- });
247
- }
248
- async setup() {
249
- this.ctx = await this.snapshotManager.setup();
250
- const sponsoredFPCAddress = await getSponsoredFPCAddress();
251
- const initialFundedAccounts = [
252
- ...this.ctx.initialFundedAccounts.map((a)=>a.address),
253
- sponsoredFPCAddress
254
- ];
255
- const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
256
- this.prefilledPublicData = prefilledPublicData;
257
- const rollupContract = RollupContract.getFromL1ContractsValues(this.ctx.deployL1ContractsValues);
258
- this.monitor = new ChainMonitor(rollupContract, this.ctx.dateProvider).start();
259
- this.monitor.on('l1-block', ({ timestamp })=>this.ctx.dateProvider.setTime(Number(timestamp) * 1000));
260
- }
261
- async stopNodes(nodes) {
262
- this.logger.info('Stopping nodes');
263
- if (!nodes || !nodes.length) {
264
- this.logger.info('No nodes to stop');
265
- return;
266
- }
267
- await Promise.all(nodes.map((node)=>node.stop()));
268
- this.logger.info('Nodes stopped');
269
- }
270
- /**
271
- * Wait for P2P mesh to be fully formed across all nodes.
272
- * This ensures that all nodes are connected to each other before proceeding,
273
- * preventing race conditions where validators propose blocks before the network is ready.
274
- *
275
- * @param nodes - Array of nodes to check for P2P connectivity
276
- * @param expectedNodeCount - Expected number of nodes in the network (defaults to nodes.length)
277
- * @param timeoutSeconds - Maximum time to wait for connections (default: 30 seconds)
278
- * @param checkIntervalSeconds - How often to check connectivity (default: 0.1 seconds)
279
- */ async waitForP2PMeshConnectivity(nodes, expectedNodeCount, timeoutSeconds = 30, checkIntervalSeconds = 0.1) {
280
- const nodeCount = expectedNodeCount ?? nodes.length;
281
- const minPeerCount = nodeCount - 1;
282
- this.logger.warn(`Waiting for all ${nodeCount} nodes to connect to P2P mesh (at least ${minPeerCount} peers each)...`);
283
- await Promise.all(nodes.map(async (node, index)=>{
284
- const p2p = node.getP2P();
285
- await retryUntil(async ()=>{
286
- const peers = await p2p.getPeers();
287
- // Each node should be connected to at least N-1 other nodes
288
- return peers.length >= minPeerCount ? true : undefined;
289
- }, `Node ${index} to connect to at least ${minPeerCount} peers`, timeoutSeconds, checkIntervalSeconds);
290
- }));
291
- this.logger.warn('All nodes connected to P2P mesh');
292
- }
293
- async teardown() {
294
- await this.monitor.stop();
295
- await tryStop(this.bootstrapNode, this.logger);
296
- await this.snapshotManager.teardown();
297
- }
298
- async getContracts() {
299
- if (!this.ctx.deployL1ContractsValues) {
300
- throw new Error('DeployL1ContractsValues not set');
301
- }
302
- const rollup = new RollupContract(this.ctx.deployL1ContractsValues.l1Client, this.ctx.deployL1ContractsValues.l1ContractAddresses.rollupAddress);
303
- const slasherContract = getContract({
304
- address: getAddress(await rollup.getSlasherAddress()),
305
- abi: SlasherAbi,
306
- client: this.ctx.deployL1ContractsValues.l1Client
307
- });
308
- // Get the actual slashing proposer from rollup (which handles both empire and tally)
309
- const slashingProposer = await rollup.getSlashingProposer();
310
- const slashFactory = new SlashFactoryContract(this.ctx.deployL1ContractsValues.l1Client, getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress.toString()));
311
- return {
312
- rollup,
313
- slasherContract,
314
- slashingProposer,
315
- slashFactory
316
- };
317
- }
318
- }
@@ -1,46 +0,0 @@
1
- import type { InitialAccountData } from '@aztec/accounts/testing';
2
- import type { AztecNodeService } from '@aztec/aztec-node';
3
- import { AztecAddress } from '@aztec/aztec.js/addresses';
4
- import { type SentTx } from '@aztec/aztec.js/contracts';
5
- import type { Logger } from '@aztec/aztec.js/log';
6
- import { Tx } from '@aztec/aztec.js/tx';
7
- import type { RollupCheatCodes } from '@aztec/aztec/testing';
8
- import type { EmpireSlashingProposerContract, RollupContract, TallySlashingProposerContract } from '@aztec/ethereum';
9
- import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
10
- import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
11
- import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
12
- export declare const submitComplexTxsTo: (logger: Logger, from: AztecAddress, spamContract: SpamContract, numTxs: number, opts?: {
13
- callPublic?: boolean;
14
- }) => Promise<SentTx[]>;
15
- export declare const submitTransactions: (logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData) => Promise<SentTx[]>;
16
- export declare function prepareTransactions(logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData): Promise<Tx[]>;
17
- export declare function awaitProposalExecution(slashingProposer: EmpireSlashingProposerContract | TallySlashingProposerContract, timeoutSeconds: number, logger: Logger): Promise<bigint>;
18
- export declare function awaitCommitteeExists({ rollup, logger, }: {
19
- rollup: RollupContract;
20
- logger: Logger;
21
- }): Promise<readonly `0x${string}`[]>;
22
- export declare function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount, timeoutSeconds, }: {
23
- nodeAdmin: AztecNodeAdmin;
24
- logger: Logger;
25
- slashingRoundSize: number;
26
- epochDuration: number;
27
- waitUntilOffenseCount?: number;
28
- timeoutSeconds?: number;
29
- }): Promise<import("@aztec/slasher").Offense[]>;
30
- /**
31
- * Await the committee to be slashed out of the validator set.
32
- * Currently assumes that the committee is the same size as the validator set.
33
- */
34
- export declare function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashFactory, slashingProposer, slashingRoundSize, aztecSlotDuration, aztecEpochDuration, logger, offenseEpoch, }: {
35
- rollup: RollupContract;
36
- cheatCodes: RollupCheatCodes;
37
- committee: readonly `0x${string}`[];
38
- slashFactory: SlashFactoryContract;
39
- slashingProposer: EmpireSlashingProposerContract | TallySlashingProposerContract | undefined;
40
- slashingRoundSize: number;
41
- aztecSlotDuration: number;
42
- aztecEpochDuration: number;
43
- logger: Logger;
44
- offenseEpoch: number;
45
- }): Promise<void>;
46
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,MAAM,EAA8C,MAAM,2BAA2B,CAAC;AAEpG,OAAO,KAAK,EAAE,MAAM,EAA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