Skip to content

Commit

Permalink
Invert enable-finalized-deposits-cache (#7214)
Browse files Browse the repository at this point in the history
* make flag opt-out
  • Loading branch information
rkapka authored Sep 11, 2020
1 parent acddb60 commit b1e2238
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
7 changes: 4 additions & 3 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Logging every processed block during initial syncing.")
cfg.InitSyncVerbose = true
}
if ctx.Bool(enableFinalizedDepositsCache.Name) {
log.Warn("Enabling finalized deposits cache")
cfg.EnableFinalizedDepositsCache = true
cfg.EnableFinalizedDepositsCache = true
if ctx.Bool(disableFinalizedDepositsCache.Name) {
log.Warn("Disabling finalized deposits cache")
cfg.EnableFinalizedDepositsCache = false
}
if ctx.Bool(enableEth1DataMajorityVote.Name) {
log.Warn("Enabling eth1data majority vote")
Expand Down
16 changes: 10 additions & 6 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ var (
Name: "init-sync-verbose",
Usage: "Enable logging every processed block during initial syncing.",
}
enableFinalizedDepositsCache = &cli.BoolFlag{
Name: "enable-finalized-deposits-cache",
Usage: "Enables utilization of cached finalized deposits",
disableFinalizedDepositsCache = &cli.BoolFlag{
Name: "disable-finalized-deposits-cache",
Usage: "Disables utilization of cached finalized deposits",
}
enableEth1DataMajorityVote = &cli.BoolFlag{
Name: "enable-eth1-data-majority-vote",
Expand Down Expand Up @@ -175,7 +175,6 @@ var (
var devModeFlags = []cli.Flag{
checkPtInfoCache,
batchBlockVerify,
enableFinalizedDepositsCache,
enableEth1DataMajorityVote,
enableAttBroadcastDiscoveryAttempts,
enablePeerScorer,
Expand Down Expand Up @@ -546,6 +545,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedEnableFinalizedDepositsCache = &cli.BoolFlag{
Name: "enable-finalized-deposits-cache",
Usage: deprecatedUsage,
Hidden: true,
}
)

var deprecatedFlags = []cli.Flag{
Expand Down Expand Up @@ -621,6 +625,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedNewStateMgmtFlag,
deprecatedSlasherProviderFlag,
deprecatedEnableSlasherFlag,
deprecatedEnableFinalizedDepositsCache,
}

// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
Expand Down Expand Up @@ -672,7 +677,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
OnyxTestnet,
batchBlockVerify,
initSyncVerbose,
enableFinalizedDepositsCache,
disableFinalizedDepositsCache,
enableEth1DataMajorityVote,
enableAttBroadcastDiscoveryAttempts,
enablePeerScorer,
Expand All @@ -687,7 +692,6 @@ var E2EBeaconChainFlags = []string{
"--check-head-state",
"--attestation-aggregation-strategy=max_cover",
"--dev",
"--enable-finalized-deposits-cache",
"--enable-eth1-data-majority-vote",
"--use-check-point-cache",
}

0 comments on commit b1e2238

Please sign in to comment.