diff --git a/beacon-chain/node/config.go b/beacon-chain/node/config.go index 8b76bef32126..bad6a98bb7c9 100644 --- a/beacon-chain/node/config.go +++ b/beacon-chain/node/config.go @@ -98,21 +98,6 @@ func configureInteropConfig(cliCtx *cli.Context) { } func configureExecutionSetting(cliCtx *cli.Context) { - if cliCtx.IsSet(flags.TerminalTotalDifficultyOverride.Name) { - c := params.BeaconConfig() - c.TerminalTotalDifficulty = cliCtx.Uint64(flags.TerminalTotalDifficultyOverride.Name) - params.OverrideBeaconConfig(c) - } - if cliCtx.IsSet(flags.TerminalBlockHashOverride.Name) { - c := params.BeaconConfig() - c.TerminalBlockHash = common.HexToHash(cliCtx.String(flags.TerminalBlockHashOverride.Name)) - params.OverrideBeaconConfig(c) - } - if cliCtx.IsSet(flags.TerminalBlockHashActivationEpochOverride.Name) { - c := params.BeaconConfig() - c.TerminalBlockHashActivationEpoch = types.Epoch(cliCtx.Uint64(flags.TerminalBlockHashActivationEpochOverride.Name)) - params.OverrideBeaconConfig(c) - } if cliCtx.IsSet(flags.FeeRecipient.Name) { c := params.BeaconConfig() c.FeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name)) diff --git a/beacon-chain/node/config_test.go b/beacon-chain/node/config_test.go index fa71843bb91b..d466c92694b7 100644 --- a/beacon-chain/node/config_test.go +++ b/beacon-chain/node/config_test.go @@ -76,21 +76,11 @@ func TestConfigureExecutionSetting(t *testing.T) { app := cli.App{} set := flag.NewFlagSet("test", 0) - set.Uint64(flags.TerminalTotalDifficultyOverride.Name, 0, "") - set.String(flags.TerminalBlockHashOverride.Name, "", "") - set.Uint64(flags.TerminalBlockHashActivationEpochOverride.Name, 0, "") set.String(flags.FeeRecipient.Name, "", "") - require.NoError(t, set.Set(flags.TerminalTotalDifficultyOverride.Name, strconv.Itoa(100))) - require.NoError(t, set.Set(flags.TerminalBlockHashOverride.Name, "0xA")) - require.NoError(t, set.Set(flags.TerminalBlockHashActivationEpochOverride.Name, strconv.Itoa(200))) require.NoError(t, set.Set(flags.FeeRecipient.Name, "0xB")) cliCtx := cli.NewContext(&app, set, nil) configureExecutionSetting(cliCtx) - - assert.Equal(t, uint64(100), params.BeaconConfig().TerminalTotalDifficulty) - assert.Equal(t, common.HexToHash("0xA"), params.BeaconConfig().TerminalBlockHash) - assert.Equal(t, types.Epoch(200), params.BeaconConfig().TerminalBlockHashActivationEpoch) assert.Equal(t, common.HexToAddress("0xB"), params.BeaconConfig().FeeRecipient) } diff --git a/cmd/beacon-chain/flags/base.go b/cmd/beacon-chain/flags/base.go index 74ce4f0a8220..a9a80f676204 100644 --- a/cmd/beacon-chain/flags/base.go +++ b/cmd/beacon-chain/flags/base.go @@ -190,27 +190,6 @@ var ( Usage: "Sets the minimum number of peers that a node will attempt to peer with that are subscribed to a subnet.", Value: 6, } - // TerminalTotalDifficultyOverride specifies the total difficulty to manual overrides the `TERMINAL_TOTAL_DIFFICULTY` parameter. - TerminalTotalDifficultyOverride = &cli.Uint64Flag{ - Name: "terminal-total-difficulty-override", - Usage: "Sets the total difficulty to manual overrides the default TERMINAL_TOTAL_DIFFICULTY value. " + - "WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal difficulty. " + - "Incorrect usage will result in your node experience consensus failure.", - } - // TerminalBlockHashOverride specifies the terminal block hash to manual overrides the `TERMINAL_BLOCK_HASH` parameter. - TerminalBlockHashOverride = &cli.StringFlag{ - Name: "terminal-block-hash-override", - Usage: "Sets the block hash to manual overrides the default TERMINAL_BLOCK_HASH value. " + - "WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal block hash. " + - "Incorrect usage will result in your node experience consensus failure.", - } - // TerminalBlockHashActivationEpochOverride specifies the terminal block hash epoch to manual overrides the `TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH` parameter. - TerminalBlockHashActivationEpochOverride = &cli.Uint64Flag{ - Name: "terminal-block-hash-epoch-override", - Usage: "Sets the block hash epoch to manual overrides the default TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH value. " + - "WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal block hash activation epoch. " + - "Incorrect usage will result in your node experience consensus failure.", - } // FeeRecipient specifies the fee recipient for the transaction fees. FeeRecipient = &cli.StringFlag{ Name: "fee-recipient", diff --git a/cmd/beacon-chain/main.go b/cmd/beacon-chain/main.go index 360e66a8fef7..f78b7b90e3cf 100644 --- a/cmd/beacon-chain/main.go +++ b/cmd/beacon-chain/main.go @@ -65,9 +65,6 @@ var appFlags = []cli.Flag{ flags.Eth1HeaderReqLimit, flags.GenesisStatePath, flags.MinPeersPerSubnet, - flags.TerminalTotalDifficultyOverride, - flags.TerminalBlockHashOverride, - flags.TerminalBlockHashActivationEpochOverride, flags.FeeRecipient, cmd.EnableBackupWebhookFlag, cmd.BackupWebhookOutputDir, diff --git a/cmd/beacon-chain/usage.go b/cmd/beacon-chain/usage.go index 0610d68ad589..bfe0913a755b 100644 --- a/cmd/beacon-chain/usage.go +++ b/cmd/beacon-chain/usage.go @@ -128,9 +128,6 @@ var appHelpFlagGroups = []flagGroup{ { Name: "merge", Flags: []cli.Flag{ - flags.TerminalTotalDifficultyOverride, - flags.TerminalBlockHashOverride, - flags.TerminalBlockHashActivationEpochOverride, flags.FeeRecipient, }, },