Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable active balance cache #9567

Merged
merged 2 commits into from Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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