@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
|
@@ -1,43 +1,29 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
1
|
+
import { type InitialAccountData, generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
2
|
+
import { AztecNodeService, createAztecNodeService } from '@aztec/aztec-node';
|
|
3
3
|
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
4
|
-
import {
|
|
4
|
+
import { createLogger } from '@aztec/aztec.js/log';
|
|
5
5
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
6
6
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
QueuedIVCVerifier,
|
|
11
|
-
TestCircuitVerifier,
|
|
12
|
-
} from '@aztec/bb-prover';
|
|
13
|
-
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
14
|
-
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
15
|
-
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
7
|
+
import type { ClientProtocolCircuitVerifier } from '@aztec/bb-prover';
|
|
8
|
+
import { BackendType, Barretenberg } from '@aztec/bb.js';
|
|
9
|
+
import type { DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
16
10
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
17
11
|
import { SecretValue } from '@aztec/foundation/config';
|
|
18
12
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
19
13
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
|
-
import
|
|
14
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
21
15
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
|
-
import { TestWallet } from '@aztec/test-wallet/server';
|
|
23
16
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
24
17
|
|
|
25
18
|
import { type Hex, getContract } from 'viem';
|
|
26
19
|
import { privateKeyToAddress } from 'viem/accounts';
|
|
27
20
|
|
|
28
21
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
22
|
+
import { SingleNodeTestContext, type SingleNodeTestOpts } from '../single-node/single_node_test_context.js';
|
|
23
|
+
import { TestWallet } from '../test-wallet/test_wallet.js';
|
|
29
24
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
30
25
|
import { getBBConfig } from './get_bb_config.js';
|
|
31
|
-
import {
|
|
32
|
-
type ISnapshotManager,
|
|
33
|
-
type SubsystemsContext,
|
|
34
|
-
createSnapshotManager,
|
|
35
|
-
deployAccounts,
|
|
36
|
-
publicDeployAccounts,
|
|
37
|
-
} from './snapshot_manager.js';
|
|
38
|
-
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEAndGetWallet } from './utils.js';
|
|
39
|
-
|
|
40
|
-
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
26
|
+
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setup, setupPXEAndGetWallet } from './setup.js';
|
|
41
27
|
|
|
42
28
|
type ProvenSetup = {
|
|
43
29
|
wallet: TestWallet;
|
|
@@ -49,127 +35,117 @@ type ProvenSetup = {
|
|
|
49
35
|
* However, we then setup a second PXE with a full prover instance.
|
|
50
36
|
* We configure this instance with all of the accounts and contracts.
|
|
51
37
|
* We then prove and verify transactions created via this full prover PXE.
|
|
38
|
+
*
|
|
39
|
+
* The real-prover sub-base of the single-node topology: extends {@link SingleNodeTestContext} so it
|
|
40
|
+
* reuses the base node tracking / chain monitor / teardown machinery, but builds its environment with
|
|
41
|
+
* the bespoke prover opts below (real BB, `realVerifier` L1, the snapshot/account + TokenSimulator
|
|
42
|
+
* harness, and a hand-built prover node) rather than the base's default fake-prover config.
|
|
52
43
|
*/
|
|
53
44
|
|
|
54
|
-
export class FullProverTest {
|
|
45
|
+
export class FullProverTest extends SingleNodeTestContext {
|
|
55
46
|
static TOKEN_NAME = 'USDC';
|
|
56
47
|
static TOKEN_SYMBOL = 'USD';
|
|
57
48
|
static TOKEN_DECIMALS = 18n;
|
|
58
|
-
private snapshotManager: ISnapshotManager;
|
|
59
|
-
logger: Logger;
|
|
60
49
|
wallet!: TestWallet;
|
|
61
50
|
provenWallet!: TestWallet;
|
|
62
51
|
accounts: AztecAddress[] = [];
|
|
63
|
-
|
|
52
|
+
fundedAccounts!: InitialAccountData[];
|
|
64
53
|
fakeProofsAsset!: TokenContract;
|
|
54
|
+
fakeProofsAssetInstance!: ContractInstanceWithAddress;
|
|
65
55
|
tokenSim!: TokenSimulator;
|
|
66
56
|
aztecNode!: AztecNode;
|
|
67
57
|
aztecNodeAdmin!: AztecNodeAdmin;
|
|
68
58
|
cheatCodes!: CheatCodes;
|
|
69
|
-
blobSink!: BlobSinkServer;
|
|
70
59
|
private provenComponents: ProvenSetup[] = [];
|
|
71
60
|
private bbConfigCleanup?: () => Promise<void>;
|
|
72
61
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
73
|
-
|
|
62
|
+
/** Returns the proof verifier from the prover node (for test assertions). */
|
|
63
|
+
get circuitProofVerifier(): ClientProtocolCircuitVerifier | undefined {
|
|
64
|
+
return this.proverAztecNode?.getProofVerifier();
|
|
65
|
+
}
|
|
74
66
|
provenAsset!: TokenContract;
|
|
75
|
-
private
|
|
76
|
-
private
|
|
77
|
-
|
|
78
|
-
public l1Contracts!: DeployL1ContractsReturnType;
|
|
67
|
+
private proverAztecNode!: AztecNodeService;
|
|
68
|
+
private simulatedProverAztecNode!: AztecNodeService;
|
|
69
|
+
public l1Contracts!: DeployAztecL1ContractsReturnType;
|
|
79
70
|
public proverAddress!: EthAddress;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
private testName: string;
|
|
72
|
+
private minNumberOfTxsPerBlock: number;
|
|
73
|
+
private coinbase: EthAddress;
|
|
74
|
+
private realProofs: boolean;
|
|
75
|
+
|
|
76
|
+
constructor(testName: string, minNumberOfTxsPerBlock: number, coinbase: EthAddress, realProofs = true) {
|
|
77
|
+
super();
|
|
78
|
+
this.testName = testName;
|
|
87
79
|
this.logger = createLogger(`e2e:full_prover_test:${testName}`);
|
|
88
|
-
this.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{ startProverNode: true, fundRewardDistributor: true, coinbase },
|
|
92
|
-
{
|
|
93
|
-
realVerifier: realProofs,
|
|
94
|
-
},
|
|
95
|
-
);
|
|
80
|
+
this.minNumberOfTxsPerBlock = minNumberOfTxsPerBlock;
|
|
81
|
+
this.coinbase = coinbase;
|
|
82
|
+
this.realProofs = realProofs;
|
|
96
83
|
}
|
|
97
84
|
|
|
98
85
|
/**
|
|
99
|
-
*
|
|
100
|
-
* 1. Add 2 accounts.
|
|
101
|
-
* 2. Publicly deploy accounts, deploy token contract
|
|
86
|
+
* Applies base setup: deploys 2 accounts and token contract.
|
|
102
87
|
*/
|
|
103
|
-
async
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
88
|
+
private async applyBaseSetup() {
|
|
89
|
+
this.logger.info('Applying base setup: registering funded accounts');
|
|
90
|
+
this.fundedAccounts = this.context.additionallyFundedAccounts;
|
|
91
|
+
this.accounts = this.fundedAccounts.map(a => a.address);
|
|
92
|
+
this.wallet = this.context.wallet;
|
|
93
|
+
for (const { secret, salt, signingKey } of this.fundedAccounts) {
|
|
94
|
+
await this.wallet.createSchnorrInitializerlessAccount(secret, salt, signingKey);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.logger.info('Applying base setup: deploying token contract');
|
|
98
|
+
const { contract: asset, instance } = await TokenContract.deploy(
|
|
99
|
+
this.wallet,
|
|
100
|
+
this.accounts[0],
|
|
101
|
+
FullProverTest.TOKEN_NAME,
|
|
102
|
+
FullProverTest.TOKEN_SYMBOL,
|
|
103
|
+
FullProverTest.TOKEN_DECIMALS,
|
|
104
|
+
).send({ from: this.accounts[0] });
|
|
105
|
+
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
106
|
+
|
|
107
|
+
this.fakeProofsAsset = asset;
|
|
108
|
+
this.fakeProofsAssetInstance = instance;
|
|
109
|
+
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
// Move this account thing to addAccounts above?
|
|
120
|
-
this.logger.verbose(`Public deploy accounts...`);
|
|
121
|
-
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
122
|
-
|
|
123
|
-
this.logger.verbose(`Deploying TokenContract...`);
|
|
124
|
-
const asset = await TokenContract.deploy(
|
|
125
|
-
this.wallet,
|
|
126
|
-
this.accounts[0],
|
|
127
|
-
FullProverTest.TOKEN_NAME,
|
|
128
|
-
FullProverTest.TOKEN_SYMBOL,
|
|
129
|
-
FullProverTest.TOKEN_DECIMALS,
|
|
130
|
-
)
|
|
131
|
-
.send({ from: this.accounts[0] })
|
|
132
|
-
.deployed();
|
|
133
|
-
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
134
|
-
|
|
135
|
-
return { tokenContractAddress: asset.address };
|
|
136
|
-
},
|
|
137
|
-
async ({ tokenContractAddress }) => {
|
|
138
|
-
// Restore the token contract state.
|
|
139
|
-
this.fakeProofsAsset = await TokenContract.at(tokenContractAddress, this.wallet);
|
|
140
|
-
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
141
|
-
|
|
142
|
-
this.tokenSim = new TokenSimulator(
|
|
143
|
-
this.fakeProofsAsset,
|
|
144
|
-
this.wallet,
|
|
145
|
-
this.accounts[0],
|
|
146
|
-
this.logger,
|
|
147
|
-
this.accounts,
|
|
148
|
-
);
|
|
149
|
-
|
|
150
|
-
expect(await this.fakeProofsAsset.methods.get_admin().simulate({ from: this.accounts[0] })).toBe(
|
|
151
|
-
this.accounts[0].toBigInt(),
|
|
152
|
-
);
|
|
153
|
-
},
|
|
111
|
+
this.tokenSim = new TokenSimulator(this.fakeProofsAsset, this.wallet, this.accounts[0], this.logger, this.accounts);
|
|
112
|
+
|
|
113
|
+
expect((await this.fakeProofsAsset.methods.get_admin().simulate({ from: this.accounts[0] })).result).toBe(
|
|
114
|
+
this.accounts[0].toBigInt(),
|
|
154
115
|
);
|
|
155
116
|
}
|
|
156
117
|
|
|
157
|
-
async setup() {
|
|
158
|
-
this.
|
|
118
|
+
override async setup(opts: SingleNodeTestOpts = {}) {
|
|
119
|
+
this.logger.info('Setting up subsystems from fresh');
|
|
120
|
+
const context = await setup(0, {
|
|
121
|
+
...opts,
|
|
122
|
+
startProverNode: true,
|
|
123
|
+
coinbase: this.coinbase,
|
|
124
|
+
fundSponsoredFPC: true,
|
|
125
|
+
additionallyFundedAccounts: await generateSchnorrAccounts(2),
|
|
126
|
+
l1ContractsArgs: { realVerifier: this.realProofs },
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Reuse the base context machinery (rollup, epoch cache, chain monitor, node tracking, teardown)
|
|
130
|
+
// over the environment built above. Restore the FullProverTest-named logger afterwards, since
|
|
131
|
+
// hydrateFromContext repoints `this.logger` at the context logger.
|
|
132
|
+
await this.hydrateFromContext(context);
|
|
133
|
+
this.logger = createLogger(`e2e:full_prover_test:${this.testName}`);
|
|
134
|
+
|
|
135
|
+
await this.applyBaseSetup();
|
|
136
|
+
await this.applyMint();
|
|
159
137
|
|
|
160
|
-
|
|
161
|
-
this.context.watcher.setIsMarkingAsProven(false);
|
|
138
|
+
this.logger.info(`Enabling proving`, { realProofs: this.realProofs });
|
|
162
139
|
|
|
163
|
-
this.
|
|
140
|
+
this.simulatedProverAztecNode = this.context.proverNode!;
|
|
164
141
|
({
|
|
165
142
|
aztecNode: this.aztecNode,
|
|
166
143
|
deployL1ContractsValues: this.l1Contracts,
|
|
167
144
|
cheatCodes: this.cheatCodes,
|
|
168
|
-
blobSink: this.blobSink,
|
|
169
145
|
} = this.context);
|
|
170
|
-
this.aztecNodeAdmin = this.context.
|
|
146
|
+
this.aztecNodeAdmin = this.context.aztecNodeService;
|
|
171
147
|
|
|
172
|
-
const
|
|
148
|
+
const config = this.context.aztecNodeConfig;
|
|
173
149
|
|
|
174
150
|
// Configure a full prover PXE
|
|
175
151
|
let acvmConfig: Awaited<ReturnType<typeof getACVMConfig>> | undefined;
|
|
@@ -183,12 +159,7 @@ export class FullProverTest {
|
|
|
183
159
|
this.acvmConfigCleanup = acvmConfig.cleanup;
|
|
184
160
|
this.bbConfigCleanup = bbConfig.cleanup;
|
|
185
161
|
|
|
186
|
-
|
|
187
|
-
throw new Error(`Test must be run with BB native configuration`);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
191
|
-
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
162
|
+
await Barretenberg.initSingleton({ backend: BackendType.NativeUnixSocket });
|
|
192
163
|
|
|
193
164
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
194
165
|
await this.aztecNodeAdmin.setConfig({
|
|
@@ -197,7 +168,6 @@ export class FullProverTest {
|
|
|
197
168
|
});
|
|
198
169
|
} else {
|
|
199
170
|
this.logger.debug(`Configuring the node min txs per block ${this.minNumberOfTxsPerBlock}...`);
|
|
200
|
-
this.circuitProofVerifier = new TestCircuitVerifier();
|
|
201
171
|
await this.aztecNodeAdmin.setConfig({
|
|
202
172
|
minTxsPerBlock: this.minNumberOfTxsPerBlock,
|
|
203
173
|
});
|
|
@@ -212,23 +182,25 @@ export class FullProverTest {
|
|
|
212
182
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
213
183
|
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
214
184
|
this.aztecNode,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
218
|
-
bbWorkingDirectory: bbConfig?.bbWorkingDirectory,
|
|
219
|
-
},
|
|
185
|
+
this.context.aztecNode,
|
|
186
|
+
{ proverEnabled: this.realProofs },
|
|
220
187
|
undefined,
|
|
221
|
-
|
|
188
|
+
'pxe-proven',
|
|
222
189
|
);
|
|
223
190
|
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
224
|
-
await provenWallet.registerContract(this.
|
|
191
|
+
await provenWallet.registerContract(this.fakeProofsAssetInstance, TokenContract.artifact);
|
|
225
192
|
|
|
226
193
|
for (let i = 0; i < 2; i++) {
|
|
227
|
-
|
|
228
|
-
|
|
194
|
+
// Mirror the initializerless funded accounts (created via createFundedAccounts) in both wallets so
|
|
195
|
+
// their addresses match the genesis-funded ones.
|
|
196
|
+
await provenWallet.createSchnorrInitializerlessAccount(
|
|
197
|
+
this.fundedAccounts[i].secret,
|
|
198
|
+
this.fundedAccounts[i].salt,
|
|
199
|
+
);
|
|
200
|
+
await this.wallet.createSchnorrInitializerlessAccount(this.fundedAccounts[i].secret, this.fundedAccounts[i].salt);
|
|
229
201
|
}
|
|
230
202
|
|
|
231
|
-
const asset =
|
|
203
|
+
const asset = TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
232
204
|
this.provenComponents.push({
|
|
233
205
|
wallet: provenWallet,
|
|
234
206
|
teardown: provenTeardown,
|
|
@@ -237,20 +209,13 @@ export class FullProverTest {
|
|
|
237
209
|
this.provenWallet = provenWallet;
|
|
238
210
|
this.logger.info(`Full prover PXE started`);
|
|
239
211
|
|
|
240
|
-
// Shutdown the current, simulated prover node
|
|
212
|
+
// Shutdown the current, simulated prover node (by stopping its hosting aztec node)
|
|
241
213
|
this.logger.verbose('Shutting down simulated prover node');
|
|
242
|
-
await this.
|
|
243
|
-
|
|
244
|
-
// Creating temp store and archiver for fully proven prover node
|
|
245
|
-
this.logger.verbose('Starting archiver for new prover node');
|
|
246
|
-
const archiver = await createArchiver(
|
|
247
|
-
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
248
|
-
{ blobSinkClient },
|
|
249
|
-
{ blockUntilSync: true },
|
|
250
|
-
);
|
|
214
|
+
await this.simulatedProverAztecNode.stop();
|
|
251
215
|
|
|
252
216
|
// The simulated prover node (now shutdown) used private key index 2
|
|
253
217
|
const proverNodePrivateKey = getPrivateKeyFromIndex(2);
|
|
218
|
+
const proverNodePrivateKeyHex = `0x${proverNodePrivateKey!.toString('hex')}` as const;
|
|
254
219
|
const proverNodeSenderAddress = privateKeyToAddress(new Buffer32(proverNodePrivateKey!).toString());
|
|
255
220
|
this.proverAddress = EthAddress.fromString(proverNodeSenderAddress);
|
|
256
221
|
|
|
@@ -258,41 +223,48 @@ export class FullProverTest {
|
|
|
258
223
|
await this.mintFeeJuice(proverNodeSenderAddress);
|
|
259
224
|
|
|
260
225
|
this.logger.verbose('Starting prover node');
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
226
|
+
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
227
|
+
const { genesis } = await getGenesisValues(
|
|
228
|
+
this.context.additionallyFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
229
|
+
undefined,
|
|
230
|
+
undefined,
|
|
231
|
+
this.context.genesis!.genesisTimestamp,
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
const proverNodeConfig: Parameters<typeof createAztecNodeService>[0] = {
|
|
235
|
+
...config,
|
|
236
|
+
enableProverNode: true,
|
|
237
|
+
disableValidator: true,
|
|
264
238
|
dataDirectory: undefined,
|
|
239
|
+
txCollectionNodeRpcUrls: [],
|
|
265
240
|
proverId: this.proverAddress,
|
|
266
241
|
realProofs: this.realProofs,
|
|
267
242
|
proverAgentCount: 2,
|
|
268
|
-
|
|
243
|
+
proverPublisherPrivateKeys: [new SecretValue(proverNodePrivateKeyHex)],
|
|
269
244
|
proverNodeMaxPendingJobs: 100,
|
|
270
245
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
271
246
|
proverNodePollingIntervalMs: 100,
|
|
272
247
|
txGatheringIntervalMs: 1000,
|
|
273
248
|
txGatheringBatchSize: 10,
|
|
274
249
|
txGatheringMaxParallelRequestsPerNode: 100,
|
|
275
|
-
|
|
250
|
+
// The test warps the L1 clock forward a full epoch via cheatcodes; the prover-node
|
|
251
|
+
// tracks L1 time, so an in-flight tx-gather would see its deadline jump into the
|
|
252
|
+
// past. Use a generous window so the deadline survives the warp.
|
|
253
|
+
txGatheringTimeoutMs: 10 * 60 * 1000,
|
|
276
254
|
proverNodeFailedEpochStore: undefined,
|
|
277
255
|
proverNodeEpochProvingDelayMs: undefined,
|
|
256
|
+
validatorPrivateKeys: new SecretValue([]),
|
|
278
257
|
};
|
|
279
|
-
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
280
|
-
const { prefilledPublicData } = await getGenesisValues(
|
|
281
|
-
this.context.initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
282
|
-
);
|
|
283
|
-
this.proverNode = await createProverNode(
|
|
284
|
-
proverConfig,
|
|
285
|
-
{
|
|
286
|
-
aztecNodeTxProvider: this.aztecNode,
|
|
287
|
-
archiver: archiver as Archiver,
|
|
288
|
-
blobSinkClient,
|
|
289
|
-
},
|
|
290
|
-
{ prefilledPublicData },
|
|
291
|
-
);
|
|
292
|
-
await this.proverNode.start();
|
|
293
258
|
|
|
294
|
-
this.
|
|
295
|
-
|
|
259
|
+
this.proverAztecNode = await createAztecNodeService(
|
|
260
|
+
proverNodeConfig,
|
|
261
|
+
{ dateProvider: this.context.dateProvider, p2pClientDeps: { rpcTxProviders: [this.aztecNode] } },
|
|
262
|
+
{ genesis },
|
|
263
|
+
);
|
|
264
|
+
// Track the real prover node so the base teardown stops it (the simulated one created by `setup`
|
|
265
|
+
// was already stopped above).
|
|
266
|
+
this.proverNodes = [this.proverAztecNode];
|
|
267
|
+
this.logger.warn(`Proofs are now enabled`, { realProofs: this.realProofs });
|
|
296
268
|
}
|
|
297
269
|
|
|
298
270
|
private async mintFeeJuice(recipient: Hex) {
|
|
@@ -304,71 +276,60 @@ export class FullProverTest {
|
|
|
304
276
|
await this.context.deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash });
|
|
305
277
|
}
|
|
306
278
|
|
|
307
|
-
|
|
308
|
-
name: string,
|
|
309
|
-
apply: (context: SubsystemsContext) => Promise<T>,
|
|
310
|
-
restore: (snapshotData: T, context: SubsystemsContext) => Promise<void> = () => Promise.resolve(),
|
|
311
|
-
): Promise<void> => this.snapshotManager.snapshot(name, apply, restore);
|
|
312
|
-
|
|
313
|
-
async teardown() {
|
|
314
|
-
await this.snapshotManager.teardown();
|
|
315
|
-
|
|
279
|
+
override async teardown() {
|
|
316
280
|
// Cleanup related to the full prover PXEs
|
|
317
281
|
for (let i = 0; i < this.provenComponents.length; i++) {
|
|
318
282
|
await this.provenComponents[i].teardown();
|
|
319
283
|
}
|
|
320
284
|
|
|
321
|
-
//
|
|
322
|
-
await this.
|
|
285
|
+
// Stop the prover node before destroying the BB singleton it proves with.
|
|
286
|
+
await this.proverAztecNode.stop();
|
|
323
287
|
|
|
288
|
+
await Barretenberg.destroySingleton();
|
|
324
289
|
await this.bbConfigCleanup?.();
|
|
325
290
|
await this.acvmConfigCleanup?.();
|
|
291
|
+
|
|
292
|
+
// Stops the chain monitor, the tracked nodes (main node + the already-stopped prover node, a
|
|
293
|
+
// safe no-op), and the context.
|
|
294
|
+
await super.teardown();
|
|
326
295
|
}
|
|
327
296
|
|
|
328
|
-
async
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
const totalSupply = await asset.methods.total_supply().simulate({ from: address });
|
|
367
|
-
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
368
|
-
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
369
|
-
|
|
370
|
-
return Promise.resolve();
|
|
371
|
-
},
|
|
372
|
-
);
|
|
297
|
+
private async applyMint() {
|
|
298
|
+
this.logger.info('Applying mint setup');
|
|
299
|
+
const { fakeProofsAsset: asset, accounts } = this;
|
|
300
|
+
const privateAmount = 10000n;
|
|
301
|
+
const publicAmount = 10000n;
|
|
302
|
+
|
|
303
|
+
this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
|
|
304
|
+
await asset.methods.mint_to_public(accounts[0], privateAmount + publicAmount).send({ from: accounts[0] });
|
|
305
|
+
|
|
306
|
+
this.logger.verbose(`Transferring ${privateAmount} to private...`);
|
|
307
|
+
await asset.methods.transfer_to_private(accounts[0], privateAmount).send({ from: accounts[0] });
|
|
308
|
+
|
|
309
|
+
this.logger.info(`Minting complete`);
|
|
310
|
+
|
|
311
|
+
const {
|
|
312
|
+
fakeProofsAsset,
|
|
313
|
+
accounts: [address],
|
|
314
|
+
tokenSim,
|
|
315
|
+
} = this;
|
|
316
|
+
tokenSim.mintPublic(address, publicAmount);
|
|
317
|
+
|
|
318
|
+
const { result: publicBalance } = await fakeProofsAsset.methods
|
|
319
|
+
.balance_of_public(address)
|
|
320
|
+
.simulate({ from: address });
|
|
321
|
+
this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
|
|
322
|
+
expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
|
|
323
|
+
|
|
324
|
+
tokenSim.mintPrivate(address, publicAmount);
|
|
325
|
+
const { result: privateBalance } = await fakeProofsAsset.methods
|
|
326
|
+
.balance_of_private(address)
|
|
327
|
+
.simulate({ from: address });
|
|
328
|
+
this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
|
|
329
|
+
expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
|
|
330
|
+
|
|
331
|
+
const { result: totalSupply } = await fakeProofsAsset.methods.total_supply().simulate({ from: address });
|
|
332
|
+
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
333
|
+
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
373
334
|
}
|
|
374
335
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { appendFileSync } from 'node:fs';
|
|
2
|
+
import { type EventLoopUtilization, type IntervalHistogram, monitorEventLoopDelay, performance } from 'node:perf_hooks';
|
|
3
|
+
|
|
4
|
+
const NANOS_PER_MS = 1_000_000;
|
|
5
|
+
|
|
6
|
+
/** Samples event-loop utilization, delay histogram, and heap usage per test, writing columnar text to a file. */
|
|
7
|
+
export class EluMonitor {
|
|
8
|
+
private filePath: string;
|
|
9
|
+
private intervalMs: number;
|
|
10
|
+
private timer: ReturnType<typeof setInterval> | undefined;
|
|
11
|
+
private lastELU: EventLoopUtilization | undefined;
|
|
12
|
+
private histogram: IntervalHistogram;
|
|
13
|
+
private testName: string | undefined;
|
|
14
|
+
private testStart: number | undefined;
|
|
15
|
+
private eluSamples: number[] = [];
|
|
16
|
+
|
|
17
|
+
constructor(filePath: string, intervalMs?: number) {
|
|
18
|
+
this.filePath = filePath;
|
|
19
|
+
this.intervalMs = intervalMs ?? 2000;
|
|
20
|
+
this.histogram = monitorEventLoopDelay({ resolution: 20 });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Begin sampling for a test. Writes a header line and starts the periodic sampler. */
|
|
24
|
+
startTest(testName: string): void {
|
|
25
|
+
this.stopTest();
|
|
26
|
+
|
|
27
|
+
this.testName = testName;
|
|
28
|
+
this.testStart = performance.now();
|
|
29
|
+
this.eluSamples = [];
|
|
30
|
+
|
|
31
|
+
appendFileSync(this.filePath, `\n=== Test: ${testName} ===\n`);
|
|
32
|
+
appendFileSync(
|
|
33
|
+
this.filePath,
|
|
34
|
+
padColumns('TIME', 'ELU', 'EL_DLY_P50', 'EL_DLY_P99', 'EL_DLY_MAX', 'HEAP_MB') + '\n',
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
this.lastELU = performance.eventLoopUtilization();
|
|
38
|
+
this.histogram.enable();
|
|
39
|
+
|
|
40
|
+
this.timer = setInterval(() => this.sample(), this.intervalMs);
|
|
41
|
+
// Allow the process to exit even if the timer is still running.
|
|
42
|
+
this.timer.unref();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Stop sampling and write a summary line. */
|
|
46
|
+
stopTest(): void {
|
|
47
|
+
if (!this.timer) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Take a final sample before stopping.
|
|
52
|
+
this.sample();
|
|
53
|
+
|
|
54
|
+
clearInterval(this.timer);
|
|
55
|
+
this.timer = undefined;
|
|
56
|
+
this.histogram.disable();
|
|
57
|
+
this.histogram.reset();
|
|
58
|
+
|
|
59
|
+
this.writeSummary();
|
|
60
|
+
|
|
61
|
+
this.lastELU = undefined;
|
|
62
|
+
this.testName = undefined;
|
|
63
|
+
this.testStart = undefined;
|
|
64
|
+
this.eluSamples = [];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Alias for stopTest — call on process exit to flush any remaining data. */
|
|
68
|
+
stop(): void {
|
|
69
|
+
this.stopTest();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private sample(): void {
|
|
73
|
+
const newELU = performance.eventLoopUtilization();
|
|
74
|
+
const delta = performance.eventLoopUtilization(newELU, this.lastELU);
|
|
75
|
+
this.lastELU = newELU;
|
|
76
|
+
|
|
77
|
+
const elu = delta.utilization;
|
|
78
|
+
this.eluSamples.push(elu);
|
|
79
|
+
|
|
80
|
+
const p50 = this.histogram.percentile(50) / NANOS_PER_MS;
|
|
81
|
+
const p99 = this.histogram.percentile(99) / NANOS_PER_MS;
|
|
82
|
+
const max = this.histogram.max / NANOS_PER_MS;
|
|
83
|
+
const heapMb = Math.round(process.memoryUsage().heapUsed / (1024 * 1024));
|
|
84
|
+
|
|
85
|
+
const now = new Date();
|
|
86
|
+
const time = [now.getHours(), now.getMinutes(), now.getSeconds()].map(n => String(n).padStart(2, '0')).join(':');
|
|
87
|
+
|
|
88
|
+
const line = padColumns(
|
|
89
|
+
time,
|
|
90
|
+
elu.toFixed(2),
|
|
91
|
+
`${p50.toFixed(1)}ms`,
|
|
92
|
+
`${p99.toFixed(1)}ms`,
|
|
93
|
+
`${max.toFixed(1)}ms`,
|
|
94
|
+
String(heapMb),
|
|
95
|
+
);
|
|
96
|
+
appendFileSync(this.filePath, line + '\n');
|
|
97
|
+
|
|
98
|
+
// Reset histogram so next sample only reflects the new interval.
|
|
99
|
+
this.histogram.reset();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private writeSummary(): void {
|
|
103
|
+
if (this.eluSamples.length === 0 || this.testStart === undefined) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const mean = this.eluSamples.reduce((a, b) => a + b, 0) / this.eluSamples.length;
|
|
108
|
+
const maxElu = Math.max(...this.eluSamples);
|
|
109
|
+
const sorted = [...this.eluSamples].sort((a, b) => a - b);
|
|
110
|
+
const p90Elu = sorted[Math.floor(sorted.length * 0.9)] ?? maxElu;
|
|
111
|
+
const durationS = ((performance.now() - this.testStart) / 1000).toFixed(1);
|
|
112
|
+
|
|
113
|
+
let summary = `--- Summary: mean_elu=${mean.toFixed(2)} max_elu=${maxElu.toFixed(2)} p90_elu=${p90Elu.toFixed(2)} duration=${durationS}s`;
|
|
114
|
+
if (maxElu > 0.85) {
|
|
115
|
+
summary += ' WARNING:ELU>0.85';
|
|
116
|
+
}
|
|
117
|
+
summary += ' ---\n';
|
|
118
|
+
|
|
119
|
+
appendFileSync(this.filePath, summary);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function padColumns(...cols: string[]): string {
|
|
124
|
+
const widths = [11, 7, 12, 12, 12, 8];
|
|
125
|
+
return cols.map((col, i) => col.padEnd(widths[i] ?? 10)).join('');
|
|
126
|
+
}
|