Relax requirements that a checkpoint state must be epoch aligned post-gloas

This commit is contained in:
Eitan Seri- Levi
2026-04-04 00:16:09 -07:00
parent 27af0ed82c
commit 5472c300dc
6 changed files with 90 additions and 8 deletions

View File

@@ -396,8 +396,9 @@ where
current_slot: Option<Slot>,
spec: &ChainSpec,
) -> Result<Self, Error<T::Error>> {
// Sanity check: the anchor must lie on an epoch boundary.
if anchor_state.slot() % E::slots_per_epoch() != 0 {
// Pre-gloas sanity check: the anchor must lie on an epoch boundary.
// Post-gloas we relax this requirement
if !anchor_state.fork_name_unchecked().gloas_enabled() && anchor_state.slot() % E::slots_per_epoch() != 0 {
return Err(Error::InvalidAnchor {
block_slot: anchor_block.slot(),
state_slot: anchor_state.slot(),