Skip to content

Commit

Permalink
Inverts enable-init-sync-wrr flag (#6187)
Browse files Browse the repository at this point in the history
* Inverts enable-init-sync-wrr flag
  • Loading branch information
farazdagi committed Jun 9, 2020
1 parent 568d8c7 commit 187e08d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
7 changes: 4 additions & 3 deletions shared/featureconfig/config.go
Expand Up @@ -208,9 +208,10 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Enabling skipping of historical states regen")
cfg.SkipRegenHistoricalStates = true
}
if ctx.Bool(enableInitSyncWeightedRoundRobin.Name) {
log.Warn("Enabling weighted round robin in initial syncing")
cfg.EnableInitSyncWeightedRoundRobin = true
cfg.EnableInitSyncWeightedRoundRobin = true
if ctx.Bool(disableInitSyncWeightedRoundRobin.Name) {
log.Warn("Disabling weighted round robin in initial syncing")
cfg.EnableInitSyncWeightedRoundRobin = false
}
cfg.EnableStateRefCopy = true
if ctx.Bool(disableStateRefCopy.Name) {
Expand Down
18 changes: 11 additions & 7 deletions shared/featureconfig/flags.go
Expand Up @@ -153,20 +153,19 @@ var (
Name: "skip-regen-historical-states",
Usage: "Skips regeneration and saving of historical states from genesis to last finalized. This enables a quick switch-over to using `--enable-new-state-mgmt`",
}
enableInitSyncWeightedRoundRobin = &cli.BoolFlag{
Name: "enable-init-sync-wrr",
Usage: "Enables weighted round robin fetching optimization",
}
disableReduceAttesterStateCopy = &cli.BoolFlag{
Name: "disable-reduce-attester-state-copy",
Usage: "Disables the feature to reduce the amount of state copies for attester rpc",
}
disableInitSyncWeightedRoundRobin = &cli.BoolFlag{
Name: "disable-init-sync-wrr",
Usage: "Disables weighted round robin fetching optimization",
}
)

// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
enableNewStateMgmt,
enableInitSyncWeightedRoundRobin,
}

// Deprecated flags list.
Expand Down Expand Up @@ -404,6 +403,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedEnableInitSyncWeightedRoundRobin = &cli.BoolFlag{
Name: "enable-init-sync-wrr",
Usage: deprecatedUsage,
Hidden: true,
}
)

var deprecatedFlags = []cli.Flag{
Expand Down Expand Up @@ -453,6 +457,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedP2PWhitelist,
deprecatedP2PBlacklist,
deprecateReduceAttesterStateCopies,
deprecatedEnableInitSyncWeightedRoundRobin,
}

// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
Expand Down Expand Up @@ -507,7 +512,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableInitSyncBatchSaveBlocks,
waitForSyncedFlag,
skipRegenHistoricalStates,
enableInitSyncWeightedRoundRobin,
disableInitSyncWeightedRoundRobin,
disableFieldTrie,
disableStateRefCopy,
disableReduceAttesterStateCopy,
Expand All @@ -519,5 +524,4 @@ var E2EBeaconChainFlags = []string{
"--enable-state-gen-sig-verify",
"--check-head-state",
"--enable-new-state-mgmt",
"--enable-init-sync-wrr",
}

0 comments on commit 187e08d

Please sign in to comment.