Opt out --use-check-point-cache (#7242)

* Make check point info cache an opt-out
* Typo
* Merge branch 'master' of github.com:prysmaticlabs/prysm into cp-cache-opt-out
This commit is contained in:
terence tsao
2020-09-15 10:14:04 -07:00
committed by GitHub
parent c1114fa6be
commit bb374362e4
2 changed files with 14 additions and 8 deletions

View File

@@ -265,9 +265,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Enabling roughtime sync")
cfg.EnableRoughtime = true
}
if ctx.Bool(checkPtInfoCache.Name) {
log.Warn("Using advance check point info cache")
cfg.UseCheckPointInfoCache = true
cfg.UseCheckPointInfoCache = true
if ctx.Bool(disableCheckPtInfoCache.Name) {
log.Warn("Disabling advanced check point info cache")
cfg.UseCheckPointInfoCache = false
}
Init(cfg)
}

View File

@@ -169,15 +169,14 @@ var (
Name: "enable-roughtime",
Usage: "Enables periodic roughtime syncs.",
}
checkPtInfoCache = &cli.BoolFlag{
Name: "use-check-point-cache",
Usage: "Enables check point info caching",
disableCheckPtInfoCache = &cli.BoolFlag{
Name: "disable-check-point-cache",
Usage: "Disables check point info caching",
}
)
// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
checkPtInfoCache,
batchBlockVerify,
enableEth1DataMajorityVote,
enableAttBroadcastDiscoveryAttempts,
@@ -554,6 +553,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedCheckptInfoCache = &cli.BoolFlag{
Name: "use-check-point-cache",
Usage: deprecatedUsage,
Hidden: true,
}
)
var deprecatedFlags = []cli.Flag{
@@ -630,6 +634,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedSlasherProviderFlag,
deprecatedEnableSlasherFlag,
deprecatedEnableFinalizedDepositsCache,
deprecatedCheckptInfoCache,
}
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
@@ -688,7 +693,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
enableAttBroadcastDiscoveryAttempts,
enablePeerScorer,
enableRoughtime,
checkPtInfoCache,
disableCheckPtInfoCache,
}...)
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.