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:
Michael Sproul
2026-03-31 16:59:36 +11:00
committed by GitHub
parent bc5d8c9f90
commit d92efc1e0f
12 changed files with 279 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
# To download/extract nightly tests, run:
# CONSENSUS_SPECS_TEST_VERSION=nightly make
CONSENSUS_SPECS_TEST_VERSION ?= v1.7.0-alpha.3
CONSENSUS_SPECS_TEST_VERSION ?= v1.7.0-alpha.4
REPO_NAME := consensus-spec-tests
OUTPUT_DIR := ./$(REPO_NAME)

View File

@@ -53,6 +53,8 @@ excluded_paths = [
"tests/.*/gloas/fork_choice/.*",
# Ignore MatrixEntry SSZ tests for now.
"tests/.*/.*/ssz_static/MatrixEntry/.*",
# TODO: partial data column not implemented yet
"tests/.*/.*/ssz_static/PartialDataColumn.*/.*",
# TODO(gloas): Ignore Gloas light client stuff for now
"tests/.*/gloas/ssz_static/LightClient.*/.*",
# Execution payload header is irrelevant after Gloas, this type will probably be deleted.
@@ -73,7 +75,9 @@ excluded_paths = [
"tests/.*/compute_verify_cell_kzg_proof_batch_challenge/.*",
"tests/.*/compute_challenge/.*",
# We don't need these manifest files at the moment.
"tests/.*/manifest.yaml"
"tests/.*/manifest.yaml",
# TODO: gossip condition tests not implemented yet
"tests/.*/.*/networking/.*"
]

View File

@@ -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;
}

View File

@@ -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)),

View File

@@ -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,
};

View File

@@ -960,6 +960,12 @@ fn epoch_processing_proposer_lookahead() {
EpochProcessingHandler::<MainnetEthSpec, ProposerLookahead>::default().run();
}
#[test]
fn epoch_processing_ptc_window() {
EpochProcessingHandler::<MinimalEthSpec, PtcWindow>::default().run();
EpochProcessingHandler::<MainnetEthSpec, PtcWindow>::default().run();
}
#[test]
fn epoch_processing_builder_pending_payments() {
EpochProcessingHandler::<MinimalEthSpec, BuilderPendingPayments>::default().run();