From 6b0c56b8ab69ed3edf53f8a0081f986a7bce4ec8 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue, 16 Mar 2021 15:05:47 +0100 Subject: [PATCH] Companion for sub/8176 (#2622) * Merge * Fixes * Fix build * remove dep. * undo dep. * upadte substrate * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * Fix lock * revert lock; cargo update -p sp-io * from_rational_approx -> from_rational * Silence more warnings Co-authored-by: Gav Wood Co-authored-by: Shawn Tabrizi Co-authored-by: Parity Benchmarking Bot --- polkadot/Cargo.lock | 321 +++++++++--------- polkadot/runtime/common/Cargo.toml | 1 - polkadot/runtime/common/src/purchase.rs | 2 +- polkadot/runtime/kusama/src/constants.rs | 2 +- polkadot/runtime/kusama/src/lib.rs | 6 +- .../pallet_election_provider_multi_phase.rs | 3 + .../kusama/src/weights/pallet_staking.rs | 19 ++ polkadot/runtime/polkadot/src/constants.rs | 2 +- polkadot/runtime/polkadot/src/lib.rs | 6 +- .../pallet_election_provider_multi_phase.rs | 3 + .../polkadot/src/weights/pallet_staking.rs | 135 ++++---- polkadot/runtime/rococo/src/constants.rs | 2 +- polkadot/runtime/test-runtime/Cargo.toml | 4 +- .../runtime/test-runtime/src/constants.rs | 2 +- polkadot/runtime/test-runtime/src/lib.rs | 9 +- polkadot/runtime/westend/src/constants.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 6 +- .../pallet_election_provider_multi_phase.rs | 3 + .../westend/src/weights/pallet_staking.rs | 19 ++ 19 files changed, 307 insertions(+), 240 deletions(-) diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index f6aaecf1ff..702d3f7517 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -1646,7 +1646,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", ] @@ -1664,7 +1664,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -1683,7 +1683,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "Inflector", "chrono", @@ -1703,10 +1703,23 @@ dependencies = [ "structopt", ] +[[package]] +name = "frame-election-provider-support" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "sp-arithmetic", + "sp-npos-elections", + "sp-std", +] + [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -1722,7 +1735,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "serde", @@ -1733,7 +1746,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "bitflags", "frame-metadata", @@ -1759,7 +1772,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1771,7 +1784,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -1783,7 +1796,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro2", "quote", @@ -1793,7 +1806,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-metadata", "frame-support", @@ -1814,7 +1827,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1831,7 +1844,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -1845,7 +1858,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-api", @@ -1854,7 +1867,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "parity-scale-codec", @@ -4156,7 +4169,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4172,7 +4185,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4187,7 +4200,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4211,7 +4224,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4226,7 +4239,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4241,7 +4254,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4258,7 +4271,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4273,9 +4286,10 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "log", @@ -4283,7 +4297,6 @@ dependencies = [ "rand 0.7.3", "serde", "sp-arithmetic", - "sp-election-providers", "sp-io", "sp-npos-elections", "sp-runtime", @@ -4294,7 +4307,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4310,7 +4323,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4332,7 +4345,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4348,7 +4361,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4368,7 +4381,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4385,7 +4398,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4399,7 +4412,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4415,7 +4428,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4429,7 +4442,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4445,9 +4458,10 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "pallet-babe", @@ -4458,7 +4472,6 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", - "sp-election-providers", "sp-runtime", "sp-staking", "sp-std", @@ -4467,7 +4480,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4483,7 +4496,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4496,7 +4509,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "enumflags2", "frame-support", @@ -4511,7 +4524,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4527,7 +4540,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4547,7 +4560,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4563,7 +4576,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4577,9 +4590,10 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", + "frame-election-provider-support", "frame-support", "frame-system", "log", @@ -4589,7 +4603,6 @@ dependencies = [ "rand_chacha 0.2.2", "serde", "sp-application-crypto", - "sp-election-providers", "sp-io", "sp-npos-elections", "sp-runtime", @@ -4601,7 +4614,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -4612,7 +4625,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4626,7 +4639,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4645,7 +4658,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4660,7 +4673,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-support", "frame-system", @@ -4676,7 +4689,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4693,7 +4706,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4704,7 +4717,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4720,7 +4733,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-benchmarking", "frame-support", @@ -4736,7 +4749,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5985,7 +5998,6 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-election-providers", "sp-inherents", "sp-io", "sp-keyring", @@ -6198,6 +6210,7 @@ name = "polkadot-test-runtime" version = "0.8.29" dependencies = [ "bitvec", + "frame-election-provider-support", "frame-executive", "frame-support", "frame-system", @@ -6237,7 +6250,6 @@ dependencies = [ "sp-block-builder", "sp-consensus-babe", "sp-core", - "sp-election-providers", "sp-inherents", "sp-io", "sp-keyring", @@ -6904,7 +6916,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "env_logger 0.8.2", "hex-literal", @@ -7160,7 +7172,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "async-trait", "derive_more", @@ -7188,7 +7200,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7211,7 +7223,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7227,7 +7239,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7248,7 +7260,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -7259,7 +7271,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "chrono", "fdlimit", @@ -7297,7 +7309,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "fnv", @@ -7331,7 +7343,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "blake2-rfc", "hash-db", @@ -7361,7 +7373,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "sc-client-api", "sp-blockchain", @@ -7372,7 +7384,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "fork-tree", @@ -7418,7 +7430,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "futures 0.3.12", @@ -7442,7 +7454,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7455,7 +7467,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7481,7 +7493,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "sc-client-api", @@ -7495,7 +7507,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "lazy_static", @@ -7524,7 +7536,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "parity-scale-codec", @@ -7540,7 +7552,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "parity-scale-codec", @@ -7555,7 +7567,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "parity-scale-codec", @@ -7573,7 +7585,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "dyn-clone", @@ -7612,7 +7624,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "finality-grandpa", @@ -7636,7 +7648,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "futures 0.3.12", @@ -7657,7 +7669,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "ansi_term 0.12.1", "futures 0.3.12", @@ -7675,7 +7687,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "async-trait", "derive_more", @@ -7695,7 +7707,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "hash-db", "lazy_static", @@ -7714,7 +7726,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "async-std", "async-trait", @@ -7767,7 +7779,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -7783,7 +7795,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "bytes 0.5.6", "fnv", @@ -7811,7 +7823,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "libp2p", @@ -7824,7 +7836,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7833,7 +7845,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "hash-db", @@ -7867,7 +7879,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "futures 0.3.12", @@ -7891,7 +7903,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.1.29", "jsonrpc-core", @@ -7909,7 +7921,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "directories", "exit-future", @@ -7972,7 +7984,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "parity-scale-codec", @@ -7987,7 +7999,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8007,7 +8019,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "chrono", "futures 0.3.12", @@ -8027,7 +8039,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8054,7 +8066,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8065,7 +8077,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "futures 0.3.12", @@ -8087,7 +8099,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-diagnose", @@ -8493,7 +8505,7 @@ dependencies = [ [[package]] name = "sp-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "sp-core", @@ -8505,7 +8517,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "hash-db", "log", @@ -8522,7 +8534,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -8534,7 +8546,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "serde", @@ -8546,7 +8558,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "integer-sqrt", "num-traits", @@ -8559,7 +8571,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-api", @@ -8571,7 +8583,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -8582,7 +8594,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-api", @@ -8594,7 +8606,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "log", @@ -8612,7 +8624,7 @@ dependencies = [ [[package]] name = "sp-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "serde", "serde_json", @@ -8621,7 +8633,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-timer 3.0.2", @@ -8647,7 +8659,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "merlin", "parity-scale-codec", @@ -8668,7 +8680,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -8678,7 +8690,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -8690,7 +8702,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "base58", "blake2-rfc", @@ -8734,7 +8746,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -8743,28 +8755,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "sp-election-providers" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" -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#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "environmental", "parity-scale-codec", @@ -8775,7 +8776,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "finality-grandpa", "log", @@ -8792,7 +8793,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", @@ -8804,7 +8805,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "hash-db", @@ -8828,7 +8829,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "lazy_static", "sp-core", @@ -8839,7 +8840,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "async-trait", "derive_more", @@ -8856,7 +8857,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "serde", @@ -8869,7 +8870,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8880,7 +8881,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "sp-api", "sp-core", @@ -8890,7 +8891,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "backtrace", ] @@ -8898,7 +8899,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "serde", "sp-core", @@ -8907,7 +8908,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "either", "hash256-std-hasher", @@ -8928,7 +8929,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8945,7 +8946,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -8957,7 +8958,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "serde", "serde_json", @@ -8966,7 +8967,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-api", @@ -8979,7 +8980,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -8989,7 +8990,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "hash-db", "log", @@ -9011,12 +9012,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9029,7 +9030,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "sp-core", @@ -9042,7 +9043,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "parity-scale-codec", "sp-api", @@ -9055,7 +9056,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "log", "parity-scale-codec", @@ -9068,7 +9069,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "derive_more", "futures 0.3.12", @@ -9084,7 +9085,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "hash-db", "memory-db", @@ -9098,7 +9099,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "futures-core", @@ -9110,7 +9111,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9122,7 +9123,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9254,7 +9255,7 @@ dependencies = [ [[package]] name = "substrate-browser-utils" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "chrono", "console_error_panic_hook", @@ -9280,7 +9281,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "platforms", ] @@ -9288,7 +9289,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.12", @@ -9311,7 +9312,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "async-std", "derive_more", @@ -9325,7 +9326,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.1.29", "futures 0.3.12", @@ -9353,7 +9354,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "futures 0.3.12", "substrate-test-utils-derive", @@ -9363,7 +9364,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "proc-macro-crate 1.0.0", "quote", @@ -10046,7 +10047,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate#da7ca4db778fc91323a8a0143e5ca013fe0ce4c9" +source = "git+https://github.com/paritytech/substrate#c532e0bb319a8bc12b3a3b711f9285a41f0d5ec9" dependencies = [ "frame-try-runtime", "log", diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index 3b3c62af83..13ce1f6236 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -49,7 +49,6 @@ hex-literal = "0.3.1" keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" } sp-trie = { 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" } frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/polkadot/runtime/common/src/purchase.rs b/polkadot/runtime/common/src/purchase.rs index e90f31696a..284f24feb0 100644 --- a/polkadot/runtime/common/src/purchase.rs +++ b/polkadot/runtime/common/src/purchase.rs @@ -809,7 +809,7 @@ mod tests { alice(), 50, 50, - Permill::from_rational_approximation(77u32, 1000u32), + Permill::from_rational(77u32, 1000u32), )); assert_eq!( Accounts::::get(alice()), diff --git a/polkadot/runtime/kusama/src/constants.rs b/polkadot/runtime/kusama/src/constants.rs index 91d6b35452..b529f44740 100644 --- a/polkadot/runtime/kusama/src/constants.rs +++ b/polkadot/runtime/kusama/src/constants.rs @@ -85,7 +85,7 @@ pub mod fee { smallvec![WeightToFeeCoefficient { degree: 1, negative: false, - coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_frac: Perbill::from_rational(p % q, q), coeff_integer: p / q, }] } diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index b908ea9d8a..04058cd36b 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -316,7 +316,7 @@ parameter_types! { 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); + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(1u32, 10_000); // miner configs pub MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; @@ -368,7 +368,7 @@ parameter_types! { // quarter of the last session will be for election. pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4; pub const MaxIterations: u32 = 10; - pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); + pub MinSolutionScoreBump: Perbill = Perbill::from_rational(5u32, 10_000); } type SlashCancelOrigin = EnsureOneOf< @@ -391,7 +391,7 @@ impl pallet_staking::Config for Runtime { // A majority of the council or root can cancel the slash. type SlashCancelOrigin = SlashCancelOrigin; type SessionInterface = Self; - type RewardCurve = RewardCurve; + type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type NextNewSession = Session; type ElectionLookahead = ElectionLookahead; diff --git a/polkadot/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs b/polkadot/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs index bfa35fbe2d..6f642fbcdc 100644 --- a/polkadot/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs +++ b/polkadot/runtime/kusama/src/weights/pallet_election_provider_multi_phase.rs @@ -62,6 +62,9 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + fn elect_queued() -> Weight { + 0 + } fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 21_000 diff --git a/polkadot/runtime/kusama/src/weights/pallet_staking.rs b/polkadot/runtime/kusama/src/weights/pallet_staking.rs index 56846dca36..e75284e6b3 100644 --- a/polkadot/runtime/kusama/src/weights/pallet_staking.rs +++ b/polkadot/runtime/kusama/src/weights/pallet_staking.rs @@ -214,4 +214,23 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(w as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 113_000 + .saturating_add((26_614_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 113_000 + .saturating_add((64_299_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_547_000 + .saturating_add((20_092_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) + } + fn get_npos_targets(v: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 29_000 + .saturating_add((10_228_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) + } } diff --git a/polkadot/runtime/polkadot/src/constants.rs b/polkadot/runtime/polkadot/src/constants.rs index d6704f3eb0..6b72b7e921 100644 --- a/polkadot/runtime/polkadot/src/constants.rs +++ b/polkadot/runtime/polkadot/src/constants.rs @@ -77,7 +77,7 @@ pub mod fee { smallvec![WeightToFeeCoefficient { degree: 1, negative: false, - coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_frac: Perbill::from_rational(p % q, q), coeff_integer: p / q, }] } diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index b3312503c8..ea7a2aca82 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -326,7 +326,7 @@ parameter_types! { 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); + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(1u32, 10_000); // miner configs pub MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; @@ -377,7 +377,7 @@ parameter_types! { // last 15 minutes of the last session will be for election. pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 16; pub const MaxIterations: u32 = 10; - pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); + pub MinSolutionScoreBump: Perbill = Perbill::from_rational(5u32, 10_000); } type SlashCancelOrigin = EnsureOneOf< @@ -400,7 +400,7 @@ impl pallet_staking::Config for Runtime { // A super-majority of the council can cancel the slash. type SlashCancelOrigin = SlashCancelOrigin; type SessionInterface = Self; - type RewardCurve = RewardCurve; + type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type NextNewSession = Session; type ElectionLookahead = ElectionLookahead; diff --git a/polkadot/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs b/polkadot/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs index b6e31f40e9..c9cac40650 100644 --- a/polkadot/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs +++ b/polkadot/runtime/polkadot/src/weights/pallet_election_provider_multi_phase.rs @@ -62,6 +62,9 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + fn elect_queued() -> Weight { + 0 + } fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 22_000 diff --git a/polkadot/runtime/polkadot/src/weights/pallet_staking.rs b/polkadot/runtime/polkadot/src/weights/pallet_staking.rs index 025feb1774..850ad00607 100644 --- a/polkadot/runtime/polkadot/src/weights/pallet_staking.rs +++ b/polkadot/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-02-22, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! DATE: 2021-03-16, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,174 +44,193 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (76_908_000 as Weight) + (75_596_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (62_164_000 as Weight) + (61_252_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (56_648_000 as Weight) + (56_294_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (57_093_000 as Weight) + (56_564_000 as Weight) // Standard Error: 0 - .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((29_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (91_385_000 as Weight) - // Standard Error: 2_000 - .saturating_add((2_653_000 as Weight).saturating_mul(s as Weight)) + (89_521_000 as Weight) + // Standard Error: 1_000 + .saturating_add((2_624_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (19_310_000 as Weight) + (18_843_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (16_186_000 as Weight) - // Standard Error: 7_000 - .saturating_add((18_595_000 as Weight).saturating_mul(k as Weight)) + (12_546_000 as Weight) + // Standard Error: 11_000 + .saturating_add((18_588_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (28_442_000 as Weight) - // Standard Error: 11_000 - .saturating_add((5_696_000 as Weight).saturating_mul(n as Weight)) + (28_659_000 as Weight) + // Standard Error: 12_000 + .saturating_add((5_608_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (18_484_000 as Weight) + (18_137_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn set_payee() -> Weight { - (12_669_000 as Weight) + (12_265_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (27_387_000 as Weight) + (26_666_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (2_185_000 as Weight) + (2_105_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_462_000 as Weight) + (2_371_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_457_000 as Weight) + (2_352_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_479_000 as Weight) + (2_348_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_587_000 as Weight) + (2_547_000 as Weight) // Standard Error: 0 .saturating_add((35_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (60_870_000 as Weight) - // Standard Error: 2_000 - .saturating_add((2_685_000 as Weight).saturating_mul(s as Weight)) + (60_738_000 as Weight) + // Standard Error: 1_000 + .saturating_add((2_618_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (5_926_565_000 as Weight) - // Standard Error: 389_000 - .saturating_add((34_615_000 as Weight).saturating_mul(s as Weight)) + (5_928_118_000 as Weight) + // Standard Error: 390_000 + .saturating_add((34_769_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (117_761_000 as Weight) - // Standard Error: 12_000 - .saturating_add((50_840_000 as Weight).saturating_mul(n as Weight)) + (118_119_000 as Weight) + // Standard Error: 18_000 + .saturating_add((50_486_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (150_617_000 as Weight) - // Standard Error: 20_000 - .saturating_add((65_847_000 as Weight).saturating_mul(n as Weight)) + (146_232_000 as Weight) + // Standard Error: 28_000 + .saturating_add((64_703_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(12 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (39_745_000 as Weight) - // Standard Error: 2_000 - .saturating_add((78_000 as Weight).saturating_mul(l as Weight)) + (39_223_000 as Weight) + // Standard Error: 1_000 + .saturating_add((89_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 64_000 - .saturating_add((31_128_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 65_000 + .saturating_add((31_885_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (64_170_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_686_000 as Weight).saturating_mul(s as Weight)) + (64_155_000 as Weight) + // Standard Error: 0 + .saturating_add((2_609_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_070_000 - .saturating_add((590_545_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 53_000 - .saturating_add((82_290_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) + // Standard Error: 813_000 + .saturating_add((579_234_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 40_000 + .saturating_add((80_798_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(13 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } fn submit_solution_better(v: u32, n: u32, a: u32, w: u32, ) -> Weight { (0 as Weight) - // Standard Error: 53_000 - .saturating_add((972_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 21_000 - .saturating_add((547_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 53_000 - .saturating_add((75_353_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 111_000 - .saturating_add((7_477_000 as Weight).saturating_mul(w as Weight)) + // Standard Error: 47_000 + .saturating_add((1_156_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 19_000 + .saturating_add((537_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 47_000 + .saturating_add((73_175_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 99_000 + .saturating_add((6_758_000 as Weight).saturating_mul(w as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(a as Weight))) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(w as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 113_000 + .saturating_add((26_614_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 113_000 + .saturating_add((64_299_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_547_000 + .saturating_add((20_092_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) + } + fn get_npos_targets(v: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 29_000 + .saturating_add((10_228_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) + } } diff --git a/polkadot/runtime/rococo/src/constants.rs b/polkadot/runtime/rococo/src/constants.rs index d213acb778..26fea2cac6 100644 --- a/polkadot/runtime/rococo/src/constants.rs +++ b/polkadot/runtime/rococo/src/constants.rs @@ -79,7 +79,7 @@ pub mod fee { smallvec![WeightToFeeCoefficient { degree: 1, negative: false, - coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_frac: Perbill::from_rational(p % q, q), coeff_integer: p / q, }] } diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index b2e737831f..b1cb371d96 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -26,7 +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 } +frame-election-provider-support = { 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 } @@ -115,5 +115,5 @@ std = [ "pallet-randomness-collective-flip/std", "runtime-common/std", "log/std", - "sp-election-providers/std", + "frame-election-provider-support/std", ] diff --git a/polkadot/runtime/test-runtime/src/constants.rs b/polkadot/runtime/test-runtime/src/constants.rs index 4c00475f4b..0d9a4fa088 100644 --- a/polkadot/runtime/test-runtime/src/constants.rs +++ b/polkadot/runtime/test-runtime/src/constants.rs @@ -74,7 +74,7 @@ pub mod fee { smallvec![WeightToFeeCoefficient { degree: 1, negative: false, - coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_frac: Perbill::from_rational(p % q, q), coeff_integer: p / q, }] } diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index e76a08186c..797399480d 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -309,12 +309,13 @@ parameter_types! { pub storage ElectionLookahead: BlockNumber = 0; pub storage StakingUnsignedPriority: TransactionPriority = TransactionPriority::max_value() / 2; pub storage MaxIterations: u32 = 10; - pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); + pub MinSolutionScoreBump: Perbill = Perbill::from_rational(5u32, 10_000); } -impl sp_election_providers::onchain::Config for Runtime { +impl frame_election_provider_support::onchain::Config for Runtime { type AccountId = ::AccountId; type BlockNumber = ::BlockNumber; + type BlockWeights = (); type Accuracy = sp_runtime::Perbill; type DataProvider = pallet_staking::Module; } @@ -333,7 +334,7 @@ impl pallet_staking::Config for Runtime { // A majority of the council can cancel the slash. type SlashCancelOrigin = frame_system::EnsureNever<()>; type SessionInterface = Self; - type RewardCurve = RewardCurve; + type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type NextNewSession = Session; type ElectionLookahead = ElectionLookahead; @@ -342,7 +343,7 @@ impl pallet_staking::Config for Runtime { type MaxIterations = MaxIterations; type OffchainSolutionWeightLimit = (); type MinSolutionScoreBump = MinSolutionScoreBump; - type ElectionProvider = sp_election_providers::onchain::OnChainSequentialPhragmen; + type ElectionProvider = frame_election_provider_support::onchain::OnChainSequentialPhragmen; type WeightInfo = (); } diff --git a/polkadot/runtime/westend/src/constants.rs b/polkadot/runtime/westend/src/constants.rs index ed74000704..b897299ed4 100644 --- a/polkadot/runtime/westend/src/constants.rs +++ b/polkadot/runtime/westend/src/constants.rs @@ -77,7 +77,7 @@ pub mod fee { smallvec![WeightToFeeCoefficient { degree: 1, negative: false, - coeff_frac: Perbill::from_rational_approximation(p % q, q), + coeff_frac: Perbill::from_rational(p % q, q), coeff_integer: p / q, }] } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 955d5dd8ee..fd2f5748e1 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -320,7 +320,7 @@ parameter_types! { 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); + pub SolutionImprovementThreshold: Perbill = Perbill::from_rational(1u32, 10_000); // miner configs pub const MultiPhaseUnsignedPriority: TransactionPriority = StakingUnsignedPriority::get() - 1u64; @@ -367,7 +367,7 @@ parameter_types! { // quarter of the last session will be for election. pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4; pub const MaxIterations: u32 = 10; - pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000); + pub MinSolutionScoreBump: Perbill = Perbill::from_rational(5u32, 10_000); } impl pallet_staking::Config for Runtime { @@ -384,7 +384,7 @@ impl pallet_staking::Config for Runtime { // A majority of the council can cancel the slash. type SlashCancelOrigin = EnsureRoot; type SessionInterface = Self; - type RewardCurve = RewardCurve; + type EraPayout = pallet_staking::ConvertCurve; type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type NextNewSession = Session; type ElectionLookahead = ElectionLookahead; diff --git a/polkadot/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs b/polkadot/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs index e181f13ac9..0bb963a1b1 100644 --- a/polkadot/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs +++ b/polkadot/runtime/westend/src/weights/pallet_election_provider_multi_phase.rs @@ -62,6 +62,9 @@ impl pallet_election_provider_multi_phase::WeightInfo f .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + fn elect_queued() -> Weight { + 0 + } fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { (0 as Weight) // Standard Error: 22_000 diff --git a/polkadot/runtime/westend/src/weights/pallet_staking.rs b/polkadot/runtime/westend/src/weights/pallet_staking.rs index 86b4166ea6..16e51d0a35 100644 --- a/polkadot/runtime/westend/src/weights/pallet_staking.rs +++ b/polkadot/runtime/westend/src/weights/pallet_staking.rs @@ -214,4 +214,23 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(w as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 113_000 + .saturating_add((26_614_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 113_000 + .saturating_add((64_299_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_547_000 + .saturating_add((20_092_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) + } + fn get_npos_targets(v: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 29_000 + .saturating_add((10_228_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) + } }