mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user