diff --git a/core/vm/eips.go b/core/vm/eips.go index c410a63dd5..72a413b45c 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -107,7 +107,7 @@ func opChainID(pc *uint64, interpreter *EVMInterpreter, callContext *callCtx) ([ // enable2200 applies EIP-2200 (Rebalance net-metered SSTORE) func enable2200(jt *JumpTable) { - // TODO(meowsbits): audit this + jt[SLOAD].constantGas = vars.SloadGasEIP2200 jt[SSTORE].dynamicGas = gasSStoreEIP2200 } diff --git a/params/vars/protocol_params.go b/params/vars/protocol_params.go index 09646d5a01..ee2b909ff3 100644 --- a/params/vars/protocol_params.go +++ b/params/vars/protocol_params.go @@ -103,11 +103,11 @@ var ( ExtcodeSizeGasEIP150 uint64 = 700 // Cost of EXTCODESIZE after EIP 150 (Tangerine) SloadGasFrontier uint64 = 50 SloadGasEIP150 uint64 = 200 - SloadGasEIP1884 uint64 = 800 // Cost of SLOAD after EIP 1884 (part of Istanbul) - SloadGasEIP2200 uint64 = 800 // Cost of SLOAD after EIP 2200 (part of Istanbul) - ExtcodeHashGasConstantinople uint64 = 400 // Cost of EXTCODEHASH (introduced in Constantinople) - ExtcodeHashGasEIP1884 uint64 = 700 // Cost of EXTCODEHASH after EIP 1884 (part in Istanbul) - SelfdestructGasEIP150 uint64 = 5000 // Cost of SELFDESTRUCT post EIP 150 (Tangerine) + SloadGasEIP1884 uint64 = 800 // Cost of SLOAD after EIP 1884 (part of Istanbul) + SloadGasEIP2200 uint64 = SloadGasEIP1884 // Cost of SLOAD after EIP 2200 (part of Istanbul). + ExtcodeHashGasConstantinople uint64 = 400 // Cost of EXTCODEHASH (introduced in Constantinople) + ExtcodeHashGasEIP1884 uint64 = 700 // Cost of EXTCODEHASH after EIP 1884 (part in Istanbul) + SelfdestructGasEIP150 uint64 = 5000 // Cost of SELFDESTRUCT post EIP 150 (Tangerine) // EXP has a dynamic portion depending on the size of the exponent ExpByteFrontier uint64 = 10 // was set to 10 in Frontier