Resolve merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-03-09 19:33:22 +09:00
231 changed files with 12305 additions and 7272 deletions

View File

@@ -47,29 +47,8 @@ excluded_paths = [
"bls12-381-tests/hash_to_G2",
"tests/.*/eip7732",
"tests/.*/eip7805",
# TODO(gloas): remove these ignores as more Gloas operations are implemented
"tests/.*/gloas/operations/attester_slashing/.*",
"tests/.*/gloas/operations/block_header/.*",
"tests/.*/gloas/operations/bls_to_execution_change/.*",
"tests/.*/gloas/operations/consolidation_request/.*",
"tests/.*/gloas/operations/deposit/.*",
"tests/.*/gloas/operations/deposit_request/.*",
"tests/.*/gloas/operations/execution_payload/.*",
"tests/.*/gloas/operations/execution_payload_bid/.*",
"tests/.*/gloas/operations/payload_attestation/.*",
"tests/.*/gloas/operations/proposer_slashing/.*",
"tests/.*/gloas/operations/sync_aggregate/.*",
"tests/.*/gloas/operations/voluntary_exit/.*",
"tests/.*/gloas/operations/withdrawal_request/.*",
# TODO(EIP-7732): remove these ignores as Gloas consensus is implemented
"tests/.*/gloas/epoch_processing/.*",
"tests/.*/gloas/finality/.*",
"tests/.*/gloas/fork/.*",
# TODO(gloas): remove these ignores as Gloas consensus is implemented
"tests/.*/gloas/fork_choice/.*",
"tests/.*/gloas/networking/.*",
"tests/.*/gloas/rewards/.*",
"tests/.*/gloas/sanity/.*",
"tests/.*/gloas/transition/.*",
# Ignore MatrixEntry SSZ tests for now.
"tests/.*/.*/ssz_static/MatrixEntry/.*",
# TODO(gloas): Ignore Gloas light client stuff for now
@@ -88,8 +67,6 @@ excluded_paths = [
# Ignore full epoch tests for now (just test the sub-transitions).
"tests/.*/.*/epoch_processing/.*/pre_epoch.ssz_snappy",
"tests/.*/.*/epoch_processing/.*/post_epoch.ssz_snappy",
# Ignore inactivity_scores tests for now (should implement soon).
"tests/.*/.*/rewards/inactivity_scores/.*",
# Ignore KZG tests that target internal kzg library functions
"tests/.*/compute_verify_cell_kzg_proof_batch_challenge/.*",
"tests/.*/compute_challenge/.*",

View File

@@ -4,7 +4,7 @@ set -Eeuo pipefail
TESTS=("general" "minimal" "mainnet")
version=${1}
if [[ "$version" == "nightly" ]]; then
if [[ "$version" == "nightly" || "$version" =~ ^nightly-[0-9]+$ ]]; then
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
echo "Error GITHUB_TOKEN is not set"
exit 1
@@ -21,9 +21,13 @@ if [[ "$version" == "nightly" ]]; then
api="https://api.github.com"
auth_header="Authorization: token ${GITHUB_TOKEN}"
run_id=$(curl -s -H "${auth_header}" \
"${api}/repos/${repo}/actions/workflows/generate_vectors.yml/runs?branch=dev&status=success&per_page=1" |
jq -r '.workflow_runs[0].id')
if [[ "$version" == "nightly" ]]; then
run_id=$(curl --fail -s -H "${auth_header}" \
"${api}/repos/${repo}/actions/workflows/nightly-reftests.yml/runs?branch=master&status=success&per_page=1" |
jq -r '.workflow_runs[0].id')
else
run_id="${version#nightly-}"
fi
if [[ "${run_id}" == "null" || -z "${run_id}" ]]; then
echo "No successful nightly workflow run found"
@@ -31,7 +35,7 @@ if [[ "$version" == "nightly" ]]; then
fi
echo "Downloading nightly test vectors for run: ${run_id}"
curl -s -H "${auth_header}" "${api}/repos/${repo}/actions/runs/${run_id}/artifacts" |
curl --fail -H "${auth_header}" "${api}/repos/${repo}/actions/runs/${run_id}/artifacts" |
jq -c '.artifacts[] | {name, url: .archive_download_url}' |
while read -r artifact; do
name=$(echo "${artifact}" | jq -r .name)

View File

@@ -79,6 +79,8 @@ pub struct InactivityUpdates;
pub struct ParticipationFlagUpdates;
#[derive(Debug)]
pub struct ProposerLookahead;
#[derive(Debug)]
pub struct BuilderPendingPayments;
type_name!(
JustificationAndFinalization,
@@ -100,6 +102,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!(BuilderPendingPayments, "builder_pending_payments");
impl<E: EthSpec> EpochTransition<E> for JustificationAndFinalization {
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
@@ -293,6 +296,20 @@ impl<E: EthSpec> EpochTransition<E> for ProposerLookahead {
}
}
impl<E: EthSpec> EpochTransition<E> for BuilderPendingPayments {
fn run(state: &mut BeaconState<E>, spec: &ChainSpec) -> Result<(), EpochProcessingError> {
process_epoch_single_pass(
state,
spec,
SinglePassConfig {
builder_pending_payments: true,
..SinglePassConfig::disable_all()
},
)
.map(|_| ())
}
}
impl<E: EthSpec, T: EpochTransition<E>> LoadCase for EpochProcessing<E, T> {
fn load_from_dir(path: &Path, fork_name: ForkName) -> Result<Self, Error> {
let spec = &testing_spec::<E>(fork_name);
@@ -356,6 +373,10 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
return false;
}
if !fork_name.gloas_enabled() && T::name() == "builder_pending_payments" {
return false;
}
true
}

View File

@@ -448,7 +448,7 @@ impl<E: EthSpec> Tester<E> {
.spec(spec.clone())
.keypairs(vec![])
.chain_config(ChainConfig {
reconstruct_historic_states: true,
archive: true,
..ChainConfig::default()
})
.genesis_state_ephemeral_store(case.anchor_state.clone())

View File

@@ -5,20 +5,23 @@ use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yam
use serde::Deserialize;
use ssz::Decode;
use state_processing::common::update_progressive_balances_cache::initialize_progressive_balances_cache;
use state_processing::envelope_processing::VerifyStateRoot;
use state_processing::epoch_cache::initialize_epoch_cache;
use state_processing::per_block_processing::process_operations::{
process_consolidation_requests, process_deposit_requests, process_withdrawal_requests,
process_consolidation_requests, process_deposit_requests_post_gloas,
process_deposit_requests_pre_gloas, process_withdrawal_requests,
};
use state_processing::{
ConsensusContext,
envelope_processing::{EnvelopeProcessingError, process_execution_payload_envelope},
per_block_processing::{
VerifyBlockRoot, VerifySignatures,
errors::BlockProcessingError,
process_block_header, process_execution_payload,
process_block_header, process_execution_payload, process_execution_payload_bid,
process_operations::{
altair_deneb, base, gloas, process_attester_slashings,
process_bls_to_execution_changes, process_deposits, process_exits,
process_proposer_slashings,
process_payload_attestation, process_proposer_slashings,
},
process_sync_aggregate, withdrawals,
},
@@ -28,8 +31,9 @@ use types::{
Attestation, AttesterSlashing, BeaconBlock, BeaconBlockBody, BeaconBlockBodyBellatrix,
BeaconBlockBodyCapella, BeaconBlockBodyDeneb, BeaconBlockBodyElectra, BeaconBlockBodyFulu,
BeaconState, BlindedPayload, ConsolidationRequest, Deposit, DepositRequest, ExecutionPayload,
ForkVersionDecode, FullPayload, ProposerSlashing, SignedBlsToExecutionChange,
SignedVoluntaryExit, SyncAggregate, WithdrawalRequest,
ForkVersionDecode, FullPayload, PayloadAttestation, ProposerSlashing,
SignedBlsToExecutionChange, SignedExecutionPayloadEnvelope, SignedVoluntaryExit, SyncAggregate,
WithdrawalRequest,
};
#[derive(Debug, Clone, Default, Deserialize)]
@@ -49,6 +53,12 @@ pub struct WithdrawalsPayload<E: EthSpec> {
payload: Option<ExecutionPayload<E>>,
}
/// Newtype for testing execution payload bids.
#[derive(Debug, Clone, Deserialize)]
pub struct ExecutionPayloadBidBlock<E: EthSpec> {
block: BeaconBlock<E>,
}
#[derive(Debug, Clone)]
pub struct Operations<E: EthSpec, O: Operation<E>> {
metadata: Metadata,
@@ -59,6 +69,8 @@ pub struct Operations<E: EthSpec, O: Operation<E>> {
}
pub trait Operation<E: EthSpec>: Debug + Sync + Sized {
type Error: Debug;
fn handler_name() -> String;
fn filename() -> String {
@@ -76,10 +88,12 @@ pub trait Operation<E: EthSpec>: Debug + Sync + Sized {
state: &mut BeaconState<E>,
spec: &ChainSpec,
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError>;
) -> Result<(), Self::Error>;
}
impl<E: EthSpec> Operation<E> for Attestation<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"attestation".into()
}
@@ -132,6 +146,8 @@ impl<E: EthSpec> Operation<E> for Attestation<E> {
}
impl<E: EthSpec> Operation<E> for AttesterSlashing<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"attester_slashing".into()
}
@@ -163,6 +179,8 @@ impl<E: EthSpec> Operation<E> for AttesterSlashing<E> {
}
impl<E: EthSpec> Operation<E> for Deposit {
type Error = BlockProcessingError;
fn handler_name() -> String {
"deposit".into()
}
@@ -187,6 +205,8 @@ impl<E: EthSpec> Operation<E> for Deposit {
}
impl<E: EthSpec> Operation<E> for ProposerSlashing {
type Error = BlockProcessingError;
fn handler_name() -> String {
"proposer_slashing".into()
}
@@ -214,6 +234,8 @@ impl<E: EthSpec> Operation<E> for ProposerSlashing {
}
impl<E: EthSpec> Operation<E> for SignedVoluntaryExit {
type Error = BlockProcessingError;
fn handler_name() -> String {
"voluntary_exit".into()
}
@@ -238,6 +260,8 @@ impl<E: EthSpec> Operation<E> for SignedVoluntaryExit {
}
impl<E: EthSpec> Operation<E> for BeaconBlock<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"block_header".into()
}
@@ -269,6 +293,8 @@ impl<E: EthSpec> Operation<E> for BeaconBlock<E> {
}
impl<E: EthSpec> Operation<E> for SyncAggregate<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"sync_aggregate".into()
}
@@ -297,6 +323,8 @@ impl<E: EthSpec> Operation<E> for SyncAggregate<E> {
}
impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, FullPayload<E>> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"execution_payload".into()
}
@@ -306,7 +334,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, FullPayload<E>> {
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
fork_name.bellatrix_enabled()
fork_name.bellatrix_enabled() && !fork_name.gloas_enabled()
}
fn decode(path: &Path, fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
@@ -317,8 +345,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, FullPayload<E>> {
ForkName::Deneb => BeaconBlockBody::Deneb(<_>::from_ssz_bytes(bytes)?),
ForkName::Electra => BeaconBlockBody::Electra(<_>::from_ssz_bytes(bytes)?),
ForkName::Fulu => BeaconBlockBody::Fulu(<_>::from_ssz_bytes(bytes)?),
// TODO(EIP-7732): See if we need to handle Gloas here
_ => panic!(),
_ => panic!("Not supported after Gloas"),
})
})
}
@@ -340,7 +367,10 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, FullPayload<E>> {
}
}
}
impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, BlindedPayload<E>> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"execution_payload".into()
}
@@ -350,7 +380,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, BlindedPayload<E>> {
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
fork_name.bellatrix_enabled()
fork_name.bellatrix_enabled() && !fork_name.gloas_enabled()
}
fn decode(path: &Path, fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
@@ -377,8 +407,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, BlindedPayload<E>> {
let inner = <BeaconBlockBodyFulu<E, FullPayload<E>>>::from_ssz_bytes(bytes)?;
BeaconBlockBody::Fulu(inner.clone_as_blinded())
}
// TODO(EIP-7732): See if we need to handle Gloas here
_ => panic!(),
_ => panic!("Not supported after Gloas"),
})
})
}
@@ -401,7 +430,84 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, BlindedPayload<E>> {
}
}
impl<E: EthSpec> Operation<E> for SignedExecutionPayloadEnvelope<E> {
type Error = EnvelopeProcessingError;
fn handler_name() -> String {
"execution_payload".into()
}
fn filename() -> String {
"signed_envelope.ssz_snappy".into()
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
fork_name.gloas_enabled()
}
fn decode(path: &Path, _: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
ssz_decode_file(path)
}
fn apply_to(
&self,
state: &mut BeaconState<E>,
spec: &ChainSpec,
extra: &Operations<E, Self>,
) -> Result<(), Self::Error> {
let valid = extra
.execution_metadata
.as_ref()
.is_some_and(|e| e.execution_valid);
if valid {
process_execution_payload_envelope(
state,
None,
self,
VerifySignatures::True,
VerifyStateRoot::True,
spec,
)
} else {
Err(EnvelopeProcessingError::ExecutionInvalid)
}
}
}
impl<E: EthSpec> Operation<E> for ExecutionPayloadBidBlock<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"execution_payload_bid".into()
}
fn filename() -> String {
"block.ssz_snappy".into()
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
fork_name.gloas_enabled()
}
fn decode(path: &Path, _fork_name: ForkName, spec: &ChainSpec) -> Result<Self, Error> {
ssz_decode_file_with(path, |bytes| BeaconBlock::from_ssz_bytes(bytes, spec))
.map(|block| ExecutionPayloadBidBlock { block })
}
fn apply_to(
&self,
state: &mut BeaconState<E>,
spec: &ChainSpec,
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
process_execution_payload_bid(state, self.block.to_ref(), VerifySignatures::True, spec)?;
Ok(())
}
}
impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"withdrawals".into()
}
@@ -448,6 +554,8 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
}
impl<E: EthSpec> Operation<E> for SignedBlsToExecutionChange {
type Error = BlockProcessingError;
fn handler_name() -> String {
"bls_to_execution_change".into()
}
@@ -480,6 +588,8 @@ impl<E: EthSpec> Operation<E> for SignedBlsToExecutionChange {
}
impl<E: EthSpec> Operation<E> for WithdrawalRequest {
type Error = BlockProcessingError;
fn handler_name() -> String {
"withdrawal_request".into()
}
@@ -504,6 +614,8 @@ impl<E: EthSpec> Operation<E> for WithdrawalRequest {
}
impl<E: EthSpec> Operation<E> for DepositRequest {
type Error = BlockProcessingError;
fn handler_name() -> String {
"deposit_request".into()
}
@@ -522,11 +634,17 @@ impl<E: EthSpec> Operation<E> for DepositRequest {
spec: &ChainSpec,
_extra: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
process_deposit_requests(state, std::slice::from_ref(self), spec)
if state.fork_name_unchecked().gloas_enabled() {
process_deposit_requests_post_gloas(state, std::slice::from_ref(self), spec)
} else {
process_deposit_requests_pre_gloas(state, std::slice::from_ref(self), spec)
}
}
}
impl<E: EthSpec> Operation<E> for ConsolidationRequest {
type Error = BlockProcessingError;
fn handler_name() -> String {
"consolidation_request".into()
}
@@ -550,6 +668,32 @@ impl<E: EthSpec> Operation<E> for ConsolidationRequest {
}
}
impl<E: EthSpec> Operation<E> for PayloadAttestation<E> {
type Error = BlockProcessingError;
fn handler_name() -> String {
"payload_attestation".into()
}
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
fork_name.gloas_enabled()
}
fn decode(path: &Path, _fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
ssz_decode_file(path)
}
fn apply_to(
&self,
state: &mut BeaconState<E>,
spec: &ChainSpec,
_extra: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
let mut ctxt = ConsensusContext::new(state.slot());
process_payload_attestation(state, self, 0, VerifySignatures::True, &mut ctxt, spec)
}
}
impl<E: EthSpec, O: Operation<E>> LoadCase for Operations<E, O> {
fn load_from_dir(path: &Path, fork_name: ForkName) -> Result<Self, Error> {
let spec = &testing_spec::<E>(fork_name);

View File

@@ -22,7 +22,7 @@ pub trait Handler {
// Add forks here to exclude them from EF spec testing. Helpful for adding future or
// unspecified forks.
fn disabled_forks(&self) -> Vec<ForkName> {
vec![ForkName::Gloas]
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
@@ -395,11 +395,6 @@ where
T::name().into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
self.supported_forks.contains(&fork_name)
}
@@ -422,11 +417,6 @@ where
fn handler_name(&self) -> String {
BeaconState::<E>::name().into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
}
impl<T, E> Handler for SszStaticWithSpecHandler<T, E>
@@ -449,11 +439,6 @@ where
T::name().into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
self.supported_forks.contains(&fork_name)
}
@@ -552,6 +537,11 @@ impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
fn handler_name(&self) -> String {
"random".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas random tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -602,6 +592,15 @@ impl<E: EthSpec + TypeName> Handler for RewardsHandler<E> {
fn handler_name(&self) -> String {
self.handler_name.to_string()
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
if self.handler_name == "inactivity_scores" {
// These tests were added in v1.7.0-alpha.2 and are available for Altair and later.
fork_name.altair_enabled()
} else {
true
}
}
}
#[derive(Educe)]
@@ -726,6 +725,11 @@ impl<E: EthSpec + TypeName> Handler for ForkChoiceHandler<E> {
// run them with fake crypto.
cfg!(not(feature = "fake_crypto"))
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas fork choice tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -755,6 +759,11 @@ impl<E: EthSpec + TypeName> Handler for OptimisticSyncHandler<E> {
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.bellatrix_enabled() && cfg!(not(feature = "fake_crypto"))
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas optimistic sync tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -975,6 +984,11 @@ impl<E: EthSpec> Handler for KZGComputeCellsHandler<E> {
fn handler_name(&self) -> String {
"compute_cells".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -995,6 +1009,11 @@ impl<E: EthSpec> Handler for KZGComputeCellsAndKZGProofHandler<E> {
fn handler_name(&self) -> String {
"compute_cells_and_kzg_proofs".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1015,6 +1034,11 @@ impl<E: EthSpec> Handler for KZGVerifyCellKZGProofBatchHandler<E> {
fn handler_name(&self) -> String {
"verify_cell_kzg_proof_batch".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1035,6 +1059,11 @@ impl<E: EthSpec> Handler for KZGRecoverCellsAndKZGProofHandler<E> {
fn handler_name(&self) -> String {
"recover_cells_and_kzg_proofs".into()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1059,6 +1088,11 @@ impl<E: EthSpec + TypeName> Handler for KzgInclusionMerkleProofValidityHandler<E
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.deneb_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas KZG merkle proof tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1083,6 +1117,11 @@ impl<E: EthSpec + TypeName> Handler for MerkleProofValidityHandler<E> {
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
fork_name.altair_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas light client tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1108,6 +1147,11 @@ impl<E: EthSpec + TypeName> Handler for LightClientUpdateHandler<E> {
// Enabled in Altair
fork_name.altair_enabled()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): remove once we have Gloas light client tests
vec![ForkName::Gloas]
}
}
#[derive(Educe)]
@@ -1128,19 +1172,6 @@ impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O>
fn handler_name(&self) -> String {
O::handler_name()
}
fn disabled_forks(&self) -> Vec<ForkName> {
// TODO(gloas): Can be removed once we enable Gloas on all tests
vec![]
}
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
// TODO(gloas): So far only withdrawals tests are enabled for Gloas.
Self::Case::is_enabled_for_fork(fork_name)
&& (!fork_name.gloas_enabled()
|| self.handler_name() == "withdrawals"
|| self.handler_name() == "attestation")
}
}
#[derive(Educe)]

View File

@@ -1,11 +1,11 @@
pub use case_result::CaseResult;
pub use cases::WithdrawalsPayload;
pub use cases::{
Case, EffectiveBalanceUpdates, Eth1DataReset, FeatureName, HistoricalRootsUpdate,
HistoricalSummariesUpdate, InactivityUpdates, JustificationAndFinalization,
ParticipationFlagUpdates, ParticipationRecordUpdates, PendingBalanceDeposits,
PendingConsolidations, ProposerLookahead, RandaoMixesReset, RegistryUpdates,
RewardsAndPenalties, Slashings, SlashingsReset, SyncCommitteeUpdates,
BuilderPendingPayments, Case, EffectiveBalanceUpdates, Eth1DataReset, ExecutionPayloadBidBlock,
FeatureName, HistoricalRootsUpdate, HistoricalSummariesUpdate, InactivityUpdates,
JustificationAndFinalization, ParticipationFlagUpdates, ParticipationRecordUpdates,
PendingBalanceDeposits, PendingConsolidations, ProposerLookahead, RandaoMixesReset,
RegistryUpdates, RewardsAndPenalties, Slashings, SlashingsReset, SyncCommitteeUpdates,
WithdrawalsPayload,
};
pub use decode::log_file_access;
pub use error::Error;

View File

@@ -87,6 +87,24 @@ fn operations_execution_payload_blinded() {
OperationsHandler::<MainnetEthSpec, BeaconBlockBody<_, BlindedPayload<_>>>::default().run();
}
#[test]
fn operations_execution_payload_envelope() {
OperationsHandler::<MinimalEthSpec, SignedExecutionPayloadEnvelope<_>>::default().run();
OperationsHandler::<MainnetEthSpec, SignedExecutionPayloadEnvelope<_>>::default().run();
}
#[test]
fn operations_execution_payload_bid() {
OperationsHandler::<MinimalEthSpec, ExecutionPayloadBidBlock<_>>::default().run();
OperationsHandler::<MainnetEthSpec, ExecutionPayloadBidBlock<_>>::default().run();
}
#[test]
fn operations_payload_attestation() {
OperationsHandler::<MinimalEthSpec, PayloadAttestation<_>>::default().run();
OperationsHandler::<MainnetEthSpec, PayloadAttestation<_>>::default().run();
}
#[test]
fn operations_withdrawals() {
OperationsHandler::<MinimalEthSpec, WithdrawalsPayload<_>>::default().run();
@@ -94,7 +112,7 @@ fn operations_withdrawals() {
}
#[test]
fn operations_withdrawal_reqeusts() {
fn operations_withdrawal_requests() {
OperationsHandler::<MinimalEthSpec, WithdrawalRequest>::default().run();
OperationsHandler::<MainnetEthSpec, WithdrawalRequest>::default().run();
}
@@ -942,6 +960,12 @@ fn epoch_processing_proposer_lookahead() {
EpochProcessingHandler::<MainnetEthSpec, ProposerLookahead>::default().run();
}
#[test]
fn epoch_processing_builder_pending_payments() {
EpochProcessingHandler::<MinimalEthSpec, BuilderPendingPayments>::default().run();
EpochProcessingHandler::<MainnetEthSpec, BuilderPendingPayments>::default().run();
}
#[test]
fn fork_upgrade() {
ForkHandler::<MinimalEthSpec>::default().run();
@@ -1095,7 +1119,7 @@ fn kzg_inclusion_merkle_proof_validity() {
#[test]
fn rewards() {
for handler in &["basic", "leak", "random"] {
for handler in &["basic", "leak", "random", "inactivity_scores"] {
RewardsHandler::<MinimalEthSpec>::new(handler).run();
RewardsHandler::<MainnetEthSpec>::new(handler).run();
}