From 7233abb06029e9a94486e41d852fc5169e6c5390 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Fri, 5 Nov 2021 12:22:21 +0800 Subject: [PATCH] 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, 0xb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, 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, 0x15, 0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2, 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, } // 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)