Skip to content
Merged
2 changes: 1 addition & 1 deletion core/vm/jump_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func instructionSetForConfig(config ctypes.ChainConfigurator, bn *big.Int) JumpT
if config.IsForked(config.GetECIP1080Transition, bn) {
enableSelfBalance(&instructionSet)
}
if config.IsForked(config.GetEIP2200Transition, bn) {
if config.IsForked(config.GetEIP2200Transition, bn) && !config.IsForked(config.GetEIP2200DisableTransition, bn) {
enable2200(&instructionSet) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200
}
return instructionSet
Expand Down
22 changes: 13 additions & 9 deletions params/config_classic.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,25 @@ var (
EIP214FBlock: big.NewInt(8772000),
EIP658FBlock: big.NewInt(8772000),

// Constantinople eq
// Constantinople eq, aka Agharta
EIP145FBlock: big.NewInt(9573000),
EIP1014FBlock: big.NewInt(9573000),
EIP1052FBlock: big.NewInt(9573000),

// Istanbul eq
EIP152FBlock: big.NewInt(10500839),
EIP1108FBlock: big.NewInt(10500839),
EIP1344FBlock: big.NewInt(10500839),
// Istanbul eq, aka Aztlan
// ECIP-1061
EIP152FBlock: big.NewInt(10_500_839),
EIP1108FBlock: big.NewInt(10_500_839),
EIP1344FBlock: big.NewInt(10_500_839),
EIP1884FBlock: nil,
EIP2028FBlock: big.NewInt(10500839),
EIP2200FBlock: big.NewInt(10500839), // RePetersburg (=~ re-1283)
EIP2028FBlock: big.NewInt(10_500_839),
EIP2200FBlock: big.NewInt(10_500_839), // RePetersburg (=~ re-1283)

EIP1283FBlock: nil,
PetersburgBlock: nil, // Un1283
// ECIP-1078, aka Phoenix Fix
EIP2200DisableFBlock: big.NewInt(10_500_839),
EIP1283FBlock: big.NewInt(10_500_839),
EIP1706FBlock: big.NewInt(10_500_839),
ECIP1080FBlock: big.NewInt(10_500_839),

DisposalBlock: big.NewInt(5900000),
ECIP1017FBlock: big.NewInt(5000000),
Expand Down
11 changes: 9 additions & 2 deletions params/config_kotti.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,26 @@ var (
EIP214FBlock: big.NewInt(716617),
EIP658FBlock: big.NewInt(716617),

// Constantinople eq
// Constantinople eq, aka Agharta
EIP145FBlock: big.NewInt(1705549),
EIP1014FBlock: big.NewInt(1705549),
EIP1052FBlock: big.NewInt(1705549),

// Istanbul eq
// Istanbul eq, aka Aztlan
// ECIP-1061
EIP152FBlock: big.NewInt(2058191),
EIP1108FBlock: big.NewInt(2058191),
EIP1344FBlock: big.NewInt(2058191),
EIP1884FBlock: nil,
Comment thread
meowsbits marked this conversation as resolved.
EIP2028FBlock: big.NewInt(2058191),
EIP2200FBlock: big.NewInt(2058191), // RePetersburg (== re-1283)

// ECIP-1078, aka Phoenix Fix
EIP2200DisableFBlock: big.NewInt(2_208_203),
EIP1283FBlock: big.NewInt(2_208_203),
EIP1706FBlock: big.NewInt(2_208_203),
ECIP1080FBlock: big.NewInt(2_208_203),

ECIP1017FBlock: big.NewInt(5000000),
ECIP1017EraRounds: big.NewInt(5000000),

Expand Down
11 changes: 9 additions & 2 deletions params/config_mordor.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,26 @@ var (
EIP214FBlock: big.NewInt(0),
EIP658FBlock: big.NewInt(0),

// Constantinople eq
// Constantinople eq, aka Agharta
EIP145FBlock: big.NewInt(301243),
EIP1014FBlock: big.NewInt(301243),
EIP1052FBlock: big.NewInt(301243),

// Istanbul eq
// Istanbul eq, aka Aztlan
// ECIP-1061
EIP152FBlock: big.NewInt(778507),
EIP1108FBlock: big.NewInt(778507),
EIP1344FBlock: big.NewInt(778507),
EIP1884FBlock: nil,
EIP2028FBlock: big.NewInt(778507),
EIP2200FBlock: big.NewInt(778507), // RePetersburg (== re-1283)

// ECIP-1078, aka Phoenix Fix
EIP2200DisableFBlock: big.NewInt(976_231),
EIP1283FBlock: big.NewInt(976_231),
EIP1706FBlock: big.NewInt(976_231),
ECIP1080FBlock: big.NewInt(976_231),

DisposalBlock: big.NewInt(0),
ECIP1017FBlock: big.NewInt(0),
ECIP1017EraRounds: big.NewInt(2000000),
Expand Down
2 changes: 2 additions & 0 deletions params/types/ctypes/configurator_iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ type CatHerder interface {
SetEIP1108Transition(n *uint64) error
GetEIP2200Transition() *uint64
SetEIP2200Transition(n *uint64) error
GetEIP2200DisableTransition() *uint64
SetEIP2200DisableTransition(n *uint64) error
GetEIP1344Transition() *uint64
SetEIP1344Transition(n *uint64) error
GetEIP1884Transition() *uint64
Expand Down
8 changes: 8 additions & 0 deletions params/types/genesisT/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ func (g *Genesis) SetEIP2200Transition(n *uint64) error {
return g.Config.SetEIP2200Transition(n)
}

func (g *Genesis) GetEIP2200DisableTransition() *uint64 {
return g.Config.GetEIP2200DisableTransition()
}

func (g *Genesis) SetEIP2200DisableTransition(n *uint64) error {
return g.Config.SetEIP2200DisableTransition(n)
}

func (g *Genesis) GetEIP1344Transition() *uint64 {
return g.Config.GetEIP1344Transition()
}
Expand Down
11 changes: 11 additions & 0 deletions params/types/goethereum/goethereum_configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,17 @@ func (c *ChainConfig) SetEIP2200Transition(n *uint64) error {
return nil
}

func (c *ChainConfig) GetEIP2200DisableTransition() *uint64 {
return nil
}

func (c *ChainConfig) SetEIP2200DisableTransition(n *uint64) error {
if n == nil {
return nil
}
return ctypes.ErrUnsupportedConfigFatal
}

func (c *ChainConfig) GetEIP1344Transition() *uint64 {
return bigNewU64(c.IstanbulBlock)
}
Expand Down
3 changes: 2 additions & 1 deletion params/types/multigeth/chain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ type MultiGethChainConfig struct {
// EIP-2200: Rebalance net-metered SSTORE gas cost with consideration of SLOAD gas cost change
// It's a combined version of EIP-1283 + EIP-1706, with a structured definition so as to make it
// interoperable with other gas changes such as EIP-1884.
EIP2200FBlock *big.Int `json:"eip2200FBlock,omitempty"`
EIP2200FBlock *big.Int `json:"eip2200FBlock,omitempty"`
EIP2200DisableFBlock *big.Int `json:"eip2200DisableFBlock,omitempty"`

// EIP-2384: Difficulty Bomb Delay (Muir Glacier)
eip2384Inferred bool
Expand Down
9 changes: 9 additions & 0 deletions params/types/multigeth/chain_config_configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ func (c *MultiGethChainConfig) SetEIP2200Transition(n *uint64) error {
return nil
}

func (c *MultiGethChainConfig) GetEIP2200DisableTransition() *uint64 {
return bigNewU64(c.EIP2200DisableFBlock)
}

func (c *MultiGethChainConfig) SetEIP2200DisableTransition(n *uint64) error {
c.EIP2200DisableFBlock = setBig(c.EIP2200DisableFBlock, n)
return nil
}

func (c *MultiGethChainConfig) GetEIP1344Transition() *uint64 {
return bigNewU64(c.EIP1344FBlock)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,17 @@ func (c *ChainConfig) SetEIP2200Transition(n *uint64) error {
return nil
}

func (c *ChainConfig) GetEIP2200DisableTransition() *uint64 {
return nil
}

func (c *ChainConfig) SetEIP2200DisableTransition(n *uint64) error {
if n == nil {
return nil
}
return ctypes.ErrUnsupportedConfigFatal
}

func (c *ChainConfig) GetEIP1344Transition() *uint64 {
return bigNewU64(c.IstanbulBlock)
}
Expand Down
11 changes: 11 additions & 0 deletions params/types/parity/parity_configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ func (spec *ParityChainSpec) SetEIP2200Transition(i *uint64) error {
return nil
}

func (spec *ParityChainSpec) GetEIP2200DisableTransition() *uint64 {
return nil
}

func (spec *ParityChainSpec) SetEIP2200DisableTransition(n *uint64) error {
if n == nil {
return nil
}
return ctypes.ErrUnsupportedConfigFatal
}

func (spec *ParityChainSpec) GetEIP1344Transition() *uint64 {
return spec.Params.EIP1344Transition.Uint64P()
}
Expand Down