etclabscore / multi-geth-fork

GNU Lesser General Public License v3.0
3 stars 8 forks source link

feat: chainconfig iface use array to represent feature enablement #138

Open meowsbits opened 4 years ago

meowsbits commented 4 years ago

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