mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Run all ssz_static tests for Gloas (#8755)
- Ensure all ssz_static tests are running and passing for Gloas 🎉 - Refine file ignores for Gloas EF tests Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -47,8 +47,38 @@ 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/attestation/.*",
|
||||
"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/.*",
|
||||
"tests/.*/gloas/fork_choice/.*",
|
||||
"tests/.*/gloas/networking/.*",
|
||||
"tests/.*/gloas/rewards/.*",
|
||||
"tests/.*/gloas/sanity/.*",
|
||||
"tests/.*/gloas/transition/.*",
|
||||
# Ignore MatrixEntry SSZ tests for now.
|
||||
"tests/.*/fulu/ssz_static/MatrixEntry/.*",
|
||||
"tests/.*/.*/ssz_static/MatrixEntry/.*",
|
||||
# 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.
|
||||
"tests/.*/gloas/ssz_static/ExecutionPayloadHeader/.*",
|
||||
# ForkChoiceNode is internal to fork choice and probably doesn't need SSZ tests.
|
||||
"tests/.*/gloas/ssz_static/ForkChoiceNode/.*",
|
||||
# EIP-7916 is still in draft and hasn't been implemented yet https://eips.ethereum.org/EIPS/eip-7916
|
||||
"tests/general/phase0/ssz_generic/progressive_bitlist",
|
||||
"tests/general/phase0/ssz_generic/basic_progressive_list",
|
||||
@@ -61,8 +91,6 @@ excluded_paths = [
|
||||
"tests/.*/.*/epoch_processing/.*/post_epoch.ssz_snappy",
|
||||
# Ignore inactivity_scores tests for now (should implement soon).
|
||||
"tests/.*/.*/rewards/inactivity_scores/.*",
|
||||
# Ignore gloas tests for now
|
||||
"tests/.*/gloas/.*",
|
||||
# Ignore KZG tests that target internal kzg library functions
|
||||
"tests/.*/compute_verify_cell_kzg_proof_batch_challenge/.*",
|
||||
"tests/.*/compute_challenge/.*",
|
||||
|
||||
@@ -422,6 +422,11 @@ 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>
|
||||
@@ -444,6 +449,11 @@ 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)
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@ type_name!(DepositData);
|
||||
type_name!(DepositMessage);
|
||||
type_name!(DepositRequest);
|
||||
type_name!(Eth1Data);
|
||||
type_name!(Builder);
|
||||
type_name!(BuilderPendingPayment);
|
||||
type_name!(BuilderPendingWithdrawal);
|
||||
type_name!(WithdrawalRequest);
|
||||
type_name_generic!(ExecutionPayload);
|
||||
type_name_generic!(ExecutionPayloadBellatrix, "ExecutionPayload");
|
||||
@@ -90,6 +93,8 @@ type_name_generic!(ExecutionPayloadHeaderFulu, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadBid);
|
||||
type_name_generic!(SignedExecutionPayloadBid);
|
||||
type_name_generic!(ExecutionRequests);
|
||||
type_name_generic!(ExecutionPayloadEnvelope);
|
||||
type_name_generic!(SignedExecutionPayloadEnvelope);
|
||||
type_name_generic!(BlindedPayload, "ExecutionPayloadHeader");
|
||||
type_name!(Fork);
|
||||
type_name!(ForkData);
|
||||
@@ -97,6 +102,7 @@ type_name_generic!(HistoricalBatch);
|
||||
type_name_generic!(IndexedAttestation);
|
||||
type_name_generic!(IndexedAttestationBase, "IndexedAttestation");
|
||||
type_name_generic!(IndexedAttestationElectra, "IndexedAttestation");
|
||||
type_name_generic!(IndexedPayloadAttestation);
|
||||
type_name_generic!(LightClientBootstrap);
|
||||
type_name_generic!(LightClientBootstrapAltair, "LightClientBootstrap");
|
||||
type_name_generic!(LightClientBootstrapCapella, "LightClientBootstrap");
|
||||
@@ -149,10 +155,15 @@ type_name_generic!(LightClientUpdateDeneb, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateElectra, "LightClientUpdate");
|
||||
type_name_generic!(LightClientUpdateFulu, "LightClientUpdate");
|
||||
type_name_generic!(PendingAttestation);
|
||||
type_name_generic!(PayloadAttestation);
|
||||
type_name!(PayloadAttestationData);
|
||||
type_name!(PayloadAttestationMessage);
|
||||
type_name!(PendingConsolidation);
|
||||
type_name!(PendingPartialWithdrawal);
|
||||
type_name!(PendingDeposit);
|
||||
type_name!(ProposerSlashing);
|
||||
type_name!(ProposerPreferences);
|
||||
type_name!(SignedProposerPreferences);
|
||||
type_name_generic!(SignedAggregateAndProof);
|
||||
type_name_generic!(SignedAggregateAndProofBase, "SignedAggregateAndProof");
|
||||
type_name_generic!(SignedAggregateAndProofElectra, "SignedAggregateAndProof");
|
||||
|
||||
@@ -241,9 +241,12 @@ mod ssz_static {
|
||||
use ef_tests::{Handler, SszStaticHandler, SszStaticTHCHandler, SszStaticWithSpecHandler};
|
||||
use types::state::HistoricalSummary;
|
||||
use types::{
|
||||
AttesterSlashingBase, AttesterSlashingElectra, ConsolidationRequest, DataColumnSidecarFulu,
|
||||
DataColumnSidecarGloas, DepositRequest, LightClientBootstrapAltair, PendingDeposit,
|
||||
PendingPartialWithdrawal, WithdrawalRequest, *,
|
||||
AttesterSlashingBase, AttesterSlashingElectra, Builder, BuilderPendingPayment,
|
||||
BuilderPendingWithdrawal, ConsolidationRequest, DepositRequest, ExecutionPayloadBid,
|
||||
ExecutionPayloadEnvelope, IndexedPayloadAttestation, LightClientBootstrapAltair,
|
||||
PayloadAttestation, PayloadAttestationData, PayloadAttestationMessage, PendingDeposit,
|
||||
PendingPartialWithdrawal, SignedExecutionPayloadBid, SignedExecutionPayloadEnvelope,
|
||||
WithdrawalRequest, *,
|
||||
};
|
||||
|
||||
ssz_static_test!(attestation_data, AttestationData);
|
||||
@@ -600,7 +603,7 @@ mod ssz_static {
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadFulu<MinimalEthSpec>, MinimalEthSpec>::fulu_only().run();
|
||||
SszStaticHandler::<ExecutionPayloadFulu<MainnetEthSpec>, MainnetEthSpec>::fulu_only().run();
|
||||
SszStaticHandler::<ExecutionPayloadGloas<MainnetEthSpec>, MainnetEthSpec>::gloas_only()
|
||||
SszStaticHandler::<ExecutionPayloadGloas<MinimalEthSpec>, MinimalEthSpec>::gloas_only()
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadGloas<MainnetEthSpec>, MainnetEthSpec>::gloas_only()
|
||||
.run();
|
||||
@@ -749,6 +752,81 @@ mod ssz_static {
|
||||
SszStaticHandler::<ExecutionRequests<MinimalEthSpec>, MinimalEthSpec>::electra_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
// Gloas and later
|
||||
#[test]
|
||||
fn builder() {
|
||||
SszStaticHandler::<Builder, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<Builder, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn builder_pending_payment() {
|
||||
SszStaticHandler::<BuilderPendingPayment, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<BuilderPendingPayment, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn builder_pending_withdrawal() {
|
||||
SszStaticHandler::<BuilderPendingWithdrawal, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<BuilderPendingWithdrawal, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn payload_attestation_data() {
|
||||
SszStaticHandler::<PayloadAttestationData, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<PayloadAttestationData, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn payload_attestation() {
|
||||
SszStaticHandler::<PayloadAttestation<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
SszStaticHandler::<PayloadAttestation<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn payload_attestation_message() {
|
||||
SszStaticHandler::<PayloadAttestationMessage, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<PayloadAttestationMessage, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn indexed_payload_attestation() {
|
||||
SszStaticHandler::<IndexedPayloadAttestation<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
SszStaticHandler::<IndexedPayloadAttestation<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn execution_payload_envelope() {
|
||||
SszStaticHandler::<ExecutionPayloadEnvelope<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadEnvelope<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_execution_payload_envelope() {
|
||||
SszStaticHandler::<SignedExecutionPayloadEnvelope<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
SszStaticHandler::<SignedExecutionPayloadEnvelope<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proposer_preferences() {
|
||||
SszStaticHandler::<ProposerPreferences, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<ProposerPreferences, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_proposer_preferences() {
|
||||
SszStaticHandler::<SignedProposerPreferences, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<SignedProposerPreferences, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user