Skip to content

Commit

Permalink
Makes Our New Deposit Trie The Default (#13555)
Browse files Browse the repository at this point in the history
* make 4881 the default

* fix failed build
  • Loading branch information
nisdas authored Jan 30, 2024
1 parent 373c853 commit 3ed4866
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion beacon-chain/execution/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ func (s *Service) initializeEth1Data(ctx context.Context, eth1DataInDB *ethpb.ET
} else {
if eth1DataInDB.Trie == nil && eth1DataInDB.DepositSnapshot != nil {
return errors.Errorf("trying to use old deposit trie after migration to the new trie. "+
"Run with the --%s flag to resume normal operations.", features.EnableEIP4881.Name)
"Remove the --%s flag to resume normal operations.", features.DisableEIP4881.Name)
}
s.depositTrie, err = trie.CreateTrieFromProto(eth1DataInDB.Trie)
}
Expand Down
7 changes: 4 additions & 3 deletions config/features/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
logEnabled(disableResourceManager)
cfg.DisableResourceManager = true
}
if ctx.IsSet(EnableEIP4881.Name) {
logEnabled(EnableEIP4881)
cfg.EnableEIP4881 = true
cfg.EnableEIP4881 = true
if ctx.IsSet(DisableEIP4881.Name) {
logEnabled(DisableEIP4881)
cfg.EnableEIP4881 = false
}
if ctx.IsSet(EnableLightClient.Name) {
logEnabled(EnableLightClient)
Expand Down
6 changes: 6 additions & 0 deletions config/features/deprecated_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedEnableEIP4881 = &cli.BoolFlag{
Name: "enable-eip-4881",
Usage: deprecatedUsage,
Hidden: true,
}
)

// Deprecated flags for both the beacon node and validator client.
Expand All @@ -84,6 +89,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedDisableReorgLateBlocks,
deprecatedDisableOptionalEngineMethods,
deprecatedDisableAggregateParallel,
deprecatedEnableEIP4881,
}

// deprecatedBeaconFlags contains flags that are still used by other components
Expand Down
9 changes: 4 additions & 5 deletions config/features/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ var (
Name: "prepare-all-payloads",
Usage: "Informs the engine to prepare all local payloads. Useful for relayers and builders.",
}
EnableEIP4881 = &cli.BoolFlag{
Name: "enable-eip-4881",
Usage: "Enables the deposit tree specified in EIP-4881.",
DisableEIP4881 = &cli.BoolFlag{
Name: "disable-eip-4881",
Usage: "Disables the deposit tree specified in EIP-4881.",
}
EnableLightClient = &cli.BoolFlag{
Name: "enable-lightclient",
Expand All @@ -160,7 +160,6 @@ var (
// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
enableVerboseSigVerification,
EnableEIP4881,
enableExperimentalState,
backfill.EnableExperimentalBackfill,
}
Expand Down Expand Up @@ -207,7 +206,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
aggregateFirstInterval,
aggregateSecondInterval,
aggregateThirdInterval,
EnableEIP4881,
DisableEIP4881,
disableResourceManager,
DisableRegistrationCache,
EnableLightClient,
Expand Down

0 comments on commit 3ed4866

Please sign in to comment.