Skip to content

Commit

Permalink
Remove Saving Of Target And Source Epoch (#8102)
Browse files Browse the repository at this point in the history
* remove

* skip
  • Loading branch information
nisdas committed Dec 13, 2020
1 parent 11bbf06 commit 579335f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions validator/client/attest_protect.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ func (v *validator) slashableAttestationCheck(
return errors.Wrapf(err, "could not save attestation history for public key: %#x", pubKey)
}

// Save source and target epochs to satisfy EIP3076 requirements.
// The DB methods below will replace the lowest epoch in DB if necessary.
if err := v.db.SaveLowestSignedSourceEpoch(ctx, pubKey, indexedAtt.Data.Source.Epoch); err != nil {
return err
}
if err := v.db.SaveLowestSignedTargetEpoch(ctx, pubKey, indexedAtt.Data.Target.Epoch); err != nil {
return err
}
// TODO(#7813): Add back the saving of lowest target and lowest source epoch
// after we have implemented batch saving of attestation metadata.
if featureconfig.Get().SlasherProtection && v.protector != nil {
if !v.protector.CheckAttestationSafety(ctx, indexedAtt) {
if v.emitAccountMetrics {
Expand Down
1 change: 1 addition & 0 deletions validator/client/attest_protect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func Test_slashableAttestationCheck_Allowed(t *testing.T) {
}

func Test_slashableAttestationCheck_UpdatesLowestSignedEpochs(t *testing.T) {
t.Skip("Skipped till #8100, when we will save lowest source and target epochs again.")
config := &featureconfig.Flags{
SlasherProtection: true,
}
Expand Down

0 comments on commit 579335f

Please sign in to comment.