Skip to content

Commit be02708

Browse files
authored
fix: skipped spec tests in electra (#1427)
1 parent 68dec8f commit be02708

File tree

14 files changed

+9
-341
lines changed

14 files changed

+9
-341
lines changed

test/spec/runners/bls.ex

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@ defmodule BlsTestRunner do
66
use ExUnit.CaseTemplate
77
use TestRunner
88

9-
# Remove handler from here once you implement the corresponding functions
10-
@disabled_handlers [
11-
# "sign",
12-
# "verify",
13-
# "aggregate",
14-
# "fast_aggregate_verify",
15-
# "aggregate_verify",
16-
# "eth_aggregate_pubkeys"
17-
# "eth_fast_aggregate_verify"
18-
]
19-
20-
@impl TestRunner
21-
def skip?(%SpecTestCase{} = testcase) do
22-
Enum.member?(@disabled_handlers, testcase.handler)
23-
end
24-
259
@impl TestRunner
2610
def run_test_case(%SpecTestCase{} = testcase) do
2711
case_dir = SpecTestCase.dir(testcase)

test/spec/runners/epoch_processing.ex

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,9 @@ defmodule EpochProcessingTestRunner do
99
use ExUnit.CaseTemplate
1010
use TestRunner
1111

12-
# Remove handler from here once you implement the corresponding functions
12+
# TODO: We need to make sure this 2 are still needed to be here
1313
@disabled_handlers [
14-
# "justification_and_finalization",
15-
# "inactivity_updates",
16-
# "rewards_and_penalties",
17-
# "registry_updates",
18-
# "slashings",
19-
# "effective_balance_updates",
20-
# "eth1_data_reset",
21-
# "slashings_reset",
22-
# "randao_mixes_reset",
23-
# "historical_summaries_update",
2414
"participation_record_updates"
25-
26-
# "participation_flag_updates",
27-
# "sync_committee_updates"
2815
]
2916

3017
@deprecated_handlers [
@@ -36,10 +23,7 @@ defmodule EpochProcessingTestRunner do
3623
Enum.member?(@disabled_handlers ++ @deprecated_handlers, handler)
3724
end
3825

39-
@impl TestRunner
40-
def skip?(%SpecTestCase{fork: "deneb"}), do: false
41-
def skip?(%SpecTestCase{fork: "electra"}), do: false
42-
def skip?(_), do: true
26+
def skip?(_), do: false
4327

4428
@impl TestRunner
4529
def run_test_case(%SpecTestCase{} = testcase) do

test/spec/runners/finality.ex

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@ defmodule FinalityTestRunner do
66
use ExUnit.CaseTemplate
77
use TestRunner
88

9-
@disabled_cases [
10-
# "finality_no_updates_at_genesis",
11-
# "finality_rule_1",
12-
# "finality_rule_2",
13-
# "finality_rule_3",
14-
# "finality_rule_4"
15-
]
16-
17-
@impl TestRunner
18-
def skip?(%SpecTestCase{fork: "capella", case: testcase}) do
19-
Enum.member?(@disabled_cases, testcase)
20-
end
21-
22-
@impl TestRunner
23-
def skip?(%SpecTestCase{fork: "deneb", case: testcase}) do
24-
Enum.member?(@disabled_cases, testcase)
25-
end
26-
27-
@impl TestRunner
28-
def skip?(_), do: true
29-
309
@impl TestRunner
3110
def run_test_case(testcase) do
3211
Helpers.ProcessBlocks.process_blocks(testcase)

test/spec/runners/fork_choice.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ defmodule ForkChoiceTestRunner do
2323
:ok
2424
end
2525

26-
@impl TestRunner
27-
def skip?(%SpecTestCase{fork: "capella"}), do: false
28-
def skip?(%SpecTestCase{fork: "deneb"}), do: false
29-
def skip?(%SpecTestCase{fork: "electra"}), do: false
30-
def skip?(_testcase), do: true
31-
3226
@impl TestRunner
3327
def run_test_case(testcase) do
3428
case_dir = SpecTestCase.dir(testcase)

test/spec/runners/kzg.ex

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ defmodule KzgTestRunner do
66
use ExUnit.CaseTemplate
77
use TestRunner
88

9-
# Remove handler from here once you implement the corresponding functions
10-
@disabled_handlers [
11-
# "blob_to_kzg_commitment"
12-
# "compute_kzg_proof",
13-
# "verify_kzg_proof",
14-
# "compute_blob_kzg_proof",
15-
# "verify_blob_kzg_proof",
16-
# "verify_blob_kzg_proof_batch"
17-
]
18-
19-
@impl TestRunner
20-
def skip?(%SpecTestCase{} = testcase) do
21-
Enum.member?(@disabled_handlers, testcase.handler)
22-
end
23-
249
@impl TestRunner
2510
def run_test_case(%SpecTestCase{} = testcase) do
2611
case_dir = SpecTestCase.dir(testcase)

test/spec/runners/light_client.ex

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@ defmodule LightClientTestRunner do
1919
Enum.member?(@disabled_handlers, testcase.handler)
2020
end
2121

22-
def skip?(%SpecTestCase{fork: "deneb"} = _testcase) do
23-
# TODO: all of them fail
24-
true
25-
end
26-
27-
@impl TestRunner
28-
def skip?(_testcase) do
29-
true
30-
end
22+
# TODO: We didn't implement lightclient functions yet
23+
def skip?(%SpecTestCase{fork: fork}) when fork in ["deneb", "electra"], do: true
3124

3225
@impl TestRunner
3326
def run_test_case(%SpecTestCase{} = testcase) do

test/spec/runners/operations.ex

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -53,49 +53,6 @@ defmodule OperationsTestRunner do
5353
# "deposit_receipt" => "deposit_receipt" Not yet implemented
5454
}
5555

56-
# Remove handler from here once you implement the corresponding functions
57-
# "deposit_receipt" handler is not yet implemented
58-
@disabled_handlers [
59-
# "attester_slashing",
60-
# "attestation",
61-
# "block_header",
62-
# "deposit",
63-
# "proposer_slashing",
64-
# "voluntary_exit",
65-
# "sync_aggregate",
66-
# "execution_payload",
67-
# "withdrawals",
68-
# "bls_to_execution_change"
69-
]
70-
71-
@disabled_handlers_deneb [
72-
# "attester_slashing",
73-
# "attestation",
74-
# "block_header",
75-
# "deposit",
76-
# "proposer_slashing",
77-
# "voluntary_exit"
78-
# "sync_aggregate",
79-
# "execution_payload",
80-
# "withdrawals",
81-
# "bls_to_execution_change"
82-
]
83-
84-
@impl TestRunner
85-
def skip?(%SpecTestCase{fork: "capella", handler: handler}) do
86-
Enum.member?(@disabled_handlers, handler)
87-
end
88-
89-
@impl TestRunner
90-
def skip?(%SpecTestCase{fork: "deneb", handler: handler}) do
91-
Enum.member?(@disabled_handlers_deneb, handler)
92-
end
93-
94-
@impl TestRunner
95-
def skip?(_testcase) do
96-
true
97-
end
98-
9956
@impl TestRunner
10057
def run_test_case(%SpecTestCase{handler: handler} = testcase) do
10158
case_dir = SpecTestCase.dir(testcase) <> "/"

test/spec/runners/random.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ defmodule RandomTestRunner do
66
use ExUnit.CaseTemplate
77
use TestRunner
88

9-
@impl TestRunner
10-
def skip?(%SpecTestCase{fork: "capella"}), do: false
11-
def skip?(%SpecTestCase{fork: "deneb"}), do: false
12-
def skip?(%SpecTestCase{fork: "electra"}), do: false
13-
def skip?(_), do: true
14-
159
@impl TestRunner
1610
def run_test_case(testcase) do
1711
Helpers.ProcessBlocks.process_blocks(testcase)

test/spec/runners/rewards.ex

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ defmodule RewardsTestRunner do
66
use TestRunner
77
alias Types.BeaconState
88

9-
@disabled [
10-
# "basic",
11-
# "leak",
12-
# "random"
13-
]
14-
15-
@impl TestRunner
16-
def skip?(%SpecTestCase{fork: "capella", handler: handler}) do
17-
Enum.member?(@disabled, handler)
18-
end
19-
20-
def skip?(%SpecTestCase{fork: "deneb"}), do: false
21-
def skip?(%SpecTestCase{fork: "electra"}), do: false
22-
def skip?(_), do: true
23-
249
@impl TestRunner
2510
def run_test_case(%SpecTestCase{} = testcase) do
2611
case_dir = SpecTestCase.dir(testcase)

test/spec/runners/sanity.ex

Lines changed: 3 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -10,109 +10,17 @@ defmodule SanityTestRunner do
1010
alias LambdaEthereumConsensus.Utils.Diff
1111
alias Types.BeaconState
1212

13-
@disabled_block_cases [
14-
# "activate_and_partial_withdrawal_max_effective_balance",
15-
# "activate_and_partial_withdrawal_overdeposit",
16-
# "attestation",
17-
# "attester_slashing",
18-
# "balance_driven_status_transitions",
19-
# "bls_change",
20-
# "deposit_and_bls_change",
21-
# "deposit_in_block",
22-
# "deposit_top_up",
23-
# "duplicate_attestation_same_block",
24-
# "invalid_is_execution_enabled_false",
25-
# "empty_block_transition",
26-
# "empty_block_transition_large_validator_set",
27-
# "empty_block_transition_no_tx",
28-
# "empty_block_transition_randomized_payload",
29-
# "empty_epoch_transition",
30-
# "empty_epoch_transition_large_validator_set",
31-
# "empty_epoch_transition_not_finalizing",
32-
# "eth1_data_votes_consensus",
33-
# "eth1_data_votes_no_consensus",
34-
# "exit_and_bls_change",
35-
# "full_random_operations_0",
36-
# "full_random_operations_1",
37-
# "full_random_operations_2",
38-
# "full_random_operations_3",
39-
# "full_withdrawal_in_epoch_transition",
40-
# "high_proposer_index",
41-
# "historical_batch",
42-
# "inactivity_scores_full_participation_leaking",
43-
# "inactivity_scores_leaking",
44-
# "invalid_all_zeroed_sig",
45-
# "invalid_duplicate_attester_slashing_same_block",
46-
# "invalid_duplicate_bls_changes_same_block",
47-
# "invalid_duplicate_deposit_same_block",
48-
# "invalid_duplicate_proposer_slashings_same_block",
49-
# "invalid_duplicate_validator_exit_same_block",
50-
# "invalid_incorrect_block_sig",
51-
# "invalid_incorrect_proposer_index_sig_from_expected_proposer",
52-
# "invalid_incorrect_proposer_index_sig_from_proposer_index",
53-
# "invalid_incorrect_state_root",
54-
# "invalid_only_increase_deposit_count",
55-
# "invalid_parent_from_same_slot",
56-
# "invalid_prev_slot_block_transition",
57-
# "invalid_same_slot_block_transition",
58-
# "invalid_similar_proposer_slashings_same_block",
59-
# "invalid_two_bls_changes_of_different_addresses_same_validator_same_block",
60-
# "invalid_withdrawal_fail_second_block_payload_isnt_compatible",
61-
# "is_execution_enabled_false",
62-
# "many_partial_withdrawals_in_epoch_transition",
63-
# "multiple_attester_slashings_no_overlap",
64-
# "multiple_attester_slashings_partial_overlap",
65-
# "multiple_different_proposer_slashings_same_block",
66-
# "multiple_different_validator_exits_same_block",
67-
# "partial_withdrawal_in_epoch_transition",
68-
# "proposer_after_inactive_index",
69-
# "proposer_self_slashing",
70-
# "proposer_slashing",
71-
# "skipped_slots",
72-
# "slash_and_exit_diff_index",
73-
# "slash_and_exit_same_index"
74-
# "sync_committee_committee__empty",
75-
# "sync_committee_committee__full",
76-
# "sync_committee_committee__half",
77-
# "sync_committee_committee_genesis__empty",
78-
# "sync_committee_committee_genesis__full",
79-
# "sync_committee_committee_genesis__half",
80-
# "top_up_and_partial_withdrawable_validator",
81-
# "top_up_to_fully_withdrawn_validator",
82-
# "voluntary_exit",
83-
# "withdrawal_success_two_blocks"
84-
]
85-
13+
# TODO: We need to make sure this is still needed to be here
8614
@disabled_slot_cases [
87-
# "empty_epoch",
88-
# "slots_1",
89-
# "slots_2",
90-
# "over_epoch_boundary",
91-
# NOTE: too long to run in CI
92-
# TODO: optimize
9315
"historical_accumulator"
94-
95-
# "double_empty_epoch"
9616
]
9717

9818
@impl TestRunner
99-
def skip?(%SpecTestCase{fork: "capella", handler: "blocks", case: testcase}) do
100-
Enum.member?(@disabled_block_cases, testcase)
101-
end
102-
103-
def skip?(%SpecTestCase{fork: "capella", handler: "slots", case: testcase}) do
104-
Enum.member?(@disabled_slot_cases, testcase)
105-
end
106-
107-
def skip?(%SpecTestCase{fork: "deneb", handler: "blocks", case: testcase}) do
108-
Enum.member?(@disabled_block_cases, testcase)
109-
end
110-
111-
def skip?(%SpecTestCase{fork: "deneb", handler: "slots", case: testcase}) do
19+
def skip?(%SpecTestCase{handler: "slots", case: testcase}) do
11220
Enum.member?(@disabled_slot_cases, testcase)
11321
end
11422

115-
def skip?(_), do: true
23+
def skip?(_), do: false
11624

11725
@impl TestRunner
11826
def run_test_case(%SpecTestCase{handler: "slots"} = testcase) do

0 commit comments

Comments
 (0)