Skip to content

Commit

Permalink
Update EF tests to spec v1.5.0-beta.2 (#6958)
Browse files Browse the repository at this point in the history
Update spec tests for recent v1.5.0-beta.2 release. There are no substantial changes for Electra and earlier, and the Fulu test updates to be made are tracked here:

- #6957


  - Add `SingleAttestation` SSZ tests
- Add new `deposit_with_reorg` fork choice tests
- Update tag to v1.5.0-beta.2
- Ignore Fulu tests
  • Loading branch information
michaelsproul authored Feb 10, 2025
1 parent f35213e commit ceb5ecf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion testing/ef_tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TESTS_TAG := v1.5.0-beta.1
TESTS_TAG := v1.5.0-beta.2
TESTS = general minimal mainnet
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))

Expand Down
5 changes: 2 additions & 3 deletions testing/ef_tests/check_all_files_accessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@
"bls12-381-tests/hash_to_G2",
"tests/.*/eip6110",
"tests/.*/whisk",
# TODO(electra): SingleAttestation tests are waiting on Eitan's PR
"tests/.*/electra/ssz_static/SingleAttestation",
"tests/.*/fulu/ssz_static/SingleAttestation",
# TODO(das): Fulu tests are ignored for now
"tests/.*/fulu",
"tests/.*/fulu/ssz_static/MatrixEntry",
]

Expand Down
5 changes: 5 additions & 0 deletions testing/ef_tests/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ impl<E: EthSpec + TypeName> Handler for ForkChoiceHandler<E> {
return false;
}

// Deposit tests exist only after Electra.
if self.handler_name == "deposit_with_reorg" && !fork_name.electra_enabled() {
return false;
}

// These tests check block validity (which may include signatures) and there is no need to
// run them with fake crypto.
cfg!(not(feature = "fake_crypto"))
Expand Down
1 change: 1 addition & 0 deletions testing/ef_tests/src/type_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ type_name!(SignedBeaconBlockHeader);
type_name_generic!(SignedContributionAndProof);
type_name!(SignedVoluntaryExit);
type_name!(SigningData);
type_name!(SingleAttestation);
type_name_generic!(SyncCommitteeContribution);
type_name!(SyncCommitteeMessage);
type_name!(SyncAggregatorSelectionData);
Expand Down
12 changes: 12 additions & 0 deletions testing/ef_tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ mod ssz_static {
.run();
}

#[test]
fn single_attestation() {
SszStaticHandler::<SingleAttestation, MinimalEthSpec>::electra_and_later().run();
SszStaticHandler::<SingleAttestation, MainnetEthSpec>::electra_and_later().run();
}

#[test]
fn attester_slashing() {
SszStaticHandler::<AttesterSlashingBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra()
Expand Down Expand Up @@ -880,6 +886,12 @@ fn fork_choice_get_proposer_head() {
ForkChoiceHandler::<MainnetEthSpec>::new("get_proposer_head").run();
}

#[test]
fn fork_choice_deposit_with_reorg() {
ForkChoiceHandler::<MinimalEthSpec>::new("deposit_with_reorg").run();
// There is no mainnet variant for this test.
}

#[test]
fn optimistic_sync() {
OptimisticSyncHandler::<MinimalEthSpec>::default().run();
Expand Down

0 comments on commit ceb5ecf

Please sign in to comment.