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

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 (270) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +3 -2
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/benchmark.js +21 -1
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +22 -16
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  6. package/dest/bench/client_flows/client_flows_benchmark.js +133 -122
  7. package/dest/bench/client_flows/config.d.ts +2 -2
  8. package/dest/bench/client_flows/config.d.ts.map +1 -1
  9. package/dest/bench/client_flows/config.js +18 -0
  10. package/dest/bench/client_flows/data_extractor.d.ts +1 -1
  11. package/dest/bench/client_flows/data_extractor.js +7 -27
  12. package/dest/bench/utils.d.ts +8 -7
  13. package/dest/bench/utils.d.ts.map +1 -1
  14. package/dest/bench/utils.js +27 -18
  15. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +9 -8
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +106 -112
  18. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +20 -14
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +92 -70
  21. package/dest/e2e_deploy_contract/deploy_test.d.ts +6 -5
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  23. package/dest/e2e_deploy_contract/deploy_test.js +18 -13
  24. package/dest/e2e_epochs/epochs_test.d.ts +25 -15
  25. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  26. package/dest/e2e_epochs/epochs_test.js +103 -53
  27. package/dest/e2e_fees/bridging_race.notest.d.ts +1 -1
  28. package/dest/e2e_fees/bridging_race.notest.js +5 -7
  29. package/dest/e2e_fees/fees_test.d.ts +21 -17
  30. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  31. package/dest/e2e_fees/fees_test.js +129 -141
  32. package/dest/e2e_l1_publisher/write_json.d.ts +4 -3
  33. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  34. package/dest/e2e_l1_publisher/write_json.js +18 -19
  35. package/dest/e2e_multi_validator/utils.d.ts +1 -1
  36. package/dest/e2e_multi_validator/utils.js +1 -1
  37. package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -9
  38. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  39. package/dest/e2e_nested_contract/nested_contract_test.js +31 -38
  40. package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
  41. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  42. package/dest/e2e_p2p/inactivity_slash_test.js +7 -6
  43. package/dest/e2e_p2p/p2p_network.d.ts +226 -19
  44. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  45. package/dest/e2e_p2p/p2p_network.js +136 -111
  46. package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
  47. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
  48. package/dest/e2e_p2p/reqresp/utils.js +177 -0
  49. package/dest/e2e_p2p/shared.d.ts +11 -11
  50. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  51. package/dest/e2e_p2p/shared.js +20 -22
  52. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  53. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  54. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  55. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  56. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  57. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  58. package/dest/e2e_token_contract/token_contract_test.d.ts +19 -10
  59. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  60. package/dest/e2e_token_contract/token_contract_test.js +99 -91
  61. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  62. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  63. package/dest/fixtures/authwit_proxy.js +30 -0
  64. package/dest/fixtures/e2e_prover_test.d.ts +15 -21
  65. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  66. package/dest/fixtures/e2e_prover_test.js +123 -138
  67. package/dest/fixtures/elu_monitor.d.ts +21 -0
  68. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  69. package/dest/fixtures/elu_monitor.js +102 -0
  70. package/dest/fixtures/fixtures.d.ts +6 -3
  71. package/dest/fixtures/fixtures.d.ts.map +1 -1
  72. package/dest/fixtures/fixtures.js +8 -3
  73. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  74. package/dest/fixtures/get_acvm_config.js +1 -1
  75. package/dest/fixtures/get_bb_config.d.ts +1 -1
  76. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  77. package/dest/fixtures/ha_setup.d.ts +71 -0
  78. package/dest/fixtures/ha_setup.d.ts.map +1 -0
  79. package/dest/fixtures/ha_setup.js +116 -0
  80. package/dest/fixtures/index.d.ts +2 -1
  81. package/dest/fixtures/index.d.ts.map +1 -1
  82. package/dest/fixtures/index.js +1 -0
  83. package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
  84. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  85. package/dest/fixtures/l1_to_l2_messaging.js +2 -2
  86. package/dest/fixtures/logging.d.ts +1 -1
  87. package/dest/fixtures/setup.d.ts +234 -0
  88. package/dest/fixtures/setup.d.ts.map +1 -0
  89. package/dest/fixtures/setup.js +605 -0
  90. package/dest/fixtures/setup_p2p_test.d.ts +17 -10
  91. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  92. package/dest/fixtures/setup_p2p_test.js +55 -36
  93. package/dest/fixtures/token_utils.d.ts +6 -3
  94. package/dest/fixtures/token_utils.d.ts.map +1 -1
  95. package/dest/fixtures/token_utils.js +16 -9
  96. package/dest/fixtures/utils.d.ts +5 -192
  97. package/dest/fixtures/utils.d.ts.map +1 -1
  98. package/dest/fixtures/utils.js +4 -648
  99. package/dest/fixtures/web3signer.d.ts +1 -1
  100. package/dest/fixtures/web3signer.js +1 -1
  101. package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
  102. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
  103. package/dest/fixtures/with_telemetry_utils.js +2 -2
  104. package/dest/index.d.ts +1 -1
  105. package/dest/quality_of_service/grafana_client.d.ts +41 -0
  106. package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
  107. package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
  108. package/dest/quality_of_service/prometheus_client.d.ts +38 -0
  109. package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
  110. package/dest/quality_of_service/prometheus_client.js +67 -0
  111. package/dest/shared/cross_chain_test_harness.d.ts +7 -6
  112. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  113. package/dest/shared/cross_chain_test_harness.js +14 -14
  114. package/dest/shared/gas_portal_test_harness.d.ts +2 -2
  115. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  116. package/dest/shared/gas_portal_test_harness.js +2 -2
  117. package/dest/shared/index.d.ts +3 -2
  118. package/dest/shared/index.d.ts.map +1 -1
  119. package/dest/shared/index.js +1 -0
  120. package/dest/shared/jest_setup.d.ts +1 -1
  121. package/dest/shared/jest_setup.js +41 -1
  122. package/dest/shared/mock_state_view.d.ts +86 -0
  123. package/dest/shared/mock_state_view.d.ts.map +1 -0
  124. package/dest/shared/mock_state_view.js +186 -0
  125. package/dest/shared/submit-transactions.d.ts +4 -4
  126. package/dest/shared/submit-transactions.d.ts.map +1 -1
  127. package/dest/shared/submit-transactions.js +9 -11
  128. package/dest/shared/uniswap_l1_l2.d.ts +3 -27
  129. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  130. package/dest/shared/uniswap_l1_l2.js +57 -35
  131. package/dest/simulators/index.d.ts +1 -1
  132. package/dest/simulators/lending_simulator.d.ts +2 -2
  133. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  134. package/dest/simulators/lending_simulator.js +6 -4
  135. package/dest/simulators/token_simulator.d.ts +1 -1
  136. package/dest/simulators/token_simulator.d.ts.map +1 -1
  137. package/dest/simulators/token_simulator.js +2 -23
  138. package/dest/spartan/setup_test_wallets.d.ts +16 -6
  139. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  140. package/dest/spartan/setup_test_wallets.js +115 -23
  141. package/dest/spartan/tx_metrics.d.ts +88 -0
  142. package/dest/spartan/tx_metrics.d.ts.map +1 -0
  143. package/dest/spartan/tx_metrics.js +422 -0
  144. package/dest/spartan/utils/bot.d.ts +28 -0
  145. package/dest/spartan/utils/bot.d.ts.map +1 -0
  146. package/dest/spartan/utils/bot.js +142 -0
  147. package/dest/spartan/utils/chaos.d.ts +79 -0
  148. package/dest/spartan/utils/chaos.d.ts.map +1 -0
  149. package/dest/spartan/utils/chaos.js +142 -0
  150. package/dest/spartan/utils/clients.d.ts +39 -0
  151. package/dest/spartan/utils/clients.d.ts.map +1 -0
  152. package/dest/spartan/utils/clients.js +90 -0
  153. package/dest/spartan/utils/config.d.ts +42 -0
  154. package/dest/spartan/utils/config.d.ts.map +1 -0
  155. package/dest/spartan/utils/config.js +22 -0
  156. package/dest/spartan/utils/health.d.ts +63 -0
  157. package/dest/spartan/utils/health.d.ts.map +1 -0
  158. package/dest/spartan/utils/health.js +202 -0
  159. package/dest/spartan/utils/helm.d.ts +15 -0
  160. package/dest/spartan/utils/helm.d.ts.map +1 -0
  161. package/dest/spartan/utils/helm.js +47 -0
  162. package/dest/spartan/utils/index.d.ts +10 -0
  163. package/dest/spartan/utils/index.d.ts.map +1 -0
  164. package/dest/spartan/utils/index.js +20 -0
  165. package/dest/spartan/utils/k8s.d.ts +128 -0
  166. package/dest/spartan/utils/k8s.d.ts.map +1 -0
  167. package/dest/spartan/utils/k8s.js +381 -0
  168. package/dest/spartan/utils/nodes.d.ts +40 -0
  169. package/dest/spartan/utils/nodes.d.ts.map +1 -0
  170. package/dest/spartan/utils/nodes.js +461 -0
  171. package/dest/spartan/utils/scripts.d.ts +30 -0
  172. package/dest/spartan/utils/scripts.d.ts.map +1 -0
  173. package/dest/spartan/utils/scripts.js +81 -0
  174. package/dest/spartan/utils.d.ts +2 -218
  175. package/dest/spartan/utils.d.ts.map +1 -1
  176. package/dest/spartan/utils.js +1 -749
  177. package/dest/test-wallet/test_wallet.d.ts +83 -0
  178. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  179. package/dest/test-wallet/test_wallet.js +214 -0
  180. package/dest/test-wallet/utils.d.ts +41 -0
  181. package/dest/test-wallet/utils.d.ts.map +1 -0
  182. package/dest/test-wallet/utils.js +71 -0
  183. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  184. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  185. package/dest/test-wallet/wallet_worker_script.js +48 -0
  186. package/dest/test-wallet/worker_wallet.d.ts +52 -0
  187. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  188. package/dest/test-wallet/worker_wallet.js +151 -0
  189. package/dest/test-wallet/worker_wallet_schema.d.ts +274 -0
  190. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  191. package/dest/test-wallet/worker_wallet_schema.js +10 -0
  192. package/package.json +50 -44
  193. package/src/bench/client_flows/benchmark.ts +24 -2
  194. package/src/bench/client_flows/client_flows_benchmark.ts +156 -177
  195. package/src/bench/client_flows/config.ts +9 -1
  196. package/src/bench/client_flows/data_extractor.ts +6 -28
  197. package/src/bench/utils.ts +31 -21
  198. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +114 -143
  199. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +140 -125
  200. package/src/e2e_deploy_contract/deploy_test.ts +23 -16
  201. package/src/e2e_epochs/epochs_test.ts +166 -116
  202. package/src/e2e_fees/bridging_race.notest.ts +6 -12
  203. package/src/e2e_fees/fees_test.ts +172 -226
  204. package/src/e2e_l1_publisher/write_json.ts +20 -19
  205. package/src/e2e_multi_validator/utils.ts +1 -1
  206. package/src/e2e_nested_contract/nested_contract_test.ts +33 -55
  207. package/src/e2e_p2p/inactivity_slash_test.ts +8 -7
  208. package/src/e2e_p2p/p2p_network.ts +205 -182
  209. package/src/e2e_p2p/reqresp/utils.ts +235 -0
  210. package/src/e2e_p2p/shared.ts +37 -29
  211. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  212. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  213. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  214. package/src/e2e_token_contract/token_contract_test.ts +113 -119
  215. package/src/fixtures/authwit_proxy.ts +50 -0
  216. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  217. package/src/fixtures/e2e_prover_test.ts +138 -186
  218. package/src/fixtures/elu_monitor.ts +126 -0
  219. package/src/fixtures/fixtures.ts +12 -5
  220. package/src/fixtures/get_acvm_config.ts +1 -1
  221. package/src/fixtures/ha_setup.ts +186 -0
  222. package/src/fixtures/index.ts +1 -0
  223. package/src/fixtures/l1_to_l2_messaging.ts +4 -2
  224. package/src/fixtures/setup.ts +895 -0
  225. package/src/fixtures/setup_p2p_test.ts +58 -48
  226. package/src/fixtures/token_utils.ts +9 -7
  227. package/src/fixtures/utils.ts +27 -947
  228. package/src/fixtures/web3signer.ts +1 -1
  229. package/src/fixtures/with_telemetry_utils.ts +2 -2
  230. package/src/guides/up_quick_start.sh +4 -4
  231. package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
  232. package/src/quality_of_service/prometheus_client.ts +113 -0
  233. package/src/shared/cross_chain_test_harness.ts +19 -36
  234. package/src/shared/gas_portal_test_harness.ts +3 -3
  235. package/src/shared/index.ts +2 -1
  236. package/src/shared/jest_setup.ts +51 -1
  237. package/src/shared/mock_state_view.ts +188 -0
  238. package/src/shared/submit-transactions.ts +14 -16
  239. package/src/shared/uniswap_l1_l2.ts +66 -89
  240. package/src/simulators/lending_simulator.ts +7 -5
  241. package/src/simulators/token_simulator.ts +1 -29
  242. package/src/spartan/DEVELOP.md +7 -0
  243. package/src/spartan/setup_test_wallets.ts +173 -28
  244. package/src/spartan/tx_metrics.ts +376 -0
  245. package/src/spartan/utils/bot.ts +188 -0
  246. package/src/spartan/utils/chaos.ts +253 -0
  247. package/src/spartan/utils/clients.ts +100 -0
  248. package/src/spartan/utils/config.ts +28 -0
  249. package/src/spartan/utils/health.ts +255 -0
  250. package/src/spartan/utils/helm.ts +84 -0
  251. package/src/spartan/utils/index.ts +68 -0
  252. package/src/spartan/utils/k8s.ts +535 -0
  253. package/src/spartan/utils/nodes.ts +543 -0
  254. package/src/spartan/utils/scripts.ts +99 -0
  255. package/src/spartan/utils.ts +1 -942
  256. package/src/test-wallet/test_wallet.ts +306 -0
  257. package/src/test-wallet/utils.ts +112 -0
  258. package/src/test-wallet/wallet_worker_script.ts +60 -0
  259. package/src/test-wallet/worker_wallet.ts +213 -0
  260. package/src/test-wallet/worker_wallet_schema.ts +13 -0
  261. package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
  262. package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
  263. package/dest/fixtures/setup_l1_contracts.js +0 -17
  264. package/dest/fixtures/snapshot_manager.d.ts +0 -95
  265. package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
  266. package/dest/fixtures/snapshot_manager.js +0 -505
  267. package/dest/quality_of_service/alert_checker.d.ts +0 -41
  268. package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
  269. package/src/fixtures/setup_l1_contracts.ts +0 -26
  270. package/src/fixtures/snapshot_manager.ts +0 -665
@@ -1,3 +1,4 @@
1
+ import type { Archiver } from '@aztec/archiver';
1
2
  import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
2
3
  import { getTimestampRangeForEpoch } from '@aztec/aztec.js/block';
3
4
  import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
@@ -6,26 +7,25 @@ import type { Logger } from '@aztec/aztec.js/log';
6
7
  import { MerkleTreeId } from '@aztec/aztec.js/trees';
7
8
  import type { Wallet } from '@aztec/aztec.js/wallet';
8
9
  import { EpochCache } from '@aztec/epoch-cache';
9
- import { DefaultL1ContractsConfig, type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
10
+ import { createExtendedL1Client } from '@aztec/ethereum/client';
11
+ import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
10
12
  import { RollupContract } from '@aztec/ethereum/contracts';
11
- import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
13
+ import { Delayer, createDelayer, waitUntilL1Timestamp, wrapClientWithDelayer } from '@aztec/ethereum/l1-tx-utils';
14
+ import { ChainMonitor } from '@aztec/ethereum/test';
15
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
16
+ import { BlockNumber, CheckpointNumber, EpochNumber } from '@aztec/foundation/branded-types';
12
17
  import { SecretValue } from '@aztec/foundation/config';
13
- import { randomBytes } from '@aztec/foundation/crypto';
14
- import { withLogNameSuffix } from '@aztec/foundation/log';
18
+ import { randomBytes } from '@aztec/foundation/crypto/random';
19
+ import { withLoggerBindings } from '@aztec/foundation/log/server';
15
20
  import { retryUntil } from '@aztec/foundation/retry';
16
21
  import { sleep } from '@aztec/foundation/sleep';
17
22
  import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
23
+ import { TestContract } from '@aztec/noir-test-contracts.js/Test';
18
24
  import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
19
- import { ProverNode, type ProverNodeConfig, ProverNodePublisher } from '@aztec/prover-node';
20
- import type { TestProverNode } from '@aztec/prover-node/test';
21
- import {
22
- type SequencerClient,
23
- type SequencerEvents,
24
- type SequencerPublisher,
25
- SequencerState,
26
- } from '@aztec/sequencer-client';
27
- import type { TestSequencerClient } from '@aztec/sequencer-client/test';
28
- import { EthAddress, type L2BlockNumber } from '@aztec/stdlib/block';
25
+ import type { ProverNodeConfig } from '@aztec/prover-node';
26
+ import type { PXEConfig } from '@aztec/pxe/config';
27
+ import { type SequencerClient, type SequencerEvents, SequencerState } from '@aztec/sequencer-client';
28
+ import { type BlockParameter, EthAddress } from '@aztec/stdlib/block';
29
29
  import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
30
30
  import { tryStop } from '@aztec/stdlib/interfaces/server';
31
31
 
@@ -41,12 +41,16 @@ import {
41
41
  setup,
42
42
  } from '../fixtures/utils.js';
43
43
 
44
- export const WORLD_STATE_BLOCK_HISTORY = 2;
44
+ export const WORLD_STATE_CHECKPOINT_HISTORY = 2;
45
45
  export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
46
46
  export const ARCHIVER_POLL_INTERVAL = 50;
47
47
  export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8;
48
48
 
49
- export type EpochsTestOpts = Partial<SetupOptions> & { numberOfAccounts?: number };
49
+ export type EpochsTestOpts = Partial<SetupOptions> & {
50
+ numberOfAccounts?: number;
51
+ pxeOpts?: Partial<PXEConfig>;
52
+ aztecSlotDurationInL1Slots?: number;
53
+ };
50
54
 
51
55
  export type TrackedSequencerEvent = {
52
56
  [K in keyof SequencerEvents]: Parameters<SequencerEvents[K]>[0] & {
@@ -72,7 +76,7 @@ export class EpochsTestContext {
72
76
  public proverDelayer!: Delayer;
73
77
  public sequencerDelayer!: Delayer;
74
78
 
75
- public proverNodes: ProverNode[] = [];
79
+ public proverNodes: AztecNodeService[] = [];
76
80
  public nodes: AztecNodeService[] = [];
77
81
 
78
82
  public epochDuration!: number;
@@ -91,46 +95,63 @@ export class EpochsTestContext {
91
95
  ? parseInt(process.env.L1_BLOCK_TIME)
92
96
  : DEFAULT_L1_BLOCK_TIME;
93
97
  const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
94
- const aztecSlotDuration = opts.aztecSlotDuration ?? ethereumSlotDuration * 2;
98
+ const aztecSlotDuration = opts.aztecSlotDuration ?? (opts.aztecSlotDurationInL1Slots ?? 2) * ethereumSlotDuration;
95
99
  const aztecEpochDuration = opts.aztecEpochDuration ?? 6;
96
100
  const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
97
- return { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs };
101
+ const l1PublishingTime = opts.l1PublishingTime ?? 1;
102
+ return {
103
+ l1PublishingTime,
104
+ ethereumSlotDuration,
105
+ aztecSlotDuration,
106
+ aztecEpochDuration,
107
+ aztecProofSubmissionEpochs,
108
+ };
98
109
  }
99
110
 
100
111
  public async setup(opts: EpochsTestOpts = {}) {
101
- const { ethereumSlotDuration, aztecSlotDuration, aztecEpochDuration, aztecProofSubmissionEpochs } =
102
- EpochsTestContext.getSlotDurations(opts);
112
+ const {
113
+ ethereumSlotDuration,
114
+ aztecSlotDuration,
115
+ aztecEpochDuration,
116
+ aztecProofSubmissionEpochs,
117
+ l1PublishingTime,
118
+ } = EpochsTestContext.getSlotDurations(opts);
103
119
 
104
120
  this.L1_BLOCK_TIME_IN_S = ethereumSlotDuration;
105
121
  this.L2_SLOT_DURATION_IN_S = aztecSlotDuration;
106
122
 
107
123
  // Set up system without any account nor protocol contracts
108
124
  // and with faster block times and shorter epochs.
109
- const context = await setup(opts.numberOfAccounts ?? 0, {
110
- automineL1Setup: true,
111
- checkIntervalMs: 50,
112
- archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
113
- worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
114
- skipProtocolContracts: true,
115
- salt: 1,
116
- aztecEpochDuration,
117
- aztecSlotDuration,
118
- ethereumSlotDuration,
119
- aztecProofSubmissionEpochs,
120
- aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
121
- minTxsPerBlock: 0,
122
- realProofs: false,
123
- startProverNode: true,
124
- proverTestDelayMs: opts.proverTestDelayMs ?? 0,
125
- // We use numeric incremental prover ids for simplicity, but we can switch to
126
- // using the prover's eth address if the proverId is used for something in the rollup contract
127
- // Use numeric EthAddress for deterministic prover id
128
- proverId: EthAddress.fromNumber(1),
129
- worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
130
- exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
131
- slasherFlavor: 'none',
132
- ...opts,
133
- });
125
+ const context = await setup(
126
+ opts.numberOfAccounts ?? 0,
127
+ {
128
+ automineL1Setup: true,
129
+ checkIntervalMs: 50,
130
+ archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
131
+ worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
132
+ aztecEpochDuration,
133
+ aztecSlotDuration,
134
+ ethereumSlotDuration,
135
+ aztecProofSubmissionEpochs,
136
+ aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
137
+ minTxsPerBlock: 0,
138
+ realProofs: false,
139
+ startProverNode: true,
140
+ proverTestDelayMs: opts.proverTestDelayMs ?? 0,
141
+ // We use numeric incremental prover ids for simplicity, but we can switch to
142
+ // using the prover's eth address if the proverId is used for something in the rollup contract
143
+ // Use numeric EthAddress for deterministic prover id
144
+ proverId: EthAddress.fromNumber(1),
145
+ worldStateCheckpointHistory: WORLD_STATE_CHECKPOINT_HISTORY,
146
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
147
+ slasherFlavor: 'none',
148
+ l1PublishingTime,
149
+ ...opts,
150
+ },
151
+ // Use checkpointed chain tip for PXE by default to avoid issues with blocks being dropped due to pruned anchor blocks.
152
+ // Can be overridden via opts.pxeOpts.
153
+ { syncChainTip: 'checkpointed', ...opts.pxeOpts },
154
+ );
134
155
 
135
156
  this.context = context;
136
157
  this.proverNodes = context.proverNode ? [context.proverNode] : [];
@@ -143,17 +164,8 @@ export class EpochsTestContext {
143
164
  // Loop that tracks L1 and L2 block numbers and logs whenever there's a new one.
144
165
  this.monitor = new ChainMonitor(this.rollup, context.dateProvider, this.logger).start();
145
166
 
146
- // This is hideous.
147
- // We ought to have a definite reference to the l1TxUtils that we're using in both places, provided by the test context.
148
- this.proverDelayer = context.proverNode
149
- ? (((context.proverNode as TestProverNode).publisher as ProverNodePublisher).l1TxUtils as DelayedTxUtils).delayer!
150
- : undefined!;
151
- this.sequencerDelayer = context.sequencer
152
- ? (
153
- ((context.sequencer as TestSequencerClient).sequencer.publisher as SequencerPublisher)
154
- .l1TxUtils as DelayedTxUtils
155
- ).delayer!
156
- : undefined!;
167
+ this.proverDelayer = context.proverDelayer!;
168
+ this.sequencerDelayer = context.sequencerDelayer!;
157
169
 
158
170
  if ((context.proverNode && !this.proverDelayer) || (context.sequencer && !this.sequencerDelayer)) {
159
171
  throw new Error(`Could not find prover or sequencer delayer`);
@@ -168,6 +180,7 @@ export class EpochsTestContext {
168
180
  l1GenesisTime: await this.rollup.getL1GenesisTime(),
169
181
  ethereumSlotDuration,
170
182
  proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs()),
183
+ targetCommitteeSize: await this.rollup.getTargetCommitteeSize(),
171
184
  };
172
185
 
173
186
  this.logger.info(
@@ -185,20 +198,32 @@ export class EpochsTestContext {
185
198
  public async createProverNode(opts: { dontStart?: boolean } & Partial<ProverNodeConfig> = {}) {
186
199
  this.logger.warn('Creating and syncing a simulated prover node...');
187
200
  const proverNodePrivateKey = this.getNextPrivateKey();
188
- const suffix = (this.proverNodes.length + 1).toString();
189
- const proverNode = await withLogNameSuffix(suffix, () =>
201
+ const proverIndex = this.proverNodes.length + 1;
202
+ const { mockGossipSubNetwork } = this.context;
203
+ const { proverNode } = await withLoggerBindings({ actor: `prover-${proverIndex}` }, () =>
190
204
  createAndSyncProverNode(
191
205
  proverNodePrivateKey,
192
- { ...this.context.config },
193
206
  {
194
- dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')),
195
- proverId: EthAddress.fromNumber(parseInt(suffix, 10)),
207
+ ...this.context.config,
208
+ p2pEnabled: this.context.config.p2pEnabled || mockGossipSubNetwork !== undefined,
209
+ proverId: EthAddress.fromNumber(proverIndex),
196
210
  dontStart: opts.dontStart,
197
211
  ...opts,
198
212
  },
199
- this.context.aztecNode,
200
- undefined,
201
- { dateProvider: this.context.dateProvider },
213
+ {
214
+ dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')),
215
+ },
216
+ {
217
+ dateProvider: this.context.dateProvider,
218
+ p2pClientDeps: {
219
+ p2pServiceFactory: mockGossipSubNetwork ? getMockPubSubP2PServiceFactory(mockGossipSubNetwork) : undefined,
220
+ rpcTxProviders: [this.context.aztecNode],
221
+ },
222
+ },
223
+ {
224
+ prefilledPublicData: this.context.prefilledPublicData ?? [],
225
+ dontStart: opts.dontStart,
226
+ },
202
227
  ),
203
228
  );
204
229
  this.proverNodes.push(proverNode);
@@ -212,21 +237,20 @@ export class EpochsTestContext {
212
237
 
213
238
  public createValidatorNode(
214
239
  privateKeys: `0x${string}`[],
215
- opts: Partial<AztecNodeConfig> & { txDelayerMaxInclusionTimeIntoSlot?: number; dontStartSequencer?: boolean } = {},
240
+ opts: Partial<AztecNodeConfig> & { dontStartSequencer?: boolean } = {},
216
241
  ) {
217
242
  this.logger.warn('Creating and syncing a validator node...');
218
243
  return this.createNode({ ...opts, disableValidator: false, validatorPrivateKeys: new SecretValue(privateKeys) });
219
244
  }
220
245
 
221
- private async createNode(
222
- opts: Partial<AztecNodeConfig> & { txDelayerMaxInclusionTimeIntoSlot?: number; dontStartSequencer?: boolean } = {},
223
- ) {
224
- const suffix = (this.nodes.length + 1).toString();
246
+ private async createNode(opts: Partial<AztecNodeConfig> & { dontStartSequencer?: boolean } = {}) {
247
+ const nodeIndex = this.nodes.length + 1;
248
+ const actorPrefix = opts.disableValidator ? 'node' : 'validator';
225
249
  const { mockGossipSubNetwork } = this.context;
226
250
  const resolvedConfig = { ...this.context.config, ...opts };
227
251
  const p2pEnabled = resolvedConfig.p2pEnabled || mockGossipSubNetwork !== undefined;
228
252
  const p2pIp = resolvedConfig.p2pIp ?? (p2pEnabled ? '127.0.0.1' : undefined);
229
- const node = await withLogNameSuffix(suffix, () =>
253
+ const node = await withLoggerBindings({ actor: `${actorPrefix}-${nodeIndex}` }, () =>
230
254
  AztecNodeService.createAndSync(
231
255
  {
232
256
  ...resolvedConfig,
@@ -248,26 +272,6 @@ export class EpochsTestContext {
248
272
  ),
249
273
  );
250
274
 
251
- // REFACTOR: We're getting too much into the internals of the sequencer here.
252
- // We should have a single method for constructing an aztec node that returns a TestAztecNodeService
253
- // which directly exposes the delayer and sets any test config.
254
- if (opts.txDelayerMaxInclusionTimeIntoSlot !== undefined) {
255
- this.logger.info(
256
- `Setting tx delayer max inclusion time into slot to ${opts.txDelayerMaxInclusionTimeIntoSlot} seconds`,
257
- );
258
- // Here we reach into the sequencer and hook in a tx delayer. The problem is that the sequencer's l1 utils only uses a public client, not a wallet.
259
- // The delayer needs a wallet (a client that can sign), so we have to create one here.
260
- const l1Client = createExtendedL1Client(
261
- resolvedConfig.l1RpcUrls!,
262
- resolvedConfig.publisherPrivateKeys![0]!.getValue(),
263
- );
264
- const sequencer = node.getSequencer() as TestSequencerClient;
265
- const publisher = sequencer.sequencer.publisher;
266
- const delayed = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, this.L1_BLOCK_TIME_IN_S, l1Client);
267
- delayed.delayer!.setMaxInclusionTimeIntoSlot(opts.txDelayerMaxInclusionTimeIntoSlot);
268
- publisher.l1TxUtils = delayed;
269
- }
270
-
271
275
  this.nodes.push(node);
272
276
  return node;
273
277
  }
@@ -279,7 +283,7 @@ export class EpochsTestContext {
279
283
 
280
284
  /** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */
281
285
  public async waitUntilEpochStarts(epoch: number) {
282
- const [start] = getTimestampRangeForEpoch(BigInt(epoch), this.constants);
286
+ const [start] = getTimestampRangeForEpoch(EpochNumber(epoch), this.constants);
283
287
  this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
284
288
  await waitUntilL1Timestamp(
285
289
  this.l1Client,
@@ -290,40 +294,43 @@ export class EpochsTestContext {
290
294
  return start;
291
295
  }
292
296
 
293
- /** Waits until the given L2 block number is mined. */
294
- public async waitUntilL2BlockNumber(target: number, timeout = 60) {
297
+ /** Waits until the given checkpoint number is mined. */
298
+ public async waitUntilCheckpointNumber(target: CheckpointNumber, timeout = 120) {
295
299
  await retryUntil(
296
- () => Promise.resolve(target <= this.monitor.l2BlockNumber),
297
- `Wait until L2 block ${target}`,
300
+ () => Promise.resolve(target <= this.monitor.checkpointNumber),
301
+ `Wait until checkpoint ${target}`,
298
302
  timeout,
299
303
  0.1,
300
304
  );
301
305
  }
302
306
 
303
- /** Waits until the given L2 block number is marked as proven. */
304
- public async waitUntilProvenL2BlockNumber(t: number, timeout = 60) {
307
+ /** Waits until the given checkpoint number is marked as proven. */
308
+ public async waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout = 120) {
305
309
  await retryUntil(
306
- () => Promise.resolve(t <= this.monitor.l2ProvenBlockNumber),
307
- `Wait proven L2 block ${t}`,
310
+ () => Promise.resolve(target <= this.monitor.provenCheckpointNumber),
311
+ `Wait proven checkpoint ${target}`,
308
312
  timeout,
309
313
  0.1,
310
314
  );
311
- return this.monitor.l2ProvenBlockNumber;
315
+ return this.monitor.provenCheckpointNumber;
312
316
  }
313
317
 
314
318
  /** Waits until the last slot of the proof submission window for a given epoch. */
315
319
  public async waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint) {
316
- const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
320
+ const deadline = getProofSubmissionDeadlineTimestamp(EpochNumber.fromBigInt(BigInt(epochNumber)), this.constants);
317
321
  const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
318
322
  const date = new Date(Number(oneSlotBefore) * 1000);
319
323
  this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
320
324
  oneSlotBefore,
321
325
  });
322
- await waitUntilL1Timestamp(this.l1Client, oneSlotBefore);
326
+ // Use a timeout that accounts for the full proof submission window
327
+ const proofSubmissionWindowDuration =
328
+ this.constants.proofSubmissionEpochs * this.epochDuration * this.L2_SLOT_DURATION_IN_S;
329
+ await waitUntilL1Timestamp(this.l1Client, oneSlotBefore, undefined, proofSubmissionWindowDuration * 2);
323
330
  }
324
331
 
325
332
  /** Waits for the aztec node to sync to the target block number. */
326
- public async waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalized' | 'historic') {
333
+ public async waitForNodeToSync(blockNumber: BlockNumber, type: 'proven' | 'finalized' | 'historic') {
327
334
  const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
328
335
  let synched = false;
329
336
  while (!synched) {
@@ -334,7 +341,7 @@ export class EpochsTestContext {
334
341
  ]);
335
342
  this.logger.info(`Wait for node synch ${blockNumber} ${type}`, { blockNumber, type, syncState, tips });
336
343
  if (type === 'proven') {
337
- synched = tips.proven.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
344
+ synched = tips.proven.block.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
338
345
  } else if (type === 'finalized') {
339
346
  synched = syncState.finalizedBlockNumber >= blockNumber;
340
347
  } else {
@@ -356,23 +363,34 @@ export class EpochsTestContext {
356
363
  return SpamContract.at(instance.address, wallet);
357
364
  }
358
365
 
366
+ /** Registers the TestContract on the given wallet. */
367
+ public async registerTestContract(wallet: Wallet, salt = Fr.ZERO) {
368
+ const instance = await getContractInstanceFromInstantiationParams(TestContract.artifact, {
369
+ constructorArgs: [],
370
+ constructorArtifact: undefined,
371
+ salt,
372
+ publicKeys: undefined,
373
+ deployer: undefined,
374
+ });
375
+ await wallet.registerContract(instance, TestContract.artifact);
376
+ return TestContract.at(instance.address, wallet);
377
+ }
378
+
359
379
  /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
360
380
  public async createL1Client() {
361
- const { client, delayer } = withDelayer(
362
- createExtendedL1Client(
363
- [...this.l1Client.chain.rpcUrls.default.http],
364
- privateKeyToAccount(this.getNextPrivateKey()),
365
- this.l1Client.chain,
366
- ),
367
- this.context.dateProvider!,
368
- { ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S },
381
+ const rawClient = createExtendedL1Client(
382
+ [...this.l1Client.chain.rpcUrls.default.http],
383
+ privateKeyToAccount(this.getNextPrivateKey()),
384
+ this.l1Client.chain,
369
385
  );
386
+ const delayer = createDelayer(this.context.dateProvider, { ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S }, {});
387
+ const client = wrapClientWithDelayer(rawClient, delayer);
370
388
  expect(await client.getBalance({ address: client.account.address })).toBeGreaterThan(0n);
371
389
  return { client, delayer };
372
390
  }
373
391
 
374
392
  /** Verifies whether the given block number is found on the aztec node. */
375
- public async verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean) {
393
+ public async verifyHistoricBlock(blockNumber: BlockParameter, expectedSuccess: boolean) {
376
394
  // We use `findLeavesIndexes` here, but could use any function that queries the world-state
377
395
  // at a particular block, so we know whether that historic block is available or has been
378
396
  // pruned. Note that `getBlock` would not work here, since it only hits the archiver.
@@ -383,6 +401,38 @@ export class EpochsTestContext {
383
401
  expect(result).toBe(expectedSuccess);
384
402
  }
385
403
 
404
+ /** Verifies at least one checkpoint has the target number of blocks (for MBPS validation). */
405
+ public async assertMultipleBlocksPerSlot(targetBlockCount: number) {
406
+ const archiver = (this.context.aztecNode as AztecNodeService).getBlockSource() as Archiver;
407
+ const checkpoints = await archiver.getCheckpoints(CheckpointNumber(1), 50);
408
+
409
+ this.logger.warn(`Retrieved ${checkpoints.length} checkpoints from archiver`, {
410
+ checkpoints: checkpoints.map(pc => pc.checkpoint.getStats()),
411
+ });
412
+
413
+ let expectedBlockNumber = checkpoints[0].checkpoint.blocks[0].number;
414
+ let targetFound = false;
415
+
416
+ for (const checkpoint of checkpoints) {
417
+ const blockCount = checkpoint.checkpoint.blocks.length;
418
+ targetFound = targetFound || blockCount >= targetBlockCount;
419
+
420
+ this.logger.verbose(`Checkpoint ${checkpoint.checkpoint.number} has ${blockCount} blocks`, {
421
+ checkpoint: checkpoint.checkpoint.getStats(),
422
+ });
423
+
424
+ for (let i = 0; i < blockCount; i++) {
425
+ const block = checkpoint.checkpoint.blocks[i];
426
+ expect(block.indexWithinCheckpoint).toBe(i);
427
+ expect(block.checkpointNumber).toBe(checkpoint.checkpoint.number);
428
+ expect(block.number).toBe(expectedBlockNumber);
429
+ expectedBlockNumber++;
430
+ }
431
+ }
432
+
433
+ expect(targetFound).toBe(true);
434
+ }
435
+
386
436
  public watchSequencerEvents(
387
437
  sequencers: SequencerClient[],
388
438
  getMetadata: (i: number) => Record<string, any> = () => ({}),
@@ -390,11 +440,11 @@ export class EpochsTestContext {
390
440
  const stateChanges: TrackedSequencerEvent[] = [];
391
441
  const failEvents: TrackedSequencerEvent[] = [];
392
442
 
393
- // Note we do not include the 'tx-count-check-failed' event here, since it is fine if we dont build
443
+ // Note we do not include the 'block-tx-count-check-failed' event here, since it is fine if we dont build
394
444
  // due to lack of txs available.
395
445
  const failEventsKeys: (keyof SequencerEvents)[] = [
396
446
  'block-build-failed',
397
- 'block-publish-failed',
447
+ 'checkpoint-publish-failed',
398
448
  'proposer-rollup-check-failed',
399
449
  ];
400
450
 
@@ -1,14 +1,14 @@
1
1
  import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
2
2
  import { Fr } from '@aztec/aztec.js/fields';
3
3
  import type { Logger } from '@aztec/aztec.js/log';
4
- import { Fq } from '@aztec/foundation/fields';
4
+ import { Fq } from '@aztec/foundation/curves/bn254';
5
5
  import { sleep } from '@aztec/foundation/sleep';
6
6
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
7
- import type { TestWallet } from '@aztec/test-wallet/server';
8
7
 
9
8
  import { jest } from '@jest/globals';
10
9
  import type { Hex } from 'viem';
11
10
 
11
+ import type { TestWallet } from '../test-wallet/test_wallet.js';
12
12
  import { FeesTest } from './fees_test.js';
13
13
 
14
14
  jest.setTimeout(300_000);
@@ -26,11 +26,8 @@ describe('e2e_fees bridging_race', () => {
26
26
  });
27
27
 
28
28
  beforeAll(async () => {
29
- await t.applyInitialAccountsSnapshot();
30
- await t.applyPublicDeployAccountsSnapshot();
31
- await t.applySetupFeeJuiceSnapshot();
32
-
33
- ({ wallet, logger } = await t.setup());
29
+ await t.setup();
30
+ ({ wallet, logger } = t);
34
31
  });
35
32
 
36
33
  afterAll(async () => {
@@ -60,7 +57,7 @@ describe('e2e_fees bridging_race', () => {
60
57
  const origApprove = l1TokenManager.approve.bind(l1TokenManager);
61
58
  l1TokenManager.approve = async (amount: bigint, address: Hex, addressName = '') => {
62
59
  await origApprove(amount, address, addressName);
63
- const sleepTime = (Number(t.chainMonitor.l2BlockTimestamp) + AZTEC_SLOT_DURATION) * 1000 - Date.now() - 500;
60
+ const sleepTime = (Number(t.chainMonitor.checkpointTimestamp) + AZTEC_SLOT_DURATION) * 1000 - Date.now() - 500;
64
61
  logger.info(`Sleeping for ${sleepTime}ms until near end of L2 slot before sending L1 fee juice to L2 inbox`);
65
62
  await sleep(sleepTime);
66
63
  };
@@ -70,10 +67,7 @@ describe('e2e_fees bridging_race', () => {
70
67
  // Yes, we need to REFACTOR it at some point
71
68
  const claim = await t.feeJuiceBridgeTestHarness.prepareTokensOnL1(bobsAddress);
72
69
  const { claimSecret: secret, messageLeafIndex: index } = claim;
73
- await t.feeJuiceContract.methods
74
- .claim(bobsAddress, claim.claimAmount, secret, index)
75
- .send({ from: bobsAddress })
76
- .wait();
70
+ await t.feeJuiceContract.methods.claim(bobsAddress, claim.claimAmount, secret, index).send({ from: bobsAddress });
77
71
  const [balance] = await t.getGasBalanceFn(bobsAddress);
78
72
  expect(balance).toEqual(claim.claimAmount);
79
73
  });