Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Refactors elections-phragmen pallet (companion for substrate#13453) #6278

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
90a1f90
Renamed pallet elections_phragmen to elections; Adds required new typ…
gpestana Nov 13, 2022
5588c3e
updates runtime pallet elections weights
gpestana Nov 17, 2022
b6baf7d
adds comments explaining why elections pallet param type was renamed …
gpestana Nov 20, 2022
3544937
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Dec 8, 2022
eefc12b
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 17, 2023
324d524
merge conflict fixes and brings branch back to master
gpestana Feb 17, 2023
e2bd3ef
Renames PhragmenElection -> Elections
gpestana Feb 20, 2023
3cb93d5
do not rename pallet
gpestana Feb 20, 2023
492277d
Fixes tests weights
gpestana Feb 20, 2023
72c7a15
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 20, 2023
fbdb213
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 22, 2023
683f2a1
updates benchmarks
gpestana Feb 22, 2023
69534d8
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 22, 2023
ee01b5d
fixes runtime benchmarks
gpestana Feb 22, 2023
2aff06b
".git/.scripts/commands/bench/bench.sh" runtime kusama-dev frame_elec…
Feb 22, 2023
8037a5f
".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev frame_el…
Feb 22, 2023
9a5be7c
reverts changes on weights.rs done manually
gpestana Feb 22, 2023
e92db6f
Merge branch 'gpestana8250_npossolver_companion' of github.com:parity…
gpestana Feb 22, 2023
2263446
".git/.scripts/commands/bench/bench.sh" runtime westend-dev frame_ele…
Feb 22, 2023
8ee028e
Merge branch 'master' of https://github.com/paritytech/polkadot into …
Feb 23, 2023
ee8b989
".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_e…
Feb 23, 2023
ffd2221
Fixes weights.rs and adds comment
gpestana Feb 23, 2023
4642b1d
Merge branch 'gpestana8250_npossolver_companion' of github.com:parity…
gpestana Feb 23, 2023
e4d1e79
Merge remote-tracking branch 'origin/master' into gpestana8250_nposso…
Feb 23, 2023
bc6edc9
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 23, 2023
ef26039
update lockfile for {"substrate"}
Feb 23, 2023
fe5bd63
Fixes election limits for tests
gpestana Feb 23, 2023
77108f9
Merge branch 'gpestana8250_npossolver_companion' of github.com:parity…
gpestana Feb 23, 2023
9e1e7a1
fix test bounds for election
gpestana Feb 23, 2023
26827bd
Reverts runtime election bounds for testing
gpestana Feb 28, 2023
7d914d5
resets cargo.lock with master
gpestana Feb 28, 2023
f64c6df
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Feb 28, 2023
973f9cb
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Mar 20, 2023
2751cbb
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Mar 21, 2023
aee97dd
fixes weights pallet elections
gpestana Mar 21, 2023
ca3e2d5
".git/.scripts/commands/bench/bench.sh" runtime rococo-dev pallet_ele…
Mar 21, 2023
fd64eec
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Mar 22, 2023
14a571e
fixes from merge commit
gpestana Mar 22, 2023
086b2b6
Merge branch 'gpestana8250_npossolver_companion' of github.com:parity…
gpestana Mar 22, 2023
a0f0fee
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Mar 24, 2023
4f100c6
Adds missing NposSolver
gpestana Mar 24, 2023
bd51835
Moves NposSolver import under tests
gpestana Mar 24, 2023
5cd574a
".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_e…
Mar 24, 2023
31b78a8
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana Mar 31, 2023
6afac5f
Merge branch 'master' into gpestana8250_npossolver_companion
gpestana May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/sub
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-conviction-voting = { 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-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand Down Expand Up @@ -91,7 +91,6 @@ pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate"
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
hex-literal = { version = "0.4.1", optional = true }

runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
Expand Down Expand Up @@ -148,7 +147,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-collective/std",
"pallet-conviction-voting/std",
"pallet-elections-phragmen/std",
"pallet-elections/std",
"pallet-election-provider-multi-phase/std",
"pallet-fast-unstake/std",
"pallet-democracy/std",
Expand Down Expand Up @@ -215,9 +214,8 @@ runtime-benchmarks = [
"pallet-collective/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-elections/runtime-benchmarks",
"pallet-election-provider-multi-phase/runtime-benchmarks",
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
"pallet-fast-unstake/runtime-benchmarks",
"pallet-nis/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
Expand Down Expand Up @@ -266,7 +264,7 @@ try-runtime = [
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-conviction-voting/try-runtime",
"pallet-elections-phragmen/try-runtime",
"pallet-elections/try-runtime",
"pallet-election-provider-multi-phase/try-runtime",
"pallet-fast-unstake/try-runtime",
"pallet-democracy/try-runtime",
Expand Down
6 changes: 3 additions & 3 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ sp_api::impl_runtime_apis! {

use pallet_session_benchmarking::Pallet as SessionBench;
use pallet_offences_benchmarking::Pallet as OffencesBench;
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
use frame_election_provider_support::benchmarking::Pallet as ElectionProviderBench;
use frame_system_benchmarking::Pallet as SystemBench;
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
use frame_benchmarking::baseline::Pallet as Baseline;
Expand All @@ -2010,7 +2010,7 @@ sp_api::impl_runtime_apis! {
// To get around that, we separated the benchmarks into its own crate.
use pallet_session_benchmarking::Pallet as SessionBench;
use pallet_offences_benchmarking::Pallet as OffencesBench;
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
use frame_election_provider_support::benchmarking::Pallet as ElectionProviderBench;
use frame_system_benchmarking::Pallet as SystemBench;
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
use frame_benchmarking::baseline::Pallet as Baseline;
Expand All @@ -2021,7 +2021,7 @@ sp_api::impl_runtime_apis! {

impl pallet_session_benchmarking::Config for Runtime {}
impl pallet_offences_benchmarking::Config for Runtime {}
impl pallet_election_provider_support_benchmarking::Config for Runtime {}
impl frame_election_provider_support::benchmarking::Config for Runtime {}
impl frame_system_benchmarking::Config for Runtime {}
impl frame_benchmarking::baseline::Config for Runtime {}
impl pallet_nomination_pools_benchmarking::Config for Runtime {}
Expand Down
27 changes: 22 additions & 5 deletions runtime/kusama/src/weights/frame_election_provider_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-03-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! HOSTNAME: `runner-ehxwxxsd-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --pallet=frame_election_provider_support
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
// --pallet=frame_election_provider_support
// --chain=kusama-dev
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/

Expand Down Expand Up @@ -67,12 +69,27 @@ impl<T: frame_system::Config> frame_election_provider_support::WeightInfo for We
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_994_312_000 picoseconds.
// Minimum execution time: 5_043_278_000 nanoseconds.
Weight::from_parts(5_043_278_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 153_800
.saturating_add(Weight::from_parts(5_926_584, 0).saturating_mul(v.into()))
// Standard Error: 15_724_043
.saturating_add(Weight::from_parts(1_841_670_903, 0).saturating_mul(d.into()))
}
/// The range of component `v` is `[1000, 2000]`.
/// The range of component `t` is `[500, 1000]`.
/// The range of component `d` is `[5, 16]`.
fn approval_voting(v: u32, _t: u32, d: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_825_003 nanoseconds.
Weight::from_parts(1_846_540_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 31_136
.saturating_add(Weight::from_parts(1_435_390, 0).saturating_mul(v.into()))
// Standard Error: 3_183_288
.saturating_add(Weight::from_parts(237_013_414, 0).saturating_mul(d.into()))
}
}
2 changes: 1 addition & 1 deletion runtime/kusama/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub mod pallet_collective_technical_committee;
pub mod pallet_conviction_voting;
pub mod pallet_democracy;
pub mod pallet_election_provider_multi_phase;
pub mod pallet_elections_phragmen;
pub mod pallet_elections;
pub mod pallet_fast_unstake;
pub mod pallet_identity;
pub mod pallet_im_online;
Expand Down
214 changes: 214 additions & 0 deletions runtime/kusama/src/weights/pallet_elections.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

gpestana marked this conversation as resolved.
Show resolved Hide resolved
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_elections_phragmen`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `runner-b3zmxxc-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// benchmark
// pallet
// --chain=kusama-dev
// --steps=50
// --repeat=20
// --pallet=pallet_elections_phragmen
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/kusama/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_elections_phragmen`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_elections::WeightInfo for WeightInfo<T> {
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[1, 16]`.
fn vote_equal(v: u32, ) -> Weight {
// Minimum execution time: 33_181 nanoseconds.
Weight::from_ref_time(34_284_379)
// Standard Error: 4_703
.saturating_add(Weight::from_ref_time(193_150).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[2, 16]`.
fn vote_more(v: u32, ) -> Weight {
// Minimum execution time: 43_559 nanoseconds.
Weight::from_ref_time(45_014_304)
// Standard Error: 6_002
.saturating_add(Weight::from_ref_time(232_544).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[2, 16]`.
fn vote_less(v: u32, ) -> Weight {
// Minimum execution time: 43_465 nanoseconds.
Weight::from_ref_time(45_027_590)
// Standard Error: 6_393
.saturating_add(Weight::from_ref_time(218_368).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn remove_voter() -> Weight {
// Minimum execution time: 42_363 nanoseconds.
Weight::from_ref_time(43_806_000)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: PhragmenElection Candidates (r:1 w:1)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
/// The range of component `c` is `[1, 1000]`.
fn submit_candidacy(c: u32, ) -> Weight {
// Minimum execution time: 43_408 nanoseconds.
Weight::from_ref_time(37_013_988)
// Standard Error: 1_189
.saturating_add(Weight::from_ref_time(111_132).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: PhragmenElection Candidates (r:1 w:1)

/// The range of component `c` is `[1, 1000]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
// Minimum execution time: 40_256 nanoseconds.
Weight::from_ref_time(32_461_064)
// Standard Error: 1_225
.saturating_add(Weight::from_ref_time(87_968).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: PhragmenElection Members (r:1 w:1)
// Storage: PhragmenElection RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
fn renounce_candidacy_members() -> Weight {
// Minimum execution time: 54_566 nanoseconds.
Weight::from_ref_time(56_705_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: PhragmenElection RunnersUp (r:1 w:1)
fn renounce_candidacy_runners_up() -> Weight {
// Minimum execution time: 42_417 nanoseconds.
Weight::from_ref_time(43_317_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: Benchmark Override (r:0 w:0)
fn remove_member_without_replacement() -> Weight {
// Minimum execution time: 2_000_000_000 nanoseconds.
Weight::from_ref_time(2_000_000_000_000)
}
// Storage: PhragmenElection Members (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: PhragmenElection RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
fn remove_member_with_replacement() -> Weight {
// Minimum execution time: 72_982 nanoseconds.
Weight::from_ref_time(74_640_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: PhragmenElection Voting (r:5001 w:5000)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: Balances Locks (r:5000 w:5000)
// Storage: System Account (r:5000 w:5000)
/// The range of component `v` is `[5000, 10000]`.
/// The range of component `d` is `[0, 5000]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
// Minimum execution time: 306_719_494 nanoseconds.
Weight::from_ref_time(307_744_759_000)
// Standard Error: 264_406
.saturating_add(Weight::from_ref_time(37_950_413).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
}
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
// Storage: PhragmenElection Voting (r:10001 w:0)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `v` is `[1, 10000]`.
/// The range of component `e` is `[10000, 160000]`.
fn pre_solve_election(_c: u32, v: u32, e: u32, ) -> Weight {
// Minimum execution time: 6_399_000 nanoseconds.
Weight::from_ref_time(1_581_352_360 as u64)
// Standard Error: 55_251
.saturating_add(Weight::from_ref_time(8_030_872 as u64).saturating_mul(v as u64))
// Standard Error: 3_683
.saturating_add(Weight::from_ref_time(13_203 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(296 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
}
// Storage: PhragmenElection Members (r:1 w:1)
// Storage: PhragmenElection RunnersUp (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: PhragmenElection ElectionRounds (r:1 w:1)
// Storage: PhragmenElection Candidates (r:0 w:1)
// Storage: Council Members (r:0 w:1)
// Storage: Council Prime (r:0 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `v` is `[1, 10000]`.
/// The range of component `e` is `[10000, 160000]`.
fn post_solve_election(c: u32, v: u32, e: u32, ) -> Weight {
// Minimum execution time: 730_000 nanoseconds.
Weight::from_ref_time(747_000_000 as u64)
// Standard Error: 50_403
.saturating_add(Weight::from_ref_time(12_670_099 as u64).saturating_mul(c as u64))
// Standard Error: 5_039
.saturating_add(Weight::from_ref_time(342_861 as u64).saturating_mul(v as u64))
// Standard Error: 323
.saturating_add(Weight::from_ref_time(127 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().writes(6 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64)))
}
}
10 changes: 4 additions & 6 deletions runtime/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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-conviction-voting = { 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-elections = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
Expand Down Expand Up @@ -84,7 +84,6 @@ pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
Expand Down Expand Up @@ -145,7 +144,7 @@ std = [
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-collective/std",
"pallet-elections-phragmen/std",
"pallet-elections/std",
"pallet-election-provider-multi-phase/std",
"pallet-democracy/std",
"pallet-fast-unstake/std",
Expand Down Expand Up @@ -205,9 +204,8 @@ runtime-benchmarks = [
"pallet-collective/runtime-benchmarks",
"pallet-conviction-voting/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-elections/runtime-benchmarks",
"pallet-election-provider-multi-phase/runtime-benchmarks",
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
"pallet-fast-unstake/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
Expand Down Expand Up @@ -253,7 +251,7 @@ try-runtime = [
"pallet-conviction-voting/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-elections-phragmen/try-runtime",
"pallet-elections/try-runtime",
"pallet-election-provider-multi-phase/try-runtime",
"pallet-fast-unstake/try-runtime",
"pallet-democracy/try-runtime",
Expand Down
Loading