mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
Better Handling of Candidates Who Become Invulnerable (#2801)
* remove candidate when to invulnerable * fix * candidates to collators * make parameters consistent and more reasonable * add call to kick invulnerable candidates * factor removal into weight * fix: use accrue instead of add * make set_invulnerables non-atomic * benchmark add_invulnerable to account for candidate removal * don't remove from candidates with set_invulnerables * fix bounds on benchmarking * protect against zero min invulnerables underflow * extra event and tests * make candidates/invulnerables self-cleaning on session change * add integrity test * unused imports * make rococo-contracts have 1 collator
This commit is contained in:
@@ -352,7 +352,7 @@ parameter_types! {
|
||||
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
|
||||
}
|
||||
|
||||
/// We allow root, the StakingAdmin to execute privileged collator selection operations.
|
||||
/// We allow Root and the `StakingAdmin` to execute privileged collator selection operations.
|
||||
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
|
||||
EnsureRoot<AccountId>,
|
||||
EnsureXcm<IsVoiceOfBody<GovernanceLocation, StakingAdminBodyId>>,
|
||||
@@ -363,9 +363,9 @@ impl pallet_collator_selection::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||
type PotId = PotId;
|
||||
type MaxCandidates = ConstU32<1000>;
|
||||
type MinCandidates = ConstU32<5>;
|
||||
type MaxInvulnerables = ConstU32<100>;
|
||||
type MaxCandidates = ConstU32<100>;
|
||||
type MinEligibleCollators = ConstU32<4>;
|
||||
type MaxInvulnerables = ConstU32<20>;
|
||||
// should be a multiple of session or things will get inconsistent
|
||||
type KickThreshold = ConstU32<PERIOD>;
|
||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||
|
||||
Reference in New Issue
Block a user