Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-block-and-bid-production

This commit is contained in:
Eitan Seri- Levi
2026-02-03 11:39:04 -08:00
20 changed files with 759 additions and 215 deletions

View File

@@ -19,7 +19,7 @@ use state_processing::{
altair_deneb, base, process_attester_slashings, process_bls_to_execution_changes,
process_deposits, process_exits, process_proposer_slashings,
},
process_sync_aggregate, process_withdrawals,
process_sync_aggregate, withdrawals,
},
};
use std::fmt::Debug;
@@ -45,7 +45,7 @@ struct ExecutionMetadata {
/// Newtype for testing withdrawals.
#[derive(Debug, Clone, Deserialize)]
pub struct WithdrawalsPayload<E: EthSpec> {
payload: FullPayload<E>,
payload: ExecutionPayload<E>,
}
#[derive(Debug, Clone)]
@@ -408,9 +408,7 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
ssz_decode_file_with(path, |bytes| {
ExecutionPayload::from_ssz_bytes_by_fork(bytes, fork_name)
})
.map(|payload| WithdrawalsPayload {
payload: payload.into(),
})
.map(|payload| WithdrawalsPayload { payload })
}
fn apply_to(
@@ -419,8 +417,16 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
spec: &ChainSpec,
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
// TODO(EIP-7732): implement separate gloas and non-gloas variants of process_withdrawals
process_withdrawals::<_, FullPayload<_>>(state, self.payload.to_ref(), spec)
if state.fork_name_unchecked().gloas_enabled() {
withdrawals::gloas::process_withdrawals(state, spec)
} else {
let full_payload = FullPayload::from(self.payload.clone());
withdrawals::capella_electra::process_withdrawals::<_, FullPayload<_>>(
state,
full_payload.to_ref(),
spec,
)
}
}
}

View File

@@ -1117,6 +1117,17 @@ impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O>
fn handler_name(&self) -> String {
O::handler_name()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
// TODO(gloas): So far only withdrawals tests are enabled for Gloas.
Self::Case::is_enabled_for_fork(fork_name)
&& (!fork_name.gloas_enabled() || self.handler_name() == "withdrawals")
}
}
#[derive(Educe)]