-
Notifications
You must be signed in to change notification settings - Fork 198
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
En 7716 below signed threshold #2337
Conversation
@@ -26,6 +26,9 @@ | |||
# SwitchJailWaitingEnableEpoch represents the epoch when the system smart contract processing at end of epoch is enabled | |||
SwitchJailWaitingEnableEpoch = 2 | |||
|
|||
# BelowSignedThresholdEnableEpoch represents the epoch when the change for computing rating for validators below signed rating is enabled | |||
BelowSignedThresholdEnableEpoch = 2 |
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.
👍
|
||
if computedThreshold <= signedThreshold { | ||
newTempRating := vs.rater.RevertIncreaseValidator(shardId, validator.TempRating, validator.ValidatorFailure) | ||
increasedRatingTimes := uint32(0) | ||
if epoch < vs.belowSignedThresholdEnableEpoch { |
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 is ok as it is. In other cases (where current epoch was unavailable) we used the epoch change notifier mechanism.
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.
ok!
# Conflicts: # cmd/node/config/config.toml # config/config.go
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.
System tests passed.
according to the economics document if a validator has a number of signatures included below 2.5% all the rating increases as a validator, validatorSuccess and validatorIgnored should be reverted for the current epoch.
Testing: start a testnet and shutdown a validator. During the first 2 epochs the validators rating should be decreased by the number of validator failures, while on the third epoch by the number of success and ignored