From 3e993ff64a9c2e9651fae11aaee55032cd6b0c3e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 8 Aug 2019 11:07:23 +0200 Subject: Eip 1884 v3 (#19743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * core/vm, tests: implement EIP 1884, add support for feature-tests * core/vm: 1884-changes to extcodehash, move selfbalance opcode * tests: fix statetests * core/vm: move constants, address review concerns * core/vm: word formatting Co-Authored-By: Péter Szilágyi --- params/protocol_params.go | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'params') diff --git a/params/protocol_params.go b/params/protocol_params.go index 110fc16ec..943788be8 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -70,16 +70,19 @@ const ( TxDataNonZeroGas uint64 = 68 // Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions. // These have been changed during the course of the chain - CallGasFrontier uint64 = 40 // Once per CALL operation & message call transaction. - CallGasEIP150 uint64 = 700 // Static portion of gas for CALL-derivates after EIP 150 (Tangerine) - BalanceGasFrontier uint64 = 20 // The cost of a BALANCE operation - BalanceGasEIP150 uint64 = 400 // The cost of a BALANCE operation after Tangerine - ExtcodeSizeGasFrontier uint64 = 20 // Cost of EXTCODESIZE before EIP 150 (Tangerine) - ExtcodeSizeGasEIP150 uint64 = 700 // Cost of EXTCODESIZE after EIP 150 (Tangerine) - SloadGasFrontier uint64 = 50 - SloadGasEIP150 uint64 = 200 - ExtcodeHashGas uint64 = 400 // Cost of EXTCODEHASH (introduced in Constantinople) - SelfdestructGasEIP150 uint64 = 5000 // Cost of SELFDESTRUCT post EIP 150 (Tangerine) + CallGasFrontier uint64 = 40 // Once per CALL operation & message call transaction. + CallGasEIP150 uint64 = 700 // Static portion of gas for CALL-derivates after EIP 150 (Tangerine) + BalanceGasFrontier uint64 = 20 // The cost of a BALANCE operation + BalanceGasEIP150 uint64 = 400 // The cost of a BALANCE operation after Tangerine + BalanceGasEIP1884 uint64 = 700 // The cost of a BALANCE operation after EIP 1884 (part of Istanbul) + ExtcodeSizeGasFrontier uint64 = 20 // Cost of EXTCODESIZE before EIP 150 (Tangerine) + 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) + 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 -- cgit v1.2.3