mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 06:48:27 +00:00
Update to spec v1.7.0-alpha.4 (#9046)
Update our consensus code to v1.7.0-alpha.4 Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -12,7 +12,7 @@ use state_processing::per_epoch_processing::effective_balance_updates::{
|
||||
process_effective_balance_updates, process_effective_balance_updates_slow,
|
||||
};
|
||||
use state_processing::per_epoch_processing::single_pass::{
|
||||
SinglePassConfig, process_epoch_single_pass, process_proposer_lookahead,
|
||||
SinglePassConfig, process_epoch_single_pass, process_proposer_lookahead, process_ptc_window,
|
||||
};
|
||||
use state_processing::per_epoch_processing::{
|
||||
altair, base,
|
||||
@@ -80,6 +80,8 @@ pub struct ParticipationFlagUpdates;
|
||||
#[derive(Debug)]
|
||||
pub struct ProposerLookahead;
|
||||
#[derive(Debug)]
|
||||
pub struct PtcWindow;
|
||||
#[derive(Debug)]
|
||||
pub struct BuilderPendingPayments;
|
||||
|
||||
type_name!(
|
||||
@@ -102,6 +104,7 @@ type_name!(SyncCommitteeUpdates, "sync_committee_updates");
|
||||
type_name!(InactivityUpdates, "inactivity_updates");
|
||||
type_name!(ParticipationFlagUpdates, "participation_flag_updates");
|
||||
type_name!(ProposerLookahead, "proposer_lookahead");
|
||||
type_name!(PtcWindow, "ptc_window");
|
||||
type_name!(BuilderPendingPayments, "builder_pending_payments");
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for JustificationAndFinalization {
|
||||
@@ -296,6 +299,16 @@ impl<E: EthSpec> EpochTransition<E> for ProposerLookahead {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for PtcWindow {
|
||||
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
if state.fork_name_unchecked().gloas_enabled() {
|
||||
process_ptc_window(state, spec).map(|_| ())
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> EpochTransition<E> for BuilderPendingPayments {
|
||||
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
|
||||
process_epoch_single_pass(
|
||||
@@ -373,7 +386,9 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if !fork_name.gloas_enabled() && T::name() == "builder_pending_payments" {
|
||||
if !fork_name.gloas_enabled()
|
||||
&& (T::name() == "builder_pending_payments" || T::name() == "ptc_window")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -717,11 +717,7 @@ impl<E: EthSpec, O: Operation<E>> LoadCase for Operations<E, O> {
|
||||
// Check BLS setting here before SSZ deserialization, as most types require signatures
|
||||
// to be valid.
|
||||
let operation_path = path.join(O::filename());
|
||||
let (operation, bls_error) = if !operation_path.is_file() {
|
||||
// Some test cases (e.g. builder_voluntary_exit__success) have no operation file.
|
||||
// TODO(gloas): remove this once the test vectors are fixed
|
||||
(None, None)
|
||||
} else if metadata.bls_setting.unwrap_or_default().check().is_ok() {
|
||||
let (operation, bls_error) = if metadata.bls_setting.unwrap_or_default().check().is_ok() {
|
||||
match O::decode(&operation_path, fork_name, spec) {
|
||||
Ok(op) => (Some(op), None),
|
||||
Err(Error::InvalidBLSInput(error)) => (None, Some(error)),
|
||||
|
||||
@@ -3,7 +3,7 @@ pub use cases::{
|
||||
BuilderPendingPayments, Case, EffectiveBalanceUpdates, Eth1DataReset, ExecutionPayloadBidBlock,
|
||||
FeatureName, HistoricalRootsUpdate, HistoricalSummariesUpdate, InactivityUpdates,
|
||||
JustificationAndFinalization, ParticipationFlagUpdates, ParticipationRecordUpdates,
|
||||
PendingBalanceDeposits, PendingConsolidations, ProposerLookahead, RandaoMixesReset,
|
||||
PendingBalanceDeposits, PendingConsolidations, ProposerLookahead, PtcWindow, RandaoMixesReset,
|
||||
RegistryUpdates, RewardsAndPenalties, Slashings, SlashingsReset, SyncCommitteeUpdates,
|
||||
WithdrawalsPayload,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user