core-geth icon indicating copy to clipboard operation
core-geth copied to clipboard

feat: chainconfig iface use array to represent feature enablement

Open meowsbits opened this issue 5 years ago • 0 comments

Migrated from: https://github.com/etclabscore/multi-geth-fork/issues/138 Original author: @meowsbits


ECIP1078 proposes to Disable EIP2200. Disabling features happens more rarely than enabling them, but this will not be the first case (nor likely the last).

The current interface here and in other clients treats Fork Features as one-time-on values, and disabling them requires adhoc one-time-off configuration and supportive business logic. This is pretty ugly.

Proposing here to use instead an idea of "Feature Enabled Ranges" which would be arrays of block numbers, rather than lone number values.

eg.

FeatureATransitions = [1420000] // Enable feature without (ever, yet) disabling
FeatureBTransitions = [1420000, 1950000] // Enable feature from blocks 1420000 through 1950000
FeatureCTransitions = [1420000, 1950000, 2120000] // Enable, disable, then reenable the feature.

All mod%1=1 index array values are enabling feature, all ==0 are disabling.

Rel #137

meowsbits avatar Feb 19 '20 16:02 meowsbits