-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[AHM] Revert some AH-next staking changes from master #7937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1c91d9
065e64d
60045b7
c63a447
ed6121c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ use sp_consensus_beefy::{ | |
| ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, | ||
| mmr::{BeefyDataProvider, MmrLeafVersion}, | ||
| }; | ||
| use sp_core::{ConstBool, ConstU8, OpaqueMetadata, RuntimeDebug, H256}; | ||
| use sp_core::{ConstU8, OpaqueMetadata, RuntimeDebug, H256}; | ||
| use sp_runtime::{ | ||
| generic, impl_opaque_keys, | ||
| traits::{ | ||
|
|
@@ -586,10 +586,7 @@ parameter_types! { | |
| ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); | ||
| // Maximum winners that can be chosen as active validators | ||
| pub const MaxActiveValidators: u32 = 1000; | ||
| // One page only, fill the whole page with the `MaxActiveValidators`. | ||
| pub const MaxWinnersPerPage: u32 = MaxActiveValidators::get(); | ||
| // Unbonded, thus the max backers per winner maps to the max electing voters limit. | ||
| pub const MaxBackersPerWinner: u32 = MaxElectingVoters::get(); | ||
|
|
||
| } | ||
|
|
||
| frame_election_provider_support::generate_solution_type!( | ||
|
|
@@ -604,14 +601,12 @@ frame_election_provider_support::generate_solution_type!( | |
|
|
||
| pub struct OnChainSeqPhragmen; | ||
| impl onchain::Config for OnChainSeqPhragmen { | ||
| type Sort = ConstBool<true>; | ||
| type System = Runtime; | ||
| type Solver = SequentialPhragmen<AccountId, OnChainAccuracy>; | ||
| type DataProvider = Staking; | ||
| type WeightInfo = weights::frame_election_provider_support::WeightInfo<Runtime>; | ||
| type MaxWinners = MaxActiveValidators; | ||
| type Bounds = ElectionBounds; | ||
| type MaxBackersPerWinner = MaxBackersPerWinner; | ||
| type MaxWinnersPerPage = MaxWinnersPerPage; | ||
| } | ||
|
|
||
| impl pallet_election_provider_multi_phase::MinerConfig for Runtime { | ||
|
|
@@ -624,8 +619,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { | |
| as | ||
| frame_election_provider_support::ElectionDataProvider | ||
| >::MaxVotesPerVoter; | ||
| type MaxBackersPerWinner = MaxBackersPerWinner; | ||
| type MaxWinners = MaxWinnersPerPage; | ||
| type MaxWinners = MaxActiveValidators; | ||
|
|
||
| // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their | ||
| // weight estimate function is wired to this call's weight. | ||
|
|
@@ -659,8 +653,6 @@ impl pallet_election_provider_multi_phase::Config for Runtime { | |
| type BetterSignedThreshold = (); | ||
| type OffchainRepeat = OffchainRepeat; | ||
| type MinerTxPriority = NposSolutionPriority; | ||
| type MaxWinners = MaxWinnersPerPage; | ||
| type MaxBackersPerWinner = MaxBackersPerWinner; | ||
| type DataProvider = Staking; | ||
| #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] | ||
| type Fallback = onchain::OnChainExecution<OnChainSeqPhragmen>; | ||
|
|
@@ -669,8 +661,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { | |
| AccountId, | ||
| BlockNumber, | ||
| Staking, | ||
| MaxWinnersPerPage, | ||
| MaxBackersPerWinner, | ||
| MaxActiveValidators, | ||
| )>; | ||
| type GovernanceFallback = onchain::OnChainExecution<OnChainSeqPhragmen>; | ||
| type Solver = SequentialPhragmen< | ||
|
|
@@ -681,6 +672,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { | |
| type BenchmarkingConfig = polkadot_runtime_common::elections::BenchmarkConfig; | ||
| type ForceOrigin = EnsureRoot<AccountId>; | ||
| type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo<Self>; | ||
| type MaxWinners = MaxActiveValidators; | ||
| type ElectionBounds = ElectionBounds; | ||
| } | ||
|
|
||
|
|
@@ -762,7 +754,6 @@ impl pallet_staking::Config for Runtime { | |
| type GenesisElectionProvider = onchain::OnChainExecution<OnChainSeqPhragmen>; | ||
| type VoterList = VoterList; | ||
| type TargetList = UseValidatorsMap<Self>; | ||
| type MaxValidatorSet = MaxActiveValidators; | ||
| type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; | ||
| type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; | ||
| type HistoryDepth = frame_support::traits::ConstU32<84>; | ||
|
|
@@ -1874,7 +1865,6 @@ pub mod migrations { | |
| parachains_shared::migration::MigrateToV1<Runtime>, | ||
| parachains_scheduler::migration::MigrateV2ToV3<Runtime>, | ||
| pallet_staking::migrations::v16::MigrateV15ToV16<Runtime>, | ||
| pallet_staking::migrations::v17::MigrateV16ToV17<Runtime>, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately we have already upgraded westend to V17.. you can check in the chain state. What did this migration do? We need to see if any special consideration is needed for it or not. |
||
| pallet_session::migrations::v1::MigrateV0ToV1< | ||
| Runtime, | ||
| pallet_staking::migrations::v17::MigrateDisabledToSession<Runtime>, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be reverted.