Skip to content

Commit 649bfb5

Browse files
Invert State Locks Flag (#6922)
* invert flag * Update shared/featureconfig/flags.go Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
1 parent 6d5b7b0 commit 649bfb5

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

shared/featureconfig/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,11 @@ func ConfigureBeaconChain(ctx *cli.Context) {
228228
cfg.DisableGRPCConnectionLogs = true
229229
}
230230
cfg.AttestationAggregationStrategy = ctx.String(attestationAggregationStrategy.Name)
231-
if ctx.Bool(newBeaconStateLocks.Name) {
232-
log.Warn("Using new beacon state locks")
233-
cfg.NewBeaconStateLocks = true
231+
232+
cfg.NewBeaconStateLocks = true
233+
if ctx.Bool(disableNewBeaconStateLocks.Name) {
234+
log.Warn("Disabling new beacon state locks")
235+
cfg.NewBeaconStateLocks = false
234236
}
235237
if ctx.Bool(forceMaxCoverAttestationAggregation.Name) {
236238
log.Warn("Forcing max_cover strategy on attestation aggregation")

shared/featureconfig/flags.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ var (
138138
Usage: "Which strategy to use when aggregating attestations, one of: naive, max_cover.",
139139
Value: "naive",
140140
}
141-
newBeaconStateLocks = &cli.BoolFlag{
142-
Name: "new-beacon-state-locks",
143-
Usage: "Enable new beacon state locking",
141+
disableNewBeaconStateLocks = &cli.BoolFlag{
142+
Name: "disable-new-beacon-state-locks",
143+
Usage: "Disable new beacon state locking",
144144
}
145145
forceMaxCoverAttestationAggregation = &cli.BoolFlag{
146146
Name: "attestation-aggregation-force-maxcover",
@@ -171,7 +171,6 @@ var (
171171
// devModeFlags holds list of flags that are set when development mode is on.
172172
var devModeFlags = []cli.Flag{
173173
forceMaxCoverAttestationAggregation,
174-
newBeaconStateLocks,
175174
batchBlockVerify,
176175
}
177176

@@ -515,6 +514,11 @@ var (
515514
Usage: deprecatedUsage,
516515
Hidden: true,
517516
}
517+
deprecatedNewBeaconStateLocks = &cli.BoolFlag{
518+
Name: "new-beacon-state-locks",
519+
Usage: deprecatedUsage,
520+
Hidden: true,
521+
}
518522
)
519523

520524
var deprecatedFlags = []cli.Flag{
@@ -585,6 +589,7 @@ var deprecatedFlags = []cli.Flag{
585589
deprecatedMedallaTestnet,
586590
deprecatedEnableAccountsV2,
587591
deprecatedCustomGenesisDelay,
592+
deprecatedNewBeaconStateLocks,
588593
}
589594

590595
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
@@ -635,7 +640,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
635640
disableReduceAttesterStateCopy,
636641
disableGRPCConnectionLogging,
637642
attestationAggregationStrategy,
638-
newBeaconStateLocks,
643+
disableNewBeaconStateLocks,
639644
forceMaxCoverAttestationAggregation,
640645
AltonaTestnet,
641646
OnyxTestnet,

0 commit comments

Comments
 (0)