From d5fb3276b944515cb1a81fabdb3d1831fbada7c5 Mon Sep 17 00:00:00 2001 From: Peter Goodspeed-Niklaus Date: Mon, 28 Jun 2021 14:36:20 +0200 Subject: [PATCH] Companion for Decouple Staking and Election - Part 3: Signed Phase (#2793) * Companion for Decouple Staking and Election - Part 3: Signed Phase https://github.com/paritytech/substrate/pull/7910 * remove some config types * allow up to 5 signed submissions on polkadot and kusama * signed phase is equal induration to unsigned phase * use chain defaults for base and per-byte deposits; >= 16 SignedMaxSubmissions * use a small but non-trivial solution reward * reduce signed deposit per byte fee * reduce signed reward, adjust polkadot expected soln size * copy submit benchmark from substrate * demo calculating an appropriate fee for the signed reward Unfortunately, this doesn't work: it needs to be a constant function, and AFAIK there's no way to make a trait method constant. * SignedRewardBase is 1.5x the fee to submit a signed solution * all chains use deposit byte of base per 50k * update Substrate * cargo update -p pallet-election-provider-multi-phase Co-authored-by: parity-processbot <> --- Cargo.lock | 311 +++++++++--------- runtime/common/Cargo.toml | 3 +- runtime/common/src/elections.rs | 61 ++++ runtime/common/src/lib.rs | 24 +- runtime/kusama/src/lib.rs | 30 +- .../pallet_election_provider_multi_phase.rs | 17 + runtime/polkadot/src/lib.rs | 28 +- .../pallet_election_provider_multi_phase.rs | 17 + runtime/westend/src/lib.rs | 28 +- .../pallet_election_provider_multi_phase.rs | 17 + 10 files changed, 349 insertions(+), 187 deletions(-) create mode 100644 runtime/common/src/elections.rs diff --git a/Cargo.lock b/Cargo.lock index c7a86e86277f..1ae77dc38d8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1912,7 +1912,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", ] @@ -1930,7 +1930,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -1949,7 +1949,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "Inflector", "chrono", @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -1985,7 +1985,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -2000,7 +2000,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "serde", @@ -2011,7 +2011,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "bitflags", "frame-metadata", @@ -2038,7 +2038,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2050,7 +2050,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2062,7 +2062,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro2", "quote", @@ -2072,7 +2072,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-metadata", "frame-support", @@ -2092,7 +2092,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -2109,7 +2109,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2123,7 +2123,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2132,7 +2132,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "parity-scale-codec", @@ -4064,7 +4064,7 @@ dependencies = [ [[package]] name = "max-encoded-len" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-trait-for-tuples", "max-encoded-len-derive", @@ -4075,7 +4075,7 @@ dependencies = [ [[package]] name = "max-encoded-len-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -4578,7 +4578,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -4593,7 +4593,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -4607,7 +4607,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4630,7 +4630,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4660,7 +4660,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4696,7 +4696,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4712,7 +4712,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4727,7 +4727,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4748,7 +4748,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4765,7 +4765,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4779,7 +4779,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4801,7 +4801,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4816,7 +4816,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4835,7 +4835,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4851,7 +4851,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4866,7 +4866,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -4883,7 +4883,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -4899,7 +4899,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4917,7 +4917,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4932,7 +4932,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -4945,7 +4945,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -4961,7 +4961,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4983,7 +4983,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4999,7 +4999,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "enumflags2", "frame-support", @@ -5013,7 +5013,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5028,7 +5028,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -5048,7 +5048,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5064,7 +5064,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -5077,7 +5077,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5101,7 +5101,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -5112,7 +5112,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "sp-arithmetic", @@ -5121,7 +5121,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -5134,7 +5134,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5152,7 +5152,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5167,7 +5167,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-support", "frame-system", @@ -5183,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5200,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5211,7 +5211,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5227,7 +5227,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5242,7 +5242,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6614,6 +6614,7 @@ dependencies = [ "pallet-babe", "pallet-balances", "pallet-beefy", + "pallet-election-provider-multi-phase", "pallet-mmr", "pallet-offences", "pallet-session", @@ -7574,7 +7575,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "env_logger 0.8.4", "hex", @@ -7868,7 +7869,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "derive_more", @@ -7897,7 +7898,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -7920,7 +7921,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7936,7 +7937,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7957,7 +7958,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7968,7 +7969,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "chrono", "fdlimit", @@ -8006,7 +8007,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "fnv", @@ -8040,7 +8041,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "blake2-rfc", "hash-db", @@ -8070,7 +8071,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "parking_lot 0.11.1", @@ -8083,7 +8084,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "derive_more", @@ -8129,7 +8130,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "futures 0.3.15", @@ -8153,7 +8154,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8166,7 +8167,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "futures 0.3.15", @@ -8194,7 +8195,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "sc-client-api", "sp-authorship", @@ -8205,7 +8206,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "lazy_static", @@ -8234,7 +8235,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "parity-scale-codec", @@ -8251,7 +8252,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "parity-scale-codec", @@ -8266,7 +8267,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8285,7 +8286,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "derive_more", @@ -8326,7 +8327,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "finality-grandpa", @@ -8350,7 +8351,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "futures 0.3.15", @@ -8371,7 +8372,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "ansi_term 0.12.1", "futures 0.3.15", @@ -8389,7 +8390,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "derive_more", @@ -8409,7 +8410,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "hash-db", "lazy_static", @@ -8428,7 +8429,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-std", "async-trait", @@ -8481,7 +8482,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -8498,7 +8499,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "bytes 0.5.6", "fnv", @@ -8526,7 +8527,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "libp2p", @@ -8539,7 +8540,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8548,7 +8549,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "hash-db", @@ -8583,7 +8584,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "futures 0.3.15", @@ -8608,7 +8609,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -8626,7 +8627,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "directories", @@ -8692,7 +8693,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "parity-scale-codec", @@ -8707,7 +8708,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8727,7 +8728,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "chrono", "futures 0.3.15", @@ -8747,7 +8748,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8784,7 +8785,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8795,7 +8796,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "futures 0.3.15", @@ -8817,7 +8818,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "intervalier", @@ -9296,7 +9297,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "sp-core", @@ -9308,7 +9309,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "hash-db", "log", @@ -9325,7 +9326,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9337,7 +9338,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "max-encoded-len", "parity-scale-codec", @@ -9350,7 +9351,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "integer-sqrt", "num-traits", @@ -9364,7 +9365,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-api", @@ -9376,7 +9377,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "parity-scale-codec", @@ -9388,7 +9389,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-api", @@ -9400,7 +9401,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "log", @@ -9418,7 +9419,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "serde", "serde_json", @@ -9427,7 +9428,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "futures 0.3.15", @@ -9454,7 +9455,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "merlin", @@ -9476,7 +9477,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9486,7 +9487,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9498,7 +9499,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "base58", "blake2-rfc", @@ -9543,7 +9544,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9552,7 +9553,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro2", "quote", @@ -9562,7 +9563,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "environmental", "parity-scale-codec", @@ -9573,7 +9574,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "finality-grandpa", "log", @@ -9590,7 +9591,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9604,7 +9605,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "hash-db", @@ -9629,7 +9630,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "lazy_static", "sp-core", @@ -9640,7 +9641,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "derive_more", @@ -9657,7 +9658,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "ruzstd", "zstd", @@ -9666,7 +9667,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "serde", @@ -9679,7 +9680,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9690,7 +9691,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "sp-api", "sp-core", @@ -9700,7 +9701,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "backtrace", ] @@ -9708,7 +9709,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "rustc-hash", "serde", @@ -9719,7 +9720,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "either", "hash256-std-hasher", @@ -9741,7 +9742,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9758,7 +9759,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9770,7 +9771,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "serde", "serde_json", @@ -9779,7 +9780,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-api", @@ -9792,7 +9793,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9802,7 +9803,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "hash-db", "log", @@ -9825,12 +9826,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9843,7 +9844,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "log", "sp-core", @@ -9856,7 +9857,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9873,7 +9874,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "erased-serde", "log", @@ -9891,7 +9892,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "derive_more", "futures 0.3.15", @@ -9907,7 +9908,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "log", @@ -9922,7 +9923,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "hash-db", "memory-db", @@ -9936,7 +9937,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "futures-core", @@ -9948,7 +9949,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9961,7 +9962,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.0.0", @@ -9973,7 +9974,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10118,7 +10119,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "chrono", "console_error_panic_hook", @@ -10144,7 +10145,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "platforms", ] @@ -10152,7 +10153,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.15", @@ -10175,7 +10176,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-std", "derive_more", @@ -10189,7 +10190,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "async-trait", "futures 0.1.29", @@ -10218,7 +10219,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "futures 0.3.15", "substrate-test-utils-derive", @@ -10228,7 +10229,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "proc-macro-crate 1.0.0", "quote", @@ -10238,7 +10239,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#01ff4cef6626448998a3bcbc5be401dc15a394cf" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "ansi_term 0.12.1", "atty", @@ -10983,7 +10984,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#df5012292cea6f5a747ff0e32d2e3c25b73001d9" +source = "git+https://github.com/paritytech/substrate?branch=master#24b26b9cc0c5d8fcb81857b7d0f3815ad27a2b1a" dependencies = [ "frame-try-runtime", "log", diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 5c01835ca726..a333eecc16e9 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -35,7 +35,7 @@ pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "ma pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } - +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-beefy = { git = "https://github.com/paritytech/grandpa-bridge-gadget", branch = "master", default-features = false } pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -91,6 +91,7 @@ std = [ "pallet-vesting/std", "pallet-transaction-payment/std", "pallet-treasury/std", + "pallet-election-provider-multi-phase/std", "slot-range-helper/std", "sp-runtime/std", "sp-session/std", diff --git a/runtime/common/src/elections.rs b/runtime/common/src/elections.rs new file mode 100644 index 000000000000..3b7086fcfd5d --- /dev/null +++ b/runtime/common/src/elections.rs @@ -0,0 +1,61 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Code for elections. + +use frame_support::{ + parameter_types, + traits::Get, + weights::{DispatchClass, Weight, WeightToFeePolynomial}, +}; +use sp_runtime::Perbill; +use super::{BlockExecutionWeight, BlockLength, BlockWeights}; + +parameter_types! { + /// A limit for off-chain phragmen unsigned solution submission. + /// + /// We want to keep it as high as possible, but can't risk having it reject, + /// so we always subtract the base block execution weight. + pub OffchainSolutionWeightLimit: Weight = BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .expect("Normal extrinsics have weight limit configured by default; qed") + .saturating_sub(BlockExecutionWeight::get()); + + /// A limit for off-chain phragmen unsigned solution length. + /// + /// We allow up to 90% of the block's size to be consumed by the solution. + pub OffchainSolutionLengthLimit: u32 = Perbill::from_rational(90_u32, 100) * + *BlockLength::get() + .max + .get(DispatchClass::Normal); +} + +/// Compute the expected fee for submitting an election solution. +/// +/// This is `multiplier` multiplied by the fee for the expected submission weight according to the +/// weight info. +/// +/// Assumes that the signed submission queue is full. +pub fn fee_for_submit_call(multiplier: Perbill) -> WeightToFee::Balance +where + T: pallet_election_provider_multi_phase::Config, + WeightToFee: WeightToFeePolynomial, + WeightInfo: pallet_election_provider_multi_phase::WeightInfo, +{ + let expected_weight = WeightInfo::submit(T::SignedMaxSubmissions::get()); + multiplier * WeightToFee::calc(&expected_weight) +} diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 406b3fc17c56..e96034c2ccda 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2020 Parity Technologies (UK) Ltd. +// Copyright 2019-2021 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify @@ -30,6 +30,7 @@ pub mod paras_registrar; pub mod slot_range; pub mod traits; pub mod xcm_sender; +pub mod elections; #[cfg(test)] mod mock; @@ -54,6 +55,7 @@ pub use pallet_staking::StakerStatus; pub use sp_runtime::BuildStorage; pub use pallet_timestamp::Call as TimestampCall; pub use pallet_balances::Call as BalancesCall; +pub use elections::{OffchainSolutionLengthLimit, OffchainSolutionWeightLimit}; /// Implementations of some helper traits passed into runtime modules as associated types. pub use impls::ToAuthor; @@ -108,26 +110,6 @@ parameter_types! { .build_or_panic(); } -parameter_types! { - /// A limit for off-chain phragmen unsigned solution submission. - /// - /// We want to keep it as high as possible, but can't risk having it reject, - /// so we always subtract the base block execution weight. - pub OffchainSolutionWeightLimit: Weight = BlockWeights::get() - .get(DispatchClass::Normal) - .max_extrinsic - .expect("Normal extrinsics have weight limit configured by default; qed") - .saturating_sub(BlockExecutionWeight::get()); - - /// A limit for off-chain phragmen unsigned solution length. - /// - /// We allow up to 90% of the block's size to be consumed by the solution. - pub OffchainSolutionLengthLimit: u32 = Perbill::from_rational(90_u32, 100) * - *BlockLength::get() - .max - .get(DispatchClass::Normal); -} - /// Parameterized slow adjusting fee updated based on /// https://w3f-research.readthedocs.io/en/latest/polkadot/Token%20Economics.html#-2.-slow-adjusting-mechanism pub type SlowAdjustingFeeUpdate = TargetedFeeAdjustment< diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b0c1a1d006c7..143f2f0c3cd0 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -34,7 +34,8 @@ use primitives::v1::{ use runtime_common::{ claims, paras_registrar, xcm_sender, slots, auctions, crowdloan, SlowAdjustingFeeUpdate, CurrencyToVote, impls::DealWithFees, - BlockHashCount, RocksDbWeight, BlockWeights, BlockLength, OffchainSolutionWeightLimit, OffchainSolutionLengthLimit, + BlockHashCount, RocksDbWeight, BlockWeights, BlockLength, + OffchainSolutionWeightLimit, OffchainSolutionLengthLimit, elections::fee_for_submit_call, ToAuthor, }; @@ -348,11 +349,24 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - // no signed phase for now, just unsigned. - pub const SignedPhase: u32 = 0; + // phase durations. 1/4 of the last session for each. + pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; - // fallback: run election on-chain. + // signed config + pub const SignedMaxSubmissions: u32 = 16; + pub const SignedDepositBase: Balance = deposit(1, 0); + // A typical solution occupies within an order of magnitude of 50kb. + // This formula is currently adjusted such that a typical solution will spend an amount equal + // to the base deposit for every 50 kb. + pub const SignedDepositByte: Balance = deposit(1, 0) / (50 * 1024); + pub SignedRewardBase: Balance = fee_for_submit_call::< + Runtime, + crate::constants::fee::WeightToFee, + crate::weights::pallet_election_provider_multi_phase::WeightInfo, + >(Perbill::from_perthousand(1500)); + + // fallback: emergency phase. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = pallet_election_provider_multi_phase::FallbackStrategy::Nothing; pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000); @@ -375,6 +389,14 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type Event = Event; type Currency = Balances; type UnsignedPhase = UnsignedPhase; + type SignedMaxSubmissions = SignedMaxSubmissions; + type SignedRewardBase = SignedRewardBase; + type SignedDepositBase = SignedDepositBase; + type SignedDepositByte = SignedDepositByte; + type SignedDepositWeight = (); + type SignedMaxWeight = Self::MinerMaxWeight; + type SlashHandler = (); // burn slashes + type RewardHandler = (); // nothing to do upon rewards type SignedPhase = SignedPhase; type SolutionImprovementThreshold = SolutionImprovementThreshold; type MinerMaxIterations = MinerMaxIterations; diff --git a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs index 675578ddaa54..21c925295215 100644 --- a/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -67,6 +67,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + fn submit(c: u32, ) -> Weight { + (84_430_000 as Weight) + // Standard Error: 146_000 + .saturating_add((2_758_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 13_000 @@ -92,4 +99,14 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add((4_469_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } + fn finalize_signed_phase_accept_solution() -> Weight { + (47_783_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn finalize_signed_phase_reject_solution() -> Weight { + (21_277_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index ebbc80a6425b..204d42a8edce 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -26,6 +26,7 @@ use runtime_common::{ impls::DealWithFees, BlockHashCount, RocksDbWeight, BlockWeights, BlockLength, OffchainSolutionWeightLimit, OffchainSolutionLengthLimit, + elections::fee_for_submit_call, ParachainSessionKeyPlaceholder, AssignmentSessionKeyPlaceholder, }; @@ -328,11 +329,24 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - // no signed phase for now, just unsigned. - pub const SignedPhase: u32 = 0; + // phase durations. 1/4 of the last session for each. + pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; - // fallback: run election on-chain. + // signed config + pub const SignedMaxSubmissions: u32 = 16; + pub const SignedDepositBase: Balance = deposit(1, 0); + // A typical solution occupies within an order of magnitude of 50kb. + // This formula is currently adjusted such that a typical solution will spend an amount equal + // to the base deposit for every 50 kb. + pub const SignedDepositByte: Balance = deposit(1, 0) / (50 * 1024); + pub SignedRewardBase: Balance = fee_for_submit_call::< + Runtime, + crate::constants::fee::WeightToFee, + crate::weights::pallet_election_provider_multi_phase::WeightInfo, + >(Perbill::from_perthousand(1500)); + + // fallback: emergency phase. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = pallet_election_provider_multi_phase::FallbackStrategy::Nothing; pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(5u32, 10_000); @@ -356,6 +370,14 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type Currency = Balances; type SignedPhase = SignedPhase; type UnsignedPhase = UnsignedPhase; + type SignedMaxSubmissions = SignedMaxSubmissions; + type SignedRewardBase = SignedRewardBase; + type SignedDepositBase = SignedDepositBase; + type SignedDepositByte = SignedDepositByte; + type SignedDepositWeight = (); + type SignedMaxWeight = Self::MinerMaxWeight; + type SlashHandler = (); // burn slashes + type RewardHandler = (); // nothing to do upon rewards type SolutionImprovementThreshold = SolutionImprovementThreshold; type MinerMaxIterations = MinerMaxIterations; type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking. diff --git a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs index 81f768036438..235250c5873e 100644 --- a/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -92,4 +92,21 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add((3_606_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } + fn finalize_signed_phase_accept_solution() -> Weight { + (47_783_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn finalize_signed_phase_reject_solution() -> Weight { + (21_277_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn submit(c: u32) -> Weight { + (78_972_000 as Weight) + // Standard Error: 16_000 + .saturating_add((308_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index b3f37a157016..a8573f34dd93 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -36,6 +36,7 @@ use runtime_common::{ impls::ToAuthor, BlockHashCount, BlockWeights, BlockLength, RocksDbWeight, OffchainSolutionWeightLimit, OffchainSolutionLengthLimit, + elections::fee_for_submit_call, }; use runtime_parachains::origin as parachains_origin; @@ -333,11 +334,24 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - // no signed phase for now, just unsigned. - pub const SignedPhase: u32 = 0; + // phase durations. 1/4 of the last session for each. + pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4; - // fallback: run election on-chain. + // signed config + pub const SignedMaxSubmissions: u32 = 128; + pub const SignedDepositBase: Balance = deposit(1, 0); + // A typical solution occupies within an order of magnitude of 50kb. + // This formula is currently adjusted such that a typical solution will spend an amount equal + // to the base deposit for every 50 kb. + pub const SignedDepositByte: Balance = deposit(1, 0) / (50 * 1024); + pub SignedRewardBase: Balance = fee_for_submit_call::< + Runtime, + crate::constants::fee::WeightToFee, + crate::weights::pallet_election_provider_multi_phase::WeightInfo, + >(Perbill::from_perthousand(1500)); + + // fallback: emergency phase. pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = pallet_election_provider_multi_phase::FallbackStrategy::Nothing; @@ -362,6 +376,14 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type Currency = Balances; type SignedPhase = SignedPhase; type UnsignedPhase = UnsignedPhase; + type SignedMaxSubmissions = SignedMaxSubmissions; + type SignedRewardBase = SignedRewardBase; + type SignedDepositBase = SignedDepositBase; + type SignedDepositByte = SignedDepositByte; + type SignedDepositWeight = (); + type SignedMaxWeight = Self::MinerMaxWeight; + type SlashHandler = (); // burn slashes + type RewardHandler = (); // nothing to do upon rewards type SolutionImprovementThreshold = SolutionImprovementThreshold; type MinerMaxIterations = MinerMaxIterations; type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking. diff --git a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs index 196c4252aa0a..7b0bb3ec7329 100644 --- a/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs @@ -92,4 +92,21 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add((3_731_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) } + fn finalize_signed_phase_accept_solution() -> Weight { + (47_783_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn finalize_signed_phase_reject_solution() -> Weight { + (21_277_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn submit(c: u32) -> Weight { + (78_972_000 as Weight) + // Standard Error: 16_000 + .saturating_add((308_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } }