Merge branch 'gloas-alpha-spec-9' of https://github.com/eserilev/lighthouse into gloas-alpha-spec-9

This commit is contained in:
Eitan Seri-Levi
2026-06-10 15:23:33 +03:00
2 changed files with 5 additions and 11 deletions

View File

@@ -61,8 +61,7 @@ pub enum Error {
/// attestation is valid or not.
UnknownHeadBlock { beacon_block_root: Hash256 },
/// The block referenced by `data.beacon_block_root` is not at slot `data.slot`, i.e. the
/// PTC member's assigned slot was empty (the message references the last canonical block at
/// an earlier slot).
/// PTC member's assigned slot was likely empty.
///
/// ## Peer scoring
///

View File

@@ -1398,15 +1398,10 @@ impl<E: EthSpec> BeaconState<E> {
// Post-Gloas, slashed validators are excluded from proposer selection
if self.fork_name_unchecked().gloas_enabled() {
if self.slashings_cache_is_initialized() {
let slashings_cache = self.slashings_cache();
indices.retain(|&index| !slashings_cache.is_slashed(index));
} else {
// Fallback incase the slashing cache isnt initialized for the current slot.
// The slashing cache may be cold during block replay or state reconstruction.
// This fallback makes the slashing checks infallible.
indices.retain(|&index| self.validators().get(index).is_some_and(|v| !v.slashed));
}
let latest_block_slot = self.latest_block_header().slot;
let slashings_cache = self.slashings_cache();
slashings_cache.check_initialized(latest_block_slot)?;
indices.retain(|&index| !slashings_cache.is_slashed(index));
}
let preimage = self.get_seed(epoch, Domain::BeaconProposer, spec)?;