mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Add Electra fork boilerplate (#5122)
* Add Electra fork boilerplate * Remove electra from spec tests * Fix tests * Remove sneaky log file * Fix more tests * Fix even more tests and add suggestions * Remove unrelated lcli addition * Update more tests * Merge branch 'unstable' into electra * Add comment for test-suite lcli override * Merge branch 'unstable' into electra * Cleanup * Merge branch 'unstable' into electra * Apply suggestions * Merge branch 'unstable' into electra * Merge sigp/unstable into electra * Merge branch 'unstable' into electra
This commit is contained in:
@@ -102,7 +102,8 @@ impl<E: EthSpec> EpochTransition<E> for JustificationAndFinalization {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => {
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => {
|
||||
let justification_and_finalization_state =
|
||||
altair::process_justification_and_finalization(
|
||||
state,
|
||||
@@ -126,7 +127,8 @@ impl<E: EthSpec> EpochTransition<E> for RewardsAndPenalties {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => altair::process_rewards_and_penalties(
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => altair::process_rewards_and_penalties(
|
||||
state,
|
||||
&altair::ParticipationCache::new(state, spec).unwrap(),
|
||||
spec,
|
||||
@@ -156,7 +158,8 @@ impl<E: EthSpec> EpochTransition<E> for Slashings {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => {
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => {
|
||||
process_slashings(
|
||||
state,
|
||||
altair::ParticipationCache::new(state, spec)
|
||||
@@ -208,7 +211,7 @@ impl<E: EthSpec> EpochTransition<E> for HistoricalRootsUpdate {
|
||||
impl<E: EthSpec> EpochTransition<E> for HistoricalSummariesUpdate {
|
||||
fn run(state: &mut BeaconState<E>, _spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
match state {
|
||||
BeaconState::Capella(_) | BeaconState::Deneb(_) => {
|
||||
BeaconState::Capella(_) | BeaconState::Deneb(_) | BeaconState::Electra(_) => {
|
||||
process_historical_summaries_update(state)
|
||||
}
|
||||
_ => Ok(()),
|
||||
@@ -233,7 +236,8 @@ impl<E: EthSpec> EpochTransition<E> for SyncCommitteeUpdates {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => altair::process_sync_committee_updates(state, spec),
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => altair::process_sync_committee_updates(state, spec),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,7 +249,8 @@ impl<E: EthSpec> EpochTransition<E> for InactivityUpdates {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => altair::process_inactivity_updates(
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => altair::process_inactivity_updates(
|
||||
state,
|
||||
&altair::ParticipationCache::new(state, spec).unwrap(),
|
||||
spec,
|
||||
@@ -261,7 +266,8 @@ impl<E: EthSpec> EpochTransition<E> for ParticipationFlagUpdates {
|
||||
BeaconState::Altair(_)
|
||||
| BeaconState::Merge(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_) => altair::process_participation_flag_updates(state),
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => altair::process_participation_flag_updates(state),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +318,7 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
|
||||
T::name() != "participation_record_updates"
|
||||
&& T::name() != "historical_summaries_update"
|
||||
}
|
||||
ForkName::Capella | ForkName::Deneb => {
|
||||
ForkName::Capella | ForkName::Deneb | ForkName::Electra => {
|
||||
T::name() != "participation_record_updates"
|
||||
&& T::name() != "historical_roots_update"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user