Skip to content

Commit

Permalink
app/featureset: stabilise more features (#3022)
Browse files Browse the repository at this point in the history
Promote `eager_dlinear`, `consensus_participate` to stable.

They can still be overridden by passing `eager_double_linear` and `consensus_participate` to the `--feature-set-disable` flag of `charon run`.

category: refactor
ticket: #3001

Closes #3001.
  • Loading branch information
gsora authored Apr 9, 2024
1 parent 7007dea commit 87b1b44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions app/featureset/featureset.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ const (
// round while still waiting for an unsigned data from beacon node.
ConsensusParticipate Feature = "consensus_participate"

// AggSigDBV2 enables a newer, simpler implementation of `aggsigdb`.
AggSigDBV2 Feature = "aggsigdb_v2"
)

var (
// state defines the current rollout status of each feature.
state = map[Feature]status{
EagerDoubleLinear: statusStable,
ConsensusParticipate: statusStable,
MockAlpha: statusAlpha,
EagerDoubleLinear: statusAlpha,
ConsensusParticipate: statusAlpha,
AggSigDBV2: statusAlpha,
// Add all features and there status here.
}
Expand Down
15 changes: 8 additions & 7 deletions core/consensus/roundtimer_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,15 @@ func TestDoubleEagerLinearRoundTimer(t *testing.T) {

func TestGetTimerFunc(t *testing.T) {
timerFunc := getTimerFunc()
require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(0)).Type())
require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(1)).Type())
require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(2)).Type())

featureset.EnableForT(t, featureset.EagerDoubleLinear)

timerFunc = getTimerFunc()
require.Equal(t, timerEagerDoubleLinear, timerFunc(core.NewAttesterDuty(0)).Type())
require.Equal(t, timerEagerDoubleLinear, timerFunc(core.NewAttesterDuty(1)).Type())
require.Equal(t, timerEagerDoubleLinear, timerFunc(core.NewAttesterDuty(2)).Type())

featureset.DisableForT(t, featureset.EagerDoubleLinear)

timerFunc = getTimerFunc()

require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(0)).Type())
require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(1)).Type())
require.Equal(t, timerIncreasing, timerFunc(core.NewAttesterDuty(2)).Type())
}

0 comments on commit 87b1b44

Please sign in to comment.