From 5cd6f65a2c7394e07d5da1d10d7770f5cdc7bb66 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Tue, 13 Oct 2020 17:53:17 -0700 Subject: [PATCH] Remove skip BLS verify flag (#7516) * 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> --- shared/featureconfig/config.go | 4 ---- shared/featureconfig/config_test.go | 10 +++++----- shared/featureconfig/flags.go | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/shared/featureconfig/config.go b/shared/featureconfig/config.go index f9d78dfec..ad8bab1fa 100644 --- a/shared/featureconfig/config.go +++ b/shared/featureconfig/config.go @@ -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 diff --git a/shared/featureconfig/config_test.go b/shared/featureconfig/config_test.go index a877a8985..e8909f60e 100644 --- a/shared/featureconfig/config_test.go +++ b/shared/featureconfig/config_test.go @@ -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) } diff --git a/shared/featureconfig/flags.go b/shared/featureconfig/flags.go index 866652642..238eada81 100644 --- a/shared/featureconfig/flags.go +++ b/shared/featureconfig/flags.go @@ -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.", @@ -230,7 +226,6 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{ disableForkChoiceUnsafeFlag, disableDynamicCommitteeSubnets, disableSSZCache, - skipBLSVerifyFlag, kafkaBootstrapServersFlag, enableBackupWebhookFlag, cacheFilteredBlockTreeFlag,