From 00684cb53032212d82513832f4a493f177d58619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 11 Jul 2023 23:55:43 +0200 Subject: [PATCH] Companion for removal of execution strategies (#7443) * Companion for removal of execution strategies https://github.com/paritytech/substrate/pull/14387 * Fix some tests * :facepalm: * Adapt to latest changes * Start supporting the offchain transaction pool * Fix tests * FMT * Remove patches * Update Substrate * update lockfile for {"substrate"} * Fix parachain upgrade smoke test * Fix test * Rewrite all tests to use `MockSubstemClient` --------- Co-authored-by: parity-processbot <> --- Cargo.lock | 391 ++++++------- node/core/runtime-api/Cargo.toml | 2 +- node/core/runtime-api/src/tests.rs | 520 +++++++++--------- .../src/variants/back_garbage_candidate.rs | 6 +- .../src/variants/dispute_valid_candidates.rs | 6 +- .../src/variants/suggest_garbage_candidate.rs | 6 +- node/metrics/Cargo.toml | 1 - node/metrics/src/tests.rs | 10 - node/service/Cargo.toml | 1 + node/service/src/lib.rs | 66 ++- node/service/src/overseer.rs | 28 +- node/subsystem-types/Cargo.toml | 1 + node/subsystem-types/src/lib.rs | 2 +- node/subsystem-types/src/runtime_client.rs | 90 +-- node/test/client/src/lib.rs | 7 +- node/test/service/src/lib.rs | 10 +- rpc/src/lib.rs | 19 +- .../ci/gitlab/pipeline/short-benchmarks.yml | 2 +- scripts/ci/run_benches_for_runtime.sh | 2 - tests/benchmark_block.rs | 2 +- xcm/xcm-executor/integration-tests/src/lib.rs | 20 +- 21 files changed, 633 insertions(+), 559 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f319a8db8e71..6aedf97845e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "hash-db", "log", @@ -2506,7 +2506,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", ] @@ -2529,7 +2529,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-support-procedural", @@ -2554,7 +2554,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "Inflector", "array-bytes", @@ -2602,7 +2602,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2613,7 +2613,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2630,7 +2630,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -2659,7 +2659,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-recursion", "futures", @@ -2680,7 +2680,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "bitflags", "environmental", @@ -2714,7 +2714,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "Inflector", "cfg-expr", @@ -2732,7 +2732,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2744,7 +2744,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro2", "quote", @@ -2754,7 +2754,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2781,7 +2781,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -2793,7 +2793,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "cfg-if", "frame-support", @@ -2812,7 +2812,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -2827,7 +2827,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "sp-api", @@ -2836,7 +2836,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "parity-scale-codec", @@ -3018,7 +3018,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "chrono", "frame-election-provider-support", @@ -4951,7 +4951,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "log", @@ -4970,7 +4970,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "anyhow", "jsonrpsee", @@ -5483,7 +5483,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5498,7 +5498,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -5514,7 +5514,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -5528,7 +5528,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5552,7 +5552,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5572,7 +5572,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5591,7 +5591,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5606,7 +5606,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -5625,7 +5625,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5649,7 +5649,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5667,7 +5667,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5686,7 +5686,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5703,7 +5703,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5720,7 +5720,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5738,7 +5738,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5761,7 +5761,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5774,7 +5774,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5793,7 +5793,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "docify", "frame-benchmarking", @@ -5812,7 +5812,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5835,7 +5835,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5851,7 +5851,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5871,7 +5871,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5888,7 +5888,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5905,7 +5905,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5924,7 +5924,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5941,7 +5941,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5957,7 +5957,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -5973,7 +5973,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -5990,7 +5990,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6010,7 +6010,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6021,7 +6021,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -6038,7 +6038,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6062,7 +6062,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6079,7 +6079,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6094,7 +6094,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6112,7 +6112,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6127,7 +6127,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6146,7 +6146,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6163,7 +6163,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -6184,7 +6184,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6200,7 +6200,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6219,7 +6219,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6242,7 +6242,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6253,7 +6253,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "log", "sp-arithmetic", @@ -6262,7 +6262,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "sp-api", @@ -6271,7 +6271,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6288,7 +6288,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6303,7 +6303,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6321,7 +6321,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6340,7 +6340,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-support", "frame-system", @@ -6356,7 +6356,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6372,7 +6372,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6384,7 +6384,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6401,7 +6401,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6416,7 +6416,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6432,7 +6432,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -6447,7 +6447,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-benchmarking", "frame-support", @@ -7492,6 +7492,7 @@ dependencies = [ name = "polkadot-node-core-runtime-api" version = "0.9.43" dependencies = [ + "async-trait", "futures", "lru 0.9.0", "polkadot-node-metrics", @@ -7502,7 +7503,6 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-api", - "sp-authority-discovery", "sp-consensus-babe", "sp-core", "sp-keyring", @@ -7542,7 +7542,6 @@ dependencies = [ "prioritized-metered-channel", "prometheus-parse", "sc-cli", - "sc-client-api", "sc-service", "sc-tracing", "sp-keyring", @@ -7639,6 +7638,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -8137,6 +8137,7 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -9564,7 +9565,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "log", "sp-core", @@ -9575,7 +9576,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -9603,7 +9604,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "futures-timer", @@ -9626,7 +9627,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9641,7 +9642,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9660,7 +9661,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9671,7 +9672,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "chrono", @@ -9710,7 +9711,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "fnv", "futures", @@ -9726,7 +9727,6 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", "sp-statement-store", @@ -9737,7 +9737,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "hash-db", "kvdb", @@ -9763,7 +9763,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -9788,7 +9788,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "fork-tree", @@ -9804,6 +9804,7 @@ dependencies = [ "sc-consensus-epochs", "sc-consensus-slots", "sc-telemetry", + "sc-transaction-pool-api", "scale-info", "sp-api", "sp-application-crypto", @@ -9823,7 +9824,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "jsonrpsee", @@ -9845,7 +9846,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "async-channel", @@ -9879,7 +9880,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "jsonrpsee", @@ -9898,7 +9899,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9911,7 +9912,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -9933,6 +9934,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -9951,7 +9953,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "finality-grandpa", "futures", @@ -9971,7 +9973,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -9994,13 +9996,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ - "lru 0.10.0", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -10016,7 +10018,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10028,7 +10030,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "anyhow", "cfg-if", @@ -10045,7 +10047,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ansi_term", "futures", @@ -10061,7 +10063,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -10075,7 +10077,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "async-channel", @@ -10116,7 +10118,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-channel", "cid", @@ -10136,7 +10138,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "bitflags", @@ -10153,16 +10155,16 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ahash 0.8.2", "futures", "futures-timer", "libp2p", "log", - "lru 0.10.0", "sc-network", "sc-network-common", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10171,7 +10173,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "async-channel", @@ -10192,7 +10194,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "async-channel", @@ -10202,7 +10204,6 @@ dependencies = [ "futures-timer", "libp2p", "log", - "lru 0.10.0", "mockall", "parity-scale-codec", "prost 0.11.0", @@ -10212,6 +10213,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -10226,7 +10228,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "futures", @@ -10244,7 +10246,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "bytes", @@ -10254,6 +10256,7 @@ dependencies = [ "hyper", "hyper-rustls 0.24.0", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -10261,9 +10264,13 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-network", + "sc-network-common", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", @@ -10273,7 +10280,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10282,7 +10289,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "jsonrpsee", @@ -10313,7 +10320,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10332,7 +10339,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "http", "jsonrpsee", @@ -10347,7 +10354,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "futures", @@ -10373,7 +10380,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "directories", @@ -10400,7 +10407,6 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", @@ -10438,7 +10444,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "log", "parity-scale-codec", @@ -10449,7 +10455,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "clap 4.2.5", "fs4", @@ -10463,7 +10469,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10482,7 +10488,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "libc", @@ -10501,7 +10507,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "chrono", "futures", @@ -10520,7 +10526,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ansi_term", "atty", @@ -10549,7 +10555,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10560,7 +10566,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -10586,7 +10592,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -10602,7 +10608,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-channel", "futures", @@ -11150,7 +11156,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "hash-db", "log", @@ -11158,6 +11164,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -11170,7 +11177,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "Inflector", "blake2", @@ -11184,7 +11191,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -11197,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "integer-sqrt", "num-traits", @@ -11211,7 +11218,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -11224,7 +11231,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "sp-api", "sp-inherents", @@ -11235,13 +11242,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "log", - "lru 0.10.0", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -11253,7 +11260,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "futures", @@ -11268,7 +11275,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "parity-scale-codec", @@ -11285,7 +11292,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "parity-scale-codec", @@ -11304,7 +11311,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11323,7 +11330,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "finality-grandpa", "log", @@ -11341,7 +11348,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -11353,7 +11360,7 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "bitflags", @@ -11391,13 +11398,14 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "blake2b_simd", "byteorder", @@ -11410,7 +11418,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "quote", "sp-core-hashing", @@ -11420,7 +11428,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11429,7 +11437,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro2", "quote", @@ -11439,7 +11447,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "environmental", "parity-scale-codec", @@ -11450,7 +11458,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11464,7 +11472,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "bytes", "ed25519", @@ -11489,7 +11497,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "lazy_static", "sp-core", @@ -11500,7 +11508,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -11512,7 +11520,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "thiserror", "zstd 0.12.3+zstd.1.5.2", @@ -11521,7 +11529,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11532,7 +11540,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11550,7 +11558,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -11564,7 +11572,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "sp-api", "sp-core", @@ -11574,7 +11582,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "backtrace", "lazy_static", @@ -11584,7 +11592,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "rustc-hash", "serde", @@ -11594,7 +11602,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "either", "hash256-std-hasher", @@ -11616,7 +11624,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11634,7 +11642,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "Inflector", "proc-macro-crate", @@ -11646,12 +11654,13 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -11660,7 +11669,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11674,7 +11683,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "hash-db", "log", @@ -11695,7 +11704,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -11712,12 +11721,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11730,7 +11739,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "parity-scale-codec", @@ -11743,7 +11752,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "sp-std", @@ -11755,7 +11764,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "sp-api", "sp-runtime", @@ -11764,7 +11773,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "parity-scale-codec", @@ -11779,7 +11788,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11802,7 +11811,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11819,7 +11828,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11830,7 +11839,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11843,7 +11852,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "parity-scale-codec", "scale-info", @@ -12084,12 +12093,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12108,7 +12117,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "hyper", "log", @@ -12120,7 +12129,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "jsonrpsee", @@ -12133,7 +12142,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12150,7 +12159,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "array-bytes", "async-trait", @@ -12176,7 +12185,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12186,7 +12195,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12197,7 +12206,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "ansi_term", "build-helper", @@ -13101,7 +13110,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3fee5c7a8d657909aecd829d4b276305f0828a16" +source = "git+https://github.com/paritytech/substrate?branch=master#63246b699d7e2645c8b12aae46f8f0765c682183" dependencies = [ "async-trait", "clap 4.2.5", diff --git a/node/core/runtime-api/Cargo.toml b/node/core/runtime-api/Cargo.toml index 31c1386cbd7f..bfb85316cfcb 100644 --- a/node/core/runtime-api/Cargo.toml +++ b/node/core/runtime-api/Cargo.toml @@ -18,9 +18,9 @@ polkadot-node-subsystem-types = { path = "../../subsystem-types" } [dev-dependencies] sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } +async-trait = "0.1.57" futures = { version = "0.3.21", features = ["thread-pool"] } polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } polkadot-node-primitives = { path = "../../primitives" } diff --git a/node/core/runtime-api/src/tests.rs b/node/core/runtime-api/src/tests.rs index b5ba4fc08a78..27090a102ec2 100644 --- a/node/core/runtime-api/src/tests.rs +++ b/node/core/runtime-api/src/tests.rs @@ -16,233 +16,250 @@ use super::*; -use ::test_helpers::{dummy_committed_candidate_receipt, dummy_validation_code}; use polkadot_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfiguration}; use polkadot_node_subsystem::SpawnGlue; use polkadot_node_subsystem_test_helpers::make_subsystem_context; use polkadot_primitives::{ - runtime_api::ParachainHost, AuthorityDiscoveryId, Block, CandidateEvent, - CommittedCandidateReceipt, CoreState, GroupRotationInfo, Id as ParaId, InboundDownwardMessage, - InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, - ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, - ValidatorId, ValidatorIndex, ValidatorSignature, + vstaging, AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, + CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, + GroupRotationInfo, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, + OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, + SessionIndex, SessionInfo, Slot, ValidationCode, ValidationCodeHash, ValidatorId, + ValidatorIndex, ValidatorSignature, }; -use sp_api::ProvideRuntimeApi; -use sp_authority_discovery::AuthorityDiscoveryApi; -use sp_consensus_babe::BabeApi; +use sp_api::ApiError; use sp_core::testing::TaskExecutor; use std::{ collections::{BTreeMap, HashMap}, sync::{Arc, Mutex}, }; +use test_helpers::{dummy_committed_candidate_receipt, dummy_validation_code}; -#[derive(Default, Clone)] -struct MockRuntimeApi { +#[derive(Default)] +struct MockSubsystemClient { + submitted_pvf_check_statement: Arc>>, authorities: Vec, validators: Vec, validator_groups: Vec>, availability_cores: Vec, - availability_cores_wait: Arc>, validation_data: HashMap, - session_index_for_child: SessionIndex, - session_info: HashMap, validation_code: HashMap, - validation_code_by_hash: HashMap, validation_outputs_results: HashMap, + session_index_for_child: SessionIndex, candidate_pending_availability: HashMap, - candidate_events: Vec, dmq_contents: HashMap>, hrmp_channels: HashMap>>, + validation_code_by_hash: HashMap, + availability_cores_wait: Arc>, babe_epoch: Option, - on_chain_votes: Option, - submitted_pvf_check_statement: Arc>>, pvfs_require_precheck: Vec, validation_code_hash: HashMap, + session_info: HashMap, + candidate_events: Vec, } -impl ProvideRuntimeApi for MockRuntimeApi { - type Api = Self; - - fn runtime_api<'a>(&'a self) -> sp_api::ApiRef<'a, Self::Api> { - self.clone().into() +#[async_trait::async_trait] +impl RuntimeApiSubsystemClient for MockSubsystemClient { + async fn api_version_parachain_host(&self, _: Hash) -> Result, ApiError> { + Ok(Some(5)) } -} -sp_api::mock_impl_runtime_apis! { - impl ParachainHost for MockRuntimeApi { - fn validators(&self) -> Vec { - self.validators.clone() - } + async fn validators(&self, _: Hash) -> Result, ApiError> { + Ok(self.validators.clone()) + } - fn validator_groups(&self) -> (Vec>, GroupRotationInfo) { - ( - self.validator_groups.clone(), - GroupRotationInfo { - session_start_block: 1, - group_rotation_frequency: 100, - now: 10, - }, - ) - } + async fn validator_groups( + &self, + _: Hash, + ) -> Result<(Vec>, GroupRotationInfo), ApiError> { + Ok(( + self.validator_groups.clone(), + GroupRotationInfo { session_start_block: 1, group_rotation_frequency: 100, now: 10 }, + )) + } - fn availability_cores(&self) -> Vec { - let _lock = self.availability_cores_wait.lock().unwrap(); - self.availability_cores.clone() - } + async fn availability_cores( + &self, + _: Hash, + ) -> Result>, ApiError> { + let _lock = self.availability_cores_wait.lock().unwrap(); + Ok(self.availability_cores.clone()) + } - fn persisted_validation_data( - &self, - para: ParaId, - _assumption: OccupiedCoreAssumption, - ) -> Option { - self.validation_data.get(¶).cloned() - } + async fn persisted_validation_data( + &self, + _: Hash, + para_id: ParaId, + _: OccupiedCoreAssumption, + ) -> Result>, ApiError> { + Ok(self.validation_data.get(¶_id).cloned()) + } - fn assumed_validation_data( - para_id: ParaId, - expected_persisted_validation_data_hash: Hash, - ) -> Option<(PersistedValidationData, ValidationCodeHash)> { - self.validation_data - .get(¶_id) - .cloned() - .filter(|data| data.hash() == expected_persisted_validation_data_hash) - .zip(self.validation_code.get(¶_id).map(|code| code.hash())) - } + async fn assumed_validation_data( + &self, + _: Hash, + para_id: ParaId, + expected_persisted_validation_data_hash: Hash, + ) -> Result, ValidationCodeHash)>, ApiError> + { + Ok(self + .validation_data + .get(¶_id) + .cloned() + .filter(|data| data.hash() == expected_persisted_validation_data_hash) + .zip(self.validation_code.get(¶_id).map(|code| code.hash()))) + } - fn check_validation_outputs( - &self, - para_id: ParaId, - _commitments: polkadot_primitives::CandidateCommitments, - ) -> bool { - self.validation_outputs_results - .get(¶_id) - .cloned() - .expect( - "`check_validation_outputs` called but the expected result hasn't been supplied" - ) - } + async fn check_validation_outputs( + &self, + _: Hash, + para_id: ParaId, + _: CandidateCommitments, + ) -> Result { + Ok(self.validation_outputs_results.get(¶_id).copied().unwrap()) + } - fn session_index_for_child(&self) -> SessionIndex { - self.session_index_for_child.clone() - } + async fn session_index_for_child(&self, _: Hash) -> Result { + Ok(self.session_index_for_child) + } - fn session_info(&self, index: SessionIndex) -> Option { - self.session_info.get(&index).cloned() - } + async fn validation_code( + &self, + _: Hash, + para_id: ParaId, + _: OccupiedCoreAssumption, + ) -> Result, ApiError> { + Ok(self.validation_code.get(¶_id).cloned()) + } - fn validation_code( - &self, - para: ParaId, - _assumption: OccupiedCoreAssumption, - ) -> Option { - self.validation_code.get(¶).map(|c| c.clone()) - } + async fn candidate_pending_availability( + &self, + _: Hash, + para_id: ParaId, + ) -> Result>, ApiError> { + Ok(self.candidate_pending_availability.get(¶_id).cloned()) + } - fn candidate_pending_availability( - &self, - para: ParaId, - ) -> Option { - self.candidate_pending_availability.get(¶).map(|c| c.clone()) - } + async fn candidate_events(&self, _: Hash) -> Result>, ApiError> { + Ok(self.candidate_events.clone()) + } - fn candidate_events(&self) -> Vec { - self.candidate_events.clone() - } + async fn dmq_contents( + &self, + _: Hash, + para_id: ParaId, + ) -> Result>, ApiError> { + Ok(self.dmq_contents.get(¶_id).cloned().unwrap()) + } - fn dmq_contents( - &self, - recipient: ParaId, - ) -> Vec { - self.dmq_contents.get(&recipient).map(|q| q.clone()).unwrap_or_default() - } + async fn inbound_hrmp_channels_contents( + &self, + _: Hash, + para_id: ParaId, + ) -> Result>>, ApiError> { + Ok(self.hrmp_channels.get(¶_id).cloned().unwrap()) + } - fn inbound_hrmp_channels_contents( - &self, - recipient: ParaId - ) -> BTreeMap> { - self.hrmp_channels.get(&recipient).map(|q| q.clone()).unwrap_or_default() - } + async fn validation_code_by_hash( + &self, + _: Hash, + hash: ValidationCodeHash, + ) -> Result, ApiError> { + Ok(self.validation_code_by_hash.get(&hash).cloned()) + } - fn validation_code_by_hash( - &self, - hash: ValidationCodeHash, - ) -> Option { - self.validation_code_by_hash.get(&hash).map(|c| c.clone()) - } + async fn on_chain_votes(&self, _: Hash) -> Result>, ApiError> { + todo!("Not required for tests") + } - fn on_chain_votes(&self) -> Option { - self.on_chain_votes.clone() - } + async fn session_info( + &self, + _: Hash, + index: SessionIndex, + ) -> Result, ApiError> { + Ok(self.session_info.get(&index).cloned()) + } - fn submit_pvf_check_statement(stmt: PvfCheckStatement, signature: ValidatorSignature) { - self - .submitted_pvf_check_statement - .lock() - .expect("poisoned mutext") - .push((stmt, signature)); - } + async fn submit_pvf_check_statement( + &self, + _: Hash, + stmt: PvfCheckStatement, + sig: ValidatorSignature, + ) -> Result<(), ApiError> { + self.submitted_pvf_check_statement.lock().unwrap().push((stmt, sig)); + Ok(()) + } - fn pvfs_require_precheck() -> Vec { - self.pvfs_require_precheck.clone() - } + async fn pvfs_require_precheck(&self, _: Hash) -> Result, ApiError> { + Ok(self.pvfs_require_precheck.clone()) + } - fn validation_code_hash( - &self, - para: ParaId, - _assumption: OccupiedCoreAssumption, - ) -> Option { - self.validation_code_hash.get(¶).map(|c| c.clone()) - } + async fn validation_code_hash( + &self, + _: Hash, + para_id: ParaId, + _: OccupiedCoreAssumption, + ) -> Result, ApiError> { + Ok(self.validation_code_hash.get(¶_id).cloned()) } - impl BabeApi for MockRuntimeApi { - fn configuration(&self) -> sp_consensus_babe::BabeConfiguration { - unimplemented!() - } + async fn disputes( + &self, + _: Hash, + ) -> Result)>, ApiError> { + todo!("Not required for tests") + } - fn current_epoch_start(&self) -> sp_consensus_babe::Slot { - self.babe_epoch.as_ref().unwrap().start_slot - } + async fn unapplied_slashes( + &self, + _: Hash, + ) -> Result, ApiError> { + todo!("Not required for tests") + } - fn current_epoch(&self) -> BabeEpoch { - self.babe_epoch.as_ref().unwrap().clone() - } + async fn key_ownership_proof( + &self, + _: Hash, + _: ValidatorId, + ) -> Result, ApiError> { + todo!("Not required for tests") + } - fn next_epoch(&self) -> BabeEpoch { - unimplemented!() - } + async fn submit_report_dispute_lost( + &self, + _: Hash, + _: vstaging::slashing::DisputeProof, + _: vstaging::slashing::OpaqueKeyOwnershipProof, + ) -> Result, ApiError> { + todo!("Not required for tests") + } - fn generate_key_ownership_proof( - _slot: sp_consensus_babe::Slot, - _authority_id: sp_consensus_babe::AuthorityId, - ) -> Option { - None - } + async fn session_executor_params( + &self, + _: Hash, + _: SessionIndex, + ) -> Result, ApiError> { + todo!("Not required for tests") + } - fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: sp_consensus_babe::EquivocationProof, - _key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof, - ) -> Option<()> { - None - } + async fn current_epoch(&self, _: Hash) -> Result { + Ok(self.babe_epoch.as_ref().unwrap().clone()) } - impl AuthorityDiscoveryApi for MockRuntimeApi { - fn authorities(&self) -> Vec { - self.authorities.clone() - } + async fn authorities(&self, _: Hash) -> Result, ApiError> { + Ok(self.authorities.clone()) } } #[test] fn requests_authorities() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let substem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(substem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -253,7 +270,7 @@ fn requests_authorities() { }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.authorities); + assert_eq!(rx.await.unwrap().unwrap(), substem_client.authorities); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -264,12 +281,12 @@ fn requests_authorities() { #[test] fn requests_validators() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -280,7 +297,7 @@ fn requests_validators() { }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validators); + assert_eq!(rx.await.unwrap().unwrap(), subsystem_client.validators); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -291,12 +308,12 @@ fn requests_validators() { #[test] fn requests_validator_groups() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -307,7 +324,7 @@ fn requests_validator_groups() { }) .await; - assert_eq!(rx.await.unwrap().unwrap().0, runtime_api.validator_groups); + assert_eq!(rx.await.unwrap().unwrap().0, subsystem_client.validator_groups); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -318,12 +335,12 @@ fn requests_validator_groups() { #[test] fn requests_availability_cores() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -334,7 +351,7 @@ fn requests_availability_cores() { }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.availability_cores); + assert_eq!(rx.await.unwrap().unwrap(), subsystem_client.availability_cores); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -350,12 +367,12 @@ fn requests_persisted_validation_data() { let para_b = ParaId::from(6_u32); let spawner = sp_core::testing::TaskExecutor::new(); - let mut runtime_api = MockRuntimeApi::default(); - runtime_api.validation_data.insert(para_a, Default::default()); - let runtime_api = Arc::new(runtime_api); + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client.validation_data.insert(para_a, Default::default()); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -401,14 +418,14 @@ fn requests_assumed_validation_data() { let expected_data_hash = ::default().hash(); let expected_code_hash = validation_code.hash(); - let mut runtime_api = MockRuntimeApi::default(); - runtime_api.validation_data.insert(para_a, Default::default()); - runtime_api.validation_code.insert(para_a, validation_code); - runtime_api.validation_data.insert(para_b, Default::default()); - let runtime_api = Arc::new(runtime_api); + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client.validation_data.insert(para_a, Default::default()); + subsystem_client.validation_code.insert(para_a, validation_code); + subsystem_client.validation_data.insert(para_b, Default::default()); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -445,20 +462,20 @@ fn requests_assumed_validation_data() { #[test] fn requests_check_validation_outputs() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let mut runtime_api = MockRuntimeApi::default(); + let mut subsystem_client = MockSubsystemClient::default(); let relay_parent = [1; 32].into(); let para_a = ParaId::from(5_u32); let para_b = ParaId::from(6_u32); let commitments = polkadot_primitives::CandidateCommitments::default(); let spawner = sp_core::testing::TaskExecutor::new(); - runtime_api.validation_outputs_results.insert(para_a, false); - runtime_api.validation_outputs_results.insert(para_b, true); + subsystem_client.validation_outputs_results.insert(para_a, false); + subsystem_client.validation_outputs_results.insert(para_b, true); - let runtime_api = Arc::new(runtime_api); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -471,7 +488,10 @@ fn requests_check_validation_outputs() { ), }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_a]); + assert_eq!( + rx.await.unwrap().unwrap(), + subsystem_client.validation_outputs_results[¶_a] + ); let (tx, rx) = oneshot::channel(); ctx_handle @@ -482,7 +502,10 @@ fn requests_check_validation_outputs() { ), }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_b]); + assert_eq!( + rx.await.unwrap().unwrap(), + subsystem_client.validation_outputs_results[¶_b] + ); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -493,12 +516,12 @@ fn requests_check_validation_outputs() { #[test] fn requests_session_index_for_child() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -509,7 +532,7 @@ fn requests_session_index_for_child() { }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.session_index_for_child); + assert_eq!(rx.await.unwrap().unwrap(), subsystem_client.session_index_for_child); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -537,16 +560,16 @@ fn dummy_session_info() -> SessionInfo { #[test] fn requests_session_info() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let mut runtime_api = MockRuntimeApi::default(); + let mut subsystem_client = MockSubsystemClient::default(); let session_index = 1; - runtime_api.session_info.insert(session_index, dummy_session_info()); - let runtime_api = Arc::new(runtime_api); + subsystem_client.session_info.insert(session_index, dummy_session_info()); + let subsystem_client = Arc::new(subsystem_client); let spawner = sp_core::testing::TaskExecutor::new(); let relay_parent = [1; 32].into(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -578,12 +601,12 @@ fn requests_validation_code() { let spawner = sp_core::testing::TaskExecutor::new(); let validation_code = dummy_validation_code(); - let mut runtime_api = MockRuntimeApi::default(); - runtime_api.validation_code.insert(para_a, validation_code.clone()); - let runtime_api = Arc::new(runtime_api); + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client.validation_code.insert(para_a, validation_code.clone()); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -626,14 +649,14 @@ fn requests_candidate_pending_availability() { let spawner = sp_core::testing::TaskExecutor::new(); let candidate_receipt = dummy_committed_candidate_receipt(relay_parent); - let mut runtime_api = MockRuntimeApi::default(); - runtime_api + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client .candidate_pending_availability .insert(para_a, candidate_receipt.clone()); - let runtime_api = Arc::new(runtime_api); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -671,12 +694,12 @@ fn requests_candidate_pending_availability() { #[test] fn requests_candidate_events() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -687,7 +710,7 @@ fn requests_candidate_events() { }) .await; - assert_eq!(rx.await.unwrap().unwrap(), runtime_api.candidate_events); + assert_eq!(rx.await.unwrap().unwrap(), subsystem_client.candidate_events); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -704,20 +727,20 @@ fn requests_dmq_contents() { let para_b = ParaId::from(6_u32); let spawner = sp_core::testing::TaskExecutor::new(); - let runtime_api = Arc::new({ - let mut runtime_api = MockRuntimeApi::default(); + let subsystem_client = Arc::new({ + let mut subsystem_client = MockSubsystemClient::default(); - runtime_api.dmq_contents.insert(para_a, vec![]); - runtime_api.dmq_contents.insert( + subsystem_client.dmq_contents.insert(para_a, vec![]); + subsystem_client.dmq_contents.insert( para_b, vec![InboundDownwardMessage { sent_at: 228, msg: b"Novus Ordo Seclorum".to_vec() }], ); - runtime_api + subsystem_client }); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -758,21 +781,20 @@ fn requests_inbound_hrmp_channels_contents() { (para_a, vec![]), (para_c, vec![InboundHrmpMessage { sent_at: 1, data: "๐™€=๐™ˆ๐˜พยฒ".as_bytes().to_owned() }]), ] - .iter() - .cloned() + .into_iter() .collect::>(); - let runtime_api = Arc::new({ - let mut runtime_api = MockRuntimeApi::default(); + let subsystem_client = Arc::new({ + let mut subsystem_client = MockSubsystemClient::default(); - runtime_api.hrmp_channels.insert(para_a, BTreeMap::new()); - runtime_api.hrmp_channels.insert(para_b, para_b_inbound_channels.clone()); + subsystem_client.hrmp_channels.insert(para_a, BTreeMap::new()); + subsystem_client.hrmp_channels.insert(para_b, para_b_inbound_channels.clone()); - runtime_api + subsystem_client }); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -807,21 +829,21 @@ fn requests_validation_code_by_hash() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); let spawner = sp_core::testing::TaskExecutor::new(); - let (runtime_api, validation_code) = { - let mut runtime_api = MockRuntimeApi::default(); + let (subsystem_client, validation_code) = { + let mut subsystem_client = MockSubsystemClient::default(); let mut validation_code = Vec::new(); for n in 0..5 { let code = ValidationCode::from(vec![n; 32]); - runtime_api.validation_code_by_hash.insert(code.hash(), code.clone()); + subsystem_client.validation_code_by_hash.insert(code.hash(), code.clone()); validation_code.push(code); } - (runtime_api, validation_code) + (Arc::new(subsystem_client), validation_code) }; let subsystem = - RuntimeApiSubsystem::new(Arc::new(runtime_api), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -849,13 +871,13 @@ fn requests_validation_code_by_hash() { #[test] fn multiple_requests_in_parallel_are_working() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let runtime_api = Arc::new(MockRuntimeApi::default()); + let subsystem_client = Arc::new(MockSubsystemClient::default()); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); - let mutex = runtime_api.availability_cores_wait.clone(); + let mutex = subsystem_client.availability_cores_wait.clone(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { // Make all requests block until we release this mutex. @@ -891,7 +913,7 @@ fn multiple_requests_in_parallel_are_working() { join.await .into_iter() - .for_each(|r| assert_eq!(r.unwrap().unwrap(), runtime_api.availability_cores)); + .for_each(|r| assert_eq!(r.unwrap().unwrap(), subsystem_client.availability_cores)); ctx_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; }; @@ -902,22 +924,22 @@ fn multiple_requests_in_parallel_are_working() { #[test] fn requests_babe_epoch() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); - let mut runtime_api = MockRuntimeApi::default(); + let mut subsystem_client = MockSubsystemClient::default(); let epoch = BabeEpoch { epoch_index: 100, - start_slot: sp_consensus_babe::Slot::from(1000), + start_slot: Slot::from(1000), duration: 10, authorities: Vec::new(), randomness: [1u8; 32], config: BabeEpochConfiguration { c: (1, 4), allowed_slots: BabeAllowedSlots::PrimarySlots }, }; - runtime_api.babe_epoch = Some(epoch.clone()); - let runtime_api = Arc::new(runtime_api); + subsystem_client.babe_epoch = Some(epoch.clone()); + let subsystem_client = Arc::new(subsystem_client); let relay_parent = [1; 32].into(); let spawner = sp_core::testing::TaskExecutor::new(); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); @@ -939,10 +961,10 @@ fn requests_babe_epoch() { fn requests_submit_pvf_check_statement() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); let spawner = sp_core::testing::TaskExecutor::new(); + let subsystem_client = Arc::new(MockSubsystemClient::default()); - let runtime_api = Arc::new(MockRuntimeApi::default()); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -974,7 +996,7 @@ fn requests_submit_pvf_check_statement() { assert_eq!(rx.await.unwrap().unwrap(), ()); assert_eq!( - &*runtime_api.submitted_pvf_check_statement.lock().expect("poisened mutex"), + &*subsystem_client.submitted_pvf_check_statement.lock().expect("poisened mutex"), &[(stmt.clone(), sig.clone()), (stmt.clone(), sig.clone())] ); @@ -1000,14 +1022,14 @@ fn requests_pvfs_require_precheck() { let (ctx, mut ctx_handle) = make_subsystem_context(TaskExecutor::new()); let spawner = sp_core::testing::TaskExecutor::new(); - let runtime_api = Arc::new({ - let mut runtime_api = MockRuntimeApi::default(); - runtime_api.pvfs_require_precheck = vec![[1; 32].into(), [2; 32].into()]; - runtime_api + let subsystem_client = Arc::new({ + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client.pvfs_require_precheck = vec![[1; 32].into(), [2; 32].into()]; + subsystem_client }); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let relay_parent = [1; 32].into(); @@ -1037,12 +1059,14 @@ fn requests_validation_code_hash() { let spawner = sp_core::testing::TaskExecutor::new(); let validation_code_hash = dummy_validation_code().hash(); - let mut runtime_api = MockRuntimeApi::default(); - runtime_api.validation_code_hash.insert(para_a, validation_code_hash.clone()); - let runtime_api = Arc::new(runtime_api); + let mut subsystem_client = MockSubsystemClient::default(); + subsystem_client + .validation_code_hash + .insert(para_a, validation_code_hash.clone()); + let subsystem_client = Arc::new(subsystem_client); let subsystem = - RuntimeApiSubsystem::new(runtime_api.clone(), Metrics(None), SpawnGlue(spawner)); + RuntimeApiSubsystem::new(subsystem_client.clone(), Metrics(None), SpawnGlue(spawner)); let subsystem_task = run(ctx, subsystem).map(|x| x.unwrap()); let test_task = async move { let (tx, rx) = oneshot::channel(); diff --git a/node/malus/src/variants/back_garbage_candidate.rs b/node/malus/src/variants/back_garbage_candidate.rs index d0d21f783dff..45f1aa2e0b7f 100644 --- a/node/malus/src/variants/back_garbage_candidate.rs +++ b/node/malus/src/variants/back_garbage_candidate.rs @@ -28,6 +28,7 @@ use polkadot_cli::{ Cli, }; use polkadot_node_subsystem::SpawnGlue; +use polkadot_node_subsystem_types::DefaultSubsystemClient; use sp_core::traits::SpawnNamed; use crate::{ @@ -62,7 +63,10 @@ impl OverseerGen for BackGarbageCandidates { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer, Arc>, OverseerHandle), Error> + ) -> Result< + (Overseer, Arc>>, OverseerHandle), + Error, + > where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, diff --git a/node/malus/src/variants/dispute_valid_candidates.rs b/node/malus/src/variants/dispute_valid_candidates.rs index 89504d76fbe6..ab1fba478beb 100644 --- a/node/malus/src/variants/dispute_valid_candidates.rs +++ b/node/malus/src/variants/dispute_valid_candidates.rs @@ -32,6 +32,7 @@ use polkadot_cli::{ Cli, }; use polkadot_node_subsystem::SpawnGlue; +use polkadot_node_subsystem_types::DefaultSubsystemClient; use sp_core::traits::SpawnNamed; // Filter wrapping related types. @@ -78,7 +79,10 @@ impl OverseerGen for DisputeValidCandidates { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer, Arc>, OverseerHandle), Error> + ) -> Result< + (Overseer, Arc>>, OverseerHandle), + Error, + > where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, diff --git a/node/malus/src/variants/suggest_garbage_candidate.rs b/node/malus/src/variants/suggest_garbage_candidate.rs index 049cfc2b153d..9fd8f6473bde 100644 --- a/node/malus/src/variants/suggest_garbage_candidate.rs +++ b/node/malus/src/variants/suggest_garbage_candidate.rs @@ -33,6 +33,7 @@ use polkadot_cli::{ }; use polkadot_node_core_candidate_validation::find_validation_data; use polkadot_node_primitives::{AvailableData, BlockData, PoV}; +use polkadot_node_subsystem_types::DefaultSubsystemClient; use polkadot_primitives::{CandidateDescriptor, CandidateReceipt}; use polkadot_node_subsystem_util::request_validators; @@ -255,7 +256,10 @@ impl OverseerGen for SuggestGarbageCandidates { &self, connector: OverseerConnector, args: OverseerGenArgs<'a, Spawner, RuntimeClient>, - ) -> Result<(Overseer, Arc>, OverseerHandle), Error> + ) -> Result< + (Overseer, Arc>>, OverseerHandle), + Error, + > where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, diff --git a/node/metrics/Cargo.toml b/node/metrics/Cargo.toml index 7365d7593d7d..2e9bc22d1cb3 100644 --- a/node/metrics/Cargo.toml +++ b/node/metrics/Cargo.toml @@ -32,7 +32,6 @@ polkadot-test-service = { path = "../test/service", features=["runtime-metrics"] substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } prometheus-parse = {version = "0.2.2"} [features] diff --git a/node/metrics/src/tests.rs b/node/metrics/src/tests.rs index f8f988e1f665..68abfeebc124 100644 --- a/node/metrics/src/tests.rs +++ b/node/metrics/src/tests.rs @@ -19,7 +19,6 @@ use hyper::{Client, Uri}; use polkadot_test_service::{node_config, run_validator_node, test_prometheus_config}; use primitives::metric_definitions::PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED; -use sc_client_api::{execution_extensions::ExecutionStrategies, ExecutionStrategy}; use sp_keyring::AccountKeyring::*; use std::collections::HashMap; @@ -41,15 +40,6 @@ async fn runtime_can_publish_metrics() { // Setup the runtime metrics provider. crate::logger_hook()(&mut builder, &alice_config); - // Override default native strategy, runtime metrics are available only in the wasm runtime. - alice_config.execution_strategies = ExecutionStrategies { - syncing: ExecutionStrategy::AlwaysWasm, - importing: ExecutionStrategy::AlwaysWasm, - block_construction: ExecutionStrategy::AlwaysWasm, - offchain_worker: ExecutionStrategy::AlwaysWasm, - other: ExecutionStrategy::AlwaysWasm, - }; - builder.init().expect("Failed to set up the logger"); // Start validator Alice. diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 91eb139d67f3..dd225b462b50 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -24,6 +24,7 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index ed5e5361085e..0e54b458eb21 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -52,6 +52,7 @@ use { peer_set::PeerSetProtocolNames, request_response::ReqProtocolNames, }, sc_client_api::BlockBackend, + sc_transaction_pool_api::OffchainTransactionPoolFactory, sp_core::traits::SpawnNamed, sp_trie::PrefixedMemoryDB, }; @@ -87,7 +88,7 @@ pub use consensus_common::{Proposal, SelectChain}; use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE; use mmr_gadget::MmrGadget; pub use polkadot_primitives::{Block, BlockId, BlockNumber, CollatorPair, Hash, Id as ParaId}; -pub use sc_client_api::{Backend, CallExecutor, ExecutionStrategy}; +pub use sc_client_api::{Backend, CallExecutor}; pub use sc_consensus::{BlockImport, LongestChain}; pub use sc_executor::NativeExecutionDispatch; use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; @@ -513,13 +514,13 @@ where babe::block_import(babe_config.clone(), beefy_block_import, client.clone())?; let slot_duration = babe_link.config().slot_duration(); - let (import_queue, babe_worker_handle) = babe::import_queue( - babe_link.clone(), - block_import.clone(), - Some(Box::new(justification_import)), - client.clone(), - select_chain.clone(), - move |_, ()| async move { + let (import_queue, babe_worker_handle) = babe::import_queue(babe::ImportQueueParams { + link: babe_link.clone(), + block_import: block_import.clone(), + justification_import: Some(Box::new(justification_import)), + client: client.clone(), + select_chain: select_chain.clone(), + create_inherent_data_providers: move |_, ()| async move { let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = @@ -530,10 +531,11 @@ where Ok((slot, timestamp)) }, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|x| x.handle()), - )?; + spawner: &task_manager.spawn_essential_handle(), + registry: config.prometheus_registry(), + telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), + })?; let justification_stream = grandpa_link.justification_stream(); let shared_authority_set = grandpa_link.shared_authority_set().clone(); @@ -579,9 +581,10 @@ where beefy_best_block_stream: beefy_rpc_links.from_voter_best_beefy_stream.clone(), subscription_executor, }, + backend: backend.clone(), }; - polkadot_rpc::create_full(deps, backend.clone()).map_err(Into::into) + polkadot_rpc::create_full(deps).map_err(Into::into) } }; @@ -824,22 +827,25 @@ where })?; if config.offchain_worker.enabled { - let offchain_workers = Arc::new(sc_offchain::OffchainWorkers::new_with_options( - client.clone(), - sc_offchain::OffchainWorkerOptions { enable_http_requests: false }, - )); + use futures::FutureExt; - // Start the offchain workers to have task_manager.spawn_handle().spawn( - "offchain-notifications", - None, - sc_offchain::notification_future( - config.role.is_authority(), - client.clone(), - offchain_workers, - task_manager.spawn_handle().clone(), - network.clone(), - ), + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + )), + network_provider: network.clone(), + is_validator: role.is_authority(), + enable_http_requests: false, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -981,6 +987,9 @@ where overseer_message_channel_capacity_override, req_protocol_names, peerset_protocol_names, + offchain_transaction_pool_factory: OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + ), }, ) .map_err(|e| { @@ -1026,7 +1035,7 @@ where let proposer = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), client.clone(), - transaction_pool, + transaction_pool.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), ); @@ -1186,6 +1195,7 @@ where prometheus_registry: prometheus_registry.clone(), shared_voter_state, telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), }; task_manager.spawn_essential_handle().spawn_blocking( diff --git a/node/service/src/overseer.rs b/node/service/src/overseer.rs index afb7ec998b49..b1172cd9a549 100644 --- a/node/service/src/overseer.rs +++ b/node/service/src/overseer.rs @@ -15,6 +15,8 @@ // along with Polkadot. If not, see . use super::{AuthorityDiscoveryApi, Block, Error, Hash, IsCollator, Registry}; +use polkadot_node_subsystem_types::DefaultSubsystemClient; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_core::traits::SpawnNamed; use lru::LruCache; @@ -125,6 +127,8 @@ where pub req_protocol_names: ReqProtocolNames, /// [`PeerSet`] protocol names to protocols mapping. pub peerset_protocol_names: PeerSetProtocolNames, + /// The offchain transaction pool factory. + pub offchain_transaction_pool_factory: OffchainTransactionPoolFactory, } /// Obtain a prepared `OverseerBuilder`, that is initialized @@ -155,11 +159,12 @@ pub fn prepared_overseer_builder( overseer_message_channel_capacity_override, req_protocol_names, peerset_protocol_names, + offchain_transaction_pool_factory, }: OverseerGenArgs, ) -> Result< InitializedOverseerBuilder< SpawnGlue, - Arc, + Arc>, CandidateValidationSubsystem, PvfCheckerSubsystem, CandidateBackingSubsystem, @@ -169,7 +174,7 @@ pub fn prepared_overseer_builder( BitfieldSigningSubsystem, BitfieldDistributionSubsystem, ProvisionerSubsystem, - RuntimeApiSubsystem, + RuntimeApiSubsystem>, AvailabilityStoreSubsystem, NetworkBridgeRxSubsystem< Arc>, @@ -204,6 +209,11 @@ where let network_bridge_metrics: NetworkBridgeMetrics = Metrics::register(registry)?; + let runtime_api_client = Arc::new(DefaultSubsystemClient::new( + runtime_client.clone(), + offchain_transaction_pool_factory, + )); + let builder = Overseer::builder() .network_bridge_tx(NetworkBridgeTxSubsystem::new( network_service.clone(), @@ -273,7 +283,7 @@ where }) .provisioner(ProvisionerSubsystem::new(Metrics::register(registry)?)) .runtime_api(RuntimeApiSubsystem::new( - runtime_client.clone(), + runtime_api_client.clone(), Metrics::register(registry)?, spawner.clone(), )) @@ -312,7 +322,7 @@ where .activation_external_listeners(Default::default()) .span_per_active_leaf(Default::default()) .active_leaves(Default::default()) - .supports_parachains(runtime_client) + .supports_parachains(runtime_api_client) .known_leaves(LruCache::new(KNOWN_LEAVES_CACHE_SIZE)) .metrics(metrics) .spawner(spawner); @@ -334,7 +344,10 @@ pub trait OverseerGen { &self, connector: OverseerConnector, args: OverseerGenArgs, - ) -> Result<(Overseer, Arc>, OverseerHandle), Error> + ) -> Result< + (Overseer, Arc>>, OverseerHandle), + Error, + > where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, @@ -358,7 +371,10 @@ impl OverseerGen for RealOverseerGen { &self, connector: OverseerConnector, args: OverseerGenArgs, - ) -> Result<(Overseer, Arc>, OverseerHandle), Error> + ) -> Result< + (Overseer, Arc>>, OverseerHandle), + Error, + > where RuntimeClient: 'static + ProvideRuntimeApi + HeaderBackend + AuxStore, RuntimeClient::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 31bf34cd2124..645665dc794f 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -18,6 +18,7 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } smallvec = "1.8.0" substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } thiserror = "1.0.31" diff --git a/node/subsystem-types/src/lib.rs b/node/subsystem-types/src/lib.rs index 2ec25bb4ee51..88c7165bcd80 100644 --- a/node/subsystem-types/src/lib.rs +++ b/node/subsystem-types/src/lib.rs @@ -31,7 +31,7 @@ pub mod errors; pub mod messages; mod runtime_client; -pub use runtime_client::RuntimeApiSubsystemClient; +pub use runtime_client::{DefaultSubsystemClient, RuntimeApiSubsystemClient}; pub use jaeger::*; pub use polkadot_node_jaeger as jaeger; diff --git a/node/subsystem-types/src/runtime_client.rs b/node/subsystem-types/src/runtime_client.rs index 2d6d7afcfd08..196b928ad62b 100644 --- a/node/subsystem-types/src/runtime_client.rs +++ b/node/subsystem-types/src/runtime_client.rs @@ -23,10 +23,11 @@ use polkadot_primitives::{ SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, }; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::{ApiError, ApiExt, ProvideRuntimeApi}; use sp_authority_discovery::AuthorityDiscoveryApi; use sp_consensus_babe::{BabeApi, Epoch}; -use std::collections::BTreeMap; +use std::{collections::BTreeMap, sync::Arc}; /// Exposes all runtime calls that are used by the runtime API subsystem. #[async_trait] @@ -231,28 +232,44 @@ pub trait RuntimeApiSubsystemClient { ) -> std::result::Result, ApiError>; } +/// Default implementation of [`RuntimeApiSubsystemClient`] using the client. +pub struct DefaultSubsystemClient { + client: Arc, + offchain_transaction_pool_factory: OffchainTransactionPoolFactory, +} + +impl DefaultSubsystemClient { + /// Create new instance. + pub fn new( + client: Arc, + offchain_transaction_pool_factory: OffchainTransactionPoolFactory, + ) -> Self { + Self { client, offchain_transaction_pool_factory } + } +} + #[async_trait] -impl RuntimeApiSubsystemClient for T +impl RuntimeApiSubsystemClient for DefaultSubsystemClient where - T: ProvideRuntimeApi + Send + Sync, - T::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, + Client: ProvideRuntimeApi + Send + Sync, + Client::Api: ParachainHost + BabeApi + AuthorityDiscoveryApi, { async fn validators(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().validators(at) + self.client.runtime_api().validators(at) } async fn validator_groups( &self, at: Hash, ) -> Result<(Vec>, GroupRotationInfo), ApiError> { - self.runtime_api().validator_groups(at) + self.client.runtime_api().validator_groups(at) } async fn availability_cores( &self, at: Hash, ) -> Result>, ApiError> { - self.runtime_api().availability_cores(at) + self.client.runtime_api().availability_cores(at) } async fn persisted_validation_data( @@ -261,7 +278,7 @@ where para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result>, ApiError> { - self.runtime_api().persisted_validation_data(at, para_id, assumption) + self.client.runtime_api().persisted_validation_data(at, para_id, assumption) } async fn assumed_validation_data( @@ -271,7 +288,7 @@ where expected_persisted_validation_data_hash: Hash, ) -> Result, ValidationCodeHash)>, ApiError> { - self.runtime_api().assumed_validation_data( + self.client.runtime_api().assumed_validation_data( at, para_id, expected_persisted_validation_data_hash, @@ -284,11 +301,11 @@ where para_id: Id, outputs: CandidateCommitments, ) -> Result { - self.runtime_api().check_validation_outputs(at, para_id, outputs) + self.client.runtime_api().check_validation_outputs(at, para_id, outputs) } async fn session_index_for_child(&self, at: Hash) -> Result { - self.runtime_api().session_index_for_child(at) + self.client.runtime_api().session_index_for_child(at) } async fn validation_code( @@ -297,7 +314,7 @@ where para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError> { - self.runtime_api().validation_code(at, para_id, assumption) + self.client.runtime_api().validation_code(at, para_id, assumption) } async fn candidate_pending_availability( @@ -305,11 +322,11 @@ where at: Hash, para_id: Id, ) -> Result>, ApiError> { - self.runtime_api().candidate_pending_availability(at, para_id) + self.client.runtime_api().candidate_pending_availability(at, para_id) } async fn candidate_events(&self, at: Hash) -> Result>, ApiError> { - self.runtime_api().candidate_events(at) + self.client.runtime_api().candidate_events(at) } async fn dmq_contents( @@ -317,7 +334,7 @@ where at: Hash, recipient: Id, ) -> Result>, ApiError> { - self.runtime_api().dmq_contents(at, recipient) + self.client.runtime_api().dmq_contents(at, recipient) } async fn inbound_hrmp_channels_contents( @@ -325,7 +342,7 @@ where at: Hash, recipient: Id, ) -> Result>>, ApiError> { - self.runtime_api().inbound_hrmp_channels_contents(at, recipient) + self.client.runtime_api().inbound_hrmp_channels_contents(at, recipient) } async fn validation_code_by_hash( @@ -333,14 +350,14 @@ where at: Hash, hash: ValidationCodeHash, ) -> Result, ApiError> { - self.runtime_api().validation_code_by_hash(at, hash) + self.client.runtime_api().validation_code_by_hash(at, hash) } async fn on_chain_votes( &self, at: Hash, ) -> Result>, ApiError> { - self.runtime_api().on_chain_votes(at) + self.client.runtime_api().on_chain_votes(at) } async fn session_executor_params( @@ -348,7 +365,7 @@ where at: Hash, session_index: SessionIndex, ) -> Result, ApiError> { - self.runtime_api().session_executor_params(at, session_index) + self.client.runtime_api().session_executor_params(at, session_index) } async fn session_info( @@ -356,7 +373,7 @@ where at: Hash, index: SessionIndex, ) -> Result, ApiError> { - self.runtime_api().session_info(at, index) + self.client.runtime_api().session_info(at, index) } async fn submit_pvf_check_statement( @@ -365,11 +382,17 @@ where stmt: PvfCheckStatement, signature: ValidatorSignature, ) -> Result<(), ApiError> { - self.runtime_api().submit_pvf_check_statement(at, stmt, signature) + let mut runtime_api = self.client.runtime_api(); + + runtime_api.register_extension( + self.offchain_transaction_pool_factory.offchain_transaction_pool(at), + ); + + runtime_api.submit_pvf_check_statement(at, stmt, signature) } async fn pvfs_require_precheck(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().pvfs_require_precheck(at) + self.client.runtime_api().pvfs_require_precheck(at) } async fn validation_code_hash( @@ -378,36 +401,36 @@ where para_id: Id, assumption: OccupiedCoreAssumption, ) -> Result, ApiError> { - self.runtime_api().validation_code_hash(at, para_id, assumption) + self.client.runtime_api().validation_code_hash(at, para_id, assumption) } async fn current_epoch(&self, at: Hash) -> Result { - self.runtime_api().current_epoch(at) + self.client.runtime_api().current_epoch(at) } async fn authorities( &self, at: Hash, ) -> std::result::Result, ApiError> { - self.runtime_api().authorities(at) + self.client.runtime_api().authorities(at) } async fn api_version_parachain_host(&self, at: Hash) -> Result, ApiError> { - self.runtime_api().api_version::>(at) + self.client.runtime_api().api_version::>(at) } async fn disputes( &self, at: Hash, ) -> Result)>, ApiError> { - self.runtime_api().disputes(at) + self.client.runtime_api().disputes(at) } async fn unapplied_slashes( &self, at: Hash, ) -> Result, ApiError> { - self.runtime_api().unapplied_slashes(at) + self.client.runtime_api().unapplied_slashes(at) } async fn key_ownership_proof( @@ -415,7 +438,7 @@ where at: Hash, validator_id: ValidatorId, ) -> Result, ApiError> { - self.runtime_api().key_ownership_proof(at, validator_id) + self.client.runtime_api().key_ownership_proof(at, validator_id) } async fn submit_report_dispute_lost( @@ -424,7 +447,12 @@ where dispute_proof: vstaging::slashing::DisputeProof, key_ownership_proof: vstaging::slashing::OpaqueKeyOwnershipProof, ) -> Result, ApiError> { - self.runtime_api() - .submit_report_dispute_lost(at, dispute_proof, key_ownership_proof) + let mut runtime_api = self.client.runtime_api(); + + runtime_api.register_extension( + self.offchain_transaction_pool_factory.offchain_transaction_pool(at), + ); + + runtime_api.submit_report_dispute_lost(at, dispute_proof, key_ownership_proof) } } diff --git a/node/test/client/src/lib.rs b/node/test/client/src/lib.rs index 2996bc84c763..5d97ffcdf1da 100644 --- a/node/test/client/src/lib.rs +++ b/node/test/client/src/lib.rs @@ -75,12 +75,7 @@ impl TestClientBuilderExt for TestClientBuilder { self.backend().clone(), executor.clone(), Default::default(), - ExecutionExtensions::new( - Default::default(), - None, - sc_offchain::OffchainDb::factory_from_backend(&*self.backend()), - Arc::new(executor), - ), + ExecutionExtensions::new(Default::default(), Arc::new(executor)), ) .unwrap(); diff --git a/node/test/service/src/lib.rs b/node/test/service/src/lib.rs index 08d09f8fe69a..0cf52c0934d5 100644 --- a/node/test/service/src/lib.rs +++ b/node/test/service/src/lib.rs @@ -35,7 +35,7 @@ use polkadot_test_runtime::{ }; use sc_chain_spec::ChainSpec; -use sc_client_api::{execution_extensions::ExecutionStrategies, BlockchainEvents}; +use sc_client_api::BlockchainEvents; use sc_network::{ config::{NetworkConfiguration, TransportConfig}, multiaddr, NetworkStateInfo, @@ -157,14 +157,6 @@ pub fn node_config( instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite, }, wasm_runtime_overrides: Default::default(), - // NOTE: we enforce the use of the native runtime to make the errors more debuggable - execution_strategies: ExecutionStrategies { - syncing: sc_client_api::ExecutionStrategy::NativeWhenPossible, - importing: sc_client_api::ExecutionStrategy::NativeWhenPossible, - block_construction: sc_client_api::ExecutionStrategy::NativeWhenPossible, - offchain_worker: sc_client_api::ExecutionStrategy::NativeWhenPossible, - other: sc_client_api::ExecutionStrategy::NativeWhenPossible, - }, rpc_addr: Default::default(), rpc_max_request_size: Default::default(), rpc_max_response_size: Default::default(), diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index c08e28799c54..14ca9623589d 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -89,12 +89,13 @@ pub struct FullDeps { pub grandpa: GrandpaDeps, /// BEEFY specific dependencies. pub beefy: BeefyDeps, + /// Backend used by the node. + pub backend: Arc, } /// Instantiate all RPC extensions. pub fn create_full( - deps: FullDeps, - backend: Arc, + FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, beefy, backend } : FullDeps, ) -> Result> where C: ProvideRuntimeApi @@ -124,8 +125,6 @@ where use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer}; let mut io = RpcModule::new(()); - let FullDeps { client, pool, select_chain, chain_spec, deny_unsafe, babe, grandpa, beefy } = - deps; let BabeDeps { babe_worker_handle, keystore } = babe; let GrandpaDeps { shared_voter_state, @@ -135,10 +134,18 @@ where finality_provider, } = grandpa; - io.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?; + io.merge(StateMigration::new(client.clone(), backend.clone(), deny_unsafe).into_rpc())?; io.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; io.merge(TransactionPayment::new(client.clone()).into_rpc())?; - io.merge(Mmr::new(client.clone()).into_rpc())?; + io.merge( + Mmr::new( + client.clone(), + backend + .offchain_storage() + .ok_or("Backend doesn't provide the required offchain storage")?, + ) + .into_rpc(), + )?; io.merge( Babe::new(client.clone(), babe_worker_handle.clone(), keystore, select_chain, deny_unsafe) .into_rpc(), diff --git a/scripts/ci/gitlab/pipeline/short-benchmarks.yml b/scripts/ci/gitlab/pipeline/short-benchmarks.yml index 89e137cf379b..dd150e5916e2 100644 --- a/scripts/ci/gitlab/pipeline/short-benchmarks.yml +++ b/scripts/ci/gitlab/pipeline/short-benchmarks.yml @@ -14,7 +14,7 @@ short-benchmark-polkadot: &short-bench variables: RUNTIME: polkadot script: - - ./artifacts/polkadot benchmark pallet --execution wasm --wasm-execution compiled --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 + - ./artifacts/polkadot benchmark pallet --wasm-execution compiled --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 short-benchmark-kusama: <<: *short-bench diff --git a/scripts/ci/run_benches_for_runtime.sh b/scripts/ci/run_benches_for_runtime.sh index d88ca343d6cf..296985a42764 100755 --- a/scripts/ci/run_benches_for_runtime.sh +++ b/scripts/ci/run_benches_for_runtime.sh @@ -42,7 +42,6 @@ for PALLET in "${PALLETS[@]}"; do --repeat=20 \ --pallet="$PALLET" \ --extrinsic="*" \ - --execution=wasm \ --wasm-execution=compiled \ --header=./file_header.txt \ --output="./runtime/${runtime}/src/weights/${output_file}" 2>&1 @@ -58,7 +57,6 @@ echo "[+] Benchmarking block and extrinsic overheads..." OUTPUT=$( ./target/production/polkadot benchmark overhead \ --chain="${runtime}-dev" \ - --execution=wasm \ --wasm-execution=compiled \ --weight-path="runtime/${runtime}/constants/src/weights/" \ --warmup=10 \ diff --git a/tests/benchmark_block.rs b/tests/benchmark_block.rs index b7ff6cdef969..bc91b31bc7b6 100644 --- a/tests/benchmark_block.rs +++ b/tests/benchmark_block.rs @@ -82,7 +82,7 @@ fn benchmark_block(runtime: &str, base_path: &Path, block: u32) -> Result<(), St .arg(base_path) .args(["--from", &block.to_string(), "--to", &block.to_string()]) .args(["--repeat", "1"]) - .args(["--execution", "wasm", "--wasm-execution", "compiled"]) + .args(["--wasm-execution", "compiled"]) .status() .map_err(|e| format!("command failed: {:?}", e))?; diff --git a/xcm/xcm-executor/integration-tests/src/lib.rs b/xcm/xcm-executor/integration-tests/src/lib.rs index 95138250cca9..111833e67cfb 100644 --- a/xcm/xcm-executor/integration-tests/src/lib.rs +++ b/xcm/xcm-executor/integration-tests/src/lib.rs @@ -19,8 +19,8 @@ use frame_support::{codec::Encode, dispatch::GetDispatchInfo, weights::Weight}; use polkadot_test_client::{ - BlockBuilderExt, ClientBlockImportExt, DefaultTestClientBuilderExt, ExecutionStrategy, - InitPolkadotBlockBuilder, TestClientBuilder, TestClientBuilderExt, + BlockBuilderExt, ClientBlockImportExt, DefaultTestClientBuilderExt, InitPolkadotBlockBuilder, + TestClientBuilder, TestClientBuilderExt, }; use polkadot_test_runtime::{pallet_test_notifier, xcm_config::XcmConfig}; use polkadot_test_service::construct_extrinsic; @@ -32,9 +32,7 @@ use xcm_executor::traits::WeightBounds; #[test] fn basic_buy_fees_message_executes() { sp_tracing::try_init_simple(); - let mut client = TestClientBuilder::new() - .set_execution_strategy(ExecutionStrategy::AlwaysWasm) - .build(); + let mut client = TestClientBuilder::new().build(); let msg = Xcm(vec![ WithdrawAsset((Parent, 100).into()), @@ -75,9 +73,7 @@ fn basic_buy_fees_message_executes() { #[test] fn transact_recursion_limit_works() { sp_tracing::try_init_simple(); - let mut client = TestClientBuilder::new() - .set_execution_strategy(ExecutionStrategy::AlwaysWasm) - .build(); + let mut client = TestClientBuilder::new().build(); let mut msg = Xcm(vec![ClearOrigin]); let max_weight = ::Weigher::weight(&mut msg).unwrap(); @@ -132,9 +128,7 @@ fn query_response_fires() { use polkadot_test_runtime::RuntimeEvent::TestNotifier; sp_tracing::try_init_simple(); - let mut client = TestClientBuilder::new() - .set_execution_strategy(ExecutionStrategy::AlwaysWasm) - .build(); + let mut client = TestClientBuilder::new().build(); let mut block_builder = client.init_polkadot_block_builder(); @@ -216,9 +210,7 @@ fn query_response_elicits_handler() { use polkadot_test_runtime::RuntimeEvent::TestNotifier; sp_tracing::try_init_simple(); - let mut client = TestClientBuilder::new() - .set_execution_strategy(ExecutionStrategy::AlwaysWasm) - .build(); + let mut client = TestClientBuilder::new().build(); let mut block_builder = client.init_polkadot_block_builder();