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:
Michael Sproul
2026-02-13 16:24:26 +11:00
committed by GitHub
parent f4a6b8d9b9
commit 26db016425
9 changed files with 192 additions and 34 deletions

View File

@@ -79,6 +79,8 @@ pub struct InactivityUpdates;
pub struct ParticipationFlagUpdates;
#[derive(Debug)]
pub struct ProposerLookahead;
#[derive(Debug)]
pub struct BuilderPendingPayments;
type_name!(
JustificationAndFinalization,
@@ -100,6 +102,7 @@ type_name!(SyncCommitteeUpdates, "sync_committee_updates");
type_name!(InactivityUpdates, "inactivity_updates");
type_name!(ParticipationFlagUpdates, "participation_flag_updates");
type_name!(ProposerLookahead, "proposer_lookahead");
type_name!(BuilderPendingPayments, "builder_pending_payments");
impl<E: EthSpec> EpochTransition<E> for JustificationAndFinalization {
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
@@ -293,6 +296,20 @@ impl<E: EthSpec> EpochTransition<E> for ProposerLookahead {
}
}
impl<E: EthSpec> EpochTransition<E> for BuilderPendingPayments {
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
process_epoch_single_pass(
state,
spec,
SinglePassConfig {
builder_pending_payments: true,
..SinglePassConfig::disable_all()
},
)
.map(|_| ())
}
}
impl<E: EthSpec, T: EpochTransition<E>> LoadCase for EpochProcessing<E, T> {
fn load_from_dir(path: &Path, fork_name: ForkName) -> Result<Self, Error> {
let spec = &testing_spec::<E>(fork_name);
@@ -356,6 +373,10 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
return false;
}
if !fork_name.gloas_enabled() && T::name() == "builder_pending_payments" {
return false;
}
true
}

View File

@@ -22,7 +22,7 @@ pub trait Handler {
// Add forks here to exclude them from EF spec testing. Helpful for adding future or
// unspecified forks.
fn disabled_forks(&self) -> Vec<ForkName> {
vec![ForkName::Gloas]
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
@@ -395,11 +395,6 @@ where
T::name().into()
}
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 {
self.supported_forks.contains(&fork_name)
}
@@ -422,11 +417,6 @@ where
fn handler_name(&self) -> String {
BeaconState::<E>::name().into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
}
impl<T, E> Handler for SszStaticWithSpecHandler<T, E>
@@ -449,11 +439,6 @@ where
T::name().into()
}
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 {
self.supported_forks.contains(&fork_name)
}
@@ -552,6 +537,11 @@ impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
fn handler_name(&self) -> String {
"random".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas random tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -622,6 +612,11 @@ impl<E: EthSpec + TypeName> Handler for ForkHandler<E> {
fn handler_name(&self) -> String {
"fork".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once onboard_builders_from_pending_deposits is implemented
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -726,6 +721,11 @@ impl<E: EthSpec + TypeName> Handler for ForkChoiceHandler<E> {
// run them with fake crypto.
cfg!(not(feature = "fake_crypto"))
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas fork choice tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -755,6 +755,11 @@ impl<E: EthSpec + TypeName> Handler for OptimisticSyncHandler<E> {
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.bellatrix_enabled() && cfg!(not(feature = "fake_crypto"))
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas optimistic sync tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -975,6 +980,11 @@ impl<E: EthSpec> Handler for KZGComputeCellsHandler<E> {
fn handler_name(&self) -> String {
"compute_cells".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -995,6 +1005,11 @@ impl<E: EthSpec> Handler for KZGComputeCellsAndKZGProofHandler<E> {
fn handler_name(&self) -> String {
"compute_cells_and_kzg_proofs".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1015,6 +1030,11 @@ impl<E: EthSpec> Handler for KZGVerifyCellKZGProofBatchHandler<E> {
fn handler_name(&self) -> String {
"verify_cell_kzg_proof_batch".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1035,6 +1055,11 @@ impl<E: EthSpec> Handler for KZGRecoverCellsAndKZGProofHandler<E> {
fn handler_name(&self) -> String {
"recover_cells_and_kzg_proofs".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1059,6 +1084,11 @@ impl<E: EthSpec + TypeName> Handler for KzgInclusionMerkleProofValidityHandler<E
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.deneb_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG merkle proof tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1083,6 +1113,11 @@ impl<E: EthSpec + TypeName> Handler for MerkleProofValidityHandler<E> {
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.altair_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas light client tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1108,6 +1143,11 @@ impl<E: EthSpec + TypeName> Handler for LightClientUpdateHandler<E> {
// Enabled in Altair
fork_name.altair_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas light client tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1129,11 +1169,6 @@ impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O>
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 {
Self::Case::is_enabled_for_fork(fork_name)
&& (!fork_name.gloas_enabled()

View File

@@ -1,7 +1,7 @@
pub use case_result::CaseResult;
pub use cases::{
Case, EffectiveBalanceUpdates, Eth1DataReset, ExecutionPayloadBidBlock, FeatureName,
HistoricalRootsUpdate, HistoricalSummariesUpdate, InactivityUpdates,
BuilderPendingPayments, Case, EffectiveBalanceUpdates, Eth1DataReset, ExecutionPayloadBidBlock,
FeatureName, HistoricalRootsUpdate, HistoricalSummariesUpdate, InactivityUpdates,
JustificationAndFinalization, ParticipationFlagUpdates, ParticipationRecordUpdates,
PendingBalanceDeposits, PendingConsolidations, ProposerLookahead, RandaoMixesReset,
RegistryUpdates, RewardsAndPenalties, Slashings, SlashingsReset, SyncCommitteeUpdates,