2016-04-14 16:18:24 +00:00
|
|
|
// Copyright 2015 The go-ethereum Authors
|
|
|
|
// This file is part of the go-ethereum library.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2015-08-30 08:19:10 +00:00
|
|
|
package vm
|
|
|
|
|
2016-10-20 11:36:29 +00:00
|
|
|
import (
|
2017-01-04 19:17:24 +00:00
|
|
|
"errors"
|
2016-10-20 11:36:29 +00:00
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/params"
|
|
|
|
)
|
2015-08-30 08:19:10 +00:00
|
|
|
|
2017-01-05 10:52:10 +00:00
|
|
|
type (
|
2019-03-12 09:40:05 +00:00
|
|
|
executionFunc func(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error)
|
2019-08-05 08:01:02 +00:00
|
|
|
gasFunc func(*EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64
|
2019-03-12 09:40:05 +00:00
|
|
|
// memorySizeFunc returns the required size, and whether the operation overflowed a uint64
|
|
|
|
memorySizeFunc func(*Stack) (size uint64, overflow bool)
|
2017-01-05 10:52:10 +00:00
|
|
|
)
|
|
|
|
|
2017-01-04 19:17:24 +00:00
|
|
|
var errGasUintOverflow = errors.New("gas uint64 overflow")
|
|
|
|
|
2017-01-05 10:52:10 +00:00
|
|
|
type operation struct {
|
2018-05-29 11:22:00 +00:00
|
|
|
// execute is the operation function
|
2019-03-12 09:40:05 +00:00
|
|
|
execute executionFunc
|
|
|
|
constantGas uint64
|
|
|
|
dynamicGas gasFunc
|
|
|
|
// minStack tells how many stack items are required
|
|
|
|
minStack int
|
|
|
|
// maxStack specifies the max length the stack can have for this operation
|
|
|
|
// to not overflow the stack.
|
|
|
|
maxStack int
|
|
|
|
|
2017-01-05 10:52:10 +00:00
|
|
|
// memorySize returns the memory size required for the operation
|
|
|
|
memorySize memorySizeFunc
|
2017-08-16 14:09:29 +00:00
|
|
|
|
2017-11-14 09:44:40 +00:00
|
|
|
halts bool // indicates whether the operation should halt further execution
|
2017-08-16 14:09:29 +00:00
|
|
|
jumps bool // indicates whether the program counter should not increment
|
|
|
|
writes bool // determines whether this a state modifying operation
|
|
|
|
valid bool // indication whether the retrieved operation is valid and known
|
|
|
|
reverts bool // determines whether the operation reverts state (implicitly halts)
|
2017-11-14 09:44:40 +00:00
|
|
|
returns bool // determines whether the operations sets the return data content
|
2015-08-30 08:19:10 +00:00
|
|
|
}
|
|
|
|
|
2017-02-01 21:36:51 +00:00
|
|
|
var (
|
2019-08-05 08:01:02 +00:00
|
|
|
frontierInstructionSet = newFrontierInstructionSet()
|
|
|
|
homesteadInstructionSet = newHomesteadInstructionSet()
|
|
|
|
tangerineWhistleInstructionSet = newTangerineWhistleInstructionSet()
|
|
|
|
spuriousDragonInstructionSet = newSpuriousDragonInstructionSet()
|
|
|
|
byzantiumInstructionSet = newByzantiumInstructionSet()
|
|
|
|
constantinopleInstructionSet = newConstantinopleInstructionSet()
|
2017-02-01 21:36:51 +00:00
|
|
|
)
|
|
|
|
|
2018-02-23 10:32:57 +00:00
|
|
|
// NewConstantinopleInstructionSet returns the frontier, homestead
|
|
|
|
// byzantium and contantinople instructions.
|
2018-06-26 12:56:25 +00:00
|
|
|
func newConstantinopleInstructionSet() [256]operation {
|
2018-02-23 10:32:57 +00:00
|
|
|
// instructions that can be executed during the byzantium phase.
|
2018-06-26 12:56:25 +00:00
|
|
|
instructionSet := newByzantiumInstructionSet()
|
2018-02-23 10:32:57 +00:00
|
|
|
instructionSet[SHL] = operation{
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSHL,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2018-02-23 10:32:57 +00:00
|
|
|
}
|
|
|
|
instructionSet[SHR] = operation{
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSHR,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2018-02-23 10:32:57 +00:00
|
|
|
}
|
|
|
|
instructionSet[SAR] = operation{
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSAR,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2018-02-23 10:32:57 +00:00
|
|
|
}
|
2018-07-24 15:06:40 +00:00
|
|
|
instructionSet[EXTCODEHASH] = operation{
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opExtCodeHash,
|
|
|
|
constantGas: params.ExtcodeHashGas,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2018-07-24 15:06:40 +00:00
|
|
|
}
|
2018-07-24 14:22:03 +00:00
|
|
|
instructionSet[CREATE2] = operation{
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCreate2,
|
|
|
|
constantGas: params.Create2Gas,
|
|
|
|
dynamicGas: gasCreate2,
|
|
|
|
minStack: minStack(4, 1),
|
|
|
|
maxStack: maxStack(4, 1),
|
|
|
|
memorySize: memoryCreate2,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
|
|
|
returns: true,
|
2018-07-24 14:22:03 +00:00
|
|
|
}
|
2018-02-23 10:32:57 +00:00
|
|
|
return instructionSet
|
|
|
|
}
|
|
|
|
|
2017-09-14 07:07:31 +00:00
|
|
|
// NewByzantiumInstructionSet returns the frontier, homestead and
|
|
|
|
// byzantium instructions.
|
2018-06-26 12:56:25 +00:00
|
|
|
func newByzantiumInstructionSet() [256]operation {
|
2017-08-15 08:23:23 +00:00
|
|
|
// instructions that can be executed during the homestead phase.
|
2019-08-05 08:01:02 +00:00
|
|
|
instructionSet := newSpuriousDragonInstructionSet()
|
2017-08-15 08:23:23 +00:00
|
|
|
instructionSet[STATICCALL] = operation{
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opStaticCall,
|
|
|
|
constantGas: params.CallGasEIP150,
|
|
|
|
dynamicGas: gasStaticCall,
|
|
|
|
minStack: minStack(6, 1),
|
|
|
|
maxStack: maxStack(6, 1),
|
|
|
|
memorySize: memoryStaticCall,
|
|
|
|
valid: true,
|
|
|
|
returns: true,
|
2017-08-15 08:23:23 +00:00
|
|
|
}
|
2017-08-16 10:07:33 +00:00
|
|
|
instructionSet[RETURNDATASIZE] = operation{
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opReturnDataSize,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-08-16 10:07:33 +00:00
|
|
|
}
|
|
|
|
instructionSet[RETURNDATACOPY] = operation{
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opReturnDataCopy,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasReturnDataCopy,
|
|
|
|
minStack: minStack(3, 0),
|
|
|
|
maxStack: maxStack(3, 0),
|
|
|
|
memorySize: memoryReturnDataCopy,
|
|
|
|
valid: true,
|
2017-08-16 10:07:33 +00:00
|
|
|
}
|
2017-08-16 12:32:59 +00:00
|
|
|
instructionSet[REVERT] = operation{
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opRevert,
|
|
|
|
dynamicGas: gasRevert,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
memorySize: memoryRevert,
|
|
|
|
valid: true,
|
|
|
|
reverts: true,
|
|
|
|
returns: true,
|
2017-08-16 12:32:59 +00:00
|
|
|
}
|
2017-08-15 08:23:23 +00:00
|
|
|
return instructionSet
|
|
|
|
}
|
|
|
|
|
2019-08-05 08:01:02 +00:00
|
|
|
// EIP 158 a.k.a Spurious Dragon
|
|
|
|
func newSpuriousDragonInstructionSet() [256]operation {
|
|
|
|
instructionSet := newTangerineWhistleInstructionSet()
|
|
|
|
instructionSet[EXP].dynamicGas = gasExpEIP158
|
|
|
|
return instructionSet
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// EIP 150 a.k.a Tangerine Whistle
|
|
|
|
func newTangerineWhistleInstructionSet() [256]operation {
|
|
|
|
instructionSet := newHomesteadInstructionSet()
|
|
|
|
instructionSet[BALANCE].constantGas = params.BalanceGasEIP150
|
|
|
|
instructionSet[EXTCODESIZE].constantGas = params.ExtcodeSizeGasEIP150
|
|
|
|
instructionSet[SLOAD].constantGas = params.SloadGasEIP150
|
|
|
|
instructionSet[EXTCODECOPY].constantGas = params.ExtcodeCopyBaseEIP150
|
|
|
|
instructionSet[CALL].constantGas = params.CallGasEIP150
|
|
|
|
instructionSet[CALLCODE].constantGas = params.CallGasEIP150
|
|
|
|
instructionSet[DELEGATECALL].constantGas = params.CallGasEIP150
|
|
|
|
return instructionSet
|
|
|
|
}
|
|
|
|
|
2017-05-12 19:35:45 +00:00
|
|
|
// NewHomesteadInstructionSet returns the frontier and homestead
|
|
|
|
// instructions that can be executed during the homestead phase.
|
2018-06-26 12:56:25 +00:00
|
|
|
func newHomesteadInstructionSet() [256]operation {
|
|
|
|
instructionSet := newFrontierInstructionSet()
|
2017-02-01 21:36:51 +00:00
|
|
|
instructionSet[DELEGATECALL] = operation{
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opDelegateCall,
|
|
|
|
dynamicGas: gasDelegateCall,
|
|
|
|
constantGas: params.CallGasFrontier,
|
|
|
|
minStack: minStack(6, 1),
|
|
|
|
maxStack: maxStack(6, 1),
|
|
|
|
memorySize: memoryDelegateCall,
|
|
|
|
valid: true,
|
|
|
|
returns: true,
|
2017-02-01 21:36:51 +00:00
|
|
|
}
|
|
|
|
return instructionSet
|
|
|
|
}
|
2016-01-19 22:50:00 +00:00
|
|
|
|
2017-05-12 19:35:45 +00:00
|
|
|
// NewFrontierInstructionSet returns the frontier instructions
|
|
|
|
// that can be executed during the frontier phase.
|
2018-06-26 12:56:25 +00:00
|
|
|
func newFrontierInstructionSet() [256]operation {
|
2017-01-05 10:52:10 +00:00
|
|
|
return [256]operation{
|
2017-02-08 12:39:26 +00:00
|
|
|
STOP: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opStop,
|
|
|
|
constantGas: 0,
|
|
|
|
minStack: minStack(0, 0),
|
|
|
|
maxStack: maxStack(0, 0),
|
|
|
|
halts: true,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-02-08 12:39:26 +00:00
|
|
|
ADD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opAdd,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MUL: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opMul,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SUB: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSub,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DIV: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opDiv,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SDIV: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSdiv,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MOD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opMod,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SMOD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSmod,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
ADDMOD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opAddmod,
|
|
|
|
constantGas: GasMidStep,
|
|
|
|
minStack: minStack(3, 1),
|
|
|
|
maxStack: maxStack(3, 1),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
MULMOD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opMulmod,
|
|
|
|
constantGas: GasMidStep,
|
|
|
|
minStack: minStack(3, 1),
|
|
|
|
maxStack: maxStack(3, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
EXP: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opExp,
|
2019-08-05 08:01:02 +00:00
|
|
|
dynamicGas: gasExpFrontier,
|
2019-03-12 09:40:05 +00:00
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SIGNEXTEND: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSignExtend,
|
|
|
|
constantGas: GasFastStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
LT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opLt,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
GT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opGt,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SLT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSlt,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SGT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSgt,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
EQ: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opEq,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
ISZERO: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opIszero,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
AND: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opAnd,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
XOR: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opXor,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
OR: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opOr,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-02-08 12:39:26 +00:00
|
|
|
NOT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opNot,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
BYTE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opByte,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SHA3: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opSha3,
|
|
|
|
constantGas: params.Sha3Gas,
|
|
|
|
dynamicGas: gasSha3,
|
|
|
|
minStack: minStack(2, 1),
|
|
|
|
maxStack: maxStack(2, 1),
|
|
|
|
memorySize: memorySha3,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
ADDRESS: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opAddress,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
BALANCE: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opBalance,
|
|
|
|
constantGas: params.BalanceGasFrontier,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
ORIGIN: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opOrigin,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CALLER: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCaller,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CALLVALUE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCallValue,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CALLDATALOAD: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCallDataLoad,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CALLDATASIZE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCallDataSize,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CALLDATACOPY: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCallDataCopy,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasCallDataCopy,
|
|
|
|
minStack: minStack(3, 0),
|
|
|
|
maxStack: maxStack(3, 0),
|
|
|
|
memorySize: memoryCallDataCopy,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CODESIZE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCodeSize,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
CODECOPY: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCodeCopy,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasCodeCopy,
|
|
|
|
minStack: minStack(3, 0),
|
|
|
|
maxStack: maxStack(3, 0),
|
|
|
|
memorySize: memoryCodeCopy,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
GASPRICE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opGasprice,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-02-08 12:39:26 +00:00
|
|
|
EXTCODESIZE: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opExtCodeSize,
|
|
|
|
constantGas: params.ExtcodeSizeGasFrontier,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
EXTCODECOPY: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opExtCodeCopy,
|
|
|
|
constantGas: params.ExtcodeCopyBaseFrontier,
|
|
|
|
dynamicGas: gasExtCodeCopy,
|
|
|
|
minStack: minStack(4, 0),
|
|
|
|
maxStack: maxStack(4, 0),
|
|
|
|
memorySize: memoryExtCodeCopy,
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
BLOCKHASH: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opBlockhash,
|
|
|
|
constantGas: GasExtStep,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
COINBASE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opCoinbase,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
TIMESTAMP: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opTimestamp,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
NUMBER: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opNumber,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DIFFICULTY: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opDifficulty,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
GASLIMIT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opGasLimit,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
POP: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opPop,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(1, 0),
|
|
|
|
maxStack: maxStack(1, 0),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MLOAD: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opMload,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasMLoad,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
memorySize: memoryMLoad,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MSTORE: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opMstore,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasMStore,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
memorySize: memoryMStore,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MSTORE8: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opMstore8,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
dynamicGas: gasMStore8,
|
|
|
|
memorySize: memoryMStore8,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
2016-01-21 14:29:58 +00:00
|
|
|
|
2017-01-05 10:52:10 +00:00
|
|
|
valid: true,
|
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SLOAD: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opSload,
|
|
|
|
constantGas: params.SloadGasFrontier,
|
|
|
|
minStack: minStack(1, 1),
|
|
|
|
maxStack: maxStack(1, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
SSTORE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSstore,
|
|
|
|
dynamicGas: gasSStore,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-02-08 12:39:26 +00:00
|
|
|
JUMP: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opJump,
|
|
|
|
constantGas: GasMidStep,
|
|
|
|
minStack: minStack(1, 0),
|
|
|
|
maxStack: maxStack(1, 0),
|
|
|
|
jumps: true,
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
JUMPI: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opJumpi,
|
|
|
|
constantGas: GasSlowStep,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
jumps: true,
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PC: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opPc,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
MSIZE: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opMsize,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
GAS: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opGas,
|
|
|
|
constantGas: GasQuickStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-02-08 12:39:26 +00:00
|
|
|
JUMPDEST: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opJumpdest,
|
|
|
|
constantGas: params.JumpdestGas,
|
|
|
|
minStack: minStack(0, 0),
|
|
|
|
maxStack: maxStack(0, 0),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH1: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opPush1,
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH2: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(2, 2),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH3: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(3, 3),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH4: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(4, 4),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH5: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(5, 5),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH6: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(6, 6),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH7: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(7, 7),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH8: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(8, 8),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH9: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(9, 9),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH10: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(10, 10),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH11: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(11, 11),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH12: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(12, 12),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH13: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(13, 13),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH14: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(14, 14),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH15: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(15, 15),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH16: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(16, 16),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH17: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(17, 17),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH18: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(18, 18),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH19: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(19, 19),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH20: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(20, 20),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH21: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(21, 21),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH22: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(22, 22),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH23: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(23, 23),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH24: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(24, 24),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH25: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(25, 25),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH26: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(26, 26),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH27: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(27, 27),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH28: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(28, 28),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH29: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(29, 29),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH30: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(30, 30),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH31: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(31, 31),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
PUSH32: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makePush(32, 32),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minStack(0, 1),
|
|
|
|
maxStack: maxStack(0, 1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP1: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(1),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(1),
|
|
|
|
maxStack: maxDupStack(1),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP2: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(2),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(2),
|
|
|
|
maxStack: maxDupStack(2),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP3: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(3),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(3),
|
|
|
|
maxStack: maxDupStack(3),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP4: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(4),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(4),
|
|
|
|
maxStack: maxDupStack(4),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP5: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(5),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(5),
|
|
|
|
maxStack: maxDupStack(5),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP6: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(6),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(6),
|
|
|
|
maxStack: maxDupStack(6),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP7: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(7),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(7),
|
|
|
|
maxStack: maxDupStack(7),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP8: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(8),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(8),
|
|
|
|
maxStack: maxDupStack(8),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP9: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(9),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(9),
|
|
|
|
maxStack: maxDupStack(9),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP10: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(10),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(10),
|
|
|
|
maxStack: maxDupStack(10),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP11: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(11),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(11),
|
|
|
|
maxStack: maxDupStack(11),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP12: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(12),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(12),
|
|
|
|
maxStack: maxDupStack(12),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP13: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(13),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(13),
|
|
|
|
maxStack: maxDupStack(13),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP14: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(14),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(14),
|
|
|
|
maxStack: maxDupStack(14),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP15: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(15),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(15),
|
|
|
|
maxStack: maxDupStack(15),
|
|
|
|
valid: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2017-01-06 14:52:03 +00:00
|
|
|
DUP16: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeDup(16),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minDupStack(16),
|
|
|
|
maxStack: maxDupStack(16),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP1: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(1),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(2),
|
|
|
|
maxStack: maxSwapStack(2),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP2: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(2),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(3),
|
|
|
|
maxStack: maxSwapStack(3),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP3: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(3),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(4),
|
|
|
|
maxStack: maxSwapStack(4),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP4: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(4),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(5),
|
|
|
|
maxStack: maxSwapStack(5),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP5: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(5),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(6),
|
|
|
|
maxStack: maxSwapStack(6),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP6: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(6),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(7),
|
|
|
|
maxStack: maxSwapStack(7),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP7: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(7),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(8),
|
|
|
|
maxStack: maxSwapStack(8),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP8: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(8),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(9),
|
|
|
|
maxStack: maxSwapStack(9),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP9: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(9),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(10),
|
|
|
|
maxStack: maxSwapStack(10),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP10: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(10),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(11),
|
|
|
|
maxStack: maxSwapStack(11),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP11: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(11),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(12),
|
|
|
|
maxStack: maxSwapStack(12),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP12: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(12),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(13),
|
|
|
|
maxStack: maxSwapStack(13),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP13: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(13),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(14),
|
|
|
|
maxStack: maxSwapStack(14),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP14: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(14),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(15),
|
|
|
|
maxStack: maxSwapStack(15),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP15: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(15),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(16),
|
|
|
|
maxStack: maxSwapStack(16),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SWAP16: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeSwap(16),
|
|
|
|
constantGas: GasFastestStep,
|
|
|
|
minStack: minSwapStack(17),
|
|
|
|
maxStack: maxSwapStack(17),
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
LOG0: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeLog(0),
|
|
|
|
dynamicGas: makeGasLog(0),
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
LOG1: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeLog(1),
|
|
|
|
dynamicGas: makeGasLog(1),
|
|
|
|
minStack: minStack(3, 0),
|
|
|
|
maxStack: maxStack(3, 0),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
LOG2: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeLog(2),
|
|
|
|
dynamicGas: makeGasLog(2),
|
|
|
|
minStack: minStack(4, 0),
|
|
|
|
maxStack: maxStack(4, 0),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
LOG3: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeLog(3),
|
|
|
|
dynamicGas: makeGasLog(3),
|
|
|
|
minStack: minStack(5, 0),
|
|
|
|
maxStack: maxStack(5, 0),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
LOG4: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: makeLog(4),
|
|
|
|
dynamicGas: makeGasLog(4),
|
|
|
|
minStack: minStack(6, 0),
|
|
|
|
maxStack: maxStack(6, 0),
|
|
|
|
memorySize: memoryLog,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
CREATE: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCreate,
|
|
|
|
constantGas: params.CreateGas,
|
|
|
|
dynamicGas: gasCreate,
|
|
|
|
minStack: minStack(3, 1),
|
|
|
|
maxStack: maxStack(3, 1),
|
|
|
|
memorySize: memoryCreate,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
|
|
|
returns: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
CALL: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCall,
|
|
|
|
constantGas: params.CallGasFrontier,
|
|
|
|
dynamicGas: gasCall,
|
|
|
|
minStack: minStack(7, 1),
|
|
|
|
maxStack: maxStack(7, 1),
|
|
|
|
memorySize: memoryCall,
|
|
|
|
valid: true,
|
|
|
|
returns: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
CALLCODE: {
|
2019-08-05 08:01:02 +00:00
|
|
|
execute: opCallCode,
|
|
|
|
constantGas: params.CallGasFrontier,
|
|
|
|
dynamicGas: gasCallCode,
|
|
|
|
minStack: minStack(7, 1),
|
|
|
|
maxStack: maxStack(7, 1),
|
|
|
|
memorySize: memoryCall,
|
|
|
|
valid: true,
|
|
|
|
returns: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
RETURN: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opReturn,
|
|
|
|
dynamicGas: gasReturn,
|
|
|
|
minStack: minStack(2, 0),
|
|
|
|
maxStack: maxStack(2, 0),
|
|
|
|
memorySize: memoryReturn,
|
|
|
|
halts: true,
|
|
|
|
valid: true,
|
2017-02-08 12:39:26 +00:00
|
|
|
},
|
|
|
|
SELFDESTRUCT: {
|
2019-03-12 09:40:05 +00:00
|
|
|
execute: opSuicide,
|
2019-08-05 08:01:02 +00:00
|
|
|
dynamicGas: gasSelfdestruct,
|
2019-03-12 09:40:05 +00:00
|
|
|
minStack: minStack(1, 0),
|
|
|
|
maxStack: maxStack(1, 0),
|
|
|
|
halts: true,
|
|
|
|
valid: true,
|
|
|
|
writes: true,
|
2017-01-05 10:52:10 +00:00
|
|
|
},
|
2016-01-19 22:50:00 +00:00
|
|
|
}
|
2015-08-30 08:19:10 +00:00
|
|
|
}
|