* Rollup evm to geth v1.9.9 Muir Glacier
* fix go gen
* update intrinsic gas for istanbul
* Update statedb.Commit
* revert go gen result
* revert protobuf version
* update protobuf
* update go gen files
* set testnet epoch for evm upgrade
// 0. If *gasleft* is less than or equal to 2300, fail the current call.
// 1. If current value equals new value (this is a no-op), SSTORE_NOOP_GAS gas is deducted.
// 2. If current value does not equal new value:
// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context):
// 2.1.1. If original value is 0, SSTORE_INIT_GAS gas is deducted.
// 2.1.2. Otherwise, SSTORE_CLEAN_GAS gas is deducted. If new value is 0, add SSTORE_CLEAR_REFUND to refund counter.
// 2.2. If original value does not equal current value (this storage slot is dirty), SSTORE_DIRTY_GAS gas is deducted. Apply both of the following clauses:
// 2.2.1. If original value is not 0:
// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEAR_REFUND gas from refund counter. We can prove that refund counter will never go below 0.
// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEAR_REFUND gas to refund counter.
// 2.2.2. If original value equals new value (this storage slot is reset):
// 2.2.2.1. If original value is 0, add SSTORE_INIT_REFUND to refund counter.
// 2.2.2.2. Otherwise, add SSTORE_CLEAN_REFUND gas to refund counter.
GasLimitBoundDivisoruint64=1024// The bound divisor of the gas limit, used in update calculations.
@ -64,6 +67,23 @@ const (
// NetSstoreResetClearRefund ...
NetSstoreResetClearRefunduint64=19800// Once per SSTORE operation for resetting to the original zero value
// SstoreSentryGasEIP2200 ...
SstoreSentryGasEIP2200uint64=2300// Minimum gas required to be present for an SSTORE call, not consumed
// SstoreNoopGasEIP2200 ...
SstoreNoopGasEIP2200uint64=800// Once per SSTORE operation if the value doesn't change.
// SstoreDirtyGasEIP2200 ...
SstoreDirtyGasEIP2200uint64=800// Once per SSTORE operation if a dirty value is changed.
// SstoreInitGasEIP2200 ...
SstoreInitGasEIP2200uint64=20000// Once per SSTORE operation from clean zero to non-zero
// SstoreInitRefundEIP2200 ...
SstoreInitRefundEIP2200uint64=19200// Once per SSTORE operation for resetting to the original zero value
// SstoreCleanGasEIP2200 ...
SstoreCleanGasEIP2200uint64=5000// Once per SSTORE operation from clean non-zero to something else
// SstoreCleanRefundEIP2200 ...
SstoreCleanRefundEIP2200uint64=4200// Once per SSTORE operation for resetting to the original non-zero value
// SstoreClearRefundEIP2200 ...
SstoreClearRefundEIP2200uint64=15000// Once per SSTORE operation for clearing an originally existing storage slot
// JumpdestGas ...
JumpdestGasuint64=1// Refunded gas, once per SSTORE operation if the zeroness changes to zero.
// EpochDuration ...
@ -90,40 +110,72 @@ const (
CreateGasuint64=32000// Once per CREATE operation & contract-creation transaction.
// Create2Gas ...
Create2Gasuint64=32000// Once per CREATE2 operation
// SuicideRefundGas ...
SuicideRefundGasuint64=24000// Refunded following a suicide operation.
// SelfdestructRefundGas ...
SelfdestructRefundGasuint64=24000// Refunded following a selfdestruct operation.
// MemoryGas ...
MemoryGasuint64=3// Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL.
// TxDataNonZeroGas ...
TxDataNonZeroGasuint64=68// Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions.
TxDataNonZeroGasFrontieruint64=68// Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions.
// TxDataNonZeroGasEIP2028 ...
TxDataNonZeroGasEIP2028uint64=16// Per byte of non zero data attached to a transaction after EIP 2028 (part in Istanbul)
// These have been changed during the course of the chain
CallGasFrontieruint64=40// Once per CALL operation & message call transaction.
CallGasEIP150uint64=700// Static portion of gas for CALL-derivates after EIP 150 (Tangerine)
BalanceGasFrontieruint64=20// The cost of a BALANCE operation
BalanceGasEIP150uint64=400// The cost of a BALANCE operation after Tangerine
BalanceGasEIP1884uint64=700// The cost of a BALANCE operation after EIP 1884 (part of Istanbul)
ExtcodeSizeGasFrontieruint64=20// Cost of EXTCODESIZE before EIP 150 (Tangerine)
ExtcodeSizeGasEIP150uint64=700// Cost of EXTCODESIZE after EIP 150 (Tangerine)
SloadGasFrontieruint64=50
SloadGasEIP150uint64=200
SloadGasEIP1884uint64=800// Cost of SLOAD after EIP 1884 (part of Istanbul)
ExtcodeHashGasConstantinopleuint64=400// Cost of EXTCODEHASH (introduced in Constantinople)
ExtcodeHashGasEIP1884uint64=700// Cost of EXTCODEHASH after EIP 1884 (part in Istanbul)
SelfdestructGasEIP150uint64=5000// Cost of SELFDESTRUCT post EIP 150 (Tangerine)
// EXP has a dynamic portion depending on the size of the exponent
ExpByteFrontieruint64=10// was set to 10 in Frontier
ExpByteEIP158uint64=50// was raised to 50 during Eip158 (Spurious Dragon)
// Extcodecopy has a dynamic AND a static cost. This represents only the
// static portion of the gas. It was changed during EIP 150 (Tangerine)
ExtcodeCopyBaseFrontieruint64=20
ExtcodeCopyBaseEIP150uint64=700
// CreateBySelfdestructGas is used when the refunded account is one that does
// not exist. This logic is similar to call.
// Introduced in Tangerine Whistle (Eip 150)
CreateBySelfdestructGasuint64=25000
// MaxCodeSize ...
MaxCodeSize=24576// Maximum bytecode to permit for a contract
// Precompiled contract gas prices
// EcrecoverGas ...
EcrecoverGasuint64=3000// Elliptic curve sender recovery gas price
// Sha256BaseGas ...
Sha256BaseGasuint64=60// Base price for a SHA256 operation
// Sha256PerWordGas ...
Sha256PerWordGasuint64=12// Per-word price for a SHA256 operation
// Ripemd160BaseGas ...
Ripemd160BaseGasuint64=600// Base price for a RIPEMD160 operation
// Ripemd160PerWordGas ...
Ripemd160PerWordGasuint64=120// Per-word price for a RIPEMD160 operation
// IdentityBaseGas ...
IdentityBaseGasuint64=15// Base price for a data copy operation
// IdentityPerWordGas ...
IdentityPerWordGasuint64=3// Per-work price for a data copy operation
// ModExpQuadCoeffDiv ...
ModExpQuadCoeffDivuint64=20// Divisor for the quadratic particle of the big int modular exponentiation
// Bn256AddGas ...
Bn256AddGasuint64=500// Gas needed for an elliptic curve addition
// Bn256ScalarMulGas ...
Bn256ScalarMulGasuint64=40000// Gas needed for an elliptic curve scalar multiplication
// Bn256PairingBaseGas ...
Bn256PairingBaseGasuint64=100000// Base price for an elliptic curve pairing check
// Bn256PairingPerPointGas ...
Bn256PairingPerPointGasuint64=80000// Per-point price for an elliptic curve pairing check
EcrecoverGasuint64=3000// Elliptic curve sender recovery gas price
Sha256BaseGasuint64=60// Base price for a SHA256 operation
Sha256PerWordGasuint64=12// Per-word price for a SHA256 operation
Ripemd160BaseGasuint64=600// Base price for a RIPEMD160 operation
Ripemd160PerWordGasuint64=120// Per-word price for a RIPEMD160 operation
IdentityBaseGasuint64=15// Base price for a data copy operation
IdentityPerWordGasuint64=3// Per-work price for a data copy operation
ModExpQuadCoeffDivuint64=20// Divisor for the quadratic particle of the big int modular exponentiation
Bn256AddGasByzantiumuint64=500// Byzantium gas needed for an elliptic curve addition
Bn256AddGasIstanbuluint64=150// Gas needed for an elliptic curve addition
Bn256ScalarMulGasByzantiumuint64=40000// Byzantium gas needed for an elliptic curve scalar multiplication
Bn256ScalarMulGasIstanbuluint64=6000// Gas needed for an elliptic curve scalar multiplication
Bn256PairingBaseGasByzantiumuint64=100000// Byzantium base price for an elliptic curve pairing check
Bn256PairingBaseGasIstanbuluint64=45000// Base price for an elliptic curve pairing check
Bn256PairingPerPointGasByzantiumuint64=80000// Byzantium per-point price for an elliptic curve pairing check
Bn256PairingPerPointGasIstanbuluint64=34000// Per-point price for an elliptic curve pairing check
)
// nolint
var(
DifficultyBoundDivisor=big.NewInt(2048)// The bound divisor of the difficulty, used in the update calculations.
GenesisDifficulty=big.NewInt(131072)// Difficulty of the Genesis block.
MinimumDifficulty=big.NewInt(131072)// The minimum that the difficulty may ever be.
DurationLimit=big.NewInt(13)// The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.