mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-16 16:10:40 +00:00
Reintroduce evmone as an EVM interpreter option behind the 'evmone' build tag. Includes gas refund propagation from evmone to Go StateDB, and C memory allocation for all parameters passed across the CGO boundary.
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
//go:build !evmone || !cgo
|
|
|
|
// Copyright 2014 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/>.
|
|
|
|
package vm
|
|
|
|
// Run loops and evaluates the contract's code with the given input data and returns
|
|
// the return byte-slice and an error if one occurred.
|
|
//
|
|
// It's important to note that any errors returned by the interpreter should be
|
|
// considered a revert-and-consume-all-gas operation except for
|
|
// ErrExecutionReverted which means revert-and-keep-gas-left.
|
|
func (evm *EVM) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) {
|
|
return evm.runGoInterpreter(contract, input, readOnly)
|
|
}
|