mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-07 22:54:17 -05:00
Fix ignored gossip attestation validation for early arriving attestations (#15840)
* debug log * undo debug logs * fix: return if block not available * changelog
This commit is contained in:
@@ -112,8 +112,12 @@ func (s *Service) validateCommitteeIndexBeaconAttestation(
|
||||
// Verify the block being voted and the processed state is in beaconDB and the block has passed validation if it's in the beaconDB.
|
||||
blockRoot := bytesutil.ToBytes32(data.BeaconBlockRoot)
|
||||
if !s.hasBlockAndState(ctx, blockRoot) {
|
||||
// Block not yet available - save attestation to pending queue for later processing
|
||||
// when the block arrives. Return ValidationIgnore so gossip doesn't potentially penalize the peer.
|
||||
s.savePendingAtt(att)
|
||||
return pubsub.ValidationIgnore, nil
|
||||
}
|
||||
// Block exists - verify it's in forkchoice (i.e., it's a descendant of the finalized checkpoint)
|
||||
if !s.cfg.chain.InForkchoice(blockRoot) {
|
||||
tracing.AnnotateError(span, blockchain.ErrNotDescendantOfFinalized)
|
||||
return pubsub.ValidationIgnore, blockchain.ErrNotDescendantOfFinalized
|
||||
|
||||
3
changelog/satushh-gossip.md
Normal file
3
changelog/satushh-gossip.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
|
||||
- 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.
|
||||
Reference in New Issue
Block a user