Skip to content

Commit

Permalink
Remove skip BLS verify flag (#7516)
Browse files Browse the repository at this point in the history
* Remove skip BLS verify flag

* Update tests to use correct values

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
terencechain and prylabs-bulldozer[bot] committed Oct 14, 2020
1 parent 88083d1 commit 5cd6f65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Disabled ssz cache")
cfg.EnableSSZCache = false
}
if ctx.Bool(skipBLSVerifyFlag.Name) {
log.Warn("UNSAFE: Skipping BLS verification at runtime")
cfg.SkipBLSVerify = true
}
if ctx.Bool(enableBackupWebhookFlag.Name) {
log.Warn("Allowing database backups to be triggered from HTTP webhook.")
cfg.EnableBackupWebhook = true
Expand Down
10 changes: 5 additions & 5 deletions shared/featureconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ import (

func TestInitFeatureConfig(t *testing.T) {
cfg := &Flags{
SkipBLSVerify: true,
MedallaTestnet: true,
}
Init(cfg)
c := Get()
assert.Equal(t, true, c.SkipBLSVerify)
assert.Equal(t, true, c.MedallaTestnet)

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

func TestConfigureBeaconConfig(t *testing.T) {
app := cli.App{}
set := flag.NewFlagSet("test", 0)
set.Bool(skipBLSVerifyFlag.Name, true, "test")
set.Bool(MedallaTestnet.Name, true, "test")
context := cli.NewContext(&app, set, nil)
ConfigureBeaconChain(context)
c := Get()
assert.Equal(t, true, c.SkipBLSVerify)
assert.Equal(t, true, c.MedallaTestnet)
}
5 changes: 0 additions & 5 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ var (
Name: "disable-ssz-cache",
Usage: "Disable ssz state root cache mechanism.",
}
skipBLSVerifyFlag = &cli.BoolFlag{
Name: "skip-bls-verify",
Usage: "Whether or not to skip BLS verification of signature at runtime, this is unsafe and should only be used for development",
}
enableBackupWebhookFlag = &cli.BoolFlag{
Name: "enable-db-backup-webhook",
Usage: "Serve HTTP handler to initiate database backups. The handler is served on the monitoring port at path /db/backup.",
Expand Down Expand Up @@ -230,7 +226,6 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableForkChoiceUnsafeFlag,
disableDynamicCommitteeSubnets,
disableSSZCache,
skipBLSVerifyFlag,
kafkaBootstrapServersFlag,
enableBackupWebhookFlag,
cacheFilteredBlockTreeFlag,
Expand Down

0 comments on commit 5cd6f65

Please sign in to comment.