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

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 (202) hide show
  1. package/README.md +27 -0
  2. package/dest/bench/client_flows/client_flows_benchmark.d.ts +2 -2
  3. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  4. package/dest/bench/client_flows/client_flows_benchmark.js +24 -31
  5. package/dest/bench/client_flows/config.d.ts +2 -2
  6. package/dest/bench/client_flows/config.d.ts.map +1 -1
  7. package/dest/bench/client_flows/config.js +18 -0
  8. package/dest/bench/utils.d.ts +1 -1
  9. package/dest/bench/utils.d.ts.map +1 -1
  10. package/dest/bench/utils.js +6 -3
  11. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +6 -3
  12. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  13. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +23 -13
  14. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -2
  15. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  16. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +1 -1
  17. package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
  18. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  19. package/dest/e2e_epochs/epochs_test.d.ts +26 -7
  20. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  21. package/dest/e2e_epochs/epochs_test.js +117 -41
  22. package/dest/e2e_fees/fees_test.d.ts +2 -2
  23. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  24. package/dest/e2e_fees/fees_test.js +22 -15
  25. package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
  26. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  27. package/dest/e2e_nested_contract/nested_contract_test.js +4 -6
  28. package/dest/e2e_p2p/inactivity_slash_test.js +3 -3
  29. package/dest/e2e_p2p/p2p_network.d.ts +14 -12
  30. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  31. package/dest/e2e_p2p/p2p_network.js +70 -34
  32. package/dest/e2e_p2p/reqresp/utils.d.ts +3 -3
  33. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
  34. package/dest/e2e_p2p/reqresp/utils.js +49 -9
  35. package/dest/e2e_p2p/shared.d.ts +26 -8
  36. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  37. package/dest/e2e_p2p/shared.js +71 -50
  38. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  39. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  40. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  41. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  42. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  43. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  44. package/dest/e2e_token_contract/token_contract_test.d.ts +4 -2
  45. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  46. package/dest/e2e_token_contract/token_contract_test.js +19 -9
  47. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  48. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  49. package/dest/fixtures/authwit_proxy.js +34 -0
  50. package/dest/fixtures/e2e_prover_test.d.ts +7 -6
  51. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  52. package/dest/fixtures/e2e_prover_test.js +37 -49
  53. package/dest/fixtures/elu_monitor.d.ts +21 -0
  54. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  55. package/dest/fixtures/elu_monitor.js +102 -0
  56. package/dest/fixtures/fixtures.d.ts +16 -1
  57. package/dest/fixtures/fixtures.d.ts.map +1 -1
  58. package/dest/fixtures/fixtures.js +16 -0
  59. package/dest/fixtures/get_bb_config.d.ts +1 -1
  60. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  61. package/dest/fixtures/get_bb_config.js +5 -5
  62. package/dest/fixtures/ha_setup.d.ts +2 -2
  63. package/dest/fixtures/ha_setup.d.ts.map +1 -1
  64. package/dest/fixtures/ha_setup.js +4 -2
  65. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
  66. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
  67. package/dest/fixtures/schnorr_hardcoded_account_contract.js +39 -0
  68. package/dest/fixtures/setup.d.ts +59 -31
  69. package/dest/fixtures/setup.d.ts.map +1 -1
  70. package/dest/fixtures/setup.js +97 -167
  71. package/dest/fixtures/setup_p2p_test.d.ts +10 -7
  72. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  73. package/dest/fixtures/setup_p2p_test.js +18 -15
  74. package/dest/fixtures/token_utils.d.ts +2 -2
  75. package/dest/fixtures/token_utils.d.ts.map +1 -1
  76. package/dest/fixtures/token_utils.js +5 -7
  77. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  78. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  79. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  80. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  81. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  82. package/dest/forward-compatibility/wallet_service.js +109 -0
  83. package/dest/legacy-jest-resolver.d.cts +3 -0
  84. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  85. package/dest/shared/cross_chain_test_harness.d.ts +1 -1
  86. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  87. package/dest/shared/cross_chain_test_harness.js +13 -13
  88. package/dest/shared/gas_portal_test_harness.js +3 -3
  89. package/dest/shared/index.d.ts +2 -1
  90. package/dest/shared/index.d.ts.map +1 -1
  91. package/dest/shared/index.js +1 -0
  92. package/dest/shared/jest_setup.js +41 -1
  93. package/dest/shared/mock_state_view.d.ts +86 -0
  94. package/dest/shared/mock_state_view.d.ts.map +1 -0
  95. package/dest/shared/mock_state_view.js +186 -0
  96. package/dest/shared/submit-transactions.d.ts +2 -2
  97. package/dest/shared/submit-transactions.d.ts.map +1 -1
  98. package/dest/shared/submit-transactions.js +1 -1
  99. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  100. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  101. package/dest/shared/uniswap_l1_l2.js +15 -22
  102. package/dest/simulators/lending_simulator.d.ts +1 -1
  103. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  104. package/dest/simulators/lending_simulator.js +4 -4
  105. package/dest/simulators/token_simulator.d.ts +1 -1
  106. package/dest/simulators/token_simulator.d.ts.map +1 -1
  107. package/dest/simulators/token_simulator.js +3 -24
  108. package/dest/spartan/setup_test_wallets.d.ts +12 -3
  109. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  110. package/dest/spartan/setup_test_wallets.js +100 -39
  111. package/dest/spartan/tx_metrics.d.ts +1 -1
  112. package/dest/spartan/tx_metrics.d.ts.map +1 -1
  113. package/dest/spartan/tx_metrics.js +19 -3
  114. package/dest/spartan/utils/bot.d.ts +3 -2
  115. package/dest/spartan/utils/bot.d.ts.map +1 -1
  116. package/dest/spartan/utils/bot.js +2 -1
  117. package/dest/spartan/utils/config.d.ts +7 -1
  118. package/dest/spartan/utils/config.d.ts.map +1 -1
  119. package/dest/spartan/utils/config.js +3 -1
  120. package/dest/spartan/utils/index.d.ts +4 -2
  121. package/dest/spartan/utils/index.d.ts.map +1 -1
  122. package/dest/spartan/utils/index.js +5 -1
  123. package/dest/spartan/utils/k8s.d.ts +3 -1
  124. package/dest/spartan/utils/k8s.d.ts.map +1 -1
  125. package/dest/spartan/utils/k8s.js +6 -0
  126. package/dest/spartan/utils/nodes.d.ts +4 -5
  127. package/dest/spartan/utils/nodes.d.ts.map +1 -1
  128. package/dest/spartan/utils/nodes.js +9 -9
  129. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  130. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  131. package/dest/spartan/utils/pod_logs.js +74 -0
  132. package/dest/test-wallet/test_wallet.d.ts +84 -0
  133. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  134. package/dest/test-wallet/test_wallet.js +255 -0
  135. package/dest/test-wallet/utils.d.ts +41 -0
  136. package/dest/test-wallet/utils.d.ts.map +1 -0
  137. package/dest/test-wallet/utils.js +71 -0
  138. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  139. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  140. package/dest/test-wallet/wallet_worker_script.js +48 -0
  141. package/dest/test-wallet/worker_wallet.d.ts +52 -0
  142. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  143. package/dest/test-wallet/worker_wallet.js +151 -0
  144. package/dest/test-wallet/worker_wallet_schema.d.ts +279 -0
  145. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  146. package/dest/test-wallet/worker_wallet_schema.js +10 -0
  147. package/package.json +43 -43
  148. package/src/bench/client_flows/client_flows_benchmark.ts +33 -20
  149. package/src/bench/client_flows/config.ts +9 -1
  150. package/src/bench/utils.ts +8 -3
  151. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +31 -21
  152. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +5 -5
  153. package/src/e2e_deploy_contract/deploy_test.ts +3 -3
  154. package/src/e2e_epochs/epochs_test.ts +138 -67
  155. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  156. package/src/e2e_fees/fees_test.ts +25 -31
  157. package/src/e2e_nested_contract/nested_contract_test.ts +7 -5
  158. package/src/e2e_p2p/inactivity_slash_test.ts +7 -7
  159. package/src/e2e_p2p/p2p_network.ts +93 -49
  160. package/src/e2e_p2p/reqresp/utils.ts +63 -13
  161. package/src/e2e_p2p/shared.ts +90 -64
  162. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  163. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  164. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  165. package/src/e2e_token_contract/token_contract_test.ts +26 -9
  166. package/src/fixtures/authwit_proxy.ts +54 -0
  167. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  168. package/src/fixtures/e2e_prover_test.ts +46 -55
  169. package/src/fixtures/elu_monitor.ts +126 -0
  170. package/src/fixtures/fixtures.ts +32 -0
  171. package/src/fixtures/get_bb_config.ts +7 -6
  172. package/src/fixtures/ha_setup.ts +7 -3
  173. package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
  174. package/src/fixtures/setup.ts +147 -232
  175. package/src/fixtures/setup_p2p_test.ts +17 -25
  176. package/src/fixtures/token_utils.ts +3 -3
  177. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  178. package/src/forward-compatibility/wallet_service.ts +104 -0
  179. package/src/guides/up_quick_start.sh +3 -5
  180. package/src/legacy-jest-resolver.cjs +135 -0
  181. package/src/shared/cross_chain_test_harness.ts +13 -9
  182. package/src/shared/gas_portal_test_harness.ts +1 -2
  183. package/src/shared/index.ts +1 -0
  184. package/src/shared/jest_setup.ts +51 -1
  185. package/src/shared/mock_state_view.ts +188 -0
  186. package/src/shared/submit-transactions.ts +3 -2
  187. package/src/shared/uniswap_l1_l2.ts +37 -34
  188. package/src/simulators/lending_simulator.ts +8 -4
  189. package/src/simulators/token_simulator.ts +6 -30
  190. package/src/spartan/setup_test_wallets.ts +141 -32
  191. package/src/spartan/tx_metrics.ts +17 -5
  192. package/src/spartan/utils/bot.ts +4 -1
  193. package/src/spartan/utils/config.ts +2 -0
  194. package/src/spartan/utils/index.ts +7 -0
  195. package/src/spartan/utils/k8s.ts +8 -0
  196. package/src/spartan/utils/nodes.ts +15 -10
  197. package/src/spartan/utils/pod_logs.ts +99 -0
  198. package/src/test-wallet/test_wallet.ts +357 -0
  199. package/src/test-wallet/utils.ts +112 -0
  200. package/src/test-wallet/wallet_worker_script.ts +60 -0
  201. package/src/test-wallet/worker_wallet.ts +214 -0
  202. package/src/test-wallet/worker_wallet_schema.ts +13 -0
@@ -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.toBuffer(), privateKey);
45
+ return new AuthWitness(messageHash, [...signature.toBuffer()]);
46
+ },
47
+ };
48
+ }
49
+ }