Skip to content

Commit 0aa248e

Browse files
authored
Fix ignored gossip attestation validation for early arriving attestations (#15840)
* debug log * undo debug logs * fix: return if block not available * changelog
1 parent 6973cd2 commit 0aa248e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

beacon-chain/sync/validate_beacon_attestation.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ func (s *Service) validateCommitteeIndexBeaconAttestation(
112112
// Verify the block being voted and the processed state is in beaconDB and the block has passed validation if it's in the beaconDB.
113113
blockRoot := bytesutil.ToBytes32(data.BeaconBlockRoot)
114114
if !s.hasBlockAndState(ctx, blockRoot) {
115+
// Block not yet available - save attestation to pending queue for later processing
116+
// when the block arrives. Return ValidationIgnore so gossip doesn't potentially penalize the peer.
115117
s.savePendingAtt(att)
118+
return pubsub.ValidationIgnore, nil
116119
}
120+
// Block exists - verify it's in forkchoice (i.e., it's a descendant of the finalized checkpoint)
117121
if !s.cfg.chain.InForkchoice(blockRoot) {
118122
tracing.AnnotateError(span, blockchain.ErrNotDescendantOfFinalized)
119123
return pubsub.ValidationIgnore, blockchain.ErrNotDescendantOfFinalized

changelog/satushh-gossip.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Fixed
2+
3+
- Fixed [#15812](https://github.com/OffchainLabs/prysm/issues/15812): Gossip attestation validation incorrectly rejecting attestations that arrive before their referenced blocks. Previously, attestations were saved to the pending queue but immediately rejected by forkchoice validation, causing "not descendant of finalized checkpoint" errors. Now attestations for missing blocks return `ValidationIgnore` without error, allowing them to be properly processed when their blocks arrive. This eliminates false positive rejections and prevents potential incorrect peer downscoring during network congestion.

0 commit comments

Comments
 (0)