mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
Implement PeerDAS Fulu fork activation (#6795)
Addresses #6706 This PR activates PeerDAS at the Fulu fork epoch instead of `EIP_7594_FORK_EPOCH`. This means we no longer support testing PeerDAS with Deneb / Electrs, as it's now part of a hard fork.
This commit is contained in:
@@ -91,6 +91,9 @@ pub use transition::TransitionTest;
|
||||
/// to return `true` for the feature in order for the feature test vector to be tested.
|
||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
||||
pub enum FeatureName {
|
||||
// TODO(fulu): to be removed once we start using Fulu types for test vectors.
|
||||
// Existing SSZ types for PeerDAS (Fulu) are the same as Electra, so the test vectors get
|
||||
// loaded as Electra types (default serde behaviour for untagged enums).
|
||||
Fulu,
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,8 @@ impl<E: EthSpec> LoadCase for ComputeColumnsForCustodyGroups<E> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Case for ComputeColumnsForCustodyGroups<E> {
|
||||
fn is_enabled_for_fork(_fork_name: ForkName) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name.fulu_enabled()
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -24,12 +24,8 @@ impl<E: EthSpec> LoadCase for GetCustodyGroups<E> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Case for GetCustodyGroups<E> {
|
||||
fn is_enabled_for_fork(_fork_name: ForkName) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name.fulu_enabled()
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -26,12 +26,8 @@ impl<E: EthSpec> LoadCase for KZGComputeCellsAndKZGProofs<E> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Case for KZGComputeCellsAndKZGProofs<E> {
|
||||
fn is_enabled_for_fork(_fork_name: ForkName) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name.fulu_enabled()
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -27,12 +27,8 @@ impl<E: EthSpec> LoadCase for KZGRecoverCellsAndKZGProofs<E> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Case for KZGRecoverCellsAndKZGProofs<E> {
|
||||
fn is_enabled_for_fork(_fork_name: ForkName) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name.fulu_enabled()
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -29,12 +29,8 @@ impl<E: EthSpec> LoadCase for KZGVerifyCellKZGProofBatch<E> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Case for KZGVerifyCellKZGProofBatch<E> {
|
||||
fn is_enabled_for_fork(_fork_name: ForkName) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name.fulu_enabled()
|
||||
}
|
||||
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
|
||||
@@ -355,11 +355,14 @@ where
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
// This ensures we only run the tests **once** for the feature, using the types matching the
|
||||
// correct fork, e.g. `Fulu` uses SSZ types from `Electra` fork as of spec test version
|
||||
// `v1.5.0-beta.0`, therefore the `Fulu` tests should get included when testing Electra types.
|
||||
// TODO(fulu): to be removed once Fulu types start differing from Electra. We currently run Fulu tests as a
|
||||
// "feature" - this means we use Electra types for Fulu SSZ tests (except for PeerDAS types, e.g. `DataColumnSidecar`).
|
||||
//
|
||||
// e.g. Fulu test vectors are executed in the first line below, but excluded in the 2nd
|
||||
// This ensures we only run the tests **once** for `Fulu`, using the types matching the
|
||||
// correct fork, e.g. `Fulu` uses SSZ types from `Electra` as of spec test version
|
||||
// `v1.5.0-beta.0`, therefore the `Fulu` tests should get included when testing Deneb types.
|
||||
//
|
||||
// e.g. Fulu test vectors are executed in the 2nd line below, but excluded in the 1st
|
||||
// line when testing the type `AttestationElectra`:
|
||||
//
|
||||
// ```
|
||||
@@ -890,6 +893,10 @@ impl<E: EthSpec + TypeName> Handler for GetCustodyGroupsHandler<E> {
|
||||
fn handler_name(&self) -> String {
|
||||
"get_custody_groups".into()
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
@@ -910,6 +917,10 @@ impl<E: EthSpec + TypeName> Handler for ComputeColumnsForCustodyGroupHandler<E>
|
||||
fn handler_name(&self) -> String {
|
||||
"compute_columns_for_custody_group".into()
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
@@ -930,6 +941,10 @@ impl<E: EthSpec> Handler for KZGComputeCellsAndKZGProofHandler<E> {
|
||||
fn handler_name(&self) -> String {
|
||||
"compute_cells_and_kzg_proofs".into()
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
@@ -950,6 +965,10 @@ impl<E: EthSpec> Handler for KZGVerifyCellKZGProofBatchHandler<E> {
|
||||
fn handler_name(&self) -> String {
|
||||
"verify_cell_kzg_proof_batch".into()
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
@@ -970,6 +989,10 @@ impl<E: EthSpec> Handler for KZGRecoverCellsAndKZGProofHandler<E> {
|
||||
fn handler_name(&self) -> String {
|
||||
"recover_cells_and_kzg_proofs".into()
|
||||
}
|
||||
|
||||
fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
|
||||
feature_name == FeatureName::Fulu
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
|
||||
@@ -54,6 +54,7 @@ type_name_generic!(BeaconBlockBodyBellatrix, "BeaconBlockBody");
|
||||
type_name_generic!(BeaconBlockBodyCapella, "BeaconBlockBody");
|
||||
type_name_generic!(BeaconBlockBodyDeneb, "BeaconBlockBody");
|
||||
type_name_generic!(BeaconBlockBodyElectra, "BeaconBlockBody");
|
||||
type_name_generic!(BeaconBlockBodyFulu, "BeaconBlockBody");
|
||||
type_name!(BeaconBlockHeader);
|
||||
type_name_generic!(BeaconState);
|
||||
type_name!(BlobIdentifier);
|
||||
@@ -74,12 +75,14 @@ type_name_generic!(ExecutionPayloadBellatrix, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadCapella, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadDeneb, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadElectra, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadFulu, "ExecutionPayload");
|
||||
type_name_generic!(FullPayload, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadHeader);
|
||||
type_name_generic!(ExecutionPayloadHeaderBellatrix, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderCapella, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderDeneb, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderElectra, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderFulu, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionRequests);
|
||||
type_name_generic!(BlindedPayload, "ExecutionPayloadHeader");
|
||||
type_name!(Fork);
|
||||
@@ -93,6 +96,7 @@ type_name_generic!(LightClientBootstrapAltair, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientBootstrapCapella, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientBootstrapDeneb, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientBootstrapElectra, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientBootstrapFulu, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientFinalityUpdate);
|
||||
type_name_generic!(LightClientFinalityUpdateAltair, "LightClientFinalityUpdate");
|
||||
type_name_generic!(
|
||||
@@ -104,11 +108,13 @@ type_name_generic!(
|
||||
LightClientFinalityUpdateElectra,
|
||||
"LightClientFinalityUpdate"
|
||||
);
|
||||
type_name_generic!(LightClientFinalityUpdateFulu, "LightClientFinalityUpdate");
|
||||
type_name_generic!(LightClientHeader);
|
||||
type_name_generic!(LightClientHeaderAltair, "LightClientHeader");
|
||||
type_name_generic!(LightClientHeaderCapella, "LightClientHeader");
|
||||
type_name_generic!(LightClientHeaderDeneb, "LightClientHeader");
|
||||
type_name_generic!(LightClientHeaderElectra, "LightClientHeader");
|
||||
type_name_generic!(LightClientHeaderFulu, "LightClientHeader");
|
||||
type_name_generic!(LightClientOptimisticUpdate);
|
||||
type_name_generic!(
|
||||
LightClientOptimisticUpdateAltair,
|
||||
@@ -126,11 +132,16 @@ type_name_generic!(
|
||||
LightClientOptimisticUpdateElectra,
|
||||
"LightClientOptimisticUpdate"
|
||||
);
|
||||
type_name_generic!(
|
||||
LightClientOptimisticUpdateFulu,
|
||||
"LightClientOptimisticUpdate"
|
||||
);
|
||||
type_name_generic!(LightClientUpdate);
|
||||
type_name_generic!(LightClientUpdateAltair, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateCapella, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateDeneb, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateElectra, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateFulu, "LightClientUpdate");
|
||||
type_name_generic!(PendingAttestation);
|
||||
type_name!(PendingConsolidation);
|
||||
type_name!(PendingPartialWithdrawal);
|
||||
|
||||
Reference in New Issue
Block a user