Skip to content

Commit

Permalink
Fix SszStatic tests for PeerDAS: exclude eip7594 test vectors when …
Browse files Browse the repository at this point in the history
…testing Electra types.
  • Loading branch information
jimmygchen committed Dec 24, 2024
1 parent aa593cf commit ffbd25e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testing/ef_tests/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,19 @@ where
}

fn is_enabled_for_feature(&self, feature_name: FeatureName) -> bool {
// This ensures we only run the tests **once** for `Eip7594`, using the types matching the
// correct fork, e.g. `Eip7594` uses SSZ types from `Deneb` as of spec test version
// `v1.5.0-alpha.8`, therefore the `Eip7594` tests should get included when testing Deneb types.
//
// e.g. Eip7594 test vectors are executed in the first line below, but excluded in the 2nd
// line when testing the type `AttestationElectra`:
//
// ```
// SszStaticHandler::<AttestationBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra().run();
// SszStaticHandler::<AttestationElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only().run();
// ```
feature_name == FeatureName::Eip7594
&& self.supported_forks.contains(&feature_name.fork_name())
}
}

Expand Down

0 comments on commit ffbd25e

Please sign in to comment.