From 2fe9a1ef26cee93668ec3a105082014b0b2f07b7 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Wed, 4 Aug 2021 16:10:47 +0200 Subject: [PATCH 01/23] fix typo --- ethereum/rpc/namespaces/debug/trace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/rpc/namespaces/debug/trace.go b/ethereum/rpc/namespaces/debug/trace.go index 501abb8c8d..1290def417 100644 --- a/ethereum/rpc/namespaces/debug/trace.go +++ b/ethereum/rpc/namespaces/debug/trace.go @@ -26,7 +26,7 @@ import ( // StartGoTrace turns on tracing, writing to the given file. func (a *InternalAPI) StartGoTrace(file string) error { - a.logger.Debug("debug_stopGoTrace", "file", file) + a.logger.Debug("debug_startGoTrace", "file", file) a.handler.mu.Lock() defer a.handler.mu.Unlock() From b8cc6914615ed66420beee6919d14a73d8277180 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sun, 8 Aug 2021 17:54:27 +0200 Subject: [PATCH 02/23] Added tracers package to debug API --- ethereum/rpc/apis.go | 7 +++ ethereum/rpc/namespaces/debug/tracers/api.go | 60 ++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 ethereum/rpc/namespaces/debug/tracers/api.go diff --git a/ethereum/rpc/apis.go b/ethereum/rpc/apis.go index 9c31c8917e..59993909c3 100644 --- a/ethereum/rpc/apis.go +++ b/ethereum/rpc/apis.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/tharsis/ethermint/ethereum/rpc/backend" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug" + "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug/tracers" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth/filters" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/miner" @@ -99,6 +100,12 @@ func GetRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpccl ) case DebugNamespace: apis = append(apis, + rpc.API{ + Namespace: DebugNamespace, + Version: apiVersion, + Service: tracers.NewAPI(ctx), + Public: true, + }, rpc.API{ Namespace: DebugNamespace, Version: apiVersion, diff --git a/ethereum/rpc/namespaces/debug/tracers/api.go b/ethereum/rpc/namespaces/debug/tracers/api.go new file mode 100644 index 0000000000..102770e033 --- /dev/null +++ b/ethereum/rpc/namespaces/debug/tracers/api.go @@ -0,0 +1,60 @@ +package tracers + +import ( + "github.com/cosmos/cosmos-sdk/server" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/tendermint/tendermint/libs/log" +) + +// API is the collection of tracing APIs exposed over the private debugging endpoint. +type API struct { + ctx *server.Context + logger log.Logger +} + +// NewAPI creates a new API definition for the tracing methods of the Ethereum service. +func NewAPI( + ctx *server.Context, +) *API { + return &API{ + ctx: ctx, + logger: ctx.Logger.With("module", "debug"), + } +} + +// TraceConfig holds extra parameters to trace functions. +type TraceConfig struct { + *vm.LogConfig + Tracer *string + Timeout *string + Reexec *uint64 +} + +// Context contains some contextual infos for a transaction execution that is not +// available from within the EVM object. +type Context struct { + BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) + TxIndex int // Index of the transaction within a block (zero if dangling tx or call) + TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) +} + +func (api *API) TraceTransaction(hash common.Hash, config *TraceConfig) (interface{}, error) { + api.logger.Debug("debug_traceTransaction", "hash", hash) + //Get transaction by hash + + //Get block by number or hash + //Find state at the transaction time + return api.traceTx() +} + +// 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 (api *API) traceTx() (interface{}, error) { + // Assemble the structured logger or the JavaScript tracer + // If custom javascript tracer is passed set configurations for it + // Run the transaction with tracing enabled. + // Depending on the tracer type, format and return the output. + return nil, nil +} From 5f87bd1d63277ad7bf1fe374c64538b8a72e2aea Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sun, 8 Aug 2021 17:54:58 +0200 Subject: [PATCH 03/23] Add GetTransactionByHash function to backend package --- ethereum/rpc/backend/backend.go | 81 ++++++++++++++++++++++++++++++ ethereum/rpc/namespaces/eth/api.go | 77 +--------------------------- 2 files changed, 83 insertions(+), 75 deletions(-) diff --git a/ethereum/rpc/backend/backend.go b/ethereum/rpc/backend/backend.go index 0213b218e5..6fe1f7e808 100644 --- a/ethereum/rpc/backend/backend.go +++ b/ethereum/rpc/backend/backend.go @@ -7,6 +7,8 @@ import ( "regexp" "strconv" + tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" + "google.golang.org/grpc" "google.golang.org/grpc/metadata" @@ -47,6 +49,10 @@ type Backend interface { BloomStatus() (uint64, uint64) GetCoinbase() (sdk.AccAddress, error) + + // Implemented by Eth and debug namespace + GetTransactionByHash(txHash common.Hash) (*types.RPCTransaction, error) + GetTxByEthHash(txHash common.Hash) (*tmrpctypes.ResultTx, error) } var _ Backend = (*EVMBackend)(nil) @@ -444,3 +450,78 @@ func (e *EVMBackend) GetCoinbase() (sdk.AccAddress, error) { address, _ := sdk.AccAddressFromBech32(res.AccountAddress) 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 { + e.logger.Debug("tx not found", "hash", txHash.Hex(), "error", err.Error()) + + // try to find tx in mempool + txs, err := e.PendingTransactions() + if err != nil { + return nil, nil + } + + for _, tx := range txs { + msg, err := evmtypes.UnwrapEthereumMsg(tx) + if err != nil { + // not ethereum tx + continue + } + + rpctx, err := types.NewTransactionFromMsg( + msg, + common.Hash{}, + uint64(0), + uint64(0), + e.chainID, + ) + if err != nil { + return nil, err + } + return rpctx, 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 +} diff --git a/ethereum/rpc/namespaces/eth/api.go b/ethereum/rpc/namespaces/eth/api.go index aa06ff51c5..529e45cc78 100644 --- a/ethereum/rpc/namespaces/eth/api.go +++ b/ethereum/rpc/namespaces/eth/api.go @@ -24,8 +24,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" @@ -602,81 +600,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 { - e.logger.Debug("tx not found", "hash", hash.Hex(), "error", err.Error()) - - // try to find tx in mempool - txs, err := e.backend.PendingTransactions() - if err != nil { - return nil, nil - } - - for _, tx := range txs { - msg, err := evmtypes.UnwrapEthereumMsg(tx) - if err != nil { - // not ethereum tx - continue - } - - rpctx, err := rpctypes.NewTransactionFromMsg( - msg, - common.Hash{}, - uint64(0), - uint64(0), - e.chainIDEpoch, - ) - if err != nil { - return nil, err - } - return rpctx, 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. @@ -769,7 +696,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 From c0d9870e8d3b011501b71ec61a09975f0c0f2c77 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Mon, 23 Aug 2021 06:39:13 -0400 Subject: [PATCH 04/23] first version --- docs/api/proto-docs.md | 34 ++ ethereum/rpc/apis.go | 3 +- ethereum/rpc/namespaces/debug/api.go | 112 ++++ ethereum/rpc/namespaces/debug/tracers/api.go | 80 ++- proto/ethermint/evm/v1/query.proto | 19 + x/evm/keeper/grpc_query.go | 59 ++ x/evm/keeper/keeper.go | 9 +- x/evm/types/msg.go | 1 + x/evm/types/query.pb.go | 592 ++++++++++++++++--- x/evm/types/query.pb.gw.go | 80 +++ x/evm/types/tracer.go | 62 ++ 11 files changed, 945 insertions(+), 106 deletions(-) create mode 100644 ethereum/rpc/namespaces/debug/api.go diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 9e37829ff6..79623fad79 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -52,6 +52,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) @@ -797,6 +799,37 @@ method. + + +### QueryTraceTxRequest +QueryTraceTxRequest defines TraceTx request + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | | msgEthereumTx for the requested transaction | +| `index` | [uint32](#uint32) | | transaction index | + + + + + + + + +### QueryTraceTxResponse +QueryTraceTxResponse defines TraceTx response + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | response serialized in bytes | + + + + + + ### QueryTxLogsRequest @@ -887,6 +920,7 @@ Query defines the gRPC querier service. | `StaticCall` | [QueryStaticCallRequest](#ethermint.evm.v1.QueryStaticCallRequest) | [QueryStaticCallResponse](#ethermint.evm.v1.QueryStaticCallResponse) | StaticCall queries the static call value of x/evm module. | GET|/ethermint/evm/v1/static_call| | `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/v1alpha1/trace_tx| diff --git a/ethereum/rpc/apis.go b/ethereum/rpc/apis.go index 5e81ca1f23..9e8ad3ddc1 100644 --- a/ethereum/rpc/apis.go +++ b/ethereum/rpc/apis.go @@ -10,7 +10,6 @@ import ( "github.com/tharsis/ethermint/ethereum/rpc/backend" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug/tracers" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth/filters" "github.com/tharsis/ethermint/ethereum/rpc/namespaces/miner" @@ -103,7 +102,7 @@ func GetRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpccl rpc.API{ Namespace: DebugNamespace, Version: apiVersion, - Service: tracers.NewAPI(ctx), + Service: debug.NewAPI(ctx, evmBackend, clientCtx), Public: true, }, rpc.API{ diff --git a/ethereum/rpc/namespaces/debug/api.go b/ethereum/rpc/namespaces/debug/api.go new file mode 100644 index 0000000000..a205db65a1 --- /dev/null +++ b/ethereum/rpc/namespaces/debug/api.go @@ -0,0 +1,112 @@ +package debug + +import ( + "encoding/json" + "errors" + "fmt" + + 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/ethereum/go-ethereum/core/vm" + "github.com/tendermint/tendermint/libs/log" + "github.com/tharsis/ethermint/ethereum/rpc/backend" + rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" +) + +// 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 +} + +// NewAPI creates a new API definition for the tracing methods of the Ethereum service. +func NewAPI( + ctx *server.Context, + 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), + } +} + +// TraceConfig holds extra parameters to trace functions. +type TraceConfig struct { + *vm.LogConfig + Tracer *string + Timeout *string + Reexec *uint64 +} + +// Context contains some contextual infos for a transaction execution that is not +// available from within the EVM object. +type Context struct { + BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) + TxIndex int // Index of the transaction within a block (zero if dangling tx or call) + TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) +} + +// TraceTransaction returns the structured logs created during the execution of EVM +// and returns them as a JSON object. +func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, error) { + api.logger.Debug("debug_traceTransaction", "hash", hash) + //Get transaction by hash + transaction, err := api.backend.GetTxByEthHash(hash) + if err != nil { + api.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 := api.clientCtx.TxConfig.TxDecoder()(transaction.Tx) + if err != nil { + api.logger.Debug("tx not found", "hash", hash) + return nil, err + } + + //TODO Check if there is more than one tx + ethMessage, ok := tx.GetMsgs()[0].(*evmtypes.MsgEthereumTx) + if !ok { + api.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx)) + return nil, fmt.Errorf("invalid transaction type %T", tx) + } + + //Get block by number or hash + //block, err := api.backend.GetBlockByNumber(types.BlockNumber(transaction.Height), false) + //if err != nil { + // api.logger.Debug("block number not found", "block", transaction.Height, "hash", hash) + // return nil, err + //} + + traceResult, err := api.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &evmtypes.QueryTraceTxRequest{ + Msg: ethMessage, + Index: transaction.Index, + }) + + if err != nil { + return nil, err + } + + var decodedResult map[string]interface{} + err = json.Unmarshal(traceResult.Data, &decodedResult) + if err != nil { + return nil, err + } + + return decodedResult, nil +} diff --git a/ethereum/rpc/namespaces/debug/tracers/api.go b/ethereum/rpc/namespaces/debug/tracers/api.go index 102770e033..ab25100dd9 100644 --- a/ethereum/rpc/namespaces/debug/tracers/api.go +++ b/ethereum/rpc/namespaces/debug/tracers/api.go @@ -1,25 +1,37 @@ package tracers import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/server" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" "github.com/tendermint/tendermint/libs/log" + "github.com/tharsis/ethermint/ethereum/rpc/backend" + rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" ) // API is the collection of tracing APIs exposed over the private debugging endpoint. type API struct { - ctx *server.Context - logger log.Logger + ctx *server.Context + logger log.Logger + backend backend.Backend + clientCtx client.Context + queryClient *rpctypes.QueryClient } // NewAPI creates a new API definition for the tracing methods of the Ethereum service. func NewAPI( ctx *server.Context, + backend backend.Backend, + clientCtx client.Context, ) *API { return &API{ - ctx: ctx, - logger: ctx.Logger.With("module", "debug"), + ctx: ctx, + logger: ctx.Logger.With("module", "debug"), + backend: backend, + clientCtx: clientCtx, + queryClient: rpctypes.NewQueryClient(clientCtx), } } @@ -39,22 +51,44 @@ type Context struct { TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) } -func (api *API) TraceTransaction(hash common.Hash, config *TraceConfig) (interface{}, error) { - api.logger.Debug("debug_traceTransaction", "hash", hash) - //Get transaction by hash - - //Get block by number or hash - //Find state at the transaction time - return api.traceTx() -} - -// 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 (api *API) traceTx() (interface{}, error) { - // Assemble the structured logger or the JavaScript tracer - // If custom javascript tracer is passed set configurations for it - // Run the transaction with tracing enabled. - // Depending on the tracer type, format and return the output. - return nil, nil -} +// +//func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, error) { +// api.logger.Debug("debug_traceTransaction", "hash", hash) +// //Get transaction by hash +// transaction, err := api.backend.GetTxByEthHash(hash) +// if err != nil { +// api.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 := api.clientCtx.TxConfig.TxDecoder()(transaction.Tx) +// if err != nil { +// api.logger.Debug("tx not found", "hash", hash) +// return nil, err +// } +// +// //TODO Check if there is more than one tx +// +// ethMessage, ok := tx.GetMsgs()[0].(*evmtypes.MsgEthereumTx) +// if !ok { +// api.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx)) +// return nil, fmt.Errorf("invalid transaction type %T", tx) +// } +// +// //Get block by number or hash +// //block, err := api.backend.GetBlockByNumber(types.BlockNumber(transaction.Height), false) +// //if err != nil { +// // api.logger.Debug("block number not found", "block", transaction.Height, "hash", hash) +// // return nil, err +// //} +// +// return api.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &evmtypes.QueryTraceTxRequest{ +// Msg: ethMessage, +// Index: transaction.Index, +// }) +//} diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 2f9cdd2939..9519c8c807 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -82,6 +82,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/v1alpha1/trace_tx"; + } } // QueryAccountRequest is the request type for the Query/Account RPC method. @@ -279,3 +284,17 @@ 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 index = 2; +} + +// QueryTraceTxResponse defines TraceTx response +message QueryTraceTxResponse { + // response serialized in bytes + bytes data = 1; +} diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 9962c0e7e6..f011c90f94 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "fmt" + "math/big" "github.com/palantir/stacktrace" "google.golang.org/grpc/codes" @@ -492,3 +493,61 @@ 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) { + ctx := sdk.UnwrapSDKContext(c) + k.WithContext(ctx) + params := k.GetParams(ctx) + + coinbase, err := k.GetCoinbaseAddress() + 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()) + } + + //Todo set switch statement for custom tracers configuration + tracer := types.NewTracer(types.TracerStruct, coreMessage, ethCfg, ctx.BlockHeight(), true) + + evm := k.NewEVM(coreMessage, ethCfg, params, coinbase, tracer) + + k.SetTxHashTransient(ethcmn.HexToHash(req.Msg.Hash)) + k.SetTxIndexTransient(uint64(req.Index)) + + res, err := k.ApplyMessage(evm, coreMessage, ethCfg, false) + + //result, err := core.ApplyMessage(evm, coreMessage, new(core.GasPool).AddGas(coreMessage.Gas())) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + // Depending on the tracer type, format and return the output. + 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()), + } + data, err := json.Marshal(result) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + return &types.QueryTraceTxResponse{ + Data: data, + }, nil + default: + panic(fmt.Sprintf("bad tracer type %T", tracer)) + } +} diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 7465a215d1..9d25d51948 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -197,6 +197,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) @@ -212,8 +218,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 diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index f45584f887..6f07ca4cb5 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -231,6 +231,7 @@ func (msg *MsgEthereumTx) GetFrom() sdk.AccAddress { func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction { txData, err := UnpackTxData(msg.Data) if err != nil { + panic(err) return nil } diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index ab72bdec39..e40271ece8 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1164,6 +1164,107 @@ 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 + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,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{24} +} +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) GetIndex() uint32 { + if m != nil { + return m.Index + } + return 0 +} + +// 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{25} +} +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") @@ -1189,90 +1290,97 @@ 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{ - // 1243 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08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a, 0x43, 0xb7, 0xa2, 0xb4, 0xb4, 0x04, 0xb1, 0x40, 0xe9, 0x5e, 0x19, 0x90, - 0xd6, 0xe2, 0x11, 0x4b, 0x24, 0xac, 0x54, 0xb1, 0x44, 0x86, 0x34, 0x08, 0x6f, 0x4b, 0x22, 0x9b, - 0x68, 0x23, 0x4a, 0x84, 0x29, 0xd3, 0x01, 0x0f, 0xeb, 0xf8, 0xd0, 0x39, 0x3a, 0x41, 0x5f, 0x43, - 0x52, 0x68, 0x0c, 0xc2, 0xb1, 0x23, 0xd3, 0x17, 0x2e, 0x73, 0xe5, 0x5c, 0x1b, 0xcd, 0x61, 0x43, - 0x72, 0x58, 0x41, 0xcb, 0xa3, 0xa6, 0xa9, 0x1a, 0xaa, 0xc4, 0xb7, 0x90, 0x52, 0x12, 0x84, 0x6e, - 0xc5, 0x44, 0x0e, 0xa9, 0x9a, 0xb9, 0x3a, 0xc6, 0x4a, 0x33, 0xc8, 0x4b, 0x06, 0x18, 0xe5, 0xac, - 0x11, 0x3f, 0x62, 0xa5, 0x34, 0x58, 0xc7, 0x42, 0x98, 0x64, 0x2b, 0xa6, 0xfa, 0x12, 0x82, 0xd6, - 0xe3, 0xda, 0x3d, 0x24, 0x72, 0x66, 0x7e, 0xbc, 0xe1, 0xf8, 0x8f, 0xbe, 0x22, 0x8c, 0x43, 0x6c, - 0x5e, 0x1a, 0x00, 0x83, 0x97, 0x1f, 0x9d, 0x8b, 0x12, 0x94, 0x13, 0x73, 0xe3, 0x02, 0x96, 0x9a, - 0xd0, 0xaa, 0x24, 0xb4, 0x84, 0x6e, 0xc6, 0x11, 0x92, 0xba, 0x82, 0xbe, 0x82, 0x94, 0x92, 0x82, - 0xd8, 0xce, 0x84, 0x14, 0x27, 0xb6, 0x33, 0x61, 0x05, 0xc2, 0x39, 0x89, 0x6e, 0xa2, 0x85, 0x28, - 0xba, 0xd2, 0x1a, 0x59, 0x83, 0x81, 0x3a, 0xc4, 0xd6, 0x20, 0x22, 0x45, 0xb1, 0x35, 0x88, 0x4a, - 0xcd, 0x79, 0x35, 0x60, 0xd2, 0xba, 0x6c, 0x0b, 0xec, 0x1e, 0xa4, 0xb5, 0xfa, 0xa0, 0x5c, 0x34, - 0x78, 0x58, 0x98, 0xcc, 0x11, 0xb3, 0xf3, 0x84, 0xb9, 0xfb, 0xe2, 0xcc, 0xe9, 0x34, 0x0f, 0x7a, - 0x7d, 0x70, 0x2c, 0xc1, 0x17, 0x91, 0x19, 0x05, 0x77, 0x78, 0x4d, 0x21, 0x7f, 0x03, 0xd3, 0x01, - 0xe1, 0xba, 0x00, 0xfa, 0x88, 0xf2, 0x8f, 0x50, 0x3e, 0xbc, 0x26, 0xb1, 0x73, 0x28, 0x3b, 0x02, - 0x5b, 0x9b, 0x97, 0x5d, 0xc2, 0x76, 0x77, 0xdf, 0x9c, 0x66, 0x8d, 0xb7, 0xa7, 0x59, 0xe3, 0xcf, - 0xd3, 0xac, 0xf1, 0xe3, 0x59, 0x36, 0xf1, 0xf6, 0x2c, 0x9b, 0xf8, 0xfd, 0x2c, 0x9b, 0xf8, 0x32, - 0xef, 0xd6, 0x79, 0xad, 0x53, 0x29, 0xd8, 0xb4, 0x69, 0xf1, 0x1a, 0x69, 0xb3, 0x3a, 0x0b, 0xc4, - 0xea, 0xc9, 0x68, 0xfc, 0xa8, 0xe5, 0xb0, 0x4a, 0x4a, 0xfe, 0x59, 0xfc, 0xe0, 0x9f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x58, 0x45, 0xa9, 0x54, 0xf5, 0x0e, 0x00, 0x00, + // 1313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0x13, 0x47, + 0x14, 0xcf, 0x12, 0xc7, 0x86, 0x17, 0x02, 0xe9, 0x10, 0x20, 0x6c, 0x83, 0x13, 0x06, 0xf2, 0x0f, + 0x52, 0x2f, 0x76, 0x2b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0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1315,6 +1423,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 { @@ -1442,6 +1552,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. @@ -1472,6 +1591,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. @@ -1517,6 +1638,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) @@ -1756,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), @@ -1812,6 +1954,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", @@ -2618,6 +2764,76 @@ 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.Index != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Index)) + 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 @@ -2975,6 +3191,35 @@ 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.Index != 0 { + n += 1 + sovQuery(uint64(m.Index)) + } + 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 } @@ -5188,6 +5433,195 @@ 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 Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index fe976e30bf..995dda0900 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -665,6 +665,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. @@ -931,6 +967,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 } @@ -1232,6 +1288,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 } @@ -1261,6 +1337,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", "v1alpha1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1289,4 +1367,6 @@ var ( forward_Query_EthCall_0 = runtime.ForwardResponseMessage forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage + + forward_Query_TraceTx_0 = runtime.ForwardResponseMessage ) diff --git a/x/evm/types/tracer.go b/x/evm/types/tracer.go index 02bb400f9a..5f93038324 100644 --- a/x/evm/types/tracer.go +++ b/x/evm/types/tracer.go @@ -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 +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 +} From d0711cdfa4e4ea18f36112deb1540c2cb317828e Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Wed, 25 Aug 2021 11:34:09 -0400 Subject: [PATCH 05/23] traceTransaction first version --- Makefile | 2 +- go.mod | 6 ++++-- go.sum | 10 ++++------ x/evm/keeper/grpc_query.go | 4 +--- x/evm/types/query.go | 9 +++++++++ 5 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 x/evm/types/query.go diff --git a/Makefile b/Makefile index c600a7130e..2dbcf522aa 100755 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ endif ldflags += $(LDFLAGS) ldflags := $(strip $(ldflags)) -BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' +BUILD_FLAGS := -tags "$(build_tags)" # check for nostrip option ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) BUILD_FLAGS += -trimpath diff --git a/go.mod b/go.mod index e06cd01e37..9cfa0910de 100644 --- a/go.mod +++ b/go.mod @@ -44,10 +44,10 @@ require ( github.com/tendermint/tm-db v0.6.4 github.com/tyler-smith/go-bip39 v1.1.0 go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e // 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-20210816143620-e15ff196659d + google.golang.org/genproto v0.0.0-20210820002220-43fce44e7af1 google.golang.org/grpc v1.40.0 gopkg.in/yaml.v2 v2.4.0 nhooyr.io/websocket v1.8.7 // indirect @@ -58,3 +58,5 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 replace github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 + +replace github.com/cosmos/cosmos-sdk => ../cosmos-sdk diff --git a/go.sum b/go.sum index c633458a34..1a4d709070 100644 --- a/go.sum +++ b/go.sum @@ -198,8 +198,6 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.43.0 h1:l2GXJMDVtJyHb35pDUCw+uyr6eZtBo8vt+7PSsq+Fjo= -github.com/cosmos/cosmos-sdk v0.43.0/go.mod h1:ctcrTEAhei9s8O3KSNvL0dxe+fVQGp07QyRb/7H9JYE= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -1044,8 +1042,8 @@ golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e h1:VvfwVmMH40bpMeizC9/K7ipM5Qjucuu16RWfneFPyhQ= -golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1420,8 +1418,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-20210816143620-e15ff196659d h1:fPtHPeysWvGVJwQFKu3B7H2DB2sOEsW7UTayKkWESKw= -google.golang.org/genproto v0.0.0-20210816143620-e15ff196659d/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210820002220-43fce44e7af1 h1:F0WcJZXJRyfaWMXUBAGq7Ba4MWDn+yeACpeEkDUkJ1A= +google.golang.org/genproto v0.0.0-20210820002220-43fce44e7af1/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= diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index f011c90f94..ca6344269f 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -523,9 +523,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ k.SetTxHashTransient(ethcmn.HexToHash(req.Msg.Hash)) k.SetTxIndexTransient(uint64(req.Index)) - res, err := k.ApplyMessage(evm, coreMessage, ethCfg, false) - - //result, err := core.ApplyMessage(evm, coreMessage, new(core.GasPool).AddGas(coreMessage.Gas())) + res, err := k.ApplyMessage(evm, coreMessage, ethCfg, true) if err != nil { return nil, status.Error(codes.Internal, err.Error()) diff --git a/x/evm/types/query.go b/x/evm/types/query.go new file mode 100644 index 0000000000..550905d928 --- /dev/null +++ b/x/evm/types/query.go @@ -0,0 +1,9 @@ +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" +) + +func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + return m.Msg.UnpackInterfaces(unpacker) +} From 009504e5b90dc99c45ed6f749b4fe178d913646b Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 27 Aug 2021 10:05:46 -0400 Subject: [PATCH 06/23] clean PR --- ethereum/rpc/namespaces/debug/api.go | 8 -------- x/evm/keeper/grpc_query.go | 2 ++ x/evm/types/query.go | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ethereum/rpc/namespaces/debug/api.go b/ethereum/rpc/namespaces/debug/api.go index a205db65a1..065bd8cab2 100644 --- a/ethereum/rpc/namespaces/debug/api.go +++ b/ethereum/rpc/namespaces/debug/api.go @@ -79,20 +79,12 @@ func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, return nil, err } - //TODO Check if there is more than one tx ethMessage, ok := tx.GetMsgs()[0].(*evmtypes.MsgEthereumTx) if !ok { api.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx)) return nil, fmt.Errorf("invalid transaction type %T", tx) } - //Get block by number or hash - //block, err := api.backend.GetBlockByNumber(types.BlockNumber(transaction.Height), false) - //if err != nil { - // api.logger.Debug("block number not found", "block", transaction.Height, "hash", hash) - // return nil, err - //} - traceResult, err := api.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &evmtypes.QueryTraceTxRequest{ Msg: ethMessage, Index: transaction.Index, diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index ca6344269f..2811b558a3 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -528,7 +528,9 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ if err != nil { return nil, status.Error(codes.Internal, err.Error()) } + // Depending on the tracer type, format and return the output. + // TODO support custom tracer param switch tracer := tracer.(type) { case *vm.StructLogger: //TODO Return proper returnValue diff --git a/x/evm/types/query.go b/x/evm/types/query.go index 550905d928..f92b0ba300 100644 --- a/x/evm/types/query.go +++ b/x/evm/types/query.go @@ -4,6 +4,7 @@ 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) } From 6b1251464d01d5ee9cae9f9b621e47e0c3b0f442 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 27 Aug 2021 12:10:44 -0400 Subject: [PATCH 07/23] revert debug changes --- Makefile | 2 +- go.mod | 14 +++++++++++--- go.sum | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2dbcf522aa..c600a7130e 100755 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ endif ldflags += $(LDFLAGS) ldflags := $(strip $(ldflags)) -BUILD_FLAGS := -tags "$(build_tags)" +BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' # check for nostrip option ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) BUILD_FLAGS += -trimpath diff --git a/go.mod b/go.mod index 9cfa0910de..fffa2160f8 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,10 @@ go 1.16 require ( 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/aokoli/goutils v1.1.1 // indirect github.com/armon/go-metrics v0.3.9 github.com/btcsuite/btcd v0.22.0-beta github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -14,6 +18,7 @@ require ( github.com/deckarep/golang-set v1.7.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.3 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.1 // indirect github.com/ethereum/go-ethereum v1.10.3 github.com/gogo/protobuf v1.3.3 github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect @@ -25,11 +30,16 @@ require ( github.com/gorilla/websocket v1.4.2 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-immutable-radix v1.3.0 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/improbable-eng/grpc-web v0.14.0 github.com/miguelmota/go-ethereum-hdwallet v0.0.1 + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 github.com/pkg/errors v0.9.1 github.com/prometheus/tsdb v0.10.0 // indirect + github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/rjeczalik/notify v0.9.2 // indirect @@ -47,7 +57,7 @@ require ( 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-20210820002220-43fce44e7af1 + google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda google.golang.org/grpc v1.40.0 gopkg.in/yaml.v2 v2.4.0 nhooyr.io/websocket v1.8.7 // indirect @@ -58,5 +68,3 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 replace github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 - -replace github.com/cosmos/cosmos-sdk => ../cosmos-sdk diff --git a/go.sum b/go.sum index 1a4d709070..0b062dc4f5 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -198,6 +209,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/cosmos-sdk v0.43.0/go.mod h1:ctcrTEAhei9s8O3KSNvL0dxe+fVQGp07QyRb/7H9JYE= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -222,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= @@ -268,6 +281,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= @@ -430,6 +446,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= @@ -518,14 +535,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 h1:GdoK+cXABdB+1keuqsV1drSFO2XLYIxqt/4Rj8SWGBk= github.com/improbable-eng/grpc-web v0.14.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= @@ -624,6 +648,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= @@ -658,6 +683,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= @@ -668,6 +695,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= @@ -680,6 +709,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/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= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -763,6 +795,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= @@ -811,6 +844,10 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +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= @@ -867,6 +904,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= @@ -906,6 +945,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= @@ -1016,6 +1056,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= @@ -1157,6 +1198,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= @@ -1371,6 +1413,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= @@ -1420,6 +1463,8 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210820002220-43fce44e7af1 h1:F0WcJZXJRyfaWMXUBAGq7Ba4MWDn+yeACpeEkDUkJ1A= google.golang.org/genproto v0.0.0-20210820002220-43fce44e7af1/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +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/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= From dc116d2e5b1593bdf1365918d49a13f305767fce Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:05:51 -0400 Subject: [PATCH 08/23] Update proto/ethermint/evm/v1/query.proto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- proto/ethermint/evm/v1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 519c327a9e..28a3b452f7 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -80,7 +80,7 @@ service Query { // TraceTx implements the `debug_traceTransaction` rpc api rpc TraceTx(QueryTraceTxRequest) returns (QueryTraceTxResponse) { - option (google.api.http).get = "/ethermint/evm/v1alpha1/trace_tx"; + option (google.api.http).get = "/ethermint/evm/v1/trace_tx"; } } From 2503d7b8deb786f651e92949a731076daa1eee62 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 2 Sep 2021 08:23:44 -0400 Subject: [PATCH 09/23] remove unnecesary panic --- x/evm/types/msg.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index 6f07ca4cb5..f45584f887 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -231,7 +231,6 @@ func (msg *MsgEthereumTx) GetFrom() sdk.AccAddress { func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction { txData, err := UnpackTxData(msg.Data) if err != nil { - panic(err) return nil } From 9828b1a1c4f0095e047074b8c076875fa8862087 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 2 Sep 2021 13:35:27 -0400 Subject: [PATCH 10/23] remove internal debug api --- ethereum/rpc/namespaces/debug/internal.go | 216 ------------------ ethereum/rpc/namespaces/debug/trace.go | 4 +- .../rpc/namespaces/debug/trace_fallback.go | 4 +- 3 files changed, 4 insertions(+), 220 deletions(-) delete mode 100644 ethereum/rpc/namespaces/debug/internal.go diff --git a/ethereum/rpc/namespaces/debug/internal.go b/ethereum/rpc/namespaces/debug/internal.go deleted file mode 100644 index be8dec5722..0000000000 --- a/ethereum/rpc/namespaces/debug/internal.go +++ /dev/null @@ -1,216 +0,0 @@ -package debug - -import ( - "bytes" - "errors" - "io" - "os" - "runtime" - "runtime/debug" - "runtime/pprof" - "sync" - "time" - - "github.com/cosmos/cosmos-sdk/server" - "github.com/tendermint/tendermint/libs/log" -) - -// HandlerT keeps track of the cpu profiler and trace execution -type HandlerT struct { - cpuFilename string - cpuFile io.WriteCloser - mu sync.Mutex - traceFilename string - 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 -} - -// NewInternalAPI creates an instance of the Debug API. -func NewInternalAPI( - ctx *server.Context, -) *InternalAPI { - return &InternalAPI{ - ctx: ctx, - logger: ctx.Logger.With("module", "debug"), - handler: new(HandlerT), - } -} - -// 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 { - a.logger.Debug("debug_blockProfile", "file", file, "nsec", nsec) - runtime.SetBlockProfileRate(1) - defer runtime.SetBlockProfileRate(0) - - time.Sleep(time.Duration(nsec) * time.Second) - return writeProfile("block", file, a.logger) -} - -// 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 - a.logger.Debug("debug_cpuProfile", "file", file, "nsec", nsec) - if err := a.StartCPUProfile(file); err != nil { - return err - } - time.Sleep(time.Duration(nsec) * time.Second) - return a.StopCPUProfile() -} - -// GcStats returns GC statistics. -func (a *InternalAPI) GcStats() *debug.GCStats { - a.logger.Debug("debug_gcStats") - s := new(debug.GCStats) - debug.ReadGCStats(s) - return s -} - -// GoTrace turns on tracing for nsec seconds and writes -// trace data to file. -func (a *InternalAPI) GoTrace(file string, nsec uint) error { - a.logger.Debug("debug_goTrace", "file", file, "nsec", nsec) - if err := a.StartGoTrace(file); err != nil { - return err - } - time.Sleep(time.Duration(nsec) * time.Second) - return a.StopGoTrace() -} - -// MemStats returns detailed runtime memory statistics. -func (a *InternalAPI) MemStats() *runtime.MemStats { - a.logger.Debug("debug_memStats") - s := new(runtime.MemStats) - runtime.ReadMemStats(s) - return s -} - -// SetBlockProfileRate sets the rate of goroutine block profile data collection. -// rate 0 disables block profiling. -func (a *InternalAPI) 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 { - a.logger.Debug("debug_stacks") - buf := new(bytes.Buffer) - err := pprof.Lookup("goroutine").WriteTo(buf, 2) - if err != nil { - a.logger.Error("Failed to create stacks", "error", err.Error()) - } - return buf.String() -} - -// StartCPUProfile turns on CPU profiling, writing to the given file. -func (a *InternalAPI) StartCPUProfile(file string) error { - a.logger.Debug("debug_startCPUProfile", "file", file) - a.handler.mu.Lock() - defer a.handler.mu.Unlock() - - switch { - case isCPUProfileConfigurationActivated(a.ctx): - a.logger.Debug("CPU profiling already in progress using the configuration file") - return errors.New("CPU profiling already in progress using the configuration file") - case a.handler.cpuFile != nil: - a.logger.Debug("CPU profiling already in progress") - return errors.New("CPU profiling already in progress") - default: - f, err := os.Create(ExpandHome(file)) - if err != nil { - a.logger.Debug("failed to create CPU profile file", "error", err.Error()) - return err - } - if err := pprof.StartCPUProfile(f); err != nil { - a.logger.Debug("cpu profiling already in use", "error", err.Error()) - f.Close() - return err - } - - a.logger.Info("CPU profiling started", "profile", file) - a.handler.cpuFile = f - a.handler.cpuFilename = file - return nil - } -} - -// StopCPUProfile stops an ongoing CPU profile. -func (a *InternalAPI) StopCPUProfile() error { - a.logger.Debug("debug_stopCPUProfile") - a.handler.mu.Lock() - defer a.handler.mu.Unlock() - - switch { - case isCPUProfileConfigurationActivated(a.ctx): - a.logger.Debug("CPU profiling already in progress using the configuration file") - return errors.New("CPU profiling already in progress using the configuration file") - case a.handler.cpuFile != nil: - a.logger.Info("Done writing CPU profile", "profile", a.handler.cpuFilename) - pprof.StopCPUProfile() - a.handler.cpuFile.Close() - a.handler.cpuFile = nil - a.handler.cpuFilename = "" - return nil - default: - a.logger.Debug("CPU profiling not in progress") - return errors.New("CPU profiling not in progress") - } -} - -// WriteBlockProfile writes a goroutine blocking profile to the given file. -func (a *InternalAPI) WriteBlockProfile(file string) error { - a.logger.Debug("debug_writeBlockProfile", "file", file) - return writeProfile("block", file, a.logger) -} - -// 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 { - a.logger.Debug("debug_writeMemProfile", "file", file) - return writeProfile("heap", file, a.logger) -} - -// 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 { - a.logger.Debug("debug_mutexProfile", "file", file, "nsec", nsec) - runtime.SetMutexProfileFraction(1) - time.Sleep(time.Duration(nsec) * time.Second) - defer runtime.SetMutexProfileFraction(0) - return writeProfile("mutex", file, a.logger) -} - -// SetMutexProfileFraction sets the rate of mutex profiling. -func (a *InternalAPI) 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 { - a.logger.Debug("debug_writeMutexProfile", "file", file) - return writeProfile("mutex", file, a.logger) -} - -// FreeOSMemory forces a garbage collection. -func (a *InternalAPI) 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 { - a.logger.Debug("debug_setGCPercent", "percent", v) - return debug.SetGCPercent(v) -} diff --git a/ethereum/rpc/namespaces/debug/trace.go b/ethereum/rpc/namespaces/debug/trace.go index 1290def417..a7fe00189c 100644 --- a/ethereum/rpc/namespaces/debug/trace.go +++ b/ethereum/rpc/namespaces/debug/trace.go @@ -25,7 +25,7 @@ import ( ) // StartGoTrace turns on tracing, writing to the given file. -func (a *InternalAPI) StartGoTrace(file string) error { +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() diff --git a/ethereum/rpc/namespaces/debug/trace_fallback.go b/ethereum/rpc/namespaces/debug/trace_fallback.go index 67fdee39a7..c0a6b8d263 100644 --- a/ethereum/rpc/namespaces/debug/trace_fallback.go +++ b/ethereum/rpc/namespaces/debug/trace_fallback.go @@ -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") } From ca5a4e9be2a837e3bed36409147ec2900974f262 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 2 Sep 2021 13:42:02 -0400 Subject: [PATCH 11/23] trace transaction javascript tracer --- docs/api/proto-docs.md | 23 +- ethereum/rpc/apis.go | 6 - ethereum/rpc/namespaces/debug/api.go | 247 ++++++++++++++-- go.mod | 12 +- go.sum | 47 ++- proto/ethermint/evm/v1/evm.proto | 28 +- proto/ethermint/evm/v1/query.proto | 6 +- x/evm/keeper/grpc_query.go | 74 ++++- x/evm/types/evm.pb.go | 419 ++++++++++++++++++++++----- x/evm/types/query.pb.go | 252 ++++++++++------ x/evm/types/query.pb.gw.go | 2 +- 11 files changed, 887 insertions(+), 229 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index a50f203dbf..66a061cb0f 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -14,6 +14,7 @@ - [Log](#ethermint.evm.v1.Log) - [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) @@ -250,6 +251,23 @@ State represents a single Storage key value pair item. + + +### TraceConfig +TraceConfig holds extra parameters to trace functions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `tracer` | [string](#string) | | | +| `timeout` | [string](#string) | | | +| `reexec` | [uint64](#uint64) | | LogConfig log_config = 4 [ (gogoproto.jsontag) = "logConfig" ]; | + + + + + + ### TransactionLogs @@ -834,7 +852,8 @@ QueryTraceTxRequest defines TraceTx request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `msg` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | | msgEthereumTx for the requested transaction | -| `index` | [uint32](#uint32) | | transaction index | +| `tx_index` | [uint32](#uint32) | | transaction index | +| `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | @@ -945,7 +964,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/v1alpha1/trace_tx| +| `TraceTx` | [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) | [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_tx| diff --git a/ethereum/rpc/apis.go b/ethereum/rpc/apis.go index 9e8ad3ddc1..8e7db4f4a9 100644 --- a/ethereum/rpc/apis.go +++ b/ethereum/rpc/apis.go @@ -105,12 +105,6 @@ func GetRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpccl Service: debug.NewAPI(ctx, evmBackend, clientCtx), Public: true, }, - rpc.API{ - Namespace: DebugNamespace, - Version: apiVersion, - Service: debug.NewInternalAPI(ctx), - Public: true, - }, ) case MinerNamespace: apis = append(apis, diff --git a/ethereum/rpc/namespaces/debug/api.go b/ethereum/rpc/namespaces/debug/api.go index 065bd8cab2..743d2571dd 100644 --- a/ethereum/rpc/namespaces/debug/api.go +++ b/ethereum/rpc/namespaces/debug/api.go @@ -1,9 +1,17 @@ package debug import ( + "bytes" "encoding/json" "errors" "fmt" + "io" + "os" + "runtime" + "runtime/debug" + "runtime/pprof" + "sync" + "time" evmtypes "github.com/tharsis/ethermint/x/evm/types" @@ -11,12 +19,26 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" "github.com/tendermint/tendermint/libs/log" "github.com/tharsis/ethermint/ethereum/rpc/backend" rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" ) +const ( + // defaultTraceTimeout is the amount of time a single transaction can execute + // by default before being forcefully aborted. + defaultTraceTimeout = 5 * time.Second +) + +// HandlerT keeps track of the cpu profiler and trace execution +type HandlerT struct { + cpuFilename string + cpuFile io.WriteCloser + mu sync.Mutex + traceFilename string + traceFile io.WriteCloser +} + // API is the collection of tracing APIs exposed over the private debugging endpoint. type API struct { ctx *server.Context @@ -24,6 +46,7 @@ type API struct { backend backend.Backend clientCtx client.Context queryClient *rpctypes.QueryClient + handler *HandlerT } // NewAPI creates a new API definition for the tracing methods of the Ethereum service. @@ -38,33 +61,18 @@ func NewAPI( backend: backend, clientCtx: clientCtx, queryClient: rpctypes.NewQueryClient(clientCtx), + handler: new(HandlerT), } } -// TraceConfig holds extra parameters to trace functions. -type TraceConfig struct { - *vm.LogConfig - Tracer *string - Timeout *string - Reexec *uint64 -} - -// Context contains some contextual infos for a transaction execution that is not -// available from within the EVM object. -type Context struct { - BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) - TxIndex int // Index of the transaction within a block (zero if dangling tx or call) - TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) -} - // TraceTransaction returns the structured logs created during the execution of EVM // and returns them as a JSON object. -func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, error) { - api.logger.Debug("debug_traceTransaction", "hash", hash) +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 := api.backend.GetTxByEthHash(hash) + transaction, err := a.backend.GetTxByEthHash(hash) if err != nil { - api.logger.Debug("tx not found", "hash", hash) + a.logger.Debug("tx not found", "hash", hash) return nil, err } @@ -73,28 +81,36 @@ func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, return nil, errors.New("genesis is not traceable") } - tx, err := api.clientCtx.TxConfig.TxDecoder()(transaction.Tx) + tx, err := a.clientCtx.TxConfig.TxDecoder()(transaction.Tx) if err != nil { - api.logger.Debug("tx not found", "hash", hash) + a.logger.Debug("tx not found", "hash", hash) return nil, err } ethMessage, ok := tx.GetMsgs()[0].(*evmtypes.MsgEthereumTx) if !ok { - api.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx)) + a.logger.Debug("invalid transaction type", "type", fmt.Sprintf("%T", tx)) return nil, fmt.Errorf("invalid transaction type %T", tx) } - traceResult, err := api.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &evmtypes.QueryTraceTxRequest{ - Msg: ethMessage, - Index: transaction.Index, - }) + 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 } - var decodedResult map[string]interface{} + //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 @@ -102,3 +118,176 @@ func (api *API) TraceTransaction(hash common.Hash, _ *TraceConfig) (interface{}, 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 *API) BlockProfile(file string, nsec uint) error { + a.logger.Debug("debug_blockProfile", "file", file, "nsec", nsec) + runtime.SetBlockProfileRate(1) + defer runtime.SetBlockProfileRate(0) + + time.Sleep(time.Duration(nsec) * time.Second) + return writeProfile("block", file, a.logger) +} + +// CpuProfile turns on CPU profiling for nsec seconds and writes +// profile data to file. +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 + } + time.Sleep(time.Duration(nsec) * time.Second) + return a.StopCPUProfile() +} + +// GcStats returns GC statistics. +func (a *API) GcStats() *debug.GCStats { + a.logger.Debug("debug_gcStats") + s := new(debug.GCStats) + debug.ReadGCStats(s) + return s +} + +// GoTrace turns on tracing for nsec seconds and writes +// trace data to file. +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 + } + time.Sleep(time.Duration(nsec) * time.Second) + return a.StopGoTrace() +} + +// MemStats returns detailed runtime memory statistics. +func (a *API) MemStats() *runtime.MemStats { + a.logger.Debug("debug_memStats") + s := new(runtime.MemStats) + runtime.ReadMemStats(s) + return s +} + +// SetBlockProfileRate sets the rate of goroutine block profile data collection. +// rate 0 disables block profiling. +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 *API) Stacks() string { + a.logger.Debug("debug_stacks") + buf := new(bytes.Buffer) + err := pprof.Lookup("goroutine").WriteTo(buf, 2) + if err != nil { + a.logger.Error("Failed to create stacks", "error", err.Error()) + } + return buf.String() +} + +// StartCPUProfile turns on CPU profiling, writing to the given file. +func (a *API) StartCPUProfile(file string) error { + a.logger.Debug("debug_startCPUProfile", "file", file) + a.handler.mu.Lock() + defer a.handler.mu.Unlock() + + switch { + case isCPUProfileConfigurationActivated(a.ctx): + a.logger.Debug("CPU profiling already in progress using the configuration file") + return errors.New("CPU profiling already in progress using the configuration file") + case a.handler.cpuFile != nil: + a.logger.Debug("CPU profiling already in progress") + return errors.New("CPU profiling already in progress") + default: + f, err := os.Create(ExpandHome(file)) + if err != nil { + a.logger.Debug("failed to create CPU profile file", "error", err.Error()) + return err + } + if err := pprof.StartCPUProfile(f); err != nil { + a.logger.Debug("cpu profiling already in use", "error", err.Error()) + f.Close() + return err + } + + a.logger.Info("CPU profiling started", "profile", file) + a.handler.cpuFile = f + a.handler.cpuFilename = file + return nil + } +} + +// StopCPUProfile stops an ongoing CPU profile. +func (a *API) StopCPUProfile() error { + a.logger.Debug("debug_stopCPUProfile") + a.handler.mu.Lock() + defer a.handler.mu.Unlock() + + switch { + case isCPUProfileConfigurationActivated(a.ctx): + a.logger.Debug("CPU profiling already in progress using the configuration file") + return errors.New("CPU profiling already in progress using the configuration file") + case a.handler.cpuFile != nil: + a.logger.Info("Done writing CPU profile", "profile", a.handler.cpuFilename) + pprof.StopCPUProfile() + a.handler.cpuFile.Close() + a.handler.cpuFile = nil + a.handler.cpuFilename = "" + return nil + default: + a.logger.Debug("CPU profiling not in progress") + return errors.New("CPU profiling not in progress") + } +} + +// WriteBlockProfile writes a goroutine blocking profile to the given file. +func (a *API) WriteBlockProfile(file string) error { + a.logger.Debug("debug_writeBlockProfile", "file", file) + return writeProfile("block", file, a.logger) +} + +// 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 *API) WriteMemProfile(file string) error { + a.logger.Debug("debug_writeMemProfile", "file", file) + return writeProfile("heap", file, a.logger) +} + +// 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 *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) + defer runtime.SetMutexProfileFraction(0) + return writeProfile("mutex", file, a.logger) +} + +// SetMutexProfileFraction sets the rate of mutex profiling. +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 *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 *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 *API) SetGCPercent(v int) int { + a.logger.Debug("debug_setGCPercent", "percent", v) + return debug.SetGCPercent(v) +} diff --git a/go.mod b/go.mod index 5eab2c0a7c..1ed46ada12 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,10 @@ go 1.16 require ( 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/aokoli/goutils v1.1.1 // indirect github.com/armon/go-metrics v0.3.9 github.com/btcsuite/btcd v0.22.0-beta github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -14,6 +18,7 @@ require ( github.com/deckarep/golang-set v1.7.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.3 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.1 // indirect github.com/ethereum/go-ethereum v1.10.3 github.com/gogo/protobuf v1.3.3 github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect @@ -26,11 +31,16 @@ require ( github.com/gorilla/websocket v1.4.2 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-immutable-radix v1.3.0 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/improbable-eng/grpc-web v0.14.1 github.com/miguelmota/go-ethereum-hdwallet v0.0.1 + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 github.com/pkg/errors v0.9.1 github.com/prometheus/tsdb v0.10.0 // indirect + github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/rjeczalik/notify v0.9.2 // indirect @@ -48,7 +58,7 @@ require ( 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-20210825212027-de86158e7fda + google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 google.golang.org/grpc v1.40.0 gopkg.in/yaml.v2 v2.4.0 nhooyr.io/websocket v1.8.7 // indirect diff --git a/go.sum b/go.sum index 37a44756cd..afc3eccc05 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -224,6 +235,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= @@ -270,6 +282,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= @@ -433,6 +448,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= @@ -521,14 +537,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= @@ -628,6 +651,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= @@ -662,6 +686,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= @@ -672,6 +698,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= @@ -684,6 +712,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= @@ -768,6 +799,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= @@ -817,6 +849,10 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +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= @@ -874,6 +910,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= @@ -913,6 +951,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= @@ -1023,6 +1062,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= @@ -1164,6 +1204,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= @@ -1378,6 +1419,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= @@ -1426,8 +1468,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-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/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= @@ -1471,6 +1513,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= diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index 9a8b47f2dc..85cf090eb0 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -196,4 +196,30 @@ message AccessTuple { string address = 1; // hex formatted hashes of the storage keys repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ]; -} \ No newline at end of file +} + +// TraceConfig holds extra parameters to trace functions. +message TraceConfig { + string tracer = 1; + string timeout = 2; + uint64 reexec = 3; +// 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; +//} \ No newline at end of file diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 28a3b452f7..0d54268141 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -289,11 +289,13 @@ message QueryTraceTxRequest { // msgEthereumTx for the requested transaction MsgEthereumTx msg = 1; // transaction index - uint32 index = 2; + 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; -} +} \ No newline at end of file diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 828d5fb981..4fde5cfac5 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -6,6 +6,9 @@ import ( "errors" "fmt" "math/big" + "time" + + "github.com/ethereum/go-ethereum/eth/tracers" "github.com/palantir/stacktrace" "google.golang.org/grpc/codes" @@ -29,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 { @@ -442,6 +449,13 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type // 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) @@ -459,13 +473,41 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ return nil, status.Error(codes.Internal, err.Error()) } - //Todo set switch statement for custom tracers configuration - tracer := types.NewTracer(types.TracerStruct, coreMessage, ethCfg, ctx.BlockHeight(), true) + 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, err + } + } + + txContext := core.NewEVMTxContext(coreMessage) + // Constuct the JavaScript tracer to execute with + if tracer, err = tracers.New(req.TraceConfig.Tracer, txContext); err != nil { + return nil, err + } + + // 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() + + default: + tracer = types.NewTracer(types.TracerStruct, coreMessage, ethCfg, ctx.BlockHeight(), true) + } evm := k.NewEVM(coreMessage, ethCfg, params, coinbase, tracer) k.SetTxHashTransient(ethcmn.HexToHash(req.Msg.Hash)) - k.SetTxIndexTransient(uint64(req.Index)) + k.SetTxIndexTransient(uint64(req.TxIndex)) res, err := k.ApplyMessage(evm, coreMessage, ethCfg, true) @@ -473,8 +515,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ return nil, status.Error(codes.Internal, err.Error()) } - // Depending on the tracer type, format and return the output. - // TODO support custom tracer param + // Depending on the tracer type, format and return the trace result data. switch tracer := tracer.(type) { case *vm.StructLogger: //TODO Return proper returnValue @@ -484,14 +525,27 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ ReturnValue: "", StructLogs: types.FormatLogs(tracer.StructLogs()), } - data, err := json.Marshal(result) + + 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()) } - return &types.QueryTraceTxResponse{ - Data: data, - }, nil default: - panic(fmt.Sprintf("bad tracer type %T", tracer)) + return nil, status.Error(codes.InvalidArgument, "invalid tracer type") } + + return &types.QueryTraceTxResponse{ + Data: resultData, + }, nil } diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index fc213df142..e73b799ba7 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -512,6 +512,67 @@ func (m *AccessTuple) XXX_DiscardUnknown() { var xxx_messageInfo_AccessTuple proto.InternalMessageInfo +// TraceConfig holds extra parameters to trace functions. +type TraceConfig struct { + Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` +} + +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 init() { proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") @@ -520,91 +581,94 @@ 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") } 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, 0x96, 0x4f, 0x6f, 0xdb, 0xb6, - 0x1b, 0xc7, 0xe3, 0xd8, 0x49, 0x64, 0x4a, 0xb6, 0x55, 0xd6, 0xcd, 0xcf, 0x6d, 0xf1, 0x8b, 0x32, - 0x1e, 0x06, 0x0f, 0x68, 0xe3, 0x26, 0x45, 0xb0, 0xa2, 0xc0, 0x0e, 0x71, 0x9a, 0x76, 0xe9, 0x8a, - 0x2d, 0x60, 0x3b, 0x0c, 0x18, 0x30, 0x08, 0xb4, 0xc4, 0xca, 0x5a, 0x24, 0xd1, 0x10, 0x69, 0xcf, - 0x1e, 0xf6, 0x02, 0x06, 0xec, 0xb2, 0xe3, 0x0e, 0x3b, 0xec, 0xe5, 0x14, 0x3b, 0xf5, 0x38, 0x6c, - 0x80, 0x30, 0xb8, 0xb7, 0x1c, 0xfd, 0x0a, 0x06, 0x91, 0xf4, 0xdf, 0x14, 0xc3, 0x92, 0x93, 0xf8, - 0x3c, 0x7c, 0xf8, 0xfd, 0x90, 0x0f, 0x1f, 0x91, 0x04, 0x77, 0xa8, 0xe8, 0xd2, 0x34, 0x0e, 0x13, - 0xd1, 0xa2, 0x83, 0xb8, 0x35, 0xd8, 0xcf, 0x3f, 0x7b, 0xbd, 0x94, 0x09, 0x06, 0xed, 0x59, 0xdf, - 0x5e, 0xee, 0x1c, 0xec, 0xdf, 0xa9, 0x07, 0x2c, 0x60, 0xb2, 0xb3, 0x95, 0xb7, 0x54, 0x1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 0x00, 0x00, 0xff, 0xff, 0x9c, 0x5c, 0x6d, 0xc5, 0xce, 0x0b, 0x00, - 0x00, + // 1286 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0xcf, 0x6f, 0xdb, 0x36, + 0x14, 0xc7, 0x93, 0xd8, 0x49, 0x6c, 0xca, 0xbf, 0xca, 0xba, 0x99, 0xdb, 0x62, 0x51, 0xc6, 0xc3, + 0xe0, 0x01, 0x6d, 0xdc, 0xa4, 0x08, 0x56, 0x14, 0xd8, 0x21, 0x4e, 0xd3, 0x2e, 0x5d, 0xb1, 0x05, + 0x6c, 0x86, 0x02, 0x03, 0x06, 0x81, 0x96, 0x58, 0x59, 0x8b, 0x24, 0x1a, 0x24, 0xe5, 0xd9, 0xc3, + 0xfe, 0x80, 0x01, 0xbb, 0xec, 0xb8, 0xc3, 0x0e, 0xfb, 0x73, 0x8a, 0x9d, 0x7a, 0x1c, 0x36, 0x40, + 0x18, 0xdc, 0x5b, 0x8e, 0xfe, 0x0b, 0x06, 0x91, 0xf4, 0xcf, 0x14, 0xc3, 0x92, 0x93, 0xf9, 0x1e, + 0x1f, 0xbf, 0x1f, 0xf2, 0xf1, 0x89, 0xa4, 0xc1, 0x1d, 0x2a, 0xbb, 0x94, 0x47, 0x41, 0x2c, 0x5b, + 0xb4, 0x1f, 0xb5, 0xfa, 0x7b, 0xd9, 0xcf, 0x6e, 0x8f, 0x33, 0xc9, 0x60, 0x6d, 0xda, 0xb7, 0x9b, + 0x39, 0xfb, 0x7b, 0x77, 0xea, 0x3e, 0xf3, 0x99, 0xea, 0x6c, 0x65, 0x2d, 0x1d, 0x87, 0xfe, 0x5e, + 0x03, 0x1b, 0xa7, 0x84, 0x93, 0x48, 0xc0, 0x3d, 0x50, 0xa4, 0xfd, 0xc8, 0xf1, 0x68, 0xcc, 0xa2, + 0xc6, 0xea, 0xce, 0x6a, 0xb3, 0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c4, 0x06, 0x58, 0x56, 0xc0, 0xc3, 0x2b, + 0x01, 0x4d, 0x9d, 0xce, 0xeb, 0x20, 0x6c, 0x69, 0x73, 0x9a, 0x48, 0x97, 0x48, 0x12, 0x0e, 0x85, + 0x34, 0x9c, 0xda, 0xf5, 0x13, 0xb9, 0xa8, 0x84, 0x70, 0x79, 0xe2, 0x98, 0xae, 0x28, 0x64, 0xb1, + 0xc7, 0x26, 0x2b, 0xba, 0x71, 0xfd, 0x15, 0xcd, 0xeb, 0x20, 0x6c, 0x69, 0x53, 0x51, 0x9e, 0xe7, + 0x0b, 0x95, 0x5a, 0xf5, 0x79, 0xbe, 0x50, 0xad, 0xd5, 0x70, 0x79, 0xc8, 0x42, 0xe6, 0xf4, 0x1f, + 0xea, 0x40, 0x6c, 0xd1, 0xef, 0x89, 0x98, 0x7c, 0x43, 0x2d, 0xb0, 0xfe, 0x52, 0x66, 0x17, 0x71, + 0x0d, 0xe4, 0xce, 0xe9, 0x50, 0xdf, 0x45, 0x38, 0x6b, 0xc2, 0x3a, 0x58, 0xef, 0x93, 0x30, 0xd1, + 0x37, 0x7a, 0x11, 0x6b, 0x03, 0x9d, 0x82, 0xea, 0x19, 0x27, 0xb1, 0x20, 0xae, 0x0c, 0x58, 0xfc, + 0x82, 0xf9, 0x02, 0x42, 0x90, 0x57, 0x67, 0xa2, 0x1e, 0xab, 0xda, 0xf0, 0x13, 0x90, 0x0f, 0x99, + 0x2f, 0x1a, 0x6b, 0x3b, 0xb9, 0xa6, 0xb5, 0x7f, 0xeb, 0xf2, 0x9d, 0xfa, 0x82, 0xf9, 0x58, 0x85, + 0xa0, 0x3f, 0xd6, 0x40, 0xee, 0x05, 0xf3, 0x61, 0x03, 0x6c, 0x12, 0xcf, 0xe3, 0x54, 0x08, 0xa3, + 0x34, 0x31, 0xe1, 0x16, 0xd8, 0x90, 0xac, 0x17, 0xb8, 0x5a, 0xae, 0x88, 0x8d, 0x95, 0x81, 0x3d, + 0x22, 0x89, 0xba, 0x55, 0x4a, 0x58, 0xb5, 0xe1, 0x3e, 0x28, 0xa9, 0x95, 0x39, 0x71, 0x12, 0x75, + 0x28, 0x57, 0x97, 0x43, 0xbe, 0x5d, 0xbd, 0x48, 0x6d, 0x4b, 0xf9, 0xbf, 0x54, 0x6e, 0x3c, 0x6f, + 0xc0, 0x7b, 0x60, 0x53, 0x0e, 0xe6, 0xcf, 0xf5, 0x9b, 0x17, 0xa9, 0x5d, 0x95, 0xb3, 0x65, 0x66, + 0xc7, 0x36, 0xde, 0x90, 0x03, 0x75, 0x7c, 0xb7, 0x40, 0x41, 0x0e, 0x9c, 0x20, 0xf6, 0xe8, 0x40, + 0x1d, 0xdd, 0xf9, 0x76, 0xfd, 0x22, 0xb5, 0x6b, 0x73, 0xe1, 0x27, 0x59, 0x1f, 0xde, 0x94, 0x03, + 0xd5, 0x80, 0xf7, 0x00, 0xd0, 0x53, 0x52, 0x04, 0x7d, 0xf0, 0x96, 0x2f, 0x52, 0xbb, 0xa8, 0xbc, + 0x4a, 0x7b, 0xd6, 0x84, 0x08, 0xac, 0x6b, 0xed, 0x82, 0xd2, 0x2e, 0x5d, 0xa4, 0x76, 0x21, 0x64, + 0xbe, 0xd6, 0xd4, 0x5d, 0x59, 0xaa, 0x38, 0x8d, 0x58, 0x9f, 0x7a, 0xea, 0x6c, 0x2b, 0xe0, 0x89, + 0x89, 0x7e, 0x5e, 0x03, 0x85, 0xb3, 0x01, 0xa6, 0x22, 0x09, 0x25, 0x7c, 0x0a, 0x6a, 0x2e, 0x8b, + 0x25, 0x27, 0xae, 0x74, 0x16, 0x52, 0xdb, 0xbe, 0x3b, 0x3b, 0x67, 0x96, 0x23, 0x10, 0xae, 0x4e, + 0x5c, 0x87, 0x26, 0xff, 0x75, 0xb0, 0xde, 0x09, 0x19, 0x8b, 0x54, 0x25, 0x94, 0xb0, 0x36, 0x20, + 0x56, 0x59, 0x53, 0xbb, 0x9c, 0x53, 0x2f, 0xa7, 0x8f, 0x2e, 0xef, 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0x50, 0xa7, 0x45, 0x67, 0x43, 0xbd, 0xf0, 0x1f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xed, 0xaa, + 0x8e, 0xf9, 0x27, 0x0c, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1160,6 +1224,48 @@ 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.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 encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1394,6 +1500,26 @@ 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)) + } + return n +} + func sovEvm(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3056,6 +3182,139 @@ 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 + } + } + 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 diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 76797e2d73..08024d5983 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1191,7 +1191,9 @@ type QueryTraceTxRequest struct { // msgEthereumTx for the requested transaction Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // transaction index - Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + 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{} } @@ -1234,13 +1236,20 @@ func (m *QueryTraceTxRequest) GetMsg() *MsgEthereumTx { return nil } -func (m *QueryTraceTxRequest) GetIndex() uint32 { +func (m *QueryTraceTxRequest) GetTxIndex() uint32 { if m != nil { - return m.Index + 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 @@ -1320,91 +1329,92 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1333 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5d, 0x6f, 0x13, 0x47, - 0x17, 0xce, 0x12, 0x63, 0x87, 0x13, 0xc2, 0x9b, 0x77, 0x08, 0x10, 0xb6, 0xc1, 0x09, 0x03, 0xf9, - 0x82, 0xb0, 0x8b, 0xdd, 0x0a, 0xa9, 0x48, 0x55, 0xc1, 0x08, 0x28, 0x02, 0x2a, 0x6a, 0xa2, 0x5e, - 0xf4, 0xa2, 0xd6, 0x78, 0x3d, 0x5d, 0x5b, 0xb1, 0x77, 0x8c, 0x67, 0xec, 0x3a, 0x45, 0x69, 0x25, - 0xa4, 0x52, 0x24, 0x6e, 0x2a, 0xf5, 0xbe, 0x42, 0xea, 0x0f, 0xe8, 0xdf, 0xe0, 0x12, 0xa9, 0x37, - 0x55, 0x2f, 0x50, 0x05, 0xbd, 0xe8, 0xcf, 0xa8, 0xe6, 0x63, 0xed, 0x5d, 0xaf, 0x37, 0x0e, 0x55, - 0xaf, 0x3c, 0x1f, 0xe7, 0x9c, 0xe7, 0x39, 0xe7, 0xcc, 0xcc, 0xb3, 0x86, 0x25, 0x2a, 0xea, 0xb4, - 0xd3, 0x6a, 0x04, 0xc2, 0xa5, 0xbd, 0x96, 0xdb, 0x2b, 0xb8, 0x8f, 0xba, 0xb4, 0xb3, 0xeb, 0xb4, - 0x3b, 0x4c, 0x30, 0x34, 0x3f, 0xd8, 0x75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x91, 0x3e, 0xbc, 0xa6, 0xb0, 0x57, - 0x50, 0x7e, 0x0c, 0xb6, 0x31, 0xaf, 0xf8, 0x84, 0xa3, 0x27, 0x16, 0xe4, 0x8c, 0x58, 0xa5, 0x3e, - 0x0b, 0x71, 0xb1, 0x4c, 0x7d, 0x16, 0x46, 0x34, 0x6f, 0x9f, 0x0b, 0x41, 0x9a, 0xed, 0x3a, 0x29, - 0xb8, 0x42, 0x3a, 0x54, 0x44, 0xbf, 0x54, 0x7a, 0xf9, 0x26, 0x6f, 0xbd, 0x7a, 0x93, 0xb7, 0xfe, - 0x7c, 0x93, 0xb7, 0x7e, 0x7c, 0x9b, 0x9f, 0x7a, 0xf5, 0x36, 0x3f, 0xf5, 0xfb, 0xdb, 0xfc, 0xd4, - 0x17, 0x1b, 0x91, 0xef, 0x0e, 0x51, 0x27, 0x1d, 0xde, 0xe0, 0x91, 0x68, 0x7d, 0x15, 0x4f, 0x7d, - 0x7d, 0x54, 0xb3, 0xea, 0x2f, 0xee, 0xfb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x15, 0xee, 0xb4, - 0x2c, 0xab, 0x0f, 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, 0xf5, 0xd0, + 0x8b, 0x35, 0x5e, 0x0f, 0x6b, 0x2b, 0xf6, 0x8e, 0xf1, 0x8c, 0x5d, 0xa7, 0x34, 0x6d, 0x55, 0xa9, + 0x08, 0x89, 0x4b, 0xa5, 0xde, 0x2b, 0xa4, 0xaa,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9, 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. @@ -2789,8 +2799,20 @@ func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Index != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Index)) + 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 } @@ -3209,8 +3231,12 @@ func (m *QueryTraceTxRequest) Size() (n int) { l = m.Msg.Size() n += 1 + l + sovQuery(uint64(l)) } - if m.Index != 0 { - n += 1 + sovQuery(uint64(m.Index)) + 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 } @@ -5526,9 +5552,28 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + 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) } - m.Index = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5538,11 +5583,28 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Index |= uint32(b&0x7F) << shift + 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:]) diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index cc731ebab7..880b2c4e1a 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -1260,7 +1260,7 @@ var ( 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", "v1alpha1", "trace_tx"}, "", 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 ( From b0fdc02402180ba1547cca833ec7659e103ad534 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 2 Sep 2021 13:54:59 -0400 Subject: [PATCH 12/23] add support for custom logConfig --- docs/api/proto-docs.md | 25 +- proto/ethermint/evm/v1/evm.proto | 36 +- x/evm/keeper/grpc_query.go | 9 +- x/evm/keeper/grpc_query_test.go | 34 ++ x/evm/types/evm.pb.go | 667 +++++++++++++++++++++++++++---- 5 files changed, 666 insertions(+), 105 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 66a061cb0f..9bd1b94109 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -12,6 +12,7 @@ - [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) @@ -216,6 +217,27 @@ the node. + + +### 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 | + + + + + + ### Params @@ -261,7 +283,8 @@ TraceConfig holds extra parameters to trace functions. | ----- | ---- | ----- | ----------- | | `tracer` | [string](#string) | | | | `timeout` | [string](#string) | | | -| `reexec` | [uint64](#uint64) | | LogConfig log_config = 4 [ (gogoproto.jsontag) = "logConfig" ]; | +| `reexec` | [uint64](#uint64) | | | +| `log_config` | [LogConfig](#ethermint.evm.v1.LogConfig) | | | diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index 85cf090eb0..005b9d1d2c 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -203,23 +203,23 @@ message TraceConfig { string tracer = 1; string timeout = 2; uint64 reexec = 3; -// LogConfig log_config = 4 [ (gogoproto.jsontag) = "logConfig" ]; + 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; -//} \ No newline at end of file +// 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; +} \ No newline at end of file diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 4fde5cfac5..413e9bd599 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -499,7 +499,14 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } }() 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) } diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 2dcfb9d369..3765cdc767 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -747,6 +747,24 @@ func (suite *KeeperTestSuite) deployTestContract(owner common.Address, supply *b return crypto.CreateAddress(suite.address, nonce) } +func (suite *KeeperTestSuite) transferERC20Token(contractAddr common.Address, from common.Address, to common.Address) common.Hash { + ctx := sdk.WrapSDKContext(suite.ctx) + chainID := suite.app.EvmKeeper.ChainID() + + transferData, err := contractABI.Pack("transfer", to, big.NewInt(1000)) + suite.Require().NoError(err) + args, err := json.Marshal(&types.CallArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)}) + suite.Require().NoError(err) + res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{ + Args: args, + GasCap: 25_000_000, + }) + suite.Require().NoError(err) + + nonce := suite.app.EvmKeeper.GetNonce(suite.address) + types.ne +} + func (suite *KeeperTestSuite) TestEstimateGas() { ctx := sdk.WrapSDKContext(suite.ctx) gasHelper := hexutil.Uint64(20000) @@ -825,3 +843,19 @@ func (suite *KeeperTestSuite) TestEstimateGas() { }) } } + +func (suite *KeeperTestSuite) TestTraceTx() { + ctx := sdk.WrapSDKContext(suite.ctx) + + var ( + args types.CallArgs + gasCap uint64 + ) + testCases := []struct { + msg string + malleate func() + expPass bool + expGas uint64 + } + +} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index e73b799ba7..67df0d56aa 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -514,9 +514,10 @@ var xxx_messageInfo_AccessTuple proto.InternalMessageInfo // TraceConfig holds extra parameters to trace functions. type TraceConfig struct { - Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` - Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` + Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` + LogConfig *LogConfig `protobuf:"bytes,4,opt,name=log_config,json=logConfig,proto3" json:"logConfig"` } func (m *TraceConfig) Reset() { *m = TraceConfig{} } @@ -573,6 +574,113 @@ func (m *TraceConfig) GetReexec() uint64 { 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") @@ -582,93 +690,104 @@ func init() { 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{ - // 1286 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08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, 0x0f, 0xcc, 0xfc, 0x37, 0xae, 0x3d, 0xff, 0x83, 0xf7, 0xcd, 0xff, - 0x60, 0x71, 0xfe, 0x3a, 0x66, 0x0a, 0x7d, 0x64, 0xa0, 0x9b, 0xd7, 0x86, 0x3e, 0x7a, 0x1f, 0xf4, - 0xd1, 0x22, 0x54, 0xc7, 0x64, 0xc5, 0xbe, 0x94, 0x89, 0x46, 0xe1, 0xfa, 0xc5, 0x7e, 0x29, 0xa9, - 0x95, 0xa9, 0x47, 0xe3, 0x7e, 0x04, 0x75, 0x97, 0xc5, 0x42, 0x66, 0xbe, 0x98, 0xf5, 0x42, 0x6a, - 0x98, 0x45, 0xc5, 0x3c, 0xb9, 0x12, 0xf3, 0xae, 0xf9, 0xbe, 0xdf, 0xa3, 0x87, 0xf0, 0xcd, 0x45, - 0xb7, 0xa6, 0xf7, 0x40, 0xad, 0x47, 0x25, 0xe5, 0xa2, 0x93, 0x70, 0xdf, 0x90, 0x81, 0x22, 0x1f, - 0x5f, 0x89, 0x6c, 0xbe, 0x83, 0x65, 0x2d, 0x84, 0xab, 0x33, 0x97, 0x26, 0x7e, 0x07, 0x2a, 0x41, - 0x36, 0x8d, 0x4e, 0x12, 0x1a, 0x9e, 0xa5, 0x78, 0x47, 0x57, 0xe2, 0x99, 0x8f, 0x79, 0x51, 0x09, - 0xe1, 0xf2, 0xc4, 0xa1, 0x59, 0x09, 0x80, 0x51, 0x12, 0x70, 0xc7, 0x0f, 0x89, 0x1b, 0x50, 0x6e, - 0x78, 0x25, 0xc5, 0x7b, 0x76, 0x25, 0xde, 0x6d, 0xcd, 0xbb, 0xac, 0x86, 0x70, 0x2d, 0x73, 0x3e, - 0xd3, 0x3e, 0x8d, 0xf5, 0x40, 0xa9, 0x43, 0x79, 0x18, 0xc4, 0x06, 0x58, 0x56, 0xc0, 0xc3, 0x2b, - 0x01, 0x4d, 0x9d, 0xce, 0xeb, 0x20, 0x6c, 0x69, 0x73, 0x9a, 0x48, 0x97, 0x48, 0x12, 0x0e, 0x85, - 0x34, 0x9c, 0xda, 0xf5, 0x13, 0xb9, 0xa8, 0x84, 0x70, 0x79, 0xe2, 0x98, 0xae, 0x28, 0x64, 0xb1, - 0xc7, 0x26, 0x2b, 0xba, 0x71, 0xfd, 0x15, 0xcd, 0xeb, 0x20, 0x6c, 0x69, 0x53, 0x51, 0x9e, 0xe7, - 0x0b, 0x95, 0x5a, 0xf5, 0x79, 0xbe, 0x50, 0xad, 0xd5, 0x70, 0x79, 0xc8, 0x42, 0xe6, 0xf4, 0x1f, - 0xea, 0x40, 0x6c, 0xd1, 0xef, 0x89, 0x98, 0x7c, 0x43, 0x2d, 0xb0, 0xfe, 0x52, 0x66, 0x17, 0x71, - 0x0d, 0xe4, 0xce, 0xe9, 0x50, 0xdf, 0x45, 0x38, 0x6b, 0xc2, 0x3a, 0x58, 0xef, 0x93, 0x30, 0xd1, - 0x37, 0x7a, 0x11, 0x6b, 0x03, 0x9d, 0x82, 0xea, 0x19, 0x27, 0xb1, 0x20, 0xae, 0x0c, 0x58, 0xfc, - 0x82, 0xf9, 0x02, 0x42, 0x90, 0x57, 0x67, 0xa2, 0x1e, 0xab, 0xda, 0xf0, 0x13, 0x90, 0x0f, 0x99, - 0x2f, 0x1a, 0x6b, 0x3b, 0xb9, 0xa6, 0xb5, 0x7f, 0xeb, 0xf2, 0x9d, 0xfa, 0x82, 0xf9, 0x58, 0x85, - 0xa0, 0x3f, 0xd6, 0x40, 0xee, 0x05, 0xf3, 0x61, 0x03, 0x6c, 0x12, 0xcf, 0xe3, 0x54, 0x08, 0xa3, - 0x34, 0x31, 0xe1, 0x16, 0xd8, 0x90, 0xac, 0x17, 0xb8, 0x5a, 0xae, 0x88, 0x8d, 0x95, 0x81, 0x3d, - 0x22, 0x89, 0xba, 0x55, 0x4a, 0x58, 0xb5, 0xe1, 0x3e, 0x28, 0xa9, 0x95, 0x39, 0x71, 0x12, 0x75, - 0x28, 0x57, 0x97, 0x43, 0xbe, 0x5d, 0xb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0c, 0x00, 0x00, + // 1452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0x23, 0x35, + 0x18, 0x6e, 0x9a, 0xb4, 0x4d, 0x9c, 0xcf, 0xba, 0xdd, 0x92, 0xdd, 0x8a, 0x4e, 0x99, 0x03, 0x2a, + 0xd2, 0x6e, 0xb3, 0xed, 0xaa, 0xa2, 0xda, 0x15, 0x87, 0xa6, 0xed, 0x2e, 0x5d, 0x16, 0xb6, 0x72, + 0x8b, 0x90, 0x90, 0xd0, 0xc8, 0x99, 0xf1, 0x4e, 0x86, 0xce, 0x8c, 0x23, 0xdb, 0x13, 0x12, 0xc4, + 0x0f, 0x40, 0xe2, 0xc2, 0x91, 0x03, 0x07, 0xc4, 0xaf, 0x59, 0x71, 0xda, 0x23, 0x02, 0x69, 0x84, + 0xba, 0x27, 0x72, 0xcc, 0x2f, 0x40, 0x63, 0x7b, 0xf2, 0xd5, 0x0a, 0x68, 0x4f, 0xf1, 0xf3, 0x7e, + 0x3c, 0x8f, 0xfd, 0xfa, 0xb5, 0xc7, 0x01, 0xf7, 0x88, 0x68, 0x13, 0x16, 0x78, 0xa1, 0x68, 0x90, + 0x6e, 0xd0, 0xe8, 0xee, 0x24, 0x3f, 0xdb, 0x1d, 0x46, 0x05, 0x85, 0xb5, 0x91, 0x6f, 0x3b, 0x31, + 0x76, 0x77, 0xee, 0xad, 0xba, 0xd4, 0xa5, 0xd2, 0xd9, 0x48, 0x46, 0x2a, 0xce, 0xfc, 0x73, 0x1e, + 0x2c, 0x9e, 0x62, 0x86, 0x03, 0x0e, 0x77, 0x40, 0x81, 0x74, 0x03, 0xcb, 0x21, 0x21, 0x0d, 0xea, + 0x99, 0xcd, 0xcc, 0x56, 0xa1, 0xb9, 0x3a, 0x8c, 0x8d, 0x5a, 0x1f, 0x07, 0xfe, 0x63, 0x73, 0xe4, + 0x32, 0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0x69, 0xae, 0xe9, 0xd7, 0x53, 0x45, 0x69, 0xeb, 0x7c, 0x33, 0xa9, 0xad, 0x6c, 0xa5, 0x1a, 0xc8, + 0x32, 0x22, 0xe4, 0xa6, 0x95, 0x50, 0x32, 0x84, 0xf7, 0x40, 0x9e, 0x91, 0x2e, 0x61, 0x82, 0x38, + 0x72, 0x73, 0xf2, 0x68, 0x84, 0xe1, 0x5d, 0x90, 0x77, 0x31, 0xb7, 0x22, 0x4e, 0x1c, 0xb5, 0x13, + 0x68, 0xc9, 0xc5, 0xfc, 0x73, 0x4e, 0x9c, 0xc7, 0xb9, 0xef, 0x93, 0xc7, 0x17, 0x06, 0xc5, 0x03, + 0xdb, 0x26, 0x9c, 0x9f, 0x47, 0x1d, 0x9f, 0xfc, 0x4b, 0x87, 0xed, 0x82, 0x12, 0x17, 0x94, 0x61, + 0x97, 0x58, 0x17, 0xa4, 0xaf, 0xfb, 0x4c, 0x75, 0x8d, 0xb6, 0x7f, 0x42, 0xfa, 0x1c, 0x4d, 0x02, + 0x2d, 0xf1, 0x6b, 0x06, 0x14, 0xcf, 0x19, 0xb6, 0x89, 0x7e, 0xdf, 0x25, 0xbd, 0x9a, 0x40, 0xa6, + 0x25, 0x34, 0x4a, 0xb4, 0x85, 0x17, 0x10, 0x1a, 0x09, 0x7d, 0x9e, 0x52, 0x98, 0x64, 0x30, 0x42, + 0x7a, 0xc4, 0x96, 0x65, 0xcc, 0x21, 0x8d, 0xe0, 0x09, 0x00, 0x3e, 0x75, 0xd3, 0xc7, 0x69, 0x4e, + 0x96, 0x78, 0xfd, 0xda, 0x83, 0xa4, 0x9f, 0xa6, 0xb2, 0xa7, 0xfc, 0x14, 0xa2, 0xf1, 0xd0, 0xfc, + 0x7b, 0x1e, 0x14, 0x46, 0x71, 0x70, 0x1f, 0x54, 0x1c, 0x8f, 0xcb, 0x77, 0x75, 0x40, 0x02, 0xca, + 0xd4, 0xa9, 0xcf, 0x37, 0x97, 0x07, 0xb1, 0x51, 0xd6, 0x9e, 0x4f, 0xa5, 0x03, 0x4d, 0x43, 0xb8, + 0x07, 0x52, 0x83, 0xc5, 0x05, 0xd6, 0x8f, 0xc9, 0x7c, 0xb3, 0x36, 0x88, 0x8d, 0x92, 0x76, 0x9c, + 0x25, 0x76, 0x34, 0x85, 0xe0, 0x13, 0x50, 0x1d, 0xa7, 0xc9, 0x02, 0xea, 0x87, 0x20, 0x1c, 0xc4, + 0x46, 0x65, 0x14, 0x2a, 0x3d, 0x68, 0x06, 0xc3, 0x63, 0xb0, 0x92, 0x26, 0x33, 0x22, 0x22, 0x16, + 0x5a, 0xf2, 0xcc, 0xe7, 0x24, 0xc1, 0x9d, 0x41, 0x6c, 0x2c, 0x6b, 0x37, 0x92, 0xde, 0x23, 0x2c, + 0x30, 0xba, 0x6a, 0x4a, 0x7a, 0xd8, 0x21, 0xad, 0xc8, 0xd5, 0x4d, 0xa4, 0x40, 0x62, 0xf5, 0xbd, + 0xc0, 0x13, 0xb2, 0x7d, 0x16, 0x90, 0x02, 0xf0, 0x09, 0x28, 0xbc, 0xec, 0x12, 0xc6, 0x3c, 0x87, + 0x70, 0x79, 0x5e, 0xff, 0xeb, 0x5f, 0x01, 0x1a, 0xc7, 0x37, 0x9b, 0xaf, 0x2f, 0x37, 0x32, 0x6f, + 0x2e, 0x37, 0x32, 0x7f, 0x5d, 0x6e, 0x64, 0x7e, 0x7c, 0xbb, 0x31, 0xf7, 0xe6, 0xed, 0xc6, 0xdc, + 0xef, 0x6f, 0x37, 0xe6, 0xbe, 0xdc, 0x9a, 0xb8, 0xdf, 0x45, 0x1b, 0x33, 0xee, 0xf1, 0xc6, 0xf8, + 0xff, 0x5b, 0x4f, 0xfe, 0x83, 0x93, 0xb7, 0x7c, 0x6b, 0x51, 0xfe, 0x33, 0x7b, 0xf4, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x15, 0xb7, 0xe4, 0x65, 0xdf, 0x0d, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1244,6 +1363,18 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = 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-- @@ -1266,6 +1397,96 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 @@ -1517,6 +1738,41 @@ func (m *TraceConfig) Size() (n int) { 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 } @@ -3294,6 +3550,247 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { 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:]) From 327cddcd4fd2e1b864be085dba06c5fbb8925c7e Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 2 Sep 2021 14:08:42 -0400 Subject: [PATCH 13/23] added comment --- x/evm/types/tracer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/evm/types/tracer.go b/x/evm/types/tracer.go index 5f93038324..93de66dc0f 100644 --- a/x/evm/types/tracer.go +++ b/x/evm/types/tracer.go @@ -51,7 +51,7 @@ type ExecutionResult struct { } // StructLogRes stores a structured log emitted by the EVM while replaying a -// transaction in debug mode +// transaction in debug mode. Taken from go-ethereum type StructLogRes struct { Pc uint64 `json:"pc"` Op string `json:"op"` From c63a6cf3eff6bad1cb28347962b0d39d378664d9 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 3 Sep 2021 18:04:44 +0200 Subject: [PATCH 14/23] traceTransactions tests --- x/evm/keeper/grpc_query_test.go | 87 +++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 10 deletions(-) diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 3765cdc767..031b724273 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -747,11 +747,11 @@ func (suite *KeeperTestSuite) deployTestContract(owner common.Address, supply *b return crypto.CreateAddress(suite.address, nonce) } -func (suite *KeeperTestSuite) transferERC20Token(contractAddr common.Address, from common.Address, to common.Address) common.Hash { +func (suite *KeeperTestSuite) transferERC20Token(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, big.NewInt(1000)) + transferData, err := contractABI.Pack("transfer", to, amount) suite.Require().NoError(err) args, err := json.Marshal(&types.CallArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)}) suite.Require().NoError(err) @@ -762,7 +762,23 @@ func (suite *KeeperTestSuite) transferERC20Token(contractAddr common.Address, fr suite.Require().NoError(err) nonce := suite.app.EvmKeeper.GetNonce(suite.address) - types.ne + 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) + suite.Require().NoError(err) + rsp, err := suite.app.EvmKeeper.EthereumTx(ctx, ercTransferTx) + suite.Require().NoError(err) + suite.Require().Empty(rsp.VmError) + return ercTransferTx } func (suite *KeeperTestSuite) TestEstimateGas() { @@ -846,16 +862,67 @@ func (suite *KeeperTestSuite) TestEstimateGas() { func (suite *KeeperTestSuite) TestTraceTx() { ctx := sdk.WrapSDKContext(suite.ctx) - + //TODO deploy contract that triggers internal transactions var ( - args types.CallArgs - gasCap uint64 + txMsg *types.MsgEthereumTx + traceConfig *types.TraceConfig ) + testCases := []struct { - msg string - malleate func() - expPass bool - expGas uint64 + msg string + malleate func() + expPass bool + traceResponse []byte + }{ + { + msg: "default trace", + malleate: func() { + //Deploy contract + contractAddr := suite.deployTestContract(suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt()) + suite.Commit() + //Transfer token + txMsg = suite.transferERC20Token(contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + suite.Commit() + 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() { + //Deploy contract + contractAddr := suite.deployTestContract(suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt()) + suite.Commit() + //Transfer token + txMsg = suite.transferERC20Token(contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + suite.Commit() + 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() + 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) + } + }) } } From f7a2721c680855f36f609a94e1d8e67ab8bdce1f Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 3 Sep 2021 18:31:22 +0200 Subject: [PATCH 15/23] fix linter --- docs/api/proto-docs.md | 2 +- go.mod | 2 +- go.sum | 2 + proto/ethermint/evm/v1/evm.proto | 2 +- x/evm/types/evm.pb.go | 186 +++++++++++++++---------------- 5 files changed, 98 insertions(+), 96 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 9bd1b94109..0d0a7a8b70 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -231,7 +231,7 @@ LogConfig are the configuration options for structured logger the EVM | `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 | +| `overrides` | [ChainConfig](#ethermint.evm.v1.ChainConfig) | | Chain overrides, can be used to execute a trace using future fork rules | diff --git a/go.mod b/go.mod index 9b13e78076..dd7d74cc8a 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( 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-20210831024726-fe130286e0e2 + google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83 google.golang.org/grpc v1.40.0 gopkg.in/yaml.v2 v2.4.0 nhooyr.io/websocket v1.8.7 // indirect diff --git a/go.sum b/go.sum index 51e84ff9b8..e4a1c24132 100644 --- a/go.sum +++ b/go.sum @@ -1471,6 +1471,8 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/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= diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index 005b9d1d2c..504f8a974d 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -221,5 +221,5 @@ message LogConfig { // 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; + ChainConfig overrides = 7; } \ No newline at end of file diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 67df0d56aa..0abd5b2b48 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -596,7 +596,7 @@ type LogConfig struct { // 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"` + Overrides *ChainConfig `protobuf:"bytes,7,opt,name=overrides,proto3" json:"overrides,omitempty"` } func (m *LogConfig) Reset() { *m = LogConfig{} } @@ -696,98 +696,98 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } var fileDescriptor_d21ecc92c8c8583e = []byte{ - // 1452 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0x23, 0x35, - 0x18, 0x6e, 0x9a, 0xb4, 0x4d, 0x9c, 0xcf, 0xba, 0xdd, 0x92, 0xdd, 0x8a, 0x4e, 0x99, 0x03, 0x2a, - 0xd2, 0x6e, 0xb3, 0xed, 0xaa, 0xa2, 0xda, 0x15, 0x87, 0xa6, 0xed, 0x2e, 0x5d, 0x16, 0xb6, 0x72, - 0x8b, 0x90, 0x90, 0xd0, 0xc8, 0x99, 0xf1, 0x4e, 0x86, 0xce, 0x8c, 0x23, 0xdb, 0x13, 0x12, 0xc4, - 0x0f, 0x40, 0xe2, 0xc2, 0x91, 0x03, 0x07, 0xc4, 0xaf, 0x59, 0x71, 0xda, 0x23, 0x02, 0x69, 0x84, - 0xba, 0x27, 0x72, 0xcc, 0x2f, 0x40, 0x63, 0x7b, 0xf2, 0xd5, 0x0a, 0x68, 0x4f, 0xf1, 0xf3, 0x7e, - 0x3c, 0x8f, 0xfd, 0xfa, 0xb5, 0xc7, 0x01, 0xf7, 0x88, 0x68, 0x13, 0x16, 0x78, 0xa1, 0x68, 0x90, - 0x6e, 0xd0, 0xe8, 0xee, 0x24, 0x3f, 0xdb, 0x1d, 0x46, 0x05, 0x85, 0xb5, 0x91, 0x6f, 0x3b, 0x31, - 0x76, 0x77, 0xee, 0xad, 0xba, 0xd4, 0xa5, 0xd2, 0xd9, 0x48, 0x46, 0x2a, 0xce, 0xfc, 0x73, 0x1e, - 0x2c, 0x9e, 0x62, 0x86, 0x03, 0x0e, 0x77, 0x40, 0x81, 0x74, 0x03, 0xcb, 0x21, 0x21, 0x0d, 0xea, - 0x99, 0xcd, 0xcc, 0x56, 0xa1, 0xb9, 0x3a, 0x8c, 0x8d, 0x5a, 0x1f, 0x07, 0xfe, 0x63, 0x73, 0xe4, - 0x32, 0x51, 0x9e, 0x74, 0x83, 0xa3, 0x64, 0x08, 0x3f, 0x02, 0x65, 0x12, 0xe2, 0x96, 0x4f, 0x2c, - 0x9b, 0x11, 0x2c, 0x48, 0x7d, 0x7e, 0x33, 0xb3, 0x95, 0x6f, 0xd6, 0x87, 0xb1, 0xb1, 0xaa, 0xd3, - 0x26, 0xdd, 0x26, 0x2a, 0x29, 0x7c, 0x28, 0x21, 0xfc, 0x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xe4, 0x31, 0x51, 0x51, 0x41, 0xa9, - 0xf2, 0x3c, 0x97, 0xaf, 0xd4, 0xaa, 0xcf, 0x73, 0xf9, 0x6a, 0xad, 0x86, 0xca, 0x7d, 0xea, 0x53, - 0xab, 0xfb, 0x48, 0x05, 0xa2, 0x22, 0xf9, 0x06, 0xf3, 0xf4, 0x0c, 0x35, 0xc0, 0xc2, 0x99, 0x48, - 0x3e, 0xc4, 0x35, 0x90, 0xbd, 0x20, 0x7d, 0xf5, 0x2d, 0x42, 0xc9, 0x10, 0xae, 0x82, 0x85, 0x2e, - 0xf6, 0x23, 0xf5, 0x45, 0x2f, 0x20, 0x05, 0xcc, 0x53, 0x50, 0x3d, 0x67, 0x38, 0xe4, 0xd8, 0x16, - 0x1e, 0x0d, 0x5f, 0x50, 0x97, 0x43, 0x08, 0x72, 0xf2, 0x4e, 0x54, 0xb9, 0x72, 0x0c, 0x3f, 0x00, - 0x39, 0x9f, 0xba, 0xbc, 0x3e, 0xbf, 0x99, 0xdd, 0x2a, 0xee, 0xde, 0xb9, 0xfa, 0x4d, 0x7d, 0x41, - 0x5d, 0x24, 0x43, 0xcc, 0xdf, 0xe6, 0x41, 0xf6, 0x05, 0x75, 0x61, 0x1d, 0x2c, 0x61, 0xc7, 0x61, - 0x84, 0x73, 0xcd, 0x94, 0x42, 0xb8, 0x06, 0x16, 0x05, 0xed, 0x78, 0xb6, 0xa2, 0x2b, 0x20, 0x8d, - 0x12, 0x61, 0x07, 0x0b, 0x2c, 0xbf, 0x2a, 0x25, 0x24, 0xc7, 0x70, 0x17, 0x94, 0xe4, 0xca, 0xac, - 0x30, 0x0a, 0x5a, 0x84, 0xc9, 0x8f, 0x43, 0xae, 0x59, 0x1d, 0xc4, 0x46, 0x51, 0xda, 0x3f, 0x93, - 0x66, 0x34, 0x09, 0xe0, 0x7d, 0xb0, 0x24, 0x7a, 0x93, 0xf7, 0xfa, 0xca, 0x20, 0x36, 0xaa, 0x62, - 0xbc, 0xcc, 0xe4,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46, 0x65, 0x14, 0x2a, 0x3d, 0x68, 0x06, 0xc3, 0x63, 0xb0, 0x92, 0x26, 0x33, 0x22, 0x22, 0x16, - 0x5a, 0xf2, 0xcc, 0xe7, 0x24, 0xc1, 0x9d, 0x41, 0x6c, 0x2c, 0x6b, 0x37, 0x92, 0xde, 0x23, 0x2c, - 0x30, 0xba, 0x6a, 0x4a, 0x7a, 0xd8, 0x21, 0xad, 0xc8, 0xd5, 0x4d, 0xa4, 0x40, 0x62, 0xf5, 0xbd, - 0xc0, 0x13, 0xb2, 0x7d, 0x16, 0x90, 0x02, 0xf0, 0x09, 0x28, 0xbc, 0xec, 0x12, 0xc6, 0x3c, 0x87, - 0x70, 0x79, 0x5e, 0xff, 0xeb, 0x5f, 0x01, 0x1a, 0xc7, 0x37, 0x9b, 0xaf, 0x2f, 0x37, 0x32, 0x6f, - 0x2e, 0x37, 0x32, 0x7f, 0x5d, 0x6e, 0x64, 0x7e, 0x7c, 0xbb, 0x31, 0xf7, 0xe6, 0xed, 0xc6, 0xdc, - 0xef, 0x6f, 0x37, 0xe6, 0xbe, 0xdc, 0x9a, 0xb8, 0xdf, 0x45, 0x1b, 0x33, 0xee, 0xf1, 0xc6, 0xf8, - 0xff, 0x5b, 0x4f, 0xfe, 0x83, 0x93, 0xb7, 0x7c, 0x6b, 0x51, 0xfe, 0x33, 0x7b, 0xf4, 0x4f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x15, 0xb7, 0xe4, 0x65, 0xdf, 0x0d, 0x00, 0x00, + // 1455 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0x1b, 0x37, + 0x1a, 0xb6, 0x2c, 0xd9, 0x1e, 0x51, 0x9f, 0xa6, 0x1d, 0xaf, 0x12, 0x63, 0x3d, 0xde, 0x39, 0x2c, + 0xbc, 0x40, 0x62, 0xc5, 0x0e, 0x8c, 0x35,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x41, 0x38, 0x4c, 0xcc, 0xea, 0x38, 0x54, 0x7a, 0xd0, 0x1c, 0x86, 0xa7, 0x60, 0x2d, 0x4b, + 0x66, 0x44, 0xc4, 0x2c, 0xb2, 0xe5, 0x99, 0x2f, 0x48, 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) { From d9f53a506ba301a65a8f5f6ea2c80350e767b1f0 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 3 Sep 2021 18:39:47 +0200 Subject: [PATCH 16/23] remove unused --- ethereum/rpc/namespaces/debug/api.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ethereum/rpc/namespaces/debug/api.go b/ethereum/rpc/namespaces/debug/api.go index 743d2571dd..fe5be04b04 100644 --- a/ethereum/rpc/namespaces/debug/api.go +++ b/ethereum/rpc/namespaces/debug/api.go @@ -24,12 +24,6 @@ import ( rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" ) -const ( - // defaultTraceTimeout is the amount of time a single transaction can execute - // by default before being forcefully aborted. - defaultTraceTimeout = 5 * time.Second -) - // HandlerT keeps track of the cpu profiler and trace execution type HandlerT struct { cpuFilename string From e2f6596d7964c9d9f11a193cbe14ee381708d82f Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 4 Sep 2021 12:03:54 +0200 Subject: [PATCH 17/23] add comments to traceConfig --- docs/api/proto-docs.md | 8 ++++---- proto/ethermint/evm/v1/evm.proto | 4 ++++ x/evm/types/evm.pb.go | 10 +++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 0d0a7a8b70..012909295e 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -281,10 +281,10 @@ TraceConfig holds extra parameters to trace functions. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tracer` | [string](#string) | | | -| `timeout` | [string](#string) | | | -| `reexec` | [uint64](#uint64) | | | -| `log_config` | [LogConfig](#ethermint.evm.v1.LogConfig) | | | +| `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 | diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index 504f8a974d..1c3433c824 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -200,9 +200,13 @@ message AccessTuple { // 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" ]; } diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 0abd5b2b48..87d76c51e1 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -514,9 +514,13 @@ var xxx_messageInfo_AccessTuple proto.InternalMessageInfo // TraceConfig holds extra parameters to trace functions. type TraceConfig struct { - Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` - Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"` + // 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"` } From 3660b0d1e11b29bcc5a52a79462934ed89d25668 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 4 Sep 2021 13:37:12 +0200 Subject: [PATCH 18/23] update dependencies --- go.mod | 10 ---------- go.sum | 44 -------------------------------------------- 2 files changed, 54 deletions(-) diff --git a/go.mod b/go.mod index dd7d74cc8a..50104002e3 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,6 @@ go 1.16 require ( 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/aokoli/goutils v1.1.1 // indirect github.com/armon/go-metrics v0.3.9 github.com/btcsuite/btcd v0.22.0-beta github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -18,7 +14,6 @@ require ( github.com/deckarep/golang-set v1.7.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.3 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.1 // indirect github.com/ethereum/go-ethereum v1.10.3 github.com/gogo/protobuf v1.3.3 github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect @@ -31,16 +26,11 @@ require ( github.com/gorilla/websocket v1.4.2 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-immutable-radix v1.3.0 // indirect - github.com/huandu/xstrings v1.3.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/improbable-eng/grpc-web v0.14.1 github.com/miguelmota/go-ethereum-hdwallet v0.0.1 - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/palantir/stacktrace v0.0.0-20161112013806-78658fd2d177 github.com/pkg/errors v0.9.1 github.com/prometheus/tsdb v0.10.0 // indirect - github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/rjeczalik/notify v0.9.2 // indirect diff --git a/go.sum b/go.sum index e4a1c24132..71e932b6ed 100644 --- a/go.sum +++ b/go.sum @@ -67,14 +67,6 @@ 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= @@ -102,9 +94,6 @@ 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= @@ -235,7 +224,6 @@ 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= @@ -282,9 +270,6 @@ 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= @@ -448,7 +433,6 @@ 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= @@ -537,21 +521,14 @@ 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= @@ -651,7 +628,6 @@ 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= @@ -686,8 +662,6 @@ 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= @@ -698,8 +672,6 @@ 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= @@ -712,9 +684,6 @@ 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= @@ -799,7 +768,6 @@ 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= @@ -849,10 +817,6 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -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= @@ -912,8 +876,6 @@ 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= @@ -953,7 +915,6 @@ 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= @@ -1063,7 +1024,6 @@ 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= @@ -1205,7 +1165,6 @@ 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= @@ -1420,7 +1379,6 @@ 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= @@ -1469,8 +1427,6 @@ 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-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/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= From aa0897eac53dfe8970bc8157c517c5ca2708d4f3 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 4 Sep 2021 13:58:30 +0200 Subject: [PATCH 19/23] updated endpoints md --- docs/api/json-rpc/endpoints.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/api/json-rpc/endpoints.md b/docs/api/json-rpc/endpoints.md index 748c73c850..fcf5cfd52f 100644 --- a/docs/api/json-rpc/endpoints.md +++ b/docs/api/json-rpc/endpoints.md @@ -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 | ✔ | | | | `debug_verbosity` | Debug | | | | | `debug_vmodule` | Debug | | | | | `debug_writeBlockProfile` | Debug | ✔ | | | @@ -989,6 +989,23 @@ 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 + +``` +// 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` From b95a1fde0584aa1f85237fbb0d994da8cad63f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Kunze=20K=C3=BCllmer?= <31522760+fedekunze@users.noreply.github.com> Date: Sat, 4 Sep 2021 22:13:19 +0200 Subject: [PATCH 20/23] Apply suggestions from code review --- docs/api/json-rpc/endpoints.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/api/json-rpc/endpoints.md b/docs/api/json-rpc/endpoints.md index fcf5cfd52f..d95ace0315 100644 --- a/docs/api/json-rpc/endpoints.md +++ b/docs/api/json-rpc/endpoints.md @@ -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 | ✔ | | | @@ -992,12 +992,14 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"personal_ecRecover","params":["0 ## 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. + +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 From 7e8a53a9195a09758277c9134aeecf1032cb6a71 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Sat, 4 Sep 2021 22:13:54 +0200 Subject: [PATCH 21/23] Update x/evm/keeper/grpc_query.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- x/evm/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 3b47454fa8..b9c2d6af37 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -493,7 +493,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ //Used string to comply with go ethereum if req.TraceConfig.Timeout != "" { if timeout, err = time.ParseDuration(req.TraceConfig.Timeout); err != nil { - return nil, err + return nil, status.Errorf(codes.InvalidArgument, "timeout value: %s", err.Error()) } } From 81e06f4492166cbe40076ceb422854c17c086fc3 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Sat, 4 Sep 2021 22:14:05 +0200 Subject: [PATCH 22/23] Update x/evm/keeper/grpc_query.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- x/evm/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index b9c2d6af37..ed2e7489a0 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -500,7 +500,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ txContext := core.NewEVMTxContext(coreMessage) // Constuct the JavaScript tracer to execute with if tracer, err = tracers.New(req.TraceConfig.Tracer, txContext); err != nil { - return nil, err + return nil, status.Error(codes.Internal, err.Error()) } // Handle timeouts and RPC cancellations From f91540a5e6fae2c5cd4c935433b3dd7185035afb Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 4 Sep 2021 22:22:05 +0200 Subject: [PATCH 23/23] update features changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1aa0271e2b..8d1722416a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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