Skip to content
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

Remove duplicated sig verification #5676

Merged
merged 1 commit into from
Apr 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions beacon-chain/sync/validate_aggregate_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ func (r *Service) validateAggregateAndProof(ctx context.Context, pid peer.ID, ms
return false
}

if !featureconfig.Get().DisableStrictAttestationPubsubVerification && !r.chain.IsValidAttestation(ctx, m.Message.Aggregate) {
return false
}

r.setAggregatorIndexSlotSeen(m.Message.Aggregate.Data.Slot, m.Message.AggregatorIndex)

msg.ValidatorData = m
Expand Down Expand Up @@ -129,9 +125,11 @@ func (r *Service) validateAggregatedAtt(ctx context.Context, signed *ethpb.Signe
}

// Verify aggregated attestation has a valid signature.
if err := blocks.VerifyAttestation(ctx, s, signed.Message.Aggregate); err != nil {
traceutil.AnnotateError(span, err)
return false
if !featureconfig.Get().DisableStrictAttestationPubsubVerification {
if err := blocks.VerifyAttestation(ctx, s, signed.Message.Aggregate); err != nil {
traceutil.AnnotateError(span, err)
return false
}
}

return true
Expand Down