@aztec/end-to-end 0.0.1-commit.1142ef1 → 0.0.1-commit.11bf3dd6e

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 (252) hide show
  1. package/README.md +27 -0
  2. package/dest/bench/client_flows/benchmark.d.ts +3 -2
  3. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  4. package/dest/bench/client_flows/benchmark.js +21 -1
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts +13 -14
  6. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  7. package/dest/bench/client_flows/client_flows_benchmark.js +118 -140
  8. package/dest/bench/client_flows/config.d.ts +2 -2
  9. package/dest/bench/client_flows/config.d.ts.map +1 -1
  10. package/dest/bench/client_flows/config.js +18 -0
  11. package/dest/bench/utils.d.ts +6 -5
  12. package/dest/bench/utils.d.ts.map +1 -1
  13. package/dest/bench/utils.js +13 -8
  14. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +11 -9
  15. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +108 -114
  17. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +7 -8
  18. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +68 -64
  20. package/dest/e2e_deploy_contract/deploy_test.d.ts +5 -4
  21. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  22. package/dest/e2e_deploy_contract/deploy_test.js +18 -13
  23. package/dest/e2e_epochs/epochs_test.d.ts +17 -7
  24. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  25. package/dest/e2e_epochs/epochs_test.js +92 -42
  26. package/dest/e2e_fees/bridging_race.notest.js +3 -5
  27. package/dest/e2e_fees/fees_test.d.ts +14 -14
  28. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  29. package/dest/e2e_fees/fees_test.js +133 -144
  30. package/dest/e2e_l1_publisher/write_json.d.ts +4 -3
  31. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  32. package/dest/e2e_l1_publisher/write_json.js +14 -13
  33. package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -9
  34. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  35. package/dest/e2e_nested_contract/nested_contract_test.js +30 -40
  36. package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
  37. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  38. package/dest/e2e_p2p/inactivity_slash_test.js +6 -6
  39. package/dest/e2e_p2p/p2p_network.d.ts +15 -15
  40. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  41. package/dest/e2e_p2p/p2p_network.js +144 -119
  42. package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
  43. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
  44. package/dest/e2e_p2p/reqresp/utils.js +190 -0
  45. package/dest/e2e_p2p/shared.d.ts +30 -12
  46. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  47. package/dest/e2e_p2p/shared.js +62 -60
  48. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  49. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  50. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  51. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  52. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  53. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  54. package/dest/e2e_token_contract/token_contract_test.d.ts +19 -10
  55. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  56. package/dest/e2e_token_contract/token_contract_test.js +100 -92
  57. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  58. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  59. package/dest/fixtures/authwit_proxy.js +34 -0
  60. package/dest/fixtures/e2e_prover_test.d.ts +14 -19
  61. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  62. package/dest/fixtures/e2e_prover_test.js +113 -133
  63. package/dest/fixtures/elu_monitor.d.ts +21 -0
  64. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  65. package/dest/fixtures/elu_monitor.js +102 -0
  66. package/dest/fixtures/fixtures.d.ts +5 -1
  67. package/dest/fixtures/fixtures.d.ts.map +1 -1
  68. package/dest/fixtures/fixtures.js +6 -0
  69. package/dest/fixtures/get_bb_config.d.ts +1 -1
  70. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  71. package/dest/fixtures/get_bb_config.js +5 -5
  72. package/dest/fixtures/ha_setup.d.ts +71 -0
  73. package/dest/fixtures/ha_setup.d.ts.map +1 -0
  74. package/dest/fixtures/ha_setup.js +116 -0
  75. package/dest/fixtures/index.d.ts +2 -1
  76. package/dest/fixtures/index.d.ts.map +1 -1
  77. package/dest/fixtures/index.js +1 -0
  78. package/dest/fixtures/setup.d.ts +242 -0
  79. package/dest/fixtures/setup.d.ts.map +1 -0
  80. package/dest/fixtures/setup.js +611 -0
  81. package/dest/fixtures/setup_p2p_test.d.ts +18 -11
  82. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  83. package/dest/fixtures/setup_p2p_test.js +43 -32
  84. package/dest/fixtures/token_utils.d.ts +2 -2
  85. package/dest/fixtures/token_utils.d.ts.map +1 -1
  86. package/dest/fixtures/token_utils.js +7 -6
  87. package/dest/fixtures/utils.d.ts +5 -191
  88. package/dest/fixtures/utils.d.ts.map +1 -1
  89. package/dest/fixtures/utils.js +4 -615
  90. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  91. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  92. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  93. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  94. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  95. package/dest/forward-compatibility/wallet_service.js +109 -0
  96. package/dest/legacy-jest-resolver.d.cts +3 -0
  97. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  98. package/dest/quality_of_service/prometheus_client.d.ts +38 -0
  99. package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
  100. package/dest/quality_of_service/prometheus_client.js +67 -0
  101. package/dest/shared/cross_chain_test_harness.d.ts +14 -4
  102. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  103. package/dest/shared/cross_chain_test_harness.js +24 -24
  104. package/dest/shared/gas_portal_test_harness.d.ts +11 -1
  105. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  106. package/dest/shared/gas_portal_test_harness.js +3 -3
  107. package/dest/shared/index.d.ts +2 -1
  108. package/dest/shared/index.d.ts.map +1 -1
  109. package/dest/shared/index.js +1 -0
  110. package/dest/shared/jest_setup.js +41 -1
  111. package/dest/shared/mock_state_view.d.ts +86 -0
  112. package/dest/shared/mock_state_view.d.ts.map +1 -0
  113. package/dest/shared/mock_state_view.js +186 -0
  114. package/dest/shared/submit-transactions.d.ts +4 -4
  115. package/dest/shared/submit-transactions.d.ts.map +1 -1
  116. package/dest/shared/submit-transactions.js +9 -11
  117. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  118. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  119. package/dest/shared/uniswap_l1_l2.js +27 -28
  120. package/dest/simulators/lending_simulator.d.ts +5 -1
  121. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  122. package/dest/simulators/lending_simulator.js +6 -6
  123. package/dest/simulators/token_simulator.d.ts +1 -1
  124. package/dest/simulators/token_simulator.d.ts.map +1 -1
  125. package/dest/simulators/token_simulator.js +3 -24
  126. package/dest/spartan/setup_test_wallets.d.ts +12 -3
  127. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  128. package/dest/spartan/setup_test_wallets.js +130 -42
  129. package/dest/spartan/tx_metrics.d.ts +51 -2
  130. package/dest/spartan/tx_metrics.d.ts.map +1 -1
  131. package/dest/spartan/tx_metrics.js +334 -7
  132. package/dest/spartan/utils/bot.d.ts +28 -0
  133. package/dest/spartan/utils/bot.d.ts.map +1 -0
  134. package/dest/spartan/utils/bot.js +142 -0
  135. package/dest/spartan/utils/chaos.d.ts +79 -0
  136. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  137. package/dest/spartan/utils/chaos.js +142 -0
  138. package/dest/spartan/utils/clients.d.ts +39 -0
  139. package/dest/spartan/utils/clients.d.ts.map +1 -0
  140. package/dest/spartan/utils/clients.js +90 -0
  141. package/dest/spartan/utils/config.d.ts +45 -0
  142. package/dest/spartan/utils/config.d.ts.map +1 -0
  143. package/dest/spartan/utils/config.js +23 -0
  144. package/dest/spartan/utils/health.d.ts +63 -0
  145. package/dest/spartan/utils/health.d.ts.map +1 -0
  146. package/dest/spartan/utils/health.js +202 -0
  147. package/dest/spartan/utils/helm.d.ts +15 -0
  148. package/dest/spartan/utils/helm.d.ts.map +1 -0
  149. package/dest/spartan/utils/helm.js +47 -0
  150. package/dest/spartan/utils/index.d.ts +11 -0
  151. package/dest/spartan/utils/index.d.ts.map +1 -0
  152. package/dest/spartan/utils/index.js +22 -0
  153. package/dest/spartan/utils/k8s.d.ts +128 -0
  154. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  155. package/dest/spartan/utils/k8s.js +381 -0
  156. package/dest/spartan/utils/nodes.d.ts +40 -0
  157. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  158. package/dest/spartan/utils/nodes.js +461 -0
  159. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  160. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  161. package/dest/spartan/utils/pod_logs.js +74 -0
  162. package/dest/spartan/utils/scripts.d.ts +30 -0
  163. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  164. package/dest/spartan/utils/scripts.js +81 -0
  165. package/dest/spartan/utils.d.ts +2 -253
  166. package/dest/spartan/utils.d.ts.map +1 -1
  167. package/dest/spartan/utils.js +1 -892
  168. package/dest/test-wallet/test_wallet.d.ts +84 -0
  169. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  170. package/dest/test-wallet/test_wallet.js +249 -0
  171. package/dest/test-wallet/utils.d.ts +41 -0
  172. package/dest/test-wallet/utils.d.ts.map +1 -0
  173. package/dest/test-wallet/utils.js +71 -0
  174. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  175. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  176. package/dest/test-wallet/wallet_worker_script.js +48 -0
  177. package/dest/test-wallet/worker_wallet.d.ts +52 -0
  178. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  179. package/dest/test-wallet/worker_wallet.js +151 -0
  180. package/dest/test-wallet/worker_wallet_schema.d.ts +279 -0
  181. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  182. package/dest/test-wallet/worker_wallet_schema.js +10 -0
  183. package/package.json +47 -43
  184. package/src/bench/client_flows/benchmark.ts +24 -2
  185. package/src/bench/client_flows/client_flows_benchmark.ts +157 -210
  186. package/src/bench/client_flows/config.ts +9 -1
  187. package/src/bench/utils.ts +15 -8
  188. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +123 -151
  189. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +103 -111
  190. package/src/e2e_deploy_contract/deploy_test.ts +22 -15
  191. package/src/e2e_epochs/epochs_test.ts +140 -92
  192. package/src/e2e_fees/bridging_race.notest.ts +4 -10
  193. package/src/e2e_fees/fees_test.ts +170 -224
  194. package/src/e2e_l1_publisher/write_json.ts +16 -13
  195. package/src/e2e_nested_contract/nested_contract_test.ts +35 -56
  196. package/src/e2e_p2p/inactivity_slash_test.ts +6 -6
  197. package/src/e2e_p2p/p2p_network.ts +210 -185
  198. package/src/e2e_p2p/reqresp/utils.ts +256 -0
  199. package/src/e2e_p2p/shared.ts +92 -80
  200. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  201. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  202. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  203. package/src/e2e_token_contract/token_contract_test.ts +121 -119
  204. package/src/fixtures/authwit_proxy.ts +54 -0
  205. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  206. package/src/fixtures/e2e_prover_test.ts +140 -183
  207. package/src/fixtures/elu_monitor.ts +126 -0
  208. package/src/fixtures/fixtures.ts +10 -0
  209. package/src/fixtures/get_bb_config.ts +7 -6
  210. package/src/fixtures/ha_setup.ts +186 -0
  211. package/src/fixtures/index.ts +1 -0
  212. package/src/fixtures/setup.ts +910 -0
  213. package/src/fixtures/setup_p2p_test.ts +48 -52
  214. package/src/fixtures/token_utils.ts +7 -6
  215. package/src/fixtures/utils.ts +27 -901
  216. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  217. package/src/forward-compatibility/wallet_service.ts +104 -0
  218. package/src/guides/up_quick_start.sh +3 -3
  219. package/src/legacy-jest-resolver.cjs +135 -0
  220. package/src/quality_of_service/prometheus_client.ts +113 -0
  221. package/src/shared/cross_chain_test_harness.ts +24 -34
  222. package/src/shared/gas_portal_test_harness.ts +2 -2
  223. package/src/shared/index.ts +1 -0
  224. package/src/shared/jest_setup.ts +51 -1
  225. package/src/shared/mock_state_view.ts +188 -0
  226. package/src/shared/submit-transactions.ts +11 -16
  227. package/src/shared/uniswap_l1_l2.ts +49 -51
  228. package/src/simulators/lending_simulator.ts +10 -6
  229. package/src/simulators/token_simulator.ts +6 -30
  230. package/src/spartan/setup_test_wallets.ts +183 -26
  231. package/src/spartan/tx_metrics.ts +256 -10
  232. package/src/spartan/utils/bot.ts +188 -0
  233. package/src/spartan/utils/chaos.ts +253 -0
  234. package/src/spartan/utils/clients.ts +100 -0
  235. package/src/spartan/utils/config.ts +29 -0
  236. package/src/spartan/utils/health.ts +255 -0
  237. package/src/spartan/utils/helm.ts +84 -0
  238. package/src/spartan/utils/index.ts +71 -0
  239. package/src/spartan/utils/k8s.ts +535 -0
  240. package/src/spartan/utils/nodes.ts +543 -0
  241. package/src/spartan/utils/pod_logs.ts +99 -0
  242. package/src/spartan/utils/scripts.ts +99 -0
  243. package/src/spartan/utils.ts +1 -1158
  244. package/src/test-wallet/test_wallet.ts +351 -0
  245. package/src/test-wallet/utils.ts +112 -0
  246. package/src/test-wallet/wallet_worker_script.ts +60 -0
  247. package/src/test-wallet/worker_wallet.ts +214 -0
  248. package/src/test-wallet/worker_wallet_schema.ts +13 -0
  249. package/dest/fixtures/snapshot_manager.d.ts +0 -93
  250. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  251. package/dest/fixtures/snapshot_manager.js +0 -488
  252. package/src/fixtures/snapshot_manager.ts +0 -646
@@ -1,39 +1,31 @@
1
- import { createArchiver } from '@aztec/archiver';
1
+ import { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { EthAddress } from '@aztec/aztec.js/addresses';
3
3
  import { createLogger } from '@aztec/aztec.js/log';
4
- import { BBCircuitVerifier, QueuedIVCVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
5
4
  import { BackendType, Barretenberg } from '@aztec/bb.js';
6
- import { createBlobClientWithFileStores } from '@aztec/blob-client/client';
7
5
  import { Buffer32 } from '@aztec/foundation/buffer';
8
6
  import { SecretValue } from '@aztec/foundation/config';
9
7
  import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
10
8
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
11
- import { createProverNode } from '@aztec/prover-node';
12
9
  import { getGenesisValues } from '@aztec/world-state/testing';
13
10
  import { getContract } from 'viem';
14
11
  import { privateKeyToAddress } from 'viem/accounts';
15
12
  import { TokenSimulator } from '../simulators/token_simulator.js';
16
13
  import { getACVMConfig } from './get_acvm_config.js';
17
14
  import { getBBConfig } from './get_bb_config.js';
18
- import { createSnapshotManager, deployAccounts, publicDeployAccounts } from './snapshot_manager.js';
19
- import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEAndGetWallet } from './utils.js';
20
- const { E2E_DATA_PATH: dataPath } = process.env;
15
+ import { deployAccounts, getPrivateKeyFromIndex, getSponsoredFPCAddress, publicDeployAccounts, setup, setupPXEAndGetWallet, teardown } from './setup.js';
21
16
  /**
22
17
  * Largely taken from the e2e_token_contract test file. We deploy 2 accounts and a token contract.
23
18
  * However, we then setup a second PXE with a full prover instance.
24
19
  * We configure this instance with all of the accounts and contracts.
25
20
  * We then prove and verify transactions created via this full prover PXE.
26
21
  */ export class FullProverTest {
27
- minNumberOfTxsPerBlock;
28
- realProofs;
29
22
  static TOKEN_NAME = 'USDC';
30
23
  static TOKEN_SYMBOL = 'USD';
31
24
  static TOKEN_DECIMALS = 18n;
32
- snapshotManager;
33
25
  logger;
34
26
  wallet;
35
27
  provenWallet;
36
- accounts;
28
+ accounts = [];
37
29
  deployedAccounts;
38
30
  fakeProofsAsset;
39
31
  fakeProofsAssetInstance;
@@ -41,75 +33,75 @@ const { E2E_DATA_PATH: dataPath } = process.env;
41
33
  aztecNode;
42
34
  aztecNodeAdmin;
43
35
  cheatCodes;
44
- provenComponents;
36
+ provenComponents = [];
45
37
  bbConfigCleanup;
46
38
  acvmConfigCleanup;
47
- circuitProofVerifier;
39
+ /** Returns the proof verifier from the prover node (for test assertions). */ get circuitProofVerifier() {
40
+ return this.proverAztecNode?.getProofVerifier();
41
+ }
48
42
  provenAsset;
49
43
  context;
50
- proverNode;
51
- simulatedProverNode;
44
+ proverAztecNode;
45
+ simulatedProverAztecNode;
52
46
  l1Contracts;
53
47
  proverAddress;
48
+ minNumberOfTxsPerBlock;
49
+ coinbase;
50
+ realProofs;
54
51
  constructor(testName, minNumberOfTxsPerBlock, coinbase, realProofs = true){
52
+ this.logger = createLogger(`e2e:full_prover_test:${testName}`);
55
53
  this.minNumberOfTxsPerBlock = minNumberOfTxsPerBlock;
54
+ this.coinbase = coinbase;
56
55
  this.realProofs = realProofs;
57
- this.accounts = [];
58
- this.provenComponents = [];
59
- this.snapshot = (name, apply, restore = ()=>Promise.resolve())=>this.snapshotManager.snapshot(name, apply, restore);
60
- this.logger = createLogger(`e2e:full_prover_test:${testName}`);
61
- this.snapshotManager = createSnapshotManager(`full_prover_integration/${testName}`, dataPath, {
62
- startProverNode: true,
63
- coinbase
64
- }, {
65
- realVerifier: realProofs
66
- });
67
56
  }
68
57
  /**
69
- * Adds two state shifts to snapshot manager.
70
- * 1. Add 2 accounts.
71
- * 2. Publicly deploy accounts, deploy token contract
72
- */ async applyBaseSnapshots() {
73
- await this.snapshotManager.snapshot('2_accounts', deployAccounts(2, this.logger), ({ deployedAccounts }, { wallet })=>{
74
- this.deployedAccounts = deployedAccounts;
75
- this.accounts = deployedAccounts.map((a)=>a.address);
76
- this.wallet = wallet;
77
- return Promise.resolve();
58
+ * Applies base setup: deploys 2 accounts and token contract.
59
+ */ async applyBaseSetup() {
60
+ this.logger.info('Applying base setup: deploying accounts');
61
+ const { deployedAccounts } = await deployAccounts(2, this.logger)({
62
+ wallet: this.context.wallet,
63
+ initialFundedAccounts: this.context.initialFundedAccounts
78
64
  });
79
- await this.snapshotManager.snapshot('client_prover_integration', async ()=>{
80
- // Create the token contract state.
81
- // Move this account thing to addAccounts above?
82
- this.logger.verbose(`Public deploy accounts...`);
83
- await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
84
- this.logger.verbose(`Deploying TokenContract...`);
85
- const { contract: asset, instance } = await TokenContract.deploy(this.wallet, this.accounts[0], FullProverTest.TOKEN_NAME, FullProverTest.TOKEN_SYMBOL, FullProverTest.TOKEN_DECIMALS).send({
86
- from: this.accounts[0]
87
- }).wait();
88
- this.logger.verbose(`Token deployed to ${asset.address}`);
89
- return {
90
- tokenContractAddress: asset.address,
91
- tokenContractInstance: instance
92
- };
93
- }, async ({ tokenContractAddress, tokenContractInstance })=>{
94
- // Restore the token contract state.
95
- this.fakeProofsAsset = TokenContract.at(tokenContractAddress, this.wallet);
96
- this.fakeProofsAssetInstance = tokenContractInstance;
97
- this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
98
- this.tokenSim = new TokenSimulator(this.fakeProofsAsset, this.wallet, this.accounts[0], this.logger, this.accounts);
99
- expect(await this.fakeProofsAsset.methods.get_admin().simulate({
100
- from: this.accounts[0]
101
- })).toBe(this.accounts[0].toBigInt());
65
+ this.deployedAccounts = deployedAccounts;
66
+ this.accounts = deployedAccounts.map((a)=>a.address);
67
+ this.wallet = this.context.wallet;
68
+ this.logger.info('Applying base setup: publicly deploying accounts');
69
+ await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
70
+ this.logger.info('Applying base setup: deploying token contract');
71
+ const { contract: asset, instance } = await TokenContract.deploy(this.wallet, this.accounts[0], FullProverTest.TOKEN_NAME, FullProverTest.TOKEN_SYMBOL, FullProverTest.TOKEN_DECIMALS).send({
72
+ from: this.accounts[0]
102
73
  });
74
+ this.logger.verbose(`Token deployed to ${asset.address}`);
75
+ this.fakeProofsAsset = asset;
76
+ this.fakeProofsAssetInstance = instance;
77
+ this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
78
+ this.tokenSim = new TokenSimulator(this.fakeProofsAsset, this.wallet, this.accounts[0], this.logger, this.accounts);
79
+ expect((await this.fakeProofsAsset.methods.get_admin().simulate({
80
+ from: this.accounts[0]
81
+ })).result).toBe(this.accounts[0].toBigInt());
103
82
  }
104
83
  async setup() {
105
- this.context = await this.snapshotManager.setup();
84
+ this.logger.info('Setting up subsystems from fresh');
85
+ this.context = await setup(0, {
86
+ startProverNode: true,
87
+ coinbase: this.coinbase,
88
+ fundSponsoredFPC: true,
89
+ skipAccountDeployment: true,
90
+ l1ContractsArgs: {
91
+ realVerifier: this.realProofs
92
+ }
93
+ });
94
+ await this.applyBaseSetup();
95
+ await this.applyMint();
96
+ this.logger.info(`Enabling proving`, {
97
+ realProofs: this.realProofs
98
+ });
106
99
  // We don't wish to mark as proven automatically, so we set the flag to false
107
100
  this.context.watcher.setIsMarkingAsProven(false);
108
- this.simulatedProverNode = this.context.proverNode;
101
+ this.simulatedProverAztecNode = this.context.proverNode;
109
102
  ({ aztecNode: this.aztecNode, deployL1ContractsValues: this.l1Contracts, cheatCodes: this.cheatCodes } = this.context);
110
- this.aztecNodeAdmin = this.context.aztecNode;
103
+ this.aztecNodeAdmin = this.context.aztecNodeService;
111
104
  const config = this.context.aztecNodeConfig;
112
- const blobClient = await createBlobClientWithFileStores(config, this.logger);
113
105
  // Configure a full prover PXE
114
106
  let acvmConfig;
115
107
  let bbConfig;
@@ -126,8 +118,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
126
118
  await Barretenberg.initSingleton({
127
119
  backend: BackendType.NativeUnixSocket
128
120
  });
129
- const verifier = await BBCircuitVerifier.new(bbConfig);
130
- this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
131
121
  this.logger.debug(`Configuring the node for real proofs...`);
132
122
  await this.aztecNodeAdmin.setConfig({
133
123
  realProofs: true,
@@ -135,7 +125,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
135
125
  });
136
126
  } else {
137
127
  this.logger.debug(`Configuring the node min txs per block ${this.minNumberOfTxsPerBlock}...`);
138
- this.circuitProofVerifier = new TestCircuitVerifier();
139
128
  await this.aztecNodeAdmin.setConfig({
140
129
  minTxsPerBlock: this.minNumberOfTxsPerBlock
141
130
  });
@@ -147,7 +136,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
147
136
  this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
148
137
  const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(this.aztecNode, {
149
138
  proverEnabled: this.realProofs
150
- }, undefined, true);
139
+ }, undefined, 'pxe-proven');
151
140
  this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
152
141
  await provenWallet.registerContract(this.fakeProofsAssetInstance, TokenContract.artifact);
153
142
  for(let i = 0; i < 2; i++){
@@ -162,36 +151,30 @@ const { E2E_DATA_PATH: dataPath } = process.env;
162
151
  this.provenAsset = asset;
163
152
  this.provenWallet = provenWallet;
164
153
  this.logger.info(`Full prover PXE started`);
165
- // Shutdown the current, simulated prover node
154
+ // Shutdown the current, simulated prover node (by stopping its hosting aztec node)
166
155
  this.logger.verbose('Shutting down simulated prover node');
167
- await this.simulatedProverNode.stop();
168
- // Creating temp store and archiver for fully proven prover node
169
- this.logger.verbose('Starting archiver for new prover node');
170
- const archiver = await createArchiver({
171
- ...this.context.aztecNodeConfig,
172
- dataDirectory: undefined
173
- }, {
174
- blobClient,
175
- dateProvider: this.context.dateProvider
176
- }, {
177
- blockUntilSync: true
178
- });
156
+ await this.simulatedProverAztecNode.stop();
179
157
  // The simulated prover node (now shutdown) used private key index 2
180
158
  const proverNodePrivateKey = getPrivateKeyFromIndex(2);
159
+ const proverNodePrivateKeyHex = `0x${proverNodePrivateKey.toString('hex')}`;
181
160
  const proverNodeSenderAddress = privateKeyToAddress(new Buffer32(proverNodePrivateKey).toString());
182
161
  this.proverAddress = EthAddress.fromString(proverNodeSenderAddress);
183
162
  this.logger.verbose(`Funding prover node at ${proverNodeSenderAddress}`);
184
163
  await this.mintFeeJuice(proverNodeSenderAddress);
185
164
  this.logger.verbose('Starting prover node');
186
- const proverConfig = {
187
- ...this.context.aztecNodeConfig,
188
- txCollectionNodeRpcUrls: [],
165
+ const sponsoredFPCAddress = await getSponsoredFPCAddress();
166
+ const { genesis } = await getGenesisValues(this.context.initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress), undefined, undefined, this.context.genesis.genesisTimestamp);
167
+ const proverNodeConfig = {
168
+ ...config,
169
+ enableProverNode: true,
170
+ disableValidator: true,
189
171
  dataDirectory: undefined,
172
+ txCollectionNodeRpcUrls: [],
190
173
  proverId: this.proverAddress,
191
174
  realProofs: this.realProofs,
192
175
  proverAgentCount: 2,
193
- publisherPrivateKeys: [
194
- new SecretValue(`0x${proverNodePrivateKey.toString('hex')}`)
176
+ proverPublisherPrivateKeys: [
177
+ new SecretValue(proverNodePrivateKeyHex)
195
178
  ],
196
179
  proverNodeMaxPendingJobs: 100,
197
180
  proverNodeMaxParallelBlocksPerEpoch: 32,
@@ -201,18 +184,22 @@ const { E2E_DATA_PATH: dataPath } = process.env;
201
184
  txGatheringMaxParallelRequestsPerNode: 100,
202
185
  txGatheringTimeoutMs: 24_000,
203
186
  proverNodeFailedEpochStore: undefined,
204
- proverNodeEpochProvingDelayMs: undefined
187
+ proverNodeEpochProvingDelayMs: undefined,
188
+ validatorPrivateKeys: new SecretValue([])
205
189
  };
206
- const sponsoredFPCAddress = await getSponsoredFPCAddress();
207
- const { prefilledPublicData } = await getGenesisValues(this.context.initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress));
208
- this.proverNode = await createProverNode(proverConfig, {
209
- aztecNodeTxProvider: this.aztecNode,
210
- archiver: archiver
190
+ this.proverAztecNode = await AztecNodeService.createAndSync(proverNodeConfig, {
191
+ dateProvider: this.context.dateProvider,
192
+ p2pClientDeps: {
193
+ rpcTxProviders: [
194
+ this.aztecNode
195
+ ]
196
+ }
211
197
  }, {
212
- prefilledPublicData
198
+ genesis
199
+ });
200
+ this.logger.warn(`Proofs are now enabled`, {
201
+ realProofs: this.realProofs
213
202
  });
214
- await this.proverNode.start();
215
- this.logger.warn(`Proofs are now enabled`);
216
203
  return this;
217
204
  }
218
205
  async mintFeeJuice(recipient) {
@@ -231,56 +218,49 @@ const { E2E_DATA_PATH: dataPath } = process.env;
231
218
  hash
232
219
  });
233
220
  }
234
- snapshot;
235
221
  async teardown() {
236
- await this.snapshotManager.teardown();
237
222
  // Cleanup related to the full prover PXEs
238
223
  for(let i = 0; i < this.provenComponents.length; i++){
239
224
  await this.provenComponents[i].teardown();
240
225
  }
241
- // clean up the full prover node
242
- await this.proverNode.stop();
226
+ // clean up the full prover node (by stopping its hosting aztec node)
227
+ await this.proverAztecNode.stop();
243
228
  await Barretenberg.destroySingleton();
244
229
  await this.bbConfigCleanup?.();
245
230
  await this.acvmConfigCleanup?.();
231
+ await teardown(this.context);
246
232
  }
247
- async applyMintSnapshot() {
248
- await this.snapshotManager.snapshot('mint', async ()=>{
249
- const { fakeProofsAsset: asset, accounts } = this;
250
- const privateAmount = 10000n;
251
- const publicAmount = 10000n;
252
- this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
253
- await asset.methods.mint_to_public(accounts[0], privateAmount + publicAmount).send({
254
- from: accounts[0]
255
- }).wait();
256
- this.logger.verbose(`Transferring ${privateAmount} to private...`);
257
- await asset.methods.transfer_to_private(accounts[0], privateAmount).send({
258
- from: accounts[0]
259
- }).wait();
260
- this.logger.verbose(`Minting complete.`);
261
- return {
262
- amount: publicAmount
263
- };
264
- }, async ({ amount })=>{
265
- const { fakeProofsAsset: asset, accounts: [address], tokenSim } = this;
266
- tokenSim.mintPublic(address, amount);
267
- const publicBalance = await asset.methods.balance_of_public(address).simulate({
268
- from: address
269
- });
270
- this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
271
- expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
272
- tokenSim.mintPrivate(address, amount);
273
- const privateBalance = await asset.methods.balance_of_private(address).simulate({
274
- from: address
275
- });
276
- this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
277
- expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
278
- const totalSupply = await asset.methods.total_supply().simulate({
279
- from: address
280
- });
281
- this.logger.verbose(`Total supply: ${totalSupply}`);
282
- expect(totalSupply).toEqual(tokenSim.totalSupply);
283
- return Promise.resolve();
233
+ async applyMint() {
234
+ this.logger.info('Applying mint setup');
235
+ const { fakeProofsAsset: asset, accounts } = this;
236
+ const privateAmount = 10000n;
237
+ const publicAmount = 10000n;
238
+ this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
239
+ await asset.methods.mint_to_public(accounts[0], privateAmount + publicAmount).send({
240
+ from: accounts[0]
241
+ });
242
+ this.logger.verbose(`Transferring ${privateAmount} to private...`);
243
+ await asset.methods.transfer_to_private(accounts[0], privateAmount).send({
244
+ from: accounts[0]
245
+ });
246
+ this.logger.info(`Minting complete`);
247
+ const { fakeProofsAsset, accounts: [address], tokenSim } = this;
248
+ tokenSim.mintPublic(address, publicAmount);
249
+ const { result: publicBalance } = await fakeProofsAsset.methods.balance_of_public(address).simulate({
250
+ from: address
251
+ });
252
+ this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
253
+ expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
254
+ tokenSim.mintPrivate(address, publicAmount);
255
+ const { result: privateBalance } = await fakeProofsAsset.methods.balance_of_private(address).simulate({
256
+ from: address
257
+ });
258
+ this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
259
+ expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
260
+ const { result: totalSupply } = await fakeProofsAsset.methods.total_supply().simulate({
261
+ from: address
284
262
  });
263
+ this.logger.verbose(`Total supply: ${totalSupply}`);
264
+ expect(totalSupply).toEqual(tokenSim.totalSupply);
285
265
  }
286
266
  }
@@ -0,0 +1,21 @@
1
+ /** Samples event-loop utilization, delay histogram, and heap usage per test, writing columnar text to a file. */
2
+ export declare class EluMonitor {
3
+ private filePath;
4
+ private intervalMs;
5
+ private timer;
6
+ private lastELU;
7
+ private histogram;
8
+ private testName;
9
+ private testStart;
10
+ private eluSamples;
11
+ constructor(filePath: string, intervalMs?: number);
12
+ /** Begin sampling for a test. Writes a header line and starts the periodic sampler. */
13
+ startTest(testName: string): void;
14
+ /** Stop sampling and write a summary line. */
15
+ stopTest(): void;
16
+ /** Alias for stopTest — call on process exit to flush any remaining data. */
17
+ stop(): void;
18
+ private sample;
19
+ private writeSummary;
20
+ }
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWx1X21vbml0b3IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9lbHVfbW9uaXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxpSEFBaUg7QUFDakgscUJBQWEsVUFBVTtJQUNyQixPQUFPLENBQUMsUUFBUSxDQUFTO0lBQ3pCLE9BQU8sQ0FBQyxVQUFVLENBQVM7SUFDM0IsT0FBTyxDQUFDLEtBQUssQ0FBNkM7SUFDMUQsT0FBTyxDQUFDLE9BQU8sQ0FBbUM7SUFDbEQsT0FBTyxDQUFDLFNBQVMsQ0FBb0I7SUFDckMsT0FBTyxDQUFDLFFBQVEsQ0FBcUI7SUFDckMsT0FBTyxDQUFDLFNBQVMsQ0FBcUI7SUFDdEMsT0FBTyxDQUFDLFVBQVUsQ0FBZ0I7SUFFbEMsWUFBWSxRQUFRLEVBQUUsTUFBTSxFQUFFLFVBQVUsQ0FBQyxFQUFFLE1BQU0sRUFJaEQ7SUFFRCx1RkFBdUY7SUFDdkYsU0FBUyxDQUFDLFFBQVEsRUFBRSxNQUFNLEdBQUcsSUFBSSxDQW1CaEM7SUFFRCw4Q0FBOEM7SUFDOUMsUUFBUSxJQUFJLElBQUksQ0FtQmY7SUFFRCwrRUFBNkU7SUFDN0UsSUFBSSxJQUFJLElBQUksQ0FFWDtJQUVELE9BQU8sQ0FBQyxNQUFNO0lBOEJkLE9BQU8sQ0FBQyxZQUFZO0NBbUJyQiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elu_monitor.d.ts","sourceRoot":"","sources":["../../src/fixtures/elu_monitor.ts"],"names":[],"mappings":"AAKA,iHAAiH;AACjH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,KAAK,CAA6C;IAC1D,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,UAAU,CAAgB;IAElC,YAAY,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAIhD;IAED,uFAAuF;IACvF,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAmBhC;IAED,8CAA8C;IAC9C,QAAQ,IAAI,IAAI,CAmBf;IAED,+EAA6E;IAC7E,IAAI,IAAI,IAAI,CAEX;IAED,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,YAAY;CAmBrB"}
@@ -0,0 +1,102 @@
1
+ import { appendFileSync } from 'node:fs';
2
+ import { monitorEventLoopDelay, performance } from 'node:perf_hooks';
3
+ const NANOS_PER_MS = 1_000_000;
4
+ /** Samples event-loop utilization, delay histogram, and heap usage per test, writing columnar text to a file. */ export class EluMonitor {
5
+ filePath;
6
+ intervalMs;
7
+ timer;
8
+ lastELU;
9
+ histogram;
10
+ testName;
11
+ testStart;
12
+ eluSamples = [];
13
+ constructor(filePath, intervalMs){
14
+ this.filePath = filePath;
15
+ this.intervalMs = intervalMs ?? 2000;
16
+ this.histogram = monitorEventLoopDelay({
17
+ resolution: 20
18
+ });
19
+ }
20
+ /** Begin sampling for a test. Writes a header line and starts the periodic sampler. */ startTest(testName) {
21
+ this.stopTest();
22
+ this.testName = testName;
23
+ this.testStart = performance.now();
24
+ this.eluSamples = [];
25
+ appendFileSync(this.filePath, `\n=== Test: ${testName} ===\n`);
26
+ appendFileSync(this.filePath, padColumns('TIME', 'ELU', 'EL_DLY_P50', 'EL_DLY_P99', 'EL_DLY_MAX', 'HEAP_MB') + '\n');
27
+ this.lastELU = performance.eventLoopUtilization();
28
+ this.histogram.enable();
29
+ this.timer = setInterval(()=>this.sample(), this.intervalMs);
30
+ // Allow the process to exit even if the timer is still running.
31
+ this.timer.unref();
32
+ }
33
+ /** Stop sampling and write a summary line. */ stopTest() {
34
+ if (!this.timer) {
35
+ return;
36
+ }
37
+ // Take a final sample before stopping.
38
+ this.sample();
39
+ clearInterval(this.timer);
40
+ this.timer = undefined;
41
+ this.histogram.disable();
42
+ this.histogram.reset();
43
+ this.writeSummary();
44
+ this.lastELU = undefined;
45
+ this.testName = undefined;
46
+ this.testStart = undefined;
47
+ this.eluSamples = [];
48
+ }
49
+ /** Alias for stopTest — call on process exit to flush any remaining data. */ stop() {
50
+ this.stopTest();
51
+ }
52
+ sample() {
53
+ const newELU = performance.eventLoopUtilization();
54
+ const delta = performance.eventLoopUtilization(newELU, this.lastELU);
55
+ this.lastELU = newELU;
56
+ const elu = delta.utilization;
57
+ this.eluSamples.push(elu);
58
+ const p50 = this.histogram.percentile(50) / NANOS_PER_MS;
59
+ const p99 = this.histogram.percentile(99) / NANOS_PER_MS;
60
+ const max = this.histogram.max / NANOS_PER_MS;
61
+ const heapMb = Math.round(process.memoryUsage().heapUsed / (1024 * 1024));
62
+ const now = new Date();
63
+ const time = [
64
+ now.getHours(),
65
+ now.getMinutes(),
66
+ now.getSeconds()
67
+ ].map((n)=>String(n).padStart(2, '0')).join(':');
68
+ const line = padColumns(time, elu.toFixed(2), `${p50.toFixed(1)}ms`, `${p99.toFixed(1)}ms`, `${max.toFixed(1)}ms`, String(heapMb));
69
+ appendFileSync(this.filePath, line + '\n');
70
+ // Reset histogram so next sample only reflects the new interval.
71
+ this.histogram.reset();
72
+ }
73
+ writeSummary() {
74
+ if (this.eluSamples.length === 0 || this.testStart === undefined) {
75
+ return;
76
+ }
77
+ const mean = this.eluSamples.reduce((a, b)=>a + b, 0) / this.eluSamples.length;
78
+ const maxElu = Math.max(...this.eluSamples);
79
+ const sorted = [
80
+ ...this.eluSamples
81
+ ].sort((a, b)=>a - b);
82
+ const p90Elu = sorted[Math.floor(sorted.length * 0.9)] ?? maxElu;
83
+ const durationS = ((performance.now() - this.testStart) / 1000).toFixed(1);
84
+ let summary = `--- Summary: mean_elu=${mean.toFixed(2)} max_elu=${maxElu.toFixed(2)} p90_elu=${p90Elu.toFixed(2)} duration=${durationS}s`;
85
+ if (maxElu > 0.85) {
86
+ summary += ' WARNING:ELU>0.85';
87
+ }
88
+ summary += ' ---\n';
89
+ appendFileSync(this.filePath, summary);
90
+ }
91
+ }
92
+ function padColumns(...cols) {
93
+ const widths = [
94
+ 11,
95
+ 7,
96
+ 12,
97
+ 12,
98
+ 12,
99
+ 8
100
+ ];
101
+ return cols.map((col, i)=>col.padEnd(widths[i] ?? 10)).join('');
102
+ }
@@ -1,5 +1,9 @@
1
1
  export declare const METRICS_PORT = 4318;
2
2
  export declare const shouldCollectMetrics: () => 4318 | undefined;
3
+ /** Returns the boot node UDP port from environment variable or default value. */
4
+ export declare function getBootNodeUdpPort(): number;
5
+ /** Returns the anvil port from environment variable or default value. */
6
+ export declare function getAnvilPort(): number;
3
7
  export declare const TEST_PEER_CHECK_INTERVAL_MS = 1000;
4
8
  export declare const TEST_MAX_PENDING_TX_POOL_COUNT = 10000;
5
9
  export declare const MNEMONIC = "test test test test test test test test test test test junk";
@@ -12,4 +16,4 @@ export declare const DUPLICATE_NULLIFIER_ERROR: RegExp;
12
16
  export declare const NO_L1_TO_L2_MSG_ERROR: RegExp;
13
17
  export declare const STATIC_CALL_STATE_MODIFICATION_ERROR: RegExp;
14
18
  export declare const STATIC_CONTEXT_ASSERTION_ERROR: RegExp;
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4dHVyZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sWUFBWSxPQUFPLENBQUM7QUFFakMsZUFBTyxNQUFNLG9CQUFvQix3QkFLaEMsQ0FBQztBQUVGLGVBQU8sTUFBTSwyQkFBMkIsT0FBTyxDQUFDO0FBQ2hELGVBQU8sTUFBTSw4QkFBOEIsUUFBUyxDQUFDO0FBRXJELGVBQU8sTUFBTSxRQUFRLGdFQUFnRSxDQUFDO0FBQ3RGLGVBQU8sTUFBTSxVQUFVLHFCQUF5RixDQUFDO0FBQ2pILGVBQU8sTUFBTSxXQUFXLHFCQUF5RixDQUFDO0FBR2xILGVBQU8sTUFBTSxvQkFBb0Isd0RBQXdELENBQUM7QUFDMUYsZUFBTyxNQUFNLG1CQUFtQixtREFBbUQsQ0FBQztBQUNwRixlQUFPLE1BQU0scUJBQXFCLCtFQUErRSxDQUFDO0FBRWxILGVBQU8sTUFBTSx5QkFBeUIsUUFBZ0MsQ0FBQztBQUN2RSxlQUFPLE1BQU0scUJBQXFCLFFBQ3dFLENBQUM7QUFDM0csZUFBTyxNQUFNLG9DQUFvQyxRQUEwQyxDQUFDO0FBQzVGLGVBQU8sTUFBTSw4QkFBOEIsUUFBa0UsQ0FBQyJ9
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml4dHVyZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maXh0dXJlcy9maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sWUFBWSxPQUFPLENBQUM7QUFFakMsZUFBTyxNQUFNLG9CQUFvQix3QkFLaEMsQ0FBQztBQUVGLGlGQUFpRjtBQUNqRix3QkFBZ0Isa0JBQWtCLElBQUksTUFBTSxDQUUzQztBQUVELHlFQUF5RTtBQUN6RSx3QkFBZ0IsWUFBWSxJQUFJLE1BQU0sQ0FFckM7QUFFRCxlQUFPLE1BQU0sMkJBQTJCLE9BQU8sQ0FBQztBQUNoRCxlQUFPLE1BQU0sOEJBQThCLFFBQVMsQ0FBQztBQUVyRCxlQUFPLE1BQU0sUUFBUSxnRUFBZ0UsQ0FBQztBQUN0RixlQUFPLE1BQU0sVUFBVSxxQkFBeUYsQ0FBQztBQUNqSCxlQUFPLE1BQU0sV0FBVyxxQkFBeUYsQ0FBQztBQUdsSCxlQUFPLE1BQU0sb0JBQW9CLHdEQUF3RCxDQUFDO0FBQzFGLGVBQU8sTUFBTSxtQkFBbUIsbURBQW1ELENBQUM7QUFDcEYsZUFBTyxNQUFNLHFCQUFxQiwrRUFBK0UsQ0FBQztBQUVsSCxlQUFPLE1BQU0seUJBQXlCLFFBQWdDLENBQUM7QUFDdkUsZUFBTyxNQUFNLHFCQUFxQixRQUN3RSxDQUFDO0FBQzNHLGVBQU8sTUFBTSxvQ0FBb0MsUUFBMEMsQ0FBQztBQUM1RixlQUFPLE1BQU0sOEJBQThCLFFBQWtFLENBQUMifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,oBAAoB,wBAKhC,CAAC;AAEF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAChD,eAAO,MAAM,8BAA8B,QAAS,CAAC;AAErD,eAAO,MAAM,QAAQ,gEAAgE,CAAC;AACtF,eAAO,MAAM,UAAU,qBAAyF,CAAC;AACjH,eAAO,MAAM,WAAW,qBAAyF,CAAC;AAGlH,eAAO,MAAM,oBAAoB,wDAAwD,CAAC;AAC1F,eAAO,MAAM,mBAAmB,mDAAmD,CAAC;AACpF,eAAO,MAAM,qBAAqB,+EAA+E,CAAC;AAElH,eAAO,MAAM,yBAAyB,QAAgC,CAAC;AACvE,eAAO,MAAM,qBAAqB,QACwE,CAAC;AAC3G,eAAO,MAAM,oCAAoC,QAA0C,CAAC;AAC5F,eAAO,MAAM,8BAA8B,QAAkE,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,oBAAoB,wBAKhC,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,yEAAyE;AACzE,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAChD,eAAO,MAAM,8BAA8B,QAAS,CAAC;AAErD,eAAO,MAAM,QAAQ,gEAAgE,CAAC;AACtF,eAAO,MAAM,UAAU,qBAAyF,CAAC;AACjH,eAAO,MAAM,WAAW,qBAAyF,CAAC;AAGlH,eAAO,MAAM,oBAAoB,wDAAwD,CAAC;AAC1F,eAAO,MAAM,mBAAmB,mDAAmD,CAAC;AACpF,eAAO,MAAM,qBAAqB,+EAA+E,CAAC;AAElH,eAAO,MAAM,yBAAyB,QAAgC,CAAC;AACvE,eAAO,MAAM,qBAAqB,QACwE,CAAC;AAC3G,eAAO,MAAM,oCAAoC,QAA0C,CAAC;AAC5F,eAAO,MAAM,8BAA8B,QAAkE,CAAC"}
@@ -5,6 +5,12 @@ export const shouldCollectMetrics = ()=>{
5
5
  }
6
6
  return undefined;
7
7
  };
8
+ /** Returns the boot node UDP port from environment variable or default value. */ export function getBootNodeUdpPort() {
9
+ return process.env.BOOT_NODE_UDP_PORT ? parseInt(process.env.BOOT_NODE_UDP_PORT, 10) : 4500;
10
+ }
11
+ /** Returns the anvil port from environment variable or default value. */ export function getAnvilPort() {
12
+ return process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT, 10) : 8545;
13
+ }
8
14
  export const TEST_PEER_CHECK_INTERVAL_MS = 1000;
9
15
  export const TEST_MAX_PENDING_TX_POOL_COUNT = 10_000; // Number of max pending TXs ~ 1.56GB
10
16
  export const MNEMONIC = 'test test test test test test test test test test test junk';
@@ -3,4 +3,4 @@ import type { BBConfig } from '@aztec/bb-prover';
3
3
  export declare const getBBConfig: (logger: Logger) => Promise<(BBConfig & {
4
4
  cleanup: () => Promise<void>;
5
5
  }) | undefined>;
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0X2JiX2NvbmZpZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZpeHR1cmVzL2dldF9iYl9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFrQmpELGVBQU8sTUFBTSxXQUFXOztlQXVDdkIsQ0FBQyJ9
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0X2JiX2NvbmZpZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZpeHR1cmVzL2dldF9iYl9jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFvQmpELGVBQU8sTUFBTSxXQUFXOztlQXNDdkIsQ0FBQyJ9
@@ -1 +1 @@
1
- {"version":3,"file":"get_bb_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_bb_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkBjD,eAAO,MAAM,WAAW;;eAuCvB,CAAC"}
1
+ {"version":3,"file":"get_bb_config.d.ts","sourceRoot":"","sources":["../../src/fixtures/get_bb_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAoBjD,eAAO,MAAM,WAAW;;eAsCvB,CAAC"}
@@ -3,7 +3,7 @@ import fs from 'node:fs/promises';
3
3
  import { tmpdir } from 'node:os';
4
4
  import path from 'path';
5
5
  import { fileURLToPath } from 'url';
6
- const { BB_RELEASE_DIR = 'barretenberg/cpp/build/bin', BB_BINARY_PATH, BB_SKIP_CLEANUP = '', TEMP_DIR = tmpdir(), BB_WORKING_DIRECTORY = '', BB_NUM_IVC_VERIFIERS = '1', BB_IVC_CONCURRENCY = '1' } = process.env;
6
+ const { BB_RELEASE_DIR = 'barretenberg/cpp/build/bin', BB_BINARY_PATH, BB_SKIP_CLEANUP = '', TEMP_DIR = tmpdir(), BB_WORKING_DIRECTORY = '', BB_NUM_IVC_VERIFIERS = '8', BB_IVC_CONCURRENCY = '1', BB_CHONK_VERIFY_MAX_BATCH = '16', BB_CHONK_VERIFY_BATCH_CONCURRENCY = '6' } = process.env;
7
7
  export const getBBConfig = async (logger)=>{
8
8
  try {
9
9
  const bbBinaryPath = BB_BINARY_PATH ?? path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../', BB_RELEASE_DIR, 'bb-avm');
@@ -24,15 +24,15 @@ export const getBBConfig = async (logger)=>{
24
24
  'true'
25
25
  ].includes(BB_SKIP_CLEANUP);
26
26
  const cleanup = bbSkipCleanup ? ()=>Promise.resolve() : ()=>tryRmDir(directoryToCleanup);
27
- const numIvcVerifiers = Number(BB_NUM_IVC_VERIFIERS);
28
- const ivcConcurrency = Number(BB_IVC_CONCURRENCY);
29
27
  return {
30
28
  bbSkipCleanup,
31
29
  bbBinaryPath,
32
30
  bbWorkingDirectory,
33
31
  cleanup,
34
- numConcurrentIVCVerifiers: numIvcVerifiers,
35
- bbIVCConcurrency: ivcConcurrency
32
+ numConcurrentIVCVerifiers: Number(BB_NUM_IVC_VERIFIERS),
33
+ bbIVCConcurrency: Number(BB_IVC_CONCURRENCY),
34
+ bbChonkVerifyMaxBatch: Number(BB_CHONK_VERIFY_MAX_BATCH),
35
+ bbChonkVerifyConcurrency: Number(BB_CHONK_VERIFY_BATCH_CONCURRENCY)
36
36
  };
37
37
  } catch (err) {
38
38
  logger.error(`Native BB not available, error: ${err}`);