mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Prevent attestation to future blocks from early attester cache (#3183)
## Issue Addressed N/A ## Proposed Changes Prevents the early attester cache from producing attestations to future blocks. This bug could result in a missed head vote if the BN was requested to produce an attestation for an earlier slot than the head block during the (usually) short window of time between verifying a block and setting it as the head. This bug was noticed in an [Antithesis](https://andreagrieser.com/) test and diagnosed by @realbigsean. ## Additional Info NA
This commit is contained in:
@@ -104,6 +104,10 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
if request_slot < item.block.slot() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let committee_count = item
|
||||
.committee_lengths
|
||||
.get_committee_count_per_slot::<E>(spec)?;
|
||||
|
||||
Reference in New Issue
Block a user