-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Electra: (partial) spectests (#13977)
* Electra epoch transition, re-exports only * Buildable electra spectests Fix minimal tests that are passing on mainnet * Skip failing tests
- Loading branch information
1 parent
7cbb3c2
commit a226fc8
Showing
106 changed files
with
2,525 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package electra | ||
|
||
import ( | ||
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/altair" | ||
e "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epoch" | ||
) | ||
|
||
// Re-exports for methods that haven't changed in Electra. | ||
var ( | ||
InitializePrecomputeValidators = altair.InitializePrecomputeValidators | ||
ProcessEpochParticipation = altair.ProcessEpochParticipation | ||
ProcessInactivityScores = altair.ProcessInactivityScores | ||
ProcessRewardsAndPenaltiesPrecompute = altair.ProcessRewardsAndPenaltiesPrecompute | ||
ProcessSlashings = e.ProcessSlashings | ||
ProcessEth1DataReset = e.ProcessEth1DataReset | ||
ProcessSlashingsReset = e.ProcessSlashingsReset | ||
ProcessRandaoMixesReset = e.ProcessRandaoMixesReset | ||
ProcessHistoricalDataUpdate = e.ProcessHistoricalDataUpdate | ||
ProcessParticipationFlagUpdates = altair.ProcessParticipationFlagUpdates | ||
ProcessSyncCommitteeUpdates = altair.ProcessSyncCommitteeUpdates | ||
AttestationsDelta = altair.AttestationsDelta | ||
ProcessSyncAggregate = altair.ProcessSyncAggregate | ||
) |
20 changes: 20 additions & 0 deletions
20
testing/spectest/mainnet/electra/epoch_processing/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
srcs = [ | ||
"eth1_data_reset_test.go", | ||
"historical_summaries_update_test.go", | ||
"inactivity_updates_test.go", | ||
"justification_and_finalization_test.go", | ||
"participation_flag_updates_test.go", | ||
"randao_mixes_reset_test.go", | ||
"rewards_and_penalties_test.go", | ||
"slashings_reset_test.go", | ||
"slashings_test.go", | ||
], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
deps = ["//testing/spectest/shared/electra/epoch_processing:go_default_library"], | ||
) |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/eth1_data_reset_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_Eth1DataReset(t *testing.T) { | ||
epoch_processing.RunEth1DataResetTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/historical_summaries_update_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_HistoricalSummariesUpdate(t *testing.T) { | ||
epoch_processing.RunHistoricalSummariesUpdateTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/inactivity_updates_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_InactivityUpdates(t *testing.T) { | ||
epoch_processing.RunInactivityUpdatesTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/justification_and_finalization_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_JustificationAndFinalization(t *testing.T) { | ||
epoch_processing.RunJustificationAndFinalizationTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/participation_flag_updates_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_ParticipationFlag(t *testing.T) { | ||
epoch_processing.RunParticipationFlagUpdatesTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/randao_mixes_reset_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_RandaoMixesReset(t *testing.T) { | ||
epoch_processing.RunRandaoMixesResetTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/rewards_and_penalties_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_RewardsAndPenalties(t *testing.T) { | ||
epoch_processing.RunRewardsAndPenaltiesTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/slashings_reset_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_SlashingsReset(t *testing.T) { | ||
epoch_processing.RunSlashingsResetTests(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/epoch_processing/slashings_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package epoch_processing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/epoch_processing" | ||
) | ||
|
||
func TestMainnet_Electra_EpochProcessing_Slashings(t *testing.T) { | ||
epoch_processing.RunSlashingsTests(t, "mainnet") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
size = "medium", | ||
timeout = "short", | ||
srcs = ["finality_test.go"], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
shard_count = 4, | ||
tags = ["spectest"], | ||
deps = ["//testing/spectest/shared/electra/finality:go_default_library"], | ||
) |
12 changes: 12 additions & 0 deletions
12
testing/spectest/mainnet/electra/finality/finality_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package finality | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/finality" | ||
) | ||
|
||
func TestMainnet_Electra_Finality(t *testing.T) { | ||
t.Skip("TODO: Electra") | ||
finality.RunFinalityTest(t, "mainnet") | ||
} |
12 changes: 12 additions & 0 deletions
12
testing/spectest/mainnet/electra/fork_transition/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
size = "small", | ||
srcs = ["transition_test.go"], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
tags = ["spectest"], | ||
deps = ["//testing/spectest/shared/electra/fork:go_default_library"], | ||
) |
12 changes: 12 additions & 0 deletions
12
testing/spectest/mainnet/electra/fork_transition/transition_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package fork_transition | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/fork" | ||
) | ||
|
||
func TestMainnet_Electra_Transition(t *testing.T) { | ||
t.Skip("TODO: Electra") | ||
fork.RunForkTransitionTest(t, "mainnet") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
size = "enormous", | ||
timeout = "short", | ||
srcs = ["forkchoice_test.go"], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
tags = ["spectest"], | ||
deps = [ | ||
"//runtime/version:go_default_library", | ||
"//testing/spectest/shared/common/forkchoice:go_default_library", | ||
], | ||
) |
13 changes: 13 additions & 0 deletions
13
testing/spectest/mainnet/electra/forkchoice/forkchoice_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package forkchoice | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/runtime/version" | ||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/common/forkchoice" | ||
) | ||
|
||
func TestMainnet_Electra_Forkchoice(t *testing.T) { | ||
t.Skip("TODO: Electra") | ||
forkchoice.Run(t, "mainnet", version.Electra) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
srcs = ["merkle_proof_test.go"], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
tags = ["spectest"], | ||
deps = ["//testing/spectest/shared/electra/merkle_proof:go_default_library"], | ||
) |
12 changes: 12 additions & 0 deletions
12
testing/spectest/mainnet/electra/merkle_proof/merkle_proof_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package merkle_proof | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/merkle_proof" | ||
) | ||
|
||
func TestMainnet_Electra_MerkleProof(t *testing.T) { | ||
t.Skip("TODO: Electra") // These spectests are missing? | ||
merkle_proof.RunMerkleProofTests(t, "mainnet") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
load("@prysm//tools/go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
srcs = [ | ||
"attester_slashing_test.go", | ||
"block_header_test.go", | ||
"bls_to_execution_change_test.go", | ||
"execution_payload_test.go", | ||
"proposer_slashing_test.go", | ||
"sync_committee_test.go", | ||
"voluntary_exit_test.go", | ||
"withdrawals_test.go", | ||
], | ||
data = glob(["*.yaml"]) + [ | ||
"@consensus_spec_tests_mainnet//:test_data", | ||
], | ||
deps = ["//testing/spectest/shared/electra/operations:go_default_library"], | ||
) |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/attester_slashing_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_AttesterSlashing(t *testing.T) { | ||
operations.RunAttesterSlashingTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/block_header_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_BlockHeader(t *testing.T) { | ||
operations.RunBlockHeaderTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/bls_to_execution_change_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_BLSToExecutionChange(t *testing.T) { | ||
operations.RunBLSToExecutionChangeTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/execution_payload_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_PayloadExecution(t *testing.T) { | ||
operations.RunExecutionPayloadTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/proposer_slashing_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_ProposerSlashing(t *testing.T) { | ||
operations.RunProposerSlashingTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/sync_committee_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_SyncCommittee(t *testing.T) { | ||
operations.RunSyncCommitteeTest(t, "mainnet") | ||
} |
12 changes: 12 additions & 0 deletions
12
testing/spectest/mainnet/electra/operations/voluntary_exit_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_VoluntaryExit(t *testing.T) { | ||
t.Skip("TODO: Electra") | ||
operations.RunVoluntaryExitTest(t, "mainnet") | ||
} |
11 changes: 11 additions & 0 deletions
11
testing/spectest/mainnet/electra/operations/withdrawals_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package operations | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/prysmaticlabs/prysm/v5/testing/spectest/shared/electra/operations" | ||
) | ||
|
||
func TestMainnet_Electra_Operations_Withdrawals(t *testing.T) { | ||
operations.RunWithdrawalsTest(t, "mainnet") | ||
} |
Oops, something went wrong.