Skip to content

Commit

Permalink
Remove remote slashing protection feature (#12989)
Browse files Browse the repository at this point in the history
* Remove remote slashing protection feature

* test fix

* remove mock from tests

---------

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
rkapka and prylabs-bulldozer[bot] authored Oct 4, 2023
1 parent cf1bfb9 commit f37301c
Show file tree
Hide file tree
Showing 38 changed files with 54 additions and 1,741 deletions.
34 changes: 0 additions & 34 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/BUILD.bazel

This file was deleted.

43 changes: 0 additions & 43 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/attestations.go

This file was deleted.

63 changes: 0 additions & 63 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/attestations_test.go

This file was deleted.

28 changes: 0 additions & 28 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/blocks.go

This file was deleted.

12 changes: 0 additions & 12 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/server.go

This file was deleted.

54 changes: 0 additions & 54 deletions beacon-chain/rpc/prysm/v1alpha1/slasher/server_test.go

This file was deleted.

1 change: 0 additions & 1 deletion beacon-chain/slasher/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ go_test(
"//beacon-chain/db/testing:go_default_library",
"//beacon-chain/forkchoice/doubly-linked-tree:go_default_library",
"//beacon-chain/operations/slashings/mock:go_default_library",
"//beacon-chain/slasher/mock:go_default_library",
"//beacon-chain/slasher/types:go_default_library",
"//beacon-chain/startup:go_default_library",
"//beacon-chain/state/stategen:go_default_library",
Expand Down
13 changes: 0 additions & 13 deletions beacon-chain/slasher/mock/BUILD.bazel

This file was deleted.

73 changes: 0 additions & 73 deletions beacon-chain/slasher/mock/mock_slashing_checker.go

This file was deleted.

2 changes: 0 additions & 2 deletions beacon-chain/slasher/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/prysmaticlabs/prysm/v4/async/event"
mock "github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain/testing"
dbtest "github.com/prysmaticlabs/prysm/v4/beacon-chain/db/testing"
mockslasher "github.com/prysmaticlabs/prysm/v4/beacon-chain/slasher/mock"
"github.com/prysmaticlabs/prysm/v4/beacon-chain/startup"
mockSync "github.com/prysmaticlabs/prysm/v4/beacon-chain/sync/initial-sync/testing"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
Expand All @@ -21,7 +20,6 @@ import (
)

var _ = SlashingChecker(&Service{})
var _ = SlashingChecker(&mockslasher.MockSlashingChecker{})

func TestMain(m *testing.M) {
logrus.SetLevel(logrus.DebugLevel)
Expand Down
7 changes: 0 additions & 7 deletions config/features/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const disabledFeatureFlag = "Disabled feature flag"
// Flags is a struct to represent which features the client will perform on runtime.
type Flags struct {
// Feature related flags.
RemoteSlasherProtection bool // RemoteSlasherProtection utilizes a beacon node with --slasher mode for validator slashing protection.
WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory.
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
DisableReorgLateBlocks bool // DisableReorgLateBlocks disables reorgs of late blocks.
Expand Down Expand Up @@ -269,12 +268,6 @@ func ConfigureValidator(ctx *cli.Context) error {
if err := configureTestnet(ctx); err != nil {
return err
}
if ctx.Bool(enableExternalSlasherProtectionFlag.Name) {
log.Fatal(
"Remote slashing protection has currently been disabled in Prysm due to safety concerns. " +
"We appreciate your understanding in our desire to keep Prysm validators safe.",
)
}
if ctx.Bool(writeWalletPasswordOnWebOnboarding.Name) {
logEnabled(writeWalletPasswordOnWebOnboarding)
cfg.WriteWalletPasswordOnWebOnboarding = true
Expand Down
4 changes: 0 additions & 4 deletions config/features/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ func TestInitFeatureConfig(t *testing.T) {
Init(cfg)
c := Get()
assert.Equal(t, true, c.EnableSlasher)

// Reset back to false for the follow up tests.
cfg = &Flags{RemoteSlasherProtection: false}
Init(cfg)
}

func TestInitWithReset(t *testing.T) {
Expand Down
Loading

0 comments on commit f37301c

Please sign in to comment.