Skip to content

Commit

Permalink
Remove Disable Flag For Doubly Linked Tree (#12141)
Browse files Browse the repository at this point in the history
* deprecate

* remove this as the feature never worked

* fix
  • Loading branch information
nisdas authored Mar 17, 2023
1 parent 5243ca7 commit a937d78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
11 changes: 0 additions & 11 deletions beacon-chain/blockchain/head_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
forkchoicetypes "github.com/prysmaticlabs/prysm/v3/beacon-chain/forkchoice/types"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/operations/blstoexec"
"github.com/prysmaticlabs/prysm/v3/beacon-chain/state/stategen"
"github.com/prysmaticlabs/prysm/v3/config/features"
"github.com/prysmaticlabs/prysm/v3/config/params"
"github.com/prysmaticlabs/prysm/v3/consensus-types/blocks"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
Expand Down Expand Up @@ -386,11 +385,6 @@ func TestSaveOrphanedAtts_CanFilter(t *testing.T) {
}

func TestSaveOrphanedAtts_DoublyLinkedTrie(t *testing.T) {
resetCfg := features.InitWithReset(&features.Flags{
DisableForkchoiceDoublyLinkedTree: false,
})
defer resetCfg()

ctx := context.Background()
beaconDB := testDB.SetupDB(t)
service := setupBeaconChain(t, beaconDB)
Expand Down Expand Up @@ -456,11 +450,6 @@ func TestSaveOrphanedAtts_DoublyLinkedTrie(t *testing.T) {
}

func TestSaveOrphanedAtts_CanFilter_DoublyLinkedTrie(t *testing.T) {
resetCfg := features.InitWithReset(&features.Flags{
DisableForkchoiceDoublyLinkedTree: false,
})
defer resetCfg()

ctx := context.Background()
beaconDB := testDB.SetupDB(t)
service := setupBeaconChain(t, beaconDB)
Expand Down
18 changes: 6 additions & 12 deletions config/features/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ type Flags struct {
// Bug fixes related flags.
AttestTimely bool // AttestTimely fixes #8185. It is gated behind a flag to ensure beacon node's fix can safely roll out first. We'll invert this in v1.1.0.

EnableSlasher bool // Enable slasher in the beacon node runtime.
// EnableSlashingProtectionPruning for the validator client.
EnableSlashingProtectionPruning bool
EnableSlasher bool // Enable slasher in the beacon node runtime.
EnableSlashingProtectionPruning bool // EnableSlashingProtectionPruning for the validator client.

EnableVectorizedHTR bool // EnableVectorizedHTR specifies whether the beacon state will use the optimized sha256 routines.
DisableForkchoiceDoublyLinkedTree bool // DisableForkChoiceDoublyLinkedTree specifies whether fork choice store will use a doubly linked tree.
EnableBatchGossipAggregation bool // EnableBatchGossipAggregation specifies whether to further aggregate our gossip batches before verifying them.
SaveFullExecutionPayloads bool // Save full beacon blocks with execution payloads in the database.
EnableStartOptimistic bool // EnableStartOptimistic treats every block as optimistic at startup.
EnableVectorizedHTR bool // EnableVectorizedHTR specifies whether the beacon state will use the optimized sha256 routines.
EnableBatchGossipAggregation bool // EnableBatchGossipAggregation specifies whether to further aggregate our gossip batches before verifying them.
SaveFullExecutionPayloads bool // Save full beacon blocks with execution payloads in the database.
EnableStartOptimistic bool // EnableStartOptimistic treats every block as optimistic at startup.

DisableStakinContractCheck bool // Disables check for deposit contract when proposing blocks

Expand Down Expand Up @@ -214,10 +212,6 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
}
}
}
if ctx.Bool(disableForkChoiceDoublyLinkedTree.Name) {
logEnabled(disableForkChoiceDoublyLinkedTree)
cfg.DisableForkchoiceDoublyLinkedTree = true
}
cfg.EnableBatchGossipAggregation = true
if ctx.Bool(disableGossipBatchAggregation.Name) {
logDisabled(disableGossipBatchAggregation)
Expand Down
5 changes: 0 additions & 5 deletions config/features/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ var (
Name: "disable-vectorized-htr",
Usage: "Disables the new go sha256 library which utilizes optimized routines for merkle trees",
}
disableForkChoiceDoublyLinkedTree = &cli.BoolFlag{
Name: "disable-forkchoice-doubly-linked-tree",
Usage: "Disables the new forkchoice store structure that uses doubly linked trees",
}
disableGossipBatchAggregation = &cli.BoolFlag{
Name: "disable-gossip-batch-aggregation",
Usage: "Disables new methods to further aggregate our gossip batches before verifying them.",
Expand Down Expand Up @@ -164,7 +160,6 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
disableStakinContractCheck,
disableVecHTR,
disableReorgLateBlocks,
disableForkChoiceDoublyLinkedTree,
disableGossipBatchAggregation,
SaveFullExecutionPayloads,
enableStartupOptimistic,
Expand Down

0 comments on commit a937d78

Please sign in to comment.