-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable MESS #592
Disable MESS #592
Conversation
…es/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 <b5c6@protonmail.com>
Date: 2023-11-29 14:46:29-07:00 Signed-off-by: meows <b5c6@protonmail.com>
…ble 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 <b5c6@protonmail.com>
@@ -669,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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice hack in order to check if both are enabled, either way it will not stay for too long.
p.s.: I hope I don't read back this comment in 1-2 years and the code is still here :)
I wonder if we also have to handle cases where Shall we force disable and raise a warning? This is what we prefer, on the other way, it's against the user's preference. |
cmd/utils/flags.go
Outdated
@@ -2081,6 +2086,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { | |||
cfg.EthDiscoveryURLs = SplitAndTrim(urls) | |||
} | |||
} | |||
CheckExclusive(ctx, ECBP1100DisableFlag, ECBP1100NoDisableFlag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meowsbits this is probably better to be removed (I added it).
A node operator might indeed want the nodisable
functionality, so if he still wants to enable ECBP-1100 he has to do --ecbp1100.disable=69420123 --ecbp1100.nodisable
.
The thing is that with the above check, this is not allowed.
Good point on the
So its my understanding that conceptually there's no conflict with these flags, although you're definitely right to point to it. |
Oh, so this will not allow MESS to be disabled only once it has been enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
The naming/conceptual conflict of IMO ECBP1100NoDisableFlag = &cli.BoolFlag{
Name: "ecbp1100.nodisable",
Usage: "Short-circuit ECBP-1100 (MESS) disable/safety mechanisms; (yields a permanent-once-activated state, deactivating auto-shutoff mechanisms)",
} // ECBP1100NoDisable overrides
// When this value is *true, ECBP100 will not (ever) be disabled; when *false, it will never be enabled.
ECBP1100NoDisable *bool `toml:",omitempty"` This configuration value is used as: func (bc *BlockChain) EnableArtificialFinality(enable bool, logValues ...interface{}) {
// Short circuit if AF state is enabled and nodisable=true.
if bc.artificialFinalityNoDisable != nil && atomic.LoadInt32(bc.artificialFinalityNoDisable) == 1 &&
bc.IsArtificialFinalityEnabled() && !enable {
log.Warn("Preventing disable artificial finality", "enabled", true, "nodisable", true)
return
} How about renaming our new |
- 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 <b5c6@protonmail.com>
…isT,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 #592 (comment) Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows <b5c6@protonmail.com>
…isT,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 #592 (comment) Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows <b5c6@protonmail.com> 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 <b5c6@protonmail.com>
4552ec1
to
6851fdb
Compare
…isT,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 #592 (comment) Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows <b5c6@protonmail.com> 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 <b5c6@protonmail.com> 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 <b5c6@protonmail.com> core: (lint) remove unnecessary leading newline Date: 2023-12-06 08:09:00-07:00 Signed-off-by: meows <b5c6@protonmail.com>
c8efe9e
to
0f7b11c
Compare
params/config_classic.go
Outdated
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 | ||
ECBP1100DeactivateFBlock: big.NewInt(69_420_123), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not forget to set the block_number here or we wait for this PR to be merged and set it at #595
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just set it here == Spiral 907295d
…isT,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 #592 (comment) Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows <b5c6@protonmail.com> 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 <b5c6@protonmail.com> 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 <b5c6@protonmail.com> core: (lint) remove unnecessary leading newline Date: 2023-12-06 08:09:00-07:00 Signed-off-by: meows <b5c6@protonmail.com> params/types/goethereum: ECBP100: s/disableTransition/deactivateTransition/g Date: 2023-12-06 08:17:12-07:00 Signed-off-by: meows <b5c6@protonmail.com>
0f7b11c
to
18dffe2
Compare
…isT,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 #592 (comment) Date: 2023-12-06 07:21:58-07:00 Signed-off-by: meows <b5c6@protonmail.com> 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 <b5c6@protonmail.com> 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 <b5c6@protonmail.com> core: (lint) remove unnecessary leading newline Date: 2023-12-06 08:09:00-07:00 Signed-off-by: meows <b5c6@protonmail.com> params/types/goethereum: ECBP100: s/disableTransition/deactivateTransition/g Date: 2023-12-06 08:17:12-07:00 Signed-off-by: meows <b5c6@protonmail.com> params/types/coregeth: ECBP100: s/disable/deactivate/g Date: 2023-12-06 08:19:09-07:00 Signed-off-by: meows <b5c6@protonmail.com>
…de flags to --override.X, and categorize these flags. Date: 2023-12-06 08:02:58-07:00 Signed-off-by: meows <b5c6@protonmail.com>
18dffe2
to
84b98d9
Compare
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 <b5c6@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢²
This PR drafts the disablement of MESS/ECBP1100, anticipated to occur on ETC concurrently with the Spiral network upgrade.
Following convention, a configuration override flag
--ecbp1100.disable=[number]
is provided.As-is, this draft uses
runtime
andreflect
at theConfigurator
implementation level to handle the actual enable/disable logic (9e274d0). Alternatively, we could consider instead adding conditions at the places where the configuration is referenced to handle it, like the example below.