refactor: eth_call and eth_estimateGas don't need to pass base fee as field (#671)

Solution:
- load fee directly from state

changelog
This commit is contained in:
yihuang 2021-10-21 23:29:19 +08:00 committed by GitHub
parent 8bf8d34376
commit ac75a9a4a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 1764 additions and 298 deletions

View File

@ -59,7 +59,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements ### Improvements
(rpc) [tharsis#679](https://github.com/tharsis/ethermint/pull/679) Fix file close handle. - (rpc) [tharsis#679](https://github.com/tharsis/ethermint/pull/679) Fix file close handle.
- (rpc) [tharsis#671](https://github.com/tharsis/ethermint/pull/671) Don't pass base fee externally for `EthCall`/`EthEstimateGas` apis.
## [v0.7.0] - 2021-10-07 ## [v0.7.0] - 2021-10-07

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -547,7 +547,6 @@ EthCallRequest defines EthCall request
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| `args` | [bytes](#bytes) | | same json format as the json rpc api. | | `args` | [bytes](#bytes) | | same json format as the json rpc api. |
| `gas_cap` | [uint64](#uint64) | | the default gas cap to be used | | `gas_cap` | [uint64](#uint64) | | the default gas cap to be used |
| `base_fee` | [string](#string) | | header base fee used to generate the transaction |

View File

@ -212,9 +212,6 @@ message EthCallRequest {
bytes args = 1; bytes args = 1;
// the default gas cap to be used // the default gas cap to be used
uint64 gas_cap = 2; uint64 gas_cap = 2;
// header base fee used to generate the transaction
string base_fee = 3
[ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ];
} }
// EstimateGasResponse defines EstimateGas response // EstimateGasResponse defines EstimateGas response

View File

@ -712,41 +712,15 @@ func (e *EVMBackend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional
return 0, err return 0, err
} }
height := blockNr.Int64()
currentBlockNumber, _ := e.BlockNumber()
switch blockNr {
case types.EthLatestBlockNumber:
if currentBlockNumber > 0 {
height = int64(currentBlockNumber)
}
case types.EthPendingBlockNumber:
if currentBlockNumber > 0 {
height = int64(currentBlockNumber)
}
case types.EthEarliestBlockNumber:
height = 1
}
baseFee, err := e.BaseFee(height)
if err != nil {
return 0, err
}
var bf *sdk.Int
if baseFee != nil {
aux := sdk.NewIntFromBigInt(baseFee)
bf = &aux
}
req := evmtypes.EthCallRequest{ req := evmtypes.EthCallRequest{
Args: bz, Args: bz,
GasCap: e.RPCGasCap(), GasCap: e.RPCGasCap(),
BaseFee: bf,
} }
// From ContextWithHeight: if the provided height is 0, // From ContextWithHeight: if the provided height is 0,
// it will return an empty context and the gRPC query will use // it will return an empty context and the gRPC query will use
// the latest block height for querying. // the latest block height for querying.
res, err := e.queryClient.EstimateGas(types.ContextWithHeight(height), &req) res, err := e.queryClient.EstimateGas(types.ContextWithHeight(blockNr.Int64()), &req)
if err != nil { if err != nil {
return 0, err return 0, err
} }

View File

@ -622,35 +622,9 @@ func (e *PublicAPI) doCall(
return nil, err return nil, err
} }
currentBlockNumber, _ := e.BlockNumber()
height := blockNr.Int64()
switch blockNr {
case rpctypes.EthLatestBlockNumber:
if currentBlockNumber > 0 {
height = int64(currentBlockNumber)
}
case rpctypes.EthPendingBlockNumber:
if currentBlockNumber > 0 {
height = int64(currentBlockNumber)
}
case rpctypes.EthEarliestBlockNumber:
height = 1
}
baseFee, err := e.backend.BaseFee(height)
if err != nil {
return nil, err
}
var bf *sdk.Int
if baseFee != nil {
aux := sdk.NewIntFromBigInt(baseFee)
bf = &aux
}
req := evmtypes.EthCallRequest{ req := evmtypes.EthCallRequest{
Args: bz, Args: bz,
GasCap: e.backend.RPCGasCap(), GasCap: e.backend.RPCGasCap(),
BaseFee: bf,
} }
// From ContextWithHeight: if the provided height is 0, // From ContextWithHeight: if the provided height is 0,

View File

@ -221,31 +221,24 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms
return nil, status.Error(codes.InvalidArgument, err.Error()) return nil, status.Error(codes.InvalidArgument, err.Error())
} }
if req.BaseFee != nil && req.BaseFee.IsNegative() { params := k.GetParams(ctx)
return nil, status.Errorf(codes.InvalidArgument, "base fee cannot be negative %s", req.BaseFee) ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID)
var baseFee *big.Int
if types.IsLondon(ethCfg, ctx.BlockHeight()) {
baseFee = k.feeMarketKeeper.GetBaseFee(ctx)
} }
msg, err := args.ToMessage(req.GasCap, req.GetBaseFee()) msg, err := args.ToMessage(req.GasCap, baseFee)
if err != nil { if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error()) return nil, status.Error(codes.InvalidArgument, err.Error())
} }
params := k.GetParams(ctx)
feemktParams := k.feeMarketKeeper.GetParams(ctx)
ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID)
coinbase, err := k.GetCoinbaseAddress(ctx) coinbase, err := k.GetCoinbaseAddress(ctx)
if err != nil { if err != nil {
return nil, status.Error(codes.Internal, err.Error()) return nil, status.Error(codes.Internal, err.Error())
} }
var baseFee *big.Int
// ignore base fee if not enabled by fee market params
if !feemktParams.NoBaseFee {
baseFee = k.feeMarketKeeper.GetBaseFee(ctx)
}
tracer := types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight(), k.debug) tracer := types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight(), k.debug)
evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer) evm := k.NewEVM(msg, ethCfg, params, coinbase, baseFee, tracer)
@ -273,10 +266,6 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
return nil, status.Error(codes.InvalidArgument, "gas cap cannot be lower than 21,000") return nil, status.Error(codes.InvalidArgument, "gas cap cannot be lower than 21,000")
} }
if req.BaseFee != nil && req.BaseFee.IsNegative() {
return nil, status.Errorf(codes.InvalidArgument, "base fee cannot be negative %s", req.BaseFee)
}
var args types.TransactionArgs var args types.TransactionArgs
err := json.Unmarshal(req.Args, &args) err := json.Unmarshal(req.Args, &args)
if err != nil { if err != nil {
@ -319,7 +308,10 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
return nil, status.Error(codes.Internal, err.Error()) return nil, status.Error(codes.Internal, err.Error())
} }
baseFee := req.GetBaseFee() var baseFee *big.Int
if types.IsLondon(ethCfg, ctx.BlockHeight()) {
baseFee = k.feeMarketKeeper.GetBaseFee(ctx)
}
// Create a helper to check if a gas allowance results in an executable transaction // Create a helper to check if a gas allowance results in an executable transaction
executable := func(gas uint64) (vmerror bool, rsp *types.MsgEthereumTxResponse, err error) { executable := func(gas uint64) (vmerror bool, rsp *types.MsgEthereumTxResponse, err error) {

View File

@ -1,19 +1,9 @@
package types package types
import ( import (
"math/big"
codectypes "github.com/cosmos/cosmos-sdk/codec/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types"
) )
func (cr EthCallRequest) GetBaseFee() *big.Int {
if cr.BaseFee == nil {
return nil
}
return cr.BaseFee.BigInt()
}
// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces // UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces
func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
return m.Msg.UnpackInterfaces(unpacker) return m.Msg.UnpackInterfaces(unpacker)

201
x/evm/types/query.pb.go generated
View File

@ -6,7 +6,6 @@ package types
import ( import (
context "context" context "context"
fmt "fmt" fmt "fmt"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
query "github.com/cosmos/cosmos-sdk/types/query" query "github.com/cosmos/cosmos-sdk/types/query"
_ "github.com/gogo/protobuf/gogoproto" _ "github.com/gogo/protobuf/gogoproto"
grpc1 "github.com/gogo/protobuf/grpc" grpc1 "github.com/gogo/protobuf/grpc"
@ -788,8 +787,6 @@ type EthCallRequest struct {
Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"`
// the default gas cap to be used // the default gas cap to be used
GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"` GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"`
// header base fee used to generate the transaction
BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"`
} }
func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } func (m *EthCallRequest) Reset() { *m = EthCallRequest{} }
@ -1021,80 +1018,78 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) }
var fileDescriptor_e15a877459347994 = []byte{ var fileDescriptor_e15a877459347994 = []byte{
// 1167 bytes of a gzipped FileDescriptorProto // 1123 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0x1b, 0x55, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0x1b, 0x45,
0x17, 0xf6, 0x24, 0x4e, 0x9c, 0x1c, 0x27, 0x7d, 0xf3, 0xde, 0x06, 0x91, 0x0c, 0xa9, 0x93, 0x4e, 0x18, 0xc7, 0xbd, 0x89, 0x13, 0xa7, 0x8f, 0x93, 0x12, 0xa6, 0x41, 0x24, 0x4b, 0xea, 0xa4, 0x9b,
0x9a, 0xef, 0x30, 0x83, 0x0d, 0xaa, 0x44, 0x37, 0x90, 0x44, 0x69, 0xa9, 0xda, 0xa2, 0x62, 0x22, 0xe6, 0x3d, 0xda, 0xc5, 0x06, 0x55, 0xa2, 0x12, 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 0xe0,
0x5c, 0x01, 0xf7, 0x15, 0x64, 0x23, 0x3a, 0x7b, 0x01, 0xf4, 0x21, 0x39, 0x0f, 0x11, 0x6a, 0x6b, 0xd9, 0x59, 0xc1, 0x78, 0x7e, 0x56, 0x30, 0xfe, 0x3a, 0x2b, 0x18, 0x3f, 0x9d, 0x17, 0x32, 0xcf,
0x5d, 0x62, 0xaf, 0xa0, 0xdc, 0x10, 0x6c, 0x6d, 0x5e, 0xf2, 0x30, 0x43, 0x5f, 0x42, 0x46, 0x2b, 0xcf, 0x0b, 0x99, 0x3f, 0xce, 0x0b, 0x99, 0x2f, 0xb7, 0xbc, 0x06, 0xaf, 0x77, 0xaa, 0xb6, 0x4b,
0x62, 0x62, 0xef, 0xf5, 0x0b, 0x7b, 0x62, 0xef, 0x0d, 0x08, 0xeb, 0xab, 0xb2, 0x57, 0x52, 0xce, 0x5b, 0x0e, 0xaf, 0xe3, 0x80, 0x35, 0x58, 0x24, 0x4f, 0x4f, 0x66, 0xe2, 0x27, 0x6d, 0xc2, 0xaa,
0x3b, 0xfb, 0xfb, 0xcf, 0xcf, 0x72, 0xc6, 0x8b, 0xb3, 0x9c, 0xf1, 0xc7, 0x59, 0xce, 0xf8, 0xe1, 0xd3, 0xf2, 0x57, 0xff, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x55, 0x07, 0x68, 0x0c, 0xb3,
0x3c, 0x97, 0x7a, 0x71, 0x9e, 0x4b, 0xfd, 0x76, 0x9e, 0x4b, 0x7d, 0xbe, 0x19, 0x19, 0x58, 0xbc, 0x0c, 0x00, 0x00,
0x8a, 0x03, 0x56, 0x63, 0x91, 0x38, 0x1d, 0x19, 0x49, 0x8e, 0xad, 0xf2, 0xa4, 0xfc, 0xcb, 0xf0,
0xee, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0x5e, 0xad, 0xda, 0xfb, 0x0c, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -2091,18 +2086,6 @@ func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.BaseFee != nil {
{
size := m.BaseFee.Size()
i -= size
if _, err := m.BaseFee.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.GasCap != 0 { if m.GasCap != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.GasCap)) i = encodeVarintQuery(dAtA, i, uint64(m.GasCap))
i-- i--
@ -2487,10 +2470,6 @@ func (m *EthCallRequest) Size() (n int) {
if m.GasCap != 0 { if m.GasCap != 0 {
n += 1 + sovQuery(uint64(m.GasCap)) n += 1 + sovQuery(uint64(m.GasCap))
} }
if m.BaseFee != nil {
l = m.BaseFee.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n return n
} }
@ -4143,42 +4122,6 @@ func (m *EthCallRequest) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", 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
}
var v github_com_cosmos_cosmos_sdk_types.Int
m.BaseFee = &v
if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:]) skippy, err := skipQuery(dAtA[iNdEx:])

View File

@ -20,6 +20,7 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog" "google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )
@ -30,6 +31,7 @@ var _ status.Status
var _ = runtime.String var _ = runtime.String
var _ = utilities.NewDoubleArray var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage 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) { 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 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". // RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly. // UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // 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 { 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) { mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -519,6 +523,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -539,6 +546,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -559,6 +569,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -579,6 +592,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -599,6 +615,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -619,6 +638,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -639,6 +661,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -659,6 +684,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -679,6 +707,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -699,6 +730,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)

View File

@ -20,6 +20,7 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog" "google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )
@ -30,6 +31,7 @@ var _ status.Status
var _ = runtime.String var _ = runtime.String
var _ = utilities.NewDoubleArray var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage 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) { 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 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". // RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly. // UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // 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 { 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) { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -101,6 +105,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -121,6 +128,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 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) { mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil { if err != nil {
@ -141,6 +151,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
return return
} }
resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams) 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) ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)