From 7233abb06029e9a94486e41d852fc5169e6c5390 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Fri, 5 Nov 2021 12:22:21 +0800 Subject: [PATCH 01/29] Problem: traceTransaction fails for succesful tx Solution: - Change the context to the begining of the block, rather than the end of it, while override block context to correct one pass predecessors pass current block information to grpc query --- docs/api/proto-docs.md | 4 + proto/ethermint/evm/v1/query.proto | 6 + rpc/ethereum/namespaces/debug/api.go | 56 ++++- x/evm/keeper/grpc_query.go | 20 +- x/evm/types/query.pb.go | 333 +++++++++++++++++++++------ x/evm/types/query.pb.gw.go | 34 ++- x/feemarket/types/query.pb.gw.go | 13 +- 7 files changed, 384 insertions(+), 82 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 48b45adc2c..7c79d6255b 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -747,6 +747,10 @@ QueryTraceTxRequest defines TraceTx request | `msg` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | | msgEthereumTx for the requested transaction | | `tx_index` | [uint64](#uint64) | | transaction index | | `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | +| `predecessors` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | the predecessor transactions included in the same block need to be replayed first to get correct context for tracing. | +| `block_number` | [int64](#int64) | | | +| `block_hash` | [string](#string) | | | +| `block_time` | [int64](#int64) | | | diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index fd4c0a7f31..392852ed27 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -228,6 +228,12 @@ message QueryTraceTxRequest { uint64 tx_index = 2; // TraceConfig holds extra parameters to trace functions. TraceConfig trace_config = 3; + // the predecessor transactions included in the same block + // need to be replayed first to get correct context for tracing. + repeated MsgEthereumTx predecessors = 4; + int64 block_number = 5; + string block_hash = 6; + int64 block_time = 7; } // QueryTraceTxResponse defines TraceTx response diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 0ddef354be..2d015b7731 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -14,7 +14,7 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/tendermint/tendermint/types" + tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" evmtypes "github.com/tharsis/ethermint/x/evm/types" @@ -81,6 +81,28 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( return nil, errors.New("genesis is not traceable") } + blk, err := a.backend.GetTendermintBlockByNumber(rpctypes.BlockNumber(transaction.Height)) + if err != nil { + a.logger.Debug("block not found", "height", transaction.Height) + return nil, err + } + + predecessors := []*evmtypes.MsgEthereumTx{} + for _, txBz := range blk.Block.Txs[:transaction.Index] { + tx, err := a.clientCtx.TxConfig.TxDecoder()(txBz) + if err != nil { + a.logger.Debug("failed to decode transaction in block", "height", blk.Block.Height, "error", err.Error()) + continue + } + msg := tx.GetMsgs()[0] + ethMsg, ok := msg.(*evmtypes.MsgEthereumTx) + if !ok { + continue + } + + predecessors = append(predecessors, ethMsg) + } + tx, err := a.clientCtx.TxConfig.TxDecoder()(transaction.Tx) if err != nil { a.logger.Debug("tx not found", "hash", hash) @@ -94,15 +116,25 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( } traceTxRequest := evmtypes.QueryTraceTxRequest{ - Msg: ethMessage, - TxIndex: uint64(transaction.Index), + Msg: ethMessage, + TxIndex: uint64(transaction.Index), + Predecessors: predecessors, + BlockNumber: blk.Block.Height, + BlockTime: blk.Block.Time.Unix(), + BlockHash: blk.BlockID.Hash.String(), } if config != nil { traceTxRequest.TraceConfig = config } - traceResult, err := a.queryClient.TraceTx(rpctypes.ContextWithHeight(transaction.Height), &traceTxRequest) + // minus one to get the context of block beginning + contextHeight := transaction.Height - 1 + if contextHeight < 1 { + // 0 is a special value in `ContextWithHeight` + contextHeight = 1 + } + traceResult, err := a.queryClient.TraceTx(rpctypes.ContextWithHeight(contextHeight), &traceTxRequest) if err != nil { return nil, err } @@ -131,13 +163,14 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T return nil, err } - return a.traceBlock(height, config, resBlock.Block.Txs) + return a.traceBlock(height, config, resBlock) } // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, txs types.Txs) ([]*evmtypes.TxTraceResult, error) { +func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { + txs := block.Block.Txs txsLength := len(txs) if txsLength == 0 { @@ -156,7 +189,13 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi threads = txsLength } - ctxWithHeight := rpctypes.ContextWithHeight(int64(height)) + // minus one to get the context at the begining of the block + contextHeight := height - 1 + if contextHeight < 1 { + // 0 is a special value for `ContextWithHeight`. + contextHeight = 1 + } + ctxWithHeight := rpctypes.ContextWithHeight(int64(contextHeight)) wg.Add(threads) for th := 0; th < threads; th++ { @@ -185,6 +224,9 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi Msg: ethMessage, TxIndex: uint64(task.Index), TraceConfig: config, + BlockNumber: block.Block.Height, + BlockTime: block.Block.Time.Unix(), + BlockHash: block.BlockID.Hash.String(), } res, err := a.queryClient.TraceTx(ctxWithHeight, traceTxRequest) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index b6477a945c..1e8ec0c8dd 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -360,14 +360,32 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } ctx := sdk.UnwrapSDKContext(c) + ctx = ctx.WithBlockHeight(req.BlockNumber) + ctx = ctx.WithBlockTime(time.Unix(req.BlockTime, 0)) + ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) k.WithContext(ctx) params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) - tx := req.Msg.AsTransaction() baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + for i, tx := range req.Predecessors { + ethTx := tx.AsTransaction() + msg, err := ethTx.AsMessage(signer) + if err != nil { + continue + } + k.SetTxHashTransient(ethTx.Hash()) + k.SetTxIndexTransient(uint64(i)) + + _, err = k.ApplyMessage(msg, types.NewNoOpTracer(), true) + if err != nil { + continue + } + } + + tx := req.Msg.AsTransaction() result, err := k.traceTx(ctx, signer, req.TxIndex, ethCfg, tx, baseFee, req.TraceConfig) if err != nil { return nil, err diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 13f128abd4..419b88ec85 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -890,6 +890,12 @@ type QueryTraceTxRequest struct { TxIndex uint64 `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"` + // the predecessor transactions included in the same block + // need to be replayed first to get correct context for tracing. + Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` } func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } @@ -946,6 +952,34 @@ func (m *QueryTraceTxRequest) GetTraceConfig() *TraceConfig { return nil } +func (m *QueryTraceTxRequest) GetPredecessors() []*MsgEthereumTx { + if m != nil { + return m.Predecessors + } + return nil +} + +func (m *QueryTraceTxRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceTxRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceTxRequest) GetBlockTime() int64 { + if m != nil { + return m.BlockTime + } + return 0 +} + // QueryTraceTxResponse defines TraceTx response type QueryTraceTxResponse struct { // response serialized in bytes @@ -1018,78 +1052,82 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1123 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0xbd, 0x89, 0x13, 0xa7, 0x8f, 0x93, 0x12, 0xa6, 0x41, 0x24, 0x4b, 0xea, 0xa4, 0x9b, - 0xe6, 0x3d, 0xda, 0xc5, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x24, 0x0a, 0x05, 0xb5, 0x45, 0xc5, 0x44, - 0x1c, 0xb8, 0x58, 0xe3, 0xf5, 0xb0, 0xb6, 0x6a, 0xef, 0xb8, 0x3b, 0x63, 0xe3, 0xb4, 0x84, 0x03, - 0x12, 0x15, 0xa8, 0x17, 0x24, 0xee, 0xa8, 0x17, 0xce, 0x7c, 0x8d, 0x1e, 0x2b, 0x71, 0xe1, 0x84, - 0x50, 0x82, 0x10, 0x1f, 0x03, 0xcd, 0xcb, 0xda, 0xbb, 0x5e, 0x6f, 0x9d, 0xa2, 0xde, 0xe6, 0xe5, - 0x99, 0xe7, 0xff, 0x9b, 0x99, 0x67, 0xff,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0xb3, 0x17, 0x50, 0x1f, 0xb1, 0xe7, 0x11, 0x46, 0x6d, 0x6d, 0x48, 0xed, 0x55, - 0x54, 0x18, 0xa1, 0xad, 0xc3, 0x2b, 0x1e, 0x66, 0xe8, 0x1b, 0xc8, 0x69, 0x47, 0x4c, 0xad, 0xbd, - 0xb8, 0xb1, 0xa7, 0xd6, 0xde, 0x90, 0xb1, 0xbe, 0x68, 0xf7, 0xca, 0xca, 0x79, 0xef, 0xe0, 0xe0, - 0xd9, 0x59, 0xc1, 0x78, 0x7e, 0x56, 0x30, 0xfe, 0x3a, 0x2b, 0x18, 0x3f, 0x9d, 0x17, 0x32, 0xcf, - 0xcf, 0x0b, 0x99, 0x3f, 0xce, 0x0b, 0x99, 0x2f, 0xb7, 0xbc, 0x06, 0xaf, 0x77, 0xaa, 0xb6, 0x4b, - 0x5b, 0x0e, 0xaf, 0xe3, 0x80, 0x35, 0x58, 0x24, 0x4f, 0x4f, 0x66, 0xe2, 0x27, 0x6d, 0xc2, 0xaa, - 0xd3, 0xf2, 0x57, 0xff, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x55, 0x07, 0x68, 0x0c, 0xb3, - 0x0c, 0x00, 0x00, + // 1193 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x55, + 0x17, 0xf6, 0xc4, 0x4e, 0x9c, 0x1e, 0xa7, 0x7d, 0xf3, 0xde, 0x06, 0xe1, 0x0e, 0xa9, 0xe3, 0x4e, + 0x9a, 0xef, 0xc8, 0x83, 0x0d, 0xaa, 0x44, 0x25, 0x04, 0x49, 0x14, 0x0a, 0x6a, 0x8b, 0x8a, 0x89, + 0x58, 0xb0, 0xb1, 0xae, 0xc7, 0x97, 0xf1, 0x28, 0x9e, 0xb9, 0xee, 0xdc, 0x6b, 0xe3, 0xb4, 0x84, + 0x05, 0x12, 0x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 0x79, 0x13, 0x87, 0xcc, 0x63, 0x43, 0x71, 0x7a, + 0x32, 0x12, 0x3f, 0x69, 0x13, 0x56, 0x9f, 0x93, 0x3f, 0x24, 0x6f, 0xfd, 0x13, 0x00, 0x00, 0xff, + 0xff, 0x39, 0x4d, 0x4d, 0xd7, 0x59, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2149,6 +2187,37 @@ func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.BlockTime != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockTime)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + if len(m.Predecessors) > 0 { + for iNdEx := len(m.Predecessors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Predecessors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if m.TraceConfig != nil { { size, err := m.TraceConfig.MarshalToSizedBuffer(dAtA[:i]) @@ -2502,6 +2571,22 @@ func (m *QueryTraceTxRequest) Size() (n int) { l = m.TraceConfig.Size() n += 1 + l + sovQuery(uint64(l)) } + if len(m.Predecessors) > 0 { + for _, e := range m.Predecessors { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockTime != 0 { + n += 1 + sovQuery(uint64(m.BlockTime)) + } return n } @@ -4332,6 +4417,110 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predecessors", 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 + } + m.Predecessors = append(m.Predecessors, &MsgEthereumTx{}) + if err := m.Predecessors[len(m.Predecessors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + m.BlockTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } 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 f788225117..9369b46d67 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccountRequest @@ -506,12 +508,14 @@ func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marsha // 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. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -519,6 +523,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -532,6 +537,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -539,6 +546,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -552,6 +560,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -559,6 +569,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -572,6 +583,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -579,6 +592,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -592,6 +606,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -599,6 +615,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -612,6 +629,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -619,6 +638,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -632,6 +652,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -639,6 +661,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -652,6 +675,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -659,6 +684,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -672,6 +698,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -679,6 +707,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -692,6 +721,8 @@ 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() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -699,6 +730,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/feemarket/types/query.pb.gw.go b/x/feemarket/types/query.pb.gw.go index 3795864c8b..57a0c8d449 100644 --- a/x/feemarket/types/query.pb.gw.go +++ b/x/feemarket/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -88,12 +90,14 @@ func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marsh // 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. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -101,6 +105,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -114,6 +119,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -121,6 +128,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -134,6 +142,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -141,6 +151,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) From 1b27db144d9ad05125e77b69c36f224ef387c97e Mon Sep 17 00:00:00 2001 From: HuangYi Date: Fri, 5 Nov 2021 21:17:56 +0800 Subject: [PATCH 02/29] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1a0a2e45..b2cead3d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (evm) [tharsis#660](https://github.com/tharsis/ethermint/pull/660) Fix `nil` pointer panic in `ApplyNativeMessage`. * (evm, test) [tharsis#649](https://github.com/tharsis/ethermint/pull/649) Test DynamicFeeTx. * (evm) [tharsis#702](https://github.com/tharsis/ethermint/pull/702) Fix panic in web3 RPC handlers +* (rpc) [tharsis#720](https://github.com/tharsis/ethermint/pull/720) Fix `debug_traceTransaction` failure ### Improvements From f1c7d5571cca581ff513c61b4c85dbf3cdad8dfb Mon Sep 17 00:00:00 2001 From: HuangYi Date: Fri, 5 Nov 2021 23:17:26 +0800 Subject: [PATCH 03/29] fix build --- 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 1e8ec0c8dd..a00a23b0c9 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -372,7 +372,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ for i, tx := range req.Predecessors { ethTx := tx.AsTransaction() - msg, err := ethTx.AsMessage(signer) + msg, err := ethTx.AsMessage(signer, baseFee) if err != nil { continue } From f5e0a6cdc7e65e5ee1e0bc6e3265985b6bb1f945 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Sat, 6 Nov 2021 08:39:27 +0800 Subject: [PATCH 04/29] fix lint --- rpc/ethereum/namespaces/debug/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 2d015b7731..bfb1fab6a2 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -189,7 +189,7 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi threads = txsLength } - // minus one to get the context at the begining of the block + // minus one to get the context at the beginning of the block contextHeight := height - 1 if contextHeight < 1 { // 0 is a special value for `ContextWithHeight`. From 2f9197c364e238c9a293e959b216cd9f7b37ede9 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 6 Nov 2021 17:57:36 -0400 Subject: [PATCH 05/29] refactor traceBlock --- Makefile | 2 +- client/docs/swagger-ui/swagger.yaml | 2185 +++++++++++++++++++++++---- docs/api/proto-docs.md | 38 +- go.mod | 13 +- go.sum | 27 + proto/ethermint/evm/v1/query.proto | 15 + proto/ethermint/evm/v1/tx.proto | 5 +- x/evm/keeper/grpc_query.go | 42 + x/evm/types/query.pb.go | 692 ++++++++- x/evm/types/query.pb.gw.go | 34 +- x/evm/types/tx.pb.go | 109 +- x/evm/types/tx.pb.gw.go | 166 ++ x/feemarket/types/query.pb.gw.go | 13 +- 13 files changed, 2859 insertions(+), 482 deletions(-) create mode 100644 x/evm/types/tx.pb.gw.go diff --git a/Makefile b/Makefile index ee820edd10..6580ad6ab4 100755 --- a/Makefile +++ b/Makefile @@ -419,7 +419,7 @@ proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \ + @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \ sh ./scripts/protocgen.sh; fi proto-swagger-gen: diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index eeb289ed21..7f4dc76248 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,10 +1,10 @@ swagger: '2.0' info: title: Ethermint Chain - Legacy REST and gRPC Gateway docs - description: 'A REST interface for state queries, legacy transactions' + description: A REST interface for state queries, legacy transactions version: 1.0.0 paths: - '/ethermint/evm/v1/account/{address}': + /ethermint/evm/v1/account/{address}: get: summary: Account queries an Ethereum account. operationId: Account @@ -224,7 +224,7 @@ paths: type: string tags: - Query - '/ethermint/evm/v1/balances/{address}': + /ethermint/evm/v1/balances/{address}: get: summary: |- Balance queries the balance of a the EVM denomination for a single @@ -439,7 +439,7 @@ paths: type: string tags: - Query - '/ethermint/evm/v1/codes/{address}': + /ethermint/evm/v1/codes/{address}: get: summary: Code queries the balance of all coins for a single account. operationId: Code @@ -653,7 +653,7 @@ paths: type: string tags: - Query - '/ethermint/evm/v1/cosmos_account/{address}': + /ethermint/evm/v1/cosmos_account/{address}: get: summary: CosmosAccount queries an Ethereum account's Cosmos Address. operationId: CosmosAccount @@ -1131,7 +1131,7 @@ paths: data: type: string format: byte - title: 'supplied by the contract, usually ABI-encoded' + title: supplied by the contract, usually ABI-encoded block_number: type: string format: uint64 @@ -1700,7 +1700,7 @@ paths: } tags: - Query - '/ethermint/evm/v1/storage/{address}/{key}': + /ethermint/evm/v1/storage/{address}/{key}: get: summary: Storage queries the balance of all coins for a single account. operationId: Storage @@ -2250,13 +2250,13 @@ paths: required: false type: boolean - name: trace_config.limit - description: 'maximum length of output, but zero means unlimited.' + description: maximum length of output, but zero means unlimited. in: query required: false type: integer format: int32 - name: trace_config.overrides.homestead_block - description: 'Homestead switch block (nil no fork, 0 = already homestead).' + description: Homestead switch block (nil no fork, 0 = already homestead). in: query required: false type: string @@ -2297,12 +2297,12 @@ paths: required: false type: string - name: trace_config.overrides.byzantium_block - description: 'Byzantium switch block (nil no fork, 0 = already on byzantium).' + description: Byzantium switch block (nil no fork, 0 = already on byzantium). in: query required: false type: string - name: trace_config.overrides.constantinople_block - description: 'Constantinople switch block (nil no fork, 0 = already activated).' + description: Constantinople switch block (nil no fork, 0 = already activated). in: query required: false type: string @@ -2312,7 +2312,7 @@ paths: required: false type: string - name: trace_config.overrides.istanbul_block - description: 'Istanbul switch block (nil no fork, 0 = already on istanbul).' + description: Istanbul switch block (nil no fork, 0 = already on istanbul). in: query required: false type: string @@ -2324,12 +2324,12 @@ paths: required: false type: string - name: trace_config.overrides.berlin_block - description: 'Berlin switch block (nil = no fork, 0 = already on berlin).' + description: Berlin switch block (nil = no fork, 0 = already on berlin). in: query required: false type: string - name: trace_config.overrides.london_block - description: 'London switch block (nil = no fork, 0 = already on london).' + description: London switch block (nil = no fork, 0 = already on london). in: query required: false type: string @@ -2343,9 +2343,23 @@ paths: in: query required: false type: boolean + - name: block_number + in: query + required: false + type: string + format: int64 + - name: block_hash + in: query + required: false + type: string + - name: block_time + in: query + required: false + type: string + format: int64 tags: - Query - '/ethermint/evm/v1/validator_account/{cons_address}': + /ethermint/evm/v1/validator_account/{cons_address}: get: summary: >- ValidatorAccount queries an Ethereum account's from a validator @@ -3026,7 +3040,7 @@ paths: type: boolean tags: - Query - '/cosmos/auth/v1beta1/accounts/{address}': + /cosmos/auth/v1beta1/accounts/{address}: get: summary: Account returns account details based on address. operationId: AuthAccount @@ -3037,7 +3051,6 @@ paths: type: object properties: account: - description: account defines the account of the corresponding address. type: object properties: type_url: @@ -3103,6 +3116,111 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -3526,7 +3644,7 @@ paths: } tags: - Query - '/cosmos/bank/v1beta1/balances/{address}': + /cosmos/bank/v1beta1/balances/{address}: get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances @@ -3660,7 +3778,7 @@ paths: type: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/{denom}': + /cosmos/bank/v1beta1/balances/{address}/{denom}: get: summary: Balance queries the balance of a single coin for a single account. operationId: BankBalance @@ -3671,13 +3789,20 @@ paths: type: object properties: balance: - description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. @@ -3901,7 +4026,7 @@ paths: type: boolean tags: - Query - '/cosmos/bank/v1beta1/denoms_metadata/{denom}': + /cosmos/bank/v1beta1/denoms_metadata/{denom}: get: summary: DenomsMetadata queries the client metadata of a given coin denomination. operationId: DenomMetadata @@ -3912,9 +4037,6 @@ paths: type: object properties: metadata: - description: >- - metadata describes and provides all the client information for - the requested token. type: object properties: description: @@ -3978,6 +4100,9 @@ paths: ATOM). This can be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. description: >- QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC @@ -4199,7 +4324,7 @@ paths: type: boolean tags: - Query - '/cosmos/bank/v1beta1/supply/{denom}': + /cosmos/bank/v1beta1/supply/{denom}: get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf @@ -4210,13 +4335,20 @@ paths: type: object properties: amount: - description: amount is the supply of the coin. type: object properties: denom: type: string amount: type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. @@ -4308,7 +4440,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each @@ -4401,7 +4533,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards @@ -4468,7 +4600,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: get: summary: DelegatorValidators queries the validators of a delegator. operationId: DistDelegatorValidators @@ -4518,7 +4650,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address: get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress @@ -4613,7 +4745,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + /cosmos/distribution/v1beta1/validators/{validator_address}/commission: get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission @@ -4678,7 +4810,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards @@ -4750,7 +4882,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + /cosmos/distribution/v1beta1/validators/{validator_address}/slashes: get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes @@ -5047,7 +5179,7 @@ paths: format: byte tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + /cosmos/gov/v1beta1/params/{params_type}: get: summary: Params queries all parameters of the gov module. operationId: GovParams @@ -5891,7 +6023,7 @@ paths: type: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + /cosmos/gov/v1beta1/proposals/{proposal_id}: get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal @@ -6354,7 +6486,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits: get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits @@ -6669,7 +6801,7 @@ paths: type: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- Deposit queries single deposit information based proposalID, @@ -6682,7 +6814,6 @@ paths: type: object properties: deposit: - description: deposit defines the requested deposit. type: object properties: proposal_id: @@ -6707,6 +6838,11 @@ paths: custom method signatures required by gogoproto. + description: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -6913,7 +7049,7 @@ paths: type: string tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + /cosmos/gov/v1beta1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult @@ -6924,7 +7060,6 @@ paths: type: object properties: tally: - description: tally defines the requested tally. type: object properties: 'yes': @@ -6935,6 +7070,9 @@ paths: type: string no_with_veto: type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -7136,7 +7274,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: Votes @@ -7480,9 +7618,9 @@ paths: type: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' + summary: Vote queries voted information based on proposalID, voterAddr. operationId: Vote responses: '200': @@ -7491,7 +7629,6 @@ paths: type: object properties: vote: - description: vote defined the queried vote. type: object properties: proposal_id: @@ -7545,6 +7682,11 @@ paths: description: >- WeightedVoteOption defines a unit of vote for vote split. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. description: >- QueryVoteResponse is the response type for the Query/Vote RPC method. @@ -7751,7 +7893,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/delegations/{delegator_addr}: get: summary: >- DelegatorDelegations queries all delegations of a given delegator @@ -8087,7 +8229,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: summary: Redelegations queries redelegations of given address. operationId: Redelegations @@ -8493,7 +8635,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -8831,7 +8973,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: get: summary: |- DelegatorValidators queries all validators info for given delegator @@ -8854,9 +8996,6 @@ paths: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -8923,6 +9062,116 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -9320,7 +9569,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: get: summary: |- DelegatorValidator queries validator info for given delegator validator @@ -9333,7 +9582,6 @@ paths: type: object properties: validator: - description: validator defines the the validator info. type: object properties: operator_address: @@ -9342,9 +9590,6 @@ paths: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -9411,75 +9656,183 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: commission_rates: description: >- commission_rates defines the initial commission rates @@ -9512,6 +9865,29 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + description: >- + Validator defines a validator, together with the total amount + of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct calculation + of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated divided + by the current + + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. @@ -9717,7 +10093,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/historical_info/{height}': + /cosmos/staking/v1beta1/historical_info/{height}: get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo @@ -9819,9 +10195,6 @@ paths: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -9888,6 +10261,117 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol + buffer message along with a + + URL that describes the type of the serialized + message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods + of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will + by default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" + will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded + message, with an + + additional field `@type` which contains the type + URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to + the `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -10678,9 +11162,6 @@ paths: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -10747,44 +11228,154 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed - from bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: type: string description: >- identity defines an optional identity signature (ex. @@ -11144,7 +11735,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}: get: summary: Validator queries validator info for given validator address. operationId: Validator @@ -11155,7 +11746,6 @@ paths: type: object properties: validator: - description: validator defines the the validator info. type: object properties: operator_address: @@ -11164,9 +11754,6 @@ paths: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -11233,6 +11820,114 @@ paths: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -11334,6 +12029,29 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + description: >- + Validator defines a validator, together with the total amount + of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct calculation + of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated divided + by the current + + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. title: >- QueryValidatorResponse is response type for the Query/Validator RPC method @@ -11534,7 +12252,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations @@ -11865,7 +12583,7 @@ paths: type: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation @@ -11876,9 +12594,6 @@ paths: type: object properties: delegation_response: - description: >- - delegation_responses defines the delegation info of a - delegation. type: object properties: delegation: @@ -11920,6 +12635,12 @@ paths: custom method signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a + + balance in addition to shares which is more suitable for + client responses. description: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -12125,7 +12846,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator @@ -12138,7 +12859,6 @@ paths: type: object properties: unbond: - description: unbond defines the unbonding information of a delegation. type: object properties: delegator_address: @@ -12180,6 +12900,11 @@ paths: UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds + + for a single validator in an time-ordered list. description: >- QueryDelegationResponse is response type for the Query/UnbondingDelegation @@ -12387,7 +13112,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a @@ -12729,7 +13454,7 @@ definitions: properties: homestead_block: type: string - title: 'Homestead switch block (nil no fork, 0 = already homestead)' + title: Homestead switch block (nil no fork, 0 = already homestead) dao_fork_block: type: string title: TheDAO hard-fork switch block (nil no fork) @@ -12756,16 +13481,16 @@ definitions: title: EIP158 HF block byzantium_block: type: string - title: 'Byzantium switch block (nil no fork, 0 = already on byzantium)' + title: Byzantium switch block (nil no fork, 0 = already on byzantium) constantinople_block: type: string - title: 'Constantinople switch block (nil no fork, 0 = already activated)' + title: Constantinople switch block (nil no fork, 0 = already activated) petersburg_block: type: string title: Petersburg switch block (nil same as Constantinople) istanbul_block: type: string - title: 'Istanbul switch block (nil no fork, 0 = already on istanbul)' + title: Istanbul switch block (nil no fork, 0 = already on istanbul) muir_glacier_block: type: string title: >- @@ -12773,10 +13498,10 @@ definitions: activated) berlin_block: type: string - title: 'Berlin switch block (nil = no fork, 0 = already on berlin)' + title: Berlin switch block (nil = no fork, 0 = already on berlin) london_block: type: string - title: 'London switch block (nil = no fork, 0 = already on london)' + title: London switch block (nil = no fork, 0 = already on london) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -12804,7 +13529,7 @@ definitions: data: type: string format: byte - title: 'supplied by the contract, usually ABI-encoded' + title: supplied by the contract, usually ABI-encoded block_number: type: string format: uint64 @@ -12843,7 +13568,6 @@ definitions: type: object properties: data: - title: inner transaction data type: object properties: type_url: @@ -13002,6 +13726,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: inner transaction data size: type: number format: double @@ -13041,7 +13766,7 @@ definitions: data: type: string format: byte - title: 'supplied by the contract, usually ABI-encoded' + title: supplied by the contract, usually ABI-encoded block_number: type: string format: uint64 @@ -13123,7 +13848,7 @@ definitions: properties: homestead_block: type: string - title: 'Homestead switch block (nil no fork, 0 = already homestead)' + title: Homestead switch block (nil no fork, 0 = already homestead) dao_fork_block: type: string title: TheDAO hard-fork switch block (nil no fork) @@ -13150,16 +13875,16 @@ definitions: title: EIP158 HF block byzantium_block: type: string - title: 'Byzantium switch block (nil no fork, 0 = already on byzantium)' + title: Byzantium switch block (nil no fork, 0 = already on byzantium) constantinople_block: type: string - title: 'Constantinople switch block (nil no fork, 0 = already activated)' + title: Constantinople switch block (nil no fork, 0 = already activated) petersburg_block: type: string title: Petersburg switch block (nil same as Constantinople) istanbul_block: type: string - title: 'Istanbul switch block (nil no fork, 0 = already on istanbul)' + title: Istanbul switch block (nil no fork, 0 = already on istanbul) muir_glacier_block: type: string title: >- @@ -13167,10 +13892,10 @@ definitions: activated) berlin_block: type: string - title: 'Berlin switch block (nil = no fork, 0 = already on berlin)' + title: Berlin switch block (nil = no fork, 0 = already on berlin) london_block: type: string - title: 'London switch block (nil = no fork, 0 = already on london)' + title: London switch block (nil = no fork, 0 = already on london) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -13267,7 +13992,7 @@ definitions: properties: homestead_block: type: string - title: 'Homestead switch block (nil no fork, 0 = already homestead)' + title: Homestead switch block (nil no fork, 0 = already homestead) dao_fork_block: type: string title: TheDAO hard-fork switch block (nil no fork) @@ -13294,7 +14019,7 @@ definitions: title: EIP158 HF block byzantium_block: type: string - title: 'Byzantium switch block (nil no fork, 0 = already on byzantium)' + title: Byzantium switch block (nil no fork, 0 = already on byzantium) constantinople_block: type: string title: >- @@ -13305,7 +14030,7 @@ definitions: title: Petersburg switch block (nil same as Constantinople) istanbul_block: type: string - title: 'Istanbul switch block (nil no fork, 0 = already on istanbul)' + title: Istanbul switch block (nil no fork, 0 = already on istanbul) muir_glacier_block: type: string title: >- @@ -13313,10 +14038,10 @@ definitions: activated) berlin_block: type: string - title: 'Berlin switch block (nil = no fork, 0 = already on berlin)' + title: Berlin switch block (nil = no fork, 0 = already on berlin) london_block: type: string - title: 'London switch block (nil = no fork, 0 = already on london)' + title: London switch block (nil = no fork, 0 = already on london) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -13391,7 +14116,7 @@ definitions: limit: type: integer format: int32 - title: 'maximum length of output, but zero means unlimited' + title: maximum length of output, but zero means unlimited overrides: title: >- Chain overrides, can be used to execute a trace using future fork @@ -13400,7 +14125,7 @@ definitions: properties: homestead_block: type: string - title: 'Homestead switch block (nil no fork, 0 = already homestead)' + title: Homestead switch block (nil no fork, 0 = already homestead) dao_fork_block: type: string title: TheDAO hard-fork switch block (nil no fork) @@ -13427,16 +14152,16 @@ definitions: title: EIP158 HF block byzantium_block: type: string - title: 'Byzantium switch block (nil no fork, 0 = already on byzantium)' + title: Byzantium switch block (nil no fork, 0 = already on byzantium) constantinople_block: type: string - title: 'Constantinople switch block (nil no fork, 0 = already activated)' + title: Constantinople switch block (nil no fork, 0 = already activated) petersburg_block: type: string title: Petersburg switch block (nil same as Constantinople) istanbul_block: type: string - title: 'Istanbul switch block (nil no fork, 0 = already on istanbul)' + title: Istanbul switch block (nil no fork, 0 = already on istanbul) muir_glacier_block: type: string title: >- @@ -13444,10 +14169,10 @@ definitions: activated) berlin_block: type: string - title: 'Berlin switch block (nil = no fork, 0 = already on berlin)' + title: Berlin switch block (nil = no fork, 0 = already on berlin) london_block: type: string - title: 'London switch block (nil = no fork, 0 = already on london)' + title: London switch block (nil = no fork, 0 = already on london) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -13812,7 +14537,6 @@ definitions: type: object properties: account: - description: account defines the account of the corresponding address. type: object properties: type_url: @@ -13873,6 +14597,104 @@ definitions: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -14316,13 +15138,17 @@ definitions: type: object properties: balance: - description: balance is the balance of the coin. type: object properties: denom: type: string amount: type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. @@ -14330,9 +15156,6 @@ definitions: type: object properties: metadata: - description: >- - metadata describes and provides all the client information for the - requested token. type: object properties: description: @@ -14391,6 +15214,9 @@ definitions: This can be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. description: >- QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC @@ -14519,13 +15345,17 @@ definitions: type: object properties: amount: - description: amount is the supply of the coin. type: object properties: denom: type: string amount: type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. @@ -15297,7 +16127,6 @@ definitions: type: object properties: deposit: - description: deposit defines the requested deposit. type: object properties: proposal_id: @@ -15322,6 +16151,9 @@ definitions: method signatures required by gogoproto. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -15958,7 +16790,6 @@ definitions: type: object properties: tally: - description: tally defines the requested tally. type: object properties: 'yes': @@ -15969,6 +16800,7 @@ definitions: type: string no_with_veto: type: string + description: TallyResult defines a standard tally for a governance proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -15976,7 +16808,6 @@ definitions: type: object properties: vote: - description: vote defined the queried vote. type: object properties: proposal_id: @@ -16027,6 +16858,9 @@ definitions: weight: type: string description: WeightedVoteOption defines a unit of vote for vote split. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. description: QueryVoteResponse is the response type for the Query/Vote RPC method. cosmos.gov.v1beta1.QueryVotesResponse: type: object @@ -16270,7 +17104,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -16291,7 +17125,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -16469,9 +17303,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. type: object properties: type_url: @@ -16518,25 +17349,128 @@ definitions: on changes to types. (Use versioned type names to manage breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: - protobuf release, and it is not used for type URLs beginning - with + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - type.googleapis.com. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + If the embedded message type is well-known and has a custom JSON - Schemes other than `http`, `https` (or the empty scheme) - might be + representation, that representation will be embedded adding a + field - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -16699,7 +17633,6 @@ definitions: type: object properties: delegation_response: - description: delegation_responses defines the delegation info of a delegation. type: object properties: delegation: @@ -16741,6 +17674,12 @@ definitions: method signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it contains + a + + balance in addition to shares which is more suitable for client + responses. description: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -16894,7 +17833,6 @@ definitions: type: object properties: validator: - description: validator defines the the validator info. type: object properties: operator_address: @@ -16903,9 +17841,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as - a Protobuf Any. type: object properties: type_url: @@ -16969,6 +17904,107 @@ definitions: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -17060,6 +18096,27 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. @@ -17077,9 +18134,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. type: object properties: type_url: @@ -17116,35 +18170,138 @@ definitions: * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning - with + If the embedded message type is well-known and has a custom JSON - type.googleapis.com. + representation, that representation will be embedded adding a + field + `value` which holds the custom JSON in addition to the `@type` - Schemes other than `http`, `https` (or the empty scheme) - might be + field. Example (for message [google.protobuf.Duration][]): - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -17376,9 +18533,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. type: object properties: type_url: @@ -17445,6 +18599,114 @@ definitions: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -17747,7 +19009,6 @@ definitions: type: object properties: unbond: - description: unbond defines the unbonding information of a delegation. type: object properties: delegator_address: @@ -17783,6 +19044,9 @@ definitions: UnbondingDelegationEntry defines an unbonding object with relevant metadata. description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. description: |- QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. @@ -17864,7 +19128,6 @@ definitions: type: object properties: validator: - description: validator defines the the validator info. type: object properties: operator_address: @@ -17873,9 +19136,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as - a Protobuf Any. type: object properties: type_url: @@ -17909,36 +19169,137 @@ definitions: server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning - with + If the embedded message type is well-known and has a custom JSON - type.googleapis.com. + representation, that representation will be embedded adding a + field + `value` which holds the custom JSON in addition to the `@type` - Schemes other than `http`, `https` (or the empty scheme) might - be + field. Example (for message [google.protobuf.Duration][]): - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -18030,6 +19391,27 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. title: QueryValidatorResponse is response type for the Query/Validator RPC method cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: type: object @@ -18116,9 +19498,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. type: object properties: type_url: @@ -18184,6 +19563,109 @@ definitions: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- @@ -18604,9 +20086,6 @@ definitions: operator_address defines the address of the validator's operator; bech encoded in JSON. consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as a - Protobuf Any. type: object properties: type_url: @@ -18667,6 +20146,104 @@ definitions: description: >- Must be a valid serialized protocol buffer of the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean description: >- diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 7c79d6255b..281b990d5a 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -47,6 +47,8 @@ - [QueryParamsResponse](#ethermint.evm.v1.QueryParamsResponse) - [QueryStorageRequest](#ethermint.evm.v1.QueryStorageRequest) - [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) + - [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) + - [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) - [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) - [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) - [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest) @@ -508,7 +510,7 @@ Msg defines the evm Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `EthereumTx` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthereumTx defines a method submitting Ethereum transactions. | | +| `EthereumTx` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthereumTx defines a method submitting Ethereum transactions. | GET|/ethermint/evm/v1/ethereum_tx| @@ -736,6 +738,40 @@ method. + + +### QueryTraceBlockRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `txs` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | txs messages in the block | +| `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | +| `block_number` | [int64](#int64) | | | +| `block_hash` | [string](#string) | | | +| `block_time` | [int64](#int64) | | | + + + + + + + + +### QueryTraceBlockResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | response serialized in bytes | + + + + + + ### QueryTraceTxRequest diff --git a/go.mod b/go.mod index 41ac22de67..7d6f991f1e 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 go.etcd.io/bbolt v1.3.6 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - google.golang.org/genproto v0.0.0-20211021150943-2b146023228c + google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 google.golang.org/grpc v1.41.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -47,6 +47,9 @@ require ( github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.8 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.52 // indirect @@ -70,6 +73,7 @@ require ( github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect @@ -93,7 +97,9 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/huandu/xstrings v1.3.2 // indirect github.com/huin/goupnp v1.0.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -106,8 +112,11 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect @@ -117,6 +126,8 @@ require ( github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect + github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect + github.com/pseudomuto/protokit v0.2.0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect diff --git a/go.sum b/go.sum index 1ff9206813..e9ffac6cd2 100644 --- a/go.sum +++ b/go.sum @@ -86,9 +86,13 @@ github.com/DataDog/zstd v1.4.8/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +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/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= @@ -322,6 +326,9 @@ github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 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.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= @@ -644,16 +651,21 @@ github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 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.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +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.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.8/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.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= @@ -768,6 +780,7 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= 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= @@ -826,6 +839,8 @@ github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +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-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= @@ -842,6 +857,8 @@ github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjU github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= 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= @@ -862,6 +879,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ 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.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= +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/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= @@ -1014,6 +1033,9 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +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/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= @@ -1094,6 +1116,7 @@ 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.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= @@ -1334,6 +1357,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1391,6 +1415,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1758,6 +1783,8 @@ google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c h1:FqrtZMB5Wr+/RecOM3uPJNPfWR8Upb5hAPnt7PU6i4k= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 h1:ZONpjmFT5e+I/0/xE3XXbG5OIvX2hRYzol04MhKBl2E= +google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 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.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 392852ed27..55cdf23441 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -241,3 +241,18 @@ message QueryTraceTxResponse { // response serialized in bytes bytes data = 1; } + +message QueryTraceBlockRequest { + // txs messages in the block + repeated MsgEthereumTx txs = 1; + // TraceConfig holds extra parameters to trace functions. + TraceConfig trace_config = 3; + int64 block_number = 5; + string block_hash = 6; + int64 block_time = 7; +} + +message QueryTraceBlockResponse { + // response serialized in bytes + bytes data = 1; +} diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index a6f0af9add..d9bb79612e 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package ethermint.evm.v1; import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "ethermint/evm/v1/evm.proto"; @@ -11,7 +12,9 @@ option go_package = "github.com/tharsis/ethermint/x/evm/types"; // Msg defines the evm Msg service. service Msg { // EthereumTx defines a method submitting Ethereum transactions. - rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse); + rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { + option (google.api.http).get = "/ethermint/evm/v1/ethereum_tx"; + }; } // MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index a00a23b0c9..f05c64eb04 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -401,6 +401,48 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ }, nil } +func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) (*types.QueryTraceTxResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if req.TraceConfig != nil && req.TraceConfig.Limit < 0 { + return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit) + } + + ctx := sdk.UnwrapSDKContext(c) + ctx = ctx.WithBlockHeight(req.BlockNumber) + ctx = ctx.WithBlockTime(time.Unix(req.BlockTime, 0)) + ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) + k.WithContext(ctx) + + params := k.GetParams(ctx) + ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) + signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) + baseFee := k.feeMarketKeeper.GetBaseFee(ctx) + + txsLength := len(req.Txs) + results := make([]*interface{}, txsLength) + + for i, tx := range req.Txs { + ethTx := tx.AsTransaction() + traceResult, err := k.traceTx(ctx, signer, uint64(i), ethCfg, ethTx, baseFee, req.TraceConfig) + if err != nil { + continue + } + results[i] = traceResult + } + + resultData, err := json.Marshal(results) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryTraceTxResponse{ + Data: resultData, + }, nil +} + func (k *Keeper) traceTx( ctx sdk.Context, signer ethtypes.Signer, diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 419b88ec85..5881af0126 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1026,6 +1026,129 @@ func (m *QueryTraceTxResponse) GetData() []byte { return nil } +type QueryTraceBlockRequest struct { + // txs messages in the block + Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + // TraceConfig holds extra parameters to trace functions. + TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` +} + +func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } +func (m *QueryTraceBlockRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockRequest) ProtoMessage() {} +func (*QueryTraceBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{20} +} +func (m *QueryTraceBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockRequest.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 *QueryTraceBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockRequest.Merge(m, src) +} +func (m *QueryTraceBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockRequest proto.InternalMessageInfo + +func (m *QueryTraceBlockRequest) GetTxs() []*MsgEthereumTx { + if m != nil { + return m.Txs + } + return nil +} + +func (m *QueryTraceBlockRequest) GetTraceConfig() *TraceConfig { + if m != nil { + return m.TraceConfig + } + return nil +} + +func (m *QueryTraceBlockRequest) GetBlockNumber() int64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *QueryTraceBlockRequest) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *QueryTraceBlockRequest) GetBlockTime() int64 { + if m != nil { + return m.BlockTime + } + return 0 +} + +type QueryTraceBlockResponse struct { + // response serialized in bytes + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } +func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockResponse) ProtoMessage() {} +func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{21} +} +func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockResponse.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 *QueryTraceBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockResponse.Merge(m, src) +} +func (m *QueryTraceBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo + +func (m *QueryTraceBlockResponse) 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") @@ -1047,87 +1170,92 @@ func init() { proto.RegisterType((*EstimateGasResponse)(nil), "ethermint.evm.v1.EstimateGasResponse") proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") + proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") + proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") } func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1193 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x55, - 0x17, 0xf6, 0xc4, 0x4e, 0x9c, 0x1e, 0xa7, 0x7d, 0xf3, 0xde, 0x06, 0xe1, 0x0e, 0xa9, 0xe3, 0x4e, - 0x9a, 0xef, 0xc8, 0x83, 0x0d, 0xaa, 0x44, 0x25, 0x04, 0x49, 0x14, 0x0a, 0x6a, 0x8b, 0x8a, 0x89, - 0x58, 0xb0, 0xb1, 0xae, 0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xd4, 0x80, 0xac, 0xd6, 0x91, 0x44, 0x22, 0xa3, 0xa2, 0x95, 0x48, 0x64, 0x4c, 0x8e, 0xac, - 0xb2, 0x24, 0xb2, 0x83, 0xb6, 0xe2, 0x44, 0x98, 0x32, 0x1d, 0xf0, 0xb0, 0x1f, 0x1f, 0x93, 0x93, - 0x53, 0xf4, 0x08, 0x32, 0x42, 0x6e, 0x90, 0x95, 0xd8, 0x32, 0x7d, 0x0d, 0x33, 0x57, 0x5f, 0x6a, - 0xa3, 0x39, 0x6c, 0x49, 0x0e, 0xab, 0xe8, 0xc6, 0xa4, 0x6e, 0x6a, 0x8c, 0x54, 0xe2, 0x4b, 0x98, - 0x53, 0x13, 0x17, 0xdd, 0x4c, 0x88, 0x3c, 0x32, 0xd8, 0xcd, 0xb5, 0x29, 0x56, 0x9a, 0x41, 0x51, - 0x32, 0x30, 0x51, 0x3e, 0xce, 0x40, 0x8d, 0x74, 0xd4, 0x83, 0xac, 0x1e, 0xe9, 0xa8, 0x18, 0x8f, - 0x39, 0x3a, 0xed, 0xcd, 0x8d, 0x69, 0x93, 0x2d, 0xc2, 0xb5, 0x24, 0xee, 0x32, 0x32, 0xe3, 0xb8, - 0x84, 0x37, 0x6b, 0x8e, 0x80, 0xfb, 0x1a, 0x72, 0x43, 0x6a, 0x70, 0x01, 0xf4, 0x09, 0x39, 0x4f, - 0x90, 0x13, 0x6b, 0x5d, 0x62, 0x17, 0x51, 0x61, 0x02, 0xb6, 0x36, 0xaf, 0xb9, 0x98, 0xa1, 0xaf, - 0x20, 0xab, 0x27, 0x62, 0x62, 0xef, 0x8d, 0xca, 0x4f, 0x62, 0xef, 0x8d, 0x0d, 0xd6, 0x97, 0x65, - 0xaf, 0x04, 0x87, 0xf7, 0xf6, 0xf7, 0x9f, 0x9f, 0x15, 0x8c, 0x17, 0x67, 0x05, 0xe3, 0x8f, 0xb3, - 0x82, 0xf1, 0xc3, 0x79, 0x21, 0xf5, 0xe2, 0xbc, 0x90, 0xfa, 0xed, 0xbc, 0x90, 0xfa, 0x7c, 0xd3, - 0xf5, 0x78, 0xb3, 0x53, 0x2f, 0x39, 0xd4, 0xb7, 0x79, 0x13, 0x87, 0xcc, 0x63, 0x43, 0x71, 0x7a, - 0x32, 0x12, 0x3f, 0x69, 0x13, 0x56, 0x9f, 0x93, 0x3f, 0x24, 0x6f, 0xfd, 0x13, 0x00, 0x00, 0xff, - 0xff, 0x39, 0x4d, 0x4d, 0xd7, 0x59, 0x0d, 0x00, 0x00, + // 1233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5d, 0x6f, 0x1b, 0x45, + 0x17, 0xf6, 0xc6, 0x4e, 0x9c, 0x1e, 0xa7, 0x7d, 0xf3, 0x4e, 0x03, 0x75, 0x97, 0xd4, 0x71, 0xb7, + 0xcd, 0x47, 0xdb, 0xe0, 0xc5, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x26, 0x2a, 0x05, 0xb5, 0x45, 0xc5, + 0x44, 0x5c, 0x70, 0x63, 0x8d, 0xd7, 0xc3, 0x7a, 0x55, 0xef, 0x8e, 0xbb, 0x33, 0x36, 0x9b, 0x96, + 0x70, 0x81, 0x44, 0x05, 0xea, 0x0d, 0x12, 0xf7, 0xa8, 0xff, 0x80, 0xbf, 0x51, 0x89, 0x9b, 0x4a, + 0xdc, 0x70, 0x85, 0x50, 0x82, 0x10, 0x57, 0xfc, 0x06, 0x34, 0x1f, 0xeb, 0xaf, 0xf5, 0xd6, 0x29, + 0x2a, 0x77, 0x33, 0x67, 0xce, 0x39, 0xcf, 0x73, 0xce, 0x1c, 0xcf, 0xb3, 0x86, 0x55, 0xc2, 0xdb, + 0x24, 0xf4, 0xbd, 0x80, 0xdb, 0xa4, 0xef, 0xdb, 0xfd, 0xaa, 0x7d, 0xbf, 0x47, 0xc2, 0xfd, 0x4a, + 0x37, 0xa4, 0x9c, 0xa2, 0xe5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32, 0x68, 0xb2, 0xeb, + 0x70, 0x4a, 0x5d, 0x41, 0x63, 0x3c, 0xd3, 0x49, 0x65, 0xbd, 0xae, 0x8c, 0xc8, 0x84, 0x45, 0x26, + 0x40, 0x05, 0xbf, 0x39, 0xc9, 0x6f, 0xb0, 0x17, 0x29, 0xb0, 0xca, 0xda, 0x08, 0x7a, 0x7e, 0x93, + 0x84, 0xba, 0x82, 0x93, 0xda, 0xfa, 0x91, 0x34, 0x5a, 0xb7, 0x60, 0x55, 0xf2, 0xf8, 0x14, 0x77, + 0xbc, 0x16, 0xe6, 0x34, 0x9c, 0x28, 0xe6, 0x3c, 0x2c, 0x39, 0x34, 0x98, 0xe4, 0x51, 0x10, 0xb6, + 0xeb, 0x89, 0xaa, 0x1e, 0x1b, 0x70, 0x2e, 0x25, 0x9b, 0x2e, 0x6c, 0x13, 0xfe, 0x17, 0xb3, 0x1a, + 0xcf, 0x18, 0x93, 0x7d, 0x89, 0xa5, 0xc5, 0x43, 0xb4, 0xa3, 0xee, 0xf9, 0x45, 0xae, 0xe7, 0x0d, + 0x3d, 0x44, 0x83, 0xd0, 0x59, 0x43, 0x64, 0xdd, 0xd2, 0x60, 0x9f, 0x70, 0x1a, 0x62, 0x77, 0x36, + 0x18, 0x5a, 0x86, 0xec, 0x3d, 0xb2, 0xaf, 0xe7, 0x4d, 0x2c, 0x47, 0xe0, 0xb7, 0x35, 0xfc, 0x20, + 0x99, 0x86, 0x5f, 0x81, 0xf9, 0x3e, 0xee, 0xf4, 0x62, 0x70, 0xb5, 0xb1, 0xae, 0xc2, 0xb2, 0x1e, + 0xa5, 0xd6, 0x0b, 0x15, 0xb9, 0x09, 0xff, 0x1f, 0x89, 0xd3, 0x10, 0x08, 0x72, 0x62, 0xf6, 0x65, + 0xd4, 0x52, 0x5d, 0xae, 0xad, 0x07, 0x80, 0xa4, 0xe3, 0x5e, 0x74, 0x9b, 0xba, 0x2c, 0x86, 0x40, + 0x90, 0x93, 0xbf, 0x18, 0x95, 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30, 0x02, 0xcb, 0x99, 0x79, 0x0e, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2280,6 +2408,102 @@ func (m *QueryTraceTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryTraceBlockRequest) 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 *QueryTraceBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockTime != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockTime)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintQuery(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.BlockNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x28 + } + 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 len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].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 *QueryTraceBlockResponse) 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 *QueryTraceBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockResponse) 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 @@ -2603,6 +2827,48 @@ func (m *QueryTraceTxResponse) Size() (n int) { return n } +func (m *QueryTraceBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.TraceConfig != nil { + l = m.TraceConfig.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockNumber != 0 { + n += 1 + sovQuery(uint64(m.BlockNumber)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockTime != 0 { + n += 1 + sovQuery(uint64(m.BlockTime)) + } + return n +} + +func (m *QueryTraceBlockResponse) 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 } @@ -4626,6 +4892,280 @@ func (m *QueryTraceTxResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTraceBlockRequest) 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: QueryTraceBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", 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 + } + m.Txs = append(m.Txs, &MsgEthereumTx{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TraceConfig == nil { + m.TraceConfig = &TraceConfig{} + } + if err := m.TraceConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) + } + m.BlockTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockTime |= int64(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 *QueryTraceBlockResponse) 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: QueryTraceBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockResponse: 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 9369b46d67..f788225117 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccountRequest @@ -508,14 +506,12 @@ func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marsha // 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. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -523,7 +519,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -537,8 +532,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -546,7 +539,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -560,8 +552,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -569,7 +559,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -583,8 +572,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -592,7 +579,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -606,8 +592,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -615,7 +599,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -629,8 +612,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -638,7 +619,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -652,8 +632,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -661,7 +639,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -675,8 +652,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -684,7 +659,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -698,8 +672,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -707,7 +679,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -721,8 +692,6 @@ 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() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -730,7 +699,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index ff9da3a292..e29364de44 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -13,6 +13,7 @@ import ( grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "github.com/regen-network/cosmos-proto" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -351,59 +352,61 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 818 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x3f, 0x6f, 0xdb, 0x46, - 0x14, 0x17, 0x25, 0x4a, 0xa4, 0x4e, 0xaa, 0x61, 0x10, 0x36, 0x40, 0x09, 0xa8, 0x28, 0x68, 0x68, - 0xd5, 0x02, 0x22, 0x61, 0xb7, 0x93, 0xa7, 0x9a, 0xfe, 0x07, 0x1b, 0x32, 0x5a, 0x10, 0x6a, 0x87, - 0x1a, 0x85, 0x70, 0xa6, 0xce, 0x14, 0x51, 0x91, 0x47, 0xf0, 0x4e, 0x84, 0xd4, 0x4f, 0xd0, 0x2d, - 0xf9, 0x08, 0x19, 0x32, 0x65, 0x4d, 0x3e, 0x40, 0x46, 0x8f, 0x46, 0xa6, 0x20, 0x03, 0x13, 0xc8, - 0x9b, 0xb7, 0xe4, 0x13, 0x04, 0x77, 0xa4, 0x2c, 0x2b, 0x82, 0x9c, 0xc4, 0x71, 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b, 0xc8, 0x81, 0xf6, 0xb8, 0x33, 0x52, 0xd6, 0x40, 0xde, 0xc7, 0xbe, - 0x8d, 0x78, 0x35, 0xa2, 0x95, 0x28, 0xca, 0x01, 0x28, 0x3a, 0x90, 0xb5, 0xea, 0xda, 0x49, 0xf6, - 0xa2, 0xf9, 0xf3, 0xab, 0x58, 0xfb, 0xc1, 0x71, 0x69, 0x7f, 0x78, 0xaa, 0xdb, 0xd8, 0x4b, 0x07, - 0x90, 0xfe, 0xb4, 0x48, 0xef, 0x5f, 0x83, 0x8e, 0x03, 0x44, 0xf4, 0x43, 0x9f, 0x5a, 0xb2, 0x03, - 0xc9, 0x1f, 0xec, 0xad, 0x52, 0x03, 0x39, 0x07, 0x12, 0x5e, 0xa5, 0x68, 0x96, 0x27, 0xb1, 0x26, - 0x1f, 0x40, 0xd2, 0x76, 0x3d, 0x97, 0x5a, 0xcc, 0xa0, 0xac, 0x80, 0x2c, 0xc5, 0x69, 0x8d, 0x59, - 0x8a, 0x95, 0x23, 0x90, 0x8f, 0xe0, 0x60, 0x88, 0xd4, 0x3c, 0x4f, 0xfa, 0xeb, 0xa7, 0x27, 0x9d, - 0xc4, 0x5a, 0x61, 0xdb, 0xc3, 0x43, 0x9f, 0x5a, 0x49, 0x08, 0x36, 0x01, 0x3e, 0xe7, 0x42, 0x5d, - 0x68, 0x96, 0xd3, 0x89, 0x96, 0x81, 0x10, 0xa9, 0x12, 0xff, 0x20, 0x44, 0x4c, 0x0b, 0x55, 0x39, - 0xd1, 0x42, 0xa6, 0x11, 0xb5, 0x98, 0x68, 0x64, 0x6b, 0x85, 0xcd, 0xea, 0xc5, 0xb3, 0x56, 0xa1, - 0x33, 0xda, 0x85, 0x14, 0x36, 0xde, 0xe6, 0x40, 0x79, 0xdb, 0xb6, 0x11, 0x21, 0x6d, 0x97, 0xd0, - 0xce, 0x48, 0x39, 0x01, 0xb2, 0xdd, 0x87, 0xae, 0xdf, 0x75, 0x7b, 0x7c, 0x78, 0x45, 0xf3, 0xb7, - 0xcf, 0xaa, 0x56, 0xda, 0x61, 0xaf, 0x0f, 0x77, 0xaf, 0x62, 0x4d, 0xb2, 0x13, 0xd1, 0x4a, 0x85, - 0xde, 0x0c, 0x96, 0xec, 0x52, 0x58, 0x72, 0x5f, 0x0e, 0x8b, 0x78, 0x3b, 0x2c, 0xf9, 0x45, 0x58, - 0x0a, 0xf7, 0x07, 0x8b, 0x74, 0x03, 0x96, 0x13, 0x20, 0x43, 0x3e, 0x5b, 0x44, 0x54, 0xb9, 0x9e, - 0x6b, 0x96, 0x36, 0xbf, 0xd7, 0x3f, 0xfc, 0xc7, 0xea, 0xc9, 0xf4, 0x3b, 0xc3, 0x60, 0x80, 0xcc, - 0xfa, 0x79, 0xac, 0x65, 0xae, 0x62, 0x0d, 0xc0, 0x6b, 0x48, 0x9e, 0xbc, 0xd6, 0xc0, 0x0c, 0x20, - 0xeb, 0x3a, 0x60, 0x82, 0x79, 0x71, 0x0e, 0x73, 0x30, 0x87, 0x79, 0x69, 0x19, 0xe6, 0xcf, 0x45, - 0x50, 0xde, 0x1d, 0xfb, 0xd0, 0x73, 0xed, 0x7d, 0x84, 0xbe, 0x0d, 0xe6, 0x47, 0xa0, 0xc4, 0x30, - 0xa7, 0x6e, 0xd0, 0xb5, 0x61, 0x70, 0x07, 0xd4, 0x19, 0x65, 0x3a, 0x6e, 0xb0, 0x03, 0x83, 0x69, - 0xac, 0x33, 0x84, 0x78, 0x2c, 0xf1, 0x4e, 0xb1, 0xf6, 0x11, 0x62, 0xb1, 0x52, 0x0a, 0xe5, 0x6f, - 0xa7, 0x50, 0x61, 0x91, 0x42, 0xd2, 0xfd, 0x51, 0x48, 0x5e, 0x42, 0xa1, 0xe2, 0x57, 0xa1, 0x10, - 0x98, 0xa3, 0x50, 0x69, 0x8e, 0x42, 0xe5, 0x65, 0x14, 0x6a, 0x80, 0xea, 0xde, 0x88, 0x22, 0x9f, - 0xb8, 0xd8, 0xff, 0x3d, 0xa0, 0x2e, 0xf6, 0xc9, 0xec, 0x14, 0xa4, 0x0b, 0xf9, 0xb1, 0x00, 0xd6, - 0xe7, 0x4e, 0x84, 0x85, 0x48, 0x80, 0x7d, 0xc2, 0x1b, 0xe5, 0x5b, 0x5e, 0x48, 0x96, 0x38, 0x5f, - 0xec, 0x3f, 0x01, 0x71, 0x80, 0x1d, 0xa2, 0x66, 0x79, 0x93, 0xeb, 0x8b, 0x4d, 0xb6, 0xb1, 0x63, - 0x71, 0x17, 0x65, 0x15, 0xe4, 0x42, 0x44, 0x39, 0x67, 0xca, 0x16, 0x13, 0x95, 0x0a, 0x90, 0x23, - 0xaf, 0x8b, 0xc2, 0x10, 0x87, 0xe9, 0xd6, 0x95, 0x22, 0x6f, 0x8f, 0xa9, 0xcc, 0xc4, 0xc8, 0x31, - 0x24, 0xa8, 0x97, 0xa0, 0x6a, 0x49, 0x0e, 0x24, 0x7f, 0x12, 0xd4, 0x4b, 0xca, 0xdc, 0xfc, 0x07, - 0xe4, 0x8e, 0x89, 0xa3, 0xfc, 0x05, 0xc0, 0x8d, 0x63, 0xa6, 0x2d, 0xe6, 0x9f, 0x6b, 0xa5, 0xfa, - 0xe3, 0x47, 0x1c, 0xa6, 0xbd, 0x9a, 0xe6, 0xf9, 0xa4, 0x26, 0x5c, 0x4c, 0x6a, 0xc2, 0x9b, 0x49, - 0x4d, 0x78, 0x78, 0x59, 0xcb, 0x5c, 0x5c, 0xd6, 0x32, 0x2f, 0x2f, 0x6b, 0x99, 0xbf, 0x9b, 0x37, - 0x78, 0x42, 0xfb, 0x30, 0x24, 0x2e, 0x31, 0x66, 0x17, 0x77, 0xc4, 0x6f, 0x2e, 0x67, 0xcb, 0x69, - 0x81, 0x1f, 0xd1, 0x5f, 0xde, 0x07, 0x00, 0x00, 0xff, 0xff, 0x03, 0xe3, 0x68, 0xe8, 0x0a, 0x08, - 0x00, 0x00, + // 854 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x31, 0x8f, 0xe3, 0x44, + 0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0xe9, 0x34, 0xda, 0x93, 0xbc, 0x11, 0x17, 0x47, 0x91, + 0x80, 0x80, 0xb4, 0xb6, 0x6e, 0xa1, 0xda, 0x8a, 0xf5, 0xed, 0xde, 0xe9, 0x4e, 0x39, 0x81, 0xac, + 0xd0, 0x70, 0x45, 0x34, 0xeb, 0xcc, 0x3a, 0x23, 0x62, 0x8f, 0xe5, 0x99, 0x58, 0x0e, 0x12, 0x0d, + 0xa2, 0xa0, 0x03, 0x89, 0x3f, 0x40, 0x41, 0x45, 0x0b, 0x3f, 0x80, 0xf2, 0xca, 0x13, 0x34, 0x88, + 0xc2, 0xa0, 0x2c, 0xd5, 0x76, 0xf0, 0x0b, 0xd0, 0x8c, 0x9d, 0xdd, 0x84, 0x28, 0x07, 0x1c, 0x87, + 0xa8, 0x32, 0xcf, 0xdf, 0x9b, 0x37, 0xef, 0xbd, 0xef, 0xcb, 0x7b, 0x70, 0x9f, 0x88, 0x29, 0x49, + 0x42, 0x1a, 0x09, 0x87, 0xa4, 0xa1, 0x93, 0xde, 0x71, 0x44, 0x66, 0xc7, 0x09, 0x13, 0x0c, 0xdd, + 0xbc, 0x82, 0x6c, 0x92, 0x86, 0x76, 0x7a, 0xa7, 0xb3, 0x17, 0xb0, 0x80, 0x29, 0xd0, 0x91, 0xa7, + 0xc2, 0xaf, 0xf3, 0x72, 0xc0, 0x58, 0x30, 0x23, 0x0e, 0x8e, 0xa9, 0x83, 0xa3, 0x88, 0x09, 0x2c, + 0x28, 0x8b, 0x78, 0x89, 0xee, 0x97, 0xa8, 0xb2, 0xce, 0xe6, 0xe7, 0x0e, 0x8e, 0x16, 0x2b, 0xc8, + 0x67, 0x3c, 0x64, 0x7c, 0x5c, 0x44, 0x2c, 0x8c, 0x12, 0xea, 0x6c, 0xa5, 0x25, 0x53, 0x50, 0x58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21, + 0x29, 0x8e, 0x39, 0x27, 0x93, 0x82, 0x55, 0x4f, 0x0f, 0x30, 0x7f, 0x8f, 0x93, 0x49, 0x91, 0xe6, + 0xe1, 0x27, 0x00, 0xd6, 0x1e, 0xf1, 0x00, 0x7d, 0x04, 0xe1, 0xda, 0x36, 0xb3, 0xb6, 0x13, 0xd8, + 0xa8, 0xa5, 0xf3, 0xda, 0x5f, 0x38, 0xac, 0x8a, 0xed, 0xbf, 0xf2, 0xf1, 0x0f, 0xbf, 0x7e, 0x51, + 0xb5, 0xd0, 0x6d, 0x67, 0x7b, 0x9d, 0x96, 0xde, 0x63, 0x91, 0xb9, 0xee, 0x93, 0x65, 0x17, 0x3c, + 0x5d, 0x76, 0xc1, 0x2f, 0xcb, 0x2e, 0xf8, 0xfc, 0xa2, 0x5b, 0x79, 0x7a, 0xd1, 0xad, 0xfc, 0x78, + 0xd1, 0xad, 0xbc, 0x3f, 0x58, 0xd3, 0x93, 0x98, 0xe2, 0x84, 0x53, 0xbe, 0x16, 0x2a, 0x53, 0xc1, + 0x94, 0xaa, 0xce, 0x1a, 0x6a, 0xd9, 0xbe, 0xf9, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x88, + 0x0d, 0x58, 0x50, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/evm/types/tx.pb.gw.go b/x/evm/types/tx.pb.gw.go new file mode 100644 index 0000000000..0fde349345 --- /dev/null +++ b/x/evm/types/tx.pb.gw.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ethermint/evm/v1/tx.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + 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_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EthereumTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgEthereumTx + 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_Msg_EthereumTx_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EthereumTx(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("GET", pattern_Msg_EthereumTx_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_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("GET", pattern_Msg_EthereumTx_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_Msg_EthereumTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_EthereumTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage +) diff --git a/x/feemarket/types/query.pb.gw.go b/x/feemarket/types/query.pb.gw.go index 57a0c8d449..3795864c8b 100644 --- a/x/feemarket/types/query.pb.gw.go +++ b/x/feemarket/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -90,14 +88,12 @@ func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marsh // 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. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -105,7 +101,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -119,8 +114,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -128,7 +121,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -142,8 +134,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -151,7 +141,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) From eeb7d22f0791749a9a7d51ec2af1b34bd00276ea Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Sat, 6 Nov 2021 18:15:00 -0400 Subject: [PATCH 06/29] update protobuf --- docs/api/proto-docs.md | 5 +- proto/ethermint/evm/v1/query.proto | 7 + x/evm/keeper/grpc_query.go | 7 +- x/evm/types/query.pb.go | 199 +++++++++++++++++------------ x/evm/types/query.pb.gw.go | 80 ++++++++++++ 5 files changed, 215 insertions(+), 83 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 281b990d5a..a6d1f09ebc 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -741,7 +741,7 @@ method. ### QueryTraceBlockRequest - +QueryTraceBlockRequest defines TraceTx request | Field | Type | Label | Description | @@ -760,7 +760,7 @@ method. ### QueryTraceBlockResponse - +QueryTraceBlockResponse defines TraceBlock response | Field | Type | Label | Description | @@ -897,6 +897,7 @@ Query defines the gRPC querier service. | `EthCall` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthCall implements the `eth_call` rpc api | GET|/ethermint/evm/v1/eth_call| | `EstimateGas` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) | EstimateGas implements the `eth_estimateGas` rpc api | GET|/ethermint/evm/v1/estimate_gas| | `TraceTx` | [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) | [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_tx| +| `TraceBlock` | [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) | [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_block| diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 55cdf23441..8579e6a50b 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -65,6 +65,11 @@ service Query { rpc TraceTx(QueryTraceTxRequest) returns (QueryTraceTxResponse) { option (google.api.http).get = "/ethermint/evm/v1/trace_tx"; } + + // TraceTx implements the `debug_traceTransaction` rpc api + rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) { + option (google.api.http).get = "/ethermint/evm/v1/trace_block"; + } } // QueryAccountRequest is the request type for the Query/Account RPC method. @@ -242,6 +247,7 @@ message QueryTraceTxResponse { bytes data = 1; } +// QueryTraceBlockRequest defines TraceTx request message QueryTraceBlockRequest { // txs messages in the block repeated MsgEthereumTx txs = 1; @@ -252,6 +258,7 @@ message QueryTraceBlockRequest { int64 block_time = 7; } +// QueryTraceBlockResponse defines TraceBlock response message QueryTraceBlockResponse { // response serialized in bytes bytes data = 1; diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index f05c64eb04..c38d8ac3af 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -401,7 +401,10 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ }, nil } -func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) (*types.QueryTraceTxResponse, error) { +// TraceBlock configures a new tracer according to the provided configuration, and +// executes the given message in the provided environment for all the transactions in the queried block. +// The return value will be tracer dependent. +func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) (*types.QueryTraceBlockResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -438,7 +441,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryTraceTxResponse{ + return &types.QueryTraceBlockResponse{ Data: resultData, }, nil } diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 5881af0126..24485fb947 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1026,6 +1026,7 @@ func (m *QueryTraceTxResponse) GetData() []byte { return nil } +// QueryTraceBlockRequest defines TraceTx request type QueryTraceBlockRequest struct { // txs messages in the block Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` @@ -1104,6 +1105,7 @@ func (m *QueryTraceBlockRequest) GetBlockTime() int64 { return 0 } +// QueryTraceBlockResponse defines TraceBlock response type QueryTraceBlockResponse struct { // response serialized in bytes Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` @@ -1177,85 +1179,86 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xf6, 0xc6, 0x4e, 0x9c, 0x1e, 0xa7, 0x7d, 0xf3, 0x4e, 0x03, 0x75, 0x97, 0xd4, 0x71, 0xb7, - 0xcd, 0x47, 0xdb, 0xe0, 0xc5, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x26, 0x2a, 0x05, 0xb5, 0x45, 0xc5, - 0x44, 0x5c, 0x70, 0x63, 0x8d, 0xd7, 0xc3, 0x7a, 0x55, 0xef, 0x8e, 0xbb, 0x33, 0x36, 0x9b, 0x96, - 0x70, 0x81, 0x44, 0x05, 0xea, 0x0d, 0x12, 0xf7, 0xa8, 0xff, 0x80, 0xbf, 0x51, 0x89, 0x9b, 0x4a, - 0xdc, 0x70, 0x85, 0x50, 0x82, 0x10, 0x57, 0xfc, 0x06, 0x34, 0x1f, 0xeb, 0xaf, 0xf5, 0xd6, 0x29, - 0x2a, 0x77, 0x33, 0x67, 0xce, 0x39, 0xcf, 0x73, 0xce, 0x1c, 0xcf, 0xb3, 0x86, 0x55, 0xc2, 0xdb, - 0x24, 0xf4, 0xbd, 0x80, 0xdb, 0xa4, 0xef, 0xdb, 0xfd, 0xaa, 0x7d, 0xbf, 0x47, 0xc2, 0xfd, 0x4a, - 0x37, 0xa4, 0x9c, 0xa2, 0xe5, 0xc1, 0x69, 0x85, 0xf4, 0xfd, 0x4a, 0xbf, 0x6a, 0xae, 0xb8, 0xd4, - 0xa5, 0xf2, 0xd0, 0x16, 0x2b, 0xe5, 0x67, 0x5e, 0x76, 0x28, 0xf3, 0x29, 0xb3, 0x9b, 0x98, 0x11, - 0x95, 0xc0, 0xee, 0x57, 0x9b, 0x84, 0xe3, 0xaa, 0xdd, 0xc5, 0xae, 0x17, 0x60, 0xee, 0xd1, 0x40, - 0xfb, 0xae, 0xba, 0x94, 0xba, 0x1d, 0x62, 0xe3, 0xae, 0x67, 0xe3, 0x20, 0xa0, 0x5c, 0x1e, 0x32, - 0x7d, 0x6a, 0x26, 0xf8, 0x08, 0x60, 0x75, 0x76, 0x36, 0x71, 0xc6, 0x23, 0x75, 0x64, 0xbd, 0x0d, - 0xa7, 0x3f, 0x16, 0xb0, 0xd7, 0x1d, 0x87, 0xf6, 0x02, 0x5e, 0x27, 0xf7, 0x7b, 0x84, 0x71, 0x54, - 0x84, 0x3c, 0x6e, 0xb5, 0x42, 0xc2, 0x58, 0xd1, 0x28, 0x1b, 0x5b, 0x27, 0xea, 0xf1, 0xf6, 0xda, - 0xe2, 0xb7, 0x4f, 0xd6, 0x32, 0x7f, 0x3d, 0x59, 0xcb, 0x58, 0x0e, 0xac, 0x8c, 0x87, 0xb2, 0x2e, - 0x0d, 0x18, 0x11, 0xb1, 0x4d, 0xdc, 0xc1, 0x81, 0x43, 0xe2, 0x58, 0xbd, 0x45, 0xaf, 0xc1, 0x09, - 0x87, 0xb6, 0x48, 0xa3, 0x8d, 0x59, 0xbb, 0x38, 0x27, 0xcf, 0x16, 0x85, 0xe1, 0x03, 0xcc, 0xda, - 0x68, 0x05, 0xe6, 0x03, 0x2a, 0x82, 0xb2, 0x65, 0x63, 0x2b, 0x57, 0x57, 0x1b, 0xeb, 0x5d, 0x38, - 0x2b, 0x41, 0x76, 0x65, 0x9f, 0xfe, 0x05, 0xcb, 0x47, 0x06, 0x98, 0xd3, 0x32, 0x68, 0xb2, 0xeb, - 0x70, 0x4a, 0x5d, 0x41, 0x63, 0x3c, 0xd3, 0x49, 0x65, 0xbd, 0xae, 0x8c, 0xc8, 0x84, 0x45, 0x26, - 0x40, 0x05, 0xbf, 0x39, 0xc9, 0x6f, 0xb0, 0x17, 0x29, 0xb0, 0xca, 0xda, 0x08, 0x7a, 0x7e, 0x93, - 0x84, 0xba, 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0x60, 0xa2, 0x62, 0x92, 0x81, 0x92, 0x3c, - 0x14, 0x41, 0x5e, 0x4b, 0x1e, 0x2a, 0x27, 0x73, 0x8e, 0xab, 0xa1, 0xb9, 0x39, 0xeb, 0x55, 0x8c, - 0x71, 0x2d, 0x89, 0xbb, 0x8a, 0xcc, 0x24, 0x2e, 0xe1, 0xed, 0x86, 0x23, 0xe0, 0xbe, 0x82, 0xc2, - 0x88, 0x5a, 0x1e, 0x03, 0x7d, 0x4a, 0xcd, 0x53, 0xe4, 0xd6, 0xda, 0x90, 0xd8, 0x65, 0x54, 0x9a, - 0x82, 0xad, 0xdd, 0x1b, 0x2e, 0x66, 0xe8, 0x4b, 0xc8, 0x6b, 0xc5, 0x48, 0x9d, 0xbd, 0x71, 0x79, - 0x4e, 0x9d, 0xbd, 0x09, 0xe1, 0x79, 0x5e, 0xf5, 0x4a, 0x2e, 0x78, 0xb4, 0xb3, 0xf3, 0xf4, 0xb0, - 0x64, 0x3c, 0x3b, 0x2c, 0x19, 0xbf, 0x1f, 0x96, 0x8c, 0xef, 0x8f, 0x4a, 0x99, 0x67, 0x47, 0xa5, - 0xcc, 0xaf, 0x47, 0xa5, 0xcc, 0x67, 0x5b, 0xae, 0xc7, 0xdb, 0xbd, 0x66, 0xc5, 0xa1, 0xbe, 0xcd, - 0xdb, 0x38, 0x64, 0x1e, 0x1b, 0xc9, 0x13, 0xc9, 0x4c, 0x7c, 0xbf, 0x4b, 0x58, 0x73, 0x41, 0xfe, - 0x61, 0x7b, 0xf3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, 0x02, 0xcb, 0x99, 0x79, 0x0e, 0x00, - 0x00, + // 1261 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x26, 0x4e, 0x9c, 0x3e, 0xa7, 0x25, 0x4c, 0x03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 0xf8, 0xb3, 0x01, 0xcb, 0xe3, 0x9a, 0x8b, 0x2a, + 0x19, 0xb0, 0x19, 0x52, 0x6f, 0xda, 0x47, 0xb6, 0xd7, 0x4c, 0x2f, 0x49, 0xa6, 0xef, 0xa0, 0x5a, + 0x9a, 0x69, 0x3f, 0xf6, 0x19, 0x92, 0x4d, 0x7e, 0x46, 0xdc, 0x43, 0xf7, 0x0d, 0xc8, 0x6b, 0x75, + 0xcd, 0x7c, 0xda, 0x51, 0xe1, 0xce, 0x7c, 0xda, 0x31, 0x91, 0xb6, 0x76, 0x25, 0xad, 0x2d, 0x74, + 0x2e, 0x4d, 0x4b, 0xab, 0x35, 0x4b, 0x94, 0xee, 0xa1, 0x01, 0x79, 0xad, 0xb3, 0x99, 0x44, 0x46, + 0x45, 0x3d, 0x93, 0xc8, 0x98, 0x5c, 0x5b, 0x55, 0x49, 0xe4, 0x02, 0xda, 0x49, 0x13, 0x61, 0xca, + 0x74, 0xc8, 0xc3, 0xbe, 0x7b, 0x8b, 0x1c, 0xde, 0x43, 0x77, 0x20, 0x27, 0xe4, 0x18, 0x59, 0x99, + 0x2d, 0x33, 0xd0, 0x78, 0xf3, 0xec, 0x73, 0x6d, 0x34, 0x87, 0x1d, 0xc9, 0xe1, 0x2c, 0x3a, 0x33, + 0xa9, 0x9b, 0x5a, 0x23, 0x95, 0xf8, 0x0a, 0x16, 0x94, 0x22, 0xa1, 0x73, 0x19, 0x91, 0x47, 0x84, + 0xcf, 0xdc, 0x9c, 0x62, 0xa5, 0x19, 0x6c, 0x48, 0x06, 0x26, 0x2a, 0xa6, 0x19, 0x28, 0xc9, 0x43, + 0x11, 0xe4, 0xb5, 0xe4, 0xa1, 0x8d, 0x74, 0xcc, 0x51, 0x35, 0x34, 0xb7, 0xa7, 0x4d, 0xc5, 0x18, + 0xd7, 0x92, 0xb8, 0xab, 0xc8, 0x4c, 0xe3, 0x12, 0xde, 0x6e, 0x38, 0x02, 0xee, 0x1b, 0x28, 0x24, + 0xd4, 0xf2, 0x08, 0xe8, 0x13, 0x72, 0x9e, 0x20, 0xb7, 0xd6, 0x96, 0xc4, 0xde, 0x40, 0xa5, 0x09, + 0xd8, 0xda, 0xbc, 0xe1, 0x62, 0x86, 0xbe, 0x86, 0xbc, 0x56, 0x8c, 0xcc, 0xde, 0x1b, 0x95, 0xe7, + 0xcc, 0xde, 0x1b, 0x13, 0x9e, 0xe7, 0x65, 0xaf, 0xe4, 0x82, 0x47, 0xe8, 0x81, 0x01, 0x30, 0x9c, + 0xc9, 0xa8, 0xfc, 0xbc, 0xd0, 0x49, 0x99, 0x32, 0x77, 0x8e, 0x60, 0xa9, 0x79, 0x6c, 0x4a, 0x1e, + 0xeb, 0x68, 0x2d, 0x8b, 0x87, 0x94, 0x89, 0xbd, 0xbd, 0xc7, 0x4f, 0x4b, 0xc6, 0x93, 0xa7, 0x25, + 0xe3, 0x8f, 0xa7, 0x25, 0xe3, 0x87, 0x67, 0xa5, 0x99, 0x27, 0xcf, 0x4a, 0x33, 0xbf, 0x3d, 0x2b, + 0xcd, 0x7c, 0x51, 0x76, 0x3d, 0xde, 0xee, 0x35, 0x2b, 0x0e, 0xf5, 0x6d, 0xde, 0xc6, 0x21, 0xf3, + 0x58, 0x22, 0x54, 0x24, 0x83, 0xf1, 0xc3, 0x2e, 0x61, 0xcd, 0x05, 0xf9, 0xdf, 0xf1, 0xed, 0x7f, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, 0x7d, 0xcf, 0x53, 0x04, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1292,6 +1295,8 @@ type QueryClient interface { 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) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) } type queryClient struct { @@ -1392,6 +1397,15 @@ func (c *queryClient) TraceTx(ctx context.Context, in *QueryTraceTxRequest, opts return out, nil } +func (c *queryClient) TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) { + out := new(QueryTraceBlockResponse) + err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Query/TraceBlock", 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. @@ -1416,6 +1430,8 @@ type QueryServer interface { EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error) // TraceTx implements the `debug_traceTransaction` rpc api TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error) + // TraceTx implements the `debug_traceTransaction` rpc api + TraceBlock(context.Context, *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1452,6 +1468,9 @@ func (*UnimplementedQueryServer) EstimateGas(ctx context.Context, req *EthCallRe func (*UnimplementedQueryServer) TraceTx(ctx context.Context, req *QueryTraceTxRequest) (*QueryTraceTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TraceTx not implemented") } +func (*UnimplementedQueryServer) TraceBlock(ctx context.Context, req *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TraceBlock not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1637,6 +1656,24 @@ func _Query_TraceTx_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_TraceBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTraceBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TraceBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethermint.evm.v1.Query/TraceBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TraceBlock(ctx, req.(*QueryTraceBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethermint.evm.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1681,6 +1718,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TraceTx", Handler: _Query_TraceTx_Handler, }, + { + MethodName: "TraceBlock", + Handler: _Query_TraceBlock_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ethermint/evm/v1/query.proto", diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index f788225117..06d6cd50ea 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -503,6 +503,42 @@ func local_request_Query_TraceTx_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Query_TraceBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + 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_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TraceBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TraceBlock_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTraceBlockRequest + 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_TraceBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TraceBlock(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. @@ -709,6 +745,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TraceBlock_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_TraceBlock_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_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -950,6 +1006,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TraceBlock_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_TraceBlock_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_TraceBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -973,6 +1049,8 @@ 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", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -995,4 +1073,6 @@ var ( forward_Query_EstimateGas_0 = runtime.ForwardResponseMessage forward_Query_TraceTx_0 = runtime.ForwardResponseMessage + + forward_Query_TraceBlock_0 = runtime.ForwardResponseMessage ) From 346105b47f2552c461c335d87eb6aaa68850a225 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Mon, 8 Nov 2021 09:53:02 +0800 Subject: [PATCH 07/29] fix Predecessors --- x/evm/types/query.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/evm/types/query.go b/x/evm/types/query.go index f92b0ba300..eb20754ab7 100644 --- a/x/evm/types/query.go +++ b/x/evm/types/query.go @@ -6,5 +6,10 @@ import ( // UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + for _, msg := range m.Predecessors { + if err := msg.UnpackInterfaces(unpacker); err != nil { + return err + } + } return m.Msg.UnpackInterfaces(unpacker) } From e1ff8fd6bf6d884aa2d9ed4ad87556dfae3ba30f Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Mon, 8 Nov 2021 08:51:37 -0500 Subject: [PATCH 08/29] traceBlock refactor --- docs/api/proto-docs.md | 21 +- proto/ethermint/evm/v1/query.proto | 12 +- rpc/ethereum/namespaces/debug/api.go | 110 +++---- x/evm/keeper/grpc_query.go | 16 +- x/evm/types/query.go | 9 + x/evm/types/query.pb.go | 438 ++++++++++++++++++++------- 6 files changed, 430 insertions(+), 176 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index a6d1f09ebc..5555789a50 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -49,6 +49,7 @@ - [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) - [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) - [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) + - [QueryTraceBlockTxResult](#ethermint.evm.v1.QueryTraceBlockTxResult) - [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) - [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) - [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest) @@ -765,7 +766,23 @@ QueryTraceBlockResponse defines TraceBlock response | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `data` | [bytes](#bytes) | | response serialized in bytes | +| `results` | [QueryTraceBlockTxResult](#ethermint.evm.v1.QueryTraceBlockTxResult) | repeated | | + + + + + + + + +### QueryTraceBlockTxResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `result` | [bytes](#bytes) | | | +| `error` | [string](#string) | | | @@ -897,7 +914,7 @@ Query defines the gRPC querier service. | `EthCall` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthCall implements the `eth_call` rpc api | GET|/ethermint/evm/v1/eth_call| | `EstimateGas` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) | EstimateGas implements the `eth_estimateGas` rpc api | GET|/ethermint/evm/v1/estimate_gas| | `TraceTx` | [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) | [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_tx| -| `TraceBlock` | [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) | [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) | TraceTx implements the `debug_traceTransaction` rpc api | GET|/ethermint/evm/v1/trace_block| +| `TraceBlock` | [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) | [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) | TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api | GET|/ethermint/evm/v1/trace_block| diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 8579e6a50b..763f5c24cd 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -66,7 +66,7 @@ service Query { option (google.api.http).get = "/ethermint/evm/v1/trace_tx"; } - // TraceTx implements the `debug_traceTransaction` rpc api + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) { option (google.api.http).get = "/ethermint/evm/v1/trace_block"; } @@ -258,8 +258,14 @@ message QueryTraceBlockRequest { int64 block_time = 7; } +message QueryTraceBlockTxResult { + bytes result = 1; + string error = 2; +} + // QueryTraceBlockResponse defines TraceBlock response message QueryTraceBlockResponse { - // response serialized in bytes - bytes data = 1; + repeated QueryTraceBlockTxResult results = 1; } + + diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 2d015b7731..a5a2bd0957 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -178,18 +178,28 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi return []*evmtypes.TxTraceResult{}, nil } - var ( - results = make([]*evmtypes.TxTraceResult, txsLength) - wg = new(sync.WaitGroup) - jobs = make(chan *evmtypes.TxTraceTask, txsLength) - ) - - threads := runtime.NumCPU() - if threads > txsLength { - threads = txsLength + txsMessages := make([]*evmtypes.MsgEthereumTx, txsLength) + txDecoder := a.clientCtx.TxConfig.TxDecoder() + for i, tx := range txs { + decodedTx, err := txDecoder(tx) + if err != nil { + a.logger.Error("failed to decode transaction", "hash", txs[i].Hash(), "error", err.Error()) + continue + } + + messages := decodedTx.GetMsgs() + if len(messages) == 0 { + continue + } + ethMessage, ok := messages[0].(*evmtypes.MsgEthereumTx) + if !ok { + // Just considers Ethereum transactions + continue + } + txsMessages[i] = ethMessage } - // minus one to get the context at the begining of the block + // minus one to get the context at the beginning of the block contextHeight := height - 1 if contextHeight < 1 { // 0 is a special value for `ContextWithHeight`. @@ -197,63 +207,39 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi } ctxWithHeight := rpctypes.ContextWithHeight(int64(contextHeight)) - wg.Add(threads) - for th := 0; th < threads; th++ { - go func() { - defer wg.Done() - txDecoder := a.clientCtx.TxConfig.TxDecoder() - // Fetch and execute the next transaction trace tasks - for task := range jobs { - tx, err := txDecoder(txs[task.Index]) - if err != nil { - a.logger.Error("failed to decode transaction", "hash", txs[task.Index].Hash(), "error", err.Error()) - continue - } - - messages := tx.GetMsgs() - if len(messages) == 0 { - continue - } - ethMessage, ok := messages[0].(*evmtypes.MsgEthereumTx) - if !ok { - // Just considers Ethereum transactions - continue - } - - traceTxRequest := &evmtypes.QueryTraceTxRequest{ - Msg: ethMessage, - TxIndex: uint64(task.Index), - TraceConfig: config, - BlockNumber: block.Block.Height, - BlockTime: block.Block.Time.Unix(), - BlockHash: block.BlockID.Hash.String(), - } - - res, err := a.queryClient.TraceTx(ctxWithHeight, traceTxRequest) - if err != nil { - results[task.Index] = &evmtypes.TxTraceResult{Error: err.Error()} - continue - } - // 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{} - if err := json.Unmarshal(res.Data, &decodedResult); err != nil { - results[task.Index] = &evmtypes.TxTraceResult{Error: err.Error()} - continue - } - results[task.Index] = &evmtypes.TxTraceResult{Result: decodedResult} - } - }() + traceBlockRequest := &evmtypes.QueryTraceBlockRequest{ + Txs: txsMessages, + TraceConfig: config, + BlockNumber: block.Block.Height, + BlockTime: block.Block.Time.Unix(), + BlockHash: block.BlockID.Hash.String(), } - for i := range txs { - jobs <- &evmtypes.TxTraceTask{Index: i} + res, err := a.queryClient.TraceBlock(ctxWithHeight, traceBlockRequest) + + if err != nil { + return nil, err } - close(jobs) - wg.Wait() + decodedResults := make([]*evmtypes.TxTraceResult, txsLength) + for i, res := range res.Results { + if res.Error != "" { + decodedResults[i] = &evmtypes.TxTraceResult{ + Error: res.Error, + } + continue + } + + var decodedResult interface{} + if err := json.Unmarshal(res.Result, &decodedResult); err != nil { + return nil, err + } + decodedResults[i] = &evmtypes.TxTraceResult{ + Result: decodedResult, + } + } - return results, nil + return decodedResults, nil } // BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index c38d8ac3af..9b346b558c 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -425,24 +425,26 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) baseFee := k.feeMarketKeeper.GetBaseFee(ctx) txsLength := len(req.Txs) - results := make([]*interface{}, txsLength) + results := make([]*types.QueryTraceBlockTxResult, txsLength) for i, tx := range req.Txs { ethTx := tx.AsTransaction() traceResult, err := k.traceTx(ctx, signer, uint64(i), ethCfg, ethTx, baseFee, req.TraceConfig) if err != nil { + results[i].Error = err.Error() continue } - results[i] = traceResult - } - resultData, err := json.Marshal(results) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) + resultData, err := json.Marshal(traceResult) + if err != nil { + results[i].Error = err.Error() + continue + } + results[i].Result = resultData } return &types.QueryTraceBlockResponse{ - Data: resultData, + Results: results, }, nil } diff --git a/x/evm/types/query.go b/x/evm/types/query.go index f92b0ba300..49d230704b 100644 --- a/x/evm/types/query.go +++ b/x/evm/types/query.go @@ -8,3 +8,12 @@ import ( func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { return m.Msg.UnpackInterfaces(unpacker) } + +func (m QueryTraceBlockRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + for _, msg := range m.Txs { + if err := msg.UnpackInterfaces(unpacker); err != nil { + return err + } + } + return nil +} diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 24485fb947..0634ffe851 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1105,17 +1105,68 @@ func (m *QueryTraceBlockRequest) GetBlockTime() int64 { return 0 } +type QueryTraceBlockTxResult struct { + Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *QueryTraceBlockTxResult) Reset() { *m = QueryTraceBlockTxResult{} } +func (m *QueryTraceBlockTxResult) String() string { return proto.CompactTextString(m) } +func (*QueryTraceBlockTxResult) ProtoMessage() {} +func (*QueryTraceBlockTxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_e15a877459347994, []int{21} +} +func (m *QueryTraceBlockTxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTraceBlockTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTraceBlockTxResult.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 *QueryTraceBlockTxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTraceBlockTxResult.Merge(m, src) +} +func (m *QueryTraceBlockTxResult) XXX_Size() int { + return m.Size() +} +func (m *QueryTraceBlockTxResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTraceBlockTxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTraceBlockTxResult proto.InternalMessageInfo + +func (m *QueryTraceBlockTxResult) GetResult() []byte { + if m != nil { + return m.Result + } + return nil +} + +func (m *QueryTraceBlockTxResult) GetError() string { + if m != nil { + return m.Error + } + return "" +} + // QueryTraceBlockResponse defines TraceBlock response type QueryTraceBlockResponse struct { - // response serialized in bytes - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Results []*QueryTraceBlockTxResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } func (*QueryTraceBlockResponse) ProtoMessage() {} func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{21} + return fileDescriptor_e15a877459347994, []int{22} } func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,9 +1195,9 @@ func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo -func (m *QueryTraceBlockResponse) GetData() []byte { +func (m *QueryTraceBlockResponse) GetResults() []*QueryTraceBlockTxResult { if m != nil { - return m.Data + return m.Results } return nil } @@ -1173,92 +1224,96 @@ func init() { proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") + proto.RegisterType((*QueryTraceBlockTxResult)(nil), "ethermint.evm.v1.QueryTraceBlockTxResult") proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") } func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x26, 0x4e, 0x9c, 0x3e, 0xa7, 0x25, 0x4c, 0x03, 0x75, 0x97, 0xc4, 0x49, 0xb7, 0x4d, - 0xe2, 0xb4, 0xc1, 0x8b, 0x0d, 0xaa, 0x44, 0x25, 0x04, 0x4d, 0x54, 0x0a, 0x6a, 0x8b, 0x8a, 0x89, - 0x38, 0x70, 0xb1, 0xc6, 0xeb, 0x61, 0xbd, 0xaa, 0x77, 0xc7, 0xdd, 0x19, 0x9b, 0x4d, 0x4b, 0x39, - 0x20, 0x51, 0x15, 0xf5, 0x82, 0xc4, 0x1d, 0xf5, 0x1b, 0xf0, 0x35, 0x2a, 0x71, 0xa9, 0xc4, 0x85, - 0x13, 0x42, 0x2d, 0x07, 0x4e, 0x48, 0x7c, 0x03, 0x34, 0x7f, 0xd6, 0x5e, 0x7b, 0xbd, 0x75, 0x8a, - 0xca, 0x6d, 0xfe, 0xbc, 0xf7, 0x7e, 0xbf, 0xf7, 0xe6, 0xf9, 0xfd, 0xd6, 0xb0, 0x4a, 0x78, 0x9b, - 0x84, 0xbe, 0x17, 0x70, 0x9b, 0xf4, 0x7d, 0xbb, 0x5f, 0xb5, 0x6f, 0xf7, 0x48, 0x78, 0x58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, 0x66, 0xd7, 0xa7, 0xf6, 0x4f, 0x01, 0xe6, 0xa5, - 0x3d, 0xfa, 0xce, 0x80, 0xbc, 0x56, 0x10, 0xb4, 0x99, 0xce, 0x68, 0xc2, 0x27, 0x82, 0xb9, 0x35, - 0xcd, 0x4c, 0x01, 0x5b, 0x17, 0xbe, 0xfd, 0xf5, 0xcf, 0x1f, 0x67, 0x37, 0xd1, 0x59, 0x3b, 0xf5, - 0x15, 0xa2, 0x55, 0xc4, 0xbe, 0xab, 0x47, 0xe6, 0x3d, 0xf4, 0x93, 0x01, 0xc7, 0x47, 0x84, 0x1a, - 0x5d, 0xc8, 0x80, 0x99, 0xf4, 0x41, 0x60, 0xee, 0x1e, 0xcd, 0x58, 0x33, 0xab, 0x49, 0x66, 0xbb, - 0xe8, 0x7c, 0x9a, 0x59, 0xfc, 0x4d, 0x90, 0x22, 0xf8, 0xb3, 0x01, 0xcb, 0xe3, 0x9a, 0x8b, 0x2a, - 0x19, 0xb0, 0x19, 0x52, 0x6f, 0xda, 0x47, 0xb6, 0xd7, 0x4c, 0x2f, 0x49, 0xa6, 0xef, 0xa0, 0x5a, - 0x9a, 0x69, 0x3f, 0xf6, 0x19, 0x92, 0x4d, 0x7e, 0x46, 0xdc, 0x43, 0xf7, 0x0d, 0xc8, 0x6b, 0x75, - 0xcd, 0x7c, 0xda, 0x51, 0xe1, 0xce, 0x7c, 0xda, 0x31, 0x91, 0xb6, 0x76, 0x25, 0xad, 0x2d, 0x74, - 0x2e, 0x4d, 0x4b, 0xab, 0x35, 0x4b, 0x94, 0xee, 0xa1, 0x01, 0x79, 0xad, 0xb3, 0x99, 0x44, 0x46, - 0x45, 0x3d, 0x93, 0xc8, 0x98, 0x5c, 0x5b, 0x55, 0x49, 0xe4, 0x02, 0xda, 0x49, 0x13, 0x61, 0xca, - 0x74, 0xc8, 0xc3, 0xbe, 0x7b, 0x8b, 0x1c, 0xde, 0x43, 0x77, 0x20, 0x27, 0xe4, 0x18, 0x59, 0x99,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, 0x35, 0x2b, 0x0e, 0xf5, 0x6d, 0xde, 0xc6, 0x21, 0xf3, - 0x58, 0x22, 0x54, 0x24, 0x83, 0xf1, 0xc3, 0x2e, 0x61, 0xcd, 0x05, 0xf9, 0xdf, 0xf1, 0xed, 0x7f, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, 0x7d, 0xcf, 0x53, 0x04, 0x0f, 0x00, 0x00, + // 1305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xc0, 0xb3, 0x89, 0x13, 0xa7, 0xcf, 0x69, 0xbf, 0xf9, 0x4e, 0x43, 0xeb, 0x2e, 0x89, 0x93, + 0x6e, 0x9b, 0x5f, 0x6d, 0xe4, 0x25, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x26, 0x2a, 0x05, 0xb5, 0x45, + 0x65, 0x89, 0x38, 0x70, 0xc0, 0x1a, 0xaf, 0x87, 0xf5, 0xaa, 0xde, 0x1d, 0x77, 0x67, 0x6c, 0x36, + 0x2d, 0xe5, 0x80, 0x44, 0x55, 0xd4, 0x0b, 0x12, 0x77, 0xd4, 0xff, 0x80, 0x7f, 0xa3, 0x12, 0x97, + 0x4a, 0x5c, 0x38, 0x21, 0xd4, 0x72, 0xe0, 0x84, 0xc4, 0x7f, 0x80, 0xe6, 0xc7, 0xda, 0x5e, 0xaf, + 0xb7, 0x4e, 0x51, 0xb9, 0xed, 0xcc, 0xbc, 0x1f, 0x9f, 0x79, 0xf3, 0xfc, 0xde, 0x33, 0x2c, 0x13, + 0xde, 0x22, 0x51, 0xe0, 0x87, 0xdc, 0x26, 0xbd, 0xc0, 0xee, 0xed, 0xda, 0x77, 0xba, 0x24, 0x3a, + 0xac, 0x76, 0x22, 0xca, 0x29, 0x5a, 0xec, 0x9f, 0x56, 0x49, 0x2f, 0xa8, 0xf6, 0x76, 0x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 0x15, 0xe3, 0xe9, 0xb3, 0x8a, 0xf1, 0xfb, 0xb3, 0x8a, + 0xf1, 0xfd, 0xf3, 0xca, 0xd4, 0xd3, 0xe7, 0x95, 0xa9, 0x5f, 0x9f, 0x57, 0xa6, 0x3e, 0xdb, 0xf2, + 0x7c, 0xde, 0xea, 0x36, 0xaa, 0x2e, 0x0d, 0x6c, 0xde, 0xc2, 0x11, 0xf3, 0xd9, 0x90, 0xa9, 0x58, + 0x1a, 0xe3, 0x87, 0x1d, 0xc2, 0x1a, 0x73, 0xf2, 0x5f, 0xeb, 0x9b, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x5f, 0x17, 0x5b, 0xda, 0x7e, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1295,7 +1350,7 @@ type QueryClient interface { 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) - // TraceTx implements the `debug_traceTransaction` rpc api + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api TraceBlock(ctx context.Context, in *QueryTraceBlockRequest, opts ...grpc.CallOption) (*QueryTraceBlockResponse, error) } @@ -1430,7 +1485,7 @@ type QueryServer interface { EstimateGas(context.Context, *EthCallRequest) (*EstimateGasResponse, error) // TraceTx implements the `debug_traceTransaction` rpc api TraceTx(context.Context, *QueryTraceTxRequest) (*QueryTraceTxResponse, error) - // TraceTx implements the `debug_traceTransaction` rpc api + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api TraceBlock(context.Context, *QueryTraceBlockRequest) (*QueryTraceBlockResponse, error) } @@ -2515,6 +2570,43 @@ func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryTraceBlockTxResult) 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 *QueryTraceBlockTxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTraceBlockTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x12 + } + if len(m.Result) > 0 { + i -= len(m.Result) + copy(dAtA[i:], m.Result) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Result))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryTraceBlockResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2535,12 +2627,19 @@ func (m *QueryTraceBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = 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 + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].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 } @@ -2897,19 +2996,38 @@ func (m *QueryTraceBlockRequest) Size() (n int) { return n } -func (m *QueryTraceBlockResponse) Size() (n int) { +func (m *QueryTraceBlockTxResult) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Data) + l = len(m.Result) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Error) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } +func (m *QueryTraceBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5123,7 +5241,7 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTraceBlockTxResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5146,15 +5264,15 @@ func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTraceBlockResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTraceBlockTxResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTraceBlockTxResult: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -5181,9 +5299,125 @@ func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} + m.Result = append(m.Result[:0], dAtA[iNdEx:postIndex]...) + if m.Result == nil { + m.Result = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTraceBlockResponse) 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: QueryTraceBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", 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 + } + m.Results = append(m.Results, &QueryTraceBlockTxResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: From 8034d605cd81597eae6d6861aaacb8c2ac7cac2c Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Mon, 8 Nov 2021 09:19:16 -0500 Subject: [PATCH 09/29] refactor traceBlock response --- docs/api/proto-docs.md | 31 +- proto/ethermint/evm/v1/query.proto | 13 +- rpc/ethereum/namespaces/debug/api.go | 17 +- x/evm/keeper/grpc_query.go | 22 +- x/evm/types/query.pb.go | 451 +++++++-------------------- 5 files changed, 138 insertions(+), 396 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 5555789a50..af23e3d948 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -49,7 +49,6 @@ - [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) - [QueryTraceBlockRequest](#ethermint.evm.v1.QueryTraceBlockRequest) - [QueryTraceBlockResponse](#ethermint.evm.v1.QueryTraceBlockResponse) - - [QueryTraceBlockTxResult](#ethermint.evm.v1.QueryTraceBlockTxResult) - [QueryTraceTxRequest](#ethermint.evm.v1.QueryTraceTxRequest) - [QueryTraceTxResponse](#ethermint.evm.v1.QueryTraceTxResponse) - [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest) @@ -749,9 +748,9 @@ QueryTraceBlockRequest defines TraceTx request | ----- | ---- | ----- | ----------- | | `txs` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | txs messages in the block | | `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | -| `block_number` | [int64](#int64) | | | -| `block_hash` | [string](#string) | | | -| `block_time` | [int64](#int64) | | | +| `block_number` | [int64](#int64) | | block number | +| `block_hash` | [string](#string) | | block hash | +| `block_time` | [int64](#int64) | | block time | @@ -766,23 +765,7 @@ QueryTraceBlockResponse defines TraceBlock response | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `results` | [QueryTraceBlockTxResult](#ethermint.evm.v1.QueryTraceBlockTxResult) | repeated | | - - - - - - - - -### QueryTraceBlockTxResult - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `result` | [bytes](#bytes) | | | -| `error` | [string](#string) | | | +| `data` | [bytes](#bytes) | | | @@ -801,9 +784,9 @@ QueryTraceTxRequest defines TraceTx request | `tx_index` | [uint64](#uint64) | | transaction index | | `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | | `predecessors` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | the predecessor transactions included in the same block need to be replayed first to get correct context for tracing. | -| `block_number` | [int64](#int64) | | | -| `block_hash` | [string](#string) | | | -| `block_time` | [int64](#int64) | | | +| `block_number` | [int64](#int64) | | block number of requested transaction | +| `block_hash` | [string](#string) | | block hash of requested transaction | +| `block_time` | [int64](#int64) | | block time of requested transaction | diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 763f5c24cd..40f6108ff2 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -236,8 +236,11 @@ message QueryTraceTxRequest { // the predecessor transactions included in the same block // need to be replayed first to get correct context for tracing. repeated MsgEthereumTx predecessors = 4; + // block number of requested transaction int64 block_number = 5; + // block hash of requested transaction string block_hash = 6; + // block time of requested transaction int64 block_time = 7; } @@ -253,19 +256,17 @@ message QueryTraceBlockRequest { repeated MsgEthereumTx txs = 1; // TraceConfig holds extra parameters to trace functions. TraceConfig trace_config = 3; + // block number int64 block_number = 5; + // block hash string block_hash = 6; + // block time int64 block_time = 7; } -message QueryTraceBlockTxResult { - bytes result = 1; - string error = 2; -} - // QueryTraceBlockResponse defines TraceBlock response message QueryTraceBlockResponse { - repeated QueryTraceBlockTxResult results = 1; + bytes data = 1; } diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index a5a2bd0957..7f9ec7ba66 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -222,21 +222,8 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi } decodedResults := make([]*evmtypes.TxTraceResult, txsLength) - for i, res := range res.Results { - if res.Error != "" { - decodedResults[i] = &evmtypes.TxTraceResult{ - Error: res.Error, - } - continue - } - - var decodedResult interface{} - if err := json.Unmarshal(res.Result, &decodedResult); err != nil { - return nil, err - } - decodedResults[i] = &evmtypes.TxTraceResult{ - Result: decodedResult, - } + if err := json.Unmarshal(res.Data, &decodedResults); err != nil { + return nil, err } return decodedResults, nil diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 9b346b558c..0ea6c521ab 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -386,7 +386,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } tx := req.Msg.AsTransaction() - result, err := k.traceTx(ctx, signer, req.TxIndex, ethCfg, tx, baseFee, req.TraceConfig) + result, err := k.traceTx(ctx, signer, req.TxIndex, ethCfg, tx, baseFee, req.TraceConfig, false) if err != nil { return nil, err } @@ -425,26 +425,25 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) baseFee := k.feeMarketKeeper.GetBaseFee(ctx) txsLength := len(req.Txs) - results := make([]*types.QueryTraceBlockTxResult, txsLength) + results := make([]*types.TxTraceResult, txsLength) for i, tx := range req.Txs { ethTx := tx.AsTransaction() - traceResult, err := k.traceTx(ctx, signer, uint64(i), ethCfg, ethTx, baseFee, req.TraceConfig) + traceResult, err := k.traceTx(ctx, signer, uint64(i), ethCfg, ethTx, baseFee, req.TraceConfig, true) if err != nil { results[i].Error = err.Error() continue } + results[i].Result = traceResult + } - resultData, err := json.Marshal(traceResult) - if err != nil { - results[i].Error = err.Error() - continue - } - results[i].Result = resultData + resultData, err := json.Marshal(results) + if err != nil { + return nil, err } return &types.QueryTraceBlockResponse{ - Results: results, + Data: resultData, }, nil } @@ -456,6 +455,7 @@ func (k *Keeper) traceTx( tx *ethtypes.Transaction, baseFee *big.Int, traceConfig *types.TraceConfig, + commitMessage bool, ) (*interface{}, error) { // Assemble the structured logger or the JavaScript tracer var ( @@ -527,7 +527,7 @@ func (k *Keeper) traceTx( k.SetTxHashTransient(txHash) k.SetTxIndexTransient(txIndex) - res, err := k.ApplyMessage(msg, tracer, false) + res, err := k.ApplyMessage(msg, tracer, commitMessage) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 0634ffe851..c5ca1dc15c 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -893,9 +893,12 @@ type QueryTraceTxRequest struct { // the predecessor transactions included in the same block // need to be replayed first to get correct context for tracing. Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` - BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + // block number of requested transaction + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block hash of requested transaction + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block time of requested transaction + BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` } func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } @@ -1032,9 +1035,12 @@ type QueryTraceBlockRequest struct { Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` // TraceConfig holds extra parameters to trace functions. TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` - BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + // block number + BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // block hash + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // block time + BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` } func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } @@ -1105,68 +1111,16 @@ func (m *QueryTraceBlockRequest) GetBlockTime() int64 { return 0 } -type QueryTraceBlockTxResult struct { - Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (m *QueryTraceBlockTxResult) Reset() { *m = QueryTraceBlockTxResult{} } -func (m *QueryTraceBlockTxResult) String() string { return proto.CompactTextString(m) } -func (*QueryTraceBlockTxResult) ProtoMessage() {} -func (*QueryTraceBlockTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{21} -} -func (m *QueryTraceBlockTxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTraceBlockTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTraceBlockTxResult.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 *QueryTraceBlockTxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTraceBlockTxResult.Merge(m, src) -} -func (m *QueryTraceBlockTxResult) XXX_Size() int { - return m.Size() -} -func (m *QueryTraceBlockTxResult) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTraceBlockTxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTraceBlockTxResult proto.InternalMessageInfo - -func (m *QueryTraceBlockTxResult) GetResult() []byte { - if m != nil { - return m.Result - } - return nil -} - -func (m *QueryTraceBlockTxResult) GetError() string { - if m != nil { - return m.Error - } - return "" -} - // QueryTraceBlockResponse defines TraceBlock response type QueryTraceBlockResponse struct { - Results []*QueryTraceBlockTxResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` } func (m *QueryTraceBlockResponse) Reset() { *m = QueryTraceBlockResponse{} } func (m *QueryTraceBlockResponse) String() string { return proto.CompactTextString(m) } func (*QueryTraceBlockResponse) ProtoMessage() {} func (*QueryTraceBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e15a877459347994, []int{22} + return fileDescriptor_e15a877459347994, []int{21} } func (m *QueryTraceBlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1195,9 +1149,9 @@ func (m *QueryTraceBlockResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTraceBlockResponse proto.InternalMessageInfo -func (m *QueryTraceBlockResponse) GetResults() []*QueryTraceBlockTxResult { +func (m *QueryTraceBlockResponse) GetData() []byte { if m != nil { - return m.Results + return m.Data } return nil } @@ -1224,96 +1178,92 @@ func init() { proto.RegisterType((*QueryTraceTxRequest)(nil), "ethermint.evm.v1.QueryTraceTxRequest") proto.RegisterType((*QueryTraceTxResponse)(nil), "ethermint.evm.v1.QueryTraceTxResponse") proto.RegisterType((*QueryTraceBlockRequest)(nil), "ethermint.evm.v1.QueryTraceBlockRequest") - proto.RegisterType((*QueryTraceBlockTxResult)(nil), "ethermint.evm.v1.QueryTraceBlockTxResult") proto.RegisterType((*QueryTraceBlockResponse)(nil), "ethermint.evm.v1.QueryTraceBlockResponse") } func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1305 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xc0, 0xb3, 0x89, 0x13, 0xa7, 0xcf, 0x69, 0xbf, 0xf9, 0x4e, 0x43, 0xeb, 0x2e, 0x89, 0x93, - 0x6e, 0x9b, 0x5f, 0x6d, 0xe4, 0x25, 0x06, 0x55, 0xa2, 0x12, 0x82, 0x26, 0x2a, 0x05, 0xb5, 0x45, - 0x65, 0x89, 0x38, 0x70, 0xc0, 0x1a, 0xaf, 0x87, 0xf5, 0xaa, 0xde, 0x1d, 0x77, 0x67, 0x6c, 0x36, - 0x2d, 0xe5, 0x80, 0x44, 0x55, 0xd4, 0x0b, 0x12, 0x77, 0xd4, 0xff, 0x80, 0x7f, 0xa3, 0x12, 0x97, - 0x4a, 0x5c, 0x38, 0x21, 0xd4, 0x72, 0xe0, 0x84, 0xc4, 0x7f, 0x80, 0xe6, 0xc7, 0xda, 0x5e, 0xaf, - 0xb7, 0x4e, 0x51, 0xb9, 0xed, 0xcc, 0xbc, 0x1f, 0x9f, 0x79, 0xf3, 0xfc, 0xde, 0x33, 0x2c, 0x13, - 0xde, 0x22, 0x51, 0xe0, 0x87, 0xdc, 0x26, 0xbd, 0xc0, 0xee, 0xed, 0xda, 0x77, 0xba, 0x24, 0x3a, - 0xac, 0x76, 0x22, 0xca, 0x29, 0x5a, 0xec, 0x9f, 0x56, 0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1b, 0xd4, 0xde, 0xde, 0x93, 0x67, 0x15, 0xe3, 0xe9, 0xb3, 0x8a, 0xf1, 0xfb, 0xb3, 0x8a, - 0xf1, 0xfd, 0xf3, 0xca, 0xd4, 0xd3, 0xe7, 0x95, 0xa9, 0x5f, 0x9f, 0x57, 0xa6, 0x3e, 0xdb, 0xf2, - 0x7c, 0xde, 0xea, 0x36, 0xaa, 0x2e, 0x0d, 0x6c, 0xde, 0xc2, 0x11, 0xf3, 0xd9, 0x90, 0xa9, 0x58, - 0x1a, 0xe3, 0x87, 0x1d, 0xc2, 0x1a, 0x73, 0xf2, 0x5f, 0xeb, 0x9b, 0xff, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x5f, 0x17, 0x5b, 0xda, 0x7e, 0x0f, 0x00, 0x00, + // 1261 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x26, 0x4e, 0x9c, 0x3e, 0xa7, 0x25, 0x4c, 0x03, 0x75, 0x97, 0xc4, 0x49, 0xb7, 0x4d, + 0xe2, 0xb4, 0xc1, 0x8b, 0x0d, 0xaa, 0x44, 0x25, 0x04, 0x4d, 0x54, 0x0a, 0x6a, 0x8b, 0x8a, 0x89, + 0x38, 0x70, 0xb1, 0xc6, 0xeb, 0x61, 0xbd, 0xaa, 0x77, 0xc7, 0xdd, 0x19, 0x9b, 0x4d, 0x4b, 0x39, + 0x20, 0x51, 0x15, 0xf5, 0x82, 0xc4, 0x1d, 0xf5, 0x1b, 0xf0, 0x35, 0x2a, 0x71, 0xa9, 0xc4, 0x85, + 0x13, 0x42, 0x2d, 0x07, 0x4e, 0x48, 0x7c, 0x03, 0x34, 0x7f, 0xd6, 0x5e, 0x7b, 0xbd, 0x75, 0x8a, + 0xca, 0x6d, 0xfe, 0xbc, 0xf7, 0x7e, 0xbf, 0xf7, 0xe6,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e3, 0x8f, 0xa7, 0x25, 0xe3, 0x87, 0x67, 0xa5, 0x99, 0x27, 0xcf, 0x4a, 0x33, 0xbf, 0x3d, 0x2b, + 0xcd, 0x7c, 0x51, 0x76, 0x3d, 0xde, 0xee, 0x35, 0x2b, 0x0e, 0xf5, 0x6d, 0xde, 0xc6, 0x21, 0xf3, + 0x58, 0x22, 0x54, 0x24, 0x83, 0xf1, 0xc3, 0x2e, 0x61, 0xcd, 0x05, 0xf9, 0xdf, 0xf1, 0xed, 0x7f, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, 0x7d, 0xcf, 0x53, 0x04, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2570,43 +2520,6 @@ func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryTraceBlockTxResult) 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 *QueryTraceBlockTxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTraceBlockTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if len(m.Result) > 0 { - i -= len(m.Result) - copy(dAtA[i:], m.Result) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Result))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryTraceBlockResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2627,19 +2540,12 @@ func (m *QueryTraceBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + 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 } @@ -2996,38 +2902,19 @@ func (m *QueryTraceBlockRequest) Size() (n int) { return n } -func (m *QueryTraceBlockTxResult) Size() (n int) { +func (m *QueryTraceBlockResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Result) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Error) + l = len(m.Data) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryTraceBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5241,7 +5128,7 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTraceBlockTxResult) Unmarshal(dAtA []byte) error { +func (m *QueryTraceBlockResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5264,15 +5151,15 @@ func (m *QueryTraceBlockTxResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTraceBlockTxResult: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTraceBlockResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceBlockTxResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -5299,125 +5186,9 @@ func (m *QueryTraceBlockTxResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Result = append(m.Result[:0], dAtA[iNdEx:postIndex]...) - if m.Result == nil { - m.Result = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTraceBlockResponse) 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: QueryTraceBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTraceBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", 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 - } - m.Results = append(m.Results, &QueryTraceBlockTxResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } iNdEx = postIndex default: From fa47b907bbe6e68d5c977e7fa58bcbb44f6fc777 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:04:19 -0500 Subject: [PATCH 10/29] Update proto/ethermint/evm/v1/tx.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/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index d9bb79612e..1a2396895c 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -13,7 +13,7 @@ option go_package = "github.com/tharsis/ethermint/x/evm/types"; service Msg { // EthereumTx defines a method submitting Ethereum transactions. rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { - option (google.api.http).get = "/ethermint/evm/v1/ethereum_tx"; + option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; }; } From bb7c8cb794f4403d1f9944a10a9ab4f89c1b84f3 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:04:36 -0500 Subject: [PATCH 11/29] 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 40f6108ff2..d4c168ed2c 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -241,7 +241,7 @@ message QueryTraceTxRequest { // block hash of requested transaction string block_hash = 6; // block time of requested transaction - int64 block_time = 7; + google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // QueryTraceTxResponse defines TraceTx response From 042c4df2a8330d8f749c11d1a1a1c24a9047a98e Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:04:50 -0500 Subject: [PATCH 12/29] 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 d4c168ed2c..f013d1df56 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -238,7 +238,7 @@ message QueryTraceTxRequest { repeated MsgEthereumTx predecessors = 4; // block number of requested transaction int64 block_number = 5; - // block hash of requested transaction + // block hex hash of requested transaction string block_hash = 6; // block time of requested transaction google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; From 4e99b42ac73b9fad612edb57db17dd546d6b5591 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:05:52 -0500 Subject: [PATCH 13/29] 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 f013d1df56..f256336623 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -261,7 +261,7 @@ message QueryTraceBlockRequest { // block hash string block_hash = 6; // block time - int64 block_time = 7; + google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // QueryTraceBlockResponse defines TraceBlock response From fb9cb2f051229884f4041d082247523108b108fb Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:06:00 -0500 Subject: [PATCH 14/29] 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 f256336623..1b07ed11d2 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -258,7 +258,7 @@ message QueryTraceBlockRequest { TraceConfig trace_config = 3; // block number int64 block_number = 5; - // block hash + // block hex hash string block_hash = 6; // block time google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; From 28946cbbcb85212ec53bbb56099e9bb71577fd4e Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:06:08 -0500 Subject: [PATCH 15/29] 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 1b07ed11d2..cb31dce290 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -269,4 +269,3 @@ message QueryTraceBlockResponse { bytes data = 1; } - From e55fa23361cbfc6c2d10fee651924f2678aa261d Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Mon, 8 Nov 2021 19:46:27 -0500 Subject: [PATCH 16/29] check tx index is not out of bound --- rpc/ethereum/namespaces/debug/api.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 7f9ec7ba66..2c9835beba 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -87,7 +87,13 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( return nil, err } - predecessors := []*evmtypes.MsgEthereumTx{} + // check tx index is not out of bound + if uint32(len(blk.Block.Txs)) < transaction.Index { + a.logger.Debug("tx index", transaction.Index, "tx hash", hash, "out of bound in block", blk.Block.Height) + return nil, fmt.Errorf("transaction not included in block %v", blk.Block.Height) + } + + var predecessors []*evmtypes.MsgEthereumTx for _, txBz := range blk.Block.Txs[:transaction.Index] { tx, err := a.clientCtx.TxConfig.TxDecoder()(txBz) if err != nil { From 2468ec81c49cf38d08c65df8d254cf2d8ddc5c01 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Mon, 8 Nov 2021 19:55:08 -0500 Subject: [PATCH 17/29] fix build --- docs/api/proto-docs.md | 8 +- go.mod | 19 +- go.sum | 8 +- proto/ethermint/evm/v1/query.proto | 1 + rpc/ethereum/namespaces/debug/api.go | 4 +- x/evm/keeper/grpc_query.go | 4 +- x/evm/types/query.pb.go | 254 +++++++++++++++------------ 7 files changed, 164 insertions(+), 134 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index af23e3d948..19887e6c87 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -749,8 +749,8 @@ QueryTraceBlockRequest defines TraceTx request | `txs` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | txs messages in the block | | `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | | `block_number` | [int64](#int64) | | block number | -| `block_hash` | [string](#string) | | block hash | -| `block_time` | [int64](#int64) | | block time | +| `block_hash` | [string](#string) | | block hex hash | +| `block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | block time | @@ -785,8 +785,8 @@ QueryTraceTxRequest defines TraceTx request | `trace_config` | [TraceConfig](#ethermint.evm.v1.TraceConfig) | | TraceConfig holds extra parameters to trace functions. | | `predecessors` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | the predecessor transactions included in the same block need to be replayed first to get correct context for tracing. | | `block_number` | [int64](#int64) | | block number of requested transaction | -| `block_hash` | [string](#string) | | block hash of requested transaction | -| `block_time` | [int64](#int64) | | block time of requested transaction | +| `block_hash` | [string](#string) | | block hex hash of requested transaction | +| `block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | block time of requested transaction | diff --git a/go.mod b/go.mod index 1d65afc403..75e4c0cf3b 100644 --- a/go.mod +++ b/go.mod @@ -34,22 +34,22 @@ 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-20210921155107-089bfa567519 // indirect + golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 google.golang.org/grpc v1.41.0 gopkg.in/yaml.v2 v2.4.0 ) -require github.com/davecgh/go-spew v1.1.1 +require ( + github.com/davecgh/go-spew v1.1.1 + google.golang.org/protobuf v1.27.1 +) require ( filippo.io/edwards25519 v1.0.0-beta.2 // indirect github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.8 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.52 // indirect @@ -74,7 +74,6 @@ require ( github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect @@ -98,9 +97,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/huandu/xstrings v1.3.2 // indirect github.com/huin/goupnp v1.0.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -113,11 +110,8 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.1 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect @@ -127,8 +121,6 @@ require ( github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect - github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect - github.com/pseudomuto/protokit v0.2.0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect @@ -149,7 +141,6 @@ require ( golang.org/x/sys v0.0.0-20211025112917-711f33c9992c // indirect golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect golang.org/x/text v0.3.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect gopkg.in/ini.v1 v1.63.2 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 // indirect diff --git a/go.sum b/go.sum index 3d468f4fee..9c19a6a6e9 100644 --- a/go.sum +++ b/go.sum @@ -1293,8 +1293,8 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/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= @@ -1759,8 +1759,8 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20211021150943-2b146023228c h1:FqrtZMB5Wr+/RecOM3uPJNPfWR8Upb5hAPnt7PU6i4k= -google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 h1:ZONpjmFT5e+I/0/xE3XXbG5OIvX2hRYzol04MhKBl2E= +google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 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.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index cb31dce290..11a1be2f73 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -6,6 +6,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; import "ethermint/evm/v1/evm.proto"; import "ethermint/evm/v1/tx.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "github.com/tharsis/ethermint/x/evm/types"; diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 2c9835beba..946971e8e4 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -126,7 +126,7 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( TxIndex: uint64(transaction.Index), Predecessors: predecessors, BlockNumber: blk.Block.Height, - BlockTime: blk.Block.Time.Unix(), + BlockTime: blk.Block.Time, BlockHash: blk.BlockID.Hash.String(), } @@ -217,7 +217,7 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi Txs: txsMessages, TraceConfig: config, BlockNumber: block.Block.Height, - BlockTime: block.Block.Time.Unix(), + BlockTime: block.Block.Time, BlockHash: block.BlockID.Hash.String(), } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 0ea6c521ab..1397aeeb7f 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -361,7 +361,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ ctx := sdk.UnwrapSDKContext(c) ctx = ctx.WithBlockHeight(req.BlockNumber) - ctx = ctx.WithBlockTime(time.Unix(req.BlockTime, 0)) + ctx = ctx.WithBlockTime(req.BlockTime) ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) k.WithContext(ctx) @@ -415,7 +415,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) ctx := sdk.UnwrapSDKContext(c) ctx = ctx.WithBlockHeight(req.BlockNumber) - ctx = ctx.WithBlockTime(time.Unix(req.BlockTime, 0)) + ctx = ctx.WithBlockTime(req.BlockTime) ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) k.WithContext(ctx) diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index c5ca1dc15c..65672721ed 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -10,19 +10,23 @@ import ( _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -895,10 +899,10 @@ type QueryTraceTxRequest struct { Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"` // block number of requested transaction BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - // block hash of requested transaction + // block hex hash of requested transaction BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block time of requested transaction - BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` } func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } @@ -976,11 +980,11 @@ func (m *QueryTraceTxRequest) GetBlockHash() string { return "" } -func (m *QueryTraceTxRequest) GetBlockTime() int64 { +func (m *QueryTraceTxRequest) GetBlockTime() time.Time { if m != nil { return m.BlockTime } - return 0 + return time.Time{} } // QueryTraceTxResponse defines TraceTx response @@ -1037,10 +1041,10 @@ type QueryTraceBlockRequest struct { TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"` // block number BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` - // block hash + // block hex hash BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block time - BlockTime int64 `protobuf:"varint,7,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` } func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } @@ -1104,11 +1108,11 @@ func (m *QueryTraceBlockRequest) GetBlockHash() string { return "" } -func (m *QueryTraceBlockRequest) GetBlockTime() int64 { +func (m *QueryTraceBlockRequest) GetBlockTime() time.Time { if m != nil { return m.BlockTime } - return 0 + return time.Time{} } // QueryTraceBlockResponse defines TraceBlock response @@ -1184,86 +1188,88 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1261 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x26, 0x4e, 0x9c, 0x3e, 0xa7, 0x25, 0x4c, 0x03, 0x75, 0x97, 0xc4, 0x49, 0xb7, 0x4d, - 0xe2, 0xb4, 0xc1, 0x8b, 0x0d, 0xaa, 0x44, 0x25, 0x04, 0x4d, 0x54, 0x0a, 0x6a, 0x8b, 0x8a, 0x89, - 0x38, 0x70, 0xb1, 0xc6, 0xeb, 0x61, 0xbd, 0xaa, 0x77, 0xc7, 0xdd, 0x19, 0x9b, 0x4d, 0x4b, 0x39, - 0x20, 0x51, 0x15, 0xf5, 0x82, 0xc4, 0x1d, 0xf5, 0x1b, 0xf0, 0x35, 0x2a, 0x71, 0xa9, 0xc4, 0x85, - 0x13, 0x42, 0x2d, 0x07,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0x4b, 0xab, 0x35, 0x4b, 0x94, 0xee, 0xa1, 0x01, 0x79, 0xad, 0xb3, 0x99, 0x44, 0x46, - 0x45, 0x3d, 0x93, 0xc8, 0x98, 0x5c, 0x5b, 0x55, 0x49, 0xe4, 0x02, 0xda, 0x49, 0x13, 0x61, 0xca, - 0x74, 0xc8, 0xc3, 0xbe, 0x7b, 0x8b, 0x1c, 0xde, 0x43, 0x77, 0x20, 0x27, 0xe4, 0x18, 0x59, 0x99, - 0x2d, 0x33, 0xd0, 0x78, 0xf3, 0xec, 0x73, 0x6d, 0x34, 0x87, 0x1d, 0xc9, 0xe1, 0x2c, 0x3a, 0x33, - 0xa9, 0x9b, 0x5a, 0x23, 0x95, 0xf8, 0x0a, 0x16, 0x94, 0x22, 0xa1, 0x73, 0x19, 0x91, 0x47, 0x84, - 0xcf, 0xdc, 0x9c, 0x62, 0xa5, 0x19, 0x6c, 0x48, 0x06, 0x26, 0x2a, 0xa6, 0x19, 0x28, 0xc9, 0x43, - 0x11, 0xe4, 0xb5, 0xe4, 0xa1, 0x8d, 0x74, 0xcc, 0x51, 0x35, 0x34, 0xb7, 0xa7, 0x4d, 0xc5, 0x18, - 0xd7, 0x92, 0xb8, 0xab, 0xc8, 0x4c, 0xe3, 0x12, 0xde, 0x6e, 0x38, 0x02, 0xee, 0x1b, 0x28, 0x24, - 0xd4, 0xf2, 0x08, 0xe8, 0x13, 0x72, 0x9e, 0x20, 0xb7, 0xd6, 0x96, 0xc4, 0xde, 0x40, 0xa5, 0x09, - 0xd8, 0xda, 0xbc, 0xe1, 0x62, 0x86, 0xbe, 0x86, 0xbc, 0x56, 0x8c, 0xcc, 0xde, 0x1b, 0x95, 0xe7, - 0xcc, 0xde, 0x1b, 0x13, 0x9e, 0xe7, 0x65, 0xaf, 0xe4, 0x82, 0x47, 0xe8, 0x81, 0x01, 0x30, 0x9c, - 0xc9, 0xa8, 0xfc, 0xbc, 0xd0, 0x49, 0x99, 0x32, 0x77, 0x8e, 0x60, 0xa9, 0x79, 0x6c, 0x4a, 0x1e, - 0xeb, 0x68, 0x2d, 0x8b, 0x87, 0x94, 0x89, 0xbd, 0xbd, 0xc7, 0x4f, 0x4b, 0xc6, 0x93, 0xa7, 0x25, - 0xe3, 0x8f, 0xa7, 0x25, 0xe3, 0x87, 0x67, 0xa5, 0x99, 0x27, 0xcf, 0x4a, 0x33, 0xbf, 0x3d, 0x2b, - 0xcd, 0x7c, 0x51, 0x76, 0x3d, 0xde, 0xee, 0x35, 0x2b, 0x0e, 0xf5, 0x6d, 0xde, 0xc6, 0x21, 0xf3, - 0x58, 0x22, 0x54, 0x24, 0x83, 0xf1, 0xc3, 0x2e, 0x61, 0xcd, 0x05, 0xf9, 0xdf, 0xf1, 0xed, 0x7f, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x36, 0x7d, 0xcf, 0x53, 0x04, 0x0f, 0x00, 0x00, + // 1295 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0x26, 0x4e, 0x9c, 0x3e, 0x4e, 0xfb, 0xcf, 0x7f, 0x1a, 0xa8, 0xbb, 0x24, 0x76, 0xba, + 0x6d, 0xde, 0xda, 0xb0, 0x4b, 0x0c, 0xaa, 0x44, 0x25, 0x04, 0x4d, 0x54, 0x0a, 0x6a, 0x8b, 0x8a, + 0x89, 0x38, 0x70, 0xb1, 0xc6, 0xeb, 0xe9, 0xda, 0xaa, 0x77, 0xc7, 0xdd, 0x19, 0x9b, 0x4d, 0x4b, + 0x39, 0x20, 0x51, 0x15, 0xf5, 0x52, 0x09, 0xce, 0xa8, 0xdf, 0x80, 0xaf, 0xd1, 0x63, 0x25, 0x2e, + 0x9c, 0x00, 0xb5, 0x1c, 0xb8, 0xf6, 0x1b, 0xa0, 0x79, 0x59, 0x7b, 0xed, 0xf5, 0xc6, 0x29, 0xea, + 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 0x7e, 0x5b, 0xc3, 0xf7, + 0x9d, 0x69, 0xf8, 0x25, 0x98, 0xed, 0xe1, 0x76, 0x37, 0x06, 0x57, 0x13, 0xeb, 0x22, 0x2c, 0xea, + 0x56, 0x6a, 0xbc, 0x52, 0x90, 0x1b, 0xf0, 0xff, 0xc4, 0x39, 0x0d, 0x81, 0x20, 0x27, 0x7a, 0x5f, + 0x9e, 0x5a, 0xa8, 0xca, 0xb1, 0x75, 0x17, 0x90, 0x34, 0xdc, 0x8f, 0xae, 0x53, 0x8f, 0xc5, 0x10, + 0x08, 0x72, 0xf2, 0xc6, 0x28, 0xff, 0x72, 0x8c, 0x3e, 0x06, 0x18, 0xbc, 0x20, 0x32, 0xb6, 0x42, + 0x65, 0xdd, 0x56, 0x4d, 0x6b, 0x8b, 0xe7, 0xc6, 0x56, 0xef, 0x95, 0x7e, 0x6e, 0xec, 0x9b, 0x83, + 0x54, 0x55, 0x13, 0x27, 0x13, 0x24, 0x7f, 0x30, 0x74, 0x62, 0x63, 0x70, 0xcd, 0x73, 0x0b, 0x72, + 0x6d, 0xea, 0x89, 0xe8, 0x66, 0x36, 0x0b, 0x95, 0x37, 0xec, 0xd1, 0xa7, 0xcf, 0xbe, 0x4e, 0xbd, + 0xaa, 0x34, 0x41, 0x57, 0xc7, 0x90, 0xda, 0x98, 0x48, 0x4a, 0xe1, 0x24, 0x59, 0x59, 0x4b, 0x3a, + 0x0f, 0x37, 0x71, 0x88, 0xfd, 0x38, 0x0f, 0xd6, 0x0d, 0x4d, 0x30, 0x5e, 0xd5, 0x04, 0x2f, 0xc2, + 0x5c, 0x47, 0xae, 0xc8, 0x04, 0x15, 0x2a, 0xc5, 0x34, 0x45, 0x75, 0x62, 0x37, 0xf7, 0xf4, 0xf7, + 0xf2, 0x54, 0x55, 0x5b, 0x5b, 0x1f, 0xc0, 0x89, 0x2b, 0xbc, 0xb9, 0x87, 0xdb, 0xed, 0x44, 0xa2, + 0x71, 0xe8, 0xb1, 0xb8, 0x24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 0x46, 0xe4, 0xe9, 0xb0, 0xe8, 0x95, 0xa8, 0xf0, 0x08, 0x3d, 0x34, + 0x00, 0x06, 0x6f, 0x32, 0xda, 0x3c, 0xcc, 0x75, 0x52, 0xcc, 0xcc, 0xad, 0x23, 0x58, 0x6a, 0x1e, + 0x6b, 0x92, 0x47, 0x19, 0xad, 0x64, 0xf1, 0x90, 0x32, 0xb1, 0xbb, 0xfb, 0xf4, 0x79, 0xc9, 0x78, + 0xf6, 0xbc, 0x64, 0xfc, 0xf9, 0xbc, 0x64, 0x3c, 0x7e, 0x51, 0x9a, 0x7a, 0xf6, 0xa2, 0x34, 0xf5, + 0xdb, 0x8b, 0xd2, 0xd4, 0x57, 0x9b, 0x5e, 0x8b, 0x37, 0xbb, 0x75, 0xdb, 0xa5, 0xbe, 0xc3, 0x9b, + 0x38, 0x64, 0x2d, 0x96, 0x70, 0x15, 0x49, 0x67, 0xfc, 0xa0, 0x43, 0x58, 0x7d, 0x4e, 0xea, 0xd1, + 0xbb, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x05, 0x8b, 0x73, 0xeb, 0x71, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2361,11 +2367,14 @@ func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BlockTime != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockTime)) - i-- - dAtA[i] = 0x38 + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + if err4 != nil { + return 0, err4 } + i -= n4 + i = encodeVarintQuery(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a if len(m.BlockHash) > 0 { i -= len(m.BlockHash) copy(dAtA[i:], m.BlockHash) @@ -2474,11 +2483,14 @@ func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.BlockTime != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockTime)) - i-- - dAtA[i] = 0x38 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + if err7 != nil { + return 0, err7 } + i -= n7 + i = encodeVarintQuery(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x3a if len(m.BlockHash) > 0 { i -= len(m.BlockHash) copy(dAtA[i:], m.BlockHash) @@ -2854,9 +2866,8 @@ func (m *QueryTraceTxRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.BlockTime != 0 { - n += 1 + sovQuery(uint64(m.BlockTime)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) return n } @@ -2896,9 +2907,8 @@ func (m *QueryTraceBlockRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.BlockTime != 0 { - n += 1 + sovQuery(uint64(m.BlockTime)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4815,10 +4825,10 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { m.BlockHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) } - m.BlockTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4828,11 +4838,25 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockTime |= int64(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 err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5089,10 +5113,10 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { m.BlockHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BlockTime", wireType) } - m.BlockTime = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5102,11 +5126,25 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockTime |= int64(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 err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From 0a3ee7daeb0865a8eb7dbc0833785145474c8bbf Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Tue, 9 Nov 2021 06:52:35 -0500 Subject: [PATCH 18/29] Update rpc/ethereum/namespaces/debug/api.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> --- rpc/ethereum/namespaces/debug/api.go | 1 - 1 file changed, 1 deletion(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 946971e8e4..033c77cfe9 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -222,7 +222,6 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi } res, err := a.queryClient.TraceBlock(ctxWithHeight, traceBlockRequest) - if err != nil { return nil, err } From 40e967564e4585bd4ea79688526f261f630a37cd Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Tue, 9 Nov 2021 06:52:42 -0500 Subject: [PATCH 19/29] Update rpc/ethereum/namespaces/debug/api.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> --- rpc/ethereum/namespaces/debug/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 033c77cfe9..b6031bfabb 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -202,7 +202,7 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi // Just considers Ethereum transactions continue } - txsMessages[i] = ethMessage + txsMessages = append(txsMessages, ethMessage) } // minus one to get the context at the beginning of the block From 4f3f827a2249095137a03a59a1536ad86b2d3ab6 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Tue, 9 Nov 2021 06:52:57 -0500 Subject: [PATCH 20/29] Update rpc/ethereum/namespaces/debug/api.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> --- rpc/ethereum/namespaces/debug/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index b6031bfabb..18cd498fa9 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -186,6 +186,7 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi txsMessages := make([]*evmtypes.MsgEthereumTx, txsLength) txDecoder := a.clientCtx.TxConfig.TxDecoder() + for i, tx := range txs { decodedTx, err := txDecoder(tx) if err != nil { From 3d1ea65fc10837a8179df0c45e928c9b7499f503 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Tue, 9 Nov 2021 06:53:26 -0500 Subject: [PATCH 21/29] Update rpc/ethereum/namespaces/debug/api.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> --- rpc/ethereum/namespaces/debug/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 18cd498fa9..2963064cc2 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -93,6 +93,7 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( return nil, fmt.Errorf("transaction not included in block %v", blk.Block.Height) } + // nolint: prealloc var predecessors []*evmtypes.MsgEthereumTx for _, txBz := range blk.Block.Txs[:transaction.Index] { tx, err := a.clientCtx.TxConfig.TxDecoder()(txBz) From f493ccf7f253000fe278aa87ae47b5fb09db6bf0 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Tue, 9 Nov 2021 07:09:28 -0500 Subject: [PATCH 22/29] remove prealloc --- docs/api/proto-docs.md | 2 +- go.mod | 7 ++ go.sum | 25 +++++++ proto/ethermint/evm/v1/tx.proto | 2 +- rpc/ethereum/namespaces/debug/api.go | 5 +- x/evm/types/tx.pb.go | 108 +++++++++++++-------------- x/evm/types/tx.pb.gw.go | 4 +- 7 files changed, 93 insertions(+), 60 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 19887e6c87..0b9c2c9a80 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -510,7 +510,7 @@ Msg defines the evm Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `EthereumTx` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthereumTx defines a method submitting Ethereum transactions. | GET|/ethermint/evm/v1/ethereum_tx| +| `EthereumTx` | [MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthereumTx defines a method submitting Ethereum transactions. | POST|/ethermint/evm/v1/ethereum_tx| diff --git a/go.mod b/go.mod index 75e4c0cf3b..61f400a1b1 100644 --- a/go.mod +++ b/go.mod @@ -50,6 +50,7 @@ require ( github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.8 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.52 // indirect @@ -74,6 +75,7 @@ require ( github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect @@ -97,7 +99,9 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/huandu/xstrings v1.3.2 // indirect github.com/huin/goupnp v1.0.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -110,8 +114,10 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect @@ -121,6 +127,7 @@ require ( github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect + github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect diff --git a/go.sum b/go.sum index 9c19a6a6e9..664b00bdba 100644 --- a/go.sum +++ b/go.sum @@ -86,9 +86,13 @@ github.com/DataDog/zstd v1.4.8/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +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/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= @@ -324,6 +328,9 @@ github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 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.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= @@ -646,16 +653,21 @@ github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 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.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +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.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.8/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.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= @@ -771,6 +783,7 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= 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= @@ -829,6 +842,8 @@ github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +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-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= @@ -845,6 +860,8 @@ github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjU github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= 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= @@ -865,6 +882,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ 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.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= +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/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= @@ -1017,6 +1036,9 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +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/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= @@ -1097,6 +1119,7 @@ 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.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= @@ -1337,6 +1360,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1394,6 +1418,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index d9bb79612e..1a2396895c 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -13,7 +13,7 @@ option go_package = "github.com/tharsis/ethermint/x/evm/types"; service Msg { // EthereumTx defines a method submitting Ethereum transactions. rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { - option (google.api.http).get = "/ethermint/evm/v1/ethereum_tx"; + option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; }; } diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 2963064cc2..4ae0552ae0 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -185,9 +185,10 @@ func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfi return []*evmtypes.TxTraceResult{}, nil } - txsMessages := make([]*evmtypes.MsgEthereumTx, txsLength) txDecoder := a.clientCtx.TxConfig.TxDecoder() - + + // nolint: prealloc + var txsMessages []*evmtypes.MsgEthereumTx for i, tx := range txs { decodedTx, err := txDecoder(tx) if err != nil { diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index e29364de44..8c98006d23 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -352,61 +352,61 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 854 bytes of a gzipped FileDescriptorProto + // 853 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x31, 0x8f, 0xe3, 0x44, - 0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0xe9, 0x34, 0xda, 0x93, 0xbc, 0x11, 0x17, 0x47, 0x91, - 0x80, 0x80, 0xb4, 0xb6, 0x6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 0xb6, 0x13, 0xd8, - 0xa8, 0xa5, 0xf3, 0xda, 0x5f, 0x38, 0xac, 0x8a, 0xed, 0xbf, 0xf2, 0xf1, 0x0f, 0xbf, 0x7e, 0x51, - 0xb5, 0xd0, 0x6d, 0x67, 0x7b, 0x9d, 0x96, 0xde, 0x63, 0x91, 0xb9, 0xee, 0x93, 0x65, 0x17, 0x3c, - 0x5d, 0x76, 0xc1, 0x2f, 0xcb, 0x2e, 0xf8, 0xfc, 0xa2, 0x5b, 0x79, 0x7a, 0xd1, 0xad, 0xfc, 0x78, - 0xd1, 0xad, 0xbc, 0x3f, 0x58, 0xd3, 0x93, 0x98, 0xe2, 0x84, 0x53, 0xbe, 0x16, 0x2a, 0x53, 0xc1, - 0x94, 0xaa, 0xce, 0x1a, 0x6a, 0xd9, 0xbe, 0xf9, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x88, - 0x0d, 0x58, 0x50, 0x08, 0x00, 0x00, + 0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0xe9, 0x64, 0xed, 0x49, 0x4e, 0xc4, 0xc5, 0x91, 0x25, + 0x20, 0x20, 0xc5, 0xd6, 0x2d, 0x54, 0x5b, 0xb1, 0xbe, 0xdd, 0x3b, 0xdd, 0x29, 0x27, 0x90, 0x15, + 0x1a, 0xae, 0x88, 0x66, 0x9d, 0x59, 0x67, 0x44, 0xec, 0xb1, 0x3c, 0x13, 0xcb, 0x41, 0xa2, 0x41, + 0x14, 0x74, 0x20, 0xf1, 0x07, 0x28, 0xa8, 0x68, 0xe1, 0x07, 0x50, 0x5e, 0x79, 0x82, 0x06, 0x51, + 0x18, 0x94, 0xa5, 0xda, 0x0e, 0x7e, 0x01, 0x9a, 0xb1, 0xb3, 0x9b, 0x10, 0xe5, 0x80, 0xe3, 0x10, + 0x55, 0xe6, 0xf9, 0x7b, 0xf3, 0xe6, 0xbd, 0xf7, 0x7d, 0x79, 0x0f, 0x76, 0x30, 0x9f, 0xe1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, 0x5c, 0xb6, 0x6f, 0xfe, 0x11, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x54, 0xa7, + 0x4c, 0x50, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/evm/types/tx.pb.gw.go b/x/evm/types/tx.pb.gw.go index 0fde349345..a74e123efd 100644 --- a/x/evm/types/tx.pb.gw.go +++ b/x/evm/types/tx.pb.gw.go @@ -73,7 +73,7 @@ func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marsh // Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { - mux.Handle("GET", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_EthereumTx_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) @@ -134,7 +134,7 @@ func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.C // "MsgClient" to call the correct interceptors. func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { - mux.Handle("GET", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_EthereumTx_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) From 0567e8fdb6e727245f6c0a48a37ea8b9f14be9b1 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Tue, 9 Nov 2021 11:15:18 -0500 Subject: [PATCH 23/29] add traceBlock test --- go.mod | 14 +-- go.sum | 25 ----- rpc/ethereum/namespaces/debug/api.go | 2 +- x/evm/keeper/grpc_query.go | 8 +- x/evm/keeper/grpc_query_test.go | 158 ++++++++++++++++++++++++++- 5 files changed, 161 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index 61f400a1b1..72437e6b4f 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/cosmos/cosmos-sdk v0.44.3 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/ibc-go/v2 v2.0.0-rc0 + github.com/davecgh/go-spew v1.1.1 github.com/ethereum/go-ethereum v1.10.11 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 @@ -37,12 +38,8 @@ require ( golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 google.golang.org/grpc v1.41.0 - gopkg.in/yaml.v2 v2.4.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 google.golang.org/protobuf v1.27.1 + gopkg.in/yaml.v2 v2.4.0 ) require ( @@ -50,7 +47,6 @@ require ( github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.8 // indirect - github.com/Masterminds/goutils v1.1.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.52 // indirect @@ -75,7 +71,6 @@ require ( github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect @@ -99,9 +94,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/huandu/xstrings v1.3.2 // indirect github.com/huin/goupnp v1.0.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect github.com/jmhodges/levigo v1.0.0 // indirect @@ -114,10 +107,8 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.1 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/mwitkow/go-proto-validators v0.3.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect @@ -127,7 +118,6 @@ require ( github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect - github.com/pseudomuto/protoc-gen-doc v1.5.0 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect diff --git a/go.sum b/go.sum index 664b00bdba..9c19a6a6e9 100644 --- a/go.sum +++ b/go.sum @@ -86,13 +86,9 @@ github.com/DataDog/zstd v1.4.8/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -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/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= @@ -328,9 +324,6 @@ github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 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.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= @@ -653,21 +646,16 @@ github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 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.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -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.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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.8/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.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= @@ -783,7 +771,6 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= 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= @@ -842,8 +829,6 @@ github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -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-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= @@ -860,8 +845,6 @@ github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjU github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= 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= @@ -882,8 +865,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ 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.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= -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/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= @@ -1036,9 +1017,6 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -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/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= @@ -1119,7 +1097,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.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= @@ -1360,7 +1337,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1418,7 +1394,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f h1:w6wWR0H+nyVpbSAQbzVEIACVyr/h8l/BEkY6Sokc7Eg= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 4ae0552ae0..cc9260f79a 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -176,7 +176,7 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { +func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { txs := block.Block.Txs txsLength := len(txs) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 1397aeeb7f..d382441635 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -425,16 +425,18 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) baseFee := k.feeMarketKeeper.GetBaseFee(ctx) txsLength := len(req.Txs) - results := make([]*types.TxTraceResult, txsLength) + results := make([]*types.TxTraceResult, 0, txsLength) for i, tx := range req.Txs { + result := types.TxTraceResult{} ethTx := tx.AsTransaction() traceResult, err := k.traceTx(ctx, signer, uint64(i), ethCfg, ethTx, baseFee, req.TraceConfig, true) if err != nil { - results[i].Error = err.Error() + result.Error = err.Error() continue } - results[i].Result = traceResult + result.Result = traceResult + results = append(results, &result) } resultData, err := json.Marshal(results) diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index eb94046a9f..7ccdcb7ed2 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -596,8 +596,10 @@ func (suite *KeeperTestSuite) TestTraceTx() { ctx := sdk.WrapSDKContext(suite.ctx) // TODO deploy contract that triggers internal transactions var ( - txMsg *types.MsgEthereumTx - traceConfig *types.TraceConfig + txMsg *types.MsgEthereumTx + traceConfig *types.TraceConfig + txIndex uint64 + predecessors []*types.MsgEthereumTx ) testCases := []struct { @@ -610,16 +612,20 @@ func (suite *KeeperTestSuite) TestTraceTx() { { msg: "default trace", malleate: func() { + txIndex = 0 traceConfig = nil + predecessors = []*types.MsgEthereumTx{} }, 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() { + txIndex = 0 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; }}", } + predecessors = []*types.MsgEthereumTx{} }, expPass: true, traceResponse: []byte{0x5b, 0x5d}, @@ -627,7 +633,9 @@ func (suite *KeeperTestSuite) TestTraceTx() { { msg: "default trace with dynamicTxFee", malleate: func() { + txIndex = 0 traceConfig = nil + predecessors = []*types.MsgEthereumTx{} }, 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}, @@ -635,14 +643,35 @@ func (suite *KeeperTestSuite) TestTraceTx() { }, { msg: "javascript tracer with dynamicTxFee", malleate: func() { + txIndex = 0 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; }}", } + predecessors = []*types.MsgEthereumTx{} }, expPass: true, traceResponse: []byte{0x5b, 0x5d}, dynamicTxFee: true, }, + { + msg: "default tracer with predecessors", + malleate: func() { + txIndex = 1 + traceConfig = nil + + contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt()) + suite.Commit() + // Generate token transfer transaction + firstTx := suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + txMsg = suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + suite.Commit() + + predecessors = append(predecessors, firstTx) + }, + expPass: true, + traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x30, 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}, + dynamicTxFee: false, + }, } for _, tc := range testCases { @@ -658,9 +687,10 @@ func (suite *KeeperTestSuite) TestTraceTx() { 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 + Msg: txMsg, + TraceConfig: traceConfig, + TxIndex: txIndex, + Predecessors: predecessors, } res, err := suite.queryClient.TraceTx(ctx, &traceReq) @@ -675,3 +705,121 @@ func (suite *KeeperTestSuite) TestTraceTx() { suite.dynamicTxFee = false // reset flag } + +func (suite *KeeperTestSuite) TestTraceBlock() { + ctx := sdk.WrapSDKContext(suite.ctx) + var ( + txs []*types.MsgEthereumTx + traceConfig *types.TraceConfig + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + traceResponse []byte + dynamicTxFee bool + }{ + { + msg: "default trace", + malleate: func() { + traceConfig = nil + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 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, 0x7d, 0x5d}, + }, + { + msg: "filtered trace", + malleate: func() { + traceConfig = &types.TraceConfig{ + DisableStack: true, + DisableStorage: true, + EnableMemory: false, + } + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 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, 0x7d, 0x5d}, + }, { + msg: "javascript tracer", + malleate: func() { + traceConfig = &types.TraceConfig{ + Tracer: "{data: [], fault: function(log) {}, step: function(log) { if(log.op.toString() == \"CALL\") this.data.push(log.stack.peek(0)); }, result: function() { return this.data; }}", + } + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d}, + }, + { + msg: "default trace with dynamicTxFee and filtered return", + malleate: func() { + traceConfig = &types.TraceConfig{ + DisableStack: true, + DisableStorage: true, + EnableMemory: false, + } + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 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, 0x7d, 0x5d}, + dynamicTxFee: true, + }, { + msg: "javascript tracer with dynamicTxFee", + malleate: func() { + traceConfig = &types.TraceConfig{ + Tracer: "{data: [], fault: function(log) {}, step: function(log) { if(log.op.toString() == \"CALL\") this.data.push(log.stack.peek(0)); }, result: function() { return this.data; }}", + } + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d}, + dynamicTxFee: true, + }, + { + msg: "tracer with multiple transactions", + malleate: func() { + traceConfig = nil + contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt()) + suite.Commit() + // create multiple transactions in the same block + firstTx := suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + secondTx := suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + suite.Commit() + // overwrite txs to include only the ones on new block + txs = append([]*types.MsgEthereumTx{}, firstTx, secondTx) + }, + expPass: true, + traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 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, 0x7d, 0x2c, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x30, 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, 0x7d, 0x5d}, + dynamicTxFee: false, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + txs = []*types.MsgEthereumTx{} + suite.dynamicTxFee = tc.dynamicTxFee + suite.SetupTest() + // Deploy contract + contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdk.NewIntWithDecimal(1000, 18).BigInt()) + suite.Commit() + // Generate token transfer transaction + txMsg := suite.TransferERC20Token(suite.T(), contractAddr, suite.address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdk.NewIntWithDecimal(1, 18).BigInt()) + suite.Commit() + + txs = append(txs, txMsg) + + tc.malleate() + traceReq := types.QueryTraceBlockRequest{ + Txs: txs, + TraceConfig: traceConfig, + } + res, err := suite.queryClient.TraceBlock(ctx, &traceReq) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().Equal(tc.traceResponse, res.Data) + } else { + suite.Require().Error(err) + } + }) + } + + suite.dynamicTxFee = false // reset flag +} From 74b491a8014b71a09b2d22e018f19f7d87d59d05 Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Tue, 9 Nov 2021 11:15:44 -0500 Subject: [PATCH 24/29] 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 1397aeeb7f..88eba0348c 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -379,8 +379,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ k.SetTxHashTransient(ethTx.Hash()) k.SetTxIndexTransient(uint64(i)) - _, err = k.ApplyMessage(msg, types.NewNoOpTracer(), true) - if err != nil { + if _, err := k.ApplyMessage(msg, types.NewNoOpTracer(), true); err != nil { continue } } From 2c9c9f20634cbb41d33aa837b131ce657e2d6185 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Tue, 9 Nov 2021 11:21:55 -0500 Subject: [PATCH 25/29] use bytes2Hex --- rpc/ethereum/namespaces/debug/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index cc9260f79a..2c3e402440 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -128,7 +128,7 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( Predecessors: predecessors, BlockNumber: blk.Block.Height, BlockTime: blk.Block.Time, - BlockHash: blk.BlockID.Hash.String(), + BlockHash: common.Bytes2Hex(blk.BlockID.Hash), } if config != nil { @@ -221,7 +221,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf TraceConfig: config, BlockNumber: block.Block.Height, BlockTime: block.Block.Time, - BlockHash: block.BlockID.Hash.String(), + BlockHash: common.Bytes2Hex(block.BlockID.Hash), } res, err := a.queryClient.TraceBlock(ctxWithHeight, traceBlockRequest) From 14203f835e1926a11964dee11029fe3bb2bf95bc Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Tue, 9 Nov 2021 11:25:31 -0500 Subject: [PATCH 26/29] fix error message --- 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 10eae1c004..8a3d885205 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -440,7 +440,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) resultData, err := json.Marshal(results) if err != nil { - return nil, err + return nil, status.Error(codes.Internal, err.Error()) } return &types.QueryTraceBlockResponse{ From 1ea597053aa9ab3a3a88a79827dde71d80e718d8 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Tue, 9 Nov 2021 11:27:29 -0500 Subject: [PATCH 27/29] add comment --- x/evm/keeper/grpc_query.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 8a3d885205..4f34d85b3e 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -387,6 +387,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ tx := req.Msg.AsTransaction() result, err := k.traceTx(ctx, signer, req.TxIndex, ethCfg, tx, baseFee, req.TraceConfig, false) if err != nil { + // error will be returned with detail status from traceTx return nil, err } From 417624a5d8fef45df06679afd62d9e63503b22ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Kunze=20K=C3=BCllmer?= <31522760+fedekunze@users.noreply.github.com> Date: Tue, 9 Nov 2021 18:20:59 +0100 Subject: [PATCH 28/29] Apply suggestions from code review --- rpc/ethereum/namespaces/debug/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 2c3e402440..1448810ec1 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -89,7 +89,7 @@ func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) ( // check tx index is not out of bound if uint32(len(blk.Block.Txs)) < transaction.Index { - a.logger.Debug("tx index", transaction.Index, "tx hash", hash, "out of bound in block", blk.Block.Height) + a.logger.Debug("tx index out of bounds", "index", transaction.Index, "hash", hash.String(), "height", blk.Block.Height) return nil, fmt.Errorf("transaction not included in block %v", blk.Block.Height) } @@ -192,7 +192,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf for i, tx := range txs { decodedTx, err := txDecoder(tx) if err != nil { - a.logger.Error("failed to decode transaction", "hash", txs[i].Hash(), "error", err.Error()) + a.logger.Error("failed to decode transaction", "hash", txs[i].Hash().String(), "error", err.Error()) continue } From 5cd28c31dfb191642935d64107e719045cd9a51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Kunze=20K=C3=BCllmer?= <31522760+fedekunze@users.noreply.github.com> Date: Tue, 9 Nov 2021 19:34:26 +0100 Subject: [PATCH 29/29] Update rpc/ethereum/namespaces/debug/api.go --- rpc/ethereum/namespaces/debug/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/ethereum/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go index 1448810ec1..49933ddbb9 100644 --- a/rpc/ethereum/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -192,7 +192,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf for i, tx := range txs { decodedTx, err := txDecoder(tx) if err != nil { - a.logger.Error("failed to decode transaction", "hash", txs[i].Hash().String(), "error", err.Error()) + a.logger.Error("failed to decode transaction", "hash", txs[i].Hash(), "error", err.Error()) continue }