Align GLOAS fork choice with spec

- Move proposer boost from apply_score_changes to get_weight, matching
  the spec's structure where get_weight adds boost via is_supporting_vote
- Implement is_supporting_vote and get_ancestor_node spec functions
- Fix should_extend_payload: return true when proposer_boost_root is zero
- Compute record_block_timeliness from time_into_slot instead of hardcoding false
- Fix anchor block_timeliness to [true, true] per get_forkchoice_store spec
- Add equivocating_attestation_score for is_head_weak monotonicity
- Use payload-aware weight in is_parent_strong
- Add with_status helper on IndexedForkChoiceNode
- Simplify find_head_walk to return IndexedForkChoiceNode directly
This commit is contained in:
dapplion
2026-03-25 02:59:50 -05:00
parent cec5ce179d
commit 845831ce56
4 changed files with 241 additions and 204 deletions

View File

@@ -10,6 +10,7 @@ use fixed_bytes::FixedBytesExtended;
use serde::{Deserialize, Serialize};
use ssz::BitVector;
use std::collections::BTreeSet;
use std::time::Duration;
use types::{
AttestationShufflingId, ChainSpec, Checkpoint, Epoch, EthSpec, ExecutionBlockHash, Hash256,
MainnetEthSpec, Slot,
@@ -288,6 +289,7 @@ impl ForkChoiceTestDefinition {
self.justified_checkpoint,
self.finalized_checkpoint,
&spec,
Duration::ZERO,
)
.unwrap_or_else(|e| {
panic!(