Skip to content

Commit ffbd25e

Browse files
committed
Fix SszStatic tests for PeerDAS: exclude eip7594 test vectors when testing Electra types.
1 parent aa593cf commit ffbd25e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

testing/ef_tests/src/handler.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,19 @@ where
343343
}
344344

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

0 commit comments

Comments
 (0)