From 56f6679d7835c5b215425bb049732d359e4ce753 Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 29 Nov 2023 14:45:34 -0700 Subject: [PATCH 1/8] cmd/geth,cmd/utils,eth,eth/ethconfig,params/types/coregeth,params/types/ctypes,params/types/genesisT,params/types/goethereum: ECBP1100Disable: cli flag for override, config implementation Date: 2023-11-29 14:45:34-07:00 Signed-off-by: meows --- cmd/geth/config.go | 5 +++++ cmd/geth/main.go | 1 + cmd/utils/flags.go | 5 +++++ eth/backend.go | 8 ++++++++ eth/ethconfig/config.go | 2 ++ eth/ethconfig/gen_config.go | 7 +++++++ params/types/coregeth/chain_config.go | 5 +++-- params/types/coregeth/chain_config_configurator.go | 9 +++++++++ params/types/ctypes/configurator_iface.go | 3 +++ params/types/genesisT/genesis.go | 8 ++++++++ params/types/goethereum/goethereum.go | 3 ++- params/types/goethereum/goethereum_configurator.go | 9 +++++++++ 12 files changed, 62 insertions(+), 3 deletions(-) diff --git a/cmd/geth/config.go b/cmd/geth/config.go index c304cb89c3..51b8378d8c 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -174,6 +174,11 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) { cfg.Eth.ECBP1100 = new(big.Int).SetUint64(n) } } + if ctx.IsSet(utils.ECBP1100DisableFlag.Name) { + if n := ctx.Uint64(utils.ECBP1100DisableFlag.Name); n != math.MaxUint64 { + cfg.Eth.ECBP1100Disable = new(big.Int).SetUint64(n) + } + } if ctx.IsSet(utils.ECBP1100NoDisableFlag.Name) { if enable := ctx.Bool(utils.ECBP1100NoDisableFlag.Name); enable { cfg.Eth.ECBP1100NoDisable = &enable diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 962518d773..7702c22a16 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -167,6 +167,7 @@ var ( utils.MinerNotifyFullFlag, utils.ECBP1100Flag, utils.ECBP1100NoDisableFlag, + utils.ECBP1100DisableFlag, configFileFlag, }, utils.NetworkFlags, utils.DatabasePathFlags) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 515a0f7424..f652f9833a 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1068,6 +1068,11 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server. Usage: "Configure ECBP-1100 (MESS) block activation number", Value: math.MaxUint64, } + ECBP1100DisableFlag = &cli.Uint64Flag{ + Name: "ecbp1100.disable", + Usage: "Disable ECBP-1100 (MESS) block activation number", + Value: math.MaxUint64, + } ECBP1100NoDisableFlag = &cli.BoolFlag{ Name: "ecbp1100.nodisable", Usage: "Short-circuit ECBP-1100 (MESS) disable mechanisms; (yields a permanent-once-activated state, deactivating auto-shutoff mechanisms)", diff --git a/eth/backend.go b/eth/backend.go index 09c8b36241..f40dd98ecc 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -238,6 +238,14 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } } } + if config.ECBP1100Disable != nil { + if n := config.ECBP1100Disable.Uint64(); n != math.MaxUint64 { + if err := eth.blockchain.Config().SetECBP1100DisableTransition(&n); err != nil { + return nil, err + } + } + } + if config.ECBP1100NoDisable != nil { if *config.ECBP1100NoDisable { eth.blockchain.ArtificialFinalityNoDisable(1) diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index e8b3d3051a..08e7a290c9 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -218,6 +218,8 @@ type Config struct { // Manual configuration field for ECBP1100 activation number. Used for modifying genesis config via CLI flag. ECBP1100 *big.Int + // Manual configuration field for ECBP1100's disablement block number. Used for modifying genesis config via CLI flag. + ECBP1100Disable *big.Int // ECBP1100NoDisable overrides // When this value is *true, ECBP100 will not (ever) be disabled; when *false, it will never be enabled. diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go index 4f74ed83f0..0f6ddf6d08 100644 --- a/eth/ethconfig/gen_config.go +++ b/eth/ethconfig/gen_config.go @@ -66,6 +66,7 @@ func (c Config) MarshalTOML() (interface{}, error) { Checkpoint *ctypes.TrustedCheckpoint `toml:",omitempty"` CheckpointOracle *ctypes.CheckpointOracleConfig `toml:",omitempty"` ECBP1100 *big.Int + ECBP1100Disable *big.Int ECBP1100NoDisable *bool `toml:",omitempty"` OverrideShanghai *uint64 `toml:",omitempty"` OverrideCancun *uint64 `toml:",omitempty"` @@ -118,7 +119,9 @@ func (c Config) MarshalTOML() (interface{}, error) { enc.Checkpoint = c.Checkpoint enc.CheckpointOracle = c.CheckpointOracle enc.ECBP1100 = c.ECBP1100 + enc.ECBP1100Disable = c.ECBP1100Disable enc.ECBP1100NoDisable = c.ECBP1100NoDisable + enc.OverrideShanghai = c.OverrideShanghai enc.OverrideCancun = c.OverrideCancun enc.OverrideVerkle = c.OverrideVerkle @@ -174,6 +177,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { Checkpoint *ctypes.TrustedCheckpoint `toml:",omitempty"` CheckpointOracle *ctypes.CheckpointOracleConfig `toml:",omitempty"` ECBP1100 *big.Int + ECBP1100Disable *big.Int ECBP1100NoDisable *bool `toml:",omitempty"` OverrideShanghai *uint64 `toml:",omitempty"` OverrideCancun *uint64 `toml:",omitempty"` @@ -321,6 +325,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { if dec.ECBP1100 != nil { c.ECBP1100 = dec.ECBP1100 } + if dec.ECBP1100Disable != nil { + c.ECBP1100Disable = dec.ECBP1100Disable + } if dec.ECBP1100NoDisable != nil { c.ECBP1100NoDisable = dec.ECBP1100NoDisable } diff --git a/params/types/coregeth/chain_config.go b/params/types/coregeth/chain_config.go index 7e37900ccf..2e79a3a6eb 100644 --- a/params/types/coregeth/chain_config.go +++ b/params/types/coregeth/chain_config.go @@ -184,8 +184,9 @@ type CoreGethChainConfig struct { ECIP1017EraRounds *big.Int `json:"ecip1017EraRounds,omitempty"` // ECIP1017 era rounds ECIP1080FBlock *big.Int `json:"ecip1080FBlock,omitempty"` - ECIP1099FBlock *big.Int `json:"ecip1099FBlock,omitempty"` // ECIP1099 etchash HF block - ECBP1100FBlock *big.Int `json:"ecbp1100FBlock,omitempty"` // ECBP1100:MESS artificial finality + ECIP1099FBlock *big.Int `json:"ecip1099FBlock,omitempty"` // ECIP1099 etchash HF block + ECBP1100FBlock *big.Int `json:"ecbp1100FBlock,omitempty"` // ECBP1100:MESS artificial finality + ECBP1100DisableFBlock *big.Int `json:"ecbp1100DisableFBlock,omitempty"` // Disable ECBP1100:MESS artificial finality // EIP-2315: Simple Subroutines // https://eips.ethereum.org/EIPS/eip-2315 diff --git a/params/types/coregeth/chain_config_configurator.go b/params/types/coregeth/chain_config_configurator.go index 2f34271355..8162d8a44b 100644 --- a/params/types/coregeth/chain_config_configurator.go +++ b/params/types/coregeth/chain_config_configurator.go @@ -424,6 +424,15 @@ func (c *CoreGethChainConfig) SetECBP1100Transition(n *uint64) error { return nil } +func (c *CoreGethChainConfig) GetECBP1100DisableTransition() *uint64 { + return bigNewU64(c.ECBP1100DisableFBlock) +} + +func (c *CoreGethChainConfig) SetECBP1100DisableTransition(n *uint64) error { + c.ECBP1100DisableFBlock = setBig(c.ECBP1100DisableFBlock, n) + return nil +} + func (c *CoreGethChainConfig) GetEIP2315Transition() *uint64 { return bigNewU64(c.EIP2315FBlock) } diff --git a/params/types/ctypes/configurator_iface.go b/params/types/ctypes/configurator_iface.go index 166312f639..2fbc414785 100644 --- a/params/types/ctypes/configurator_iface.go +++ b/params/types/ctypes/configurator_iface.go @@ -142,6 +142,9 @@ type ProtocolSpecifier interface { GetECBP1100Transition() *uint64 SetECBP1100Transition(n *uint64) error + GetECBP1100DisableTransition() *uint64 + SetECBP1100DisableTransition(n *uint64) error + GetEIP2315Transition() *uint64 SetEIP2315Transition(n *uint64) error diff --git a/params/types/genesisT/genesis.go b/params/types/genesisT/genesis.go index de7cf98bb6..b47a7f1ec0 100644 --- a/params/types/genesisT/genesis.go +++ b/params/types/genesisT/genesis.go @@ -789,6 +789,14 @@ func (g *Genesis) SetECBP1100Transition(n *uint64) error { return g.Config.SetECBP1100Transition(n) } +func (g *Genesis) GetECBP1100DisableTransition() *uint64 { + return g.Config.GetECBP1100DisableTransition() +} + +func (g *Genesis) SetECBP1100DisableTransition(n *uint64) error { + return g.Config.SetECBP1100DisableTransition(n) +} + func (g *Genesis) IsEnabled(fn func() *uint64, n *big.Int) bool { return g.Config.IsEnabled(fn, n) } diff --git a/params/types/goethereum/goethereum.go b/params/types/goethereum/goethereum.go index 3482407ed5..74d6d505e9 100644 --- a/params/types/goethereum/goethereum.go +++ b/params/types/goethereum/goethereum.go @@ -99,7 +99,8 @@ type ChainConfig struct { ECIP1080Transition *big.Int `json:"-"` // Cache types for use with testing, but will not show up in config API. - ecbp1100Transition *big.Int + ecbp1100Transition *big.Int + ecbp1100DisableTransition *big.Int Lyra2NonceTransitionBlock *big.Int `json:"lyra2NonceTransitionBlock,omitempty"` } diff --git a/params/types/goethereum/goethereum_configurator.go b/params/types/goethereum/goethereum_configurator.go index 65b9db3550..29ac8c5e02 100644 --- a/params/types/goethereum/goethereum_configurator.go +++ b/params/types/goethereum/goethereum_configurator.go @@ -449,6 +449,15 @@ func (c *ChainConfig) SetECBP1100Transition(n *uint64) error { return nil } +func (c *ChainConfig) GetECBP1100DisableTransition() *uint64 { + return bigNewU64(c.ecbp1100DisableTransition) +} + +func (c *ChainConfig) SetECBP1100DisableTransition(n *uint64) error { + c.ecbp1100DisableTransition = setBig(c.ecbp1100DisableTransition, n) + return nil +} + // GetEIP2315Transition implements EIP2537. // This logic is written but not configured for any Ethereum-supported networks, yet. func (c *ChainConfig) GetEIP2315Transition() *uint64 { From c29d869bff433533a87019801c58445f542c8c9e Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 29 Nov 2023 14:46:29 -0700 Subject: [PATCH 2/8] params: configure ETC's ECBP1100Disable with FAKE block number Date: 2023-11-29 14:46:29-07:00 Signed-off-by: meows --- params/config_classic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/params/config_classic.go b/params/config_classic.go index ceba7d4ffe..3cb9e598d2 100644 --- a/params/config_classic.go +++ b/params/config_classic.go @@ -81,8 +81,9 @@ var ( EIP2028FBlock: big.NewInt(10_500_839), EIP2200FBlock: big.NewInt(10_500_839), // RePetersburg (=~ re-1283) - ECBP1100FBlock: big.NewInt(11_380_000), // ETA 09 Oct 2020 - ECIP1099FBlock: big.NewInt(11_700_000), // Etchash (DAG size limit) + ECBP1100FBlock: big.NewInt(11_380_000), // ETA 09 Oct 2020 + ECBP1100DisableFBlock: big.NewInt(69_420_123), + ECIP1099FBlock: big.NewInt(11_700_000), // Etchash (DAG size limit) // Berlin eq, aka Magneto EIP2565FBlock: big.NewInt(13_189_133), From 9e274d02851888a9dab51d5ba197193f09aa2b24 Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 29 Nov 2023 15:52:37 -0700 Subject: [PATCH 3/8] params/types/coregeth,params/types/goethereum: implement ECBP1100Disable logic with runtime,reflection This may not be ideal from a CPU/time perspective (expected slow), but since this is likely a temporary code path as we expect to remove MESS code once the fork is passed, it may be sufficient, and is certainly a smaller change than adding -Disabled conditions at each occurrence of IsEnabled/ECBP1100 in the code. Date: 2023-11-29 15:52:37-07:00 Signed-off-by: meows --- .../coregeth/chain_config_configurator.go | 10 +++++ params/types/coregeth/chain_config_test.go | 40 +++++++++++++++++++ .../goethereum/goethereum_configurator.go | 10 +++++ 3 files changed, 60 insertions(+) diff --git a/params/types/coregeth/chain_config_configurator.go b/params/types/coregeth/chain_config_configurator.go index 8162d8a44b..3c19983a81 100644 --- a/params/types/coregeth/chain_config_configurator.go +++ b/params/types/coregeth/chain_config_configurator.go @@ -28,6 +28,9 @@ package coregeth import ( "math/big" + "reflect" + "runtime" + "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" @@ -678,6 +681,13 @@ func (c *CoreGethChainConfig) IsEnabled(fn func() *uint64, n *big.Int) bool { if f == nil || n == nil { return false } + fnName := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() + if strings.Contains(fnName, "ECBP1100Transition") { + disabledTransition := c.GetECBP1100DisableTransition() + if disabledTransition != nil { + return big.NewInt(int64(*disabledTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 + } + } return big.NewInt(int64(*f)).Cmp(n) <= 0 } diff --git a/params/types/coregeth/chain_config_test.go b/params/types/coregeth/chain_config_test.go index 2657452721..010e2aab14 100644 --- a/params/types/coregeth/chain_config_test.go +++ b/params/types/coregeth/chain_config_test.go @@ -49,3 +49,43 @@ func TestCoreGethChainConfig_String(t *testing.T) { t.Skip("(noop) development use only") t.Log(testConfig.String()) } + +func TestCoreGethChainConfig_ECBP1100Disable(t *testing.T) { + var _testConfig = &CoreGethChainConfig{} + *_testConfig = *testConfig + + enable := uint64(100) + disable := uint64(200) + _testConfig.SetECBP1100Transition(&enable) + _testConfig.SetECBP1100DisableTransition(&disable) + + n := uint64(10) + bigN := new(big.Int).SetUint64(n) + if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { + t.Errorf("ECBP1100 should be not yet be enabled at block %d", n) + } + + n = uint64(100) + bigN = new(big.Int).SetUint64(n) + if !_testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { + t.Errorf("ECBP1100 should be enabled at block %d", n) + } + + n = uint64(110) + bigN = new(big.Int).SetUint64(n) + if !_testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { + t.Errorf("ECBP1100 should be enabled at block %d", n) + } + + n = uint64(200) + bigN = new(big.Int).SetUint64(n) + if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { + t.Errorf("ECBP1100 should be disabled at block %d", n) + } + + n = uint64(210) + bigN = new(big.Int).SetUint64(n) + if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { + t.Errorf("ECBP1100 should be disabled at block %d", n) + } +} diff --git a/params/types/goethereum/goethereum_configurator.go b/params/types/goethereum/goethereum_configurator.go index 29ac8c5e02..dacd9ced5c 100644 --- a/params/types/goethereum/goethereum_configurator.go +++ b/params/types/goethereum/goethereum_configurator.go @@ -18,6 +18,9 @@ package goethereum import ( "math/big" + "reflect" + "runtime" + "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params/types/ctypes" @@ -700,6 +703,13 @@ func (c *ChainConfig) IsEnabled(fn func() *uint64, n *big.Int) bool { if f == nil || n == nil { return false } + fnName := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() + if strings.Contains(fnName, "ECBP1100Transition") { + disabledTransition := c.GetECBP1100DisableTransition() + if disabledTransition != nil { + return big.NewInt(int64(*disabledTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 + } + } return big.NewInt(int64(*f)).Cmp(n) <= 0 } From 05877c44cd0cffc61e056718abcffbb2a3d053bf Mon Sep 17 00:00:00 2001 From: Chris Ziogas Date: Fri, 1 Dec 2023 14:39:14 +0200 Subject: [PATCH 4/8] cmd/utils,core: return a warning if both --ecbp1100.disable and --ecbp1100.nodisable --- cmd/utils/flags.go | 2 ++ core/blockchain_af.go | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index f652f9833a..3d1eb8ef4c 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2086,6 +2086,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { cfg.EthDiscoveryURLs = SplitAndTrim(urls) } } + CheckExclusive(ctx, ECBP1100DisableFlag, ECBP1100NoDisableFlag) + // Override any default configs for hard coded networks. // Override genesis configuration if a -- flag. diff --git a/core/blockchain_af.go b/core/blockchain_af.go index a4627606d3..8ec368ba02 100644 --- a/core/blockchain_af.go +++ b/core/blockchain_af.go @@ -23,6 +23,13 @@ func (bc *BlockChain) ArtificialFinalityNoDisable(n int32) { log.Warn("Deactivating ECBP1100 (MESS) disablers", "always on", true) bc.artificialFinalityNoDisable = new(int32) atomic.StoreInt32(bc.artificialFinalityNoDisable, n) + + if n == 1 { + disabledTransition := bc.chainConfig.GetECBP1100DisableTransition() + if disabledTransition != nil && big.NewInt(int64(*disabledTransition)).Cmp(big.NewInt(0)) > 0 { + log.Warn("Disable ECBP1100 (MESS) block activation number is set together with '--ecbp1100.nodisable'. ECBP1100 will not be disabled.", "disable transition block", *disabledTransition) + } + } } // EnableArtificialFinality enables and disable artificial finality features for the blockchain. From 0b1b8e15c4fedcebb5b7850b5a6cd7e02918416b Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 6 Dec 2023 07:11:04 -0700 Subject: [PATCH 5/8] cmd/utils: these flags are not exclusive - 1100disable flag deactivates the feature - 1100.nodisable prevents safety mechanisms from toggling it once activated Date: 2023-12-06 07:11:04-07:00 Signed-off-by: meows --- cmd/utils/flags.go | 1 - core/blockchain_af.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 3d1eb8ef4c..ba6e071614 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2086,7 +2086,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { cfg.EthDiscoveryURLs = SplitAndTrim(urls) } } - CheckExclusive(ctx, ECBP1100DisableFlag, ECBP1100NoDisableFlag) // Override any default configs for hard coded networks. diff --git a/core/blockchain_af.go b/core/blockchain_af.go index 8ec368ba02..d61358a301 100644 --- a/core/blockchain_af.go +++ b/core/blockchain_af.go @@ -27,7 +27,7 @@ func (bc *BlockChain) ArtificialFinalityNoDisable(n int32) { if n == 1 { disabledTransition := bc.chainConfig.GetECBP1100DisableTransition() if disabledTransition != nil && big.NewInt(int64(*disabledTransition)).Cmp(big.NewInt(0)) > 0 { - log.Warn("Disable ECBP1100 (MESS) block activation number is set together with '--ecbp1100.nodisable'. ECBP1100 will not be disabled.", "disable transition block", *disabledTransition) + log.Warn("Disable ECBP1100 (MESS) block activation number is set together with '--ecbp1100.nodisable'.", "disable transition block", *disabledTransition) } } } From e4b7dd2f1b2ebcfe7c62f29e22bc4eebfee1881d Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 6 Dec 2023 07:21:58 -0700 Subject: [PATCH 6/8] core,eth,params/types/coregeth,params/types/ctypes,params/types/genesisT,params/types/goethereum: s/ECBP1100DisableTransition/ECBP1100DeactivateTransition/g The word Disable conflicts with the existing ECBP1100NoDisable flag and feature. That feature prevents the toggling of the ECBP1100 feature per the safety mechanisms of low peer count and stale head. Renaming to Deactivate is intended to clarify the code usages. Based on feedback provided here https://github.com/etclabscore/core-geth/pull/592#issuecomment-1841126001 Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows cmd/geth,cmd/utils,core,eth,eth/ethconfig,params/types/coregeth: ECBP1100: s/enable/activate/g,s/disable/deactivate/g rename all references besides the method name Date: 2023-12-06 07:50:14-07:00 Signed-off-by: meows params,params/types/coregeth,params/types/goethereum: ECBP1100-deactivate: rename config fields s/disable/deactivate/g Date: 2023-12-06 08:07:08-07:00 Signed-off-by: meows core: (lint) remove unnecessary leading newline Date: 2023-12-06 08:09:00-07:00 Signed-off-by: meows params/types/goethereum: ECBP100: s/disableTransition/deactivateTransition/g Date: 2023-12-06 08:17:12-07:00 Signed-off-by: meows params/types/coregeth: ECBP100: s/disable/deactivate/g Date: 2023-12-06 08:19:09-07:00 Signed-off-by: meows --- cmd/geth/config.go | 6 ++--- cmd/geth/main.go | 2 +- cmd/utils/flags.go | 2 +- core/blockchain_af.go | 23 +++++++++++++++---- eth/backend.go | 6 ++--- eth/ethconfig/config.go | 2 +- eth/ethconfig/gen_config.go | 4 ++-- params/config_classic.go | 6 ++--- params/types/coregeth/chain_config.go | 6 ++--- .../coregeth/chain_config_configurator.go | 14 +++++------ params/types/coregeth/chain_config_test.go | 20 ++++++++-------- params/types/ctypes/configurator_iface.go | 4 ++-- params/types/genesisT/genesis.go | 8 +++---- params/types/goethereum/goethereum.go | 4 ++-- .../goethereum/goethereum_configurator.go | 14 +++++------ 15 files changed, 68 insertions(+), 53 deletions(-) diff --git a/cmd/geth/config.go b/cmd/geth/config.go index 51b8378d8c..99a962452c 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -174,9 +174,9 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) { cfg.Eth.ECBP1100 = new(big.Int).SetUint64(n) } } - if ctx.IsSet(utils.ECBP1100DisableFlag.Name) { - if n := ctx.Uint64(utils.ECBP1100DisableFlag.Name); n != math.MaxUint64 { - cfg.Eth.ECBP1100Disable = new(big.Int).SetUint64(n) + if ctx.IsSet(utils.ECBP1100DeactivateFlag.Name) { + if n := ctx.Uint64(utils.ECBP1100DeactivateFlag.Name); n != math.MaxUint64 { + cfg.Eth.ECBP1100Deactivate = new(big.Int).SetUint64(n) } } if ctx.IsSet(utils.ECBP1100NoDisableFlag.Name) { diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 7702c22a16..186e1c626b 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -167,7 +167,7 @@ var ( utils.MinerNotifyFullFlag, utils.ECBP1100Flag, utils.ECBP1100NoDisableFlag, - utils.ECBP1100DisableFlag, + utils.ECBP1100DeactivateFlag, configFileFlag, }, utils.NetworkFlags, utils.DatabasePathFlags) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ba6e071614..558f17b247 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1068,7 +1068,7 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server. Usage: "Configure ECBP-1100 (MESS) block activation number", Value: math.MaxUint64, } - ECBP1100DisableFlag = &cli.Uint64Flag{ + ECBP1100DeactivateFlag = &cli.Uint64Flag{ Name: "ecbp1100.disable", Usage: "Disable ECBP-1100 (MESS) block activation number", Value: math.MaxUint64, diff --git a/core/blockchain_af.go b/core/blockchain_af.go index d61358a301..efbfae913f 100644 --- a/core/blockchain_af.go +++ b/core/blockchain_af.go @@ -20,14 +20,29 @@ var errReorgFinality = errors.New("finality-enforced invalid new chain") // n = 1 : ON // n != 1 : OFF func (bc *BlockChain) ArtificialFinalityNoDisable(n int32) { - log.Warn("Deactivating ECBP1100 (MESS) disablers", "always on", true) + log.Warn("Deactivating ECBP1100 (MESS) safety mechanisms", "always on", true) bc.artificialFinalityNoDisable = new(int32) atomic.StoreInt32(bc.artificialFinalityNoDisable, n) if n == 1 { - disabledTransition := bc.chainConfig.GetECBP1100DisableTransition() - if disabledTransition != nil && big.NewInt(int64(*disabledTransition)).Cmp(big.NewInt(0)) > 0 { - log.Warn("Disable ECBP1100 (MESS) block activation number is set together with '--ecbp1100.nodisable'.", "disable transition block", *disabledTransition) + deactivateTransition := bc.chainConfig.GetECBP1100DeactivateTransition() + if deactivateTransition != nil && big.NewInt(int64(*deactivateTransition)).Cmp(big.NewInt(0)) > 0 { + // Log the activation block as well as the deactivation block. + // Context is nice to have for the user. + var logActivationBlock uint64 + logActivationBlockRaw := bc.chainConfig.GetECBP1100Transition() + if logActivationBlockRaw == nil { + // panic("impossible") + logActivationBlock = *deactivateTransition + } else { + logActivationBlock = *logActivationBlockRaw + } + + log.Warn(`Deactivate-ECBP1100 (MESS) block activation number is set together with '--ecbp1100.nodisable'. +The --ecbp1100.nodisable feature prevents the toggling of ECBP1100 (MESS) artificial finality with its safety mechanisms of low peer count and stale head. +ECBP1100 (MESS) is scheduled for network-wide deactivation, rendering the --ecbp1100.nodisable feature anachronistic. +`, "ECBP1100 activation block", logActivationBlock, + "ECBP1100 deactivation block", *deactivateTransition) } } } diff --git a/eth/backend.go b/eth/backend.go index f40dd98ecc..6f87819815 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -238,9 +238,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } } } - if config.ECBP1100Disable != nil { - if n := config.ECBP1100Disable.Uint64(); n != math.MaxUint64 { - if err := eth.blockchain.Config().SetECBP1100DisableTransition(&n); err != nil { + if config.ECBP1100Deactivate != nil { + if n := config.ECBP1100Deactivate.Uint64(); n != math.MaxUint64 { + if err := eth.blockchain.Config().SetECBP1100DeactivateTransition(&n); err != nil { return nil, err } } diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 08e7a290c9..626f20716a 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -219,7 +219,7 @@ type Config struct { // Manual configuration field for ECBP1100 activation number. Used for modifying genesis config via CLI flag. ECBP1100 *big.Int // Manual configuration field for ECBP1100's disablement block number. Used for modifying genesis config via CLI flag. - ECBP1100Disable *big.Int + ECBP1100Deactivate *big.Int // ECBP1100NoDisable overrides // When this value is *true, ECBP100 will not (ever) be disabled; when *false, it will never be enabled. diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go index 0f6ddf6d08..109a8666f0 100644 --- a/eth/ethconfig/gen_config.go +++ b/eth/ethconfig/gen_config.go @@ -119,7 +119,7 @@ func (c Config) MarshalTOML() (interface{}, error) { enc.Checkpoint = c.Checkpoint enc.CheckpointOracle = c.CheckpointOracle enc.ECBP1100 = c.ECBP1100 - enc.ECBP1100Disable = c.ECBP1100Disable + enc.ECBP1100Disable = c.ECBP1100Deactivate enc.ECBP1100NoDisable = c.ECBP1100NoDisable enc.OverrideShanghai = c.OverrideShanghai @@ -326,7 +326,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { c.ECBP1100 = dec.ECBP1100 } if dec.ECBP1100Disable != nil { - c.ECBP1100Disable = dec.ECBP1100Disable + c.ECBP1100Deactivate = dec.ECBP1100Disable } if dec.ECBP1100NoDisable != nil { c.ECBP1100NoDisable = dec.ECBP1100NoDisable diff --git a/params/config_classic.go b/params/config_classic.go index 3cb9e598d2..d734a6d98e 100644 --- a/params/config_classic.go +++ b/params/config_classic.go @@ -81,9 +81,9 @@ var ( EIP2028FBlock: big.NewInt(10_500_839), EIP2200FBlock: big.NewInt(10_500_839), // RePetersburg (=~ re-1283) - ECBP1100FBlock: big.NewInt(11_380_000), // ETA 09 Oct 2020 - ECBP1100DisableFBlock: big.NewInt(69_420_123), - ECIP1099FBlock: big.NewInt(11_700_000), // Etchash (DAG size limit) + ECBP1100FBlock: big.NewInt(11_380_000), // ETA 09 Oct 2020 + ECBP1100DeactivateFBlock: big.NewInt(69_420_123), + ECIP1099FBlock: big.NewInt(11_700_000), // Etchash (DAG size limit) // Berlin eq, aka Magneto EIP2565FBlock: big.NewInt(13_189_133), diff --git a/params/types/coregeth/chain_config.go b/params/types/coregeth/chain_config.go index 2e79a3a6eb..7db8b8525e 100644 --- a/params/types/coregeth/chain_config.go +++ b/params/types/coregeth/chain_config.go @@ -184,9 +184,9 @@ type CoreGethChainConfig struct { ECIP1017EraRounds *big.Int `json:"ecip1017EraRounds,omitempty"` // ECIP1017 era rounds ECIP1080FBlock *big.Int `json:"ecip1080FBlock,omitempty"` - ECIP1099FBlock *big.Int `json:"ecip1099FBlock,omitempty"` // ECIP1099 etchash HF block - ECBP1100FBlock *big.Int `json:"ecbp1100FBlock,omitempty"` // ECBP1100:MESS artificial finality - ECBP1100DisableFBlock *big.Int `json:"ecbp1100DisableFBlock,omitempty"` // Disable ECBP1100:MESS artificial finality + ECIP1099FBlock *big.Int `json:"ecip1099FBlock,omitempty"` // ECIP1099 etchash HF block + ECBP1100FBlock *big.Int `json:"ecbp1100FBlock,omitempty"` // ECBP1100:MESS artificial finality + ECBP1100DeactivateFBlock *big.Int `json:"ecbp1100DeactivateFBlockFBlock,omitempty"` // Deactivate ECBP1100:MESS artificial finality // EIP-2315: Simple Subroutines // https://eips.ethereum.org/EIPS/eip-2315 diff --git a/params/types/coregeth/chain_config_configurator.go b/params/types/coregeth/chain_config_configurator.go index 3c19983a81..9fbfd42fad 100644 --- a/params/types/coregeth/chain_config_configurator.go +++ b/params/types/coregeth/chain_config_configurator.go @@ -427,12 +427,12 @@ func (c *CoreGethChainConfig) SetECBP1100Transition(n *uint64) error { return nil } -func (c *CoreGethChainConfig) GetECBP1100DisableTransition() *uint64 { - return bigNewU64(c.ECBP1100DisableFBlock) +func (c *CoreGethChainConfig) GetECBP1100DeactivateTransition() *uint64 { + return bigNewU64(c.ECBP1100DeactivateFBlock) } -func (c *CoreGethChainConfig) SetECBP1100DisableTransition(n *uint64) error { - c.ECBP1100DisableFBlock = setBig(c.ECBP1100DisableFBlock, n) +func (c *CoreGethChainConfig) SetECBP1100DeactivateTransition(n *uint64) error { + c.ECBP1100DeactivateFBlock = setBig(c.ECBP1100DeactivateFBlock, n) return nil } @@ -683,9 +683,9 @@ func (c *CoreGethChainConfig) IsEnabled(fn func() *uint64, n *big.Int) bool { } fnName := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() if strings.Contains(fnName, "ECBP1100Transition") { - disabledTransition := c.GetECBP1100DisableTransition() - if disabledTransition != nil { - return big.NewInt(int64(*disabledTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 + deactivateTransition := c.GetECBP1100DeactivateTransition() + if deactivateTransition != nil { + return big.NewInt(int64(*deactivateTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 } } return big.NewInt(int64(*f)).Cmp(n) <= 0 diff --git a/params/types/coregeth/chain_config_test.go b/params/types/coregeth/chain_config_test.go index 010e2aab14..12da6958fe 100644 --- a/params/types/coregeth/chain_config_test.go +++ b/params/types/coregeth/chain_config_test.go @@ -50,42 +50,42 @@ func TestCoreGethChainConfig_String(t *testing.T) { t.Log(testConfig.String()) } -func TestCoreGethChainConfig_ECBP1100Disable(t *testing.T) { +func TestCoreGethChainConfig_ECBP1100Deactivate(t *testing.T) { var _testConfig = &CoreGethChainConfig{} *_testConfig = *testConfig - enable := uint64(100) - disable := uint64(200) - _testConfig.SetECBP1100Transition(&enable) - _testConfig.SetECBP1100DisableTransition(&disable) + activate := uint64(100) + deactivate := uint64(200) + _testConfig.SetECBP1100Transition(&activate) + _testConfig.SetECBP1100DeactivateTransition(&deactivate) n := uint64(10) bigN := new(big.Int).SetUint64(n) if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { - t.Errorf("ECBP1100 should be not yet be enabled at block %d", n) + t.Errorf("ECBP1100 should be not yet be activated at block %d", n) } n = uint64(100) bigN = new(big.Int).SetUint64(n) if !_testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { - t.Errorf("ECBP1100 should be enabled at block %d", n) + t.Errorf("ECBP1100 should be activated at block %d", n) } n = uint64(110) bigN = new(big.Int).SetUint64(n) if !_testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { - t.Errorf("ECBP1100 should be enabled at block %d", n) + t.Errorf("ECBP1100 should be activated at block %d", n) } n = uint64(200) bigN = new(big.Int).SetUint64(n) if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { - t.Errorf("ECBP1100 should be disabled at block %d", n) + t.Errorf("ECBP1100 should be deactivated at block %d", n) } n = uint64(210) bigN = new(big.Int).SetUint64(n) if _testConfig.IsEnabled(_testConfig.GetECBP1100Transition, bigN) { - t.Errorf("ECBP1100 should be disabled at block %d", n) + t.Errorf("ECBP1100 should be deactivated at block %d", n) } } diff --git a/params/types/ctypes/configurator_iface.go b/params/types/ctypes/configurator_iface.go index 2fbc414785..5780ae02d1 100644 --- a/params/types/ctypes/configurator_iface.go +++ b/params/types/ctypes/configurator_iface.go @@ -142,8 +142,8 @@ type ProtocolSpecifier interface { GetECBP1100Transition() *uint64 SetECBP1100Transition(n *uint64) error - GetECBP1100DisableTransition() *uint64 - SetECBP1100DisableTransition(n *uint64) error + GetECBP1100DeactivateTransition() *uint64 + SetECBP1100DeactivateTransition(n *uint64) error GetEIP2315Transition() *uint64 SetEIP2315Transition(n *uint64) error diff --git a/params/types/genesisT/genesis.go b/params/types/genesisT/genesis.go index b47a7f1ec0..be6a21e996 100644 --- a/params/types/genesisT/genesis.go +++ b/params/types/genesisT/genesis.go @@ -789,12 +789,12 @@ func (g *Genesis) SetECBP1100Transition(n *uint64) error { return g.Config.SetECBP1100Transition(n) } -func (g *Genesis) GetECBP1100DisableTransition() *uint64 { - return g.Config.GetECBP1100DisableTransition() +func (g *Genesis) GetECBP1100DeactivateTransition() *uint64 { + return g.Config.GetECBP1100DeactivateTransition() } -func (g *Genesis) SetECBP1100DisableTransition(n *uint64) error { - return g.Config.SetECBP1100DisableTransition(n) +func (g *Genesis) SetECBP1100DeactivateTransition(n *uint64) error { + return g.Config.SetECBP1100DeactivateTransition(n) } func (g *Genesis) IsEnabled(fn func() *uint64, n *big.Int) bool { diff --git a/params/types/goethereum/goethereum.go b/params/types/goethereum/goethereum.go index 74d6d505e9..b67fd314d1 100644 --- a/params/types/goethereum/goethereum.go +++ b/params/types/goethereum/goethereum.go @@ -99,8 +99,8 @@ type ChainConfig struct { ECIP1080Transition *big.Int `json:"-"` // Cache types for use with testing, but will not show up in config API. - ecbp1100Transition *big.Int - ecbp1100DisableTransition *big.Int + ecbp1100Transition *big.Int + ecbp1100DeactivateTransition *big.Int Lyra2NonceTransitionBlock *big.Int `json:"lyra2NonceTransitionBlock,omitempty"` } diff --git a/params/types/goethereum/goethereum_configurator.go b/params/types/goethereum/goethereum_configurator.go index dacd9ced5c..e4e8845a63 100644 --- a/params/types/goethereum/goethereum_configurator.go +++ b/params/types/goethereum/goethereum_configurator.go @@ -452,12 +452,12 @@ func (c *ChainConfig) SetECBP1100Transition(n *uint64) error { return nil } -func (c *ChainConfig) GetECBP1100DisableTransition() *uint64 { - return bigNewU64(c.ecbp1100DisableTransition) +func (c *ChainConfig) GetECBP1100DeactivateTransition() *uint64 { + return bigNewU64(c.ecbp1100DeactivateTransition) } -func (c *ChainConfig) SetECBP1100DisableTransition(n *uint64) error { - c.ecbp1100DisableTransition = setBig(c.ecbp1100DisableTransition, n) +func (c *ChainConfig) SetECBP1100DeactivateTransition(n *uint64) error { + c.ecbp1100DeactivateTransition = setBig(c.ecbp1100DeactivateTransition, n) return nil } @@ -705,9 +705,9 @@ func (c *ChainConfig) IsEnabled(fn func() *uint64, n *big.Int) bool { } fnName := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() if strings.Contains(fnName, "ECBP1100Transition") { - disabledTransition := c.GetECBP1100DisableTransition() - if disabledTransition != nil { - return big.NewInt(int64(*disabledTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 + deactivateTransition := c.GetECBP1100DeactivateTransition() + if deactivateTransition != nil { + return big.NewInt(int64(*deactivateTransition)).Cmp(n) > 0 && big.NewInt(int64(*f)).Cmp(n) <= 0 } } return big.NewInt(int64(*f)).Cmp(n) <= 0 From 84b98d990ad291b441ac555a50d347a3e87067e2 Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 6 Dec 2023 08:02:58 -0700 Subject: [PATCH 7/8] cmd/geth,cmd/utils,eth,eth/ethconfig: ECBP100-deactivate: move override flags to --override.X, and categorize these flags. Date: 2023-12-06 08:02:58-07:00 Signed-off-by: meows --- cmd/geth/config.go | 10 +++++----- cmd/geth/main.go | 2 +- cmd/utils/flags.go | 19 ++++++++++--------- eth/backend.go | 19 ++++++++----------- eth/ethconfig/config.go | 2 +- eth/ethconfig/gen_config.go | 4 ++-- 6 files changed, 27 insertions(+), 29 deletions(-) diff --git a/cmd/geth/config.go b/cmd/geth/config.go index 99a962452c..6174d53a0a 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -174,16 +174,16 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) { cfg.Eth.ECBP1100 = new(big.Int).SetUint64(n) } } - if ctx.IsSet(utils.ECBP1100DeactivateFlag.Name) { - if n := ctx.Uint64(utils.ECBP1100DeactivateFlag.Name); n != math.MaxUint64 { - cfg.Eth.ECBP1100Deactivate = new(big.Int).SetUint64(n) - } - } if ctx.IsSet(utils.ECBP1100NoDisableFlag.Name) { if enable := ctx.Bool(utils.ECBP1100NoDisableFlag.Name); enable { cfg.Eth.ECBP1100NoDisable = &enable } } + if ctx.IsSet(utils.OverrideECBP1100DeactivateFlag.Name) { + if n := ctx.Uint64(utils.OverrideECBP1100DeactivateFlag.Name); n != math.MaxUint64 { + cfg.Eth.OverrideECBP1100Deactivate = new(big.Int).SetUint64(n) + } + } if ctx.IsSet(utils.OverrideShanghai.Name) { v := ctx.Uint64(utils.OverrideShanghai.Name) cfg.Eth.OverrideShanghai = &v diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 186e1c626b..0255d798f7 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -167,7 +167,7 @@ var ( utils.MinerNotifyFullFlag, utils.ECBP1100Flag, utils.ECBP1100NoDisableFlag, - utils.ECBP1100DeactivateFlag, + utils.OverrideECBP1100DeactivateFlag, configFileFlag, }, utils.NetworkFlags, utils.DatabasePathFlags) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 558f17b247..2182e0d5d3 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1064,18 +1064,19 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server. Value: "", } ECBP1100Flag = &cli.Uint64Flag{ - Name: "ecbp1100", - Usage: "Configure ECBP-1100 (MESS) block activation number", - Value: math.MaxUint64, + Name: "ecbp1100", // should have been override.ecbp1100, but maintained now for backwards compatibility + Usage: "Manually specify the ECBP-1100 (MESS) block activation number, overriding the bundled setting", + Category: flags.EthCategory, } - ECBP1100DeactivateFlag = &cli.Uint64Flag{ - Name: "ecbp1100.disable", - Usage: "Disable ECBP-1100 (MESS) block activation number", - Value: math.MaxUint64, + OverrideECBP1100DeactivateFlag = &cli.Uint64Flag{ + Name: "override.ecbp1100.deactivate", + Usage: "Manually specify the ECBP-1100 (MESS) deactivation block number, overriding the bundled setting", + Category: flags.EthCategory, } ECBP1100NoDisableFlag = &cli.BoolFlag{ - Name: "ecbp1100.nodisable", - Usage: "Short-circuit ECBP-1100 (MESS) disable mechanisms; (yields a permanent-once-activated state, deactivating auto-shutoff mechanisms)", + Name: "ecbp1100.nodisable", + Usage: "Short-circuit ECBP-1100 (MESS) disable mechanisms; (yields a permanent-once-activated state, deactivating auto-shutoff mechanisms)", + Category: flags.DeprecatedCategory, } MetricsEnableInfluxDBV2Flag = &cli.BoolFlag{ diff --git a/eth/backend.go b/eth/backend.go index 6f87819815..f8232de2e6 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -20,7 +20,6 @@ package eth import ( "errors" "fmt" - "math" "math/big" "runtime" "sync" @@ -231,18 +230,16 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } eth.bloomIndexer.Start(eth.blockchain) // Handle artificial finality config override cases. - if config.ECBP1100 != nil { - if n := config.ECBP1100.Uint64(); n != math.MaxUint64 { - if err := eth.blockchain.Config().SetECBP1100Transition(&n); err != nil { - return nil, err - } + if n := config.ECBP1100; n != nil { + v := n.Uint64() + if err := eth.blockchain.Config().SetECBP1100Transition(&v); err != nil { + return nil, err } } - if config.ECBP1100Deactivate != nil { - if n := config.ECBP1100Deactivate.Uint64(); n != math.MaxUint64 { - if err := eth.blockchain.Config().SetECBP1100DeactivateTransition(&n); err != nil { - return nil, err - } + if n := config.OverrideECBP1100Deactivate; n != nil { + v := n.Uint64() + if err := eth.blockchain.Config().SetECBP1100DeactivateTransition(&v); err != nil { + return nil, err } } diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 626f20716a..417b70f8c8 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -219,7 +219,7 @@ type Config struct { // Manual configuration field for ECBP1100 activation number. Used for modifying genesis config via CLI flag. ECBP1100 *big.Int // Manual configuration field for ECBP1100's disablement block number. Used for modifying genesis config via CLI flag. - ECBP1100Deactivate *big.Int + OverrideECBP1100Deactivate *big.Int // ECBP1100NoDisable overrides // When this value is *true, ECBP100 will not (ever) be disabled; when *false, it will never be enabled. diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go index 109a8666f0..fc71033021 100644 --- a/eth/ethconfig/gen_config.go +++ b/eth/ethconfig/gen_config.go @@ -119,7 +119,7 @@ func (c Config) MarshalTOML() (interface{}, error) { enc.Checkpoint = c.Checkpoint enc.CheckpointOracle = c.CheckpointOracle enc.ECBP1100 = c.ECBP1100 - enc.ECBP1100Disable = c.ECBP1100Deactivate + enc.ECBP1100Disable = c.OverrideECBP1100Deactivate enc.ECBP1100NoDisable = c.ECBP1100NoDisable enc.OverrideShanghai = c.OverrideShanghai @@ -326,7 +326,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { c.ECBP1100 = dec.ECBP1100 } if dec.ECBP1100Disable != nil { - c.ECBP1100Deactivate = dec.ECBP1100Disable + c.OverrideECBP1100Deactivate = dec.ECBP1100Disable } if dec.ECBP1100NoDisable != nil { c.ECBP1100NoDisable = dec.ECBP1100NoDisable From 907295dcdbcc66bf4474eae22f3341c0941ea3b9 Mon Sep 17 00:00:00 2001 From: meows Date: Wed, 6 Dec 2023 08:29:02 -0700 Subject: [PATCH 8/8] params: ECBP1100(MESS): configure deactivation 19_250_000 == Spiral This configures the deactivation of MESS to coincide with the Spiral hardfork. Date: 2023-12-06 08:29:02-07:00 Signed-off-by: meows --- params/config_classic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/config_classic.go b/params/config_classic.go index d734a6d98e..e14286afde 100644 --- a/params/config_classic.go +++ b/params/config_classic.go @@ -82,7 +82,7 @@ var ( EIP2200FBlock: big.NewInt(10_500_839), // RePetersburg (=~ re-1283) ECBP1100FBlock: big.NewInt(11_380_000), // ETA 09 Oct 2020 - ECBP1100DeactivateFBlock: big.NewInt(69_420_123), + ECBP1100DeactivateFBlock: big.NewInt(19_250_000), // ETA 31 Jan 2023 (== Spiral hard fork) ECIP1099FBlock: big.NewInt(11_700_000), // Etchash (DAG size limit) // Berlin eq, aka Magneto