Companion for #10956 (#5136)

* make it build

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Kian Paimani
2022-03-19 13:04:07 +00:00
committed by GitHub
parent d706faa1b6
commit 20da356434
4 changed files with 187 additions and 178 deletions
+165 -163
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -406,10 +406,12 @@ parameter_types! {
// 1 hour session, 15 minutes unsigned phase, 8 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 8;
/// Whilst `UseNominatorsAndUpdateBagsList` or `UseNominatorsMap` is in use, this can still be a
/// very large value. Once the `BagsList` is in full motion, staking might open its door to many
/// more nominators, and this value should instead be what is a "safe" number (e.g. 22500).
pub const VoterSnapshotPerBlock: u32 = 22_500;
/// We take the top 22_500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 22_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
pub const MaxElectableTargets: u16 = u16::MAX;
}
frame_election_provider_support::generate_solution_type!(
@@ -456,7 +458,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 2, 3>,
>;
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
type MaxElectingVoters = MaxElectingVoters;
type MaxElectableTargets = MaxElectableTargets;
}
parameter_types! {
+7 -5
View File
@@ -449,10 +449,11 @@ parameter_types! {
// 4 hour session, 1 hour unsigned phase, 32 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 32;
/// Whilst `UseNominatorsAndUpdateBagsList` or `UseNominatorsMap` is in use, this can still be a
/// very large value. Once the `BagsList` is in full motion, staking might open its door to many
/// more nominators, and this value should instead be what is a "safe" number (e.g. 22500).
pub const VoterSnapshotPerBlock: u32 = 22_500;
/// We take the top 22_500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 22_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
pub const MaxElectableTargets: u16 = u16::MAX;
}
frame_election_provider_support::generate_solution_type!(
@@ -499,7 +500,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 2, 3>,
>;
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
type MaxElectingVoters = MaxElectingVoters;
type MaxElectableTargets = MaxElectableTargets;
}
parameter_types! {
+7 -5
View File
@@ -351,10 +351,11 @@ parameter_types! {
// 1 hour session, 15 minutes unsigned phase, 4 offchain executions.
pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 4;
/// Whilst `UseNominatorsAndUpdateBagsList` or `UseNominatorsMap` is in use, this can still be a
/// very large value. Once the `BagsList` is in full motion, staking might open its door to many
/// more nominators, and this value should instead be what is a "safe" number (e.g. 22500).
pub const VoterSnapshotPerBlock: u32 = 22_500;
/// We take the top 22_500 nominators as electing voters..
pub const MaxElectingVoters: u32 = 22_500;
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
pub const MaxElectableTargets: u16 = u16::MAX;
}
frame_election_provider_support::generate_solution_type!(
@@ -398,7 +399,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig;
type ForceOrigin = EnsureRoot<AccountId>;
type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>;
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
type MaxElectingVoters = MaxElectingVoters;
type MaxElectableTargets = MaxElectableTargets;
}
parameter_types! {