Add Gloas EF test infrastructure and fork choice exclusion.

- Add fork choice constants to consts.rs (PayloadStatus, timeliness indices)
- Add payload_timely_threshold() helper to EthSpec
- Exclude Gloas from fork_choice tests until implementation is complete
- Add PayloadAttestation operation test handler for EF tests
This commit is contained in:
Jimmy Chen
2026-01-20 15:47:49 +11:00
parent ae38421589
commit 7d95ef3074
5 changed files with 54 additions and 2 deletions

View File

@@ -28,4 +28,14 @@ pub mod deneb {
pub mod gloas {
pub const BUILDER_INDEX_SELF_BUILD: u64 = u64::MAX;
pub const BUILDER_INDEX_FLAG: u64 = 1 << 40;
// Fork choice constants
pub type PayloadStatus = u8;
pub const PAYLOAD_STATUS_PENDING: PayloadStatus = 0;
pub const PAYLOAD_STATUS_EMPTY: PayloadStatus = 1;
pub const PAYLOAD_STATUS_FULL: PayloadStatus = 2;
pub const ATTESTATION_TIMELINESS_INDEX: usize = 0;
pub const PTC_TIMELINESS_INDEX: usize = 1;
pub const NUM_BLOCK_TIMELINESS_DEADLINES: usize = 2;
}

View File

@@ -437,6 +437,11 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq +
fn max_builders_per_withdrawals_sweep() -> usize {
Self::MaxBuildersPerWithdrawalsSweep::to_usize()
}
/// Returns the `PAYLOAD_TIMELY_THRESHOLD` constant (PTC_SIZE / 2).
fn payload_timely_threshold() -> usize {
Self::PTCSize::to_usize() / 2
}
}
/// Macro to inherit some type values from another EthSpec.