Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
BoundedOnchainExecution -> BoundedExecution
And `UnboundedOnchainExecution` -> `UnboundedExecution`
  • Loading branch information
Georges Dib committed Mar 20, 2022
commit b4e885c173b3dae390c328012f46b6a0b75984ff
4 changes: 2 additions & 2 deletions runtime/common/src/elections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Code for elections.

use frame_election_provider_support::{
onchain::{BoundedExecutionConfig, ExecutionConfig, UnboundedOnchainExecution},
onchain::{BoundedExecutionConfig, ExecutionConfig, UnboundedExecution},
ElectionDataProvider, SequentialPhragmen, SortedListProvider,
};
use sp_std::{boxed::Box, marker::PhantomData};
Expand Down Expand Up @@ -89,7 +89,7 @@ impl<
}

/// The election provider of the genesis
pub type GenesisElectionOf<T, S> = UnboundedOnchainExecution<OnChainSeqPhragmen<T, S>>;
pub type GenesisElectionOf<T, S> = UnboundedExecution<OnChainSeqPhragmen<T, S>>;

/// Implementation of `frame_election_provider_support::SortedListProvider` that updates the
/// bags-list but uses [`pallet_staking::Nominators`] for `iter`. This is meant to be a transitionary
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 @@ -47,7 +47,7 @@ use runtime_parachains::{
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_election_provider_support::{
generate_solution_type, onchain::BoundedOnchainExecution, NposSolution, SequentialPhragmen,
generate_solution_type, onchain::BoundedExecution, NposSolution, SequentialPhragmen,
};
use frame_support::{
construct_runtime, parameter_types,
Expand Down Expand Up @@ -448,8 +448,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type Solution = NposCompactSolution24;
type Fallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type Fallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type Solver = SequentialPhragmen<
AccountId,
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
Expand Down
6 changes: 3 additions & 3 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use runtime_parachains::{
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_election_provider_support::{
generate_solution_type, onchain::BoundedOnchainExecution, SequentialPhragmen,
generate_solution_type, onchain::BoundedExecution, SequentialPhragmen,
};
use frame_support::{
construct_runtime, parameter_types,
Expand Down Expand Up @@ -490,8 +490,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type Solution = NposCompactSolution16;
type Fallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type Fallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type Solver = SequentialPhragmen<
AccountId,
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
Expand Down
9 changes: 4 additions & 5 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,12 @@ impl pallet_staking::Config for Runtime {
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type OffendingValidatorsThreshold = OffendingValidatorsThreshold;
type NextNewSession = Session;
type ElectionProvider = frame_election_provider_support::onchain::UnboundedOnchainExecution<
type ElectionProvider = frame_election_provider_support::onchain::UnboundedExecution<
runtime_common::elections::OnChainSeqPhragmen<Self, Staking>,
>;
type GenesisElectionProvider = frame_election_provider_support::onchain::UnboundedExecution<
runtime_common::elections::OnChainSeqPhragmen<Self, Staking>,
>;
type GenesisElectionProvider =
frame_election_provider_support::onchain::UnboundedOnchainExecution<
runtime_common::elections::OnChainSeqPhragmen<Self, Staking>,
>;
// Use the nominator map to iter voter AND no-ops for all SortedListProvider hooks. The migration
// to bags-list is a no-op, but the storage version will be updated.
type SortedListProvider = pallet_staking::UseNominatorsMap<Runtime>;
Expand Down
12 changes: 6 additions & 6 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_election_provider_support::{onchain::BoundedOnchainExecution, SequentialPhragmen};
use frame_election_provider_support::{onchain::BoundedExecution, SequentialPhragmen};
use frame_support::{
construct_runtime, parameter_types,
traits::{Contains, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade},
Expand All @@ -43,9 +43,9 @@ use primitives::v2::{
ValidatorIndex, ValidatorSignature,
};
use runtime_common::{
assigned_slots, auctions, crowdloan, elections::OnChainSeqPhragmen,
impl_runtime_weights, impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots,
BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate,
assigned_slots, auctions, crowdloan, elections::OnChainSeqPhragmen, impl_runtime_weights,
impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots, BlockHashCount, BlockLength,
CurrencyToVote, SlowAdjustingFeeUpdate,
};
use runtime_parachains::{
configuration as parachains_configuration, disputes as parachains_disputes,
Expand Down Expand Up @@ -390,8 +390,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type MinerTxPriority = NposSolutionPriority;
type DataProvider = Staking;
type Solution = NposCompactSolution16;
type Fallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedOnchainExecution<OnChainSeqPhragmen<Self, Staking>>;
type Fallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type GovernanceFallback = BoundedExecution<OnChainSeqPhragmen<Self, Staking>>;
type Solver = SequentialPhragmen<
AccountId,
pallet_election_provider_multi_phase::SolutionAccuracyOf<Self>,
Expand Down