Update HotStateSummary construction

This commit is contained in:
Michael Sproul
2026-02-24 18:16:53 +11:00
parent e2b3971cbd
commit 28eb5adf0a
3 changed files with 44 additions and 7 deletions

View File

@@ -1284,6 +1284,25 @@ impl<E: EthSpec> BeaconState<E> {
}
}
/// Determine the payload status of this state with all skipped slots considered pending.
///
/// Prior to Gloas this is always `Pending`.
///
/// Post-Gloas, the definition of the `StatePayloadStatus` is:
///
/// - `Full` if this state is the IMMEDIATE result of envelope processing (no skipped slots)
/// - `Pending` if this state is the result of block processing, or slot processing (skipped
/// slot).
pub fn payload_status_with_skipped_pending(&self) -> StatePayloadStatus {
if !self.fork_name_unchecked().gloas_enabled() {
StatePayloadStatus::Pending
} else if self.is_parent_block_full() && self.latest_block_header().slot == self.slot() {
StatePayloadStatus::Full
} else {
StatePayloadStatus::Pending
}
}
/// Return `true` if the validator who produced `slot_signature` is eligible to aggregate.
///
/// Spec v0.12.1