2022-07-06 13:03:30 +00:00
|
|
|
package endtoend
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
|
|
|
|
2023-03-17 18:52:56 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v4/config/params"
|
|
|
|
ev "github.com/prysmaticlabs/prysm/v4/testing/endtoend/evaluators"
|
|
|
|
e2eParams "github.com/prysmaticlabs/prysm/v4/testing/endtoend/params"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/testing/endtoend/types"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/testing/require"
|
2022-07-06 13:03:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestEndToEnd_Slasher_MinimalConfig(t *testing.T) {
|
2023-03-17 10:08:56 +00:00
|
|
|
t.Skip("E2E run appears broken, evaluators need to be rewritten most likely")
|
2022-07-06 13:03:30 +00:00
|
|
|
params.SetupTestConfigCleanup(t)
|
|
|
|
params.OverrideBeaconConfig(params.E2ETestConfig().Copy())
|
|
|
|
require.NoError(t, e2eParams.Init(t, e2eParams.StandardBeaconCount))
|
|
|
|
|
|
|
|
tracingPort := e2eParams.TestParams.Ports.JaegerTracingPort
|
|
|
|
tracingEndpoint := fmt.Sprintf("127.0.0.1:%d", tracingPort)
|
|
|
|
|
|
|
|
testConfig := &types.E2EConfig{
|
|
|
|
BeaconFlags: []string{
|
|
|
|
"--slasher",
|
|
|
|
},
|
|
|
|
ValidatorFlags: []string{},
|
2023-03-15 19:15:46 +00:00
|
|
|
EpochsToRun: 6,
|
2022-07-06 13:03:30 +00:00
|
|
|
TestSync: false,
|
|
|
|
TestFeature: false,
|
|
|
|
TestDeposits: false,
|
|
|
|
Evaluators: []types.Evaluator{
|
|
|
|
ev.PeersConnect,
|
|
|
|
ev.HealthzCheck,
|
|
|
|
ev.ValidatorsSlashedAfterEpoch(4),
|
|
|
|
ev.SlashedValidatorsLoseBalanceAfterEpoch(4),
|
|
|
|
ev.InjectDoubleVoteOnEpoch(2),
|
|
|
|
ev.InjectDoubleBlockOnEpoch(2),
|
|
|
|
},
|
|
|
|
EvalInterceptor: defaultInterceptor,
|
|
|
|
TracingSinkEndpoint: tracingEndpoint,
|
|
|
|
}
|
|
|
|
|
|
|
|
newTestRunner(t, testConfig).run()
|
|
|
|
}
|