Skip to content

Commit

Permalink
evm: no interface (#8376)
Browse files Browse the repository at this point in the history
after removal of tevm experiment - we left interfaces everywhere 
removing it for performance and for geth compatibility
  • Loading branch information
AskAlexSharov authored Oct 5, 2023
1 parent b107a97 commit c293883
Show file tree
Hide file tree
Showing 26 changed files with 58 additions and 97 deletions.
4 changes: 2 additions & 2 deletions cmd/state/commands/opcode_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ type opcodeTracer struct {
saveBblocks bool
blockNumber uint64
depth int
env vm.VMInterface
env *vm.EVM
}

func NewOpcodeTracer(blockNum uint64, saveOpcodes bool, saveBblocks bool) *opcodeTracer {
Expand Down Expand Up @@ -195,7 +195,7 @@ func (ot *opcodeTracer) captureStartOrEnter(from, to libcommon.Address, create b
ot.stack = append(ot.stack, &newTx)
}

func (ot *opcodeTracer) CaptureStart(env vm.VMInterface, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
func (ot *opcodeTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
ot.env = env
ot.depth = 0
ot.captureStartOrEnter(from, to, create, input)
Expand Down
2 changes: 1 addition & 1 deletion cmd/state/exec3/calltracer_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (ct *CallTracer) Tos() map[libcommon.Address]struct{} { return ct.tos }

func (ct *CallTracer) CaptureTxStart(gasLimit uint64) {}
func (ct *CallTracer) CaptureTxEnd(restGas uint64) {}
func (ct *CallTracer) CaptureStart(env vm.VMInterface, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
func (ct *CallTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
if ct.froms == nil {
ct.froms = map[libcommon.Address]struct{}{}
ct.tos = map[libcommon.Address]struct{}{}
Expand Down
2 changes: 1 addition & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// indicating the block was invalid.
func applyTransaction(config *chain.Config, engine consensus.EngineReader, gp *GasPool, ibs *state.IntraBlockState,
stateWriter state.StateWriter, header *types.Header, tx types.Transaction, usedGas, usedBlobGas *uint64,
evm vm.VMInterface, cfg vm.Config) (*types.Receipt, []byte, error) {
evm *vm.EVM, cfg vm.Config) (*types.Receipt, []byte, error) {
rules := evm.ChainRules()
msg, err := tx.AsMessage(*types.MakeSigner(config, header.Number.Uint64(), header.Time), header.BaseFee, rules)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type StateTransition struct {
value *uint256.Int
data []byte
state evmtypes.IntraBlockState
evm vm.VMInterface
evm *vm.EVM

//some pre-allocated intermediate variables
sharedBuyGas *uint256.Int
Expand Down Expand Up @@ -151,7 +151,7 @@ func IntrinsicGas(data []byte, accessList types2.AccessList, isContractCreation
}

// NewStateTransition initialises and returns a new state transition object.
func NewStateTransition(evm vm.VMInterface, msg Message, gp *GasPool) *StateTransition {
func NewStateTransition(evm *vm.EVM, msg Message, gp *GasPool) *StateTransition {
isBor := evm.ChainConfig().Bor != nil
return &StateTransition{
gp: gp,
Expand Down Expand Up @@ -181,7 +181,7 @@ func NewStateTransition(evm vm.VMInterface, msg Message, gp *GasPool) *StateTran
// `refunds` is false when it is not required to apply gas refunds
// `gasBailout` is true when it is not required to fail transaction if the balance is not enough to pay gas.
// for trace_call to replicate OE/Pariry behaviour
func ApplyMessage(evm vm.VMInterface, msg Message, gp *GasPool, refunds bool, gasBailout bool) (*ExecutionResult, error) {
func ApplyMessage(evm *vm.EVM, msg Message, gp *GasPool, refunds bool, gasBailout bool) (*ExecutionResult, error) {
return NewStateTransition(evm, msg, gp).TransitionDb(refunds, gasBailout)
}

Expand Down
32 changes: 16 additions & 16 deletions core/vm/gas_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) {
// EXTCODECOPY (stack position 3)
// RETURNDATACOPY (stack position 2)
func memoryCopierGas(stackpos int) gasFunc {
return func(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
return func(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
// Gas for expanding the memory
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
Expand Down Expand Up @@ -99,7 +99,7 @@ var (
gasReturnDataCopy = memoryCopierGas(2)
)

func gasSStore(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasSStore(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
value, x := stack.Back(1), stack.Back(0)
key := libcommon.Hash(x.Bytes32())
var current uint256.Int
Expand Down Expand Up @@ -182,7 +182,7 @@ func gasSStore(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *M
// 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_SET_GAS - SLOAD_GAS to refund counter.
// 2.2.2.2. Otherwise, add SSTORE_RESET_GAS - SLOAD_GAS gas to refund counter.
func gasSStoreEIP2200(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasSStoreEIP2200(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
// If we fail the minimum gas availability invariant, fail (0)
if contract.Gas <= params.SstoreSentryGasEIP2200 {
return 0, errors.New("not enough gas for reentrancy sentry")
Expand Down Expand Up @@ -226,7 +226,7 @@ func gasSStoreEIP2200(evm VMInterpreter, contract *Contract, stack *stack.Stack,
}

func makeGasLog(n uint64) gasFunc {
return func(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
return func(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
requestedSize, overflow := stack.Back(1).Uint64WithOverflow()
if overflow {
return 0, ErrGasUintOverflow
Expand Down Expand Up @@ -255,7 +255,7 @@ func makeGasLog(n uint64) gasFunc {
}
}

func gasKeccak256(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasKeccak256(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -276,7 +276,7 @@ func gasKeccak256(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *
// pureMemoryGascost is used by several operations, which aside from their
// static cost have a dynamic cost which is solely based on the memory
// expansion
func pureMemoryGascost(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func pureMemoryGascost(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
return memoryGasCost(mem, memorySize)
}

Expand All @@ -289,7 +289,7 @@ var (
gasCreate = pureMemoryGascost
)

func gasCreate2(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasCreate2(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -310,7 +310,7 @@ func gasCreate2(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Me
return gas, nil
}

func gasCreateEip3860(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasCreateEip3860(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -329,7 +329,7 @@ func gasCreateEip3860(_ VMInterpreter, contract *Contract, stack *stack.Stack, m
return gas, nil
}

func gasCreate2Eip3860(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasCreate2Eip3860(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -348,7 +348,7 @@ func gasCreate2Eip3860(_ VMInterpreter, contract *Contract, stack *stack.Stack,
return gas, nil
}

func gasExpFrontier(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasExpFrontier(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
expByteLen := uint64(libcommon.BitLenToByteLen(stack.Data[stack.Len()-2].BitLen()))

var (
Expand All @@ -361,7 +361,7 @@ func gasExpFrontier(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem
return gas, nil
}

func gasExpEIP160(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasExpEIP160(_ *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
expByteLen := uint64(libcommon.BitLenToByteLen(stack.Data[stack.Len()-2].BitLen()))

var (
Expand All @@ -374,7 +374,7 @@ func gasExpEIP160(_ VMInterpreter, contract *Contract, stack *stack.Stack, mem *
return gas, nil
}

func gasCall(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasCall(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
var (
gas uint64
transfersValue = !stack.Back(2).IsZero()
Expand Down Expand Up @@ -412,7 +412,7 @@ func gasCall(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Mem
return gas, nil
}

func gasCallCode(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasCallCode(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
memoryGas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand Down Expand Up @@ -440,7 +440,7 @@ func gasCallCode(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem
return gas, nil
}

func gasDelegateCall(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasDelegateCall(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -460,7 +460,7 @@ func gasDelegateCall(evm VMInterpreter, contract *Contract, stack *stack.Stack,
return gas, nil
}

func gasStaticCall(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasStaticCall(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gas, err := memoryGasCost(mem, memorySize)
if err != nil {
return 0, err
Expand All @@ -480,7 +480,7 @@ func gasStaticCall(evm VMInterpreter, contract *Contract, stack *stack.Stack, me
return gas, nil
}

func gasSelfdestruct(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasSelfdestruct(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
var gas uint64
// TangerineWhistle (EIP150) gas reprice fork:
if evm.ChainRules().IsTangerineWhistle {
Expand Down
4 changes: 2 additions & 2 deletions core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type EVMInterpreter struct {
//
//nolint:structcheck
type VM struct {
evm VMInterpreter
evm *EVM
cfg Config

hasher keccakState // Keccak256 hasher instance shared across opcodes
Expand All @@ -121,7 +121,7 @@ func copyJumpTable(jt *JumpTable) *JumpTable {
}

// NewEVMInterpreter returns a new instance of the Interpreter.
func NewEVMInterpreter(evm VMInterpreter, cfg Config) *EVMInterpreter {
func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter {
var jt *JumpTable
switch {
case evm.ChainRules().IsPrague:
Expand Down
2 changes: 1 addition & 1 deletion core/vm/jump_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

type (
executionFunc func(pc *uint64, interpreter *EVMInterpreter, callContext *ScopeContext) ([]byte, error)
gasFunc func(VMInterpreter, *Contract, *stack.Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64
gasFunc func(*EVM, *Contract, *stack.Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64
// memorySizeFunc returns the required size, and whether the operation overflowed a uint64
memorySizeFunc func(*stack.Stack) (size uint64, overflow bool)
)
Expand Down
2 changes: 1 addition & 1 deletion core/vm/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type EVMLogger interface {
CaptureTxStart(gasLimit uint64)
CaptureTxEnd(restGas uint64)
// Top call frame
CaptureStart(env VMInterface, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte)
CaptureStart(env *EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte)
CaptureEnd(output []byte, usedGas uint64, err error)
// Rest of the frames
CaptureEnter(typ OpCode, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte)
Expand Down
16 changes: 8 additions & 8 deletions core/vm/operations_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func makeGasSStoreFunc(clearingRefund uint64) gasFunc {
return func(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
return func(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
// If we fail the minimum gas availability invariant, fail (0)
if contract.Gas <= params.SstoreSentryGasEIP2200 {
return 0, errors.New("not enough gas for reentrancy sentry")
Expand All @@ -40,6 +40,7 @@ func makeGasSStoreFunc(clearingRefund uint64) gasFunc {
current uint256.Int
cost = uint64(0)
)

evm.IntraBlockState().GetState(contract.Address(), &slot, &current)
// If the caller cannot afford the cost, this change will be rolled back
if _, slotMod := evm.IntraBlockState().AddSlotToAccessList(contract.Address(), slot); slotMod {
Expand Down Expand Up @@ -99,12 +100,11 @@ func makeGasSStoreFunc(clearingRefund uint64) gasFunc {
// whose storage is being read) is not yet in accessed_storage_keys,
// charge 2100 gas and add the pair to accessed_storage_keys.
// If the pair is already in accessed_storage_keys, charge 100 gas.
func gasSLoadEIP2929(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasSLoadEIP2929(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
loc := stack.Peek()
slot := libcommon.Hash(loc.Bytes32())
// If the caller cannot afford the cost, this change will be rolled back
// If he does afford it, we can skip checking the same thing later on, during execution
if _, slotMod := evm.IntraBlockState().AddSlotToAccessList(contract.Address(), slot); slotMod {
if _, slotMod := evm.IntraBlockState().AddSlotToAccessList(contract.Address(), loc.Bytes32()); slotMod {
return params.ColdSloadCostEIP2929, nil
}
return params.WarmStorageReadCostEIP2929, nil
Expand All @@ -115,7 +115,7 @@ func gasSLoadEIP2929(evm VMInterpreter, contract *Contract, stack *stack.Stack,
// > If the target is not in accessed_addresses,
// > charge COLD_ACCOUNT_ACCESS_COST gas, and add the address to accessed_addresses.
// > Otherwise, charge WARM_STORAGE_READ_COST gas.
func gasExtCodeCopyEIP2929(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
// memory expansion first (dynamic part of pre-2929 implementation)
gas, err := gasExtCodeCopy(evm, contract, stack, mem, memorySize)
if err != nil {
Expand All @@ -141,7 +141,7 @@ func gasExtCodeCopyEIP2929(evm VMInterpreter, contract *Contract, stack *stack.S
// - extcodehash,
// - extcodesize,
// - (ext) balance
func gasEip2929AccountCheck(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
func gasEip2929AccountCheck(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
addr := libcommon.Address(stack.Peek().Bytes20())
// If the caller cannot afford the cost, this change will be rolled back
if evm.IntraBlockState().AddAddressToAccessList(addr) {
Expand All @@ -152,7 +152,7 @@ func gasEip2929AccountCheck(evm VMInterpreter, contract *Contract, stack *stack.
}

func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc {
return func(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
return func(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
addr := libcommon.Address(stack.Back(1).Bytes20())
// The WarmStorageReadCostEIP2929 (100) is already deducted in the form of a constant cost, so
// the cost to charge for cold access, if any, is Cold - Warm
Expand Down Expand Up @@ -215,7 +215,7 @@ var (

// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539
func makeSelfdestructGasFn(refundsEnabled bool) gasFunc {
gasFunc := func(evm VMInterpreter, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
gasFunc := func(evm *EVM, contract *Contract, stack *stack.Stack, mem *Memory, memorySize uint64) (uint64, error) {
var (
gas uint64
address = libcommon.Address(stack.Peek().Bytes20())
Expand Down
39 changes: 0 additions & 39 deletions core/vm/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,42 +107,3 @@ func ReturnNormalStack(s *Stack) {
s.Data = s.Data[:0]
stackPool.Put(s)
}

var rStackPool = sync.Pool{
New: func() interface{} {
return &ReturnStack{data: make([]uint32, 0, 10)}
},
}

func ReturnRStack(rs *ReturnStack) {
rs.data = rs.data[:0]
rStackPool.Put(rs)
}

// ReturnStack is an object for basic return stack operations.
type ReturnStack struct {
data []uint32
}

func NewReturnStack() *ReturnStack {
rStack, ok := rStackPool.Get().(*ReturnStack)
if !ok {
log.Error("Type assertion failure", "err", "cannot get ReturnStack pointer from rStackPool")
}
return rStack
}

func (st *ReturnStack) Push(d uint32) {
st.data = append(st.data, d)
}

// A uint32 is sufficient as for code below 4.2G
func (st *ReturnStack) Pop() (ret uint32) {
ret = st.data[len(st.data)-1]
st.data = st.data[:len(st.data)-1]
return
}

func (st *ReturnStack) Data() []uint32 {
return st.data
}
2 changes: 1 addition & 1 deletion eth/calltracer/calltracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (ct *CallTracer) captureStartOrEnter(from, to libcommon.Address, create boo
}
}

func (ct *CallTracer) CaptureStart(env vm.VMInterface, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
func (ct *CallTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
ct.captureStartOrEnter(from, to, create, code)
}
func (ct *CallTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
Expand Down
4 changes: 2 additions & 2 deletions eth/tracers/js/goja.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func fromBuf(vm *goja.Runtime, bufType goja.Value, buf goja.Value, allowString b
// JS functions on the relevant EVM hooks. It uses Goja as its JS engine.
type jsTracer struct {
vm *goja.Runtime
env vm.VMInterface
env *vm.EVM
toBig toBigFn // Converts a hex string into a JS bigint
toBuf toBufFn // Converts a []byte into a JS buffer
fromBuf fromBufFn // Converts an array, hex string or Uint8Array to a []byte
Expand Down Expand Up @@ -224,7 +224,7 @@ func (t *jsTracer) CaptureTxEnd(restGas uint64) {
}

// CaptureStart implements the Tracer interface to initialize the tracing operation.
func (t *jsTracer) CaptureStart(env vm.VMInterface, from libcommon.Address, to libcommon.Address, precompile, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
func (t *jsTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
t.env = env
db := &dbObj{ibs: env.IntraBlockState(), vm: t.vm, toBig: t.toBig, toBuf: t.toBuf, fromBuf: t.fromBuf}
t.dbValue = db.setupObject()
Expand Down
Loading

0 comments on commit c293883

Please sign in to comment.