@aztec/end-to-end 0.0.1-commit.e558bd1c → 0.0.1-commit.e57c76e

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 (222) hide show
  1. package/README.md +27 -0
  2. package/dest/bench/client_flows/benchmark.d.ts +15 -1
  3. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  4. package/dest/bench/client_flows/benchmark.js +17 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts +3 -3
  6. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  7. package/dest/bench/client_flows/client_flows_benchmark.js +36 -39
  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 +1 -1
  12. package/dest/bench/utils.d.ts.map +1 -1
  13. package/dest/bench/utils.js +8 -3
  14. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +8 -5
  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 +36 -17
  17. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +16 -5
  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 +39 -7
  20. package/dest/e2e_deploy_contract/deploy_test.d.ts +4 -4
  21. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  22. package/dest/e2e_deploy_contract/deploy_test.js +2 -1
  23. package/dest/e2e_epochs/epochs_test.d.ts +33 -8
  24. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  25. package/dest/e2e_epochs/epochs_test.js +143 -44
  26. package/dest/e2e_fees/fees_test.d.ts +6 -3
  27. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  28. package/dest/e2e_fees/fees_test.js +50 -17
  29. package/dest/e2e_nested_contract/nested_contract_test.d.ts +3 -3
  30. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  31. package/dest/e2e_nested_contract/nested_contract_test.js +6 -7
  32. package/dest/e2e_p2p/inactivity_slash_test.d.ts +1 -1
  33. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  34. package/dest/e2e_p2p/inactivity_slash_test.js +4 -3
  35. package/dest/e2e_p2p/p2p_network.d.ts +14 -12
  36. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  37. package/dest/e2e_p2p/p2p_network.js +70 -34
  38. package/dest/e2e_p2p/reqresp/utils.d.ts +3 -3
  39. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
  40. package/dest/e2e_p2p/reqresp/utils.js +67 -14
  41. package/dest/e2e_p2p/shared.d.ts +37 -8
  42. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  43. package/dest/e2e_p2p/shared.js +88 -51
  44. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  45. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  46. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  47. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  48. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  49. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  50. package/dest/e2e_token_contract/token_contract_test.d.ts +6 -4
  51. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  52. package/dest/e2e_token_contract/token_contract_test.js +23 -11
  53. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  54. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  55. package/dest/fixtures/authwit_proxy.js +34 -0
  56. package/dest/fixtures/e2e_prover_test.d.ts +9 -8
  57. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  58. package/dest/fixtures/e2e_prover_test.js +39 -50
  59. package/dest/fixtures/elu_monitor.d.ts +21 -0
  60. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  61. package/dest/fixtures/elu_monitor.js +102 -0
  62. package/dest/fixtures/fixtures.d.ts +74 -1
  63. package/dest/fixtures/fixtures.d.ts.map +1 -1
  64. package/dest/fixtures/fixtures.js +71 -0
  65. package/dest/fixtures/get_bb_config.d.ts +1 -1
  66. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  67. package/dest/fixtures/get_bb_config.js +5 -5
  68. package/dest/fixtures/ha_setup.d.ts +2 -2
  69. package/dest/fixtures/ha_setup.d.ts.map +1 -1
  70. package/dest/fixtures/ha_setup.js +4 -2
  71. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
  72. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
  73. package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
  74. package/dest/fixtures/setup.d.ts +86 -32
  75. package/dest/fixtures/setup.d.ts.map +1 -1
  76. package/dest/fixtures/setup.js +209 -169
  77. package/dest/fixtures/setup_p2p_test.d.ts +14 -7
  78. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  79. package/dest/fixtures/setup_p2p_test.js +18 -15
  80. package/dest/fixtures/token_utils.d.ts +2 -2
  81. package/dest/fixtures/token_utils.d.ts.map +1 -1
  82. package/dest/fixtures/token_utils.js +5 -7
  83. package/dest/fixtures/utils.d.ts +2 -2
  84. package/dest/fixtures/utils.d.ts.map +1 -1
  85. package/dest/fixtures/utils.js +1 -1
  86. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  87. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  88. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  89. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  90. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  91. package/dest/forward-compatibility/wallet_service.js +109 -0
  92. package/dest/install_legacy_contracts.d.cts +10 -0
  93. package/dest/install_legacy_contracts.d.cts.map +1 -0
  94. package/dest/legacy-jest-resolver.d.cts +3 -0
  95. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  96. package/dest/shared/cross_chain_test_harness.d.ts +4 -2
  97. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  98. package/dest/shared/cross_chain_test_harness.js +22 -18
  99. package/dest/shared/gas_portal_test_harness.d.ts +8 -5
  100. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  101. package/dest/shared/gas_portal_test_harness.js +19 -10
  102. package/dest/shared/index.d.ts +2 -1
  103. package/dest/shared/index.d.ts.map +1 -1
  104. package/dest/shared/index.js +1 -0
  105. package/dest/shared/jest_setup.js +41 -1
  106. package/dest/shared/mock_state_view.d.ts +86 -0
  107. package/dest/shared/mock_state_view.d.ts.map +1 -0
  108. package/dest/shared/mock_state_view.js +186 -0
  109. package/dest/shared/submit-transactions.d.ts +2 -2
  110. package/dest/shared/submit-transactions.d.ts.map +1 -1
  111. package/dest/shared/submit-transactions.js +1 -1
  112. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  113. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  114. package/dest/shared/uniswap_l1_l2.js +56 -41
  115. package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
  116. package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
  117. package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
  118. package/dest/simulators/lending_simulator.d.ts +10 -3
  119. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  120. package/dest/simulators/lending_simulator.js +26 -14
  121. package/dest/simulators/token_simulator.d.ts +1 -1
  122. package/dest/simulators/token_simulator.d.ts.map +1 -1
  123. package/dest/simulators/token_simulator.js +3 -24
  124. package/dest/spartan/setup_test_wallets.d.ts +12 -3
  125. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  126. package/dest/spartan/setup_test_wallets.js +108 -41
  127. package/dest/spartan/tx_metrics.d.ts +18 -4
  128. package/dest/spartan/tx_metrics.d.ts.map +1 -1
  129. package/dest/spartan/tx_metrics.js +74 -21
  130. package/dest/spartan/utils/bot.d.ts +3 -2
  131. package/dest/spartan/utils/bot.d.ts.map +1 -1
  132. package/dest/spartan/utils/bot.js +2 -1
  133. package/dest/spartan/utils/config.d.ts +10 -30
  134. package/dest/spartan/utils/config.d.ts.map +1 -1
  135. package/dest/spartan/utils/config.js +3 -1
  136. package/dest/spartan/utils/index.d.ts +4 -2
  137. package/dest/spartan/utils/index.d.ts.map +1 -1
  138. package/dest/spartan/utils/index.js +5 -1
  139. package/dest/spartan/utils/k8s.d.ts +3 -1
  140. package/dest/spartan/utils/k8s.d.ts.map +1 -1
  141. package/dest/spartan/utils/k8s.js +6 -0
  142. package/dest/spartan/utils/nodes.d.ts +4 -5
  143. package/dest/spartan/utils/nodes.d.ts.map +1 -1
  144. package/dest/spartan/utils/nodes.js +11 -11
  145. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  146. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  147. package/dest/spartan/utils/pod_logs.js +74 -0
  148. package/dest/test-wallet/test_wallet.d.ts +85 -0
  149. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  150. package/dest/test-wallet/test_wallet.js +273 -0
  151. package/dest/test-wallet/utils.d.ts +41 -0
  152. package/dest/test-wallet/utils.d.ts.map +1 -0
  153. package/dest/test-wallet/utils.js +66 -0
  154. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  155. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  156. package/dest/test-wallet/wallet_worker_script.js +53 -0
  157. package/dest/test-wallet/worker_wallet.d.ts +53 -0
  158. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  159. package/dest/test-wallet/worker_wallet.js +155 -0
  160. package/dest/test-wallet/worker_wallet_schema.d.ts +160 -0
  161. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  162. package/dest/test-wallet/worker_wallet_schema.js +22 -0
  163. package/package.json +49 -45
  164. package/src/bench/client_flows/benchmark.ts +19 -0
  165. package/src/bench/client_flows/client_flows_benchmark.ts +64 -49
  166. package/src/bench/client_flows/config.ts +9 -1
  167. package/src/bench/utils.ts +10 -4
  168. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +52 -25
  169. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +53 -15
  170. package/src/e2e_deploy_contract/deploy_test.ts +6 -5
  171. package/src/e2e_epochs/epochs_test.ts +166 -68
  172. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  173. package/src/e2e_fees/fees_test.ts +57 -32
  174. package/src/e2e_nested_contract/nested_contract_test.ts +10 -6
  175. package/src/e2e_p2p/inactivity_slash_test.ts +8 -7
  176. package/src/e2e_p2p/p2p_network.ts +93 -49
  177. package/src/e2e_p2p/reqresp/utils.ts +84 -17
  178. package/src/e2e_p2p/shared.ts +108 -65
  179. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  180. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  181. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  182. package/src/e2e_token_contract/token_contract_test.ts +38 -11
  183. package/src/fixtures/authwit_proxy.ts +54 -0
  184. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  185. package/src/fixtures/e2e_prover_test.ts +49 -56
  186. package/src/fixtures/elu_monitor.ts +126 -0
  187. package/src/fixtures/fixtures.ts +93 -0
  188. package/src/fixtures/get_bb_config.ts +7 -6
  189. package/src/fixtures/ha_setup.ts +7 -3
  190. package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
  191. package/src/fixtures/setup.ts +272 -233
  192. package/src/fixtures/setup_p2p_test.ts +21 -25
  193. package/src/fixtures/token_utils.ts +3 -3
  194. package/src/fixtures/utils.ts +2 -0
  195. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  196. package/src/forward-compatibility/wallet_service.ts +104 -0
  197. package/src/guides/up_quick_start.sh +3 -5
  198. package/src/install_legacy_contracts.cjs +75 -0
  199. package/src/legacy-jest-resolver.cjs +112 -0
  200. package/src/shared/cross_chain_test_harness.ts +27 -13
  201. package/src/shared/gas_portal_test_harness.ts +21 -11
  202. package/src/shared/index.ts +1 -0
  203. package/src/shared/jest_setup.ts +51 -1
  204. package/src/shared/mock_state_view.ts +188 -0
  205. package/src/shared/submit-transactions.ts +3 -2
  206. package/src/shared/uniswap_l1_l2.ts +104 -53
  207. package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
  208. package/src/simulators/lending_simulator.ts +32 -14
  209. package/src/simulators/token_simulator.ts +6 -30
  210. package/src/spartan/setup_test_wallets.ts +146 -35
  211. package/src/spartan/tx_metrics.ts +82 -24
  212. package/src/spartan/utils/bot.ts +4 -1
  213. package/src/spartan/utils/config.ts +2 -0
  214. package/src/spartan/utils/index.ts +7 -0
  215. package/src/spartan/utils/k8s.ts +8 -0
  216. package/src/spartan/utils/nodes.ts +17 -12
  217. package/src/spartan/utils/pod_logs.ts +99 -0
  218. package/src/test-wallet/test_wallet.ts +376 -0
  219. package/src/test-wallet/utils.ts +108 -0
  220. package/src/test-wallet/wallet_worker_script.ts +63 -0
  221. package/src/test-wallet/worker_wallet.ts +218 -0
  222. package/src/test-wallet/worker_wallet_schema.ts +13 -0
@@ -13,8 +13,10 @@ const {
13
13
  BB_SKIP_CLEANUP = '',
14
14
  TEMP_DIR = tmpdir(),
15
15
  BB_WORKING_DIRECTORY = '',
16
- BB_NUM_IVC_VERIFIERS = '1',
16
+ BB_NUM_IVC_VERIFIERS = '8',
17
17
  BB_IVC_CONCURRENCY = '1',
18
+ BB_CHONK_VERIFY_MAX_BATCH = '16',
19
+ BB_CHONK_VERIFY_BATCH_CONCURRENCY = '6',
18
20
  } = process.env;
19
21
 
20
22
  export const getBBConfig = async (
@@ -41,16 +43,15 @@ export const getBBConfig = async (
41
43
  const bbSkipCleanup = ['1', 'true'].includes(BB_SKIP_CLEANUP);
42
44
  const cleanup = bbSkipCleanup ? () => Promise.resolve() : () => tryRmDir(directoryToCleanup);
43
45
 
44
- const numIvcVerifiers = Number(BB_NUM_IVC_VERIFIERS);
45
- const ivcConcurrency = Number(BB_IVC_CONCURRENCY);
46
-
47
46
  return {
48
47
  bbSkipCleanup,
49
48
  bbBinaryPath,
50
49
  bbWorkingDirectory,
51
50
  cleanup,
52
- numConcurrentIVCVerifiers: numIvcVerifiers,
53
- bbIVCConcurrency: ivcConcurrency,
51
+ numConcurrentIVCVerifiers: Number(BB_NUM_IVC_VERIFIERS),
52
+ bbIVCConcurrency: Number(BB_IVC_CONCURRENCY),
53
+ bbChonkVerifyMaxBatch: Number(BB_CHONK_VERIFY_MAX_BATCH),
54
+ bbChonkVerifyConcurrency: Number(BB_CHONK_VERIFY_BATCH_CONCURRENCY),
54
55
  };
55
56
  } catch (err) {
56
57
  logger.error(`Native BB not available, error: ${err}`);
@@ -11,7 +11,7 @@ import { privateKeyToAccount } from 'viem/accounts';
11
11
  */
12
12
  export interface HADatabaseConfig {
13
13
  /** PostgreSQL connection URL */
14
- databaseUrl: string;
14
+ databaseUrl: SecretValue<string>;
15
15
  /** Node ID for HA coordination */
16
16
  nodeId: string;
17
17
  /** Enable HA signing */
@@ -28,7 +28,9 @@ export interface HADatabaseConfig {
28
28
  * Get database configuration from environment variables
29
29
  */
30
30
  export function createHADatabaseConfig(nodeId: string): HADatabaseConfig {
31
- const databaseUrl = process.env.DATABASE_URL || 'postgresql://aztec:aztec@localhost:5432/aztec_ha_test';
31
+ const databaseUrl = new SecretValue(
32
+ process.env.DATABASE_URL || 'postgresql://aztec:aztec@localhost:5432/aztec_ha_test',
33
+ );
32
34
 
33
35
  return {
34
36
  databaseUrl,
@@ -69,8 +71,10 @@ export async function cleanupHADatabase(pool: Pool, logger?: Logger): Promise<vo
69
71
  try {
70
72
  // Drop all HA tables
71
73
  await pool.query('DROP TABLE IF EXISTS validator_duties CASCADE');
72
- await pool.query('DROP TABLE IF EXISTS slashing_protection CASCADE');
73
74
  await pool.query('DROP TABLE IF EXISTS schema_version CASCADE');
75
+ // Drop migration tracking table (node-pg-migrate uses 'pgmigrations' by default)
76
+ // This ensures migrations will run fresh on next startup
77
+ await pool.query('DROP TABLE IF EXISTS pgmigrations CASCADE');
74
78
 
75
79
  logger?.info('HA database cleaned up successfully');
76
80
  } catch (error) {
@@ -0,0 +1,49 @@
1
+ import { DefaultAccountContract } from '@aztec/accounts/defaults';
2
+ import type { ContractArtifact } from '@aztec/aztec.js/abi';
3
+ import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
4
+ import type { CompleteAddress } from '@aztec/aztec.js/addresses';
5
+ import { AuthWitness } from '@aztec/aztec.js/authorization';
6
+ import type { Fr } from '@aztec/aztec.js/fields';
7
+ import { Schnorr } from '@aztec/foundation/crypto/schnorr';
8
+ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
9
+ import { SchnorrHardcodedAccountContractArtifact } from '@aztec/noir-contracts.js/SchnorrHardcodedAccount';
10
+
11
+ /**
12
+ * The private key that matches the hardcoded public key in the SchnorrHardcodedAccountContract.
13
+ * The corresponding public key is baked into the Noir contract as a global constant.
14
+ */
15
+ export const SCHNORR_HARDCODED_PRIVATE_KEY = GrumpkinScalar.fromHexString(
16
+ '0xd35d743ac0dfe3d6dbe6be8c877cb524a00ab1e3d52d7bada095dfc8894ccfa',
17
+ );
18
+
19
+ /**
20
+ * Account contract backed by the SchnorrHardcodedAccount Noir contract.
21
+ * This contract verifies Schnorr signatures against a public key that is hardcoded
22
+ * in the contract artifact (not stored in a note), so it does not require on-chain
23
+ * deployment or initialization. Useful for tests that need a working account without
24
+ * mining any blocks.
25
+ */
26
+ export class SchnorrHardcodedKeyAccountContract extends DefaultAccountContract {
27
+ constructor(private privateKey: GrumpkinScalar = SCHNORR_HARDCODED_PRIVATE_KEY) {
28
+ super();
29
+ }
30
+
31
+ override getContractArtifact(): Promise<ContractArtifact> {
32
+ return Promise.resolve(SchnorrHardcodedAccountContractArtifact);
33
+ }
34
+
35
+ getInitializationFunctionAndArgs() {
36
+ return Promise.resolve(undefined);
37
+ }
38
+
39
+ getAuthWitnessProvider(_address: CompleteAddress): AuthWitnessProvider {
40
+ const privateKey = this.privateKey;
41
+ return {
42
+ async createAuthWit(messageHash: Fr): Promise<AuthWitness> {
43
+ const signer = new Schnorr();
44
+ const signature = await signer.constructSignature(messageHash, privateKey);
45
+ return new AuthWitness(messageHash, signature.toLimbFields());
46
+ },
47
+ };
48
+ }
49
+ }