@@ -96,7 +96,7 @@ use sp_consensus_beefy::{
96
96
ecdsa_crypto:: { AuthorityId as BeefyId , Signature as BeefySignature } ,
97
97
mmr:: { BeefyDataProvider , MmrLeafVersion } ,
98
98
} ;
99
- use sp_core:: { ConstBool , ConstU8 , OpaqueMetadata , RuntimeDebug , H256 } ;
99
+ use sp_core:: { ConstU8 , OpaqueMetadata , RuntimeDebug , H256 } ;
100
100
use sp_runtime:: {
101
101
generic, impl_opaque_keys,
102
102
traits:: {
@@ -586,10 +586,7 @@ parameter_types! {
586
586
ElectionBoundsBuilder :: default ( ) . voters_count( MaxElectingVoters :: get( ) . into( ) ) . build( ) ;
587
587
// Maximum winners that can be chosen as active validators
588
588
pub const MaxActiveValidators : u32 = 1000 ;
589
- // One page only, fill the whole page with the `MaxActiveValidators`.
590
- pub const MaxWinnersPerPage : u32 = MaxActiveValidators :: get( ) ;
591
- // Unbonded, thus the max backers per winner maps to the max electing voters limit.
592
- pub const MaxBackersPerWinner : u32 = MaxElectingVoters :: get( ) ;
589
+
593
590
}
594
591
595
592
frame_election_provider_support:: generate_solution_type!(
@@ -604,14 +601,12 @@ frame_election_provider_support::generate_solution_type!(
604
601
605
602
pub struct OnChainSeqPhragmen ;
606
603
impl onchain:: Config for OnChainSeqPhragmen {
607
- type Sort = ConstBool < true > ;
608
604
type System = Runtime ;
609
605
type Solver = SequentialPhragmen < AccountId , OnChainAccuracy > ;
610
606
type DataProvider = Staking ;
611
607
type WeightInfo = weights:: frame_election_provider_support:: WeightInfo < Runtime > ;
608
+ type MaxWinners = MaxActiveValidators ;
612
609
type Bounds = ElectionBounds ;
613
- type MaxBackersPerWinner = MaxBackersPerWinner ;
614
- type MaxWinnersPerPage = MaxWinnersPerPage ;
615
610
}
616
611
617
612
impl pallet_election_provider_multi_phase:: MinerConfig for Runtime {
@@ -624,8 +619,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime {
624
619
as
625
620
frame_election_provider_support:: ElectionDataProvider
626
621
>:: MaxVotesPerVoter ;
627
- type MaxBackersPerWinner = MaxBackersPerWinner ;
628
- type MaxWinners = MaxWinnersPerPage ;
622
+ type MaxWinners = MaxActiveValidators ;
629
623
630
624
// The unsigned submissions have to respect the weight of the submit_unsigned call, thus their
631
625
// weight estimate function is wired to this call's weight.
@@ -659,8 +653,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
659
653
type BetterSignedThreshold = ( ) ;
660
654
type OffchainRepeat = OffchainRepeat ;
661
655
type MinerTxPriority = NposSolutionPriority ;
662
- type MaxWinners = MaxWinnersPerPage ;
663
- type MaxBackersPerWinner = MaxBackersPerWinner ;
664
656
type DataProvider = Staking ;
665
657
#[ cfg( any( feature = "fast-runtime" , feature = "runtime-benchmarks" ) ) ]
666
658
type Fallback = onchain:: OnChainExecution < OnChainSeqPhragmen > ;
@@ -669,8 +661,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
669
661
AccountId ,
670
662
BlockNumber ,
671
663
Staking ,
672
- MaxWinnersPerPage ,
673
- MaxBackersPerWinner ,
664
+ MaxActiveValidators ,
674
665
) > ;
675
666
type GovernanceFallback = onchain:: OnChainExecution < OnChainSeqPhragmen > ;
676
667
type Solver = SequentialPhragmen <
@@ -681,6 +672,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
681
672
type BenchmarkingConfig = polkadot_runtime_common:: elections:: BenchmarkConfig ;
682
673
type ForceOrigin = EnsureRoot < AccountId > ;
683
674
type WeightInfo = weights:: pallet_election_provider_multi_phase:: WeightInfo < Self > ;
675
+ type MaxWinners = MaxActiveValidators ;
684
676
type ElectionBounds = ElectionBounds ;
685
677
}
686
678
@@ -762,7 +754,6 @@ impl pallet_staking::Config for Runtime {
762
754
type GenesisElectionProvider = onchain:: OnChainExecution < OnChainSeqPhragmen > ;
763
755
type VoterList = VoterList ;
764
756
type TargetList = UseValidatorsMap < Self > ;
765
- type MaxValidatorSet = MaxActiveValidators ;
766
757
type NominationsQuota = pallet_staking:: FixedNominationsQuota < { MaxNominations :: get ( ) } > ;
767
758
type MaxUnlockingChunks = frame_support:: traits:: ConstU32 < 32 > ;
768
759
type HistoryDepth = frame_support:: traits:: ConstU32 < 84 > ;
0 commit comments