rpc, evm: debug_traceTransaction endpoint (#506)

* fix typo

* Added tracers package to debug API

* Add GetTransactionByHash function to backend package

* first version

* traceTransaction first version

* clean PR

* revert debug changes

* Update proto/ethermint/evm/v1/query.proto

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* remove unnecesary panic

* remove internal debug api

* trace transaction javascript tracer

* add support for custom logConfig

* added comment

* traceTransactions tests

* fix linter

* remove unused

* add comments to traceConfig

* update dependencies

* updated endpoints md

* Apply suggestions from code review

* Update x/evm/keeper/grpc_query.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update x/evm/keeper/grpc_query.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
crypto-facs 2021-09-04 22:33:06 +02:00 committed by GitHub
parent 6794daf014
commit c7554e96aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 2198 additions and 285 deletions

View File

@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (evm) [tharsis#469](https://github.com/tharsis/ethermint/pull/469) Support [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)
* (evm) [tharsis#417](https://github.com/tharsis/ethermint/pull/417) Add `EvmHooks` for tx post-processing
* (rpc) [tharsis#506](https://github.com/tharsis/ethermint/pull/506) Support for `debug_traceTransaction` RPC endpoint
### Bug Fixes

View File

@ -130,7 +130,7 @@ Check the JSON-RPC methods supported on Ethermint. {synopsis}
| `debug_traceBlockFromFile` | Debug | | | |
| `debug_standardTraceBlockToFile` | Debug | | | |
| `debug_standardTraceBadBlockToFile` | Debug | | | |
| `debug_traceTransaction` | Debug | | | |
| [`debug_traceTransaction`](#debug-tracetransaction) | Debug | ✔ | | |
| `debug_verbosity` | Debug | | | |
| `debug_vmodule` | Debug | | | |
| `debug_writeBlockProfile` | Debug | ✔ | | |
@ -989,6 +989,25 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"personal_ecRecover","params":["0
{"jsonrpc":"2.0","id":1,"result":"0x3b7252d007059ffc82d16d022da3cbf9992d2f70"}
```
## Debug Methods
### `debug_traceTransaction`
The `traceTransaction` debugging method will attempt to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it will finally attempt to execute the transaction that corresponds to the given hash.
#### Parameters
- Trace Config
```json
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xddecdb13226339681372b44e01df0fbc0f446fca6f834b2de5ecb1e569022ec8", {"tracer": "{data: [], fault: function(log) {}, step: function(log) { if(log.op.toString() == \"CALL\") this.data.push(log.stack.peek(0)); }, result: function() { return this.data; }}"}],"id":1}' -H "Content-Type: application/json" http://localhost:8545
//Result
["68410", "51470"]
```
## Miner Methods
### `miner_getHashrate`

View File

@ -12,8 +12,10 @@
- [AccessTuple](#ethermint.evm.v1.AccessTuple)
- [ChainConfig](#ethermint.evm.v1.ChainConfig)
- [Log](#ethermint.evm.v1.Log)
- [LogConfig](#ethermint.evm.v1.LogConfig)
- [Params](#ethermint.evm.v1.Params)
- [State](#ethermint.evm.v1.State)
- [TraceConfig](#ethermint.evm.v1.TraceConfig)
- [TransactionLogs](#ethermint.evm.v1.TransactionLogs)
- [TxResult](#ethermint.evm.v1.TxResult)
@ -53,6 +55,8 @@
- [QueryStaticCallResponse](#ethermint.evm.v1.QueryStaticCallResponse)
- [QueryStorageRequest](#ethermint.evm.v1.QueryStorageRequest)
- [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse)
- [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest)
- [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse)
- [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest)
- [QueryTxLogsResponse](#ethermint.evm.v1.QueryTxLogsResponse)
- [QueryValidatorAccountRequest](#ethermint.evm.v1.QueryValidatorAccountRequest)
@ -213,6 +217,27 @@ the node.
<a name="ethermint.evm.v1.LogConfig"></a>
### LogConfig
LogConfig are the configuration options for structured logger the EVM
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `disable_memory` | [bool](#bool) | | disable memory capture |
| `disable_stack` | [bool](#bool) | | disable stack capture |
| `disable_storage` | [bool](#bool) | | disable storage capture |
| `disable_return_data` | [bool](#bool) | | disable return data capture |
| `debug` | [bool](#bool) | | print output during capture end |
| `limit` | [int32](#int32) | | maximum length of output, but zero means unlimited |
| `overrides` | [ChainConfig](#ethermint.evm.v1.ChainConfig) | | Chain overrides, can be used to execute a trace using future fork rules |
<a name="ethermint.evm.v1.Params"></a>
### Params
@ -248,6 +273,24 @@ State represents a single Storage key value pair item.
<a name="ethermint.evm.v1.TraceConfig"></a>
### TraceConfig
TraceConfig holds extra parameters to trace functions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tracer` | [string](#string) | | custom javascript tracer |
| `timeout` | [string](#string) | | overrides the default timeout of 5 seconds for JavaScript-based tracing calls |
| `reexec` | [uint64](#uint64) | | number of blocks the tracer is willing to go back |
| `log_config` | [LogConfig](#ethermint.evm.v1.LogConfig) | | configuration options for structured logger the EVM |
<a name="ethermint.evm.v1.TransactionLogs"></a>
### TransactionLogs
@ -823,6 +866,38 @@ method.
<a name="ethermint.evm.v1.QueryTraceTxRequest"></a>
### QueryTraceTxRequest
QueryTraceTxRequest defines TraceTx request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `msg` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | | msgEthereumTx for the requested transaction |
| `tx_index` | [uint32](#uint32) | | transaction index |
| `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. |
<a name="ethermint.evm.v1.QueryTraceTxResponse"></a>
### QueryTraceTxResponse
QueryTraceTxResponse defines TraceTx response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `data` | [bytes](#bytes) | | response serialized in bytes |
<a name="ethermint.evm.v1.QueryTxLogsRequest"></a>
### QueryTxLogsRequest
@ -912,6 +987,7 @@ Query defines the gRPC querier service.
| `Params` | [QueryParamsRequest](#ethermint.evm.v1.QueryParamsRequest) | [QueryParamsResponse](#ethermint.evm.v1.QueryParamsResponse) | Params queries the parameters of x/evm module. | GET|/ethermint/evm/v1/params|
| `EthCall` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthCall implements the `eth_call` rpc api | GET|/ethermint/evm/v1/eth_call|
| `EstimateGas` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) | EstimateGas implements the `eth_estimateGas` rpc api | GET|/ethermint/evm/v1/estimate_gas|
| `TraceTx` | [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) | [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_tx|
<!-- end services -->

View File

@ -102,7 +102,7 @@ func GetRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpccl
rpc.API{
Namespace: DebugNamespace,
Version: apiVersion,
Service: debug.NewInternalAPI(ctx),
Service: debug.NewAPI(ctx, evmBackend, clientCtx),
Public: true,
},
)

View File

@ -13,6 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/server"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/ethereum/go-ethereum/accounts/keystore"
tmrpctypes "github.com/tendermint/tendermint/rpc/core/types"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
@ -49,6 +50,8 @@ type Backend interface {
GetLogs(blockHash common.Hash) ([][]*ethtypes.Log, error)
BloomStatus() (uint64, uint64)
GetCoinbase() (sdk.AccAddress, error)
GetTransactionByHash(txHash common.Hash) (*types.RPCTransaction, error)
GetTxByEthHash(txHash common.Hash) (*tmrpctypes.ResultTx, error)
EstimateGas(args evmtypes.CallArgs, blockNrOptional *types.BlockNumber) (hexutil.Uint64, error)
RPCGasCap() uint64
}
@ -461,6 +464,85 @@ func (e *EVMBackend) GetCoinbase() (sdk.AccAddress, error) {
return address, nil
}
// GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash
func (e *EVMBackend) GetTransactionByHash(txHash common.Hash) (*types.RPCTransaction, error) {
res, err := e.GetTxByEthHash(txHash)
if err != nil {
// try to find tx in mempool
txs, err := e.PendingTransactions()
if err != nil {
e.logger.Debug("tx not found", "hash", txHash.Hex(), "error", err.Error())
return nil, nil
}
for _, tx := range txs {
msg, err := evmtypes.UnwrapEthereumMsg(tx)
if err != nil {
// not ethereum tx
continue
}
if msg.Hash == txHash.Hex() {
rpctx, err := types.NewTransactionFromMsg(
msg,
common.Hash{},
uint64(0),
uint64(0),
e.chainID,
)
if err != nil {
return nil, err
}
return rpctx, nil
}
}
e.logger.Debug("tx not found", "hash", txHash.Hex())
return nil, nil
}
resBlock, err := e.clientCtx.Client.Block(e.ctx, &res.Height)
if err != nil {
e.logger.Debug("block not found", "height", res.Height, "error", err.Error())
return nil, nil
}
tx, err := e.clientCtx.TxConfig.TxDecoder()(res.Tx)
if err != nil {
e.logger.Debug("decoding failed", "error", err.Error())
return nil, fmt.Errorf("failed to decode tx: %w", err)
}
msg, err := evmtypes.UnwrapEthereumMsg(&tx)
if err != nil {
e.logger.Debug("invalid tx", "error", err.Error())
return nil, err
}
return types.NewTransactionFromMsg(
msg,
common.BytesToHash(resBlock.Block.Hash()),
uint64(res.Height),
uint64(res.Index),
e.chainID,
)
}
// GetTxByEthHash uses `/tx_query` to find transaction by ethereum tx hash
// TODO: Don't need to convert once hashing is fixed on Tendermint
// https://github.com/tendermint/tendermint/issues/6539
func (e *EVMBackend) GetTxByEthHash(hash common.Hash) (*tmrpctypes.ResultTx, error) {
query := fmt.Sprintf("%s.%s='%s'", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash, hash.Hex())
resTxs, err := e.clientCtx.Client.TxSearch(e.ctx, query, false, nil, nil, "")
if err != nil {
return nil, err
}
if len(resTxs.Txs) == 0 {
return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex())
}
return resTxs.Txs[0], nil
}
func (e *EVMBackend) SendTransaction(args types.SendTxArgs) (common.Hash, error) {
// Look up the wallet containing the requested signer
_, err := e.clientCtx.Keyring.KeyByAddress(sdk.AccAddress(args.From.Bytes()))

View File

@ -2,7 +2,9 @@ package debug
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"runtime"
@ -11,8 +13,15 @@ import (
"sync"
"time"
evmtypes "github.com/tharsis/ethermint/x/evm/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/server"
"github.com/ethereum/go-ethereum/common"
"github.com/tendermint/tendermint/libs/log"
"github.com/tharsis/ethermint/ethereum/rpc/backend"
rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types"
)
// HandlerT keeps track of the cpu profiler and trace execution
@ -24,28 +33,90 @@ type HandlerT struct {
traceFile io.WriteCloser
}
// InternalAPI is the debug_ prefixed set of APIs in the Debug JSON-RPC spec.
type InternalAPI struct {
ctx *server.Context
logger log.Logger
handler *HandlerT
// API is the collection of tracing APIs exposed over the private debugging endpoint.
type API struct {
ctx *server.Context
logger log.Logger
backend backend.Backend
clientCtx client.Context
queryClient *rpctypes.QueryClient
handler *HandlerT
}
// NewInternalAPI creates an instance of the Debug API.
func NewInternalAPI(
// NewAPI creates a new API definition for the tracing methods of the Ethereum service.
func NewAPI(
ctx *server.Context,
) *InternalAPI {
return &InternalAPI{
ctx: ctx,
logger: ctx.Logger.With("module", "debug"),
handler: new(HandlerT),
backend backend.Backend,
clientCtx client.Context,
) *API {
return &API{
ctx: ctx,
logger: ctx.Logger.With("module", "debug"),
backend: backend,
clientCtx: clientCtx,
queryClient: rpctypes.NewQueryClient(clientCtx),
handler: new(HandlerT),
}
}
// TraceTransaction returns the structured logs created during the execution of EVM
// and returns them as a JSON object.
func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) (interface{}, error) {
a.logger.Debug("debug_traceTransaction", "hash", hash)
//Get transaction by hash
transaction, err := a.backend.GetTxByEthHash(hash)
if err != nil {
a.logger.Debug("tx not found", "hash", hash)
return nil, err
}
//check if block number is 0
if transaction.Height == 0 {
return nil, errors.New("genesis is not traceable")
}
tx, err := a.clientCtx.TxConfig.TxDecoder()(transaction.Tx)
if err != nil {
a.logger.Debug("tx not found", "hash", hash)
return nil, err
}
ethMessage, ok := tx.GetMsgs()[0].(*evmtypes.MsgEthereumTx)
if !ok {
a.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx))
return nil, fmt.Errorf("invalid transaction type %T", tx)
}
traceTxRequest := evmtypes.QueryTraceTxRequest{
Msg: ethMessage,
TxIndex: transaction.Index,
}
if config != nil {
traceTxRequest.TraceConfig = config
}
traceResult, err := a.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &traceTxRequest)
if err != nil {
return nil, err
}
//Response format is unknown due to custom tracer config param
//More information can be found here https://geth.ethereum.org/docs/dapp/tracing-filtered
var decodedResult interface{}
err = json.Unmarshal(traceResult.Data, &decodedResult)
if err != nil {
return nil, err
}
return decodedResult, nil
}
// BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to
// file. It uses a profile rate of 1 for most accurate information. If a different rate is
// desired, set the rate and write the profile manually.
func (a *InternalAPI) BlockProfile(file string, nsec uint) error {
func (a *API) BlockProfile(file string, nsec uint) error {
a.logger.Debug("debug_blockProfile", "file", file, "nsec", nsec)
runtime.SetBlockProfileRate(1)
defer runtime.SetBlockProfileRate(0)
@ -56,7 +127,7 @@ func (a *InternalAPI) BlockProfile(file string, nsec uint) error {
// CpuProfile turns on CPU profiling for nsec seconds and writes
// profile data to file.
func (a *InternalAPI) CpuProfile(file string, nsec uint) error { // nolint: golint, stylecheck
func (a *API) CpuProfile(file string, nsec uint) error { // nolint: golint, stylecheck
a.logger.Debug("debug_cpuProfile", "file", file, "nsec", nsec)
if err := a.StartCPUProfile(file); err != nil {
return err
@ -66,7 +137,7 @@ func (a *InternalAPI) CpuProfile(file string, nsec uint) error { // nolint: goli
}
// GcStats returns GC statistics.
func (a *InternalAPI) GcStats() *debug.GCStats {
func (a *API) GcStats() *debug.GCStats {
a.logger.Debug("debug_gcStats")
s := new(debug.GCStats)
debug.ReadGCStats(s)
@ -75,7 +146,7 @@ func (a *InternalAPI) GcStats() *debug.GCStats {
// GoTrace turns on tracing for nsec seconds and writes
// trace data to file.
func (a *InternalAPI) GoTrace(file string, nsec uint) error {
func (a *API) GoTrace(file string, nsec uint) error {
a.logger.Debug("debug_goTrace", "file", file, "nsec", nsec)
if err := a.StartGoTrace(file); err != nil {
return err
@ -85,7 +156,7 @@ func (a *InternalAPI) GoTrace(file string, nsec uint) error {
}
// MemStats returns detailed runtime memory statistics.
func (a *InternalAPI) MemStats() *runtime.MemStats {
func (a *API) MemStats() *runtime.MemStats {
a.logger.Debug("debug_memStats")
s := new(runtime.MemStats)
runtime.ReadMemStats(s)
@ -94,13 +165,13 @@ func (a *InternalAPI) MemStats() *runtime.MemStats {
// SetBlockProfileRate sets the rate of goroutine block profile data collection.
// rate 0 disables block profiling.
func (a *InternalAPI) SetBlockProfileRate(rate int) {
func (a *API) SetBlockProfileRate(rate int) {
a.logger.Debug("debug_setBlockProfileRate", "rate", rate)
runtime.SetBlockProfileRate(rate)
}
// Stacks returns a printed representation of the stacks of all goroutines.
func (a *InternalAPI) Stacks() string {
func (a *API) Stacks() string {
a.logger.Debug("debug_stacks")
buf := new(bytes.Buffer)
err := pprof.Lookup("goroutine").WriteTo(buf, 2)
@ -111,7 +182,7 @@ func (a *InternalAPI) Stacks() string {
}
// StartCPUProfile turns on CPU profiling, writing to the given file.
func (a *InternalAPI) StartCPUProfile(file string) error {
func (a *API) StartCPUProfile(file string) error {
a.logger.Debug("debug_startCPUProfile", "file", file)
a.handler.mu.Lock()
defer a.handler.mu.Unlock()
@ -143,7 +214,7 @@ func (a *InternalAPI) StartCPUProfile(file string) error {
}
// StopCPUProfile stops an ongoing CPU profile.
func (a *InternalAPI) StopCPUProfile() error {
func (a *API) StopCPUProfile() error {
a.logger.Debug("debug_stopCPUProfile")
a.handler.mu.Lock()
defer a.handler.mu.Unlock()
@ -166,7 +237,7 @@ func (a *InternalAPI) StopCPUProfile() error {
}
// WriteBlockProfile writes a goroutine blocking profile to the given file.
func (a *InternalAPI) WriteBlockProfile(file string) error {
func (a *API) WriteBlockProfile(file string) error {
a.logger.Debug("debug_writeBlockProfile", "file", file)
return writeProfile("block", file, a.logger)
}
@ -174,7 +245,7 @@ func (a *InternalAPI) WriteBlockProfile(file string) error {
// WriteMemProfile writes an allocation profile to the given file.
// Note that the profiling rate cannot be set through the API,
// it must be set on the command line.
func (a *InternalAPI) WriteMemProfile(file string) error {
func (a *API) WriteMemProfile(file string) error {
a.logger.Debug("debug_writeMemProfile", "file", file)
return writeProfile("heap", file, a.logger)
}
@ -182,7 +253,7 @@ func (a *InternalAPI) WriteMemProfile(file string) error {
// MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file.
// It uses a profile rate of 1 for most accurate information. If a different rate is
// desired, set the rate and write the profile manually.
func (a *InternalAPI) MutexProfile(file string, nsec uint) error {
func (a *API) MutexProfile(file string, nsec uint) error {
a.logger.Debug("debug_mutexProfile", "file", file, "nsec", nsec)
runtime.SetMutexProfileFraction(1)
time.Sleep(time.Duration(nsec) * time.Second)
@ -191,26 +262,26 @@ func (a *InternalAPI) MutexProfile(file string, nsec uint) error {
}
// SetMutexProfileFraction sets the rate of mutex profiling.
func (a *InternalAPI) SetMutexProfileFraction(rate int) {
func (a *API) SetMutexProfileFraction(rate int) {
a.logger.Debug("debug_setMutexProfileFraction", "rate", rate)
runtime.SetMutexProfileFraction(rate)
}
// WriteMutexProfile writes a goroutine blocking profile to the given file.
func (a *InternalAPI) WriteMutexProfile(file string) error {
func (a *API) WriteMutexProfile(file string) error {
a.logger.Debug("debug_writeMutexProfile", "file", file)
return writeProfile("mutex", file, a.logger)
}
// FreeOSMemory forces a garbage collection.
func (a *InternalAPI) FreeOSMemory() {
func (a *API) FreeOSMemory() {
a.logger.Debug("debug_freeOSMemory")
debug.FreeOSMemory()
}
// SetGCPercent sets the garbage collection target percentage. It returns the previous
// setting. A negative value disables GC.
func (a *InternalAPI) SetGCPercent(v int) int {
func (a *API) SetGCPercent(v int) int {
a.logger.Debug("debug_setGCPercent", "percent", v)
return debug.SetGCPercent(v)
}

View File

@ -25,8 +25,8 @@ import (
)
// StartGoTrace turns on tracing, writing to the given file.
func (a *InternalAPI) StartGoTrace(file string) error {
a.logger.Debug("debug_stopGoTrace", "file", file)
func (a *API) StartGoTrace(file string) error {
a.logger.Debug("debug_startGoTrace", "file", file)
a.handler.mu.Lock()
defer a.handler.mu.Unlock()
@ -51,7 +51,7 @@ func (a *InternalAPI) StartGoTrace(file string) error {
}
// StopGoTrace stops an ongoing trace.
func (a *InternalAPI) StopGoTrace() error {
func (a *API) StopGoTrace() error {
a.logger.Debug("debug_stopGoTrace")
a.handler.mu.Lock()
defer a.handler.mu.Unlock()

View File

@ -24,12 +24,12 @@ import (
"errors"
)
func (*InternalAPI) StartGoTrace(string file) error {
func (*API) StartGoTrace(string file) error {
a.logger.Debug("debug_stopGoTrace", "file", file)
return errors.New("tracing is not supported on Go < 1.5")
}
func (*InternalAPI) StopGoTrace() error {
func (*API) StopGoTrace() error {
a.logger.Debug("debug_stopGoTrace")
return errors.New("tracing is not supported on Go < 1.5")
}

View File

@ -23,8 +23,6 @@ import (
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
tmrpctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
@ -499,85 +497,10 @@ func (e *PublicAPI) GetBlockByNumber(ethBlockNum rpctypes.BlockNumber, fullTx bo
return e.backend.GetBlockByNumber(ethBlockNum, fullTx)
}
// GetTxByEthHash uses `/tx_query` to find transaction by ethereum tx hash
// TODO: Don't need to convert once hashing is fixed on Tendermint
// https://github.com/tendermint/tendermint/issues/6539
func (e *PublicAPI) GetTxByEthHash(hash common.Hash) (*tmrpctypes.ResultTx, error) {
query := fmt.Sprintf("%s.%s='%s'", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash, hash.Hex())
resTxs, err := e.clientCtx.Client.TxSearch(e.ctx, query, false, nil, nil, "")
if err != nil {
return nil, err
}
if len(resTxs.Txs) == 0 {
return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex())
}
return resTxs.Txs[0], nil
}
// GetTransactionByHash returns the transaction identified by hash.
func (e *PublicAPI) GetTransactionByHash(hash common.Hash) (*rpctypes.RPCTransaction, error) {
e.logger.Debug("eth_getTransactionByHash", "hash", hash.Hex())
res, err := e.GetTxByEthHash(hash)
if err != nil {
// try to find tx in mempool
txs, err := e.backend.PendingTransactions()
if err != nil {
e.logger.Debug("tx not found", "hash", hash.Hex(), "error", err.Error())
return nil, nil
}
for _, tx := range txs {
msg, err := evmtypes.UnwrapEthereumMsg(tx)
if err != nil {
// not ethereum tx
continue
}
if msg.Hash == hash.Hex() {
rpctx, err := rpctypes.NewTransactionFromMsg(
msg,
common.Hash{},
uint64(0),
uint64(0),
e.chainIDEpoch,
)
if err != nil {
return nil, err
}
return rpctx, nil
}
}
e.logger.Debug("tx not found", "hash", hash.Hex())
return nil, nil
}
resBlock, err := e.clientCtx.Client.Block(e.ctx, &res.Height)
if err != nil {
e.logger.Debug("block not found", "height", res.Height, "error", err.Error())
return nil, nil
}
tx, err := e.clientCtx.TxConfig.TxDecoder()(res.Tx)
if err != nil {
e.logger.Debug("decoding failed", "error", err.Error())
return nil, fmt.Errorf("failed to decode tx: %w", err)
}
msg, err := evmtypes.UnwrapEthereumMsg(&tx)
if err != nil {
e.logger.Debug("invalid tx", "error", err.Error())
return nil, err
}
return rpctypes.NewTransactionFromMsg(
msg,
common.BytesToHash(resBlock.Block.Hash()),
uint64(res.Height),
uint64(res.Index),
e.chainIDEpoch,
)
return e.backend.GetTransactionByHash(hash)
}
// GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index.
@ -670,7 +593,7 @@ func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockN
func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) {
e.logger.Debug("eth_getTransactionReceipt", "hash", hash.Hex())
res, err := e.GetTxByEthHash(hash)
res, err := e.backend.GetTxByEthHash(hash)
if err != nil {
e.logger.Debug("tx not found", "hash", hash.Hex(), "error", err.Error())
return nil, nil

26
go.mod
View File

@ -31,7 +31,11 @@ require (
github.com/tendermint/tendermint v0.34.12
github.com/tendermint/tm-db v0.6.4
github.com/tyler-smith/go-bip39 v1.1.0
google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83
google.golang.org/grpc v1.40.0
gopkg.in/yaml.v2 v2.4.0
)
@ -41,9 +45,13 @@ require (
github.com/99designs/keyring v1.1.6 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.4.8 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/VictoriaMetrics/fastcache v1.5.7 // indirect
github.com/Workiva/go-datastructures v1.0.52 // indirect
github.com/aokoli/goutils v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
@ -62,9 +70,12 @@ require (
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.1 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/go-kit/kit v0.10.0 // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
@ -86,7 +97,11 @@ require (
github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.1.1 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/klauspost/compress v1.11.9 // indirect
@ -97,8 +112,10 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
github.com/minio/highwayhash v1.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/mwitkow/go-proto-validators v0.3.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.3 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
@ -108,6 +125,7 @@ require (
github.com/prometheus/common v0.29.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/prometheus/tsdb v0.7.1 // indirect
github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
@ -124,15 +142,13 @@ require (
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.6 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
nhooyr.io/websocket v1.8.6 // indirect
)

53
go.sum
View File

@ -67,6 +67,14 @@ github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t
github.com/DataDog/zstd v1.4.8 h1:Rpmta4xZ/MgZnriKNd24iZMhGpP5dvUcs/uqfBapKZY=
github.com/DataDog/zstd v1.4.8/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
@ -94,6 +102,9 @@ github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKS
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
github.com/aokoli/goutils v1.1.1 h1:/hA+Ywo3AxoDZY5ZMnkiEkUvkK4BPp927ax110KCqqg=
github.com/aokoli/goutils v1.1.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
@ -223,6 +234,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU=
github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U=
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -266,6 +278,9 @@ github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4
github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.6.1 h1:4CF52PCseTFt4bE+Yk3dIpdVi7XWuPVMhPtm4FaIJPM=
github.com/envoyproxy/protoc-gen-validate v0.6.1/go.mod h1:txg5va2Qkip90uYoSKH+nkAAmXrb2j3iq4FLwdrCbXQ=
github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM=
github.com/ethereum/go-ethereum v1.10.1/go.mod h1:E5e/zvdfUVr91JZ0AwjyuJM3x+no51zZJRz61orLLSk=
github.com/ethereum/go-ethereum v1.10.3 h1:SEYOYARvbWnoDl1hOSks3ZJQpRiiRJe8ubaQGJQwq0s=
@ -425,6 +440,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/protobuf v3.14.0+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@ -512,14 +528,21 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU
github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw=
github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc=
github.com/huin/goupnp v1.0.1-0.20200620063722-49508fba0031/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88 h1:bcAj8KroPf552TScjFPIakjH2/tdIrIH8F+cc4v4SRo=
github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo=
github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o=
github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/improbable-eng/grpc-web v0.14.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs=
github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw=
github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU=
@ -619,6 +642,7 @@ github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoR
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=
github.com/lyft/protoc-gen-star v0.5.1/go.mod h1:9toiA3cC7z5uVbODF7kEQ91Xn7XNFkVUl+SrEe+ZORU=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
@ -653,6 +677,8 @@ github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjK
github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0=
github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
@ -663,6 +689,8 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -675,6 +703,9 @@ github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ib
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo=
github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=
github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w=
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo=
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
@ -759,6 +790,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@ -807,6 +839,10 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pseudomuto/protoc-gen-doc v1.5.0 h1:pHZp0MEiT68jrZV8js8BS7E9ZEnlSLegoQbbtXj5lfo=
github.com/pseudomuto/protoc-gen-doc v1.5.0/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg=
github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM=
github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q=
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
@ -865,6 +901,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/afero v1.3.4/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
@ -904,6 +942,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
@ -1013,6 +1052,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@ -1134,8 +1174,9 @@ golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1153,6 +1194,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1240,8 +1282,9 @@ golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@ -1365,6 +1408,7 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@ -1413,8 +1457,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda h1:iT5uhT54PtbqUsWddv/nnEWdE5e/MTr+Nv3vjxlBP1A=
google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83 h1:3V2dxSZpz4zozWWUq36vUxXEKnSYitEH2LdsAx+RUmg=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
@ -1458,6 +1502,7 @@ gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0=
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=

View File

@ -196,4 +196,34 @@ message AccessTuple {
string address = 1;
// hex formatted hashes of the storage keys
repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ];
}
// TraceConfig holds extra parameters to trace functions.
message TraceConfig {
// custom javascript tracer
string tracer = 1;
// overrides the default timeout of 5 seconds for JavaScript-based tracing calls
string timeout = 2;
// number of blocks the tracer is willing to go back
uint64 reexec = 3;
// configuration options for structured logger the EVM
LogConfig log_config = 4 [ (gogoproto.jsontag) = "logConfig" ];
}
// LogConfig are the configuration options for structured logger the EVM
message LogConfig {
// disable memory capture
bool disable_memory = 1 [ (gogoproto.jsontag) = "disableMemory" ];
// disable stack capture
bool disable_stack = 2 [ (gogoproto.jsontag) = "disableStack" ];
// disable storage capture
bool disable_storage = 3 [ (gogoproto.jsontag) = "disableStorage" ];
// disable return data capture
bool disable_return_data = 4 [ (gogoproto.jsontag) = "disableReturnData" ];
// print output during capture end
bool debug = 5;
// maximum length of output, but zero means unlimited
int32 limit = 6;
// Chain overrides, can be used to execute a trace using future fork rules
ChainConfig overrides = 7;
}

View File

@ -77,6 +77,11 @@ service Query {
rpc EstimateGas(EthCallRequest) returns (EstimateGasResponse) {
option (google.api.http).get = "/ethermint/evm/v1/estimate_gas";
}
// TraceTx implements the `debug_traceTransaction` rpc api
rpc TraceTx(QueryTraceTxRequest) returns (QueryTraceTxResponse) {
option (google.api.http).get = "/ethermint/evm/v1/trace_tx";
}
}
// QueryAccountRequest is the request type for the Query/Account RPC method.
@ -278,3 +283,19 @@ message EstimateGasResponse {
// the estimated gas
uint64 gas = 1;
}
// QueryTraceTxRequest defines TraceTx request
message QueryTraceTxRequest {
// msgEthereumTx for the requested transaction
MsgEthereumTx msg = 1;
// transaction index
uint32 tx_index = 2;
// TraceConfig holds extra parameters to trace functions.
TraceConfig trace_config = 3;
}
// QueryTraceTxResponse defines TraceTx response
message QueryTraceTxResponse {
// response serialized in bytes
bytes data = 1;
}

View File

@ -5,6 +5,10 @@ import (
"encoding/json"
"errors"
"fmt"
"math/big"
"time"
"github.com/ethereum/go-ethereum/eth/tracers"
"github.com/palantir/stacktrace"
"google.golang.org/grpc/codes"
@ -28,6 +32,10 @@ import (
var _ types.QueryServer = Keeper{}
const (
defaultTraceTimeout = 5 * time.Second
)
// Account implements the Query/Account gRPC method
func (k Keeper) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) {
if req == nil {
@ -449,3 +457,115 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
}
return &types.EstimateGasResponse{Gas: hi}, nil
}
// TraceTx configures a new tracer according to the provided configuration, and
// executes the given message in the provided environment. The return value will
// be tracer dependent.
func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*types.QueryTraceTxResponse, error) {
// Assemble the structured logger or the JavaScript tracer
var (
tracer vm.Tracer
err error
resultData []byte
)
ctx := sdk.UnwrapSDKContext(c)
k.WithContext(ctx)
params := k.GetParams(ctx)
coinbase, err := k.GetCoinbaseAddress(ctx)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID)
signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight()))
coreMessage, err := req.Msg.AsMessage(signer)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
switch {
case req.TraceConfig != nil && req.TraceConfig.Tracer != "":
timeout := defaultTraceTimeout
//TODO change timeout to time.duration
//Used string to comply with go ethereum
if req.TraceConfig.Timeout != "" {
if timeout, err = time.ParseDuration(req.TraceConfig.Timeout); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "timeout value: %s", err.Error())
}
}
txContext := core.NewEVMTxContext(coreMessage)
// Constuct the JavaScript tracer to execute with
if tracer, err = tracers.New(req.TraceConfig.Tracer, txContext); err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
// Handle timeouts and RPC cancellations
deadlineCtx, cancel := context.WithTimeout(c, timeout)
go func() {
<-deadlineCtx.Done()
if deadlineCtx.Err() == context.DeadlineExceeded {
tracer.(*tracers.Tracer).Stop(errors.New("execution timeout"))
}
}()
defer cancel()
case req.TraceConfig != nil && req.TraceConfig.LogConfig != nil:
logConfig := vm.LogConfig{
DisableMemory: req.TraceConfig.LogConfig.DisableMemory,
Debug: req.TraceConfig.LogConfig.Debug,
DisableStorage: req.TraceConfig.LogConfig.DisableStorage,
DisableStack: req.TraceConfig.LogConfig.DisableStack,
}
tracer = vm.NewStructLogger(&logConfig)
default:
tracer = types.NewTracer(types.TracerStruct, coreMessage, ethCfg, ctx.BlockHeight(), true)
}
evm := k.NewEVM(coreMessage, ethCfg, params, coinbase, tracer)
k.SetTxHashTransient(common.HexToHash(req.Msg.Hash))
k.SetTxIndexTransient(uint64(req.TxIndex))
res, err := k.ApplyMessage(evm, coreMessage, ethCfg, true)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
// Depending on the tracer type, format and return the trace result data.
switch tracer := tracer.(type) {
case *vm.StructLogger:
//TODO Return proper returnValue
result := types.ExecutionResult{
Gas: res.GasUsed,
Failed: res.Failed(),
ReturnValue: "",
StructLogs: types.FormatLogs(tracer.StructLogs()),
}
resultData, err = json.Marshal(result)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
case *tracers.Tracer:
result, err := tracer.GetResult()
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
resultData, err = json.Marshal(result)
if err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
default:
return nil, status.Error(codes.InvalidArgument, "invalid tracer type")
}
return &types.QueryTraceTxResponse{
Data: resultData,
}, nil
}

View File

@ -758,3 +758,65 @@ func (suite *KeeperTestSuite) TestEstimateGas() {
})
}
}
func (suite *KeeperTestSuite) TestTraceTx() {
ctx := sdk.WrapSDKContext(suite.ctx)
//TODO deploy contract that triggers internal transactions
var (
txMsg *types.MsgEthereumTx
traceConfig *types.TraceConfig
)
testCases := []struct {
msg string
malleate func()
expPass bool
traceResponse []byte
}{
{
msg: "default trace",
malleate: func() {
traceConfig = nil
},
expPass: true,
traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x34, 0x38, 0x32, 0x38, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d},
}, {
msg: "javascript tracer",
malleate: func() {
traceConfig = &types.TraceConfig{
Tracer: "{data: [], fault: function(log) {}, step: function(log) { if(log.op.toString() == \"CALL\") this.data.push(log.stack.peek(0)); }, result: function() { return this.data; }}",
}
},
expPass: true,
traceResponse: []byte{0x5b, 0x5d},
},
}
for _, tc := range testCases {
suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
suite.SetupTest()
//Deploy contract
contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt())
suite.Commit()
//Generate token transfer transaction
txMsg = suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt())
suite.Commit()
tc.malleate()
traceReq := types.QueryTraceTxRequest{
Msg: txMsg,
TraceConfig: traceConfig,
TxIndex: 1, // Can be hardcoded as this will be the only tx included in the block
}
res, err := suite.queryClient.TraceTx(ctx, &traceReq)
if tc.expPass {
suite.Require().NoError(err)
suite.Require().Equal(tc.traceResponse, res.Data)
} else {
suite.Require().Error(err)
}
})
}
}

View File

@ -200,6 +200,12 @@ func (k Keeper) SetTxHashTransient(hash common.Hash) {
store.Set(types.KeyPrefixTransientTxHash, hash.Bytes())
}
// SetTxIndexTransient set the index of processing transaction
func (k Keeper) SetTxIndexTransient(index uint64) {
store := k.Ctx().TransientStore(k.transientKey)
store.Set(types.KeyPrefixTransientTxIndex, sdk.Uint64ToBigEndian(index))
}
// GetTxIndexTransient returns EVM transaction index on the current block.
func (k Keeper) GetTxIndexTransient() uint64 {
store := k.Ctx().TransientStore(k.transientKey)
@ -215,8 +221,7 @@ func (k Keeper) GetTxIndexTransient() uint64 {
// value by one and then sets the new index back to the transient store.
func (k Keeper) IncreaseTxIndexTransient() {
txIndex := k.GetTxIndexTransient()
store := k.Ctx().TransientStore(k.transientKey)
store.Set(types.KeyPrefixTransientTxIndex, sdk.Uint64ToBigEndian(txIndex+1))
k.SetTxIndexTransient(txIndex + 1)
}
// ResetRefundTransient resets the available refund amount to 0

View File

@ -215,6 +215,40 @@ func (suite *KeeperTestSuite) DeployTestContract(t require.TestingT, owner commo
return crypto.CreateAddress(suite.address, nonce)
}
func (suite *KeeperTestSuite) TransferERC20Token(t require.TestingT, contractAddr common.Address, from common.Address, to common.Address, amount *big.Int) *types.MsgEthereumTx {
ctx := sdk.WrapSDKContext(suite.ctx)
chainID := suite.app.EvmKeeper.ChainID()
transferData, err := ContractABI.Pack("transfer", to, amount)
require.NoError(t, err)
args, err := json.Marshal(&types.CallArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)})
require.NoError(t, err)
res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{
Args: args,
GasCap: 25_000_000,
})
require.NoError(t, err)
nonce := suite.app.EvmKeeper.GetNonce(suite.address)
ercTransferTx := types.NewTx(
chainID,
nonce,
&contractAddr,
nil,
res.Gas,
nil,
transferData,
nil,
)
ercTransferTx.From = suite.address.Hex()
err = ercTransferTx.Sign(ethtypes.LatestSignerForChainID(chainID), suite.signer)
require.NoError(t, err)
rsp, err := suite.app.EvmKeeper.EthereumTx(ctx, ercTransferTx)
require.NoError(t, err)
require.Empty(t, rsp.VmError)
return ercTransferTx
}
func TestKeeperTestSuite(t *testing.T) {
suite.Run(t, new(KeeperTestSuite))
}

View File

@ -512,6 +512,179 @@ func (m *AccessTuple) XXX_DiscardUnknown() {
var xxx_messageInfo_AccessTuple proto.InternalMessageInfo
// TraceConfig holds extra parameters to trace functions.
type TraceConfig struct {
// custom javascript tracer
Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"`
// overrides the default timeout of 5 seconds for JavaScript-based tracing calls
Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
// number of blocks the tracer is willing to go back
Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"`
// configuration options for structured logger the EVM
LogConfig *LogConfig `protobuf:"bytes,4,opt,name=log_config,json=logConfig,proto3" json:"logConfig"`
}
func (m *TraceConfig) Reset() { *m = TraceConfig{} }
func (m *TraceConfig) String() string { return proto.CompactTextString(m) }
func (*TraceConfig) ProtoMessage() {}
func (*TraceConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{7}
}
func (m *TraceConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *TraceConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_TraceConfig.Merge(m, src)
}
func (m *TraceConfig) XXX_Size() int {
return m.Size()
}
func (m *TraceConfig) XXX_DiscardUnknown() {
xxx_messageInfo_TraceConfig.DiscardUnknown(m)
}
var xxx_messageInfo_TraceConfig proto.InternalMessageInfo
func (m *TraceConfig) GetTracer() string {
if m != nil {
return m.Tracer
}
return ""
}
func (m *TraceConfig) GetTimeout() string {
if m != nil {
return m.Timeout
}
return ""
}
func (m *TraceConfig) GetReexec() uint64 {
if m != nil {
return m.Reexec
}
return 0
}
func (m *TraceConfig) GetLogConfig() *LogConfig {
if m != nil {
return m.LogConfig
}
return nil
}
// LogConfig are the configuration options for structured logger the EVM
type LogConfig struct {
// disable memory capture
DisableMemory bool `protobuf:"varint,1,opt,name=disable_memory,json=disableMemory,proto3" json:"disableMemory"`
// disable stack capture
DisableStack bool `protobuf:"varint,2,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"`
// disable storage capture
DisableStorage bool `protobuf:"varint,3,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"`
// disable return data capture
DisableReturnData bool `protobuf:"varint,4,opt,name=disable_return_data,json=disableReturnData,proto3" json:"disableReturnData"`
// print output during capture end
Debug bool `protobuf:"varint,5,opt,name=debug,proto3" json:"debug,omitempty"`
// maximum length of output, but zero means unlimited
Limit int32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
// Chain overrides, can be used to execute a trace using future fork rules
Overrides *ChainConfig `protobuf:"bytes,7,opt,name=overrides,proto3" json:"overrides,omitempty"`
}
func (m *LogConfig) Reset() { *m = LogConfig{} }
func (m *LogConfig) String() string { return proto.CompactTextString(m) }
func (*LogConfig) ProtoMessage() {}
func (*LogConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{8}
}
func (m *LogConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LogConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LogConfig.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *LogConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogConfig.Merge(m, src)
}
func (m *LogConfig) XXX_Size() int {
return m.Size()
}
func (m *LogConfig) XXX_DiscardUnknown() {
xxx_messageInfo_LogConfig.DiscardUnknown(m)
}
var xxx_messageInfo_LogConfig proto.InternalMessageInfo
func (m *LogConfig) GetDisableMemory() bool {
if m != nil {
return m.DisableMemory
}
return false
}
func (m *LogConfig) GetDisableStack() bool {
if m != nil {
return m.DisableStack
}
return false
}
func (m *LogConfig) GetDisableStorage() bool {
if m != nil {
return m.DisableStorage
}
return false
}
func (m *LogConfig) GetDisableReturnData() bool {
if m != nil {
return m.DisableReturnData
}
return false
}
func (m *LogConfig) GetDebug() bool {
if m != nil {
return m.Debug
}
return false
}
func (m *LogConfig) GetLimit() int32 {
if m != nil {
return m.Limit
}
return 0
}
func (m *LogConfig) GetOverrides() *ChainConfig {
if m != nil {
return m.Overrides
}
return nil
}
func init() {
proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params")
proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig")
@ -520,91 +693,105 @@ func init() {
proto.RegisterType((*Log)(nil), "ethermint.evm.v1.Log")
proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult")
proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple")
proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig")
proto.RegisterType((*LogConfig)(nil), "ethermint.evm.v1.LogConfig")
}
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
var fileDescriptor_d21ecc92c8c8583e = []byte{
// 1249 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 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, 0x82, 0x07, 0xc3, 0xc4, 0x5c, 0xd5, 0x6e,
0x24, 0xbd, 0x27, 0x58, 0x60, 0x74, 0xd3, 0x94, 0xf6, 0xb0, 0x4b, 0xda, 0xb1, 0xa7, 0x9b, 0x48,
0x81, 0xd4, 0x1a, 0xf8, 0xa1, 0x2f, 0x64, 0xfb, 0x2c, 0x21, 0x05, 0xe0, 0x0b, 0x50, 0xa4, 0x3d,
0xc2, 0x98, 0xef, 0x12, 0x2e, 0xcf, 0xeb, 0xef, 0xfd, 0x2b, 0x40, 0x93, 0xf8, 0x56, 0xeb, 0xdd,
0xf5, 0x56, 0xee, 0xfd, 0xf5, 0x56, 0xee, 0xe7, 0xeb, 0xad, 0xdc, 0x57, 0x1f, 0xb6, 0x16, 0xde,
0x7f, 0xd8, 0x5a, 0xf8, 0xe1, 0xc3, 0xd6, 0xc2, 0x47, 0x3b, 0x53, 0xf7, 0xbb, 0xe8, 0x60, 0xc6,
0x7d, 0xde, 0x9c, 0xfc, 0x7f, 0xeb, 0xcb, 0x7f, 0x70, 0xf2, 0x96, 0x6f, 0x2f, 0xcb, 0x7f, 0x66,
0xcf, 0x7e, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x36, 0x8e, 0x02, 0xc1, 0xdf, 0x0d, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@ -1160,6 +1347,150 @@ func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *TraceConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.LogConfig != nil {
{
size, err := m.LogConfig.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintEvm(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
if m.Reexec != 0 {
i = encodeVarintEvm(dAtA, i, uint64(m.Reexec))
i--
dAtA[i] = 0x18
}
if len(m.Timeout) > 0 {
i -= len(m.Timeout)
copy(dAtA[i:], m.Timeout)
i = encodeVarintEvm(dAtA, i, uint64(len(m.Timeout)))
i--
dAtA[i] = 0x12
}
if len(m.Tracer) > 0 {
i -= len(m.Tracer)
copy(dAtA[i:], m.Tracer)
i = encodeVarintEvm(dAtA, i, uint64(len(m.Tracer)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *LogConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *LogConfig) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *LogConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Overrides != nil {
{
size, err := m.Overrides.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintEvm(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
}
if m.Limit != 0 {
i = encodeVarintEvm(dAtA, i, uint64(m.Limit))
i--
dAtA[i] = 0x30
}
if m.Debug {
i--
if m.Debug {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x28
}
if m.DisableReturnData {
i--
if m.DisableReturnData {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x20
}
if m.DisableStorage {
i--
if m.DisableStorage {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x18
}
if m.DisableStack {
i--
if m.DisableStack {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x10
}
if m.DisableMemory {
i--
if m.DisableMemory {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintEvm(dAtA []byte, offset int, v uint64) int {
offset -= sovEvm(v)
base := offset
@ -1394,6 +1725,61 @@ func (m *AccessTuple) Size() (n int) {
return n
}
func (m *TraceConfig) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Tracer)
if l > 0 {
n += 1 + l + sovEvm(uint64(l))
}
l = len(m.Timeout)
if l > 0 {
n += 1 + l + sovEvm(uint64(l))
}
if m.Reexec != 0 {
n += 1 + sovEvm(uint64(m.Reexec))
}
if m.LogConfig != nil {
l = m.LogConfig.Size()
n += 1 + l + sovEvm(uint64(l))
}
return n
}
func (m *LogConfig) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.DisableMemory {
n += 2
}
if m.DisableStack {
n += 2
}
if m.DisableStorage {
n += 2
}
if m.DisableReturnData {
n += 2
}
if m.Debug {
n += 2
}
if m.Limit != 0 {
n += 1 + sovEvm(uint64(m.Limit))
}
if m.Overrides != nil {
l = m.Overrides.Size()
n += 1 + l + sovEvm(uint64(l))
}
return n
}
func sovEvm(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -3056,6 +3442,380 @@ func (m *AccessTuple) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *TraceConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tracer", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Tracer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Timeout = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Reexec", wireType)
}
m.Reexec = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Reexec |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LogConfig", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LogConfig == nil {
m.LogConfig = &LogConfig{}
}
if err := m.LogConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthEvm
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *LogConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: LogConfig: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: LogConfig: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableMemory", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.DisableMemory = bool(v != 0)
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableStack", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.DisableStack = bool(v != 0)
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableStorage", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.DisableStorage = bool(v != 0)
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DisableReturnData", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.DisableReturnData = bool(v != 0)
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Debug", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Debug = bool(v != 0)
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
}
m.Limit = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Limit |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Overrides", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Overrides == nil {
m.Overrides = &ChainConfig{}
}
if err := m.Overrides.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthEvm
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipEvm(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

10
x/evm/types/query.go Normal file
View File

@ -0,0 +1,10 @@
package types
import (
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
)
// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces
func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
return m.Msg.UnpackInterfaces(unpacker)
}

View File

@ -1186,6 +1186,116 @@ func (m *EstimateGasResponse) GetGas() uint64 {
return 0
}
// QueryTraceTxRequest defines TraceTx request
type QueryTraceTxRequest struct {
// msgEthereumTx for the requested transaction
Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// transaction index
TxIndex uint32 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
// TraceConfig holds extra parameters to trace functions.
TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"`
}
func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} }
func (m *QueryTraceTxRequest) String() string { return proto.CompactTextString(m) }
func (*QueryTraceTxRequest) ProtoMessage() {}
func (*QueryTraceTxRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e15a877459347994, []int{25}
}
func (m *QueryTraceTxRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryTraceTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryTraceTxRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryTraceTxRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryTraceTxRequest.Merge(m, src)
}
func (m *QueryTraceTxRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryTraceTxRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryTraceTxRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryTraceTxRequest proto.InternalMessageInfo
func (m *QueryTraceTxRequest) GetMsg() *MsgEthereumTx {
if m != nil {
return m.Msg
}
return nil
}
func (m *QueryTraceTxRequest) GetTxIndex() uint32 {
if m != nil {
return m.TxIndex
}
return 0
}
func (m *QueryTraceTxRequest) GetTraceConfig() *TraceConfig {
if m != nil {
return m.TraceConfig
}
return nil
}
// QueryTraceTxResponse defines TraceTx response
type QueryTraceTxResponse struct {
// response serialized in bytes
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *QueryTraceTxResponse) Reset() { *m = QueryTraceTxResponse{} }
func (m *QueryTraceTxResponse) String() string { return proto.CompactTextString(m) }
func (*QueryTraceTxResponse) ProtoMessage() {}
func (*QueryTraceTxResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e15a877459347994, []int{26}
}
func (m *QueryTraceTxResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryTraceTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryTraceTxResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *QueryTraceTxResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryTraceTxResponse.Merge(m, src)
}
func (m *QueryTraceTxResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryTraceTxResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryTraceTxResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryTraceTxResponse proto.InternalMessageInfo
func (m *QueryTraceTxResponse) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*QueryAccountRequest)(nil), "ethermint.evm.v1.QueryAccountRequest")
proto.RegisterType((*QueryAccountResponse)(nil), "ethermint.evm.v1.QueryAccountResponse")
@ -1212,91 +1322,99 @@ func init() {
proto.RegisterType((*QueryStaticCallResponse)(nil), "ethermint.evm.v1.QueryStaticCallResponse")
proto.RegisterType((*EthCallRequest)(nil), "ethermint.evm.v1.EthCallRequest")
proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse")
proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest")
proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse")
}
func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) }
var fileDescriptor_e15a877459347994 = []byte{
// 1260 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x13, 0xc7,
0x17, 0xf7, 0x12, 0x63, 0x87, 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, 0x89, 0x2a, 0x16, 0xce, 0x4b, 0x74, 0x13, 0x2d, 0xc4, 0xd1, 0x95, 0x36,
0xa1, 0x3e, 0x64, 0xf5, 0x93, 0x8f, 0xf2, 0xf1, 0x9c, 0x51, 0x35, 0x30, 0xc7, 0x0c, 0xec, 0x11,
0x77, 0xb7, 0x85, 0x8d, 0x76, 0x5b, 0x3b, 0xfd, 0x01, 0x2e, 0x96, 0xb8, 0x8b, 0xc8, 0x8c, 0xe3,
0x52, 0xbf, 0x5e, 0x71, 0x04, 0xdc, 0x77, 0x30, 0x13, 0x52, 0x8b, 0x63, 0xa0, 0x8f, 0xa9, 0x79,
0x8c, 0xdc, 0xe0, 0x15, 0x89, 0x9d, 0x47, 0xb9, 0x31, 0xd8, 0xda, 0xbd, 0xe2, 0x12, 0x5e, 0x2a,
0xbd, 0x3e, 0xcc, 0x19, 0x6f, 0x0e, 0x73, 0xc6, 0x9f, 0x87, 0x39, 0xe3, 0xc7, 0xa3, 0x5c, 0xea,
0xcd, 0x51, 0x2e, 0xf5, 0xfb, 0x51, 0x2e, 0xf5, 0x55, 0x21, 0x24, 0xb3, 0x7e, 0x9d, 0x74, 0x78,
0x83, 0x87, 0x72, 0xf5, 0x65, 0x36, 0x29, 0xb6, 0xd5, 0x8c, 0xfc, 0x45, 0xf7, 0xe1, 0x3f, 0x01,
0x00, 0x00, 0xff, 0xff, 0xa4, 0x91, 0x34, 0x9c, 0x9a, 0x0e, 0x00, 0x00,
// 1360 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6f, 0x13, 0x47,
0x14, 0xcf, 0x12, 0x63, 0x87, 0x67, 0x42, 0xd3, 0x21, 0x40, 0xd8, 0x06, 0x27, 0x0c, 0xe4, 0x0b,
0xc2, 0x2e, 0x71, 0x2b, 0xa4, 0x22, 0x55, 0x85, 0x44, 0x40, 0x11, 0x50, 0x51, 0x13, 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, 0x48, 0x9c, 0x9e, 0x8a, 0xa4, 0x3e, 0x5f, 0x2a, 0x59, 0xf5, 0x1f,
0xf9, 0xfd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xca, 0x68, 0xb3, 0x71, 0xec, 0x0f, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1337,6 +1455,8 @@ type QueryClient interface {
EthCall(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error)
// EstimateGas implements the `eth_estimateGas` rpc api
EstimateGas(ctx context.Context, in *EthCallRequest, opts ...grpc.CallOption) (*EstimateGasResponse, error)
// TraceTx implements the `debug_traceTransaction` rpc api
TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error)
}
type queryClient struct {
@ -1455,6 +1575,15 @@ func (c *queryClient) EstimateGas(ctx context.Context, in *EthCallRequest, opts
return out, nil
}
func (c *queryClient) TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts ...grpc.CallOption) (*QueryTraceTxResponse, error) {
out := new(QueryTraceTxResponse)
err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceTx", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
type QueryServer interface {
// Account queries an Ethereum account.
@ -1483,6 +1612,8 @@ type QueryServer interface {
EthCall(context.Context, *EthCallRequest) (*MsgEthereumTxResponse, error)
// EstimateGas implements the `eth_estimateGas` rpc api
EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error)
// TraceTx implements the `debug_traceTransaction` rpc api
TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@ -1525,6 +1656,9 @@ func (*UnimplementedQueryServer) EthCall(ctx context.Context, req *EthCallReques
func (*UnimplementedQueryServer) EstimateGas(ctx context.Context, req *EthCallRequest) (*EstimateGasResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method EstimateGas not implemented")
}
func (*UnimplementedQueryServer) TraceTx(ctx context.Context, req *QueryTraceTxRequest) (*QueryTraceTxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method TraceTx not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@ -1746,6 +1880,24 @@ func _Query_EstimateGas_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _Query_TraceTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryTraceTxRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).TraceTx(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ethermint.evm.v1.Query/TraceTx",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).TraceTx(ctx, req.(*QueryTraceTxRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "ethermint.evm.v1.Query",
HandlerType: (*QueryServer)(nil),
@ -1798,6 +1950,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "EstimateGas",
Handler: _Query_EstimateGas_Handler,
},
{
MethodName: "TraceTx",
Handler: _Query_TraceTx_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ethermint/evm/v1/query.proto",
@ -2623,6 +2779,88 @@ func (m *EstimateGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *QueryTraceTxRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryTraceTxRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.TraceConfig != nil {
{
size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.TxIndex != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.TxIndex))
i--
dAtA[i] = 0x10
}
if m.Msg != nil {
{
size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryTraceTxResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *QueryTraceTxResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryTraceTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
@ -2983,6 +3221,39 @@ func (m *EstimateGasResponse) Size() (n int) {
return n
}
func (m *QueryTraceTxRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Msg != nil {
l = m.Msg.Size()
n += 1 + l + sovQuery(uint64(l))
}
if m.TxIndex != 0 {
n += 1 + sovQuery(uint64(m.TxIndex))
}
if m.TraceConfig != nil {
l = m.TraceConfig.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryTraceTxResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Data)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -5214,6 +5485,231 @@ func (m *EstimateGasResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryTraceTxRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryTraceTxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Msg == nil {
m.Msg = &MsgEthereumTx{}
}
if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType)
}
m.TxIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TxIndex |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TraceConfig == nil {
m.TraceConfig = &TraceConfig{}
}
if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *QueryTraceTxResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryTraceTxResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryTraceTxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -629,6 +629,42 @@ func local_request_Query_EstimateGas_0(ctx context.Context, marshaler runtime.Ma
}
var (
filter_Query_TraceTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryTraceTxRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.TraceTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryTraceTxRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_TraceTx_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.TraceTx(ctx, &protoReq)
return msg, metadata, err
}
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -875,6 +911,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1156,6 +1212,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_TraceTx_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_TraceTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -1183,6 +1259,8 @@ var (
pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@ -1209,4 +1287,6 @@ var (
forward_Query_EthCall_0 = runtime.ForwardResponseMessage
forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage
forward_Query_TraceTx_0 = runtime.ForwardResponseMessage
)

View File

@ -1,6 +1,7 @@
package types
import (
"fmt"
"math/big"
"os"
@ -38,3 +39,64 @@ func NewTracer(tracer string, msg core.Message, cfg *params.ChainConfig, height
return nil
}
}
// ExecutionResult groups all structured logs emitted by the EVM
// while replaying a transaction in debug mode as well as transaction
// execution status, the amount of gas used and the return value
type ExecutionResult struct {
Gas uint64 `json:"gas"`
Failed bool `json:"failed"`
ReturnValue string `json:"returnValue"`
StructLogs []StructLogRes `json:"structLogs"`
}
// StructLogRes stores a structured log emitted by the EVM while replaying a
// transaction in debug mode. Taken from go-ethereum
type StructLogRes struct {
Pc uint64 `json:"pc"`
Op string `json:"op"`
Gas uint64 `json:"gas"`
GasCost uint64 `json:"gasCost"`
Depth int `json:"depth"`
Error string `json:"error,omitempty"`
Stack *[]string `json:"stack,omitempty"`
Memory *[]string `json:"memory,omitempty"`
Storage *map[string]string `json:"storage,omitempty"`
}
// FormatLogs formats EVM returned structured logs for json output
func FormatLogs(logs []vm.StructLog) []StructLogRes {
formatted := make([]StructLogRes, len(logs))
for index, trace := range logs {
formatted[index] = StructLogRes{
Pc: trace.Pc,
Op: trace.Op.String(),
Gas: trace.Gas,
GasCost: trace.GasCost,
Depth: trace.Depth,
Error: trace.ErrorString(),
}
if trace.Stack != nil {
stack := make([]string, len(trace.Stack))
for i, stackValue := range trace.Stack {
stack[i] = fmt.Sprintf("%x", stackValue)
}
formatted[index].Stack = &stack
}
if trace.Memory != nil {
memory := make([]string, 0, (len(trace.Memory)+31)/32)
for i := 0; i+32 <= len(trace.Memory); i += 32 {
memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
}
formatted[index].Memory = &memory
}
if trace.Storage != nil {
storage := make(map[string]string)
for i, storageValue := range trace.Storage {
storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue)
}
formatted[index].Storage = &storage
}
}
return formatted
}