diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index 58f9561276..7d20095264 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "Inflector" version = "0.11.4" @@ -1594,7 +1596,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", ] @@ -1612,7 +1614,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -1630,7 +1632,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "Inflector", "chrono", @@ -1653,7 +1655,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -1669,7 +1671,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "serde", @@ -1680,7 +1682,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "bitflags", "frame-metadata", @@ -1706,7 +1708,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1718,7 +1720,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -1730,7 +1732,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro2", "quote", @@ -1740,7 +1742,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1756,7 +1758,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -1770,7 +1772,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-api", @@ -2783,6 +2785,7 @@ dependencies = [ "pallet-bounties", "pallet-collective", "pallet-democracy", + "pallet-election-provider-multi-phase", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", @@ -3459,9 +3462,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aae342b73d57ad0b8b364bd12584819f2c1fe9114285dfcf8b0722607671635" +checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba" dependencies = [ "hashbrown", ] @@ -4005,7 +4008,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4021,7 +4024,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4036,7 +4039,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4060,7 +4063,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4074,7 +4077,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4089,7 +4092,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4105,7 +4108,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4117,10 +4120,28 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-election-provider-multi-phase" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "serde", + "sp-arithmetic", + "sp-election-providers", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-std", + "static_assertions", +] + [[package]] name = "pallet-elections-phragmen" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4135,7 +4156,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4156,7 +4177,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4172,7 +4193,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4191,7 +4212,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4208,7 +4229,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4222,7 +4243,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4238,7 +4259,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4252,7 +4273,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4267,7 +4288,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4280,6 +4301,7 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", + "sp-election-providers", "sp-runtime", "sp-staking", "sp-std", @@ -4288,7 +4310,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4304,7 +4326,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4317,7 +4339,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "enumflags2", "frame-support", @@ -4332,7 +4354,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4347,7 +4369,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4367,7 +4389,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4383,7 +4405,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4397,7 +4419,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4408,6 +4430,7 @@ dependencies = [ "rand_chacha 0.2.2", "serde", "sp-application-crypto", + "sp-election-providers", "sp-io", "sp-npos-elections", "sp-runtime", @@ -4419,7 +4442,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4430,7 +4453,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4444,7 +4467,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4462,7 +4485,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4477,7 +4500,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-support", "frame-system", @@ -4493,7 +4516,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4510,7 +4533,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4521,7 +4544,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4537,7 +4560,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4553,7 +4576,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5696,6 +5719,7 @@ dependencies = [ "pallet-bounties", "pallet-collective", "pallet-democracy", + "pallet-election-provider-multi-phase", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", @@ -5784,6 +5808,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-election-providers", "sp-inherents", "sp-io", "sp-keyring", @@ -6034,6 +6059,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-babe", "sp-core", + "sp-election-providers", "sp-inherents", "sp-io", "sp-keyring", @@ -6924,7 +6950,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "async-trait", "derive_more", @@ -6952,7 +6978,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -6975,7 +7001,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6992,7 +7018,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7013,7 +7039,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7024,7 +7050,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "chrono", "fdlimit", @@ -7062,7 +7088,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "fnv", @@ -7096,7 +7122,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "blake2-rfc", "hash-db", @@ -7126,7 +7152,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "sc-client-api", "sp-blockchain", @@ -7137,7 +7163,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "fork-tree", @@ -7183,7 +7209,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "futures 0.3.12", @@ -7207,7 +7233,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7220,7 +7246,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7246,7 +7272,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "sc-client-api", @@ -7260,7 +7286,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "lazy_static", @@ -7289,7 +7315,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "parity-scale-codec", @@ -7305,7 +7331,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "parity-scale-codec", @@ -7320,7 +7346,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "parity-scale-codec", @@ -7338,7 +7364,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "dyn-clone", @@ -7377,7 +7403,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "finality-grandpa", @@ -7401,7 +7427,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "futures 0.3.12", @@ -7421,7 +7447,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "ansi_term 0.12.1", "futures 0.3.12", @@ -7439,7 +7465,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "async-trait", "derive_more", @@ -7459,7 +7485,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "hash-db", "lazy_static", @@ -7478,7 +7504,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "async-std", "async-trait", @@ -7531,7 +7557,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7547,7 +7573,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "bytes 0.5.6", "fnv", @@ -7574,7 +7600,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "libp2p", @@ -7587,7 +7613,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7596,7 +7622,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "hash-db", @@ -7630,7 +7656,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "futures 0.3.12", @@ -7654,7 +7680,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -7672,7 +7698,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "directories", "exit-future", @@ -7735,7 +7761,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "parity-scale-codec", @@ -7750,7 +7776,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -7770,7 +7796,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "chrono", "futures 0.3.12", @@ -7792,7 +7818,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "ansi_term 0.12.1", "atty", @@ -7820,7 +7846,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7831,7 +7857,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "futures 0.3.12", @@ -7853,7 +7879,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-diagnose", @@ -8259,7 +8285,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "sp-core", @@ -8271,7 +8297,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "hash-db", "parity-scale-codec", @@ -8287,7 +8313,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -8299,7 +8325,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "serde", @@ -8311,7 +8337,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "integer-sqrt", "num-traits", @@ -8324,7 +8350,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-api", @@ -8336,7 +8362,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -8347,7 +8373,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-api", @@ -8359,7 +8385,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "log", @@ -8377,7 +8403,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "serde", "serde_json", @@ -8386,7 +8412,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -8412,7 +8438,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "merlin", "parity-scale-codec", @@ -8432,7 +8458,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -8442,7 +8468,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -8454,7 +8480,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "base58", "blake2-rfc", @@ -8498,7 +8524,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -8507,17 +8533,28 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "sp-election-providers" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" +dependencies = [ + "parity-scale-codec", + "sp-arithmetic", + "sp-npos-elections", + "sp-std", +] + [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "environmental", "parity-scale-codec", @@ -8528,7 +8565,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "finality-grandpa", "log", @@ -8545,7 +8582,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", @@ -8557,7 +8594,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "hash-db", @@ -8581,7 +8618,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "lazy_static", "sp-core", @@ -8592,7 +8629,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "async-trait", "derive_more", @@ -8609,7 +8646,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "serde", @@ -8622,7 +8659,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8633,7 +8670,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "sp-api", "sp-core", @@ -8643,7 +8680,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "backtrace", ] @@ -8651,7 +8688,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "serde", "sp-core", @@ -8660,7 +8697,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "either", "hash256-std-hasher", @@ -8681,7 +8718,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8698,7 +8735,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "Inflector", "proc-macro-crate", @@ -8710,7 +8747,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "serde", "serde_json", @@ -8719,7 +8756,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-api", @@ -8732,7 +8769,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8742,7 +8779,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "hash-db", "log", @@ -8764,12 +8801,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8782,7 +8819,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "sp-core", @@ -8795,7 +8832,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8809,7 +8846,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "log", "parity-scale-codec", @@ -8822,7 +8859,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "derive_more", "futures 0.3.12", @@ -8838,7 +8875,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "hash-db", "memory-db", @@ -8852,7 +8889,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "futures-core", @@ -8864,7 +8901,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8876,7 +8913,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9008,7 +9045,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "chrono", "console_error_panic_hook", @@ -9035,7 +9072,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "platforms", ] @@ -9043,7 +9080,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.12", @@ -9066,7 +9103,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "async-std", "derive_more", @@ -9080,7 +9117,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.1.29", "futures 0.3.12", @@ -9107,7 +9144,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "futures 0.3.12", "substrate-test-utils-derive", @@ -9117,7 +9154,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#528c14b3c96bb93d3029451f0706a079d7d7a9bb" +source = "git+https://github.com/paritytech/substrate?branch=master#1c434cd3a20c03461cb17b1e94244e134fc1b27c" dependencies = [ "proc-macro-crate", "quote", @@ -10419,6 +10456,7 @@ dependencies = [ "pallet-balances", "pallet-collective", "pallet-democracy", + "pallet-election-provider-multi-phase", "pallet-elections-phragmen", "pallet-grandpa", "pallet-identity", diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index e3b2417872..e153668f01 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -47,6 +47,7 @@ keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substra sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "master" } +sp-election-providers = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/runtime/common/src/paras_registrar.rs b/polkadot/runtime/common/src/paras_registrar.rs index 5c26ef57db..d60cf22166 100644 --- a/polkadot/runtime/common/src/paras_registrar.rs +++ b/polkadot/runtime/common/src/paras_registrar.rs @@ -399,6 +399,13 @@ mod tests { pub const StakingUnsignedPriority: u64 = u64::max_value() / 2; } + impl sp_election_providers::onchain::Config for Test { + type AccountId = ::AccountId; + type BlockNumber = ::BlockNumber; + type Accuracy = sp_runtime::Perbill; + type DataProvider = pallet_staking::Module; + } + impl pallet_staking::Config for Test { type RewardRemainder = (); type CurrencyToVote = frame_support::traits::SaturatingCurrencyToVote; @@ -421,6 +428,7 @@ mod tests { type MaxIterations = (); type MinSolutionScoreBump = (); type OffchainSolutionWeightLimit = (); + type ElectionProvider = sp_election_providers::onchain::OnChainSequentialPhragmen; type WeightInfo = (); } diff --git a/polkadot/runtime/kusama/Cargo.toml b/polkadot/runtime/kusama/Cargo.toml index dcfb9471a6..f4660b6b3a 100644 --- a/polkadot/runtime/kusama/Cargo.toml +++ b/polkadot/runtime/kusama/Cargo.toml @@ -39,7 +39,8 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +pallet-elections-phragmen = { 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 } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -114,6 +115,7 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-collective/std", "pallet-elections-phragmen/std", + "pallet-election-provider-multi-phase/std", "pallet-democracy/std", "frame-executive/std", "pallet-grandpa/std", diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 10c4152c40..b0ecbf1a13 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -299,6 +299,41 @@ impl pallet_session::historical::Config for Runtime { type FullIdentificationOf = pallet_staking::ExposureOf; } +parameter_types! { + // no signed phase for now, just unsigned. + pub const SignedPhase: u32 = 0; + // NOTE: length of unsigned phase is, for now, different than `ElectionLookahead` to make sure + // that we won't run OCW threads at the same time with staking. + pub const UnsignedPhase: u32 = ElectionLookahead::get() / 2; + + // fallback: no need to do on-chain phragmen while we re on a dry-run. + pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = + pallet_election_provider_multi_phase::FallbackStrategy::Nothing; + + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational_approximation(1u32, 10_000); + + // miner configs + pub MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; + pub const MinerMaxIterations: u32 = 10; +} + +impl pallet_election_provider_multi_phase::Config for Runtime { + type Event = Event; + type Currency = Balances; + type SignedPhase = SignedPhase; + type UnsignedPhase = UnsignedPhase; + type SolutionImprovementThreshold = MinSolutionScoreBump; + type MinerMaxIterations = MinerMaxIterations; + type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking. + type MinerTxPriority = MultiPhaseUnsignedPriority; + type DataProvider = Staking; + type OnChainAccuracy = Perbill; + type CompactSolution = pallet_staking::CompactAssignments; + type Fallback = Fallback; + type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight; + type BenchmarkingConfig = (); +} + // TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and // re-built in case input parameters have changed. The `ideal_stake` should be determined by the // amount of parachain slots being bid on: this should be around `(75 - 25.min(slots / 4))%`. @@ -361,6 +396,7 @@ impl pallet_staking::Config for Runtime { // The unsigned solution weight targeted by the OCW. We set it to the maximum possible value of // a single extrinsic. type OffchainSolutionWeightLimit = OffchainSolutionWeightLimit; + type ElectionProvider = ElectionProviderMultiPhase; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -994,6 +1030,9 @@ construct_runtime! { // Tips module. Tips: pallet_tips::{Module, Call, Storage, Event} = 36, + + // Election pallet. Only works with staking, but placed here to maintain indices. + ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Module, Call, Storage, Event, ValidateUnsigned} = 37, } } diff --git a/polkadot/runtime/polkadot/Cargo.toml b/polkadot/runtime/polkadot/Cargo.toml index 02840176e7..ad4049acd4 100644 --- a/polkadot/runtime/polkadot/Cargo.toml +++ b/polkadot/runtime/polkadot/Cargo.toml @@ -40,6 +40,7 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-elections-phragmen = { 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 } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -112,6 +113,7 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-collective/std", "pallet-elections-phragmen/std", + "pallet-election-provider-multi-phase/std", "pallet-democracy/std", "frame-executive/std", "pallet-grandpa/std", diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 072dcd43e3..5c66a23dc6 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -124,7 +124,7 @@ impl Filter for BaseFilter { Call::AuthorityDiscovery(_) | Call::Utility(_) | Call::Claims(_) | Call::Vesting(_) | Call::Identity(_) | Call::Proxy(_) | Call::Multisig(_) | - Call::Bounties(_) | Call::Tips(_) + Call::Bounties(_) | Call::Tips(_) | Call::ElectionProviderMultiPhase(_) => true, } } @@ -308,6 +308,41 @@ impl pallet_session::historical::Config for Runtime { type FullIdentificationOf = pallet_staking::ExposureOf; } +parameter_types! { + // no signed phase for now, just unsigned. + pub const SignedPhase: u32 = 0; + // NOTE: length of unsigned phase is, for now, different than `ElectionLookahead` to make sure + // that we won't run OCW threads at the same time with staking. + pub const UnsignedPhase: u32 = ElectionLookahead::get() / 2; + + // fallback: no need to do on-chain phragmen while we re on a dry-run. + pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = + pallet_election_provider_multi_phase::FallbackStrategy::Nothing; + + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational_approximation(1u32, 10_000); + + // miner configs + pub MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; + pub const MinerMaxIterations: u32 = 10; +} + +impl pallet_election_provider_multi_phase::Config for Runtime { + type Event = Event; + type Currency = Balances; + type SignedPhase = SignedPhase; + type UnsignedPhase = UnsignedPhase; + type SolutionImprovementThreshold = MinSolutionScoreBump; + type MinerMaxIterations = MinerMaxIterations; + type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking. + type MinerTxPriority = MultiPhaseUnsignedPriority; + type DataProvider = Staking; + type OnChainAccuracy = Perbill; + type CompactSolution = pallet_staking::CompactAssignments; + type Fallback = Fallback; + type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight; + type BenchmarkingConfig = (); +} + // TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and // re-built in case input parameters have changed. The `ideal_stake` should be determined by the // amount of parachain slots being bid on: this should be around `(75 - 25.min(slots / 4))%`. @@ -369,6 +404,7 @@ impl pallet_staking::Config for Runtime { // The unsigned solution weight targeted by the OCW. We set it to the maximum possible value of // a single extrinsic. type OffchainSolutionWeightLimit = OffchainSolutionWeightLimit; + type ElectionProvider = ElectionProviderMultiPhase; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -989,6 +1025,9 @@ construct_runtime! { // Tips module. Tips: pallet_tips::{Module, Call, Storage, Event} = 35, + // Election pallet. Only works with staking, but placed here to maintain indices. + ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Module, Call, Storage, Event, ValidateUnsigned} = 36, + } } diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index ceb9a1f885..a84845bbc4 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -26,6 +26,7 @@ sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-election-providers = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -114,4 +115,5 @@ std = [ "sp-session/std", "pallet-randomness-collective-flip/std", "runtime-common/std", + "sp-election-providers/std", ] diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index eb1f48ed53..c4a16bbc65 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -310,6 +310,13 @@ parameter_types! { pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); } +impl sp_election_providers::onchain::Config for Runtime { + type AccountId = ::AccountId; + type BlockNumber = ::BlockNumber; + type Accuracy = sp_runtime::Perbill; + type DataProvider = pallet_staking::Module; +} + impl pallet_staking::Config for Runtime { type Currency = Balances; type UnixTime = Timestamp; @@ -333,6 +340,7 @@ impl pallet_staking::Config for Runtime { type MaxIterations = MaxIterations; type OffchainSolutionWeightLimit = (); type MinSolutionScoreBump = MinSolutionScoreBump; + type ElectionProvider = sp_election_providers::onchain::OnChainSequentialPhragmen; type WeightInfo = (); } diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index 95ae996374..992b235c5e 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -17,9 +17,9 @@ static_assertions = "1.1.0" authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -39,6 +39,7 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-elections-phragmen = { package = "pallet-elections-phragmen", 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 } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } @@ -113,6 +114,7 @@ std = [ "pallet-transaction-payment-rpc-runtime-api/std", "pallet-collective/std", "pallet-elections-phragmen/std", + "pallet-election-provider-multi-phase/std", "pallet-democracy/std", "frame-executive/std", "pallet-grandpa/std", diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index ac6666bf9c..a6aaeff38a 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -290,6 +290,41 @@ impl pallet_session::historical::Config for Runtime { type FullIdentificationOf = pallet_staking::ExposureOf; } +parameter_types! { + // no signed phase for now, just unsigned. + pub const SignedPhase: u32 = 0; + // NOTE: length of unsigned phase is, for now, different than `ElectionLookahead` to make sure + // that we won't run OCW threads at the same time with staking. + pub const UnsignedPhase: u32 = ElectionLookahead::get() / 2; + + // fallback: no need to do on-chain phragmen while we re on a dry-run. + pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy = + pallet_election_provider_multi_phase::FallbackStrategy::Nothing; + + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational_approximation(1u32, 10_000); + + // miner configs + pub const MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; + pub const MinerMaxIterations: u32 = 10; +} + +impl pallet_election_provider_multi_phase::Config for Runtime { + type Event = Event; + type Currency = Balances; + type SignedPhase = SignedPhase; + type UnsignedPhase = UnsignedPhase; + type SolutionImprovementThreshold = MinSolutionScoreBump; + type MinerMaxIterations = MinerMaxIterations; + type MinerMaxWeight = OffchainSolutionWeightLimit; // For now use the one from staking. + type MinerTxPriority = MultiPhaseUnsignedPriority; + type DataProvider = Staking; + type OnChainAccuracy = Perbill; + type CompactSolution = pallet_staking::CompactAssignments; + type Fallback = Fallback; + type WeightInfo = pallet_election_provider_multi_phase::weights::SubstrateWeight; + type BenchmarkingConfig = (); +} + pallet_staking_reward_curve::build! { const REWARD_CURVE: PiecewiseLinear<'static> = curve!( min_inflation: 0_025_000, @@ -339,6 +374,7 @@ impl pallet_staking::Config for Runtime { type MaxIterations = MaxIterations; type MinSolutionScoreBump = MinSolutionScoreBump; type OffchainSolutionWeightLimit = OffchainSolutionWeightLimit; + type ElectionProvider = ElectionProviderMultiPhase; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -701,6 +737,9 @@ construct_runtime! { // Multisig module. Late addition. Multisig: pallet_multisig::{Module, Call, Storage, Event} = 23, + + // Election pallet. Only works with staking, but placed here to maintain indices. + ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Module, Call, Storage, Event, ValidateUnsigned} = 24, } }