-
Notifications
You must be signed in to change notification settings - Fork 920
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
Improve Slashing Protection for V1, More Tests and Observability #7934
Conversation
validator/client/attest_protect.go
Outdated
@@ -7,6 +7,8 @@ import ( | |||
|
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.
Review carefully
@@ -2,6 +2,7 @@ package client | |||
|
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.
Look at all these tests!
@@ -127,6 +127,49 @@ func (hd EncHistoryData) SetTargetData(ctx context.Context, target uint64, histo | |||
return hd, nil | |||
} | |||
|
|||
// MarkAllAsAttestedSinceLatestWrittenEpoch returns an attesting history with specified target+epoch pairs | |||
// since the latest written epoch up to the incoming attestation's target epoch as attested for. | |||
func MarkAllAsAttestedSinceLatestWrittenEpoch( |
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 logic as before, just changed to remove variable shadowing risk
prysm/validator/client/attest_protect.go
Line 135 in dc897a2
func markAttestationForTargetEpoch(ctx context.Context, history kv.EncHistoryData, sourceEpoch, targetEpoch uint64, signingRoot [32]byte) kv.EncHistoryData { |
What type of PR is this?
What does this PR do? Why is it needed?
Slashing protection, in current
master
, lives with some really serious problems. Although most of these issues are patched in #7848, that PR needs time to be tested in pre-production environments before making into the master branch due to how radical it is and how much it changes. Unfortunately, we still have some bugs today in detecting surround votes, which we have observed today in our internal infrastructure. The issues are with respect to false positives, meaning that local slashing protection detects certain attestations as slashable which are not. Moreover, we do not have enough logs available to help us understand the problem. This PR adds the following changes: