-
Notifications
You must be signed in to change notification settings - Fork 771
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
Able to chill inactive validator #7128
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Xavier Lau <[email protected]>
return Ok(()); | ||
} | ||
} else { | ||
consecutive_inactives = 0; |
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.
consecutive_inactives = 0; | |
break; |
Invalid proof.
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.
Same as above.
consecutive_inactives = 0; | ||
|
||
continue; |
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.
consecutive_inactives = 0; | |
continue; | |
break; |
Invalid proof.
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 also makes the rule strict. Every point needs to be valid. However, it’s acceptable if we anticipate this.
// Check if the ear exists. | ||
if !ErasRewardPoints::<T>::contains_key(era) { | ||
consecutive_inactives = 0; | ||
|
||
continue; |
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.
// Check if the ear exists. | |
if !ErasRewardPoints::<T>::contains_key(era) { | |
consecutive_inactives = 0; | |
continue; | |
// Check if the era exists. | |
if !ErasRewardPoints::<T>::contains_key(era) { | |
break; |
Invalid proof.
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.
Validator inactive for [0, 1, 2, 3]
.
Threshold 3
.
Era 0
gets clipped from the history at the moment.
This will reject [0, 1, 2, 3]
. Is this expected?
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Add a new extrinsic
chill_inactive_validator
and a new storage configChillInactiveValidatorThreshold
:not produced any blocks.
ChillInactiveValidatorThreshold
consecutive eras.ChillInactiveValidatorThreshold
is not set, it will fallback toConfig::HistoryDepth
. It's almost the same as current on-chain logic. The inactive validator is almost impossible to be chilled by others, unless it missed84
eras.Closes #5674.
Polkadot address: 156HGo9setPcU2qhFMVWLkcmtCEGySLwNqa3DaEiYSWtte4Y