From 7c7b02ece06737d6753d8b0cce9cc6c7712e1596 Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 28 Jul 2020 20:18:11 +0200 Subject: [PATCH] Companion PR for `Various small improvements to service construction.`. (#1472) * Initial commit Forked at: 1ed17cd4673f1f339eebc751b94ded6b50184cad Parent branch: origin/master * Refactor * Refactor * Remove macro * WIP Forked at: 1ed17cd4673f1f339eebc751b94ded6b50184cad Parent branch: origin/master * CLEANUP Forked at: 1ed17cd4673f1f339eebc751b94ded6b50184cad Parent branch: origin/master * small fix * fix for browser * Switch branch * Rewrite service builds * Update branch * Fix sp-core branch * Switch branch back and update Co-authored-by: Cecile Tonglet --- polkadot/Cargo.lock | 286 +++++++++--------- .../network/bitfield-distribution/Cargo.toml | 2 +- polkadot/node/service/src/lib.rs | 171 ++++++----- polkadot/rpc/src/lib.rs | 2 +- polkadot/service/src/lib.rs | 170 ++++++----- 5 files changed, 345 insertions(+), 286 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index 6502399a64..c9cfa540d4 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -1370,7 +1370,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", ] @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -1395,7 +1395,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "Inflector", "frame-benchmarking", @@ -1414,7 +1414,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -1429,7 +1429,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "11.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "serde", @@ -1440,7 +1440,7 @@ dependencies = [ [[package]] name = "frame-support" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "bitmask", "frame-metadata", @@ -1465,7 +1465,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support-procedural-tools", "proc-macro2 1.0.18", @@ -1476,7 +1476,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1488,7 +1488,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "proc-macro2 1.0.18", "quote 1.0.7", @@ -1498,7 +1498,7 @@ dependencies = [ [[package]] name = "frame-system" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1514,7 +1514,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -1528,7 +1528,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-api", @@ -3542,7 +3542,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3558,7 +3558,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3573,7 +3573,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3598,7 +3598,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3612,7 +3612,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3628,7 +3628,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3643,7 +3643,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3658,7 +3658,7 @@ dependencies = [ [[package]] name = "pallet-finality-tracker" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3674,7 +3674,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3696,7 +3696,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "enumflags2", "frame-benchmarking", @@ -3712,7 +3712,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3732,7 +3732,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3748,7 +3748,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3762,7 +3762,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3777,7 +3777,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3791,7 +3791,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3806,7 +3806,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3827,7 +3827,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3842,7 +3842,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3855,7 +3855,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "enumflags2", "frame-support", @@ -3870,7 +3870,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3885,7 +3885,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3905,7 +3905,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3921,7 +3921,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -3957,7 +3957,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -3968,7 +3968,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -3982,7 +3982,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -4000,7 +4000,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "frame-system", @@ -4017,7 +4017,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4035,7 +4035,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-support", "parity-scale-codec", @@ -4048,7 +4048,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -4063,7 +4063,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-benchmarking", "frame-support", @@ -4079,7 +4079,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5441,14 +5441,13 @@ dependencies = [ [[package]] name = "prometheus" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20" +checksum = "dd0ced56dee39a6e960c15c74dc48849d614586db2eaada6497477af7c7811cd" dependencies = [ "cfg-if", "fnv", "lazy_static", - "protobuf", "spin", "thiserror", ] @@ -5504,12 +5503,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protobuf" -version = "2.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d883f78645c21b7281d21305181aa1f4dd9e9363e7cf2566c93121552cff003e" - [[package]] name = "quick-error" version = "1.2.3" @@ -6065,7 +6058,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "bytes 0.5.5", "derive_more 0.99.9", @@ -6092,7 +6085,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6116,7 +6109,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6133,7 +6126,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "impl-trait-for-tuples", "sc-chain-spec-derive", @@ -6149,7 +6142,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -6160,7 +6153,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "ansi_term 0.12.1", "atty", @@ -6201,7 +6194,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "fnv", @@ -6237,7 +6230,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "blake2-rfc", "hash-db", @@ -6266,7 +6259,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "sc-client-api", "sp-blockchain", @@ -6277,7 +6270,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "fork-tree", @@ -6319,7 +6312,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -6343,7 +6336,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6356,7 +6349,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6379,7 +6372,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "log 0.4.8", "sc-client-api", @@ -6393,7 +6386,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "lazy_static", @@ -6421,7 +6414,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "log 0.4.8", @@ -6438,7 +6431,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6453,7 +6446,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "cranelift-codegen", "cranelift-wasm", @@ -6474,7 +6467,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "assert_matches", "derive_more 0.99.9", @@ -6512,7 +6505,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "finality-grandpa", @@ -6529,7 +6522,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "ansi_term 0.12.1", "futures 0.3.5", @@ -6547,7 +6540,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "hex", @@ -6563,7 +6556,7 @@ dependencies = [ [[package]] name = "sc-light" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "hash-db", "lazy_static", @@ -6582,7 +6575,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "bitflags", "bs58", @@ -6634,7 +6627,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6649,7 +6642,7 @@ dependencies = [ [[package]] name = "sc-network-test" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "env_logger", "futures 0.3.5", @@ -6676,7 +6669,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "bytes 0.5.5", "fnv", @@ -6703,7 +6696,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "libp2p", @@ -6716,7 +6709,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "log 0.4.8", "substrate-prometheus-endpoint", @@ -6725,7 +6718,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "hash-db", @@ -6757,7 +6750,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -6781,7 +6774,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "jsonrpc-core", "jsonrpc-http-server", @@ -6797,7 +6790,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "directories", @@ -6841,6 +6834,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-externalities", + "sp-inherents", "sp-io", "sp-runtime", "sp-session", @@ -6859,7 +6853,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "log 0.4.8", "parity-scale-codec", @@ -6873,7 +6867,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", @@ -6894,7 +6888,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "erased-serde", "log 0.4.8", @@ -6911,7 +6905,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -6932,7 +6926,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7387,7 +7381,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "log 0.4.8", @@ -7399,7 +7393,7 @@ dependencies = [ [[package]] name = "sp-api" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "hash-db", "parity-scale-codec", @@ -7414,7 +7408,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -7426,7 +7420,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "serde", @@ -7438,7 +7432,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "integer-sqrt", "num-traits 0.2.12", @@ -7451,7 +7445,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-api", @@ -7463,7 +7457,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7474,7 +7468,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-api", @@ -7486,7 +7480,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "log 0.4.8", @@ -7503,7 +7497,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "serde", "serde_json", @@ -7512,7 +7506,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7537,7 +7531,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-api", @@ -7551,7 +7545,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "merlin", "parity-scale-codec", @@ -7570,7 +7564,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7579,7 +7573,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -7591,7 +7585,7 @@ dependencies = [ [[package]] name = "sp-core" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "base58", "blake2-rfc", @@ -7635,7 +7629,7 @@ dependencies = [ [[package]] name = "sp-database" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "kvdb", "parking_lot 0.10.2", @@ -7644,7 +7638,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "proc-macro2 1.0.18", "quote 1.0.7", @@ -7654,7 +7648,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "environmental", "parity-scale-codec", @@ -7665,7 +7659,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "finality-grandpa", "log 0.4.8", @@ -7681,7 +7675,7 @@ dependencies = [ [[package]] name = "sp-finality-tracker" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7691,7 +7685,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "parity-scale-codec", @@ -7703,7 +7697,7 @@ dependencies = [ [[package]] name = "sp-io" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "hash-db", @@ -7724,7 +7718,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "lazy_static", "sp-core", @@ -7735,7 +7729,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "serde", @@ -7747,7 +7741,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.18", @@ -7758,7 +7752,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "sp-api", "sp-core", @@ -7768,7 +7762,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "backtrace", "log 0.4.8", @@ -7777,7 +7771,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "serde", "sp-core", @@ -7786,7 +7780,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "either", "hash256-std-hasher", @@ -7808,7 +7802,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "primitive-types", @@ -7823,7 +7817,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "Inflector", "proc-macro-crate", @@ -7835,7 +7829,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "serde", "serde_json", @@ -7844,7 +7838,7 @@ dependencies = [ [[package]] name = "sp-session" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-api", @@ -7857,7 +7851,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7867,7 +7861,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "hash-db", "itertools 0.9.0", @@ -7888,12 +7882,12 @@ dependencies = [ [[package]] name = "sp-std" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" [[package]] name = "sp-storage" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "impl-serde 0.2.3", "ref-cast", @@ -7905,7 +7899,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7919,7 +7913,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "log 0.4.8", "rental", @@ -7929,7 +7923,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "derive_more 0.99.9", "futures 0.3.5", @@ -7944,7 +7938,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "hash-db", "memory-db", @@ -7958,7 +7952,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "futures-core", @@ -7970,7 +7964,7 @@ dependencies = [ [[package]] name = "sp-version" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -7982,7 +7976,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8113,7 +8107,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "chrono", "console_error_panic_hook", @@ -8139,7 +8133,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "platforms", ] @@ -8147,7 +8141,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.5", @@ -8170,7 +8164,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.8.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "async-std", "derive_more 0.99.9", @@ -8184,7 +8178,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.1.29", "futures 0.3.5", @@ -8210,7 +8204,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "cfg-if", "frame-executive", @@ -8250,7 +8244,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0-rc5" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" dependencies = [ "futures 0.3.5", "parity-scale-codec", @@ -8271,7 +8265,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder-runner" version = "1.0.6" -source = "git+https://github.com/paritytech/substrate#8180062d6c1c542015988527fecf320974b21051" +source = "git+https://github.com/paritytech/substrate#b066029a23fdc0e6b7224a3c241c16f5122dd31b" [[package]] name = "substrate-wasm-builder-runner" diff --git a/polkadot/node/network/bitfield-distribution/Cargo.toml b/polkadot/node/network/bitfield-distribution/Cargo.toml index a6dab03071..aebf6f9a65 100644 --- a/polkadot/node/network/bitfield-distribution/Cargo.toml +++ b/polkadot/node/network/bitfield-distribution/Cargo.toml @@ -26,4 +26,4 @@ maplit = "1.0.2" smol = "0.2.0" smol-timeout = "0.1.0" env_logger = "0.7.1" -assert_matches = "1.3.0" \ No newline at end of file +assert_matches = "1.3.0" diff --git a/polkadot/node/service/src/lib.rs b/polkadot/node/service/src/lib.rs index 49df3da528..f528b6be34 100644 --- a/polkadot/node/service/src/lib.rs +++ b/polkadot/node/service/src/lib.rs @@ -36,7 +36,7 @@ use sp_core::traits::SpawnNamed; pub use service::{ Role, PruningMode, TransactionPoolOptions, Error, RuntimeGenesis, TFullClient, TLightClient, TFullBackend, TLightBackend, TFullCallExecutor, TLightCallExecutor, - Configuration, ChainSpec, ServiceComponents, TaskManager, + Configuration, ChainSpec, TaskManager, }; pub use service::config::{DatabaseConfig, PrometheusConfig}; pub use sc_executor::NativeExecutionDispatch; @@ -157,26 +157,25 @@ type LightClient = service::TLightClientWithBackend; #[cfg(feature = "full-node")] -fn full_params(mut config: Configuration) -> Result<( - service::ServiceParams< - Block, - FullClient, +fn new_partial(config: &mut Configuration) -> Result< + service::PartialComponents< + FullClient, FullBackend, FullSelectChain, babe::BabeImportQueue>, sc_transaction_pool::FullPool>, - polkadot_rpc::RpcExtension, - FullBackend, + ( + impl Fn(polkadot_rpc::DenyUnsafe) -> polkadot_rpc::RpcExtension, + ( + babe::BabeBlockImport< + Block, FullClient, FullGrandpaBlockImport + >, + grandpa::LinkHalf, FullSelectChain>, + babe::BabeLink + ), + grandpa::SharedVoterState, + ) >, - FullSelectChain, - ( - babe::BabeBlockImport< - Block, FullClient, FullGrandpaBlockImport - >, - grandpa::LinkHalf, FullSelectChain>, - babe::BabeLink - ), - inherents::InherentDataProviders, - grandpa::SharedVoterState, -), Error> + Error +> where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: @@ -184,23 +183,18 @@ fn full_params(mut config: Configuration) -> Re Executor: NativeExecutionDispatch + 'static, Extrinsic: RuntimeExtrinsic, { - set_prometheus_registry(&mut config)?; + set_prometheus_registry(config)?; let inherent_data_providers = inherents::InherentDataProviders::new(); - let (client, backend, keystore, task_manager) = service::new_full_parts::(&config)?; let client = Arc::new(client); let select_chain = sc_consensus::LongestChain::new(backend.clone()); - let pool_api = sc_transaction_pool::FullChainApi::new( - client.clone(), config.prometheus_registry(), - ); let transaction_pool = sc_transaction_pool::BasicPool::new_full( config.transaction_pool.clone(), - std::sync::Arc::new(pool_api), config.prometheus_registry(), task_manager.spawn_handle(), client.clone(), @@ -255,7 +249,7 @@ fn full_params(mut config: Configuration) -> Re let transaction_pool = transaction_pool.clone(); let select_chain = select_chain.clone(); - Box::new(move |deny_unsafe| -> polkadot_rpc::RpcExtension { + move |deny_unsafe| -> polkadot_rpc::RpcExtension { let deps = polkadot_rpc::FullDeps { client: client.clone(), pool: transaction_pool.clone(), @@ -273,23 +267,14 @@ fn full_params(mut config: Configuration) -> Re }; polkadot_rpc::create_full(deps) - }) + } }; - let provider = client.clone() as Arc>; - let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(backend.clone(), provider)) as _; - - let params = service::ServiceParams { - config, backend, client, import_queue, keystore, task_manager, rpc_extensions_builder, - transaction_pool, - block_announce_validator_builder: None, - finality_proof_provider: Some(finality_proof_provider), - finality_proof_request_builder: None, - on_demand: None, - remote_blockchain: None, - }; - - Ok((params, select_chain, import_setup, inherent_data_providers, rpc_setup)) + Ok(service::PartialComponents { + client, backend, task_manager, keystore, select_chain, import_queue, transaction_pool, + inherent_data_providers, + other: (rpc_extensions_builder, import_setup, rpc_setup) + }) } fn real_overseer( @@ -319,7 +304,7 @@ fn real_overseer( #[cfg(feature = "full-node")] fn new_full( - config: Configuration, + mut config: Configuration, collating_for: Option<(CollatorId, ParaId)>, _max_block_data_size: Option, _authority_discovery_disabled: bool, @@ -346,17 +331,52 @@ fn new_full( let disable_grandpa = config.disable_grandpa; let name = config.network.node_name.clone(); - let (params, select_chain, import_setup, inherent_data_providers, rpc_setup) - = full_params::(config)?; + let service::PartialComponents { + client, backend, mut task_manager, keystore, select_chain, import_queue, transaction_pool, + inherent_data_providers, + other: (rpc_extensions_builder, import_setup, rpc_setup) + } = new_partial::(&mut config)?; + + let prometheus_registry = config.prometheus_registry().cloned(); - let client = params.client.clone(); - let keystore = params.keystore.clone(); - let transaction_pool = params.transaction_pool.clone(); - let prometheus_registry = params.config.prometheus_registry().cloned(); + let finality_proof_provider = + GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); - let ServiceComponents { - network, task_manager, telemetry_on_connect_sinks, .. - } = service::build(params)?; + let (network, network_status_sinks, system_rpc_tx) = + service::build_network(service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: None, + block_announce_validator_builder: None, + finality_proof_request_builder: None, + finality_proof_provider: Some(finality_proof_provider.clone()), + })?; + + if config.offchain_worker.enabled { + service::build_offchain_workers( + &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), + ); + } + + let telemetry_connection_sinks = service::TelemetryConnectionSinks::default(); + + service::spawn_tasks(service::SpawnTasksParams { + config, + backend: backend.clone(), + client: client.clone(), + keystore: keystore.clone(), + network: network.clone(), + rpc_extensions_builder: Box::new(rpc_extensions_builder), + transaction_pool: transaction_pool.clone(), + task_manager: &mut task_manager, + on_demand: None, + remote_blockchain: None, + telemetry_connection_sinks: telemetry_connection_sinks.clone(), + network_status_sinks, system_rpc_tx, + })?; let (block_import, link_half, babe_link) = import_setup; @@ -481,7 +501,7 @@ fn new_full( link: link_half, network: network.clone(), inherent_data_providers: inherent_data_providers.clone(), - telemetry_on_connect: Some(telemetry_on_connect_sinks.on_connect_stream()), + telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), voting_rule, prometheus_registry: prometheus_registry, shared_voter_state, @@ -516,20 +536,17 @@ fn new_light(mut config: Configuration) -> Result< crate::set_prometheus_registry(&mut config)?; use sc_client_api::backend::RemoteBackend; - let (client, backend, keystore, task_manager, on_demand) = + let (client, backend, keystore, mut task_manager, on_demand) = service::new_light_parts::(&config)?; let select_chain = sc_consensus::LongestChain::new(backend.clone()); - let pool_api = sc_transaction_pool::LightChainApi::new( - client.clone(), - on_demand.clone(), - ); let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), - Arc::new(pool_api), config.prometheus_registry(), task_manager.spawn_handle(), + client.clone(), + on_demand.clone(), )); let grandpa_block_import = grandpa::light_block_import( @@ -562,8 +579,27 @@ fn new_light(mut config: Configuration) -> Result< config.prometheus_registry(), )?; - let provider = client.clone() as Arc>; - let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(backend.clone(), provider)); + let finality_proof_provider = + GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + + let (network, network_status_sinks, system_rpc_tx) = + service::build_network(service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: Some(on_demand.clone()), + block_announce_validator_builder: None, + finality_proof_request_builder: Some(finality_proof_request_builder), + finality_proof_provider: Some(finality_proof_provider), + })?; + + if config.offchain_worker.enabled { + service::build_offchain_workers( + &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), + ); + } let light_deps = polkadot_rpc::LightDeps { remote_blockchain: backend.remote_blockchain(), @@ -574,17 +610,14 @@ fn new_light(mut config: Configuration) -> Result< let rpc_extensions = polkadot_rpc::create_light(light_deps); - let ServiceComponents { task_manager, .. } = service::build(service::ServiceParams { - config, - block_announce_validator_builder: None, - finality_proof_request_builder: Some(finality_proof_request_builder), - finality_proof_provider: Some(finality_proof_provider), + service::spawn_tasks(service::SpawnTasksParams { on_demand: Some(on_demand), remote_blockchain: Some(backend.remote_blockchain()), rpc_extensions_builder: Box::new(service::NoopRpcExtensionBuilder(rpc_extensions)), - client: client.clone(), - transaction_pool: transaction_pool.clone(), - import_queue, keystore, backend, task_manager, + task_manager: &mut task_manager, + telemetry_connection_sinks: service::TelemetryConnectionSinks::default(), + config, keystore, backend, transaction_pool, client, network, network_status_sinks, + system_rpc_tx, })?; Ok(task_manager) @@ -609,8 +642,8 @@ where Extrinsic: RuntimeExtrinsic, { config.keystore = service::config::KeystoreConfig::InMemory; - let (service::ServiceParams { client, backend, import_queue, task_manager, .. }, ..) - = full_params::(config)?; + let service::PartialComponents { client, backend, import_queue, task_manager, .. } + = new_partial::(&mut config)?; Ok((client, backend, import_queue, task_manager)) } diff --git a/polkadot/rpc/src/lib.rs b/polkadot/rpc/src/lib.rs index c73b478329..dbff9b0776 100644 --- a/polkadot/rpc/src/lib.rs +++ b/polkadot/rpc/src/lib.rs @@ -28,8 +28,8 @@ use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; use sc_client_api::light::{Fetcher, RemoteBlockchain}; use sc_consensus_babe::Epoch; -use sc_rpc::DenyUnsafe; use sp_block_builder::BlockBuilder; +pub use sc_rpc::DenyUnsafe; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpc_core::IoHandler; diff --git a/polkadot/service/src/lib.rs b/polkadot/service/src/lib.rs index 55cda65242..75399824a5 100644 --- a/polkadot/service/src/lib.rs +++ b/polkadot/service/src/lib.rs @@ -33,7 +33,7 @@ use sp_trie::PrefixedMemoryDB; pub use service::{ Role, PruningMode, TransactionPoolOptions, Error, RuntimeGenesis, RpcHandlers, TFullClient, TLightClient, TFullBackend, TLightBackend, TFullCallExecutor, TLightCallExecutor, - Configuration, ChainSpec, ServiceComponents, TaskManager, + Configuration, ChainSpec, TaskManager, }; pub use service::config::{DatabaseConfig, PrometheusConfig}; pub use sc_executor::NativeExecutionDispatch; @@ -148,26 +148,25 @@ type LightClient = service::TLightClientWithBackend; #[cfg(feature = "full-node")] -pub fn full_params(mut config: Configuration, test: bool) -> Result<( - service::ServiceParams< - Block, - FullClient, +pub fn new_partial(config: &mut Configuration, test: bool) -> Result< + service::PartialComponents< + FullClient, FullBackend, FullSelectChain, babe::BabeImportQueue>, sc_transaction_pool::FullPool>, - polkadot_rpc::RpcExtension, - FullBackend, + ( + impl Fn(polkadot_rpc::DenyUnsafe) -> polkadot_rpc::RpcExtension, + ( + babe::BabeBlockImport< + Block, FullClient, FullGrandpaBlockImport + >, + grandpa::LinkHalf, FullSelectChain>, + babe::BabeLink + ), + grandpa::SharedVoterState, + ) >, - FullSelectChain, - ( - babe::BabeBlockImport< - Block, FullClient, FullGrandpaBlockImport - >, - grandpa::LinkHalf, FullSelectChain>, - babe::BabeLink - ), - inherents::InherentDataProviders, - grandpa::SharedVoterState, -), Error> + Error +> where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, RuntimeApi::RuntimeApi: @@ -184,19 +183,14 @@ pub fn full_params(mut config: Configuration, t let inherent_data_providers = inherents::InherentDataProviders::new(); - let (client, backend, keystore, task_manager) = service::new_full_parts::(&config)?; let client = Arc::new(client); let select_chain = sc_consensus::LongestChain::new(backend.clone()); - let pool_api = sc_transaction_pool::FullChainApi::new( - client.clone(), config.prometheus_registry(), - ); let transaction_pool = sc_transaction_pool::BasicPool::new_full( config.transaction_pool.clone(), - std::sync::Arc::new(pool_api), config.prometheus_registry(), task_manager.spawn_handle(), client.clone(), @@ -251,7 +245,7 @@ pub fn full_params(mut config: Configuration, t let transaction_pool = transaction_pool.clone(); let select_chain = select_chain.clone(); - Box::new(move |deny_unsafe| -> polkadot_rpc::RpcExtension { + move |deny_unsafe| -> polkadot_rpc::RpcExtension { let deps = polkadot_rpc::FullDeps { client: client.clone(), pool: transaction_pool.clone(), @@ -269,28 +263,19 @@ pub fn full_params(mut config: Configuration, t }; polkadot_rpc::create_full(deps) - }) + } }; - let provider = client.clone() as Arc>; - let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(backend.clone(), provider)) as _; - - let params = service::ServiceParams { - config, backend, client, import_queue, keystore, task_manager, rpc_extensions_builder, - transaction_pool, - block_announce_validator_builder: None, - finality_proof_provider: Some(finality_proof_provider), - finality_proof_request_builder: None, - on_demand: None, - remote_blockchain: None, - }; - - Ok((params, select_chain, import_setup, inherent_data_providers, rpc_setup)) + Ok(service::PartialComponents { + client, backend, task_manager, keystore, select_chain, import_queue, transaction_pool, + inherent_data_providers, + other: (rpc_extensions_builder, import_setup, rpc_setup) + }) } #[cfg(feature = "full-node")] pub fn new_full( - config: Configuration, + mut config: Configuration, collating_for: Option<(CollatorId, parachain::Id)>, max_block_data_size: Option, authority_discovery_disabled: bool, @@ -327,18 +312,52 @@ pub fn new_full( let disable_grandpa = config.disable_grandpa; let name = config.network.node_name.clone(); - let (params, select_chain, import_setup, inherent_data_providers, rpc_setup) - = full_params::(config, test)?; + let service::PartialComponents { + client, backend, mut task_manager, keystore, select_chain, import_queue, transaction_pool, + inherent_data_providers, + other: (rpc_extensions_builder, import_setup, rpc_setup) + } = new_partial::(&mut config, test)?; - let client = params.client.clone(); - let keystore = params.keystore.clone(); - let transaction_pool = params.transaction_pool.clone(); - let prometheus_registry = params.config.prometheus_registry().cloned(); + let prometheus_registry = config.prometheus_registry().cloned(); - let ServiceComponents { - network, - task_manager, telemetry_on_connect_sinks, rpc_handlers, .. - } = service::build(params)?; + let finality_proof_provider = + GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + + let (network, network_status_sinks, system_rpc_tx) = + service::build_network(service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: None, + block_announce_validator_builder: None, + finality_proof_request_builder: None, + finality_proof_provider: Some(finality_proof_provider.clone()), + })?; + + if config.offchain_worker.enabled { + service::build_offchain_workers( + &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), + ); + } + + let telemetry_connection_sinks = service::TelemetryConnectionSinks::default(); + + let rpc_handlers = service::spawn_tasks(service::SpawnTasksParams { + config, + backend: backend.clone(), + client: client.clone(), + keystore: keystore.clone(), + network: network.clone(), + rpc_extensions_builder: Box::new(rpc_extensions_builder), + transaction_pool: transaction_pool.clone(), + task_manager: &mut task_manager, + on_demand: None, + remote_blockchain: None, + telemetry_connection_sinks: telemetry_connection_sinks.clone(), + network_status_sinks, system_rpc_tx, + })?; let (block_import, link_half, babe_link) = import_setup; @@ -547,7 +566,7 @@ pub fn new_full( link: link_half, network: network.clone(), inherent_data_providers: inherent_data_providers.clone(), - telemetry_on_connect: Some(telemetry_on_connect_sinks.on_connect_stream()), + telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), voting_rule, prometheus_registry: prometheus_registry.clone(), shared_voter_state, @@ -585,20 +604,17 @@ fn new_light(mut config: Configuration) -> Result< *registry = Registry::new_custom(Some("polkadot".into()), None)?; } - let (client, backend, keystore, task_manager, on_demand) = + let (client, backend, keystore, mut task_manager, on_demand) = service::new_light_parts::(&config)?; let select_chain = sc_consensus::LongestChain::new(backend.clone()); - let pool_api = sc_transaction_pool::LightChainApi::new( - client.clone(), - on_demand.clone(), - ); let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), - Arc::new(pool_api), config.prometheus_registry(), task_manager.spawn_handle(), + client.clone(), + on_demand.clone(), )); let grandpa_block_import = grandpa::light_block_import( @@ -631,8 +647,27 @@ fn new_light(mut config: Configuration) -> Result< config.prometheus_registry(), )?; - let provider = client.clone() as Arc>; - let finality_proof_provider = Arc::new(GrandpaFinalityProofProvider::new(backend.clone(), provider)); + let finality_proof_provider = + GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + + let (network, network_status_sinks, system_rpc_tx) = + service::build_network(service::BuildNetworkParams { + config: &config, + client: client.clone(), + transaction_pool: transaction_pool.clone(), + spawn_handle: task_manager.spawn_handle(), + import_queue, + on_demand: Some(on_demand.clone()), + block_announce_validator_builder: None, + finality_proof_request_builder: Some(finality_proof_request_builder), + finality_proof_provider: Some(finality_proof_provider), + })?; + + if config.offchain_worker.enabled { + service::build_offchain_workers( + &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(), + ); + } let light_deps = polkadot_rpc::LightDeps { remote_blockchain: backend.remote_blockchain(), @@ -643,17 +678,14 @@ fn new_light(mut config: Configuration) -> Result< let rpc_extensions = polkadot_rpc::create_light(light_deps); - let ServiceComponents { task_manager, rpc_handlers, .. } = service::build(service::ServiceParams { - config, - block_announce_validator_builder: None, - finality_proof_request_builder: Some(finality_proof_request_builder), - finality_proof_provider: Some(finality_proof_provider), + let rpc_handlers = service::spawn_tasks(service::SpawnTasksParams { on_demand: Some(on_demand), remote_blockchain: Some(backend.remote_blockchain()), rpc_extensions_builder: Box::new(service::NoopRpcExtensionBuilder(rpc_extensions)), - client: client.clone(), - transaction_pool: transaction_pool.clone(), - import_queue, keystore, backend, task_manager, + task_manager: &mut task_manager, + telemetry_connection_sinks: service::TelemetryConnectionSinks::default(), + config, keystore, backend, transaction_pool, client, network, network_status_sinks, + system_rpc_tx, })?; Ok((task_manager, rpc_handlers)) @@ -678,8 +710,8 @@ where Extrinsic: RuntimeExtrinsic, { config.keystore = service::config::KeystoreConfig::InMemory; - let (service::ServiceParams { client, backend, import_queue, task_manager, .. }, ..) - = full_params::(config, false)?; + let service::PartialComponents { client, backend, import_queue, task_manager, .. } + = new_partial::(&mut config, false)?; Ok((client, backend, import_queue, task_manager)) }