Skip to content

Commit

Permalink
Flip committee aware packing flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapka committed Oct 5, 2024
1 parent c11e339 commit afb5fcc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ func (a proposerAtts) sort() (proposerAtts, error) {
return a, nil
}

if features.Get().EnableCommitteeAwarePacking {
return a.sortBySlotAndCommittee()
if features.Get().DisableCommitteeAwarePacking {
return a.sortByProfitabilityUsingMaxCover()
}
return a.sortByProfitabilityUsingMaxCover()
return a.sortBySlotAndCommittee()
}

// Separate attestations by slot, as slot number takes higher precedence when sorting.
Expand Down
8 changes: 4 additions & 4 deletions config/features/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Flags struct {
EnableDoppelGanger bool // EnableDoppelGanger enables doppelganger protection on startup for the validator.
EnableHistoricalSpaceRepresentation bool // EnableHistoricalSpaceRepresentation enables the saving of registry validators in separate buckets to save space
EnableBeaconRESTApi bool // EnableBeaconRESTApi enables experimental usage of the beacon REST API by the validator when querying a beacon node
EnableCommitteeAwarePacking bool // EnableCommitteeAwarePacking TODO
DisableCommitteeAwarePacking bool // DisableCommitteeAwarePacking changes the attestation packing algorithm to one that is not aware of attesting committees.
// Logging related toggles.
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
EnableFullSSZDataLogging bool // Enables logging for full ssz data on rejected gossip messages
Expand Down Expand Up @@ -256,9 +256,9 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
logEnabled(EnableQUIC)
cfg.EnableQUIC = true
}
if ctx.IsSet(EnableCommitteeAwarePacking.Name) {
logEnabled(EnableCommitteeAwarePacking)
cfg.EnableCommitteeAwarePacking = true
if ctx.IsSet(DisableCommitteeAwarePacking.Name) {
logEnabled(DisableCommitteeAwarePacking)
cfg.DisableCommitteeAwarePacking = true
}

cfg.AggregateIntervals = [3]time.Duration{aggregateFirstInterval.Value, aggregateSecondInterval.Value, aggregateThirdInterval.Value}
Expand Down
7 changes: 7 additions & 0 deletions config/features/deprecated_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}

deprecatedEnableCommitteeAwarePacking = &cli.BoolFlag{
Name: "enable-committee-aware-packing",
Usage: deprecatedUsage,
Hidden: true,
}
)

// Deprecated flags for both the beacon node and validator client.
Expand All @@ -94,6 +100,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedBeaconRPCGatewayProviderFlag,
deprecatedDisableGRPCGateway,
deprecatedEnableExperimentalState,
DisableCommitteeAwarePacking,
}

// deprecatedBeaconFlags contains flags that are still used by other components
Expand Down
8 changes: 4 additions & 4 deletions config/features/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ var (
Name: "enable-quic",
Usage: "Enables connection using the QUIC protocol for peers which support it.",
}
EnableCommitteeAwarePacking = &cli.BoolFlag{
Name: "enable-committee-aware-packing",
Usage: "Changes the attestation packing algorithm to one that is aware of attesting committees.",
DisableCommitteeAwarePacking = &cli.BoolFlag{
Name: "disable-committee-aware-packing",
Usage: "Changes the attestation packing algorithm to one that is not aware of attesting committees.",
}
)

Expand Down Expand Up @@ -226,7 +226,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
EnableLightClient,
BlobSaveFsync,
EnableQUIC,
EnableCommitteeAwarePacking,
DisableCommitteeAwarePacking,
}...)...)

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

0 comments on commit afb5fcc

Please sign in to comment.