mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 06:48:27 +00:00
Cleanup and spec parity fixes
- Add missing payload attestation slot check: spec returns early when data.slot != block.slot (PTC votes only for assigned block) - Remove dead ignored tests (need mock EL Gloas support to run) - Remove unused new_with_gloas and inspect_queued_payload_attestations - Remove gloas entries from bin.rs (not part of this PR) - Collapse nested if in payload attestation error handling (clippy) - Rename env -> envelope in load_parent - Add TODO(gloas) for parent_head_hash in re-org path - Remove head_payload_status from ForkchoiceUpdateParameters (lives on CachedHead, sourced from get_head return)
This commit is contained in:
@@ -1216,6 +1216,12 @@ where
|
||||
});
|
||||
}
|
||||
|
||||
// Spec: `if data.slot != state.slot: return` — PTC votes can only
|
||||
// change the vote for their assigned beacon block.
|
||||
if block.slot != indexed_payload_attestation.data.slot {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// Gossip payload attestations must be for the current slot.
|
||||
// https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/fork-choice.md
|
||||
if matches!(is_from_block, AttestationFromBlock::False)
|
||||
|
||||
Reference in New Issue
Block a user