@aztec/end-to-end 0.0.1-commit.d3ec352c → 0.0.1-commit.d58ff9d0
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/interactive_handshake_responder.d.ts +48 -0
- package/dest/automine/delivery/interactive_handshake_responder.d.ts.map +1 -0
- package/dest/automine/delivery/interactive_handshake_responder.js +76 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts +19 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts.map +1 -0
- package/dest/automine/delivery/onchain_delivery_harness.js +141 -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 +19 -20
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +155 -159
- 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.js +4 -1
- package/dest/bench/utils.d.ts +11 -10
- 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 +25 -29
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +147 -151
- 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 +84 -3
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +87 -2
- 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/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 +49 -38
- 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 +22 -4
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +28 -7
- package/dest/fixtures/utils.d.ts +5 -638
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +4 -647
- 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.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/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/{e2e_p2p → p2p}/p2p_network.d.ts +33 -21
- 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 +22 -9
- 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 +19 -6
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +27 -15
- 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.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/lending_simulator.d.ts +15 -4
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +29 -17
- 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/{e2e_fees → single-node/fees}/bridging_race.notest.d.ts +1 -1
- 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 +15 -5
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +155 -50
- 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 -221
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +1 -782
- 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 +320 -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 +157 -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 +23 -0
- package/package.json +54 -46
- 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/interactive_handshake_responder.ts +125 -0
- package/src/automine/delivery/onchain_delivery_harness.ts +213 -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 +222 -251
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/client_flows/data_extractor.ts +2 -1
- 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 +172 -205
- package/src/fixtures/elu_monitor.ts +126 -0
- package/src/fixtures/fixtures.ts +111 -3
- 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 +57 -57
- package/src/fixtures/timing.ts +97 -0
- package/src/fixtures/token_utils.ts +46 -10
- package/src/fixtures/utils.ts +26 -966
- 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 +7 -4
- 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 -44
- package/src/shared/gas_portal_test_harness.ts +35 -17
- 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 +36 -18
- 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/setup_test_wallets.ts +217 -36
- 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 -983
- package/src/test-wallet/test_wallet.ts +426 -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 +216 -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 -108
- 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 -93
- package/dest/e2e_epochs/epochs_test.d.ts.map +0 -1
- package/dest/e2e_epochs/epochs_test.js +0 -337
- package/dest/e2e_fees/bridging_race.notest.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.d.ts +0 -85
- package/dest/e2e_fees/fees_test.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.js +0 -263
- 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 -58
- 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 -64
- 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 -139
- package/dest/e2e_p2p/p2p_network.d.ts.map +0 -1
- package/dest/e2e_p2p/p2p_network.js +0 -320
- 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 -184
- 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 -477
- 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 -179
- package/src/e2e_deploy_contract/deploy_test.ts +0 -78
- package/src/e2e_epochs/epochs_test.ts +0 -438
- package/src/e2e_fees/fees_test.ts +0 -382
- package/src/e2e_l1_publisher/write_json.ts +0 -77
- package/src/e2e_nested_contract/nested_contract_test.ts +0 -96
- package/src/e2e_p2p/inactivity_slash_test.ts +0 -182
- package/src/e2e_p2p/p2p_network.ts +0 -476
- package/src/e2e_p2p/shared.ts +0 -285
- 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,45 +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
|
-
BBCircuitVerifier,
|
|
9
|
-
type ClientProtocolCircuitVerifier,
|
|
10
|
-
QueuedIVCVerifier,
|
|
11
|
-
TestCircuitVerifier,
|
|
12
|
-
} from '@aztec/bb-prover';
|
|
7
|
+
import type { ClientProtocolCircuitVerifier } from '@aztec/bb-prover';
|
|
13
8
|
import { BackendType, Barretenberg } from '@aztec/bb.js';
|
|
14
|
-
import {
|
|
15
|
-
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
16
|
-
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
9
|
+
import type { DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
17
10
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
18
11
|
import { SecretValue } from '@aztec/foundation/config';
|
|
19
12
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
20
13
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
21
|
-
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
22
14
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
23
15
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
24
|
-
import { TestWallet } from '@aztec/test-wallet/server';
|
|
25
16
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
26
17
|
|
|
27
18
|
import { type Hex, getContract } from 'viem';
|
|
28
19
|
import { privateKeyToAddress } from 'viem/accounts';
|
|
29
20
|
|
|
30
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';
|
|
31
24
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
32
25
|
import { getBBConfig } from './get_bb_config.js';
|
|
33
|
-
import {
|
|
34
|
-
type ISnapshotManager,
|
|
35
|
-
type SubsystemsContext,
|
|
36
|
-
createSnapshotManager,
|
|
37
|
-
deployAccounts,
|
|
38
|
-
publicDeployAccounts,
|
|
39
|
-
} from './snapshot_manager.js';
|
|
40
|
-
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEAndGetWallet } from './utils.js';
|
|
41
|
-
|
|
42
|
-
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
26
|
+
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setup, setupPXEAndGetWallet } from './setup.js';
|
|
43
27
|
|
|
44
28
|
type ProvenSetup = {
|
|
45
29
|
wallet: TestWallet;
|
|
@@ -51,129 +35,117 @@ type ProvenSetup = {
|
|
|
51
35
|
* However, we then setup a second PXE with a full prover instance.
|
|
52
36
|
* We configure this instance with all of the accounts and contracts.
|
|
53
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.
|
|
54
43
|
*/
|
|
55
44
|
|
|
56
|
-
export class FullProverTest {
|
|
45
|
+
export class FullProverTest extends SingleNodeTestContext {
|
|
57
46
|
static TOKEN_NAME = 'USDC';
|
|
58
47
|
static TOKEN_SYMBOL = 'USD';
|
|
59
48
|
static TOKEN_DECIMALS = 18n;
|
|
60
|
-
private snapshotManager: ISnapshotManager;
|
|
61
|
-
logger: Logger;
|
|
62
49
|
wallet!: TestWallet;
|
|
63
50
|
provenWallet!: TestWallet;
|
|
64
51
|
accounts: AztecAddress[] = [];
|
|
65
|
-
|
|
52
|
+
fundedAccounts!: InitialAccountData[];
|
|
66
53
|
fakeProofsAsset!: TokenContract;
|
|
67
54
|
fakeProofsAssetInstance!: ContractInstanceWithAddress;
|
|
68
55
|
tokenSim!: TokenSimulator;
|
|
69
56
|
aztecNode!: AztecNode;
|
|
70
57
|
aztecNodeAdmin!: AztecNodeAdmin;
|
|
71
58
|
cheatCodes!: CheatCodes;
|
|
72
|
-
blobSink!: BlobSinkServer;
|
|
73
59
|
private provenComponents: ProvenSetup[] = [];
|
|
74
60
|
private bbConfigCleanup?: () => Promise<void>;
|
|
75
61
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
76
|
-
|
|
62
|
+
/** Returns the proof verifier from the prover node (for test assertions). */
|
|
63
|
+
get circuitProofVerifier(): ClientProtocolCircuitVerifier | undefined {
|
|
64
|
+
return this.proverAztecNode?.getProofVerifier();
|
|
65
|
+
}
|
|
77
66
|
provenAsset!: TokenContract;
|
|
78
|
-
private
|
|
79
|
-
private
|
|
80
|
-
|
|
81
|
-
public l1Contracts!: DeployL1ContractsReturnType;
|
|
67
|
+
private proverAztecNode!: AztecNodeService;
|
|
68
|
+
private simulatedProverAztecNode!: AztecNodeService;
|
|
69
|
+
public l1Contracts!: DeployAztecL1ContractsReturnType;
|
|
82
70
|
public proverAddress!: EthAddress;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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;
|
|
90
79
|
this.logger = createLogger(`e2e:full_prover_test:${testName}`);
|
|
91
|
-
this.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{ startProverNode: true, fundRewardDistributor: true, coinbase },
|
|
95
|
-
{
|
|
96
|
-
realVerifier: realProofs,
|
|
97
|
-
},
|
|
98
|
-
);
|
|
80
|
+
this.minNumberOfTxsPerBlock = minNumberOfTxsPerBlock;
|
|
81
|
+
this.coinbase = coinbase;
|
|
82
|
+
this.realProofs = realProofs;
|
|
99
83
|
}
|
|
100
84
|
|
|
101
85
|
/**
|
|
102
|
-
*
|
|
103
|
-
* 1. Add 2 accounts.
|
|
104
|
-
* 2. Publicly deploy accounts, deploy token contract
|
|
86
|
+
* Applies base setup: deploys 2 accounts and token contract.
|
|
105
87
|
*/
|
|
106
|
-
async
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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}`);
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// Move this account thing to addAccounts above?
|
|
123
|
-
this.logger.verbose(`Public deploy accounts...`);
|
|
124
|
-
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
125
|
-
|
|
126
|
-
this.logger.verbose(`Deploying TokenContract...`);
|
|
127
|
-
const { contract: asset, instance } = await TokenContract.deploy(
|
|
128
|
-
this.wallet,
|
|
129
|
-
this.accounts[0],
|
|
130
|
-
FullProverTest.TOKEN_NAME,
|
|
131
|
-
FullProverTest.TOKEN_SYMBOL,
|
|
132
|
-
FullProverTest.TOKEN_DECIMALS,
|
|
133
|
-
)
|
|
134
|
-
.send({ from: this.accounts[0] })
|
|
135
|
-
.wait();
|
|
136
|
-
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
137
|
-
|
|
138
|
-
return { tokenContractAddress: asset.address, tokenContractInstance: instance };
|
|
139
|
-
},
|
|
140
|
-
async ({ tokenContractAddress, tokenContractInstance }) => {
|
|
141
|
-
// Restore the token contract state.
|
|
142
|
-
this.fakeProofsAsset = TokenContract.at(tokenContractAddress, this.wallet);
|
|
143
|
-
this.fakeProofsAssetInstance = tokenContractInstance;
|
|
144
|
-
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
145
|
-
|
|
146
|
-
this.tokenSim = new TokenSimulator(
|
|
147
|
-
this.fakeProofsAsset,
|
|
148
|
-
this.wallet,
|
|
149
|
-
this.accounts[0],
|
|
150
|
-
this.logger,
|
|
151
|
-
this.accounts,
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
expect(await this.fakeProofsAsset.methods.get_admin().simulate({ from: this.accounts[0] })).toBe(
|
|
155
|
-
this.accounts[0].toBigInt(),
|
|
156
|
-
);
|
|
157
|
-
},
|
|
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(),
|
|
158
115
|
);
|
|
159
116
|
}
|
|
160
117
|
|
|
161
|
-
async setup() {
|
|
162
|
-
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();
|
|
163
137
|
|
|
164
|
-
|
|
165
|
-
this.context.watcher.setIsMarkingAsProven(false);
|
|
138
|
+
this.logger.info(`Enabling proving`, { realProofs: this.realProofs });
|
|
166
139
|
|
|
167
|
-
this.
|
|
140
|
+
this.simulatedProverAztecNode = this.context.proverNode!;
|
|
168
141
|
({
|
|
169
142
|
aztecNode: this.aztecNode,
|
|
170
143
|
deployL1ContractsValues: this.l1Contracts,
|
|
171
144
|
cheatCodes: this.cheatCodes,
|
|
172
|
-
blobSink: this.blobSink,
|
|
173
145
|
} = this.context);
|
|
174
|
-
this.aztecNodeAdmin = this.context.
|
|
146
|
+
this.aztecNodeAdmin = this.context.aztecNodeService;
|
|
175
147
|
|
|
176
|
-
const
|
|
148
|
+
const config = this.context.aztecNodeConfig;
|
|
177
149
|
|
|
178
150
|
// Configure a full prover PXE
|
|
179
151
|
let acvmConfig: Awaited<ReturnType<typeof getACVMConfig>> | undefined;
|
|
@@ -189,9 +161,6 @@ export class FullProverTest {
|
|
|
189
161
|
|
|
190
162
|
await Barretenberg.initSingleton({ backend: BackendType.NativeUnixSocket });
|
|
191
163
|
|
|
192
|
-
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
193
|
-
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
194
|
-
|
|
195
164
|
this.logger.debug(`Configuring the node for real proofs...`);
|
|
196
165
|
await this.aztecNodeAdmin.setConfig({
|
|
197
166
|
realProofs: true,
|
|
@@ -199,7 +168,6 @@ export class FullProverTest {
|
|
|
199
168
|
});
|
|
200
169
|
} else {
|
|
201
170
|
this.logger.debug(`Configuring the node min txs per block ${this.minNumberOfTxsPerBlock}...`);
|
|
202
|
-
this.circuitProofVerifier = new TestCircuitVerifier();
|
|
203
171
|
await this.aztecNodeAdmin.setConfig({
|
|
204
172
|
minTxsPerBlock: this.minNumberOfTxsPerBlock,
|
|
205
173
|
});
|
|
@@ -214,16 +182,27 @@ export class FullProverTest {
|
|
|
214
182
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
215
183
|
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
216
184
|
this.aztecNode,
|
|
185
|
+
this.context.aztecNode,
|
|
217
186
|
{ proverEnabled: this.realProofs },
|
|
218
187
|
undefined,
|
|
219
|
-
|
|
188
|
+
'pxe-proven',
|
|
220
189
|
);
|
|
221
190
|
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
222
191
|
await provenWallet.registerContract(this.fakeProofsAssetInstance, TokenContract.artifact);
|
|
223
192
|
|
|
224
193
|
for (let i = 0; i < 2; i++) {
|
|
225
|
-
|
|
226
|
-
|
|
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
|
+
this.fundedAccounts[i].signingKey,
|
|
200
|
+
);
|
|
201
|
+
await this.wallet.createSchnorrInitializerlessAccount(
|
|
202
|
+
this.fundedAccounts[i].secret,
|
|
203
|
+
this.fundedAccounts[i].salt,
|
|
204
|
+
this.fundedAccounts[i].signingKey,
|
|
205
|
+
);
|
|
227
206
|
}
|
|
228
207
|
|
|
229
208
|
const asset = TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
@@ -235,20 +214,13 @@ export class FullProverTest {
|
|
|
235
214
|
this.provenWallet = provenWallet;
|
|
236
215
|
this.logger.info(`Full prover PXE started`);
|
|
237
216
|
|
|
238
|
-
// Shutdown the current, simulated prover node
|
|
217
|
+
// Shutdown the current, simulated prover node (by stopping its hosting aztec node)
|
|
239
218
|
this.logger.verbose('Shutting down simulated prover node');
|
|
240
|
-
await this.
|
|
241
|
-
|
|
242
|
-
// Creating temp store and archiver for fully proven prover node
|
|
243
|
-
this.logger.verbose('Starting archiver for new prover node');
|
|
244
|
-
const archiver = await createArchiver(
|
|
245
|
-
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
246
|
-
{ blobSinkClient, dateProvider: this.context.dateProvider },
|
|
247
|
-
{ blockUntilSync: true },
|
|
248
|
-
);
|
|
219
|
+
await this.simulatedProverAztecNode.stop();
|
|
249
220
|
|
|
250
221
|
// The simulated prover node (now shutdown) used private key index 2
|
|
251
222
|
const proverNodePrivateKey = getPrivateKeyFromIndex(2);
|
|
223
|
+
const proverNodePrivateKeyHex = `0x${proverNodePrivateKey!.toString('hex')}` as const;
|
|
252
224
|
const proverNodeSenderAddress = privateKeyToAddress(new Buffer32(proverNodePrivateKey!).toString());
|
|
253
225
|
this.proverAddress = EthAddress.fromString(proverNodeSenderAddress);
|
|
254
226
|
|
|
@@ -256,41 +228,48 @@ export class FullProverTest {
|
|
|
256
228
|
await this.mintFeeJuice(proverNodeSenderAddress);
|
|
257
229
|
|
|
258
230
|
this.logger.verbose('Starting prover node');
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
231
|
+
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
232
|
+
const { genesis } = await getGenesisValues(
|
|
233
|
+
this.context.additionallyFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
234
|
+
undefined,
|
|
235
|
+
undefined,
|
|
236
|
+
this.context.genesis!.genesisTimestamp,
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
const proverNodeConfig: Parameters<typeof createAztecNodeService>[0] = {
|
|
240
|
+
...config,
|
|
241
|
+
enableProverNode: true,
|
|
242
|
+
disableValidator: true,
|
|
262
243
|
dataDirectory: undefined,
|
|
244
|
+
txCollectionNodeRpcUrls: [],
|
|
263
245
|
proverId: this.proverAddress,
|
|
264
246
|
realProofs: this.realProofs,
|
|
265
247
|
proverAgentCount: 2,
|
|
266
|
-
|
|
248
|
+
proverPublisherPrivateKeys: [new SecretValue(proverNodePrivateKeyHex)],
|
|
267
249
|
proverNodeMaxPendingJobs: 100,
|
|
268
250
|
proverNodeMaxParallelBlocksPerEpoch: 32,
|
|
269
251
|
proverNodePollingIntervalMs: 100,
|
|
270
252
|
txGatheringIntervalMs: 1000,
|
|
271
253
|
txGatheringBatchSize: 10,
|
|
272
254
|
txGatheringMaxParallelRequestsPerNode: 100,
|
|
273
|
-
|
|
255
|
+
// The test warps the L1 clock forward a full epoch via cheatcodes; the prover-node
|
|
256
|
+
// tracks L1 time, so an in-flight tx-gather would see its deadline jump into the
|
|
257
|
+
// past. Use a generous window so the deadline survives the warp.
|
|
258
|
+
txGatheringTimeoutMs: 10 * 60 * 1000,
|
|
274
259
|
proverNodeFailedEpochStore: undefined,
|
|
275
260
|
proverNodeEpochProvingDelayMs: undefined,
|
|
261
|
+
validatorPrivateKeys: new SecretValue([]),
|
|
276
262
|
};
|
|
277
|
-
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
278
|
-
const { prefilledPublicData } = await getGenesisValues(
|
|
279
|
-
this.context.initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
280
|
-
);
|
|
281
|
-
this.proverNode = await createProverNode(
|
|
282
|
-
proverConfig,
|
|
283
|
-
{
|
|
284
|
-
aztecNodeTxProvider: this.aztecNode,
|
|
285
|
-
archiver: archiver as Archiver,
|
|
286
|
-
blobSinkClient,
|
|
287
|
-
},
|
|
288
|
-
{ prefilledPublicData },
|
|
289
|
-
);
|
|
290
|
-
await this.proverNode.start();
|
|
291
263
|
|
|
292
|
-
this.
|
|
293
|
-
|
|
264
|
+
this.proverAztecNode = await createAztecNodeService(
|
|
265
|
+
proverNodeConfig,
|
|
266
|
+
{ dateProvider: this.context.dateProvider, p2pClientDeps: { rpcTxProviders: [this.aztecNode] } },
|
|
267
|
+
{ genesis },
|
|
268
|
+
);
|
|
269
|
+
// Track the real prover node so the base teardown stops it (the simulated one created by `setup`
|
|
270
|
+
// was already stopped above).
|
|
271
|
+
this.proverNodes = [this.proverAztecNode];
|
|
272
|
+
this.logger.warn(`Proofs are now enabled`, { realProofs: this.realProofs });
|
|
294
273
|
}
|
|
295
274
|
|
|
296
275
|
private async mintFeeJuice(recipient: Hex) {
|
|
@@ -302,72 +281,60 @@ export class FullProverTest {
|
|
|
302
281
|
await this.context.deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash });
|
|
303
282
|
}
|
|
304
283
|
|
|
305
|
-
|
|
306
|
-
name: string,
|
|
307
|
-
apply: (context: SubsystemsContext) => Promise<T>,
|
|
308
|
-
restore: (snapshotData: T, context: SubsystemsContext) => Promise<void> = () => Promise.resolve(),
|
|
309
|
-
): Promise<void> => this.snapshotManager.snapshot(name, apply, restore);
|
|
310
|
-
|
|
311
|
-
async teardown() {
|
|
312
|
-
await this.snapshotManager.teardown();
|
|
313
|
-
|
|
284
|
+
override async teardown() {
|
|
314
285
|
// Cleanup related to the full prover PXEs
|
|
315
286
|
for (let i = 0; i < this.provenComponents.length; i++) {
|
|
316
287
|
await this.provenComponents[i].teardown();
|
|
317
288
|
}
|
|
318
289
|
|
|
319
|
-
//
|
|
320
|
-
await this.
|
|
290
|
+
// Stop the prover node before destroying the BB singleton it proves with.
|
|
291
|
+
await this.proverAztecNode.stop();
|
|
321
292
|
|
|
322
293
|
await Barretenberg.destroySingleton();
|
|
323
294
|
await this.bbConfigCleanup?.();
|
|
324
295
|
await this.acvmConfigCleanup?.();
|
|
296
|
+
|
|
297
|
+
// Stops the chain monitor, the tracked nodes (main node + the already-stopped prover node, a
|
|
298
|
+
// safe no-op), and the context.
|
|
299
|
+
await super.teardown();
|
|
325
300
|
}
|
|
326
301
|
|
|
327
|
-
async
|
|
328
|
-
|
|
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
|
-
const totalSupply = await asset.methods.total_supply().simulate({ from: address });
|
|
366
|
-
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
367
|
-
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
368
|
-
|
|
369
|
-
return Promise.resolve();
|
|
370
|
-
},
|
|
371
|
-
);
|
|
302
|
+
private async applyMint() {
|
|
303
|
+
this.logger.info('Applying mint setup');
|
|
304
|
+
const { fakeProofsAsset: asset, accounts } = this;
|
|
305
|
+
const privateAmount = 10000n;
|
|
306
|
+
const publicAmount = 10000n;
|
|
307
|
+
|
|
308
|
+
this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
|
|
309
|
+
await asset.methods.mint_to_public(accounts[0], privateAmount + publicAmount).send({ from: accounts[0] });
|
|
310
|
+
|
|
311
|
+
this.logger.verbose(`Transferring ${privateAmount} to private...`);
|
|
312
|
+
await asset.methods.transfer_to_private(accounts[0], privateAmount).send({ from: accounts[0] });
|
|
313
|
+
|
|
314
|
+
this.logger.info(`Minting complete`);
|
|
315
|
+
|
|
316
|
+
const {
|
|
317
|
+
fakeProofsAsset,
|
|
318
|
+
accounts: [address],
|
|
319
|
+
tokenSim,
|
|
320
|
+
} = this;
|
|
321
|
+
tokenSim.mintPublic(address, publicAmount);
|
|
322
|
+
|
|
323
|
+
const { result: publicBalance } = await fakeProofsAsset.methods
|
|
324
|
+
.balance_of_public(address)
|
|
325
|
+
.simulate({ from: address });
|
|
326
|
+
this.logger.verbose(`Public balance of wallet 0: ${publicBalance}`);
|
|
327
|
+
expect(publicBalance).toEqual(this.tokenSim.balanceOfPublic(address));
|
|
328
|
+
|
|
329
|
+
tokenSim.mintPrivate(address, publicAmount);
|
|
330
|
+
const { result: privateBalance } = await fakeProofsAsset.methods
|
|
331
|
+
.balance_of_private(address)
|
|
332
|
+
.simulate({ from: address });
|
|
333
|
+
this.logger.verbose(`Private balance of wallet 0: ${privateBalance}`);
|
|
334
|
+
expect(privateBalance).toEqual(tokenSim.balanceOfPrivate(address));
|
|
335
|
+
|
|
336
|
+
const { result: totalSupply } = await fakeProofsAsset.methods.total_supply().simulate({ from: address });
|
|
337
|
+
this.logger.verbose(`Total supply: ${totalSupply}`);
|
|
338
|
+
expect(totalSupply).toEqual(tokenSim.totalSupply);
|
|
372
339
|
}
|
|
373
340
|
}
|
|
@@ -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
|
+
}
|