@aztec/end-to-end 0.0.1-commit.b655e406 → 0.0.1-commit.b8a057fa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +217 -14
- package/dest/automine/automine_test_context.d.ts +85 -0
- package/dest/automine/automine_test_context.d.ts.map +1 -0
- package/dest/automine/automine_test_context.js +98 -0
- package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts +2 -0
- package/dest/automine/contracts/fixtures/storage_proof_fetcher.d.ts.map +1 -0
- package/dest/automine/contracts/fixtures/storage_proof_fetcher.js +184 -0
- package/dest/automine/contracts/fixtures/storage_proof_fixture.d.ts +18 -0
- package/dest/automine/contracts/fixtures/storage_proof_fixture.d.ts.map +1 -0
- package/dest/automine/contracts/fixtures/storage_proof_fixture.js +120 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts +17 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts.map +1 -0
- package/dest/automine/delivery/onchain_delivery_harness.js +123 -0
- package/dest/automine/token/blacklist_token_contract_test.d.ts +49 -0
- package/dest/automine/token/blacklist_token_contract_test.d.ts.map +1 -0
- package/dest/automine/token/blacklist_token_contract_test.js +166 -0
- package/dest/automine/token/token_contract_test.d.ts +40 -0
- package/dest/automine/token/token_contract_test.d.ts.map +1 -0
- package/dest/automine/token/token_contract_test.js +119 -0
- package/dest/automine/token/token_test_helpers.d.ts +73 -0
- package/dest/automine/token/token_test_helpers.d.ts.map +1 -0
- package/dest/automine/token/token_test_helpers.js +97 -0
- package/dest/bench/client_flows/benchmark.d.ts +17 -2
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +40 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +26 -20
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +159 -140
- package/dest/bench/client_flows/config.d.ts +2 -2
- package/dest/bench/client_flows/config.d.ts.map +1 -1
- package/dest/bench/client_flows/config.js +18 -0
- package/dest/bench/client_flows/data_extractor.d.ts +1 -1
- package/dest/bench/client_flows/data_extractor.js +8 -27
- package/dest/bench/utils.d.ts +10 -9
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +126 -23
- package/dest/composed/ha/ha_full_setup.d.ts +77 -0
- package/dest/composed/ha/ha_full_setup.d.ts.map +1 -0
- package/dest/composed/ha/ha_full_setup.js +383 -0
- package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts +12 -0
- package/dest/composed/web3signer/multi_validator_keystore_utils.d.ts.map +1 -0
- package/dest/{e2e_multi_validator/utils.js → composed/web3signer/multi_validator_keystore_utils.js} +1 -1
- package/dest/fixtures/authwit_proxy.d.ts +15 -0
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
- package/dest/fixtures/authwit_proxy.js +34 -0
- package/dest/fixtures/e2e_prover_test.d.ts +27 -29
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +156 -156
- package/dest/fixtures/elu_monitor.d.ts +21 -0
- package/dest/fixtures/elu_monitor.d.ts.map +1 -0
- package/dest/fixtures/elu_monitor.js +102 -0
- package/dest/fixtures/fixtures.d.ts +83 -3
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +86 -3
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.js +1 -1
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +5 -5
- package/dest/fixtures/ha_setup.d.ts +71 -0
- package/dest/fixtures/ha_setup.d.ts.map +1 -0
- package/dest/fixtures/ha_setup.js +119 -0
- package/dest/fixtures/index.d.ts +3 -1
- package/dest/fixtures/index.d.ts.map +1 -1
- package/dest/fixtures/index.js +2 -0
- package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +2 -2
- package/dest/fixtures/logging.d.ts +1 -1
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
- package/dest/fixtures/setup.d.ts +269 -0
- package/dest/fixtures/setup.d.ts.map +1 -0
- package/dest/fixtures/setup.js +688 -0
- package/dest/fixtures/setup_p2p_test.d.ts +22 -11
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +60 -41
- package/dest/fixtures/timing.d.ts +42 -0
- package/dest/fixtures/timing.d.ts.map +1 -0
- package/dest/fixtures/timing.js +72 -0
- package/dest/fixtures/token_utils.d.ts +26 -5
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +33 -9
- package/dest/fixtures/utils.d.ts +5 -192
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +4 -648
- package/dest/fixtures/wait_helpers.d.ts +135 -0
- package/dest/fixtures/wait_helpers.d.ts.map +1 -0
- package/dest/fixtures/wait_helpers.js +154 -0
- package/dest/fixtures/web3signer.d.ts +1 -1
- package/dest/fixtures/web3signer.js +1 -1
- package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
- package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
- package/dest/fixtures/with_telemetry_utils.js +2 -2
- package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
- package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
- package/dest/forward-compatibility/wallet_service.d.ts +3 -0
- package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_service.js +109 -0
- package/dest/index.d.ts +1 -1
- package/dest/install_legacy_contracts.d.cts +10 -0
- package/dest/install_legacy_contracts.d.cts.map +1 -0
- package/dest/legacy-jest-resolver.d.cts +3 -0
- package/dest/legacy-jest-resolver.d.cts.map +1 -0
- package/dest/multi-node/block-production/setup.d.ts +97 -0
- package/dest/multi-node/block-production/setup.d.ts.map +1 -0
- package/dest/multi-node/block-production/setup.js +158 -0
- package/dest/multi-node/governance/setup.d.ts +67 -0
- package/dest/multi-node/governance/setup.d.ts.map +1 -0
- package/dest/multi-node/governance/setup.js +126 -0
- package/dest/multi-node/multi_node_test_context.d.ts +212 -0
- package/dest/multi-node/multi_node_test_context.d.ts.map +1 -0
- package/dest/multi-node/multi_node_test_context.js +347 -0
- package/dest/multi-node/slashing/inactivity_setup.d.ts +27 -0
- package/dest/multi-node/slashing/inactivity_setup.d.ts.map +1 -0
- package/dest/multi-node/slashing/inactivity_setup.js +111 -0
- package/dest/multi-node/slashing/setup.d.ts +167 -0
- package/dest/multi-node/slashing/setup.d.ts.map +1 -0
- package/dest/multi-node/slashing/setup.js +275 -0
- package/dest/p2p/p2p_network.d.ts +325 -0
- package/dest/p2p/p2p_network.d.ts.map +1 -0
- package/dest/p2p/p2p_network.js +389 -0
- package/dest/p2p/reqresp/utils.d.ts +19 -0
- package/dest/p2p/reqresp/utils.d.ts.map +1 -0
- package/dest/p2p/reqresp/utils.js +193 -0
- package/dest/p2p/shared.d.ts +72 -0
- package/dest/p2p/shared.d.ts.map +1 -0
- package/dest/p2p/shared.js +212 -0
- package/dest/quality_of_service/grafana_client.d.ts +41 -0
- package/dest/quality_of_service/grafana_client.d.ts.map +1 -0
- package/dest/quality_of_service/{alert_checker.js → grafana_client.js} +1 -1
- package/dest/quality_of_service/prometheus_client.d.ts +38 -0
- package/dest/quality_of_service/prometheus_client.d.ts.map +1 -0
- package/dest/quality_of_service/prometheus_client.js +67 -0
- package/dest/shared/cross_chain_test_harness.d.ts +11 -8
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +45 -40
- package/dest/shared/gas_portal_test_harness.d.ts +9 -6
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +28 -16
- package/dest/shared/index.d.ts +3 -2
- package/dest/shared/index.d.ts.map +1 -1
- package/dest/shared/index.js +1 -0
- package/dest/shared/jest_setup.d.ts +1 -1
- package/dest/shared/jest_setup.js +41 -1
- package/dest/shared/mock_state_view.d.ts +86 -0
- package/dest/shared/mock_state_view.d.ts.map +1 -0
- package/dest/shared/mock_state_view.js +186 -0
- package/dest/shared/submit-transactions.d.ts +4 -4
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +19 -14
- package/dest/shared/timing_env.d.js +5 -0
- package/dest/shared/timing_env.js +365 -0
- package/dest/shared/uniswap_l1_l2.d.ts +3 -27
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +86 -54
- package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
- package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
- package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
- package/dest/simulators/index.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts +11 -4
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +33 -19
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +3 -24
- package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts +75 -0
- package/dest/single-node/cross-chain/cross_chain_messaging_test.d.ts.map +1 -0
- package/dest/single-node/cross-chain/cross_chain_messaging_test.js +209 -0
- package/dest/single-node/cross-chain/message_test_helpers.d.ts +38 -0
- package/dest/single-node/cross-chain/message_test_helpers.d.ts.map +1 -0
- package/dest/single-node/cross-chain/message_test_helpers.js +70 -0
- package/dest/single-node/fees/bridging_race.notest.d.ts +2 -0
- package/dest/single-node/fees/bridging_race.notest.d.ts.map +1 -0
- package/dest/{e2e_fees → single-node/fees}/bridging_race.notest.js +21 -10
- package/dest/single-node/fees/fees_test.d.ts +93 -0
- package/dest/single-node/fees/fees_test.d.ts.map +1 -0
- package/dest/single-node/fees/fees_test.js +274 -0
- package/dest/single-node/l1-reorgs/setup.d.ts +42 -0
- package/dest/single-node/l1-reorgs/setup.d.ts.map +1 -0
- package/dest/single-node/l1-reorgs/setup.js +57 -0
- package/dest/single-node/partial-proofs/setup.d.ts +5 -0
- package/dest/single-node/partial-proofs/setup.d.ts.map +1 -0
- package/dest/single-node/partial-proofs/setup.js +5 -0
- package/dest/single-node/proving/setup.d.ts +5 -0
- package/dest/single-node/proving/setup.d.ts.map +1 -0
- package/dest/single-node/proving/setup.js +5 -0
- package/dest/single-node/recovery/setup.d.ts +5 -0
- package/dest/single-node/recovery/setup.d.ts.map +1 -0
- package/dest/single-node/recovery/setup.js +5 -0
- package/dest/single-node/setup.d.ts +49 -0
- package/dest/single-node/setup.d.ts.map +1 -0
- package/dest/single-node/setup.js +56 -0
- package/dest/single-node/single_node_test_context.d.ts +360 -0
- package/dest/single-node/single_node_test_context.d.ts.map +1 -0
- package/dest/single-node/single_node_test_context.js +833 -0
- package/dest/spartan/setup_test_wallets.d.ts +18 -6
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +169 -30
- package/dest/spartan/tx_metrics.d.ts +111 -0
- package/dest/spartan/tx_metrics.d.ts.map +1 -0
- package/dest/spartan/tx_metrics.js +507 -0
- package/dest/spartan/utils/bot.d.ts +28 -0
- package/dest/spartan/utils/bot.d.ts.map +1 -0
- package/dest/spartan/utils/bot.js +142 -0
- package/dest/spartan/utils/chaos.d.ts +79 -0
- package/dest/spartan/utils/chaos.d.ts.map +1 -0
- package/dest/spartan/utils/chaos.js +142 -0
- package/dest/spartan/utils/clients.d.ts +39 -0
- package/dest/spartan/utils/clients.d.ts.map +1 -0
- package/dest/spartan/utils/clients.js +90 -0
- package/dest/spartan/utils/config.d.ts +19 -0
- package/dest/spartan/utils/config.d.ts.map +1 -0
- package/dest/spartan/utils/config.js +23 -0
- package/dest/spartan/utils/health.d.ts +63 -0
- package/dest/spartan/utils/health.d.ts.map +1 -0
- package/dest/spartan/utils/health.js +202 -0
- package/dest/spartan/utils/helm.d.ts +15 -0
- package/dest/spartan/utils/helm.d.ts.map +1 -0
- package/dest/spartan/utils/helm.js +47 -0
- package/dest/spartan/utils/index.d.ts +11 -0
- package/dest/spartan/utils/index.d.ts.map +1 -0
- package/dest/spartan/utils/index.js +22 -0
- package/dest/spartan/utils/k8s.d.ts +128 -0
- package/dest/spartan/utils/k8s.d.ts.map +1 -0
- package/dest/spartan/utils/k8s.js +381 -0
- package/dest/spartan/utils/nodes.d.ts +40 -0
- package/dest/spartan/utils/nodes.d.ts.map +1 -0
- package/dest/spartan/utils/nodes.js +461 -0
- package/dest/spartan/utils/pod_logs.d.ts +25 -0
- package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
- package/dest/spartan/utils/pod_logs.js +74 -0
- package/dest/spartan/utils/scripts.d.ts +30 -0
- package/dest/spartan/utils/scripts.d.ts.map +1 -0
- package/dest/spartan/utils/scripts.js +81 -0
- package/dest/spartan/utils.d.ts +2 -218
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +1 -749
- package/dest/test-wallet/test_wallet.d.ts +105 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +323 -0
- package/dest/test-wallet/utils.d.ts +76 -0
- package/dest/test-wallet/utils.d.ts.map +1 -0
- package/dest/test-wallet/utils.js +126 -0
- package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
- package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
- package/dest/test-wallet/wallet_worker_script.js +56 -0
- package/dest/test-wallet/worker_wallet.d.ts +53 -0
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet.js +155 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts +4 -0
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
- package/dest/test-wallet/worker_wallet_schema.js +22 -0
- package/package.json +57 -47
- package/src/automine/README.md +60 -0
- package/src/automine/automine_test_context.ts +153 -0
- package/src/automine/contracts/fixtures/storage_proof.json +915 -0
- package/src/automine/contracts/fixtures/storage_proof_fetcher.ts +190 -0
- package/src/automine/contracts/fixtures/storage_proof_fixture.ts +173 -0
- package/src/automine/delivery/onchain_delivery_harness.ts +177 -0
- package/src/automine/token/blacklist_token_contract_test.ts +208 -0
- package/src/automine/token/token_contract_test.ts +146 -0
- package/src/automine/token/token_test_helpers.ts +138 -0
- package/src/bench/client_flows/benchmark.ts +45 -2
- package/src/bench/client_flows/client_flows_benchmark.ts +227 -211
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/client_flows/data_extractor.ts +7 -28
- package/src/bench/utils.ts +144 -25
- package/src/composed/ha/ha_full_setup.ts +466 -0
- package/src/{e2e_multi_validator/utils.ts → composed/web3signer/multi_validator_keystore_utils.ts} +1 -1
- package/src/fixtures/authwit_proxy.ts +54 -0
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +175 -214
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +110 -5
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/get_bb_config.ts +7 -6
- package/src/fixtures/ha_setup.ts +192 -0
- package/src/fixtures/index.ts +2 -0
- package/src/fixtures/l1_to_l2_messaging.ts +4 -2
- package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
- package/src/fixtures/setup.ts +987 -0
- package/src/fixtures/setup_p2p_test.ts +72 -58
- package/src/fixtures/timing.ts +97 -0
- package/src/fixtures/token_utils.ts +47 -11
- package/src/fixtures/utils.ts +26 -947
- package/src/fixtures/wait_helpers.ts +333 -0
- package/src/fixtures/web3signer.ts +1 -1
- package/src/fixtures/with_telemetry_utils.ts +2 -2
- package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
- package/src/forward-compatibility/wallet_service.ts +106 -0
- package/src/guides/up_quick_start.sh +8 -5
- package/src/infra/README.md +12 -0
- package/src/install_legacy_contracts.cjs +75 -0
- package/src/legacy-jest-resolver.cjs +112 -0
- package/src/multi-node/README.md +95 -0
- package/src/multi-node/block-production/setup.ts +272 -0
- package/src/multi-node/governance/setup.ts +172 -0
- package/src/multi-node/multi_node_test_context.ts +447 -0
- package/src/multi-node/slashing/inactivity_setup.ts +139 -0
- package/src/multi-node/slashing/setup.ts +433 -0
- package/src/p2p/README.md +78 -0
- package/src/p2p/p2p_network.ts +542 -0
- package/src/p2p/reqresp/utils.ts +263 -0
- package/src/p2p/shared.ts +329 -0
- package/src/quality_of_service/{alert_checker.ts → grafana_client.ts} +1 -1
- package/src/quality_of_service/prometheus_client.ts +113 -0
- package/src/shared/cross_chain_test_harness.ts +51 -43
- package/src/shared/gas_portal_test_harness.ts +36 -18
- package/src/shared/index.ts +2 -1
- package/src/shared/jest_setup.ts +51 -1
- package/src/shared/mock_state_view.ts +188 -0
- package/src/shared/submit-transactions.ts +22 -19
- package/src/shared/timing_env.d.mts +39 -0
- package/src/shared/timing_env.mjs +363 -0
- package/src/shared/uniswap_l1_l2.ts +136 -115
- package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
- package/src/simulators/lending_simulator.ts +40 -20
- package/src/simulators/token_simulator.ts +6 -30
- package/src/single-node/README.md +60 -0
- package/src/single-node/cross-chain/cross_chain_messaging_test.ts +302 -0
- package/src/single-node/cross-chain/message_test_helpers.ts +125 -0
- package/src/{e2e_fees → single-node/fees}/bridging_race.notest.ts +23 -15
- package/src/single-node/fees/fees_test.ts +368 -0
- package/src/single-node/l1-reorgs/setup.ts +93 -0
- package/src/single-node/partial-proofs/setup.ts +8 -0
- package/src/single-node/proving/setup.ts +15 -0
- package/src/single-node/recovery/setup.ts +8 -0
- package/src/single-node/setup.ts +63 -0
- package/src/single-node/single_node_test_context.ts +1041 -0
- package/src/spartan/DEVELOP.md +7 -0
- package/src/spartan/setup_test_wallets.ts +243 -32
- package/src/spartan/tx_metrics.ts +460 -0
- package/src/spartan/utils/bot.ts +188 -0
- package/src/spartan/utils/chaos.ts +253 -0
- package/src/spartan/utils/clients.ts +100 -0
- package/src/spartan/utils/config.ts +29 -0
- package/src/spartan/utils/health.ts +255 -0
- package/src/spartan/utils/helm.ts +84 -0
- package/src/spartan/utils/index.ts +71 -0
- package/src/spartan/utils/k8s.ts +535 -0
- package/src/spartan/utils/nodes.ts +543 -0
- package/src/spartan/utils/pod_logs.ts +99 -0
- package/src/spartan/utils/scripts.ts +99 -0
- package/src/spartan/utils.ts +1 -942
- package/src/test-wallet/test_wallet.ts +429 -0
- package/src/test-wallet/utils.ts +205 -0
- package/src/test-wallet/wallet_worker_script.ts +66 -0
- package/src/test-wallet/worker_wallet.ts +214 -0
- package/src/test-wallet/worker_wallet_schema.ts +14 -0
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +0 -54
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +0 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +0 -185
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +0 -41
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +0 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +0 -107
- package/dest/e2e_deploy_contract/deploy_test.d.ts +0 -36
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +0 -1
- package/dest/e2e_deploy_contract/deploy_test.js +0 -45
- package/dest/e2e_epochs/epochs_test.d.ts +0 -92
- package/dest/e2e_epochs/epochs_test.d.ts.map +0 -1
- package/dest/e2e_epochs/epochs_test.js +0 -336
- package/dest/e2e_fees/bridging_race.notest.d.ts +0 -2
- package/dest/e2e_fees/bridging_race.notest.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.d.ts +0 -84
- package/dest/e2e_fees/fees_test.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.js +0 -260
- package/dest/e2e_l1_publisher/write_json.d.ts +0 -10
- package/dest/e2e_l1_publisher/write_json.d.ts.map +0 -1
- package/dest/e2e_l1_publisher/write_json.js +0 -57
- package/dest/e2e_multi_validator/utils.d.ts +0 -12
- package/dest/e2e_multi_validator/utils.d.ts.map +0 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +0 -29
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +0 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +0 -63
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +0 -31
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +0 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +0 -135
- package/dest/e2e_p2p/p2p_network.d.ts +0 -108
- package/dest/e2e_p2p/p2p_network.d.ts.map +0 -1
- package/dest/e2e_p2p/p2p_network.js +0 -318
- package/dest/e2e_p2p/shared.d.ts +0 -46
- package/dest/e2e_p2p/shared.d.ts.map +0 -1
- package/dest/e2e_p2p/shared.js +0 -183
- package/dest/e2e_token_contract/token_contract_test.d.ts +0 -35
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +0 -1
- package/dest/e2e_token_contract/token_contract_test.js +0 -126
- package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
- package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
- package/dest/fixtures/setup_l1_contracts.js +0 -17
- package/dest/fixtures/snapshot_manager.d.ts +0 -95
- package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
- package/dest/fixtures/snapshot_manager.js +0 -505
- package/dest/quality_of_service/alert_checker.d.ts +0 -41
- package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +0 -256
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +0 -178
- package/src/e2e_deploy_contract/deploy_test.ts +0 -78
- package/src/e2e_epochs/epochs_test.ts +0 -437
- package/src/e2e_fees/fees_test.ts +0 -378
- package/src/e2e_l1_publisher/write_json.ts +0 -76
- package/src/e2e_nested_contract/nested_contract_test.ts +0 -95
- package/src/e2e_p2p/inactivity_slash_test.ts +0 -178
- package/src/e2e_p2p/p2p_network.ts +0 -472
- package/src/e2e_p2p/shared.ts +0 -282
- package/src/e2e_token_contract/token_contract_test.ts +0 -167
- package/src/fixtures/setup_l1_contracts.ts +0 -26
- package/src/fixtures/snapshot_manager.ts +0 -665
package/src/spartan/DEVELOP.md
CHANGED
|
@@ -61,10 +61,17 @@ The export is important there. The `AZTEC_DOCKER_IMAGE` env var is used as both:
|
|
|
61
61
|
- the containers for the aztec infrastructure (validators, provers, etc)
|
|
62
62
|
|
|
63
63
|
# Deploy Metrics
|
|
64
|
+
|
|
64
65
|
```bash
|
|
65
66
|
./spartan/bootstrap.sh metrics-kind
|
|
66
67
|
```
|
|
67
68
|
|
|
69
|
+
# Install Chaos Mesh
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
./spartan/bootstrap.sh chaos-mesh
|
|
73
|
+
```
|
|
74
|
+
|
|
68
75
|
# Deploy stuff
|
|
69
76
|
|
|
70
77
|
```bash
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
2
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
2
3
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
4
|
+
import { DefaultWaitOpts, NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
5
|
import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
|
|
4
6
|
import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
|
|
5
7
|
import { type FeePaymentMethod, SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
6
8
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
7
|
-
import {
|
|
9
|
+
import { waitForL1ToL2MessageReady } from '@aztec/aztec.js/messaging';
|
|
10
|
+
import { type AztecNode, createAztecNodeClient, waitForTx } from '@aztec/aztec.js/node';
|
|
8
11
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
9
|
-
import { createEthereumChain
|
|
12
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
13
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
10
14
|
import type { Logger } from '@aztec/foundation/log';
|
|
11
|
-
import { retryUntil } from '@aztec/foundation/retry';
|
|
15
|
+
import { makeBackoff, retry, retryUntil } from '@aztec/foundation/retry';
|
|
12
16
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
17
|
+
import { Gas } from '@aztec/stdlib/gas';
|
|
13
18
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
14
|
-
import {
|
|
19
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
20
|
+
import { getGasLimits } from '@aztec/wallet-sdk/base-wallet';
|
|
21
|
+
import { registerInitialLocalNetworkAccountsInWallet } from '@aztec/wallets/testing';
|
|
15
22
|
|
|
16
23
|
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
17
24
|
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
18
25
|
import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
|
|
26
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
27
|
+
import { proveInteraction } from '../test-wallet/utils.js';
|
|
28
|
+
import { WorkerWallet } from '../test-wallet/worker_wallet.js';
|
|
19
29
|
|
|
20
30
|
export interface TestAccounts {
|
|
21
31
|
aztecNode: AztecNode;
|
|
@@ -28,6 +38,11 @@ export interface TestAccounts {
|
|
|
28
38
|
tokenAddress: AztecAddress;
|
|
29
39
|
}
|
|
30
40
|
|
|
41
|
+
export type TestAccountsWithoutTokens = Omit<
|
|
42
|
+
TestAccounts,
|
|
43
|
+
'tokenAddress' | 'tokenContract' | 'tokenName' | 'tokenAdminAddress'
|
|
44
|
+
>;
|
|
45
|
+
|
|
31
46
|
const TOKEN_NAME = 'USDC';
|
|
32
47
|
const TOKEN_SYMBOL = 'USD';
|
|
33
48
|
const TOKEN_DECIMALS = 18n;
|
|
@@ -41,15 +56,17 @@ export async function setupTestAccountsWithTokens(
|
|
|
41
56
|
|
|
42
57
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
43
58
|
const wallet = await TestWallet.create(aztecNode);
|
|
59
|
+
// Remote JSON-RPC node: keep the 1s poll cadence rather than the in-process TestWallet fast default.
|
|
60
|
+
wallet.setDefaultWaitInterval(DefaultWaitOpts.interval);
|
|
44
61
|
|
|
45
|
-
const [recipientAccount, ...accounts] = (await
|
|
62
|
+
const [recipientAccount, ...accounts] = (await registerInitialLocalNetworkAccountsInWallet(wallet)).slice(
|
|
46
63
|
0,
|
|
47
64
|
ACCOUNT_COUNT + 1,
|
|
48
65
|
);
|
|
49
66
|
|
|
50
67
|
const tokenAdmin = accounts[0];
|
|
51
68
|
const tokenAddress = await deployTokenAndMint(wallet, accounts, tokenAdmin, mintAmount, undefined, logger);
|
|
52
|
-
const tokenContract =
|
|
69
|
+
const tokenContract = TokenContract.at(tokenAddress, wallet);
|
|
53
70
|
|
|
54
71
|
return {
|
|
55
72
|
aztecNode,
|
|
@@ -63,7 +80,7 @@ export async function setupTestAccountsWithTokens(
|
|
|
63
80
|
};
|
|
64
81
|
}
|
|
65
82
|
|
|
66
|
-
export async function
|
|
83
|
+
export async function deploySponsoredTestAccountsWithTokens(
|
|
67
84
|
wallet: TestWallet,
|
|
68
85
|
aztecNode: AztecNode,
|
|
69
86
|
mintAmount: bigint,
|
|
@@ -78,11 +95,19 @@ export async function deploySponsoredTestAccounts(
|
|
|
78
95
|
|
|
79
96
|
const paymentMethod = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
80
97
|
const recipientDeployMethod = await recipientAccount.getDeployMethod();
|
|
81
|
-
await recipientDeployMethod.send({
|
|
98
|
+
await recipientDeployMethod.send({
|
|
99
|
+
from: NO_FROM,
|
|
100
|
+
fee: { paymentMethod },
|
|
101
|
+
wait: { timeout: 2400 },
|
|
102
|
+
});
|
|
82
103
|
await Promise.all(
|
|
83
104
|
fundedAccounts.map(async a => {
|
|
84
105
|
const deployMethod = await a.getDeployMethod();
|
|
85
|
-
await deployMethod.send({
|
|
106
|
+
await deployMethod.send({
|
|
107
|
+
from: NO_FROM,
|
|
108
|
+
fee: { paymentMethod },
|
|
109
|
+
wait: { timeout: 2400 },
|
|
110
|
+
}); // increase timeout on purpose in order to account for two empty epochs
|
|
86
111
|
logger.info(`Account deployed at ${a.address}`);
|
|
87
112
|
}),
|
|
88
113
|
);
|
|
@@ -96,7 +121,7 @@ export async function deploySponsoredTestAccounts(
|
|
|
96
121
|
new SponsoredFeePaymentMethod(await getSponsoredFPCAddress()),
|
|
97
122
|
logger,
|
|
98
123
|
);
|
|
99
|
-
const tokenContract =
|
|
124
|
+
const tokenContract = TokenContract.at(tokenAddress, wallet);
|
|
100
125
|
|
|
101
126
|
return {
|
|
102
127
|
aztecNode,
|
|
@@ -110,6 +135,139 @@ export async function deploySponsoredTestAccounts(
|
|
|
110
135
|
};
|
|
111
136
|
}
|
|
112
137
|
|
|
138
|
+
async function deployAccountWithDiagnostics(
|
|
139
|
+
account: { getDeployMethod: () => Promise<{ simulate: (opts: any) => any; send: (opts: any) => any }>; address: any },
|
|
140
|
+
paymentMethod: SponsoredFeePaymentMethod,
|
|
141
|
+
aztecNode: AztecNode,
|
|
142
|
+
logger: Logger,
|
|
143
|
+
accountLabel: string,
|
|
144
|
+
estimateGas?: boolean,
|
|
145
|
+
): Promise<void> {
|
|
146
|
+
const deployMethod = await account.getDeployMethod();
|
|
147
|
+
let gasSettings: any;
|
|
148
|
+
if (estimateGas) {
|
|
149
|
+
const sim = await deployMethod.simulate({ from: NO_FROM, fee: { paymentMethod }, includeMetadata: true });
|
|
150
|
+
const { txsLimits } = await aztecNode.getNodeInfo();
|
|
151
|
+
gasSettings = getGasLimits(sim.gasUsed!, Gas.from(txsLimits.gas));
|
|
152
|
+
logger.info(`${accountLabel} estimated gas: DA=${gasSettings.gasLimits.daGas} L2=${gasSettings.gasLimits.l2Gas}`);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Track the tx hash across retries so we don't re-send when the previous tx is still pending.
|
|
156
|
+
let sentTxHash: { txHash: any } | undefined;
|
|
157
|
+
|
|
158
|
+
await retry(
|
|
159
|
+
async () => {
|
|
160
|
+
// Check if already deployed (handles case where previous attempt succeeded but waitForTx timed out)
|
|
161
|
+
const existing = await aztecNode.getContract(account.address);
|
|
162
|
+
if (existing) {
|
|
163
|
+
logger.info(`${accountLabel} already deployed at ${account.address}, skipping`);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// If we already sent a tx, check if it was dropped before deciding to re-send.
|
|
168
|
+
if (sentTxHash) {
|
|
169
|
+
const prevReceipt = await aztecNode.getTxReceipt(sentTxHash.txHash);
|
|
170
|
+
if (prevReceipt.isDropped()) {
|
|
171
|
+
logger.info(`${accountLabel} previous tx ${sentTxHash.txHash} was dropped, re-sending`);
|
|
172
|
+
sentTxHash = undefined;
|
|
173
|
+
} else {
|
|
174
|
+
logger.info(`${accountLabel} previous tx ${sentTxHash.txHash} still pending, waiting again...`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (!sentTxHash) {
|
|
179
|
+
const deployResult = await deployMethod.send({
|
|
180
|
+
from: NO_FROM,
|
|
181
|
+
fee: { paymentMethod, gasSettings },
|
|
182
|
+
wait: NO_WAIT,
|
|
183
|
+
});
|
|
184
|
+
sentTxHash = { txHash: deployResult.txHash };
|
|
185
|
+
logger.info(`${accountLabel} tx sent`, { txHash: sentTxHash.txHash.toString() });
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const receipt = await waitForTx(aztecNode, sentTxHash.txHash, { timeout: 600 });
|
|
189
|
+
if (receipt.isDropped()) {
|
|
190
|
+
sentTxHash = undefined;
|
|
191
|
+
throw new Error(`${accountLabel} tx was dropped, retrying...`);
|
|
192
|
+
}
|
|
193
|
+
logger.info(`${accountLabel} deployed at ${account.address}`);
|
|
194
|
+
},
|
|
195
|
+
`deploy ${accountLabel}`,
|
|
196
|
+
makeBackoff([1, 2, 4, 8, 16]),
|
|
197
|
+
logger,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async function deployAccountsInBatches(
|
|
202
|
+
accounts: {
|
|
203
|
+
getDeployMethod: () => Promise<{ simulate: (opts: any) => any; send: (opts: any) => any }>;
|
|
204
|
+
address: any;
|
|
205
|
+
}[],
|
|
206
|
+
paymentMethod: SponsoredFeePaymentMethod,
|
|
207
|
+
aztecNode: AztecNode,
|
|
208
|
+
logger: Logger,
|
|
209
|
+
labelPrefix: string,
|
|
210
|
+
batchSize = 2,
|
|
211
|
+
estimateGas?: boolean,
|
|
212
|
+
): Promise<void> {
|
|
213
|
+
for (let i = 0; i < accounts.length; i += batchSize) {
|
|
214
|
+
const batch = accounts.slice(i, i + batchSize);
|
|
215
|
+
await Promise.all(
|
|
216
|
+
batch.map((account, idx) =>
|
|
217
|
+
deployAccountWithDiagnostics(
|
|
218
|
+
account,
|
|
219
|
+
paymentMethod,
|
|
220
|
+
aztecNode,
|
|
221
|
+
logger,
|
|
222
|
+
`${labelPrefix}${i + idx + 1}`,
|
|
223
|
+
estimateGas,
|
|
224
|
+
),
|
|
225
|
+
),
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export async function deploySponsoredTestAccounts(
|
|
231
|
+
wallet: TestWallet,
|
|
232
|
+
aztecNode: AztecNode,
|
|
233
|
+
logger: Logger,
|
|
234
|
+
numberOfFundedWallets = 1,
|
|
235
|
+
opts?: { estimateGas?: boolean },
|
|
236
|
+
): Promise<TestAccountsWithoutTokens> {
|
|
237
|
+
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
238
|
+
const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt);
|
|
239
|
+
const fundedAccounts = await Promise.all(funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt)));
|
|
240
|
+
|
|
241
|
+
await registerSponsoredFPC(wallet);
|
|
242
|
+
|
|
243
|
+
const paymentMethod = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
244
|
+
|
|
245
|
+
await deployAccountWithDiagnostics(
|
|
246
|
+
recipientAccount,
|
|
247
|
+
paymentMethod,
|
|
248
|
+
aztecNode,
|
|
249
|
+
logger,
|
|
250
|
+
'Recipient account',
|
|
251
|
+
opts?.estimateGas,
|
|
252
|
+
);
|
|
253
|
+
await deployAccountsInBatches(
|
|
254
|
+
fundedAccounts,
|
|
255
|
+
paymentMethod,
|
|
256
|
+
aztecNode,
|
|
257
|
+
logger,
|
|
258
|
+
'Funded account ',
|
|
259
|
+
2,
|
|
260
|
+
opts?.estimateGas,
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
return {
|
|
264
|
+
aztecNode,
|
|
265
|
+
wallet,
|
|
266
|
+
accounts: fundedAccounts.map(acc => acc.address),
|
|
267
|
+
recipientAddress: recipientAccount.address,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
|
|
113
271
|
export async function deployTestAccountsWithTokens(
|
|
114
272
|
nodeUrl: string,
|
|
115
273
|
l1RpcUrls: string[],
|
|
@@ -120,6 +278,8 @@ export async function deployTestAccountsWithTokens(
|
|
|
120
278
|
): Promise<TestAccounts> {
|
|
121
279
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
122
280
|
const wallet = await TestWallet.create(aztecNode);
|
|
281
|
+
// Remote JSON-RPC node: keep the 1s poll cadence rather than the in-process TestWallet fast default.
|
|
282
|
+
wallet.setDefaultWaitInterval(DefaultWaitOpts.interval);
|
|
123
283
|
|
|
124
284
|
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
125
285
|
const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt);
|
|
@@ -138,7 +298,7 @@ export async function deployTestAccountsWithTokens(
|
|
|
138
298
|
fundedAccounts.map(async (a, i) => {
|
|
139
299
|
const paymentMethod = new FeeJuicePaymentMethodWithClaim(a.address, claims[i]);
|
|
140
300
|
const deployMethod = await a.getDeployMethod();
|
|
141
|
-
await deployMethod.send({ from:
|
|
301
|
+
await deployMethod.send({ from: NO_FROM, fee: { paymentMethod } });
|
|
142
302
|
logger.info(`Account deployed at ${a.address}`);
|
|
143
303
|
}),
|
|
144
304
|
);
|
|
@@ -152,7 +312,7 @@ export async function deployTestAccountsWithTokens(
|
|
|
152
312
|
undefined,
|
|
153
313
|
logger,
|
|
154
314
|
);
|
|
155
|
-
const tokenContract =
|
|
315
|
+
const tokenContract = TokenContract.at(tokenAddress, wallet);
|
|
156
316
|
|
|
157
317
|
return {
|
|
158
318
|
aztecNode,
|
|
@@ -181,9 +341,7 @@ async function bridgeL1FeeJuice(
|
|
|
181
341
|
const portal = await L1FeeJuicePortalManager.new(aztecNode, l1Client, log);
|
|
182
342
|
const claim = await portal.bridgeTokensPublic(recipient, amount, true /* mint */);
|
|
183
343
|
|
|
184
|
-
|
|
185
|
-
(await aztecNode.getL1ToL2MessageBlock(Fr.fromHexString(claim.messageHash))) !== undefined;
|
|
186
|
-
await retryUntil(isSynced, `message ${claim.messageHash} sync`, 24, 0.5);
|
|
344
|
+
await waitForL1ToL2MessageReady(aztecNode, Fr.fromHexString(claim.messageHash), { timeoutSeconds: 24 });
|
|
187
345
|
|
|
188
346
|
log.info(`Created a claim for ${amount} L1 fee juice to ${recipient}.`, claim);
|
|
189
347
|
return claim;
|
|
@@ -214,25 +372,29 @@ async function deployTokenAndMint(
|
|
|
214
372
|
logger: Logger,
|
|
215
373
|
) {
|
|
216
374
|
logger.verbose(`Deploying TokenContract...`);
|
|
217
|
-
const tokenContract = await TokenContract.deploy(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
375
|
+
const { contract: tokenContract } = await TokenContract.deploy(
|
|
376
|
+
wallet,
|
|
377
|
+
admin,
|
|
378
|
+
TOKEN_NAME,
|
|
379
|
+
TOKEN_SYMBOL,
|
|
380
|
+
TOKEN_DECIMALS,
|
|
381
|
+
).send({
|
|
382
|
+
from: admin,
|
|
383
|
+
fee: {
|
|
384
|
+
paymentMethod,
|
|
385
|
+
},
|
|
386
|
+
wait: { timeout: 600 },
|
|
387
|
+
});
|
|
225
388
|
|
|
226
389
|
const tokenAddress = tokenContract.address;
|
|
227
390
|
|
|
228
391
|
logger.verbose(`Minting ${mintAmount} public assets to the ${accounts.length} accounts...`);
|
|
229
392
|
|
|
230
393
|
await Promise.all(
|
|
231
|
-
accounts.map(
|
|
232
|
-
|
|
233
|
-
.mint_to_public(acc, mintAmount)
|
|
234
|
-
.send({ from: admin, fee: { paymentMethod } })
|
|
235
|
-
.wait({ timeout: 600 }),
|
|
394
|
+
accounts.map(acc =>
|
|
395
|
+
TokenContract.at(tokenAddress, wallet)
|
|
396
|
+
.methods.mint_to_public(acc, mintAmount)
|
|
397
|
+
.send({ from: admin, fee: { paymentMethod }, wait: { timeout: 600 } }),
|
|
236
398
|
),
|
|
237
399
|
);
|
|
238
400
|
|
|
@@ -260,8 +422,8 @@ export async function performTransfers({
|
|
|
260
422
|
// Default to sponsored fee payment if no fee method is provided
|
|
261
423
|
const defaultFeePaymentMethod = feePaymentMethod || new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
262
424
|
for (let i = 0; i < rounds; i++) {
|
|
263
|
-
const txs = testAccounts.accounts.map(
|
|
264
|
-
const token =
|
|
425
|
+
const txs = testAccounts.accounts.map(acc => {
|
|
426
|
+
const token = TokenContract.at(testAccounts.tokenAddress, testAccounts.wallet);
|
|
265
427
|
return proveInteraction(wallet, token.methods.transfer_in_public(acc, recipient, transferAmount, 0), {
|
|
266
428
|
from: acc,
|
|
267
429
|
fee: {
|
|
@@ -272,17 +434,25 @@ export async function performTransfers({
|
|
|
272
434
|
|
|
273
435
|
const provenTxs = await Promise.all(txs);
|
|
274
436
|
|
|
275
|
-
|
|
437
|
+
// Wait only for the txs to be proposed, not checkpointed. This is enough to keep the chain
|
|
438
|
+
// loaded for the reorg scenario, and avoids each round blocking on the (slower) checkpoint lag.
|
|
439
|
+
await Promise.all(provenTxs.map(t => t.send({ wait: { timeout: 600, waitForStatus: TxStatus.PROPOSED } })));
|
|
276
440
|
|
|
277
441
|
logger.info(`Completed round ${i + 1} / ${rounds}`);
|
|
278
442
|
}
|
|
279
443
|
}
|
|
280
444
|
|
|
445
|
+
export type WalletWrapper = {
|
|
446
|
+
wallet: TestWallet;
|
|
447
|
+
aztecNode: AztecNode;
|
|
448
|
+
cleanup: () => Promise<void>;
|
|
449
|
+
};
|
|
450
|
+
|
|
281
451
|
export async function createWalletAndAztecNodeClient(
|
|
282
452
|
nodeUrl: string,
|
|
283
453
|
proverEnabled: boolean,
|
|
284
454
|
logger: Logger,
|
|
285
|
-
): Promise<
|
|
455
|
+
): Promise<WalletWrapper> {
|
|
286
456
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
287
457
|
const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
|
|
288
458
|
const pxeConfig = {
|
|
@@ -293,6 +463,8 @@ export async function createWalletAndAztecNodeClient(
|
|
|
293
463
|
proverEnabled,
|
|
294
464
|
};
|
|
295
465
|
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
466
|
+
// Remote JSON-RPC node: keep the 1s poll cadence rather than the in-process TestWallet fast default.
|
|
467
|
+
wallet.setDefaultWaitInterval(DefaultWaitOpts.interval);
|
|
296
468
|
|
|
297
469
|
return {
|
|
298
470
|
wallet,
|
|
@@ -304,3 +476,42 @@ export async function createWalletAndAztecNodeClient(
|
|
|
304
476
|
},
|
|
305
477
|
};
|
|
306
478
|
}
|
|
479
|
+
|
|
480
|
+
export type WorkerWalletWrapper = {
|
|
481
|
+
wallet: WorkerWallet;
|
|
482
|
+
aztecNode: AztecNode;
|
|
483
|
+
cleanup: () => Promise<void>;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export async function createWorkerWalletClient(
|
|
487
|
+
nodeUrl: string,
|
|
488
|
+
proverEnabled: boolean,
|
|
489
|
+
logger: Logger,
|
|
490
|
+
): Promise<WorkerWalletWrapper> {
|
|
491
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
492
|
+
const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
|
|
493
|
+
|
|
494
|
+
// Strip cleanup functions — they can't be structured-cloned for worker transfer
|
|
495
|
+
const { cleanup: bbCleanup, ...bbPaths } = bbConfig ?? {};
|
|
496
|
+
const { cleanup: acvmCleanup, ...acvmPaths } = acvmConfig ?? {};
|
|
497
|
+
|
|
498
|
+
const pxeConfig = {
|
|
499
|
+
dataDirectory: undefined,
|
|
500
|
+
dataStoreMapSizeKb: 1024 * 1024,
|
|
501
|
+
...bbPaths,
|
|
502
|
+
...acvmPaths,
|
|
503
|
+
proverEnabled,
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
const wallet = await WorkerWallet.create(nodeUrl, pxeConfig);
|
|
507
|
+
|
|
508
|
+
return {
|
|
509
|
+
wallet,
|
|
510
|
+
aztecNode,
|
|
511
|
+
async cleanup() {
|
|
512
|
+
await wallet.stop();
|
|
513
|
+
await bbCleanup?.();
|
|
514
|
+
await acvmCleanup?.();
|
|
515
|
+
},
|
|
516
|
+
};
|
|
517
|
+
}
|