From 32245a906246b8f152368120d932de032e98ac05 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Tue, 3 Dec 2019 10:46:04 -0800 Subject: [PATCH] Deprecate --init-sync-no-verify, make it the default (#4179) * deprecated --init-sync-no-verify, make it the default * Merge branch 'master' into deprecate-init-sync-verify-flag * add more flag info * Merge branch 'deprecate-init-sync-verify-flag' of github.com:prysmaticlabs/prysm into deprecate-init-sync-verify-flag * gofmt * Merge refs/heads/master into deprecate-init-sync-verify-flag * Merge refs/heads/master into deprecate-init-sync-verify-flag --- shared/featureconfig/config.go | 6 ++++-- shared/featureconfig/flags.go | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/shared/featureconfig/config.go b/shared/featureconfig/config.go index 44e205597c..35db5c9976 100644 --- a/shared/featureconfig/config.go +++ b/shared/featureconfig/config.go @@ -86,8 +86,10 @@ func ConfigureBeaconChain(ctx *cli.Context) { log.Warn("Enabled unsafe eth1 data vote cache") cfg.EnableEth1DataVoteCache = true } - if ctx.GlobalBool(InitSyncNoVerifyFlag.Name) { - log.Warn("Initial syncing without verifying block's contents") + if ctx.GlobalBool(initSyncVerifyEverythingFlag.Name) { + log.Warn("Initial syncing with verifying all block's content signatures.") + cfg.InitSyncNoVerify = false + } else { cfg.InitSyncNoVerify = true } if ctx.GlobalBool(NewCacheFlag.Name) { diff --git a/shared/featureconfig/flags.go b/shared/featureconfig/flags.go index 91e6ef3907..82e9e220b3 100644 --- a/shared/featureconfig/flags.go +++ b/shared/featureconfig/flags.go @@ -45,11 +45,6 @@ var ( Name: "enable-active-count-cache", Usage: "Enable unsafe cache mechanism. See https://github.com/prysmaticlabs/prysm/issues/3106", } - // InitSyncNoVerifyFlag enables the initial sync no verify configuration. - InitSyncNoVerifyFlag = cli.BoolFlag{ - Name: "init-sync-no-verify", - Usage: "Initial sync to finalized check point w/o verifying block's signature, RANDAO and attestation's aggregated signatures", - } // NewCacheFlag enables the node to use the new caching scheme. NewCacheFlag = cli.BoolFlag{ Name: "new-cache", @@ -81,6 +76,12 @@ var ( Name: "prune-states", Usage: "Prune epoch boundary states before last finalized check point", } + initSyncVerifyEverythingFlag = cli.BoolFlag{ + Name: "initial-sync-verify-all-signatures", + Usage: "Initial sync to finalized checkpoint with verifying block's signature, RANDAO " + + "and attestation's aggregated signatures. Without this flag, only the proposer " + + "signature is verified until the node reaches the end of the finalized chain.", + } ) // Deprecated flags list. @@ -112,6 +113,11 @@ var ( Usage: deprecatedUsage, Hidden: true, } + deprecatedInitSyncNoVerifyFlag = cli.BoolFlag{ + Name: "init-sync-no-verify", + Usage: deprecatedUsage, + Hidden: true, + } ) var deprecatedFlags = []cli.Flag{ @@ -120,6 +126,7 @@ var deprecatedFlags = []cli.Flag{ deprecatedScatterFlag, deprecatedPruneFinalizedStatesFlag, deprecatedOptimizeProcessEpoch, + deprecatedInitSyncNoVerifyFlag, } // ValidatorFlags contains a list of all the feature flags that apply to the validator client. @@ -134,7 +141,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{ writeSSZStateTransitionsFlag, EnableAttestationCacheFlag, EnableEth1DataVoteCacheFlag, - InitSyncNoVerifyFlag, + initSyncVerifyEverythingFlag, NewCacheFlag, SkipBLSVerifyFlag, enableBackupWebhookFlag,