Skip to content

Commit

Permalink
Enable active balance cache (#9567)
Browse files Browse the repository at this point in the history
* Enable active balance cache

* gofmt
  • Loading branch information
prestonvanloon committed Sep 10, 2021
1 parent dcc1f7c commit 1374b6d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 4 additions & 3 deletions shared/featureconfig/config.go
Expand Up @@ -205,9 +205,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
logEnabled(correctlyPruneCanonicalAtts)
cfg.CorrectlyPruneCanonicalAtts = true
}
if ctx.Bool(enableActiveBalanceCache.Name) {
logEnabled(enableActiveBalanceCache)
cfg.EnableActiveBalanceCache = true
cfg.EnableActiveBalanceCache = true
if ctx.Bool(disableActiveBalanceCache.Name) {
logDisabled(disableActiveBalanceCache)
cfg.EnableActiveBalanceCache = false
}
Init(cfg)
}
Expand Down
7 changes: 7 additions & 0 deletions shared/featureconfig/deprecated_flags.go
Expand Up @@ -12,8 +12,15 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}

deprecatedEnableActiveBalanceCache = &cli.BoolFlag{
Name: "enable-active-balance-cache",
Usage: deprecatedUsage,
Hidden: true,
}
)

var deprecatedFlags = []cli.Flag{
exampleDeprecatedFeatureFlag,
deprecatedEnableActiveBalanceCache,
}
9 changes: 4 additions & 5 deletions shared/featureconfig/flags.go
Expand Up @@ -131,9 +131,9 @@ var (
Usage: "This fixes a bug where any block attestations can get incorrectly pruned. This improves validator profitability and overall network health," +
"see issue #9443 for further detail",
}
enableActiveBalanceCache = &cli.BoolFlag{
Name: "enable-active-balance-cache",
Usage: "This enables active balance cache cache to improve node performance during block processing",
disableActiveBalanceCache = &cli.BoolFlag{
Name: "disable-active-balance-cache",
Usage: "This disables active balance cache, which improves node performance during block processing",
}
)

Expand All @@ -144,7 +144,6 @@ var devModeFlags = []cli.Flag{
forceOptMaxCoverAggregationStategy,
correctlyInsertOrphanedAtts,
correctlyPruneCanonicalAtts,
enableActiveBalanceCache,
}

// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
Expand Down Expand Up @@ -195,7 +194,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
enableHistoricalSpaceRepresentation,
correctlyInsertOrphanedAtts,
correctlyPruneCanonicalAtts,
enableActiveBalanceCache,
disableActiveBalanceCache,
}...)

// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
Expand Down

0 comments on commit 1374b6d

Please sign in to comment.