mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 19:32:55 +00:00
Gloas consensus: epoch processing, block signature verification, more tests (#8808)
- [x] Implement `process_builder_pending_payments` in epoch processing for Gloas. Enable the new EF tests for this sub-component as well. - [x] Update `include_all_signatures_except_proposal` for Gloas to safely include the execution payload bid signature (this was an omission in the previous bid PR). - [x] Enable Gloas for _all_ remaining EF tests by default. They all pass with the exception of the finality tests (see below). Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ pub enum Error {
|
||||
EpochProcessingError(EpochProcessingError),
|
||||
ArithError(ArithError),
|
||||
InconsistentStateFork(InconsistentFork),
|
||||
BitfieldError(ssz::BitfieldError),
|
||||
}
|
||||
|
||||
impl From<ArithError> for Error {
|
||||
@@ -22,6 +23,12 @@ impl From<ArithError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ssz::BitfieldError> for Error {
|
||||
fn from(e: ssz::BitfieldError) -> Self {
|
||||
Self::BitfieldError(e)
|
||||
}
|
||||
}
|
||||
|
||||
/// Advances a state forward by one slot, performing per-epoch processing if required.
|
||||
///
|
||||
/// If the root of the supplied `state` is known, then it can be passed as `state_root`. If
|
||||
@@ -48,6 +55,18 @@ pub fn per_slot_processing<E: EthSpec>(
|
||||
None
|
||||
};
|
||||
|
||||
// Unset the next payload availability
|
||||
if state.fork_name_unchecked().gloas_enabled() {
|
||||
let next_slot_index = state
|
||||
.slot()
|
||||
.as_usize()
|
||||
.safe_add(1)?
|
||||
.safe_rem(E::slots_per_historical_root())?;
|
||||
state
|
||||
.execution_payload_availability_mut()?
|
||||
.set(next_slot_index, false)?;
|
||||
}
|
||||
|
||||
state.slot_mut().safe_add_assign(1)?;
|
||||
|
||||
// Process fork upgrades here. Note that multiple upgrades can potentially run
|
||||
|
||||
Reference in New Issue
Block a user