mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Implement inactivity scores ef tests unstable (#8807)
fixes issue #8750 This PR enables the inactivity_scores reward EF tests from v1.7.0-alpha.2. - Enabled Tests: Added the inactivity_scores handler to the rewards test suite. - Fork Filtering: Updated the runner to execute these tests only on supported forks (Altair onwards), preventing directory-not-found errors on earlier forks. - CI Coverage: Removed exclusions in the file access check script to ensures all new test vectors are fully tracked. Co-Authored-By: romeoscript <romeobourne211@gmail.com> Co-Authored-By: Eitan Seri-Levi <eserilev@gmail.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -70,8 +70,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/.*",
|
||||
|
||||
@@ -592,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)]
|
||||
|
||||
@@ -1113,7 +1113,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user