Open kianenigma opened 2 months ago
@kianenigma Is this being worked on or planning to start soon ? I think it should be prioritised given how often this bites us.
Yes, this sounds useful. Can they unchill themselves easily? Or do we do it when they change their session keys?
I don't see the bandwidth for it in the Runtime function atm, but I can offer two options:
In my original issue, I said "chill validators that produce no staking reward".
This is the harsher, radical approach. It is easier weight-wise to implement: we can have a #[pallet::task]
or on_idle
that regularly looks at validators who were active (a key in Exposures
storage), but have no reward points in the past eras, and force chill them.
A more mild one would be that we let them remain a validator, so that people can nominate them and such, but in the validator snapshot aka. pre-sorting step, we remove them. This is more difficult to implement weight-wise.
@gpestana can advise you if the weight will be an issue.
I do like the idea intuitively, but..
I'd suggest "too few points from X, Y, and Z" instead of "no points" per se, although disputes slashing could be replaced by negative points, which maybe confuses this. Anyways..
As a rule, relay chain block production matters somewhat, but you can miss your few slots easily. I'd ignore backing rewards because approvals matters far more and backing must never be more benefitial than approvals. See https://github.com/polkadot-fellows/RFCs/pull/119
Approvals require the median computation given in https://github.com/polkadot-fellows/RFCs/pull/119 but then removing would become a simple majority vote. yikes! Instead, we could remove when the same computation finds too poor an approval score at the 2/3rd percentile. I'll caution this runs like 1 full session later, so occurs only after one full session.
We've no rewards for grandpa or beefy, but maybe in the future, and they must work like approvals via median computations.
As RFCs, I'd suggest merging this into https://github.com/polkadot-fellows/RFCs/pull/119 or making a followup RFC, because likely this should use the approval rewards, at least initially.
In my original issue, I said "chill validators that produce no staking reward".
This is the harsher, radical approach. It is easier weight-wise to implement: we can have a
#[pallet::task]
oron_idle
that regularly looks at validators who were active (a key inExposures
storage), but have no reward points in the past eras, and force chill them.A more mild one would be that we let them remain a validator, so that people can nominate them and such, but in the validator snapshot aka. pre-sorting step, we remove them. This is more difficult to implement weight-wise.
@gpestana can advise you if the weight will be an issue.
Another possible alternative:
A new extrinsic, chill_inactive
, that accepts a validator and a proof of zero era points. The proof can simply be a vec of x eras within the last 84 eras where they have zero points, where x is the threshold to chill an inactive validator.
This would be straightforward to implement, and since such cases should be rare, there’s no need for on-chain logic to actively detect them. A side effect of this approach is that, say if we set x = 2, any validator with 0 points for 2 eras can be chilled by anyone until those 0-point eras are cleared from the state. This could serve as a nice punishment; however, if this is a problem, it should be trivial to store the era in which a validator set their validation intention and only check for zero-point eras occurring post that.
@michalisFr reported another validator that might have gone permanently offline but never removed their intention to validate.
This validator issued their validation intention 4 years ago and since then there's been no activity in the account. It doesn't seem they participated much in the active set after that, until era 1608 last week, when they generated 0 era points.
As reported recently by @eskimor, some both Polkadot and Kusama have some bad validators that produce no blocks. This could be because of slow hardware.
In principle, these validators are sub-optimal to nominate, because they produce no staking rewards. So we hope nominators will filter them out. A mechanism like https://github.com/polkadot-fellows/RFCs/pull/104 could help further.
Nonetheless,
pallet-staking
can become slightly more proactive, and itself chill validators who were elected for a number of eras, but didn't gain any points.This help Polkadot be super sure that the average block time is not going above 6s.
Potential solution: see https://github.com/paritytech/polkadot-sdk/issues/5674#issuecomment-2455347584