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>
This commit is contained in:
terence tsao 2020-10-13 17:53:17 -07:00 committed by GitHub
parent 88083d1000
commit 5cd6f65a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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,