core/vm: 1884-changes to extcodehash, move selfbalance opcode

This commit is contained in:
Martin Holst Swende 2019-08-06 14:14:13 +02:00
parent df2ec6d63c
commit acbb531492
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 4 additions and 4 deletions

View file

@ -18,8 +18,6 @@ package vm
import "fmt"
// EnableEIP enables the given EIP on the config.
// This operation write in-place, and callers need to ensure that the globally
// defined jumptables are not polluted
@ -35,11 +33,13 @@ func EnableEIP(eipNum int, jt *JumpTable) error {
// Enable1884 applies EIP-1884 to the given jumptable
// - Increase cost of BALANCE to 700
// - Increase cost of EXTCODEHASH to 700
// - Increase cost of SLOAD to 800
// - Define SELFBALANCE, with cost GasFastStep
// - Define SELFBALANCE, with cost GasFastStep (5)
func enable1884(jt *JumpTable) {
// Gas cost changes
jt[BALANCE].constantGas = 700
jt[EXTCODEHASH].constantGas = 700
jt[SLOAD].constantGas = 800
// New opcode
jt[SELFBALANCE] = operation{

View file

@ -101,7 +101,7 @@ const (
NUMBER
DIFFICULTY
GASLIMIT
SELFBALANCE
SELFBALANCE = 0x47
)
// 0x50 range - 'storage' and execution.