Fix Gloas EF test failures and add test exclusions (#8687)

* Added gloas exclusion to `FinalityHandler`

* Fix Gloas EF test failures and add test exclusions

- Fix execution_payload_availability initialization in fork upgrade
to set all bits to true per spec (was all zeros)
- Fix minimal spec gloas_fork_version: [0x07,0x00,0x00,0x01] (was 0x00)
- Fix payload attestation signature domain to use get_domain instead
of compute_domain with genesis fork version
- Add proposer slashing handler to clear builder_pending_payment per
EIP-7732 spec
- Add Gloas test exclusions for unimplemented functionality:
- sanity_blocks, sanity_slots, random, transition, finality handlers
- deposit_request operation (requires builder deposit functionality)
- Python exclusions for check_all_files_accessed.py

* fmt
This commit is contained in:
Jimmy Chen
2026-01-21 11:01:56 +11:00
committed by GitHub
parent c276fe6a1d
commit ade55a26f2
7 changed files with 83 additions and 10 deletions

View File

@@ -387,6 +387,30 @@ pub fn process_proposer_slashings<E: EthSpec>(
verify_proposer_slashing(proposer_slashing, state, verify_signatures, spec)
.map_err(|e| e.into_with_index(i))?;
// [New in Gloas:EIP7732]
// Remove the BuilderPendingPayment corresponding to this proposal
// if it is still in the 2-epoch window.
let slot = proposer_slashing.signed_header_1.message.slot;
let proposal_epoch = slot.epoch(E::slots_per_epoch());
let current_epoch = state.current_epoch();
let slot_in_epoch = slot.as_u64() % E::slots_per_epoch();
let payment_index = if proposal_epoch == current_epoch {
Some(E::slots_per_epoch() + slot_in_epoch)
} else if proposal_epoch == current_epoch.saturating_sub(1u64) {
Some(slot_in_epoch)
} else {
None
};
if let Some(index) = payment_index {
if let Ok(builder_pending_payments) = state.builder_pending_payments_mut() {
if let Some(payment) = builder_pending_payments.get_mut(index as usize) {
*payment = BuilderPendingPayment::default();
}
}
}
slash_validator(
state,
proposer_slashing.signed_header_1.message.proposer_index as usize,

View File

@@ -318,9 +318,14 @@ where
);
}
let domain = spec.compute_domain(
let epoch = indexed_payload_attestation
.data
.slot
.epoch(E::slots_per_epoch());
let domain = spec.get_domain(
epoch,
Domain::PTCAttester,
spec.genesis_fork_version,
&state.fork(),
state.genesis_validators_root(),
);

View File

@@ -1,6 +1,7 @@
use milhouse::{List, Vector};
use ssz_types::BitVector;
use std::mem;
use typenum::Unsigned;
use types::{
BeaconState, BeaconStateError as Error, BeaconStateGloas, BuilderPendingPayment, ChainSpec,
EthSpec, ExecutionPayloadBid, Fork,
@@ -91,7 +92,12 @@ pub fn upgrade_state_to_gloas<E: EthSpec>(
// Gloas
builders: List::default(),
next_withdrawal_builder_index: 0,
execution_payload_availability: BitVector::default(), // All bits set to false initially
// All bits set to true per spec:
// execution_payload_availability = [0b1 for _ in range(SLOTS_PER_HISTORICAL_ROOT)]
execution_payload_availability: BitVector::from_bytes(
vec![0xFFu8; E::SlotsPerHistoricalRoot::to_usize() / 8].into(),
)
.expect("SlotsPerHistoricalRoot is always divisible by 8"),
builder_pending_payments: Vector::new(vec![
BuilderPendingPayment::default();
E::builder_pending_payments_limit()