Gloas fix proposer preferences gossip verification (#9337)

Ensure we are using the correct state when validating proposer preferences over gossip. Previously we were only using the head state. At epoch boundaries the head state could be at `current_epoch - 1`. Peers submitting proposer preferences for `current_epoch + 1` would be penalized because our head states lookahead did not have proposer duties for `current_epoch + 1`


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Eitan Seri-Levi
2026-07-04 00:18:16 -07:00
committed by GitHub
parent aaa60d7d65
commit f9620090da
11 changed files with 290 additions and 111 deletions

View File

@@ -2924,8 +2924,16 @@ impl ApiTester {
.get(lookahead_index)
.expect("slot index should be in lookahead") as usize;
let dependent_root = head_state
.proposer_shuffling_decision_root_at_epoch(
proposal_slot.epoch(E::slots_per_epoch()),
head.beacon_block_root,
&self.chain.spec,
)
.expect("should compute proposer shuffling decision root");
let preferences = ProposerPreferences {
dependent_root: Hash256::ZERO,
dependent_root,
proposal_slot,
validator_index: validator_index as u64,
fee_recipient: Address::repeat_byte(0xaa),