2020-03-15 05:09:23 +00:00
|
|
|
package endtoend
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2021-09-21 19:59:25 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/config/params"
|
2021-09-15 14:42:05 +00:00
|
|
|
ev "github.com/prysmaticlabs/prysm/testing/endtoend/evaluators"
|
|
|
|
e2eParams "github.com/prysmaticlabs/prysm/testing/endtoend/params"
|
|
|
|
"github.com/prysmaticlabs/prysm/testing/endtoend/types"
|
2021-09-23 18:53:46 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/testing/require"
|
2020-03-15 05:09:23 +00:00
|
|
|
)
|
|
|
|
|
2021-09-30 20:28:14 +00:00
|
|
|
func TestEndToEnd_Slasher_MinimalConfig(t *testing.T) {
|
2020-05-26 19:04:42 +00:00
|
|
|
params.UseE2EConfig()
|
2020-08-25 15:23:06 +00:00
|
|
|
require.NoError(t, e2eParams.Init(e2eParams.StandardBeaconCount))
|
2020-03-15 05:09:23 +00:00
|
|
|
|
2021-03-26 03:15:58 +00:00
|
|
|
testConfig := &types.E2EConfig{
|
2021-09-30 20:28:14 +00:00
|
|
|
BeaconFlags: []string{
|
|
|
|
"--slasher",
|
|
|
|
},
|
2020-05-26 19:04:42 +00:00
|
|
|
ValidatorFlags: []string{},
|
2020-08-02 21:30:59 +00:00
|
|
|
EpochsToRun: 4,
|
2020-03-22 23:04:23 +00:00
|
|
|
TestSync: false,
|
2020-06-03 18:44:13 +00:00
|
|
|
TestDeposits: false,
|
2020-03-22 23:04:23 +00:00
|
|
|
Evaluators: []types.Evaluator{
|
2020-03-15 05:09:23 +00:00
|
|
|
ev.PeersConnect,
|
2020-04-15 21:20:58 +00:00
|
|
|
ev.HealthzCheck,
|
2021-09-30 20:28:14 +00:00
|
|
|
ev.ValidatorsSlashedAfterEpoch(4),
|
|
|
|
ev.SlashedValidatorsLoseBalanceAfterEpoch(4),
|
|
|
|
ev.InjectDoubleVoteOnEpoch(2),
|
|
|
|
ev.InjectDoubleBlockOnEpoch(2),
|
2020-03-15 05:09:23 +00:00
|
|
|
},
|
|
|
|
}
|
2020-03-31 15:15:33 +00:00
|
|
|
|
2021-03-26 03:15:58 +00:00
|
|
|
newTestRunner(t, testConfig).run()
|
2020-03-15 05:09:23 +00:00
|
|
|
}
|