From 62c2ba100d878c33cb5e8a7fdbec21f9f6639bf1 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 26 Mar 2020 20:06:42 -0400 Subject: [PATCH 01/41] Initial work on grpc query server example for bank --- baseapp/queryrouter.go | 34 ++ client/context/query.go | 42 ++ scripts/protocgen.sh | 2 +- types/context.go | 8 + types/errors/errors.go | 6 + types/module/module.go | 9 + types/queryable.go | 4 + types/router.go | 6 +- x/bank/client/cli/query.go | 52 +-- x/bank/keeper/querier.go | 57 +-- x/bank/module.go | 8 +- x/bank/types/querier.go | 11 - x/bank/types/types.pb.go | 905 +++++++++++++++++++++++++++++++++---- x/bank/types/types.proto | 31 ++ 14 files changed, 985 insertions(+), 190 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index fbefda4a8dd8..c01329060cd2 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -2,6 +2,10 @@ package baseapp import ( "fmt" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/gogo/protobuf/proto" + abci "github.com/tendermint/tendermint/abci/types" + "google.golang.org/grpc" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -37,3 +41,33 @@ func (qrt *QueryRouter) AddRoute(path string, q sdk.Querier) sdk.QueryRouter { func (qrt *QueryRouter) Route(path string) sdk.Querier { return qrt.routes[path] } + +func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { + // adds a top-level querier based on the GRPC service name + qrt.AddRoute(sd.ServiceName, + func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { + path0 := path[0] + for _, md := range sd.Methods { + // checks each GRPC service method to see if it matches the path + if md.MethodName == path0 { + res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { + // unmarshal a protobuf message + protoMsg, ok := i.(proto.Message) + if !ok { + return sdkerrors.Wrapf(sdkerrors.ErrProtoUnmarshal, "can't proto unmarshal: %+v", i) + } + return proto.Unmarshal(req.Data, protoMsg) + }, nil) + if err != nil { + return nil, err + } + protoMsg, ok := res.(proto.Message) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrProtoMarshal, "can't proto marshal: %+v", res) + } + return proto.Marshal(protoMsg) + } + } + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) + }) +} diff --git a/client/context/query.go b/client/context/query.go index 4d335c85d512..34bc52872399 100644 --- a/client/context/query.go +++ b/client/context/query.go @@ -1,7 +1,10 @@ package context import ( + "context" "fmt" + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc" "strings" "github.com/pkg/errors" @@ -230,3 +233,42 @@ func parseQueryStorePath(path string) (storeName string, err error) { return paths[1], nil } + +func (ctx CLIContext) QueryConn() GRPCClientConn { + return cliQueryConn{ctx} +} + +type GRPCClientConn interface { + Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error + NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) +} + +type cliQueryConn struct { + ctx CLIContext +} + +var _ GRPCClientConn = cliQueryConn{} + +func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { + req, ok := args.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %+v", args) + } + reqBz, err := proto.Marshal(req) + if err != nil { + return err + } + resBz, _, err := c.ctx.QueryWithData(fmt.Sprintf("custom/%s", method), reqBz) + if err != nil { + return err + } + res, ok := reply.(proto.Message) + if !ok { + return fmt.Errorf("can't proto unmarshal %+v", reply) + } + return proto.Unmarshal(resBz, res) +} + +func (c cliQueryConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, fmt.Errorf("streaming rpc not supported") +} diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 0818824a41b8..886aa3f30a57 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -6,6 +6,6 @@ proto_dirs=$(find . -path ./third_party -prune -o -name '*.proto' -print0 | xarg for dir in $proto_dirs; do protoc \ -I. \ - --gocosmos_out=plugins=interfacetype,paths=source_relative:. \ + --gocosmos_out=plugins=interfacetype+grpc,paths=source_relative:. \ $(find "${dir}" -name '*.proto') done diff --git a/types/context.go b/types/context.go index ed4b693c9770..9d2bffd68b74 100644 --- a/types/context.go +++ b/types/context.go @@ -225,3 +225,11 @@ func (c Context) CacheContext() (cc Context, writeCache func()) { cc = c.WithMultiStore(cms).WithEventManager(NewEventManager()) return cc, cms.Write } + +func UnwrapSDKContext(ctx context.Context) Context { + return ctx.Value(sdkContextKey).(Context) +} + +func WrapSDKContext(ctx Context) context.Context { + return context.WithValue(ctx.ctx, sdkContextKey, ctx) +} diff --git a/types/errors/errors.go b/types/errors/errors.go index f881a2827b13..633165e31f5b 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -88,6 +88,12 @@ var ( // ErrWrongPassword defines an error when the key password is invalid. ErrWrongPassword = Register(RootCodespace, 23, "invalid account password") + // ErrJSONMarshal defines an ABCI typed protobuf marshalling error + ErrProtoMarshal = Register(RootCodespace, 25, "failed to marshal proto bytes") + + // ErrProtoUnmarshal defines an ABCI typed protobuf unmarshalling error + ErrProtoUnmarshal = Register(RootCodespace, 25, "failed to unmarshal proto bytes") + // ErrPanic is only set when we recover from a panic, so we know to // redact potentially sensitive system info ErrPanic = Register(UndefinedCodespace, 111222, "panic") diff --git a/types/module/module.go b/types/module/module.go index 4a3447230878..fbc4570f765e 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -30,6 +30,7 @@ package module import ( "encoding/json" + "google.golang.org/grpc" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -141,14 +142,21 @@ type AppModule interface { // routes Route() string NewHandler() sdk.Handler + // TODO: deprecate in favor of RegisterQueryServer QuerierRoute() string + // TODO: deprecate in favor of RegisterQueryServer NewQuerierHandler() sdk.Querier + RegisterQueryServer(GRPCServer) // ABCI BeginBlock(sdk.Context, abci.RequestBeginBlock) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate } +type GRPCServer interface { + RegisterService(sd *grpc.ServiceDesc, ss interface{}) +} + //___________________________ // GenesisOnlyAppModule is an AppModule that only has import/export functionality @@ -253,6 +261,7 @@ func (m *Manager) RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter) if module.QuerierRoute() != "" { queryRouter.AddRoute(module.QuerierRoute(), module.NewQuerierHandler()) } + module.RegisterQueryServer(queryRouter) } } diff --git a/types/queryable.go b/types/queryable.go index f89965906af8..24dc501b2862 100644 --- a/types/queryable.go +++ b/types/queryable.go @@ -7,3 +7,7 @@ import ( // Querier defines a function type that a module querier must implement to handle // custom client queries. type Querier = func(ctx Context, path []string, req abci.RequestQuery) ([]byte, error) + +type sdkContextKeyType string + +const sdkContextKey sdkContextKeyType = "sdk-context" diff --git a/types/router.go b/types/router.go index 12d0455f805d..b2c6ccfc0dff 100644 --- a/types/router.go +++ b/types/router.go @@ -1,6 +1,9 @@ package types -import "regexp" +import ( + "google.golang.org/grpc" + "regexp" +) var ( // IsAlphaNumeric defines a regular expression for matching against alpha-numeric @@ -34,4 +37,5 @@ type Router interface { type QueryRouter interface { AddRoute(r string, h Querier) QueryRouter Route(path string) Querier + RegisterService(sd *grpc.ServiceDesc, ss interface{}) } diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index ba81f44dfa8d..2cd6ed1892d2 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -1,6 +1,7 @@ package cli import ( + gocontext "context" "fmt" "github.com/spf13/cobra" @@ -19,7 +20,7 @@ const ( ) // NewQueryCmd returns a root CLI command handler for all x/bank query commands. -func NewQueryCmd(m codec.Marshaler) *cobra.Command { +func NewQueryCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: "Querying commands for the bank module", @@ -28,67 +29,42 @@ func NewQueryCmd(m codec.Marshaler) *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(NewBalancesCmd(m)) + cmd.AddCommand(NewBalancesCmd()) return cmd } // NewBalancesCmd returns a CLI command handler for querying account balance(s). -func NewBalancesCmd(m codec.Marshaler) *cobra.Command { +func NewBalancesCmd() *cobra.Command { cmd := &cobra.Command{ Use: "balances [address]", Short: "Query for account balance(s) by address", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - cliCtx := context.NewCLIContext().WithMarshaler(m) + cliCtx := context.NewCLIContext() addr, err := sdk.AccAddressFromBech32(args[0]) if err != nil { return err } - var ( - params interface{} - result interface{} - route string - ) - + queryClient := types.NewQueryClient(cliCtx.QueryConn()) denom := viper.GetString(flagDenom) if denom == "" { - params = types.NewQueryAllBalancesParams(addr) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryAllBalances) - } else { - params = types.NewQueryBalanceParams(addr, denom) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryBalance) - } - - bz, err := m.MarshalJSON(params) - if err != nil { - return fmt.Errorf("failed to marshal params: %w", err) - } - - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - return err - } - - if denom == "" { - var balances sdk.Coins - if err := m.UnmarshalJSON(res, &balances); err != nil { + params := &types.QueryAllBalancesParams{addr} + result, err := queryClient.QueryAllBalances(gocontext.Background(), params) + if err != nil { return err } - - result = balances + return cliCtx.Println(result.Balances) } else { - var balance sdk.Coin - if err := m.UnmarshalJSON(res, &balance); err != nil { + params := &types.QueryBalanceParams{addr, denom} + result, err := queryClient.QueryBalance(gocontext.Background(), params) + if err != nil { return err } - - result = balance + return cliCtx.Println(result) } - - return cliCtx.Println(result) }, } diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index be17b371629a..de6dd57558d8 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -1,60 +1,23 @@ package keeper import ( - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/codec" + "context" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/bank/types" ) -// NewQuerier returns a new sdk.Keeper instance. -func NewQuerier(k Keeper) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - switch path[0] { - case types.QueryBalance: - return queryBalance(ctx, req, k) - - case types.QueryAllBalances: - return queryAllBalance(ctx, req, k) - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - } +type Querier struct { + Keeper } -func queryBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { - var params types.QueryBalanceParams - - if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - balance := k.GetBalance(ctx, params.Address, params.Denom) +var _ types.QueryServer = Querier{} - bz, err := codec.MarshalJSONIndent(types.ModuleCdc, balance) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return bz, nil +func (q Querier) QueryBalance(ctx context.Context, params *types.QueryBalanceParams) (*sdk.Coin, error) { + balance := q.GetBalance(sdk.UnwrapSDKContext(ctx), params.Address, params.Denom) + return &balance, nil } -func queryAllBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { - var params types.QueryAllBalancesParams - - if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - balances := k.GetAllBalances(ctx, params.Address) - - bz, err := codec.MarshalJSONIndent(types.ModuleCdc, balances) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return bz, nil +func (q Querier) QueryAllBalances(ctx context.Context, params *types.QueryAllBalancesParams) (*types.QueryAllBalancesResponse, error) { + balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), params.Address) + return &types.QueryAllBalancesResponse{balances}, nil } diff --git a/x/bank/module.go b/x/bank/module.go index 9be8dab93913..025f545facba 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -77,6 +77,10 @@ type AppModule struct { accountKeeper types.AccountKeeper } +func (am AppModule) RegisterQueryServer(server module.GRPCServer) { + types.RegisterQueryServer(server, keeper.Querier{am.keeper}) +} + // NewAppModule creates a new AppModule object func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper) AppModule { return AppModule{ @@ -101,11 +105,11 @@ func (AppModule) Route() string { return RouterKey } func (am AppModule) NewHandler() sdk.Handler { return NewHandler(am.keeper) } // QuerierRoute returns the bank module's querier route name. -func (AppModule) QuerierRoute() string { return RouterKey } +func (AppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns the bank module sdk.Querier. func (am AppModule) NewQuerierHandler() sdk.Querier { - return keeper.NewQuerier(am.keeper) + return nil } // InitGenesis performs genesis initialization for the bank module. It returns diff --git a/x/bank/types/querier.go b/x/bank/types/querier.go index 7e0ef43fe7b2..f3b79bdd1599 100644 --- a/x/bank/types/querier.go +++ b/x/bank/types/querier.go @@ -10,22 +10,11 @@ const ( QueryAllBalances = "all_balances" ) -// QueryBalanceParams defines the params for querying an account balance. -type QueryBalanceParams struct { - Address sdk.AccAddress - Denom string -} - // NewQueryBalanceParams creates a new instance of QueryBalanceParams. func NewQueryBalanceParams(addr sdk.AccAddress, denom string) QueryBalanceParams { return QueryBalanceParams{Address: addr, Denom: denom} } -// QueryAllBalancesParams defines the params for querying all account balances -type QueryAllBalancesParams struct { - Address sdk.AccAddress -} - // NewQueryAllBalancesParams creates a new instance of QueryAllBalancesParams. func NewQueryAllBalancesParams(addr sdk.AccAddress) QueryAllBalancesParams { return QueryAllBalancesParams{Address: addr} diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index b5a5c128830d..5d1be82527ce 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -5,11 +5,15 @@ package types import ( bytes "bytes" + context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" @@ -246,43 +250,196 @@ func (m *MsgMultiSend) GetOutputs() []Output { return nil } +// QueryBalanceParams defines the params for querying an account balance. +type QueryBalanceParams struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryBalanceParams) Reset() { *m = QueryBalanceParams{} } +func (m *QueryBalanceParams) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceParams) ProtoMessage() {} +func (*QueryBalanceParams) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{4} +} +func (m *QueryBalanceParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceParams.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 *QueryBalanceParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceParams.Merge(m, src) +} +func (m *QueryBalanceParams) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceParams proto.InternalMessageInfo + +func (m *QueryBalanceParams) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *QueryBalanceParams) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryAllBalancesParams defines the params for querying all account balances +type QueryAllBalancesParams struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` +} + +func (m *QueryAllBalancesParams) Reset() { *m = QueryAllBalancesParams{} } +func (m *QueryAllBalancesParams) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesParams) ProtoMessage() {} +func (*QueryAllBalancesParams) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{5} +} +func (m *QueryAllBalancesParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesParams.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 *QueryAllBalancesParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesParams.Merge(m, src) +} +func (m *QueryAllBalancesParams) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesParams proto.InternalMessageInfo + +func (m *QueryAllBalancesParams) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +type QueryAllBalancesResponse struct { + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` +} + +func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } +func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesResponse) ProtoMessage() {} +func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{6} +} +func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) +} +func (m *QueryAllBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo + +func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + func init() { proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") + proto.RegisterType((*QueryBalanceParams)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceParams") + proto.RegisterType((*QueryAllBalancesParams)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesParams") + proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") } func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xa8, 0xd0, 0x4f, 0x4a, - 0xcc, 0xcb, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, - 0x42, 0x22, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, 0x20, - 0x45, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, 0x45, 0x25, - 0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x20, 0x86, - 0x81, 0x4a, 0x87, 0x98, 0xb8, 0xd8, 0x7d, 0x8b, 0xd3, 0x83, 0x53, 0xf3, 0x52, 0x84, 0xb2, 0xb9, - 0x78, 0xd2, 0x8a, 0xf2, 0x73, 0xe3, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, - 0x18, 0x35, 0x78, 0x9c, 0x3c, 0x3e, 0xdd, 0x93, 0x17, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, - 0x96, 0x55, 0xfa, 0x75, 0x4f, 0x5e, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, - 0x57, 0x1f, 0xe2, 0x30, 0x28, 0xa5, 0x5b, 0x9c, 0x02, 0x75, 0xbd, 0x9e, 0x63, 0x72, 0xb2, 0x23, - 0x44, 0x47, 0x10, 0x37, 0x48, 0x3f, 0x94, 0x23, 0x94, 0xca, 0xc5, 0x55, 0x92, 0x0f, 0xb7, 0x8a, - 0x09, 0x6c, 0x95, 0xdb, 0xa7, 0x7b, 0xf2, 0x82, 0x10, 0xab, 0x10, 0x72, 0x64, 0x58, 0xc4, 0x59, - 0x92, 0x0f, 0xb3, 0x26, 0x96, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x59, 0x81, - 0x59, 0x83, 0xdb, 0x48, 0x58, 0x0f, 0x29, 0x04, 0xcb, 0x0c, 0xf5, 0x9c, 0xf3, 0x33, 0xf3, 0x9c, - 0x0c, 0x4e, 0xdc, 0x93, 0x67, 0x58, 0x75, 0x5f, 0x5e, 0x83, 0x08, 0x6b, 0x40, 0x1a, 0x8a, 0x83, - 0xa0, 0x86, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xa8, 0xb4, 0x9d, 0x91, 0x8b, 0xd5, 0x33, 0xaf, - 0xa0, 0xb4, 0x44, 0xc8, 0x9b, 0x8b, 0x1d, 0x35, 0xf4, 0x0c, 0x49, 0x77, 0x3d, 0xcc, 0x04, 0xa1, - 0x68, 0x2e, 0xd6, 0x64, 0x90, 0x6d, 0x12, 0x4c, 0xd4, 0x74, 0x3a, 0xc4, 0x4c, 0xa8, 0xcb, 0x77, - 0x30, 0x72, 0xb1, 0xf9, 0x97, 0x96, 0x0c, 0x45, 0xa7, 0xf7, 0x32, 0x72, 0xf1, 0xf8, 0x16, 0xa7, - 0xfb, 0x96, 0xe6, 0x94, 0x64, 0x82, 0x93, 0xaf, 0x25, 0x17, 0x5b, 0x26, 0x28, 0x12, 0x40, 0xee, - 0x07, 0x59, 0x2a, 0xad, 0x87, 0x2d, 0xb3, 0xe8, 0x81, 0x23, 0xca, 0x89, 0x05, 0x64, 0x79, 0x10, - 0x54, 0x83, 0x90, 0x0d, 0x17, 0x7b, 0x3e, 0x38, 0x14, 0x60, 0x0e, 0x96, 0xc1, 0xae, 0x17, 0x12, - 0x54, 0x50, 0xcd, 0x30, 0x2d, 0x10, 0xf7, 0x38, 0x39, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, - 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, - 0xb1, 0x1c, 0x43, 0x94, 0x26, 0x5e, 0x0f, 0x22, 0xe7, 0xf5, 0x24, 0x36, 0x70, 0xae, 0x34, 0x06, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x57, 0x42, 0x17, 0x1f, 0x02, 0x04, 0x00, 0x00, + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0x86, 0x73, 0x69, 0x93, 0xd0, 0xaf, 0x19, 0xe8, 0xb5, 0x42, 0x51, 0x40, 0x76, 0xe5, 0x01, + 0x05, 0x89, 0x5e, 0x48, 0x99, 0xa8, 0x58, 0x92, 0x4a, 0x08, 0x84, 0x22, 0xc0, 0x6c, 0x20, 0x14, + 0x5d, 0xec, 0xc3, 0xb5, 0x62, 0xfb, 0x2c, 0xdf, 0xb9, 0x34, 0x03, 0x3f, 0x01, 0x89, 0x9f, 0xc0, + 0xcc, 0x1f, 0x80, 0x99, 0x29, 0x63, 0x47, 0xa6, 0x80, 0x92, 0x85, 0xb9, 0x23, 0x13, 0xb2, 0x7d, + 0x6e, 0x43, 0x13, 0x55, 0x05, 0x85, 0x81, 0xc5, 0xf6, 0xf9, 0xee, 0xfd, 0x9e, 0xd7, 0xef, 0xe7, + 0xb3, 0xa1, 0x76, 0xd4, 0xec, 0xd3, 0x60, 0xd0, 0x94, 0xc3, 0x90, 0x89, 0xec, 0x48, 0xc2, 0x88, + 0x4b, 0x8e, 0xb7, 0x2c, 0x2e, 0x7c, 0x2e, 0x7a, 0xc2, 0x1e, 0x90, 0x23, 0x92, 0x2c, 0x22, 0x87, + 0xad, 0xfa, 0x4d, 0x79, 0xe0, 0x46, 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, 0x4f, 0xb5, 0xc2, 0xf1, 0x54, 0x2b, 0x7c, 0x9d, 0x6a, 0x85, 0x17, 0xb7, 0x2e, 0x0c, 0x66, + 0xf6, 0xaf, 0xd0, 0x2f, 0xa7, 0xdf, 0xef, 0xbb, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x24, 0x67, + 0x25, 0xf2, 0x2c, 0x06, 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { @@ -421,6 +578,132 @@ func (this *MsgMultiSend) Equal(that interface{}) bool { } return true } + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) + QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) +} + +type ClientConn interface { + Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error + NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) +} + +type queryClient struct { + cc ClientConn +} + +func NewQueryClient(cc ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) { + out := new(types.Coin) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/QueryBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { + out := new(QueryAllBalancesResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/QueryAllBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + QueryBalance(context.Context, *QueryBalanceParams) (*types.Coin, error) + QueryAllBalances(context.Context, *QueryAllBalancesParams) (*QueryAllBalancesResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) QueryBalance(ctx context.Context, req *QueryBalanceParams) (*types.Coin, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryBalance not implemented") +} +func (*UnimplementedQueryServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesParams) (*QueryAllBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") +} + +type Server interface { + RegisterService(sd *grpc.ServiceDesc, ss interface{}) +} + +func RegisterQueryServer(s Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.Query/QueryBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryBalance(ctx, req.(*QueryBalanceParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllBalancesParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryAllBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.Query/QueryAllBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryAllBalances(ctx, req.(*QueryAllBalancesParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.x.bank.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryBalance", + Handler: _Query_QueryBalance_Handler, + }, + { + MethodName: "QueryAllBalances", + Handler: _Query_QueryAllBalances_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "x/bank/types/types.proto", +} + func (m *MsgSend) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -611,6 +894,110 @@ func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryBalanceParams) 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 *QueryBalanceParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllBalancesParams) 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 *QueryAllBalancesParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -701,16 +1088,216 @@ func (m *MsgMultiSend) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - return n -} + return n +} + +func (m *QueryBalanceParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSend) 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 ErrIntOverflowTypes + } + 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: MsgSend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ToAddress == nil { + m.ToAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MsgSend) Unmarshal(dAtA []byte) error { +func (m *Input) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -733,15 +1320,15 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSend: wiretype end group for non-group") + return fmt.Errorf("proto: Input: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -768,14 +1355,101 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Output) 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 ErrIntOverflowTypes + } + 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: Output: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -802,14 +1476,14 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -836,8 +1510,8 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types.Coin{}) - if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -865,7 +1539,7 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { } return nil } -func (m *Input) Unmarshal(dAtA []byte) error { +func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -888,17 +1562,17 @@ func (m *Input) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Input: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -908,29 +1582,29 @@ func (m *Input) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} + m.Inputs = append(m.Inputs, Input{}) + if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -957,8 +1631,8 @@ func (m *Input) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Coins = append(m.Coins, types.Coin{}) - if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Outputs = append(m.Outputs, Output{}) + if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -986,7 +1660,7 @@ func (m *Input) Unmarshal(dAtA []byte) error { } return nil } -func (m *Output) Unmarshal(dAtA []byte) error { +func (m *QueryBalanceParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1009,10 +1683,10 @@ func (m *Output) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Output: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBalanceParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBalanceParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1051,9 +1725,9 @@ func (m *Output) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1063,25 +1737,23 @@ func (m *Output) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Coins = append(m.Coins, types.Coin{}) - if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1107,7 +1779,7 @@ func (m *Output) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { +func (m *QueryAllBalancesParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1130,17 +1802,17 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllBalancesParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllBalancesParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1150,29 +1822,82 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Inputs = append(m.Inputs, Input{}) - if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllBalancesResponse) 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 ErrIntOverflowTypes + } + 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: QueryAllBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1199,8 +1924,8 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Outputs = append(m.Outputs, Output{}) - if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/bank/types/types.proto b/x/bank/types/types.proto index ceb990314989..7ccce27f5238 100644 --- a/x/bank/types/types.proto +++ b/x/bank/types/types.proto @@ -54,3 +54,34 @@ message MsgMultiSend { repeated Input inputs = 1 [(gogoproto.nullable) = false]; repeated Output outputs = 2 [(gogoproto.nullable) = false]; } + +// +// Query +// + +service Query { + rpc QueryBalance(QueryBalanceParams) returns (cosmos_sdk.v1.Coin); + rpc QueryAllBalances(QueryAllBalancesParams) returns (QueryAllBalancesResponse); +} + +// QueryBalanceParams defines the params for querying an account balance. +message QueryBalanceParams { + bytes address = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" + ]; + string denom = 2; +} + +// QueryAllBalancesParams defines the params for querying all account balances +message QueryAllBalancesParams { + bytes address = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" + ]; +} + +message QueryAllBalancesResponse { + repeated cosmos_sdk.v1.Coin balances = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} From cb469d2e29be509f3ea0cc6385c4c64e8175eb72 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 26 Mar 2020 21:44:07 -0400 Subject: [PATCH 02/41] Add grpc gateway http annotations --- go.mod | 2 + go.sum | 1 + .../proto/google/api/annotations.proto | 31 ++ third_party/proto/google/api/http.proto | 376 ++++++++++++++++++ types/module/module.go | 2 + x/bank/types/types.proto | 13 +- 6 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 third_party/proto/google/api/annotations.proto create mode 100644 third_party/proto/google/api/http.proto diff --git a/go.mod b/go.mod index 68148f31e5bb..abb48e7468f5 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,8 @@ require ( github.com/tendermint/go-amino v0.15.1 github.com/tendermint/iavl v0.13.3 github.com/tendermint/tendermint v0.33.2 + github.com/tendermint/tm-db v0.5.0 + google.golang.org/grpc v1.28.0 github.com/tendermint/tm-db v0.5.1 google.golang.org/protobuf v1.20.1 // indirect gopkg.in/yaml.v2 v2.2.8 diff --git a/go.sum b/go.sum index cb61d29e88ee..17c59eba9446 100644 --- a/go.sum +++ b/go.sum @@ -427,6 +427,7 @@ github.com/tendermint/iavl v0.13.3/go.mod h1:2lE7GiWdSvc7kvT78ncIKmkOjCnp6JEnSb2 github.com/tendermint/tendermint v0.33.2 h1:NzvRMTuXJxqSsFed2J7uHmMU5N1CVzSpfi3nCc882KY= github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= +github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto new file mode 100644 index 000000000000..85c361b47fed --- /dev/null +++ b/third_party/proto/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto new file mode 100644 index 000000000000..b2977f514741 --- /dev/null +++ b/third_party/proto/google/api/http.proto @@ -0,0 +1,376 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/types/module/module.go b/types/module/module.go index fbc4570f765e..6bc184d98a4e 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -186,6 +186,8 @@ func (GenesisOnlyAppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns an empty module querier func (gam GenesisOnlyAppModule) NewQuerierHandler() sdk.Querier { return nil } +func (gam GenesisOnlyAppModule) RegisterQueryServer(GRPCServer) {} + // BeginBlock returns an empty module begin-block func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} diff --git a/x/bank/types/types.proto b/x/bank/types/types.proto index 7ccce27f5238..05ca5345e29d 100644 --- a/x/bank/types/types.proto +++ b/x/bank/types/types.proto @@ -5,6 +5,7 @@ package cosmos_sdk.x.bank.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; import "third_party/proto/gogoproto/gogo.proto"; +import "third_party/proto/google/api/annotations.proto"; import "types/types.proto"; // MsgSend - high level transaction of the coin module @@ -60,8 +61,16 @@ message MsgMultiSend { // service Query { - rpc QueryBalance(QueryBalanceParams) returns (cosmos_sdk.v1.Coin); - rpc QueryAllBalances(QueryAllBalancesParams) returns (QueryAllBalancesResponse); + rpc QueryBalance(QueryBalanceParams) returns (cosmos_sdk.v1.Coin) { + option (google.api.http) = { + get: "/cosmos_sdk/x/bank/v1/balance/{address}/{denom}" + }; + } + rpc QueryAllBalances(QueryAllBalancesParams) returns (QueryAllBalancesResponse) { + option (google.api.http) = { + get: "/cosmos_sdk/x/bank/v1/balances/{address}" + }; + } } // QueryBalanceParams defines the params for querying an account balance. From 1a745ed324d31e0582e5b71943292e13d299a518 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 26 Mar 2020 22:24:43 -0400 Subject: [PATCH 03/41] Add RegisterQueryService stub to all modules --- x/auth/module.go | 3 +++ x/bank/alias.go | 1 - x/crisis/module.go | 3 +++ x/distribution/module.go | 3 +++ x/evidence/module.go | 3 +++ x/gov/module.go | 3 +++ x/mint/module.go | 3 +++ x/slashing/module.go | 3 +++ x/staking/module.go | 3 +++ x/supply/module.go | 3 +++ x/upgrade/module.go | 3 +++ 11 files changed, 30 insertions(+), 1 deletion(-) diff --git a/x/auth/module.go b/x/auth/module.go index 79a6e26de540..df42afca9980 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -113,6 +113,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.accountKeeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the auth module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/bank/alias.go b/x/bank/alias.go index 9811c9e001ee..13da861c28ae 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -29,7 +29,6 @@ var ( NewBaseKeeper = keeper.NewBaseKeeper NewBaseSendKeeper = keeper.NewBaseSendKeeper NewBaseViewKeeper = keeper.NewBaseViewKeeper - NewQuerier = keeper.NewQuerier RegisterCodec = types.RegisterCodec ErrNoInputs = types.ErrNoInputs ErrNoOutputs = types.ErrNoOutputs diff --git a/x/crisis/module.go b/x/crisis/module.go index 93d30ee360e8..7698916400c4 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -107,6 +107,9 @@ func (AppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns no sdk.Querier. func (AppModule) NewQuerierHandler() sdk.Querier { return nil } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the crisis module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/distribution/module.go b/x/distribution/module.go index 474f1ba0f193..671536e66adc 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -129,6 +129,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the distribution module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/evidence/module.go b/x/evidence/module.go index 87900aba30df..ccc746752399 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -135,6 +135,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // RegisterInvariants registers the evidence module's invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} diff --git a/x/gov/module.go b/x/gov/module.go index 624ca5928f91..ba8625bc9f7b 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -147,6 +147,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the gov module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/mint/module.go b/x/mint/module.go index 914cb2545df3..e68f52d92227 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -113,6 +113,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the mint module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/slashing/module.go b/x/slashing/module.go index 26876e506c19..0077d0cd30aa 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -125,6 +125,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the slashing module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/staking/module.go b/x/staking/module.go index 3054683ffb2f..551d7ac13fa4 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -152,6 +152,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the staking module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/supply/module.go b/x/supply/module.go index 5b40fc1db6d2..2cd1efa1d04a 100644 --- a/x/supply/module.go +++ b/x/supply/module.go @@ -117,6 +117,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis performs genesis initialization for the supply module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/upgrade/module.go b/x/upgrade/module.go index f5a9b461ef8d..598d79ecf6da 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -102,6 +102,9 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryServer(module.GRPCServer) { +} + // InitGenesis is ignored, no sense in serializing future upgrades func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONMarshaler, _ json.RawMessage) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} From fe915f5db2acf6d89dcc6cd04e017c22faea4479 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 26 Mar 2020 23:06:40 -0400 Subject: [PATCH 04/41] WIP on tests --- baseapp/queryrouter.go | 4 +- client/context/query.go | 2 +- types/errors/errors.go | 2 +- x/bank/keeper/querier_test.go | 174 +++++++++++++++++++++++----------- 4 files changed, 121 insertions(+), 61 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index c01329060cd2..b4508bf772cf 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -44,7 +44,7 @@ func (qrt *QueryRouter) Route(path string) sdk.Querier { func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // adds a top-level querier based on the GRPC service name - qrt.AddRoute(sd.ServiceName, + qrt.routes[sd.ServiceName] = func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { path0 := path[0] for _, md := range sd.Methods { @@ -69,5 +69,5 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ } } return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) - }) + } } diff --git a/client/context/query.go b/client/context/query.go index 34bc52872399..8a97223a8d9d 100644 --- a/client/context/query.go +++ b/client/context/query.go @@ -258,7 +258,7 @@ func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply int if err != nil { return err } - resBz, _, err := c.ctx.QueryWithData(fmt.Sprintf("custom/%s", method), reqBz) + resBz, _, err := c.ctx.QueryWithData(fmt.Sprintf("custom%s", method), reqBz) if err != nil { return err } diff --git a/types/errors/errors.go b/types/errors/errors.go index 633165e31f5b..cd6d4da2fd54 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -92,7 +92,7 @@ var ( ErrProtoMarshal = Register(RootCodespace, 25, "failed to marshal proto bytes") // ErrProtoUnmarshal defines an ABCI typed protobuf unmarshalling error - ErrProtoUnmarshal = Register(RootCodespace, 25, "failed to unmarshal proto bytes") + ErrProtoUnmarshal = Register(RootCodespace, 26, "failed to unmarshal proto bytes") // ErrPanic is only set when we recover from a panic, so we know to // redact potentially sensitive system info diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index 3732aaa74429..05c5b6325eaf 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -1,9 +1,13 @@ package keeper_test import ( + gocontext "context" "fmt" - - abci "github.com/tendermint/tendermint/abci/types" + "github.com/cosmos/cosmos-sdk/client/context" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -11,64 +15,85 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank/types" ) -func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { - app, ctx := suite.app, suite.ctx - _, _, addr := authtypes.KeyTestPubAddr() - req := abci.RequestQuery{ - Path: fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryBalance), - Data: []byte{}, +type QueryServerTestHelper struct { + ctx sdk.Context + handlers map[string]struct { + querier interface{} + svcDesc *grpc.ServiceDesc } +} - querier := keeper.NewQuerier(app.BankKeeper) - - res, err := querier(ctx, []string{types.QueryBalance}, req) - suite.Require().NotNil(err) - suite.Require().Nil(res) - - req.Data = app.Codec().MustMarshalJSON(types.NewQueryBalanceParams(addr, fooDenom)) - res, err = querier(ctx, []string{types.QueryBalance}, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - var balance sdk.Coin - suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balance)) - suite.True(balance.IsZero()) +func NewQueryServerTestHelper(ctx sdk.Context) *QueryServerTestHelper { + return &QueryServerTestHelper{ctx: ctx, handlers: map[string]struct { + querier interface{} + svcDesc *grpc.ServiceDesc + }{}} +} - origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) - acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) +func (q *QueryServerTestHelper) RegisterService(sd *grpc.ServiceDesc, ss interface{}) { + q.handlers[sd.ServiceName] = struct { + querier interface{} + svcDesc *grpc.ServiceDesc + }{querier: ss, svcDesc: sd} +} - app.AccountKeeper.SetAccount(ctx, acc) - suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) +func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { + path := strings.Split(method, "/") + if len(path) != 3 { + return fmt.Errorf("unexpected method name %s", method) + } + handler, ok := q.handlers[path[1]] + if !ok { + return fmt.Errorf("handler not found for %s", path[2]) + } + for _, m := range handler.svcDesc.Methods { + if m.MethodName == path[2] { + req := args.(proto.Message) + if req == nil { + return fmt.Errorf("empty request") + } + reqBz, err := proto.Marshal(req) + if err != nil { + return err + } + res, err := m.Handler(handler.querier, sdk.WrapSDKContext(q.ctx), func(i interface{}) error { + req := i.(proto.Message) + return proto.Unmarshal(reqBz, req) + }, nil) + resProto := res.(proto.Message) + resBz, err := proto.Marshal(resProto) + resProto2 := reply.(proto.Message) + return proto.Unmarshal(resBz, resProto2) + } + } + return fmt.Errorf("method not found") +} - res, err = querier(ctx, []string{types.QueryBalance}, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balance)) - suite.True(balance.IsEqual(newFooCoin(50))) +func (q *QueryServerTestHelper) NewStream(ctx gocontext.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, fmt.Errorf("not supported") } -func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { +var _ module.GRPCServer = &QueryServerTestHelper{} +var _ context.GRPCClientConn = &QueryServerTestHelper{} + +func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { app, ctx := suite.app, suite.ctx _, _, addr := authtypes.KeyTestPubAddr() - req := abci.RequestQuery{ - Path: fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryAllBalances), - Data: []byte{}, - } - querier := keeper.NewQuerier(app.BankKeeper) + queryHelper := NewQueryServerTestHelper(ctx) + types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) + queryClient := types.NewQueryClient(queryHelper) - res, err := querier(ctx, []string{types.QueryAllBalances}, req) + res, err := queryClient.QueryBalance(nil, nil) suite.Require().NotNil(err) suite.Require().Nil(res) - req.Data = app.Codec().MustMarshalJSON(types.NewQueryAllBalancesParams(addr)) - res, err = querier(ctx, []string{types.QueryAllBalances}, req) + req := types.NewQueryBalanceParams(addr, fooDenom) + balance, err := queryClient.QueryBalance(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(res) - var balances sdk.Coins - suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) - suite.True(balances.IsZero()) + suite.True(balance.IsZero()) origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) @@ -76,21 +101,56 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - res, err = querier(ctx, []string{types.QueryAllBalances}, req) + balance, err = queryClient.QueryBalance(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) - suite.True(balances.IsEqual(origCoins)) + suite.True(balance.IsEqual(newFooCoin(50))) } -func (suite *IntegrationTestSuite) TestQuerierRouteNotFound() { - app, ctx := suite.app, suite.ctx - req := abci.RequestQuery{ - Path: fmt.Sprintf("custom/%s/invalid", types.ModuleName), - Data: []byte{}, - } - - querier := keeper.NewQuerier(app.BankKeeper) - _, err := querier(ctx, []string{"invalid"}, req) - suite.Error(err) -} +//func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { +// app, ctx := suite.app, suite.ctx +// _, _, addr := authtypes.KeyTestPubAddr() +// req := abci.RequestQuery{ +// Path: fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryAllBalances), +// Data: []byte{}, +// } +// +// querier := keeper.NewQuerier(app.BankKeeper) +// +// res, err := querier(ctx, []string{types.QueryAllBalances}, req) +// suite.Require().NotNil(err) +// suite.Require().Nil(res) +// +// req.Data = app.Codec().MustMarshalJSON(types.NewQueryAllBalancesParams(addr)) +// res, err = querier(ctx, []string{types.QueryAllBalances}, req) +// suite.Require().NoError(err) +// suite.Require().NotNil(res) +// +// var balances sdk.Coins +// suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) +// suite.True(balances.IsZero()) +// +// origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) +// acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) +// +// app.AccountKeeper.SetAccount(ctx, acc) +// suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) +// +// res, err = querier(ctx, []string{types.QueryAllBalances}, req) +// suite.Require().NoError(err) +// suite.Require().NotNil(res) +// suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) +// suite.True(balances.IsEqual(origCoins)) +//} + +//func (suite *IntegrationTestSuite) TestQuerierRouteNotFound() { +// app, ctx := suite.app, suite.ctx +// req := abci.RequestQuery{ +// Path: fmt.Sprintf("custom/%s/invalid", types.ModuleName), +// Data: []byte{}, +// } +// +// querier := keeper.NewQuerier(app.BankKeeper) +// _, err := querier(ctx, []string{"invalid"}, req) +// suite.Error(err) +//} From fd014219309fe831d1dc89f239704a5003adcb09 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 27 Mar 2020 21:01:57 -0400 Subject: [PATCH 05/41] Fix tests --- baseapp/queryrouter.go | 54 +++++-- baseapp/router.go | 2 +- client/context/query.go | 29 ++-- go.mod | 5 +- go.sum | 16 ++ .../proto/google/api/annotations.proto | 2 +- types/module/module.go | 10 +- x/auth/module.go | 4 +- x/bank/keeper/querier_test.go | 151 ++++-------------- x/bank/module.go | 3 +- x/bank/types/types.pb.go | 91 +++++------ x/crisis/module.go | 3 +- x/distribution/module.go | 3 +- x/evidence/module.go | 4 +- x/gov/module.go | 4 +- x/mint/module.go | 4 +- x/slashing/module.go | 3 +- x/staking/module.go | 4 +- x/supply/module.go | 4 +- x/upgrade/module.go | 3 +- 20 files changed, 173 insertions(+), 226 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index b4508bf772cf..05dec2ed5bdc 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -1,15 +1,21 @@ package baseapp import ( + gocontext "context" "fmt" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/gogo/protobuf/proto" + gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" + "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" ) +var protoCodec = encoding.GetCodec(proto.Name) + type QueryRouter struct { routes map[string]sdk.Querier } @@ -51,23 +57,47 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ // checks each GRPC service method to see if it matches the path if md.MethodName == path0 { res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { - // unmarshal a protobuf message - protoMsg, ok := i.(proto.Message) - if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrProtoUnmarshal, "can't proto unmarshal: %+v", i) - } - return proto.Unmarshal(req.Data, protoMsg) + return protoCodec.Unmarshal(req.Data, i) }, nil) if err != nil { return nil, err } - protoMsg, ok := res.(proto.Message) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrProtoMarshal, "can't proto marshal: %+v", res) - } - return proto.Marshal(protoMsg) + return protoCodec.Marshal(res) } } return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) } } + +type QueryServerTestHelper struct { + *QueryRouter + ctx sdk.Context +} + +func NewQueryServerTestHelper(ctx sdk.Context) *QueryServerTestHelper { + return &QueryServerTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} +} + +func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { + path := strings.Split(method, "/") + if len(path) != 3 { + return fmt.Errorf("unexpected method name %s", method) + } + querier := q.Route(path[1]) + if querier == nil { + return fmt.Errorf("handler not found for %s", path[2]) + } + reqBz, err := protoCodec.Marshal(args) + if err != nil { + return err + } + resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) + return protoCodec.Unmarshal(resBz, reply) +} + +func (q *QueryServerTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, fmt.Errorf("not supported") +} + +var _ gogogrpc.Server = &QueryServerTestHelper{} +var _ gogogrpc.ClientConn = &QueryServerTestHelper{} diff --git a/baseapp/router.go b/baseapp/router.go index 77d2567c6cb2..02303bbbb4f3 100644 --- a/baseapp/router.go +++ b/baseapp/router.go @@ -22,7 +22,7 @@ func NewRouter() *Router { // AddRoute adds a route path to the router with a given handler. The route must // be alphanumeric. func (rtr *Router) AddRoute(path string, h sdk.Handler) sdk.Router { - if !isAlphaNumeric(path) { + if !sdk.IsAlphaNumeric(path) { panic("route expressions can only contain alphanumeric characters") } if rtr.routes[path] != nil { diff --git a/client/context/query.go b/client/context/query.go index 8a97223a8d9d..60ca99283259 100644 --- a/client/context/query.go +++ b/client/context/query.go @@ -3,8 +3,10 @@ package context import ( "context" "fmt" - "github.com/gogo/protobuf/proto" + gogogrpc "github.com/gogo/protobuf/grpc" "google.golang.org/grpc" + "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" "strings" "github.com/pkg/errors" @@ -234,27 +236,20 @@ func parseQueryStorePath(path string) (storeName string, err error) { return paths[1], nil } -func (ctx CLIContext) QueryConn() GRPCClientConn { +func (ctx CLIContext) QueryConn() gogogrpc.ClientConn { return cliQueryConn{ctx} } -type GRPCClientConn interface { - Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error - NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) -} - type cliQueryConn struct { ctx CLIContext } -var _ GRPCClientConn = cliQueryConn{} +var _ gogogrpc.ClientConn = cliQueryConn{} + +var protoCodec = encoding.GetCodec(proto.Name) func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { - req, ok := args.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %+v", args) - } - reqBz, err := proto.Marshal(req) + reqBz, err := protoCodec.Marshal(args) if err != nil { return err } @@ -262,13 +257,9 @@ func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply int if err != nil { return err } - res, ok := reply.(proto.Message) - if !ok { - return fmt.Errorf("can't proto unmarshal %+v", reply) - } - return proto.Unmarshal(resBz, res) + return protoCodec.Unmarshal(resBz, reply) } -func (c cliQueryConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { +func (c cliQueryConn) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("streaming rpc not supported") } diff --git a/go.mod b/go.mod index abb48e7468f5..e5688a5754e4 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/pelletier/go-toml v1.7.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/regen-network/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2 + github.com/regen-network/cosmos-proto v0.2.2 github.com/spf13/afero v1.2.1 // indirect github.com/spf13/cobra v0.0.7 github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -31,12 +31,13 @@ require ( github.com/tendermint/iavl v0.13.3 github.com/tendermint/tendermint v0.33.2 github.com/tendermint/tm-db v0.5.0 + google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 google.golang.org/grpc v1.28.0 github.com/tendermint/tm-db v0.5.1 google.golang.org/protobuf v1.20.1 // indirect gopkg.in/yaml.v2 v2.2.8 ) -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.1 +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4 go 1.14 diff --git a/go.sum b/go.sum index 17c59eba9446..5ebadd143544 100644 --- a/go.sum +++ b/go.sum @@ -138,6 +138,7 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -356,8 +357,16 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhD github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2 h1:jQK1YoH972Aptd22YKgtNu5jM2X2xMGkyIENOAc71to= github.com/regen-network/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2/go.mod h1:+r7jN10xXCypD4yBgzKOa+vgLz0riqYMHeDcKekxPvA= +github.com/regen-network/cosmos-proto v0.2.0 h1:dfiXixggqhGG2t+UTP7BG2bDMKo6c+jEQOv2kekChnI= +github.com/regen-network/cosmos-proto v0.2.0/go.mod h1:g0EukBtiKcUlnNxbSuARr0TdVzB1YnhDipfqdDGyROw= +github.com/regen-network/cosmos-proto v0.2.2 h1:qAuQxio6lmZ3ghpeSMrhqT+Xq/FkuimzWD8o0YR9Gmo= +github.com/regen-network/cosmos-proto v0.2.2/go.mod h1:4jLYG3Qk6EtkOj3/FK7ziS5+LurpGPzJ41ungpzThcw= github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= +github.com/regen-network/protobuf v1.3.2-alpha.regen.3 h1:EqbzzpWgu08SfPE9rEtBdhbssX1x6hOsensP/lXlXsQ= +github.com/regen-network/protobuf v1.3.2-alpha.regen.3/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -491,6 +500,8 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -519,6 +530,8 @@ golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -557,6 +570,8 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -567,6 +582,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto index 85c361b47fed..cfdc57f4d8f4 100644 --- a/third_party/proto/google/api/annotations.proto +++ b/third_party/proto/google/api/annotations.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package google.api; -import "google/api/http.proto"; +import "third_party/proto/google/api/http.proto"; import "google/protobuf/descriptor.proto"; option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; diff --git a/types/module/module.go b/types/module/module.go index 6bc184d98a4e..fb57cf20f5e2 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -30,7 +30,7 @@ package module import ( "encoding/json" - "google.golang.org/grpc" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -146,17 +146,13 @@ type AppModule interface { QuerierRoute() string // TODO: deprecate in favor of RegisterQueryServer NewQuerierHandler() sdk.Querier - RegisterQueryServer(GRPCServer) + RegisterQueryServer(grpc.Server) // ABCI BeginBlock(sdk.Context, abci.RequestBeginBlock) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate } -type GRPCServer interface { - RegisterService(sd *grpc.ServiceDesc, ss interface{}) -} - //___________________________ // GenesisOnlyAppModule is an AppModule that only has import/export functionality @@ -186,7 +182,7 @@ func (GenesisOnlyAppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns an empty module querier func (gam GenesisOnlyAppModule) NewQuerierHandler() sdk.Querier { return nil } -func (gam GenesisOnlyAppModule) RegisterQueryServer(GRPCServer) {} +func (gam GenesisOnlyAppModule) RegisterQueryServer(grpc.Server) {} // BeginBlock returns an empty module begin-block func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} diff --git a/x/auth/module.go b/x/auth/module.go index df42afca9980..1d1e99efba69 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -3,6 +3,7 @@ package auth import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -113,8 +114,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.accountKeeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // InitGenesis performs genesis initialization for the auth module. It returns // no validator updates. diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index 05c5b6325eaf..01a95cfd85ea 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -2,98 +2,57 @@ package keeper_test import ( gocontext "context" - "fmt" - "github.com/cosmos/cosmos-sdk/client/context" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/gogo/protobuf/proto" - "google.golang.org/grpc" - "strings" - + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" ) -type QueryServerTestHelper struct { - ctx sdk.Context - handlers map[string]struct { - querier interface{} - svcDesc *grpc.ServiceDesc - } -} +func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { + app, ctx := suite.app, suite.ctx + _, _, addr := authtypes.KeyTestPubAddr() -func NewQueryServerTestHelper(ctx sdk.Context) *QueryServerTestHelper { - return &QueryServerTestHelper{ctx: ctx, handlers: map[string]struct { - querier interface{} - svcDesc *grpc.ServiceDesc - }{}} -} + queryHelper := baseapp.NewQueryServerTestHelper(ctx) + types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) + queryClient := types.NewQueryClient(queryHelper) -func (q *QueryServerTestHelper) RegisterService(sd *grpc.ServiceDesc, ss interface{}) { - q.handlers[sd.ServiceName] = struct { - querier interface{} - svcDesc *grpc.ServiceDesc - }{querier: ss, svcDesc: sd} -} + req := types.NewQueryBalanceParams(addr, fooDenom) + balance, err := queryClient.QueryBalance(gocontext.Background(), &req) + suite.Require().NoError(err) + suite.Require().NotNil(balance) + suite.True(balance.IsZero()) -func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { - path := strings.Split(method, "/") - if len(path) != 3 { - return fmt.Errorf("unexpected method name %s", method) - } - handler, ok := q.handlers[path[1]] - if !ok { - return fmt.Errorf("handler not found for %s", path[2]) - } - for _, m := range handler.svcDesc.Methods { - if m.MethodName == path[2] { - req := args.(proto.Message) - if req == nil { - return fmt.Errorf("empty request") - } - reqBz, err := proto.Marshal(req) - if err != nil { - return err - } - res, err := m.Handler(handler.querier, sdk.WrapSDKContext(q.ctx), func(i interface{}) error { - req := i.(proto.Message) - return proto.Unmarshal(reqBz, req) - }, nil) - resProto := res.(proto.Message) - resBz, err := proto.Marshal(resProto) - resProto2 := reply.(proto.Message) - return proto.Unmarshal(resBz, resProto2) - } - } - return fmt.Errorf("method not found") -} + origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) + acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) -func (q *QueryServerTestHelper) NewStream(ctx gocontext.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { - return nil, fmt.Errorf("not supported") -} + app.AccountKeeper.SetAccount(ctx, acc) + suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) -var _ module.GRPCServer = &QueryServerTestHelper{} -var _ context.GRPCClientConn = &QueryServerTestHelper{} + balance, err = queryClient.QueryBalance(gocontext.Background(), &req) + suite.Require().NoError(err) + suite.Require().NotNil(balance) + suite.True(balance.IsEqual(newFooCoin(50))) +} -func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { +func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { app, ctx := suite.app, suite.ctx _, _, addr := authtypes.KeyTestPubAddr() - queryHelper := NewQueryServerTestHelper(ctx) + queryHelper := baseapp.NewQueryServerTestHelper(ctx) types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) queryClient := types.NewQueryClient(queryHelper) - res, err := queryClient.QueryBalance(nil, nil) - suite.Require().NotNil(err) - suite.Require().Nil(res) + //res, err := queryClient.QueryAllBalances(nil, nil) + //suite.Require().NotNil(err) + //suite.Require().Nil(res) - req := types.NewQueryBalanceParams(addr, fooDenom) - balance, err := queryClient.QueryBalance(gocontext.Background(), &req) + req := types.NewQueryAllBalancesParams(addr) + res, err := queryClient.QueryAllBalances(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.True(balance.IsZero()) + suite.True(res.Balances.IsZero()) origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) @@ -101,56 +60,8 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - balance, err = queryClient.QueryBalance(gocontext.Background(), &req) + res, err = queryClient.QueryAllBalances(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.True(balance.IsEqual(newFooCoin(50))) + suite.True(res.Balances.IsEqual(origCoins)) } - -//func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { -// app, ctx := suite.app, suite.ctx -// _, _, addr := authtypes.KeyTestPubAddr() -// req := abci.RequestQuery{ -// Path: fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryAllBalances), -// Data: []byte{}, -// } -// -// querier := keeper.NewQuerier(app.BankKeeper) -// -// res, err := querier(ctx, []string{types.QueryAllBalances}, req) -// suite.Require().NotNil(err) -// suite.Require().Nil(res) -// -// req.Data = app.Codec().MustMarshalJSON(types.NewQueryAllBalancesParams(addr)) -// res, err = querier(ctx, []string{types.QueryAllBalances}, req) -// suite.Require().NoError(err) -// suite.Require().NotNil(res) -// -// var balances sdk.Coins -// suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) -// suite.True(balances.IsZero()) -// -// origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) -// acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) -// -// app.AccountKeeper.SetAccount(ctx, acc) -// suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) -// -// res, err = querier(ctx, []string{types.QueryAllBalances}, req) -// suite.Require().NoError(err) -// suite.Require().NotNil(res) -// suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) -// suite.True(balances.IsEqual(origCoins)) -//} - -//func (suite *IntegrationTestSuite) TestQuerierRouteNotFound() { -// app, ctx := suite.app, suite.ctx -// req := abci.RequestQuery{ -// Path: fmt.Sprintf("custom/%s/invalid", types.ModuleName), -// Data: []byte{}, -// } -// -// querier := keeper.NewQuerier(app.BankKeeper) -// _, err := querier(ctx, []string{"invalid"}, req) -// suite.Error(err) -//} diff --git a/x/bank/module.go b/x/bank/module.go index 025f545facba..0f62da2e6c18 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -3,6 +3,7 @@ package bank import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -77,7 +78,7 @@ type AppModule struct { accountKeeper types.AccountKeeper } -func (am AppModule) RegisterQueryServer(server module.GRPCServer) { +func (am AppModule) RegisterQueryServer(server grpc.Server) { types.RegisterQueryServer(server, keeper.Querier{am.keeper}) } diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index 5d1be82527ce..3a7ae288edbd 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -10,7 +10,9 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/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" @@ -405,41 +407,45 @@ func init() { func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 534 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x31, 0x6f, 0xd3, 0x40, - 0x18, 0x86, 0x73, 0x69, 0x93, 0xd0, 0xaf, 0x19, 0xe8, 0xb5, 0x42, 0x51, 0x40, 0x76, 0xe5, 0x01, - 0x05, 0x89, 0x5e, 0x48, 0x99, 0xa8, 0x58, 0x92, 0x4a, 0x08, 0x84, 0x22, 0xc0, 0x6c, 0x20, 0x14, - 0x5d, 0xec, 0xc3, 0xb5, 0x62, 0xfb, 0x2c, 0xdf, 0xb9, 0x34, 0x03, 0x3f, 0x01, 0x89, 0x9f, 0xc0, - 0xcc, 0x1f, 0x80, 0x99, 0x29, 0x63, 0x47, 0xa6, 0x80, 0x92, 0x85, 0xb9, 0x23, 0x13, 0xb2, 0x7d, - 0x6e, 0x43, 0x13, 0x55, 0x05, 0x85, 0x81, 0xc5, 0xf6, 0xf9, 0xee, 0xfd, 0x9e, 0xd7, 0xef, 0xe7, - 0xb3, 0xa1, 0x76, 0xd4, 0xec, 0xd3, 0x60, 0xd0, 0x94, 0xc3, 0x90, 0x89, 0xec, 0x48, 0xc2, 0x88, - 0x4b, 0x8e, 0xb7, 0x2c, 0x2e, 0x7c, 0x2e, 0x7a, 0xc2, 0x1e, 0x90, 0x23, 0x92, 0x2c, 0x22, 0x87, - 0xad, 0xfa, 0x4d, 0x79, 0xe0, 0x46, 0x76, 0x2f, 0xa4, 0x91, 0x1c, 0x36, 0xd3, 0x85, 0x4d, 0x87, - 0x3b, 0xfc, 0xec, 0x2a, 0x53, 0xd7, 0x37, 0xe6, 0x0a, 0x1a, 0x5f, 0x8a, 0x50, 0xe9, 0x0a, 0xe7, -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x00, 0x00, 0xff, 0xff, 0x24, 0x67, - 0x25, 0xf2, 0x2c, 0x06, 0x00, 0x00, + // 602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xb1, 0x6f, 0xd3, 0x40, + 0x14, 0xc6, 0xe3, 0xb4, 0x49, 0xe8, 0x35, 0x03, 0xbd, 0x56, 0x28, 0x0a, 0xc8, 0xae, 0x3c, 0xa0, + 0x80, 0xe8, 0x5d, 0x53, 0x06, 0x44, 0xc5, 0x92, 0x54, 0x42, 0x20, 0x14, 0x01, 0x61, 0x03, 0xa1, + 0xe8, 0x62, 0x1b, 0xd7, 0x8a, 0xed, 0xb3, 0x7c, 0xe7, 0xd0, 0xa8, 0xca, 0xc2, 0xc0, 0x86, 0x84, + 0xc4, 0x3f, 0x80, 0x18, 0xd9, 0x11, 0xcc, 0x4c, 0x1d, 0x2b, 0xb1, 0x30, 0x05, 0x94, 0x30, 0x30, + 0x77, 0x64, 0x42, 0x3e, 0x5f, 0x9a, 0xd0, 0x44, 0x51, 0x41, 0x61, 0xe8, 0x92, 0xc4, 0xb9, 0xf7, + 0xbd, 0xdf, 0x77, 0xdf, 0xcb, 0xe5, 0x40, 0x61, 0x0f, 0x37, 0x89, 0xdf, 0xc2, 0xbc, 0x13, 0x58, + 0x2c, 0x79, 0x45, 0x41, 0x48, 0x39, 0x85, 0x6b, 0x06, 0x65, 0x1e, 0x65, 0x0d, 0x66, 0xb6, 0xd0, + 0x1e, 0x8a, 0x8b, 0x50, 0xbb, 0x5c, 0xbc, 0xcc, 0x77, 0x9d, 0xd0, 0x6c, 0x04, 0x24, 0xe4, 0x1d, + 0x2c, 0x0a, 0xb1, 0x4d, 0x6d, 0x3a, 0xfa, 0x94, 0xa8, 0x8b, 0x68, 0x5a, 0x1d, 0xb5, 0x5d, 0x0b, + 0x93, 0xc0, 0xc1, 0xc4, 0xf7, 0x29, 0x27, 0x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 0x98, 0x99, 0x98, 0x50, 0x11, 0x9d, 0xae, 0x7a, 0x18, 0xb4, 0xbe, 0x29, + 0xbc, 0x5e, 0x85, 0xa5, 0x99, 0x5e, 0xd9, 0xc8, 0x6c, 0x75, 0xe7, 0xa0, 0xaf, 0x2a, 0x87, 0x7d, + 0x55, 0xf9, 0xde, 0x57, 0x95, 0xd7, 0x03, 0x35, 0x75, 0x38, 0x50, 0x53, 0x5f, 0x07, 0x6a, 0xea, + 0xf1, 0x95, 0x99, 0x53, 0x18, 0xbf, 0xb2, 0x9a, 0x59, 0x71, 0x59, 0x5c, 0xff, 0x1d, 0x00, 0x00, + 0xff, 0xff, 0xb6, 0xc7, 0xe3, 0x3e, 0xc9, 0x06, 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { @@ -595,16 +601,11 @@ type QueryClient interface { QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) } -type ClientConn interface { - Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error - NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) -} - type queryClient struct { - cc ClientConn + cc grpc1.ClientConn } -func NewQueryClient(cc ClientConn) QueryClient { +func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } @@ -643,11 +644,7 @@ func (*UnimplementedQueryServer) QueryAllBalances(ctx context.Context, req *Quer return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") } -type Server interface { - RegisterService(sd *grpc.ServiceDesc, ss interface{}) -} - -func RegisterQueryServer(s Server, srv QueryServer) { +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } diff --git a/x/crisis/module.go b/x/crisis/module.go index 7698916400c4..c3881c8e5f2a 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -3,6 +3,7 @@ package crisis import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -107,7 +108,7 @@ func (AppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns no sdk.Querier. func (AppModule) NewQuerierHandler() sdk.Querier { return nil } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { +func (am AppModule) RegisterQueryServer(grpc.Server) { } // InitGenesis performs genesis initialization for the crisis module. It returns diff --git a/x/distribution/module.go b/x/distribution/module.go index 671536e66adc..644e89e20827 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -3,6 +3,7 @@ package distribution import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -129,7 +130,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { +func (am AppModule) RegisterQueryServer(grpc.Server) { } // InitGenesis performs genesis initialization for the distribution module. It returns diff --git a/x/evidence/module.go b/x/evidence/module.go index ccc746752399..99c3b95158bd 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -3,6 +3,7 @@ package evidence import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" @@ -135,8 +136,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // RegisterInvariants registers the evidence module's invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} diff --git a/x/gov/module.go b/x/gov/module.go index ba8625bc9f7b..90f605bae6ac 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -5,6 +5,7 @@ package gov import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -147,8 +148,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // InitGenesis performs genesis initialization for the gov module. It returns // no validator updates. diff --git a/x/mint/module.go b/x/mint/module.go index e68f52d92227..edb7590426f8 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -3,6 +3,7 @@ package mint import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -113,8 +114,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // InitGenesis performs genesis initialization for the mint module. It returns // no validator updates. diff --git a/x/slashing/module.go b/x/slashing/module.go index 0077d0cd30aa..29965fabc7cd 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -3,6 +3,7 @@ package slashing import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -125,7 +126,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { +func (am AppModule) RegisterQueryServer(server grpc.Server) { } // InitGenesis performs genesis initialization for the slashing module. It returns diff --git a/x/staking/module.go b/x/staking/module.go index 551d7ac13fa4..6d6456b3e382 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -3,6 +3,7 @@ package staking import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -152,8 +153,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // InitGenesis performs genesis initialization for the staking module. It returns // no validator updates. diff --git a/x/supply/module.go b/x/supply/module.go index 2cd1efa1d04a..8d9ed2785e8e 100644 --- a/x/supply/module.go +++ b/x/supply/module.go @@ -3,6 +3,7 @@ package supply import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "math/rand" "github.com/gorilla/mux" @@ -117,8 +118,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { -} +func (am AppModule) RegisterQueryServer(grpc.Server) {} // InitGenesis performs genesis initialization for the supply module. It returns // no validator updates. diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 598d79ecf6da..5f8ccc779594 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -2,6 +2,7 @@ package upgrade import ( "encoding/json" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -102,7 +103,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(module.GRPCServer) { +func (am AppModule) RegisterQueryServer(grpc.Server) { } // InitGenesis is ignored, no sense in serializing future upgrades From 1c6b0b31d526aaf2a2091d12338fe6c9591dffb3 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 27 Mar 2020 21:21:05 -0400 Subject: [PATCH 06/41] Update mocks --- go.sum | 1 + tests/mocks/tendermint_tm_db_DB.go | 14 +++++++------- tests/mocks/types_module_module.go | 13 +++++++++++++ tests/mocks/types_router.go | 13 +++++++++++++ 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/go.sum b/go.sum index 5ebadd143544..cf31f104be39 100644 --- a/go.sum +++ b/go.sum @@ -553,6 +553,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2 h1:V9r/14uGBqLgNlHRYWdVqjMdWkcOHnE2KG8DwVqQSEc= golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/tests/mocks/tendermint_tm_db_DB.go b/tests/mocks/tendermint_tm_db_DB.go index bed59a498d03..cdf5e5ab0a27 100644 --- a/tests/mocks/tendermint_tm_db_DB.go +++ b/tests/mocks/tendermint_tm_db_DB.go @@ -6,7 +6,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" - tm_db "github.com/tendermint/tm-db" + db "github.com/tendermint/tm-db" reflect "reflect" ) @@ -106,10 +106,10 @@ func (mr *MockDBMockRecorder) Has(arg0 interface{}) *gomock.Call { } // Iterator mocks base method -func (m *MockDB) Iterator(arg0, arg1 []byte) (tm_db.Iterator, error) { +func (m *MockDB) Iterator(arg0, arg1 []byte) (db.Iterator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Iterator", arg0, arg1) - ret0, _ := ret[0].(tm_db.Iterator) + ret0, _ := ret[0].(db.Iterator) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -121,10 +121,10 @@ func (mr *MockDBMockRecorder) Iterator(arg0, arg1 interface{}) *gomock.Call { } // NewBatch mocks base method -func (m *MockDB) NewBatch() tm_db.Batch { +func (m *MockDB) NewBatch() db.Batch { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "NewBatch") - ret0, _ := ret[0].(tm_db.Batch) + ret0, _ := ret[0].(db.Batch) return ret0 } @@ -149,10 +149,10 @@ func (mr *MockDBMockRecorder) Print() *gomock.Call { } // ReverseIterator mocks base method -func (m *MockDB) ReverseIterator(arg0, arg1 []byte) (tm_db.Iterator, error) { +func (m *MockDB) ReverseIterator(arg0, arg1 []byte) (db.Iterator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ReverseIterator", arg0, arg1) - ret0, _ := ret[0].(tm_db.Iterator) + ret0, _ := ret[0].(db.Iterator) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index 274ac5c0636b..41cf670e635d 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -9,6 +9,7 @@ import ( context "github.com/cosmos/cosmos-sdk/client/context" codec "github.com/cosmos/cosmos-sdk/codec" types "github.com/cosmos/cosmos-sdk/types" + grpc "github.com/gogo/protobuf/grpc" gomock "github.com/golang/mock/gomock" mux "github.com/gorilla/mux" cobra "github.com/spf13/cobra" @@ -491,6 +492,18 @@ func (mr *MockAppModuleMockRecorder) NewQuerierHandler() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewQuerierHandler", reflect.TypeOf((*MockAppModule)(nil).NewQuerierHandler)) } +// RegisterQueryServer mocks base method +func (m *MockAppModule) RegisterQueryServer(arg0 grpc.Server) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterQueryServer", arg0) +} + +// RegisterQueryServer indicates an expected call of RegisterQueryServer +func (mr *MockAppModuleMockRecorder) RegisterQueryServer(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterQueryServer", reflect.TypeOf((*MockAppModule)(nil).RegisterQueryServer), arg0) +} + // BeginBlock mocks base method func (m *MockAppModule) BeginBlock(arg0 types.Context, arg1 types0.RequestBeginBlock) { m.ctrl.T.Helper() diff --git a/tests/mocks/types_router.go b/tests/mocks/types_router.go index 924d95146eda..e5177b4a7e31 100644 --- a/tests/mocks/types_router.go +++ b/tests/mocks/types_router.go @@ -7,6 +7,7 @@ package mocks import ( types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" + grpc "google.golang.org/grpc" reflect "reflect" ) @@ -111,3 +112,15 @@ func (mr *MockQueryRouterMockRecorder) Route(path interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Route", reflect.TypeOf((*MockQueryRouter)(nil).Route), path) } + +// RegisterService mocks base method +func (m *MockQueryRouter) RegisterService(sd *grpc.ServiceDesc, ss interface{}) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "RegisterService", sd, ss) +} + +// RegisterService indicates an expected call of RegisterService +func (mr *MockQueryRouterMockRecorder) RegisterService(sd, ss interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterService", reflect.TypeOf((*MockQueryRouter)(nil).RegisterService), sd, ss) +} From 5fb75f462eced0c0841748c3da698b3d190802eb Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 7 Apr 2020 21:01:02 -0400 Subject: [PATCH 07/41] Address golang CI issues --- x/bank/client/cli/query.go | 4 ++-- x/bank/keeper/querier.go | 2 +- x/bank/module.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index 2cd6ed1892d2..66bc9d8a1d76 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -51,14 +51,14 @@ func NewBalancesCmd() *cobra.Command { queryClient := types.NewQueryClient(cliCtx.QueryConn()) denom := viper.GetString(flagDenom) if denom == "" { - params := &types.QueryAllBalancesParams{addr} + params := &types.QueryAllBalancesParams{Address: addr} result, err := queryClient.QueryAllBalances(gocontext.Background(), params) if err != nil { return err } return cliCtx.Println(result.Balances) } else { - params := &types.QueryBalanceParams{addr, denom} + params := &types.QueryBalanceParams{Address: addr, Denom: denom} result, err := queryClient.QueryBalance(gocontext.Background(), params) if err != nil { return err diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index de6dd57558d8..681b3ba028f2 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -19,5 +19,5 @@ func (q Querier) QueryBalance(ctx context.Context, params *types.QueryBalancePar func (q Querier) QueryAllBalances(ctx context.Context, params *types.QueryAllBalancesParams) (*types.QueryAllBalancesResponse, error) { balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), params.Address) - return &types.QueryAllBalancesResponse{balances}, nil + return &types.QueryAllBalancesResponse{Balances: balances}, nil } diff --git a/x/bank/module.go b/x/bank/module.go index 0f62da2e6c18..fcae7ba272e5 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -79,7 +79,7 @@ type AppModule struct { } func (am AppModule) RegisterQueryServer(server grpc.Server) { - types.RegisterQueryServer(server, keeper.Querier{am.keeper}) + types.RegisterQueryServer(server, keeper.Querier{Keeper: am.keeper}) } // NewAppModule creates a new AppModule object From 026decb4f4c464d34df0a8ae76b6e4774a4519a7 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 7 Apr 2020 21:02:08 -0400 Subject: [PATCH 08/41] Address golang CI issues --- baseapp/queryrouter.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index 05dec2ed5bdc..e487c56c5709 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -1,15 +1,16 @@ package baseapp import ( - gocontext "context" "fmt" + "strings" + + gocontext "context" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" "google.golang.org/grpc/encoding" "google.golang.org/grpc/encoding/proto" - "strings" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -92,6 +93,9 @@ func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, arg return err } resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) + if err != nil { + return err + } return protoCodec.Unmarshal(resBz, reply) } From d2c0691b3a527fd4d017a34d7b12b2fb10af530e Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 7 Apr 2020 21:07:50 -0400 Subject: [PATCH 09/41] Fix go.mod, regenerate proto files --- codec/std/codec.pb.go | 240 ++++++++++++--------- codec/testdata/proto.pb.go | 24 ++- go.mod | 3 +- types/types.pb.go | 112 ++++++---- x/auth/types/types.pb.go | 136 +++++++----- x/auth/vesting/types/types.pb.go | 107 ++++++---- x/bank/types/types.pb.go | 114 ++++++---- x/crisis/types/types.pb.go | 18 +- x/distribution/types/types.pb.go | 217 ++++++++++++------- x/evidence/types/types.pb.go | 77 ++++--- x/gov/types/types.pb.go | 199 +++++++++++------- x/mint/types/types.pb.go | 66 +++--- x/params/types/proposal/types.pb.go | 57 +++-- x/slashing/types/types.pb.go | 79 ++++--- x/staking/types/types.pb.go | 314 ++++++++++++++++++---------- x/supply/types/types.pb.go | 60 +++--- x/upgrade/types/types.pb.go | 70 ++++--- 17 files changed, 1211 insertions(+), 682 deletions(-) diff --git a/codec/std/codec.pb.go b/codec/std/codec.pb.go index 2d1c5b23250e..947a6f90f456 100644 --- a/codec/std/codec.pb.go +++ b/codec/std/codec.pb.go @@ -24,6 +24,7 @@ import ( types5 "github.com/cosmos/cosmos-sdk/x/upgrade/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/regen-network/cosmos-proto" io "io" math "math" @@ -32,6 +33,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -168,6 +170,10 @@ func (*Account) XXX_OneofWrappers() []interface{} { } } +func (*Account) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Account" +} + // Supply defines the application-level Supply type. type Supply struct { // sum defines a set of all acceptable concrete Supply implementations. @@ -244,6 +250,10 @@ func (*Supply) XXX_OneofWrappers() []interface{} { } } +func (*Supply) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Supply" +} + // Evidence defines the application-level allowed Evidence to be submitted via a // MsgSubmitEvidence message. type Evidence struct { @@ -321,6 +331,10 @@ func (*Evidence) XXX_OneofWrappers() []interface{} { } } +func (*Evidence) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Evidence" +} + // MsgSubmitEvidence defines the application-level message type for handling // evidence submission. type MsgSubmitEvidence struct { @@ -361,6 +375,10 @@ func (m *MsgSubmitEvidence) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitEvidence proto.InternalMessageInfo +func (*MsgSubmitEvidence) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.MsgSubmitEvidence" +} + // MsgSubmitProposal defines the application-level message type for handling // governance proposals. type MsgSubmitProposal struct { @@ -401,6 +419,10 @@ func (m *MsgSubmitProposal) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitProposal proto.InternalMessageInfo +func (*MsgSubmitProposal) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.MsgSubmitProposal" +} + // Proposal defines the application-level concrete proposal type used in governance // proposals. type Proposal struct { @@ -448,6 +470,10 @@ func (m *Proposal) GetContent() Content { return Content{} } +func (*Proposal) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Proposal" +} + // Content defines the application-level allowed Content to be included in a // governance proposal. type Content struct { @@ -577,6 +603,10 @@ func (*Content) XXX_OneofWrappers() []interface{} { } } +func (*Content) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Content" +} + // Transaction defines the application-level transaction that can be signed and // processed by the state-machine. It contains a base of common fields and // repeated set of Message types. @@ -618,6 +648,10 @@ func (m *Transaction) XXX_DiscardUnknown() { var xxx_messageInfo_Transaction proto.InternalMessageInfo +func (*Transaction) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Transaction" +} + // Message defines the set of valid concrete message types that can be used to // construct a transaction. type Message struct { @@ -902,6 +936,10 @@ func (*Message) XXX_OneofWrappers() []interface{} { } } +func (*Message) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.Message" +} + // SignDoc defines a standard application-level signing document to compose // signatures for a Transaction. type SignDoc struct { @@ -949,116 +987,130 @@ func (m *SignDoc) GetMsgs() []Message { return nil } +func (*SignDoc) XXX_MessageName() string { + return "cosmos_sdk.codec.std.v1.SignDoc" +} func init() { proto.RegisterType((*Account)(nil), "cosmos_sdk.codec.std.v1.Account") + golang_proto.RegisterType((*Account)(nil), "cosmos_sdk.codec.std.v1.Account") proto.RegisterType((*Supply)(nil), "cosmos_sdk.codec.std.v1.Supply") + golang_proto.RegisterType((*Supply)(nil), "cosmos_sdk.codec.std.v1.Supply") proto.RegisterType((*Evidence)(nil), "cosmos_sdk.codec.std.v1.Evidence") + golang_proto.RegisterType((*Evidence)(nil), "cosmos_sdk.codec.std.v1.Evidence") proto.RegisterType((*MsgSubmitEvidence)(nil), "cosmos_sdk.codec.std.v1.MsgSubmitEvidence") + golang_proto.RegisterType((*MsgSubmitEvidence)(nil), "cosmos_sdk.codec.std.v1.MsgSubmitEvidence") proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos_sdk.codec.std.v1.MsgSubmitProposal") + golang_proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos_sdk.codec.std.v1.MsgSubmitProposal") proto.RegisterType((*Proposal)(nil), "cosmos_sdk.codec.std.v1.Proposal") + golang_proto.RegisterType((*Proposal)(nil), "cosmos_sdk.codec.std.v1.Proposal") proto.RegisterType((*Content)(nil), "cosmos_sdk.codec.std.v1.Content") + golang_proto.RegisterType((*Content)(nil), "cosmos_sdk.codec.std.v1.Content") proto.RegisterType((*Transaction)(nil), "cosmos_sdk.codec.std.v1.Transaction") + golang_proto.RegisterType((*Transaction)(nil), "cosmos_sdk.codec.std.v1.Transaction") proto.RegisterType((*Message)(nil), "cosmos_sdk.codec.std.v1.Message") + golang_proto.RegisterType((*Message)(nil), "cosmos_sdk.codec.std.v1.Message") proto.RegisterType((*SignDoc)(nil), "cosmos_sdk.codec.std.v1.SignDoc") + golang_proto.RegisterType((*SignDoc)(nil), "cosmos_sdk.codec.std.v1.SignDoc") } func init() { proto.RegisterFile("codec/std/codec.proto", fileDescriptor_daf09dc2dfa19bb4) } +func init() { golang_proto.RegisterFile("codec/std/codec.proto", fileDescriptor_daf09dc2dfa19bb4) } var fileDescriptor_daf09dc2dfa19bb4 = []byte{ - // 1479 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0xd4, 0x46, - 0x1b, 0xf7, 0xc2, 0x92, 0x84, 0x49, 0x80, 0x30, 0x2f, 0xbc, 0x59, 0xe5, 0x85, 0x4d, 0x08, 0xbc, - 0xa8, 0x05, 0x65, 0xcd, 0x47, 0x5b, 0x60, 0xd5, 0x0a, 0xf2, 0x01, 0x5a, 0xaa, 0xa6, 0x45, 0x0e, - 0xa4, 0x6a, 0x45, 0x6b, 0xcd, 0x7a, 0x06, 0x67, 0x9a, 0xb5, 0xc7, 0xf5, 0x8c, 0x37, 0x9b, 0x43, - 0xef, 0x6d, 0xa5, 0x4a, 0x55, 0xfb, 0x0f, 0xa0, 0xf6, 0xd8, 0x2b, 0xc7, 0x9e, 0x2b, 0xc4, 0x89, - 0x63, 0x4f, 0xa8, 0x82, 0x4b, 0xd5, 0xbf, 0xa2, 0x9a, 0x0f, 0x7b, 0xed, 0x5d, 0xef, 0x86, 0x1e, - 0x7a, 0x89, 0x3c, 0xf3, 0x3c, 0xbf, 0xdf, 0xf3, 0xf3, 0xcc, 0xf3, 0xe1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- 0x0a, 0x6d, 0x82, 0x49, 0x59, 0xce, 0x24, 0xeb, 0x0b, 0x8b, 0x23, 0x75, 0xae, 0x69, 0x3f, 0x27, - 0x05, 0xe4, 0x54, 0xfe, 0x58, 0x01, 0x53, 0x99, 0xb8, 0x9b, 0x05, 0x71, 0x67, 0x4a, 0xc5, 0x8d, - 0xd5, 0x74, 0xeb, 0x1f, 0x6b, 0x5a, 0xad, 0x4a, 0x8a, 0xbe, 0xb2, 0xaa, 0x52, 0xf5, 0xb8, 0x0a, - 0x26, 0x8d, 0x03, 0xbc, 0x06, 0xaa, 0x82, 0xf4, 0xc4, 0x58, 0x51, 0xf7, 0x49, 0x2f, 0x3b, 0xac, - 0x96, 0xe5, 0x28, 0x00, 0x7c, 0x08, 0x66, 0x55, 0x87, 0x27, 0x82, 0xc4, 0xae, 0xb7, 0x8d, 0x42, - 0x3f, 0xbd, 0xd1, 0x81, 0x24, 0xd1, 0x73, 0x40, 0xbd, 0x5c, 0xea, 0xbf, 0xa6, 0xdc, 0x73, 0x94, - 0xc7, 0xa2, 0xa2, 0x09, 0x7e, 0x06, 0x66, 0x39, 0x7b, 0x24, 0x76, 0x51, 0x4c, 0x5c, 0x33, 0x23, - 0x4c, 0xab, 0xbc, 0x54, 0x64, 0x37, 0x46, 0x55, 0xbe, 0x06, 0xf0, 0x40, 0x6f, 0xe5, 0xe9, 0x79, - 0xd1, 0x04, 0x23, 0x30, 0xe7, 0xa1, 0xd0, 0x23, 0x1d, 0x77, 0x28, 0x4a, 0xb5, 0x6c, 0x0a, 0xe4, - 0xa2, 0xac, 0x29, 0xdc, 0xe8, 0x58, 0x27, 0xbd, 0x32, 0x07, 0xd8, 0x01, 0x27, 0x3c, 0x16, 0x04, - 0x49, 0x48, 0xc5, 0x9e, 0x1b, 0x31, 0xd6, 0x71, 0x79, 0x44, 0x42, 0x6c, 0xfa, 0xe4, 0xf5, 0x62, - 0xb8, 0xfc, 0xa8, 0xd7, 0xb7, 0x69, 0x90, 0xf7,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x17, 0x9e, 0x3d, - 0x59, 0x3e, 0x3f, 0x76, 0xce, 0xe9, 0x09, 0x27, 0x15, 0x9a, 0xe9, 0xf6, 0x5d, 0x05, 0x4c, 0x6e, - 0x52, 0x3f, 0x5c, 0x67, 0x1e, 0xbc, 0x53, 0x98, 0x6c, 0xe7, 0x46, 0x4e, 0x36, 0xe3, 0xff, 0x6f, - 0x8c, 0xb7, 0xd5, 0x5b, 0x4f, 0x5f, 0xd6, 0x2b, 0xcf, 0x5f, 0xd6, 0x2b, 0x7f, 0xbc, 0xac, 0x57, - 0xbe, 0x7f, 0x55, 0xb7, 0x9e, 0xbf, 0xaa, 0x5b, 0xbf, 0xbf, 0xaa, 0x5b, 0x9f, 0x8e, 0x7f, 0xb1, - 0xec, 0x7f, 0x21, 0xed, 0x09, 0xf5, 0xa3, 0xf9, 0xea, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb6, - 0xc7, 0x0e, 0x8b, 0x1f, 0x11, 0x00, 0x00, + // 1485 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0xb6, 0xdb, 0x6d, 0x92, 0x4e, 0xd2, 0x36, 0x1d, 0x5a, 0xb2, 0x0a, 0xed, 0x26, 0x4d, 0x4b, + 0x05, 0xad, 0xb2, 0xee, 0x07, 0xd0, 0x76, 0x05, 0x2a, 0xd9, 0xa4, 0xd5, 0x16, 0x11, 0xa8, 0x9c, + 0x36, 0x08, 0x54, 0xb0, 0x66, 0xed, 0xa9, 0x33, 0x64, 0xed, 0x31, 0x9e, 0xf1, 0x66, 0x73, 0xe0, + 0x0e, 0x48, 0x48, 0x08, 0xfe, 0x40, 0x05, 0x47, 0xae, 0x3d, 0x72, 0xe0, 0x84, 0xaa, 0x9e, 0x7a, + 0xe4, 0x54, 0xa1, 0xe6, 0x82, 0xf8, 0x15, 0x68,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 0x7e, 0x59, 0xf6, 0x5c, 0xbb, 0xe9, 0xb3, 0x67, 0x83, 0xed, 0x86, 0xaa, 0xc5, 0x2e, 0xe5, + 0xb8, 0x0a, 0x24, 0xe5, 0xa9, 0x51, 0x93, 0x77, 0x93, 0x72, 0xac, 0x4b, 0x51, 0x3c, 0xc2, 0x26, + 0x98, 0x16, 0x50, 0x0f, 0x47, 0x94, 0x11, 0x5e, 0x9d, 0x2e, 0x6b, 0x2f, 0x7d, 0xf4, 0x9a, 0x72, + 0x6b, 0x19, 0x36, 0x08, 0xb2, 0x15, 0x5c, 0x03, 0x62, 0xe5, 0x24, 0xe1, 0x97, 0x88, 0x74, 0xaa, + 0x33, 0x92, 0xe2, 0xec, 0xc0, 0x37, 0x9e, 0xfe, 0x19, 0xa3, 0x79, 0xee, 0x4b, 0xd7, 0x96, 0x61, + 0x1f, 0x0e, 0xd2, 0x05, 0x74, 0x54, 0x21, 0xbb, 0x31, 0x46, 0x1c, 0xf7, 0xd3, 0xae, 0x7a, 0x44, + 0xf2, 0x5d, 0x1c, 0xe0, 0x53, 0x3f, 0x7c, 0x34, 0xdd, 0xaa, 0xc4, 0x64, 0x29, 0xa4, 0x2b, 0x79, + 0x60, 0x17, 0x7e, 0x0a, 0xc4, 0xae, 0x83, 0x3d, 0xc2, 0x73, 0xf4, 0x47, 0x25, 0xfd, 0x9b, 0xe3, + 0xe8, 0x6f, 0x79, 0x84, 0xe7, 0xc9, 0x67, 0x83, 0x81, 0x3d, 0x78, 0x07, 0xcc, 0xa8, 0x53, 0x94, + 0xc5, 0x84, 0xab, 0xc7, 0x24, 0xe9, 0xb9, 0x71, 0xa4, 0xba, 0xf0, 0xc4, 0x65, 0x4c, 0x07, 0xfd, + 0x65, 0x7a, 0x0c, 0x6d, 0xec, 0x93, 0xd0, 0x89, 0x71, 0x46, 0x39, 0xbb, 0xff, 0x31, 0x34, 0x05, + 0xc6, 0xce, 0x20, 0xfa, 0x18, 0x06, 0x76, 0xe1, 0xc7, 0xaa, 0xf9, 0x26, 0x61, 0x46, 0x7d, 0xbc, + 0xec, 0x03, 0xb8, 0x48, 0x7d, 0x3f, 0xcc, 0xb1, 0x1e, 0x09, 0xf2, 0x1b, 0x8d, 0x0b, 0x4f, 0x1f, + 0x2f, 0x9f, 0x1f, 0x3b, 0xe7, 0xd4, 0x84, 0x13, 0x0a, 0xf5, 0x74, 0xfb, 0xde, 0x04, 0x93, 0x1b, + 0xc4, 0x0f, 0xd7, 0xa8, 0x0b, 0x6f, 0x17, 0x26, 0xdb, 0xb9, 0x91, 0x93, 0x4d, 0xfb, 0xff, 0x1f, + 0xe3, 0xad, 0xd9, 0x7a, 0xf2, 0xa2, 0x66, 0x3e, 0x7b, 0x51, 0x33, 0xff, 0x7a, 0x51, 0x33, 0x7f, + 0xd8, 0xab, 0x19, 0xbf, 0xef, 0xd5, 0xcc, 0x27, 0x7b, 0x35, 0xf3, 0xd9, 0x5e, 0xcd, 0xf8, 0x73, + 0xaf, 0x66, 0x7c, 0x36, 0xfe, 0x05, 0xb3, 0xff, 0x89, 0xb4, 0x27, 0xe4, 0x8f, 0xe7, 0xab, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x7c, 0x8c, 0xd4, 0x27, 0x11, 0x00, 0x00, } func (this *Supply) Equal(that interface{}) bool { diff --git a/codec/testdata/proto.pb.go b/codec/testdata/proto.pb.go index d92daf3ec229..c93154214891 100644 --- a/codec/testdata/proto.pb.go +++ b/codec/testdata/proto.pb.go @@ -6,6 +6,7 @@ package testdata import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -13,6 +14,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -74,6 +76,10 @@ func (m *Dog) GetName() string { return "" } +func (*Dog) XXX_MessageName() string { + return "cosmos_sdk.codec.v1.Dog" +} + type Cat struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` @@ -126,15 +132,21 @@ func (m *Cat) GetLives() int32 { return 0 } +func (*Cat) XXX_MessageName() string { + return "cosmos_sdk.codec.v1.Cat" +} func init() { proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") + golang_proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") + golang_proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") } func init() { proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } +func init() { golang_proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } var fileDescriptor_ae1353846770e6e2 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto + // 204 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x4f, 0x49, 0x4d, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xc2, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, @@ -142,12 +154,12 @@ var fileDescriptor_ae1353846770e6e2 = []byte{ 0xc5, 0x99, 0x55, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0x36, 0x48, 0x2c, 0x2f, 0x31, 0x37, 0x55, 0x82, 0x09, 0x22, 0x06, 0x62, 0x2b, 0x99, 0x72, 0x31, 0x3b, 0x27, 0x96, 0x08, 0x49, 0x70, 0xb1, 0xe7, 0xe6, 0xe7, 0x65, 0x66, 0xa7, 0x16, 0x41, 0x75, 0xc0, 0xb8, 0x42, 0x22, - 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x93, 0xeb, 0x89, + 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x93, 0xef, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, - 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, - 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xdc, 0x07, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x51, 0x7d, - 0x93, 0xc4, 0x06, 0xf6, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x64, 0x25, 0x07, 0xc7, 0xe6, - 0x00, 0x00, 0x00, + 0x81, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, + 0x43, 0x94, 0x76, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0x9d, + 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0x1f, 0xd5, 0x57, 0x49, 0x6c, 0x60, 0x0f, 0x19, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xed, 0x78, 0xf2, 0x5e, 0xee, 0x00, 0x00, 0x00, } func (m *Dog) Marshal() (dAtA []byte, err error) { diff --git a/go.mod b/go.mod index e5688a5754e4..9db41f5d394e 100644 --- a/go.mod +++ b/go.mod @@ -30,10 +30,9 @@ require ( github.com/tendermint/go-amino v0.15.1 github.com/tendermint/iavl v0.13.3 github.com/tendermint/tendermint v0.33.2 - github.com/tendermint/tm-db v0.5.0 + github.com/tendermint/tm-db v0.5.1 google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 google.golang.org/grpc v1.28.0 - github.com/tendermint/tm-db v0.5.1 google.golang.org/protobuf v1.20.1 // indirect gopkg.in/yaml.v2 v2.2.8 ) diff --git a/types/types.pb.go b/types/types.pb.go index 6b4d9813ab5f..919597d89bbd 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" types "github.com/tendermint/tendermint/abci/types" io "io" math "math" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -74,6 +76,10 @@ func (m *Coin) GetDenom() string { return "" } +func (*Coin) XXX_MessageName() string { + return "cosmos_sdk.v1.Coin" +} + // DecCoin defines a token with a denomination and a decimal amount. // // NOTE: The amount field is an Dec which implements the custom method @@ -122,6 +128,10 @@ func (m *DecCoin) GetDenom() string { return "" } +func (*DecCoin) XXX_MessageName() string { + return "cosmos_sdk.v1.DecCoin" +} + // IntProto defines a Protobuf wrapper around an Int object. type IntProto struct { Int Int `protobuf:"bytes,1,opt,name=int,proto3,customtype=Int" json:"int"` @@ -159,6 +169,10 @@ func (m *IntProto) XXX_DiscardUnknown() { var xxx_messageInfo_IntProto proto.InternalMessageInfo +func (*IntProto) XXX_MessageName() string { + return "cosmos_sdk.v1.IntProto" +} + // DecProto defines a Protobuf wrapper around a Dec object. type DecProto struct { Dec Dec `protobuf:"bytes,1,opt,name=dec,proto3,customtype=Dec" json:"dec"` @@ -196,6 +210,10 @@ func (m *DecProto) XXX_DiscardUnknown() { var xxx_messageInfo_DecProto proto.InternalMessageInfo +func (*DecProto) XXX_MessageName() string { + return "cosmos_sdk.v1.DecProto" +} + // ValAddresses defines a repeated set of validator addresses. type ValAddresses struct { Addresses []ValAddress `protobuf:"bytes,1,rep,name=addresses,proto3,casttype=ValAddress" json:"addresses,omitempty"` @@ -240,6 +258,10 @@ func (m *ValAddresses) GetAddresses() []ValAddress { return nil } +func (*ValAddresses) XXX_MessageName() string { + return "cosmos_sdk.v1.ValAddresses" +} + // GasInfo defines tx execution gas context. type GasInfo struct { // GasWanted is the maximum units of work we allow this tx to perform. @@ -294,6 +316,10 @@ func (m *GasInfo) GetGasUsed() uint64 { return 0 } +func (*GasInfo) XXX_MessageName() string { + return "cosmos_sdk.v1.GasInfo" +} + // Result is the union of ResponseFormat and ResponseCheckTx. type Result struct { // Data is any data returned from message or handler execution. It MUST be length @@ -338,6 +364,10 @@ func (m *Result) XXX_DiscardUnknown() { var xxx_messageInfo_Result proto.InternalMessageInfo +func (*Result) XXX_MessageName() string { + return "cosmos_sdk.v1.Result" +} + // SimulationResponse defines the response generated when a transaction is // successfully simulated. type SimulationResponse struct { @@ -384,55 +414,67 @@ func (m *SimulationResponse) GetResult() *Result { return nil } +func (*SimulationResponse) XXX_MessageName() string { + return "cosmos_sdk.v1.SimulationResponse" +} func init() { proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") + golang_proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") + golang_proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") + golang_proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") + golang_proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") + golang_proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") + golang_proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") + golang_proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") + golang_proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") } func init() { proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } +func init() { golang_proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } var fileDescriptor_2c0f90c600ad7e2e = []byte{ - // 534 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xb5, 0x7f, 0xf6, 0x2f, 0x7f, 0x36, 0xe1, 0x4f, 0x17, 0x8a, 0xa2, 0x0a, 0xec, 0xc8, 0x48, - 0x28, 0x48, 0xd4, 0x16, 0x29, 0xa7, 0x70, 0xc2, 0x04, 0x55, 0xe1, 0x84, 0x16, 0x01, 0x12, 0x97, - 0x68, 0xe3, 0xdd, 0xba, 0x56, 0xe3, 0xdd, 0xc8, 0xbb, 0x29, 0xca, 0x2d, 0x47, 0x8e, 0x7c, 0x84, - 0x7e, 0x9c, 0x1e, 0x73, 0xac, 0x10, 0xb2, 0x20, 0xb9, 0x70, 0xee, 0x91, 0x13, 0xda, 0xb5, 0xc1, - 0x6a, 0x7a, 0xe3, 0x92, 0xcc, 0xce, 0xbc, 0x79, 0x33, 0xf3, 0xfc, 0xc0, 0x8e, 0x5c, 0xcc, 0xa8, - 0x08, 0xf4, 0xaf, 0x3f, 0xcb, 0xb8, 0xe4, 0xf0, 0x46, 0xc4, 0x45, 0xca, 0xc5, 0x58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c, 0xe5, 0xda, 0x31, 0xce, 0xd7, 0x8e, 0xb9, - 0x5a, 0x3b, 0xe6, 0xf7, 0xb5, 0x63, 0x7e, 0xd9, 0x38, 0xc6, 0x6a, 0xe3, 0x18, 0x17, 0x1b, 0xc7, - 0xf8, 0xe8, 0xc5, 0x89, 0x3c, 0x9e, 0x4f, 0xfc, 0x88, 0xa7, 0x41, 0x41, 0x55, 0xfe, 0xed, 0x0b, - 0x72, 0x52, 0x18, 0x7c, 0x52, 0xd3, 0x0e, 0x3f, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe8, - 0xc3, 0x0c, 0x62, 0x03, 0x00, 0x00, + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3f, 0x8f, 0xd3, 0x4e, + 0x10, 0xf5, 0xfe, 0xec, 0x5f, 0xfe, 0x6c, 0xc2, 0x9f, 0x5b, 0x38, 0x14, 0x9d, 0xc0, 0x8e, 0x8c, + 0x84, 0x82, 0xc4, 0xd9, 0x22, 0x47, 0x15, 0x2a, 0x4c, 0xd0, 0x29, 0x88, 0x02, 0x19, 0x01, 0x12, + 0x4d, 0xb4, 0xf1, 0xee, 0xf9, 0xac, 0x8b, 0x77, 0x23, 0xef, 0xe6, 0x50, 0xba, 0x94, 0x94, 0x7c, + 0x84, 0xfb, 0x28, 0x94, 0x29, 0x53, 0x9e, 0x10, 0xb2, 0x20, 0x69, 0xa8, 0xaf, 0xa4, 0x42, 0xbb, + 0x0e, 0x58, 0x97, 0xeb, 0x68, 0x92, 0xd9, 0x99, 0x37, 0x6f, 0x66, 0x9e, 0x1f, 0xdc, 0x91, 0xb3, + 0x09, 0x15, 0xbe, 0xfe, 0xf5, 0x26, 0x19, 0x97, 0x1c, 0x5d, 0x8b, 0xb8, 0x48, 0xb9, 0x18, 0x0a, + 0x72, 0xe2, 0x9d, 0x3e, 0xde, 0x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 0x52, 0xa2, 0x87, 0x5a, 0xc1, + 0xee, 0x45, 0xee, 0xec, 0xcc, 0x70, 0x3a, 0xee, 0xb9, 0x65, 0xcd, 0x0d, 0xeb, 0x31, 0x16, 0xef, + 0x75, 0x8c, 0x3c, 0x58, 0x53, 0x95, 0xa9, 0xa0, 0x44, 0xeb, 0x60, 0x05, 0xb7, 0x2e, 0x72, 0xe7, + 0x46, 0xd9, 0xa3, 0x2a, 0x6e, 0x58, 0x8d, 0xb1, 0x78, 0xab, 0xa2, 0x09, 0xac, 0x84, 0x54, 0x4c, + 0xc7, 0x12, 0x21, 0x68, 0x11, 0x2c, 0xb1, 0x9e, 0xd4, 0x0c, 0x75, 0x8c, 0x6e, 0x42, 0x73, 0xcc, + 0xe3, 0x42, 0xd0, 0x50, 0x85, 0xa8, 0x07, 0x2b, 0xf4, 0x94, 0x32, 0x29, 0x5a, 0x66, 0xdb, 0xec, + 0x34, 0xba, 0x77, 0xbd, 0xd2, 0x03, 0x9e, 0xf2, 0x80, 0x57, 0x7c, 0xfd, 0x17, 0x0a, 0x14, 0x58, + 0x4a, 0xa4, 0x70, 0xd3, 0xd1, 0xb3, 0x3e, 0x9d, 0x39, 0x86, 0x3b, 0x07, 0x10, 0xbd, 0x49, 0xd2, + 0xe9, 0x18, 0xcb, 0x84, 0xb3, 0x90, 0x8a, 0x09, 0x67, 0x82, 0xa2, 0xa7, 0xc5, 0xe2, 0x09, 0x3b, + 0xe2, 0x7a, 0x85, 0x46, 0xf7, 0x8e, 0x77, 0xc9, 0xa7, 0xde, 0x46, 0x98, 0xa0, 0xa6, 0x48, 0x97, + 0xb9, 0x03, 0xf4, 0x15, 0x5a, 0xab, 0x7d, 0x58, 0xc9, 0xf4, 0x15, 0x7a, 0xd5, 0x46, 0x77, 0x77, + 0xab, 0xb5, 0x38, 0x31, 0xdc, 0x80, 0x82, 0x57, 0xe7, 0x3f, 0x6c, 0x63, 0xbe, 0xb2, 0x8d, 0xc5, + 0xca, 0x06, 0xcb, 0x95, 0x0d, 0xbe, 0xaf, 0x6c, 0xf0, 0x79, 0x6d, 0x1b, 0x5f, 0xd6, 0x36, 0x58, + 0xac, 0x6d, 0xb0, 0x5c, 0xdb, 0xc6, 0xf9, 0xda, 0x36, 0x3e, 0xb8, 0x71, 0x22, 0x8f, 0xa7, 0x23, + 0x2f, 0xe2, 0xa9, 0x5f, 0x50, 0x6e, 0xfe, 0xf6, 0x05, 0x39, 0x29, 0x8c, 0x3e, 0xaa, 0x68, 0xa7, + 0x1f, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x16, 0xa1, 0x9c, 0x6a, 0x03, 0x00, 0x00, } func (this *Coin) Equal(that interface{}) bool { diff --git a/x/auth/types/types.pb.go b/x/auth/types/types.pb.go index 69e8d5a86018..9ed1f92ed060 100644 --- a/x/auth/types/types.pb.go +++ b/x/auth/types/types.pb.go @@ -9,6 +9,7 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -16,6 +17,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -67,6 +69,10 @@ func (m *BaseAccount) XXX_DiscardUnknown() { var xxx_messageInfo_BaseAccount proto.InternalMessageInfo +func (*BaseAccount) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.BaseAccount" +} + // StdFee includes the amount of coins paid in fees and the maximum // gas to be used by the transaction. The ratio yields an effective "gasprice", // which must be above some miminum to be accepted into the mempool. @@ -108,6 +114,10 @@ func (m *StdFee) XXX_DiscardUnknown() { var xxx_messageInfo_StdFee proto.InternalMessageInfo +func (*StdFee) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.StdFee" +} + // StdSignature defines a signature structure that contains the signature of a // transaction and an optional public key. type StdSignature struct { @@ -148,6 +158,10 @@ func (m *StdSignature) XXX_DiscardUnknown() { var xxx_messageInfo_StdSignature proto.InternalMessageInfo +func (*StdSignature) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.StdSignature" +} + // Params defines the parameters for the auth module. type Params struct { MaxMemoCharacters uint64 `protobuf:"varint,1,opt,name=max_memo_characters,json=maxMemoCharacters,proto3" json:"max_memo_characters,omitempty" yaml:"max_memo_characters"` @@ -224,6 +238,10 @@ func (m *Params) GetSigVerifyCostSecp256k1() uint64 { return 0 } +func (*Params) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.Params" +} + // StdTxBase defines a transaction base which application-level concrete transaction // types can extend. type StdTxBase struct { @@ -286,6 +304,10 @@ func (m *StdTxBase) GetMemo() string { return "" } +func (*StdTxBase) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.StdTxBase" +} + // StdSignDocBase defines the base structure for which applications can extend // to define the concrete structure that signers sign over. type StdSignDocBase struct { @@ -364,70 +386,80 @@ func (m *StdSignDocBase) GetFee() StdFee { return StdFee{} } +func (*StdSignDocBase) XXX_MessageName() string { + return "cosmos_sdk.x.auth.v1.StdSignDocBase" +} func init() { proto.RegisterType((*BaseAccount)(nil), "cosmos_sdk.x.auth.v1.BaseAccount") + golang_proto.RegisterType((*BaseAccount)(nil), "cosmos_sdk.x.auth.v1.BaseAccount") proto.RegisterType((*StdFee)(nil), "cosmos_sdk.x.auth.v1.StdFee") + golang_proto.RegisterType((*StdFee)(nil), "cosmos_sdk.x.auth.v1.StdFee") proto.RegisterType((*StdSignature)(nil), "cosmos_sdk.x.auth.v1.StdSignature") + golang_proto.RegisterType((*StdSignature)(nil), "cosmos_sdk.x.auth.v1.StdSignature") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.auth.v1.Params") + golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.auth.v1.Params") proto.RegisterType((*StdTxBase)(nil), "cosmos_sdk.x.auth.v1.StdTxBase") + golang_proto.RegisterType((*StdTxBase)(nil), "cosmos_sdk.x.auth.v1.StdTxBase") proto.RegisterType((*StdSignDocBase)(nil), "cosmos_sdk.x.auth.v1.StdSignDocBase") + golang_proto.RegisterType((*StdSignDocBase)(nil), "cosmos_sdk.x.auth.v1.StdSignDocBase") } func init() { proto.RegisterFile("x/auth/types/types.proto", fileDescriptor_2d526fa662daab74) } +func init() { golang_proto.RegisterFile("x/auth/types/types.proto", fileDescriptor_2d526fa662daab74) } var fileDescriptor_2d526fa662daab74 = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0x37, 0x6e, 0x36, 0x99, 0x5d, 0x0a, 0x99, 0x4d, 0xdb, 0x34, 0x5a, 0x79, 0x22, 0x1f, - 0x50, 0x90, 0x58, 0x87, 0x04, 0x16, 0x69, 0x73, 0x40, 0xac, 0xb3, 0x54, 0x54, 0x85, 0xaa, 0x9a, - 0x20, 0x0e, 0x48, 0xc8, 0x9a, 0xd8, 0x53, 0xc7, 0xca, 0x3a, 0x76, 0x3d, 0xe3, 0x55, 0xbc, 0x57, - 0x2e, 0x88, 0x13, 0xc7, 0xde, 0xd8, 0x33, 0x7f, 0x49, 0x8f, 0x3d, 0x72, 0x72, 0x51, 0xf6, 0x82, - 0x38, 0x9a, 0x1b, 0x27, 0x34, 0x9e, 0xfc, 0x2c, 0x29, 0xa2, 0xda, 0x4b, 0x32, 0xf3, 0xe6, 0xfb, - 0xbe, 0xf7, 0xf2, 0xe6, 0x9b, 0x17, 0x50, 0x9f, 0xb6, 0x49, 0xcc, 0x47, 0x6d, 0x9e, 0x84, 0x94, - 0xc9, 0x4f, 0x23, 0x8c, 0x02, 0x1e, 0xc0, 0x9a, 0x1d, 0x30, 0x3f, 0x60, 0x16, 0x73, 0xc6, 0xc6, - 0xd4, 0x10, 0x20, 0xe3, 0xa2, 0xd3, 0x78, 0x9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xc9, 0x2f, 0xb2, 0x82, 0xf3, 0xb5, 0xfe, 0x97, 0x02, - 0x6e, 0xcf, 0x69, 0x67, 0x81, 0x9d, 0x97, 0x79, 0x02, 0xca, 0xf6, 0x88, 0x78, 0x13, 0xcb, 0x73, - 0xf2, 0x5a, 0x2b, 0xa6, 0x36, 0x4b, 0xd1, 0x6e, 0x5f, 0xc4, 0x1e, 0x9e, 0x65, 0x29, 0x7a, 0x57, - 0x76, 0x66, 0x01, 0xd2, 0xf1, 0x6e, 0xbe, 0x7c, 0xe8, 0x6c, 0x99, 0x1d, 0x3b, 0x37, 0x98, 0x1d, - 0xc5, 0xcd, 0xd9, 0xb1, 0xac, 0x5f, 0x5d, 0xd5, 0xbf, 0xe8, 0xe9, 0xad, 0xb7, 0xea, 0xa9, 0xd9, - 0x7f, 0x31, 0xd3, 0x94, 0x97, 0x33, 0x4d, 0xf9, 0x7d, 0xa6, 0x29, 0x3f, 0x5f, 0x6b, 0x85, 0x97, - 0xd7, 0x5a, 0xe1, 0xb7, 0x6b, 0xad, 0xf0, 0xdd, 0x07, 0xff, 0x39, 0x5d, 0xd6, 0xff, 0x2a, 0x86, - 0xa5, 0x7c, 0xa8, 0x7f, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xb1, 0x78, 0x7e, 0x41, - 0x06, 0x00, 0x00, + // 811 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x1b, 0x6f, 0xda, 0x4e, 0xcb, 0x42, 0xa6, 0xd9, 0xdd, 0x6c, 0x54, 0x79, 0x22, 0x1f, + 0x50, 0x90, 0xa8, 0x43, 0x02, 0x45, 0x6a, 0x0e, 0x88, 0x3a, 0x65, 0xc5, 0xaa, 0xb0, 0x5a, 0x4d, + 0x10, 0x07, 0x24, 0x64, 0x4d, 0xec, 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7e, 0x9d, 0x6a, 0x85, 0x6f, + 0xde, 0xfb, 0xd7, 0x29, 0xb3, 0xfa, 0x97, 0xd1, 0x2f, 0xe5, 0xc3, 0xfd, 0xc3, 0xbf, 0x03, 0x00, + 0x00, 0xff, 0xff, 0xa0, 0xb0, 0x95, 0xb5, 0x49, 0x06, 0x00, 0x00, } func (this *StdFee) Equal(that interface{}) bool { diff --git a/x/auth/vesting/types/types.pb.go b/x/auth/vesting/types/types.pb.go index adfa4af2ee88..b643ccdda662 100644 --- a/x/auth/vesting/types/types.pb.go +++ b/x/auth/vesting/types/types.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -68,6 +70,10 @@ func (m *BaseVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_BaseVestingAccount proto.InternalMessageInfo +func (*BaseVestingAccount) XXX_MessageName() string { + return "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount" +} + // ContinuousVestingAccount implements the VestingAccount interface. It // continuously vests by unlocking coins linearly with respect to time. type ContinuousVestingAccount struct { @@ -107,6 +113,10 @@ func (m *ContinuousVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_ContinuousVestingAccount proto.InternalMessageInfo +func (*ContinuousVestingAccount) XXX_MessageName() string { + return "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount" +} + // DelayedVestingAccount implements the VestingAccount interface. It vests all // coins after a specific time, but non prior. In other words, it keeps them // locked until a specified time. @@ -146,6 +156,10 @@ func (m *DelayedVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_DelayedVestingAccount proto.InternalMessageInfo +func (*DelayedVestingAccount) XXX_MessageName() string { + return "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount" +} + // Period defines a length of time and amount of coins that will vest type Period struct { Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` @@ -198,6 +212,10 @@ func (m *Period) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (*Period) XXX_MessageName() string { + return "cosmos_sdk.x.auth.vesting.v1.Period" +} + // PeriodicVestingAccount implements the VestingAccount interface. It // periodically vests by unlocking coins during each specified period type PeriodicVestingAccount struct { @@ -238,56 +256,67 @@ func (m *PeriodicVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_PeriodicVestingAccount proto.InternalMessageInfo +func (*PeriodicVestingAccount) XXX_MessageName() string { + return "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount" +} func init() { proto.RegisterType((*BaseVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount") + golang_proto.RegisterType((*BaseVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount") proto.RegisterType((*ContinuousVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount") + golang_proto.RegisterType((*ContinuousVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount") proto.RegisterType((*DelayedVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount") + golang_proto.RegisterType((*DelayedVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount") proto.RegisterType((*Period)(nil), "cosmos_sdk.x.auth.vesting.v1.Period") + golang_proto.RegisterType((*Period)(nil), "cosmos_sdk.x.auth.vesting.v1.Period") proto.RegisterType((*PeriodicVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount") + golang_proto.RegisterType((*PeriodicVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount") } func init() { proto.RegisterFile("x/auth/vesting/types/types.proto", fileDescriptor_b7f744d63a45e116) } +func init() { + golang_proto.RegisterFile("x/auth/vesting/types/types.proto", fileDescriptor_b7f744d63a45e116) +} var fileDescriptor_b7f744d63a45e116 = []byte{ - // 593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x4f, 0x8f, 0xd2, 0x40, - 0x1c, 0xed, 0x2c, 0x88, 0xeb, 0xa0, 0xcb, 0xd2, 0x15, 0x6c, 0x88, 0x69, 0xb1, 0x31, 0x86, 0x8b, - 0xd3, 0x65, 0xf5, 0xc4, 0xcd, 0xae, 0x31, 0xd1, 0xf5, 0x60, 0x1a, 0xe3, 0xc1, 0xc4, 0x34, 0x85, - 0x8e, 0x65, 0xb2, 0xb4, 0x43, 0x3a, 0x03, 0x59, 0x3e, 0xc0, 0x26, 0x26, 0x9b, 0x18, 0x8f, 0x1e, - 0xf7, 0xec, 0xcd, 0x8f, 0x60, 0xe2, 0x61, 0x8f, 0x1c, 0x3d, 0xa1, 0x81, 0x6f, 0xc0, 0x27, 0x30, - 0x74, 0x06, 0x58, 0xcb, 0x2e, 0xc9, 0x7a, 0x30, 0xf1, 0x02, 0x9d, 0x3f, 0xef, 0xfd, 0xde, 0xfb, - 0xcd, 0x9b, 0x16, 0x56, 0x8f, 0x2c, 0xaf, 0xc7, 0xdb, 0x56, 0x1f, 0x33, 0x4e, 0xa2, 0xc0, 0xe2, - 0x83, 0x2e, 0x66, 0xe2, 0x17, 0x75, 0x63, 0xca, 0xa9, 0x7a, 0xb7, 0x45, 0x59, 0x48, 0x99, 0xcb, - 0xfc, 0x43, 0x74, 0x84, 0x66, 0x9b, 0x91, 0xdc, 0x8c, 0xfa, 0xf5, 0xca, 0x03, 0xde, 0x26, 0xb1, - 0xef, 0x76, 0xbd, 0x98, 0x0f, 0xac, 0x04, 0x60, 0x05, 0x34, 0xa0, 0xcb, 0x27, 0xc1, 0x52, 0x29, - 0xae, 0x10, 0x57, 0x34, 0x59, 0x7a, 0x65, 0xc5, 0xfc, 0x96, 0x85, 0xaa, 0xed, 0x31, 0xfc, 0x46, - 0xd4, 0x79, 0xd2, 0x6a, 0xd1, 0x5e, 0xc4, 0xd5, 0x17, 0xf0, 0x66, 0xd3, 0x63, 0xd8, 0xf5, 0xc4, - 0x58, 0x03, 0x55, 0x50, 0xcb, 0xef, 0xdd, 0x43, 0x17, 0x08, 0xac, 0xa3, 0x19, 0x5e, 0x02, 0xed, - 0xec, 0x70, 0x64, 0x00, 0x27, 0xdf, 0x5c, 0x4e, 0xa9, 0x27, 0x00, 0x6e, 0xd3, 0x98, 0x04, 0x24, - 0xf2, 0x3a, 0xae, 0xf4, 0xa3, 0x6d, 0x54, 0x33, 0xb5, 0xfc, 0xde, 0xce, 0x79, 0xc2, 0x7e, 0x1d, - 0xed, 0x53, 0x12, 0xd9, 0x07, 0x67, 0x23, 0x43, 0x99, 0x8e, 0x8c, 0x3b, 0x03, 0x2f, 0xec, 0x34, - 0xcc, 0x34, 0xd4, 0xfc, 0xf2, 0xd3, 0xa8, 0x05, 0x84, 0xb7, 0x7b, 0x4d, 0xd4, 0xa2, 0xa1, 0x25, - 0x18, 0xe4, 0xdf, 0x43, 0xe6, 0x1f, 0x4a, 0x7f, 0x33, 0x2e, 0xe6, 0x14, 0xe6, 0x70, 0x69, 0x50, - 0x3d, 0x06, 0x70, 0xcb, 0xc7, 0x1d, 0x1c, 0x78, 0x1c, 0xfb, 0xee, 0xfb, 0x18, 0x63, 0x2d, 0x73, - 0xb9, 0x96, 0xe7, 0x52, 0x4b, 0x49, 0x68, 0xf9, 0x13, 0x78, 0x35, 0x25, 0xb7, 0x16, 0xe0, 0x67, - 0x31, 0xc6, 0xea, 0x47, 0x00, 0x8b, 0x4b, 0xba, 0x79, 0x5b, 0xb2, 0x97, 0x4b, 0x79, 0x29, 0xa5, - 0x68, 0x69, 0x29, 0x7f, 0xd5, 0x97, 0xed, 0x05, 0x7e, 0xde, 0x18, 0x04, 0x37, 0x71, 0xe4, 0xbb, - 0x9c, 0x84, 0x58, 0xbb, 0x56, 0x05, 0xb5, 0x8c, 0xbd, 0x33, 0x1d, 0x19, 0x05, 0x51, 0x6d, 0xbe, - 0x62, 0x3a, 0xd7, 0x71, 0xe4, 0xbf, 0x26, 0x21, 0x6e, 0x6c, 0x7e, 0x38, 0x35, 0x94, 0xcf, 0xa7, - 0x86, 0x62, 0x7e, 0x07, 0x50, 0xdb, 0xa7, 0x11, 0x27, 0x51, 0x8f, 0xf6, 0x58, 0x2a, 0x49, 0x6d, - 0x78, 0x3b, 0x49, 0x92, 0x54, 0x99, 0x4a, 0xd4, 0x2e, 0x5a, 0x17, 0x79, 0xb4, 0x9a, 0x4c, 0x19, - 0x30, 0xb5, 0xb9, 0x9a, 0xd9, 0xc7, 0x10, 0x32, 0xee, 0xc5, 0x5c, 0x58, 0xd8, 0x48, 0x2c, 0x94, - 0xa6, 0x23, 0xa3, 0x28, 0x2c, 0x2c, 0xd7, 0x4c, 0xe7, 0x46, 0x32, 0x48, 0xd9, 0x38, 0x01, 0xb0, - 0xf4, 0x14, 0x77, 0xbc, 0xc1, 0xa2, 0x27, 0xff, 0xdc, 0xc3, 0x39, 0x35, 0xc7, 0x00, 0xe6, 0x5e, - 0xe1, 0x98, 0x50, 0x5f, 0x2d, 0xc3, 0x5c, 0x07, 0x47, 0x01, 0x6f, 0x27, 0x05, 0x33, 0x8e, 0x1c, - 0xa9, 0xef, 0x60, 0xce, 0x0b, 0x13, 0x21, 0x6b, 0x6e, 0xd3, 0xee, 0x2c, 0x36, 0x57, 0x8a, 0x86, - 0x24, 0x6d, 0x64, 0x13, 0x1d, 0x5f, 0x37, 0x60, 0x59, 0xe8, 0x20, 0xad, 0xff, 0xeb, 0x68, 0xd5, - 0x10, 0x16, 0xe6, 0xd2, 0xba, 0x89, 0x03, 0x26, 0xaf, 0xfa, 0xfd, 0xf5, 0xd2, 0x84, 0x5d, 0x5b, - 0x97, 0x17, 0xae, 0x2c, 0x8a, 0xa4, 0xa8, 0x4c, 0x67, 0x4b, 0xce, 0x88, 0xed, 0x6c, 0x79, 0x76, - 0xf6, 0xc1, 0xd9, 0x58, 0x07, 0xc3, 0xb1, 0x0e, 0x7e, 0x8d, 0x75, 0xf0, 0x69, 0xa2, 0x2b, 0xc3, - 0x89, 0xae, 0xfc, 0x98, 0xe8, 0xca, 0xdb, 0xfa, 0xda, 0x53, 0xb8, 0xe8, 0x03, 0xd1, 0xcc, 0x25, - 0x2f, 0xea, 0x47, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x89, 0x54, 0xae, 0x4f, 0x3f, 0x06, 0x00, - 0x00, + // 602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x4d, 0x8f, 0xd2, 0x4e, + 0x1c, 0xee, 0x2c, 0xfc, 0xf9, 0xaf, 0xb3, 0xba, 0x2c, 0x5d, 0xc1, 0x86, 0x98, 0x16, 0x1b, 0x63, + 0xb8, 0x38, 0x5d, 0x56, 0x4f, 0xdc, 0xec, 0x1a, 0x13, 0x5f, 0x0e, 0xa6, 0x1a, 0x0f, 0x26, 0xa6, + 0x29, 0x74, 0x2c, 0x93, 0xa5, 0x1d, 0xd2, 0x19, 0xc8, 0xf2, 0x01, 0x36, 0x31, 0xd9, 0xc4, 0x78, + 0xf4, 0xb8, 0x67, 0x6f, 0x7e, 0x03, 0x4d, 0x3c, 0x70, 0xe4, 0xe8, 0x09, 0x0d, 0x7c, 0x03, 0x3e, + 0x81, 0xa1, 0x33, 0xc0, 0x5a, 0x76, 0x49, 0xd6, 0x83, 0x89, 0x17, 0xe8, 0xbc, 0x3c, 0xcf, 0xef, + 0x79, 0x7e, 0xf3, 0x4c, 0x0b, 0x2b, 0x47, 0x96, 0xd7, 0xe5, 0x2d, 0xab, 0x87, 0x19, 0x27, 0x51, + 0x60, 0xf1, 0x7e, 0x07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, 0x91, 0xfa, 0x06, 0xe6, 0xbc, 0x30, 0x11, 0xb2, 0xe6, 0x36, 0xed, 0xcd, 0x62, 0x73, + 0xa9, 0x68, 0x48, 0xd2, 0x7a, 0x36, 0xd1, 0xf1, 0x79, 0x03, 0x96, 0x84, 0x0e, 0xd2, 0xfc, 0xb7, + 0x8e, 0x56, 0x0d, 0x61, 0x7e, 0x2e, 0xad, 0x93, 0x38, 0x60, 0xf2, 0xaa, 0xdf, 0x5e, 0x2f, 0x4d, + 0xd8, 0xb5, 0x75, 0x79, 0xe1, 0x4a, 0xa2, 0x48, 0x8a, 0xca, 0x74, 0xb6, 0xe5, 0x8c, 0xd8, 0xce, + 0x96, 0x67, 0x67, 0xbf, 0x18, 0x8c, 0x75, 0x30, 0x1c, 0xeb, 0xe0, 0xe7, 0x58, 0x07, 0x1f, 0x26, + 0xba, 0xf2, 0x65, 0xa2, 0x83, 0xc1, 0x44, 0x07, 0xc3, 0x89, 0xae, 0x7c, 0x9f, 0xe8, 0xca, 0xeb, + 0xda, 0xda, 0xd3, 0x38, 0xef, 0x43, 0xd1, 0xc8, 0x25, 0x2f, 0xec, 0x7b, 0xbf, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x75, 0x57, 0x42, 0xcc, 0x47, 0x06, 0x00, 0x00, } func (m *BaseVestingAccount) Marshal() (dAtA []byte, err error) { diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index 3a7ae288edbd..04a646116b29 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -12,6 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -23,6 +24,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -93,6 +95,10 @@ func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (*MsgSend) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.MsgSend" +} + // Input models transaction input type Input struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -146,6 +152,10 @@ func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (*Input) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.Input" +} + // Output models transaction outputs type Output struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -199,6 +209,10 @@ func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +func (*Output) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.Output" +} + // MsgMultiSend - high level transaction of the coin module type MsgMultiSend struct { Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` @@ -252,6 +266,10 @@ func (m *MsgMultiSend) GetOutputs() []Output { return nil } +func (*MsgMultiSend) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.MsgMultiSend" +} + // QueryBalanceParams defines the params for querying an account balance. type QueryBalanceParams struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -305,6 +323,10 @@ func (m *QueryBalanceParams) GetDenom() string { return "" } +func (*QueryBalanceParams) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryBalanceParams" +} + // QueryAllBalancesParams defines the params for querying all account balances type QueryAllBalancesParams struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -350,6 +372,10 @@ func (m *QueryAllBalancesParams) GetAddress() github_com_cosmos_cosmos_sdk_types return nil } +func (*QueryAllBalancesParams) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryAllBalancesParams" +} + type QueryAllBalancesResponse struct { Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` } @@ -394,58 +420,70 @@ func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_ty return nil } +func (*QueryAllBalancesResponse) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse" +} func init() { proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") + golang_proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") + golang_proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") + golang_proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") + golang_proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") proto.RegisterType((*QueryBalanceParams)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceParams") + golang_proto.RegisterType((*QueryBalanceParams)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceParams") proto.RegisterType((*QueryAllBalancesParams)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesParams") + golang_proto.RegisterType((*QueryAllBalancesParams)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesParams") proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") + golang_proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") } func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } +func init() { golang_proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 602 bytes of a gzipped FileDescriptorProto + // 610 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0xe3, 0xb4, 0x49, 0xe8, 0x35, 0x03, 0xbd, 0x56, 0x28, 0x0a, 0xc8, 0xae, 0x3c, 0xa0, - 0x80, 0xe8, 0x5d, 0x53, 0x06, 0x44, 0xc5, 0x92, 0x54, 0x42, 0x20, 0x14, 0x01, 0x61, 0x03, 0xa1, - 0xe8, 0x62, 0x1b, 0xd7, 0x8a, 0xed, 0xb3, 0x7c, 0xe7, 0xd0, 0xa8, 0xca, 0xc2, 0xc0, 0x86, 0x84, - 0xc4, 0x3f, 0x80, 0x18, 0xd9, 0x11, 0xcc, 0x4c, 0x1d, 0x2b, 0xb1, 0x30, 0x05, 0x94, 0x30, 0x30, - 0x77, 0x64, 0x42, 0x3e, 0x5f, 0x9a, 0xd0, 0x44, 0x51, 0x41, 0x61, 0xe8, 0x92, 0xc4, 0xb9, 0xf7, - 0xbd, 0xdf, 0x77, 0xdf, 0xcb, 0xe5, 0x40, 0x61, 0x0f, 0x37, 0x89, 0xdf, 0xc2, 0xbc, 0x13, 0x58, - 0x2c, 0x79, 0x45, 0x41, 0x48, 0x39, 0x85, 0x6b, 0x06, 0x65, 0x1e, 0x65, 0x0d, 0x66, 0xb6, 0xd0, - 0x1e, 0x8a, 0x8b, 0x50, 0xbb, 0x5c, 0xbc, 0xcc, 0x77, 0x9d, 0xd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2, 0x65, 0x88, 0xf1, 0x68, 0x11, 0xcb, 0x7f, 0xec, 0x76, 0x19, - 0x4b, 0x07, 0x78, 0x5f, 0x06, 0xd1, 0xc5, 0xfb, 0x22, 0xf7, 0x2e, 0x7c, 0xa7, 0x80, 0xf3, 0x27, - 0x23, 0x81, 0xd7, 0x66, 0x98, 0x99, 0x98, 0x50, 0x11, 0x9d, 0xae, 0x7a, 0x18, 0xb4, 0xbe, 0x29, - 0xbc, 0x5e, 0x85, 0xa5, 0x99, 0x5e, 0xd9, 0xc8, 0x6c, 0x75, 0xe7, 0xa0, 0xaf, 0x2a, 0x87, 0x7d, - 0x55, 0xf9, 0xde, 0x57, 0x95, 0xd7, 0x03, 0x35, 0x75, 0x38, 0x50, 0x53, 0x5f, 0x07, 0x6a, 0xea, - 0xf1, 0x95, 0x99, 0x53, 0x18, 0xbf, 0xb2, 0x9a, 0x59, 0x71, 0x59, 0x5c, 0xff, 0x1d, 0x00, 0x00, - 0xff, 0xff, 0xb6, 0xc7, 0xe3, 0x3e, 0xc9, 0x06, 0x00, 0x00, + 0x14, 0xc6, 0x73, 0x69, 0x93, 0xd2, 0x6b, 0x06, 0x7a, 0xad, 0x50, 0x14, 0x90, 0x5d, 0x79, 0x40, + 0x01, 0xd1, 0xbb, 0xa6, 0x0c, 0x88, 0x8a, 0x25, 0x41, 0x42, 0xa0, 0x2a, 0x02, 0xc2, 0x06, 0x42, + 0xd1, 0xc5, 0x36, 0xae, 0x15, 0xdb, 0x67, 0xf9, 0xce, 0xa1, 0x51, 0x95, 0x85, 0x81, 0x0d, 0x09, + 0x89, 0x7f, 0x00, 0x31, 0xb2, 0x23, 0x18, 0x11, 0x53, 0xc6, 0x4a, 0x2c, 0x4c, 0x01, 0x25, 0x0c, + 0xcc, 0x1d, 0x99, 0x90, 0xed, 0x4b, 0x13, 0x9a, 0x28, 0x2a, 0x28, 0x0c, 0x2c, 0x49, 0x9c, 0x7b, + 0xdf, 0xfb, 0x7d, 0xf7, 0xbd,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0x90, 0xdf, 0xc9, 0xf0, 0xe7, 0x34, 0xf1, 0xe3, 0xb6, 0xdb, 0xef, 0xd2, 0x30, 0x13, 0xf3, + 0xd1, 0x73, 0x00, 0x73, 0xe3, 0x49, 0xa3, 0xe2, 0xf4, 0x61, 0x4d, 0x4e, 0xa3, 0x30, 0xcd, 0x95, + 0x76, 0xed, 0xd9, 0xe7, 0xef, 0xaf, 0xd2, 0x25, 0x44, 0xc8, 0x68, 0x91, 0xc8, 0x7f, 0xec, 0x56, + 0x89, 0x48, 0x07, 0xe4, 0x40, 0x06, 0xd1, 0x21, 0x07, 0x71, 0xee, 0x1d, 0xf4, 0x06, 0xc0, 0xb3, + 0x27, 0x23, 0x41, 0x57, 0x66, 0x98, 0x99, 0x98, 0x50, 0x01, 0x9f, 0xae, 0x7a, 0x18, 0xb4, 0xb6, + 0x15, 0x7b, 0xbd, 0x8c, 0x8a, 0x33, 0xbd, 0xf2, 0x91, 0xd9, 0xca, 0x6e, 0xb7, 0xaf, 0x80, 0xc3, + 0xbe, 0x02, 0xbe, 0xf5, 0x15, 0xf0, 0x72, 0xa0, 0xa4, 0x3e, 0x0e, 0x14, 0xd0, 0x1d, 0x28, 0xe0, + 0x70, 0xa0, 0xa4, 0xbe, 0x0c, 0x94, 0xd4, 0xc3, 0x4b, 0x33, 0xa7, 0x31, 0x7e, 0x75, 0x35, 0xb2, + 0xf1, 0xa5, 0x71, 0xf5, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xc8, 0x33, 0xa1, 0xd1, 0x06, + 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { diff --git a/x/crisis/types/types.pb.go b/x/crisis/types/types.pb.go index c98ec52dfde0..8517080048ae 100644 --- a/x/crisis/types/types.pb.go +++ b/x/crisis/types/types.pb.go @@ -9,6 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -16,6 +17,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -86,14 +88,19 @@ func (m *MsgVerifyInvariant) GetInvariantRoute() string { return "" } +func (*MsgVerifyInvariant) XXX_MessageName() string { + return "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant" +} func init() { proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant") + golang_proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant") } func init() { proto.RegisterFile("x/crisis/types/types.proto", fileDescriptor_d15f5abb7502dad7) } +func init() { golang_proto.RegisterFile("x/crisis/types/types.proto", fileDescriptor_d15f5abb7502dad7) } var fileDescriptor_d15f5abb7502dad7 = []byte{ - // 301 bytes of a gzipped FileDescriptorProto + // 309 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xaa, 0xd0, 0x4f, 0x2e, 0xca, 0x2c, 0xce, 0x2c, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x85, 0x92, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x62, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, @@ -109,10 +116,11 @@ var fileDescriptor_d15f5abb7502dad7 = []byte{ 0x63, 0xa5, 0x84, 0x55, 0x99, 0x52, 0x90, 0x30, 0x5c, 0xdc, 0x17, 0x2c, 0xec, 0x97, 0x98, 0x9b, 0x2a, 0xe4, 0xcc, 0xc5, 0x8f, 0x50, 0x5e, 0x94, 0x5f, 0x5a, 0x92, 0x2a, 0xc1, 0x0c, 0x36, 0x4f, 0xea, 0xd3, 0x3d, 0x79, 0x31, 0x74, 0xf3, 0xc0, 0x0a, 0x94, 0x82, 0xf8, 0xe0, 0x22, 0x41, 0x20, - 0x01, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0x5c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, - 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, - 0x58, 0x8e, 0x21, 0x4a, 0x1b, 0xaf, 0x8f, 0x51, 0x63, 0x25, 0x89, 0x0d, 0x1c, 0xa0, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x65, 0xef, 0x2c, 0xae, 0x01, 0x00, 0x00, + 0x01, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0x7c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x0e, 0x3c, 0x96, 0x63, 0x3c, 0xf1, + 0x58, 0x8e, 0xf1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xb4, 0xf1, 0xfa, 0x1c, + 0x35, 0x76, 0x92, 0xd8, 0xc0, 0x01, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x67, 0x54, 0x21, + 0x27, 0xb6, 0x01, 0x00, 0x00, } func (this *MsgVerifyInvariant) Equal(that interface{}) bool { diff --git a/x/distribution/types/types.pb.go b/x/distribution/types/types.pb.go index e8e131f3a572..e0f80b7484b0 100644 --- a/x/distribution/types/types.pb.go +++ b/x/distribution/types/types.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -79,6 +81,10 @@ func (m *MsgSetWithdrawAddress) GetWithdrawAddress() github_com_cosmos_cosmos_sd return nil } +func (*MsgSetWithdrawAddress) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress" +} + // msg struct for delegation withdraw from a single validator type MsgWithdrawDelegatorReward struct { DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` @@ -132,6 +138,10 @@ func (m *MsgWithdrawDelegatorReward) GetValidatorAddress() github_com_cosmos_cos return nil } +func (*MsgWithdrawDelegatorReward) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward" +} + // msg struct for validator withdraw type MsgWithdrawValidatorCommission struct { ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` @@ -177,6 +187,10 @@ func (m *MsgWithdrawValidatorCommission) GetValidatorAddress() github_com_cosmos return nil } +func (*MsgWithdrawValidatorCommission) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission" +} + // MsgFundCommunityPool defines a Msg type that allows an account to directly // fund the community pool. type MsgFundCommunityPool struct { @@ -231,6 +245,10 @@ func (m *MsgFundCommunityPool) GetDepositor() github_com_cosmos_cosmos_sdk_types return nil } +func (*MsgFundCommunityPool) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool" +} + // Params defines the set of distribution parameters. type Params struct { CommunityTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax" yaml:"community_tax"` @@ -278,6 +296,10 @@ func (m *Params) GetWithdrawAddrEnabled() bool { return false } +func (*Params) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.Params" +} + // historical rewards for a validator // height is implicit within the store key // cumulative reward ratio is the sum from the zeroeth period @@ -342,6 +364,10 @@ func (m *ValidatorHistoricalRewards) GetReferenceCount() uint32 { return 0 } +func (*ValidatorHistoricalRewards) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards" +} + // current rewards and current period for a validator // kept as a running counter and incremented each block // as long as the validator's tokens remain constant @@ -397,6 +423,10 @@ func (m *ValidatorCurrentRewards) GetPeriod() uint64 { return 0 } +func (*ValidatorCurrentRewards) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards" +} + // accumulated commission for a validator // kept as a running counter, can be withdrawn at any time type ValidatorAccumulatedCommission struct { @@ -443,6 +473,10 @@ func (m *ValidatorAccumulatedCommission) GetCommission() github_com_cosmos_cosmo return nil } +func (*ValidatorAccumulatedCommission) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission" +} + // outstanding (un-withdrawn) rewards for a validator // inexpensive to track, allows simple sanity checks type ValidatorOutstandingRewards struct { @@ -489,6 +523,10 @@ func (m *ValidatorOutstandingRewards) GetRewards() github_com_cosmos_cosmos_sdk_ return nil } +func (*ValidatorOutstandingRewards) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards" +} + // validator slash event // height is implicit within the store key // needed to calculate appropriate amounts of staking token @@ -538,6 +576,10 @@ func (m *ValidatorSlashEvent) GetValidatorPeriod() uint64 { return 0 } +func (*ValidatorSlashEvent) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent" +} + // ValidatorSlashEvents is a collection of ValidatorSlashEvent type ValidatorSlashEvents struct { ValidatorSlashEvents []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events" yaml:"validator_slash_events"` @@ -582,6 +624,10 @@ func (m *ValidatorSlashEvents) GetValidatorSlashEvents() []ValidatorSlashEvent { return nil } +func (*ValidatorSlashEvents) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents" +} + // global fee pool for distribution type FeePool struct { CommunityPool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"community_pool" yaml:"community_pool"` @@ -627,6 +673,10 @@ func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins return nil } +func (*FeePool) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.FeePool" +} + // CommunityPoolSpendProposal spends from the community pool type CommunityPoolSpendProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -667,6 +717,10 @@ func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown() { var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo +func (*CommunityPoolSpendProposal) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal" +} + // starting info for a delegator reward period // tracks the previous validator period, the delegation's amount // of staking token, and the creation height (to check later on @@ -727,97 +781,118 @@ func (m *DelegatorStartingInfo) GetHeight() uint64 { return 0 } +func (*DelegatorStartingInfo) XXX_MessageName() string { + return "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo" +} func init() { proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress") + golang_proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress") proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward") + golang_proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward") proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission") + golang_proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission") proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool") + golang_proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.distribution.v1.Params") + golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.distribution.v1.Params") proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards") + golang_proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards") proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards") + golang_proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards") proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission") + golang_proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission") proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards") + golang_proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards") proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent") + golang_proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent") proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents") + golang_proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents") proto.RegisterType((*FeePool)(nil), "cosmos_sdk.x.distribution.v1.FeePool") + golang_proto.RegisterType((*FeePool)(nil), "cosmos_sdk.x.distribution.v1.FeePool") proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal") + golang_proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal") proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo") + golang_proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo") } func init() { proto.RegisterFile("x/distribution/types/types.proto", fileDescriptor_9fddf2a8e4a90b09) } +func init() { + golang_proto.RegisterFile("x/distribution/types/types.proto", fileDescriptor_9fddf2a8e4a90b09) +} var fileDescriptor_9fddf2a8e4a90b09 = []byte{ - // 1116 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x38, 0x6e, 0x9a, 0x4c, 0xd3, 0xa4, 0xd9, 0xd8, 0x49, 0xe4, 0x14, 0xaf, 0x35, 0x12, - 0x55, 0x24, 0x14, 0x87, 0xd0, 0x5b, 0x0e, 0x48, 0x71, 0x7e, 0x08, 0x50, 0x43, 0xa2, 0x4d, 0x28, - 0x12, 0x12, 0x5a, 0x8d, 0x77, 0x27, 0xf6, 0x28, 0xeb, 0x9d, 0xd5, 0xcc, 0xd8, 0x4e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fe, 0x01, 0xb0, - 0x10, 0xbf, 0x24, 0xee, 0x49, 0xcc, 0x25, 0xf5, 0xeb, 0xef, 0xfb, 0x07, 0x51, 0xa5, 0x0c, 0x38, - 0x69, 0x53, 0x16, 0xb6, 0x9f, 0x74, 0x1e, 0xa4, 0x2a, 0x65, 0xdf, 0x04, 0x64, 0x4d, 0xf6, 0x22, - 0x3a, 0x0b, 0xf6, 0xe1, 0x35, 0x21, 0xf1, 0x21, 0xd1, 0x29, 0xf0, 0xee, 0xd0, 0x5d, 0x70, 0x42, - 0x11, 0x45, 0x20, 0xc8, 0x52, 0x60, 0xc6, 0x26, 0x1c, 0x6d, 0x10, 0x5a, 0x6f, 0x28, 0xaf, 0x73, - 0xd5, 0xa5, 0xbf, 0xbb, 0xe6, 0x94, 0xc3, 0x49, 0x58, 0xe1, 0x7d, 0x5b, 0x0d, 0x25, 0x22, 0xfb, - 0x06, 0x90, 0xa5, 0x17, 0x57, 0x77, 0x7e, 0x3e, 0x29, 0x81, 0xa7, 0x27, 0x25, 0xf0, 0xec, 0xa4, - 0x04, 0xfe, 0x3a, 0x29, 0x81, 0x6f, 0x4f, 0x4b, 0x99, 0x67, 0xa7, 0xa5, 0xcc, 0x1f, 0xa7, 0xa5, - 0xcc, 0x27, 0x2b, 0x2f, 0xd4, 0x38, 0xe8, 0x83, 0xa7, 0x36, 0x1a, 0x7d, 0x92, 0xdc, 0xfd, 0x2f, - 0x00, 0x00, 0xff, 0xff, 0x34, 0x5a, 0x18, 0x60, 0x0f, 0x0d, 0x00, 0x00, + // 1126 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf6, 0x38, 0x6e, 0x9a, 0x4c, 0xd3, 0xa4, 0xd9, 0xd8, 0x49, 0xe4, 0xf4, 0xb7, 0x6b, 0x8d, + 0xf4, 0xab, 0x22, 0xa1, 0x38, 0x84, 0xde, 0x72, 0x40, 0x8a, 0xf3, 0x21, 0x40, 0x0d, 0x8d, 0x36, + 0xa1, 0x95, 0x90, 0xd0, 0x6a, 0xbc, 0x3b, 0xb1, 0x47, 0x59, 0xef, 0xac, 0x66, 0xc6, 0x76, 0xd2, + 0x0b, 0x12, 0x27, 0x10, 0x50, 0x71, 0x40, 0xd0, 0x03, 0x87, 0x5e, 0x90, 0xa0, 0x12, 0xff, 0x03, + 0x27, 0x94, 0x63, 0x6f, 0x20, 0x0e, 0x2e, 0x4a, 0x6e, 0x1c, 0x73, 0x83, 0x13, 0xda, 0xdd, 0xd9, + 0x8f, 0x38, 0x56, 0x1b, 0x47, 0x2a, 0x5c, 0x12, 0xef, 0x3b, 0x33, 0xcf, 0xf3, 0xcc, 0x33, 0xf3, + 0xbe, 0xef, 0x2e, 0xac, 0x1c, 0x2e, 0x3b, 0x54, 0x48, 0x4e, 0xeb, 0x6d, 0x49, 0x99, 0xb7, 0x2c, + 0x8f, 0x7c, 0x22, 0xa2, 0xbf, 0x55, 0x9f, 0x33, 0xc9, 0xb4, 0xdb, 0x36, 0x13, 0x2d, 0x26, 0x2c, + 0xe1, 0x1c, 0x54, 0x0f, 0xab, 0xd9, 0xc9, 0xd5, 0xce, 0x4a, 0xf9, 0x8e, 0x6c, 0x52, 0xee, 0x58, + 0x3e, 0xe6, 0xf2, 0x68, 0x39, 0x5c, 0xb0, 0xdc, 0x60, 0x0d, 0x96, 0xfe, 0x8a, 0x50, 0xca, 0xd3, + 0x17, 0x80, 0xd1, 0x17, 0x79, 0x58, 0xda, 0x16, 0x8d, 0x5d, 0x22, 0x1f, 0x52, 0xd9, 0x74, 0x38, + 0xee, 0xae, 0x39, 0x0e, 0x27, 0x42, 0x68, 0x8f, 0xe0, 0xb4, 0x43, 0x5c, 0xd2, 0xc0, 0x92, 0x71, + 0x0b, 0x47, 0xc1, 0x79, 0x50, 0x01, 0x8b, 0x13, 0xb5, 0xed, 0xb3, 0x9e,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, 0x7d, 0x4a, 0x3c, 0x19, 0x16, 0xfc, 0xab, 0xf5, 0xd1, + 0x04, 0x23, 0xd3, 0xf7, 0x0b, 0xaf, 0xa1, 0xef, 0xaf, 0x8e, 0x7d, 0xfa, 0xd4, 0xc8, 0x85, 0x47, + 0xf5, 0x17, 0x80, 0xa5, 0xe4, 0x25, 0x71, 0x57, 0x62, 0x2e, 0xa9, 0xd7, 0x78, 0xd7, 0xdb, 0x0f, + 0x2b, 0xa5, 0xcf, 0x49, 0x87, 0xb2, 0xa0, 0xfd, 0x64, 0xf3, 0x20, 0x53, 0x29, 0xfb, 0x26, 0x20, + 0x73, 0x32, 0x8e, 0xa8, 0x2c, 0xd8, 0x83, 0xd7, 0x84, 0xc4, 0x07, 0x44, 0xa5, 0xc0, 0xdb, 0x43, + 0x77, 0xc1, 0x89, 0x88, 0x28, 0x04, 0x41, 0x66, 0x04, 0xa6, 0x6d, 0xc2, 0xd1, 0x26, 0xa1, 0x8d, + 0x66, 0xe4, 0x75, 0xa1, 0xb6, 0xf4, 0x67, 0xcf, 0x98, 0xb2, 0x39, 0x09, 0x2a, 0xbc, 0x67, 0x45, + 0x43, 0xa9, 0xc8, 0xbe, 0x01, 0x64, 0xaa, 0xc5, 0xb5, 0x87, 0x3f, 0x9c, 0xe8, 0xe0, 0xf8, 0x44, + 0x07, 0xcf, 0x4f, 0x74, 0xf0, 0xc7, 0x89, 0x0e, 0xbe, 0x3a, 0xd5, 0x73, 0x3f, 0x9f, 0xea, 0xe0, + 0xf8, 0x54, 0x07, 0xcf, 0x4f, 0xf5, 0xdc, 0x6f, 0xa7, 0x7a, 0xee, 0xc3, 0x95, 0x97, 0x6a, 0x1d, + 0xf4, 0xe1, 0x53, 0x1f, 0x0d, 0x3f, 0x4d, 0xee, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xbd, + 0xfb, 0xb0, 0x17, 0x0d, 0x00, 0x00, } func (this *MsgSetWithdrawAddress) Equal(that interface{}) bool { diff --git a/x/evidence/types/types.pb.go b/x/evidence/types/types.pb.go index cf70cfe6ab77..96d15fbed141 100644 --- a/x/evidence/types/types.pb.go +++ b/x/evidence/types/types.pb.go @@ -10,6 +10,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" @@ -20,6 +21,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -81,6 +83,10 @@ func (m *MsgSubmitEvidenceBase) GetSubmitter() github_com_cosmos_cosmos_sdk_type return nil } +func (*MsgSubmitEvidenceBase) XXX_MessageName() string { + return "cosmos_sdk.x.evidence.v1.MsgSubmitEvidenceBase" +} + // Equivocation implements the Evidence interface and defines evidence of double // signing misbehavior. type Equivocation struct { @@ -122,6 +128,10 @@ func (m *Equivocation) XXX_DiscardUnknown() { var xxx_messageInfo_Equivocation proto.InternalMessageInfo +func (*Equivocation) XXX_MessageName() string { + return "cosmos_sdk.x.evidence.v1.Equivocation" +} + // Params defines the total set of parameters for the evidence module type Params struct { MaxEvidenceAge time.Duration `protobuf:"bytes,1,opt,name=max_evidence_age,json=maxEvidenceAge,proto3,stdduration" json:"max_evidence_age" yaml:"max_evidence_age"` @@ -166,45 +176,54 @@ func (m *Params) GetMaxEvidenceAge() time.Duration { return 0 } +func (*Params) XXX_MessageName() string { + return "cosmos_sdk.x.evidence.v1.Params" +} func init() { proto.RegisterType((*MsgSubmitEvidenceBase)(nil), "cosmos_sdk.x.evidence.v1.MsgSubmitEvidenceBase") + golang_proto.RegisterType((*MsgSubmitEvidenceBase)(nil), "cosmos_sdk.x.evidence.v1.MsgSubmitEvidenceBase") proto.RegisterType((*Equivocation)(nil), "cosmos_sdk.x.evidence.v1.Equivocation") + golang_proto.RegisterType((*Equivocation)(nil), "cosmos_sdk.x.evidence.v1.Equivocation") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.evidence.v1.Params") + golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.evidence.v1.Params") } func init() { proto.RegisterFile("x/evidence/types/types.proto", fileDescriptor_72113e6a7b2536ae) } +func init() { + golang_proto.RegisterFile("x/evidence/types/types.proto", fileDescriptor_72113e6a7b2536ae) +} var fileDescriptor_72113e6a7b2536ae = []byte{ - // 455 bytes of a gzipped FileDescriptorProto + // 462 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3d, 0x6f, 0xd4, 0x30, - 0x1c, 0xc6, 0x63, 0x7a, 0x9c, 0x8a, 0x5b, 0xa1, 0x12, 0xf1, 0x12, 0x4e, 0x28, 0xae, 0x82, 0x84, - 0xba, 0xd4, 0x51, 0xcb, 0x82, 0x6e, 0xbb, 0x40, 0x27, 0xc4, 0x8b, 0x0e, 0x26, 0x96, 0xc8, 0x97, - 0x18, 0x27, 0x6a, 0x1d, 0x07, 0xdb, 0x39, 0x72, 0xe2, 0x0b, 0x30, 0x76, 0xec, 0xd8, 0x91, 0x8f, - 0xd2, 0xb1, 0x23, 0x53, 0x40, 0x77, 0xdf, 0xa0, 0x63, 0x25, 0x24, 0x74, 0x76, 0x42, 0xa5, 0xab, - 0x84, 0xba, 0x24, 0xb1, 0xf3, 0xe4, 0xc9, 0xf3, 0xfb, 0x3f, 0x86, 0x4f, 0xea, 0x90, 0x4e, 0xf3, - 0x94, 0x16, 0x09, 0x0d, 0xf5, 0xac, 0xa4, 0xca, 0x5e, 0x71, 0x29, 0x85, 0x16, 0xae, 0x97, 0x08, - 0xc5, 0x85, 0x8a, 0x55, 0x7a, 0x88, 0x6b, 0xdc, 0x09, 0xf1, 0x74, 0x6f, 0xf0, 0x4c, 0x67, 0xb9, - 0x4c, 0xe3, 0x92, 0x48, 0x3d, 0x0b, 0x8d, 0x38, 0x64, 0x82, 0x89, 0xab, 0x27, 0xeb, 0x30, 0x40, - 0x4c, 0x08, 0x76, 0x44, 0xad, 0x64, 0x52, 0x7d, 0x0e, 0x75, 0xce, 0xa9, 0xd2, 0x84, 0x97, 0xad, - 0xc0, 0x5f, 0x15, 0xa4, 0x95, 0x24, 0x3a, 0x17, 0x85, 0x7d, 0x1f, 0x64, 0xf0, 0xc1, 0x1b, 0xc5, - 0x3e, 0x54, 0x13, 0x9e, 0xeb, 0x83, 0x36, 0x40, 0x44, 0x14, 0x75, 0xdf, 0xc1, 0x3b, 0xca, 0xec, - 0x6a, 0x2a, 0x3d, 0xb0, 0x0d, 0x76, 0x36, 0xa3, 0xbd, 0xcb, 0x06, 0xed, 0xb2, 0x5c, 0x67, 0xd5, - 0x04, 0x27, 0x82, 0x87, 0x36, 0x7d, 0x7b, 0xdb, 0x55, 0xe9, 0x61, 0x0b, 0x37, 0x4a, 0x92, 0x51, - 0x9a, 0x4a, 0xaa, 0xd4, 0xf8, 0xca, 0x23, 0xf8, 0x03, 0xe0, 0xe6, 0xc1, 0x97, 0x2a, 0x9f, 0x8a, - 0xc4, 0x04, 0x70, 0x1f, 0xc2, 0x7e, 0x46, 0x73, 0x96, 0x69, 0x63, 0xbf, 0x36, 0x6e, 0x57, 0xee, - 0x0b, 0xd8, 0x5b, 0x52, 0x78, 0xb7, 0xb6, 0xc1, 0xce, 0xc6, 0xfe, 0x00, 0x5b, 0x02, 0xdc, 0x11, - 0xe0, 0x8f, 0x1d, 0x62, 0xb4, 0x7e, 0xd6, 0x20, 0xe7, 0xf8, 0x17, 0x02, 0x63, 0xf3, 0x85, 0x7b, - 0x1f, 0xde, 0x2e, 0xc5, 0x57, 0x2a, 0xbd, 0x35, 0x63, 0x68, 0x17, 0xee, 0x37, 0x78, 0x2f, 0x11, - 0x85, 0xa2, 0x85, 0xaa, 0x54, 0x4c, 0x6c, 0x30, 0x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0xe0, 0xac, 0x41, 0xd6, 0xf7, 0x06, 0x81, 0x79, 0x83, 0xc0, 0x65, + 0x83, 0xac, 0x1f, 0x0d, 0xb2, 0x3e, 0xfc, 0xbb, 0xd9, 0xd5, 0x73, 0x3c, 0xe9, 0xeb, 0x88, 0xcf, + 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2b, 0xbd, 0x24, 0x2d, 0xe2, 0x02, 0x00, 0x00, } func (this *MsgSubmitEvidenceBase) Equal(that interface{}) bool { diff --git a/x/gov/types/types.pb.go b/x/gov/types/types.pb.go index 038f3297d785..f014995645ae 100644 --- a/x/gov/types/types.pb.go +++ b/x/gov/types/types.pb.go @@ -12,6 +12,7 @@ import ( github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -21,6 +22,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -151,6 +153,10 @@ func (m *MsgSubmitProposalBase) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitProposalBase proto.InternalMessageInfo +func (*MsgSubmitProposalBase) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase" +} + // MsgVote defines a message to cast a vote type MsgVote struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` @@ -190,6 +196,10 @@ func (m *MsgVote) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVote proto.InternalMessageInfo +func (*MsgVote) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.MsgVote" +} + // MsgDeposit defines a message to submit a deposit to an existing proposal type MsgDeposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` @@ -229,6 +239,10 @@ func (m *MsgDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo +func (*MsgDeposit) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.MsgDeposit" +} + // TextProposal defines a standard text proposal whose changes need to be // manually updated in case of approval type TextProposal struct { @@ -268,6 +282,10 @@ func (m *TextProposal) XXX_DiscardUnknown() { var xxx_messageInfo_TextProposal proto.InternalMessageInfo +func (*TextProposal) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.TextProposal" +} + // Deposit defines an amount deposited by an account address to an active proposal type Deposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` @@ -307,6 +325,10 @@ func (m *Deposit) XXX_DiscardUnknown() { var xxx_messageInfo_Deposit proto.InternalMessageInfo +func (*Deposit) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.Deposit" +} + // ProposalBase defines the core field members of a governance proposal. It includes // all static fields (i.e fields excluding the dynamic Content). A full proposal // extends the ProposalBase with Content. @@ -354,6 +376,10 @@ func (m *ProposalBase) XXX_DiscardUnknown() { var xxx_messageInfo_ProposalBase proto.InternalMessageInfo +func (*ProposalBase) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.ProposalBase" +} + // TallyResult defines a standard tally for a proposal type TallyResult struct { Yes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"` @@ -394,6 +420,10 @@ func (m *TallyResult) XXX_DiscardUnknown() { var xxx_messageInfo_TallyResult proto.InternalMessageInfo +func (*TallyResult) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.TallyResult" +} + // Vote defines a vote on a governance proposal. A vote corresponds to a proposal // ID, the voter, and the vote option. type Vote struct { @@ -434,100 +464,115 @@ func (m *Vote) XXX_DiscardUnknown() { var xxx_messageInfo_Vote proto.InternalMessageInfo +func (*Vote) XXX_MessageName() string { + return "cosmos_sdk.x.gov.v1.Vote" +} func init() { proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value) + golang_proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) + golang_proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase") + golang_proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase") proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") + golang_proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") + golang_proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal") + golang_proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal") proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit") + golang_proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit") proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase") + golang_proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase") proto.RegisterType((*TallyResult)(nil), "cosmos_sdk.x.gov.v1.TallyResult") + golang_proto.RegisterType((*TallyResult)(nil), "cosmos_sdk.x.gov.v1.TallyResult") proto.RegisterType((*Vote)(nil), "cosmos_sdk.x.gov.v1.Vote") + golang_proto.RegisterType((*Vote)(nil), "cosmos_sdk.x.gov.v1.Vote") } func init() { proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } +func init() { golang_proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } var fileDescriptor_a5ae5e91b5b3fb03 = []byte{ - // 1230 bytes of a gzipped FileDescriptorProto + // 1240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcf, 0x8f, 0xd3, 0x46, - 0x14, 0x8e, 0xb3, 0xbf, 0xd8, 0x49, 0x36, 0x6b, 0x66, 0x29, 0x9b, 0xba, 0xaa, 0x6d, 0x02, 0x42, - 0x2b, 0x04, 0x5e, 0x58, 0x0e, 0x55, 0xa9, 0x54, 0x35, 0x26, 0x06, 0x8c, 0xd8, 0x38, 0xb2, 0xcd, - 0x22, 0x5a, 0x55, 0x96, 0x77, 0x6d, 0xbc, 0x2e, 0x8e, 0x27, 0xcd, 0xcc, 0xa6, 0xec, 0xad, 0xea, - 0xa1, 0x42, 0x39, 0x71, 0xe4, 0x12, 0x09, 0xa9, 0x1c, 0x50, 0x4f, 0xfd, 0x33, 0xf6, 0x56, 0x0e, - 0xad, 0x84, 0x7a, 0x08, 0x65, 0x39, 0xb4, 0xea, 0xa1, 0x07, 0x2e, 0x95, 0x7a, 0xaa, 0xe2, 0x19, - 0xb3, 0x4e, 0x76, 0xe9, 0xb2, 0xa2, 0x95, 0xaa, 0x5e, 0x92, 0xf8, 0xf9, 0xfb, 0xbe, 0x37, 0xef, - 0xcd, 0x9b, 0x6f, 0x14, 0x30, 0x7f, 0x67, 0x31, 0x40, 0x9d, 0x45, 0xb2, 0xd9, 0xf2, 0x31, 0xfd, - 0x54, 0x5a, 0x6d, 0x44, 0x10, 0x9c, 0x5b, 0x43, 0xb8, 0x89, 0xb0, 0x83, 0xbd, 0xdb, 0xca,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e, 0xff, 0x6f, - 0xdb, 0xfa, 0xfd, 0x24, 0x28, 0x0e, 0x99, 0x89, 0xba, 0x57, 0x37, 0x8e, 0xed, 0x9a, 0xb9, 0x7c, - 0x32, 0x6a, 0xd3, 0xcc, 0x42, 0x46, 0x5a, 0x71, 0x03, 0x4c, 0x62, 0xe2, 0x92, 0x0d, 0x9c, 0xf4, - 0xa1, 0xb4, 0x74, 0x7c, 0xcf, 0x53, 0x90, 0xea, 0x59, 0x09, 0x54, 0x15, 0x76, 0x2c, 0xe9, 0xe5, - 0x02, 0xa8, 0x4a, 0xc5, 0x64, 0x72, 0xf0, 0x73, 0x00, 0x6f, 0x85, 0xb1, 0x1b, 0x39, 0xc4, 0x8d, - 0xa2, 0x4d, 0xa7, 0xed, 0xe3, 0x8d, 0x88, 0x24, 0x47, 0xad, 0xb0, 0x24, 0xef, 0x99, 0xc4, 0x1e, - 0x00, 0xcd, 0x04, 0xa7, 0x1e, 0x63, 0xc6, 0xf7, 0x36, 0xcd, 0xb2, 0x5b, 0xa9, 0x62, 0xf2, 0x49, - 0x30, 0x43, 0x82, 0x9f, 0x80, 0x02, 0x4e, 0x2c, 0xd7, 0x19, 0x18, 0x72, 0x79, 0x3c, 0xc9, 0x25, - 0x28, 0xd4, 0xad, 0x95, 0xd4, 0xad, 0x15, 0x3b, 0x75, 0x6b, 0x55, 0x64, 0x59, 0xd8, 0xbc, 0x64, - 0xc8, 0x95, 0x7b, 0x4f, 0x25, 0xce, 0x04, 0x34, 0x32, 0x20, 0xc0, 0x10, 0xf0, 0x6c, 0xbf, 0x1d, - 0x3f, 0xf6, 0x68, 0x86, 0x89, 0x7d, 0x33, 0x1c, 0x67, 0x19, 0xe6, 0x69, 0x86, 0x51, 0x05, 0x9a, - 0xa6, 0xc4, 0xc2, 0x5a, 0xec, 0x25, 0xa9, 0xbe, 0xe2, 0xc0, 0x0c, 0x41, 0x24, 0x73, 0x45, 0x4c, - 0xbe, 0x7a, 0xaa, 0xae, 0xb0, 0x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, 0x93, 0xf3, + 0x94, 0x53, 0x77, 0x30, 0xf6, 0x5c, 0x78, 0x16, 0x14, 0x47, 0xd1, 0x86, 0x7a, 0x55, 0xbd, 0x68, + 0xa9, 0x55, 0x7e, 0x52, 0x80, 0xdd, 0x9e, 0x5c, 0xa0, 0x78, 0xc3, 0xfb, 0xc4, 0x5b, 0x27, 0xde, + 0x58, 0xfd, 0x4b, 0x65, 0xed, 0x9a, 0x5a, 0xe5, 0xa7, 0xd2, 0xfa, 0x97, 0x9c, 0x20, 0xf4, 0xdc, + 0xe1, 0xb6, 0x56, 0x1a, 0xdb, 0xcf, 0xc4, 0xcc, 0x93, 0x67, 0x62, 0xe6, 0xf3, 0x1d, 0x31, 0xb3, + 0xbd, 0x23, 0x72, 0x8f, 0x77, 0x44, 0xee, 0xa7, 0x1d, 0x91, 0xbb, 0xb7, 0x2b, 0x66, 0xbe, 0xdd, + 0x15, 0xb9, 0xed, 0x5d, 0x91, 0x7b, 0xbc, 0x2b, 0x66, 0x9e, 0xec, 0x8a, 0x99, 0x0f, 0xff, 0xda, + 0xb4, 0x53, 0xff, 0x73, 0xd6, 0xa6, 0x63, 0x5f, 0x3c, 0xff, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x19, 0x8e, 0x5f, 0xa4, 0xfd, 0x0c, 0x00, 0x00, } func (this *MsgSubmitProposalBase) Equal(that interface{}) bool { diff --git a/x/mint/types/types.pb.go b/x/mint/types/types.pb.go index 039fcbe0814b..67121501b407 100644 --- a/x/mint/types/types.pb.go +++ b/x/mint/types/types.pb.go @@ -8,6 +8,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -15,6 +16,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -65,6 +67,10 @@ func (m *Minter) XXX_DiscardUnknown() { var xxx_messageInfo_Minter proto.InternalMessageInfo +func (*Minter) XXX_MessageName() string { + return "cosmos_sdk.x.mint.v1.Minter" +} + // mint parameters type Params struct { // type of coin to mint @@ -127,43 +133,49 @@ func (m *Params) GetBlocksPerYear() uint64 { return 0 } +func (*Params) XXX_MessageName() string { + return "cosmos_sdk.x.mint.v1.Params" +} func init() { proto.RegisterType((*Minter)(nil), "cosmos_sdk.x.mint.v1.Minter") + golang_proto.RegisterType((*Minter)(nil), "cosmos_sdk.x.mint.v1.Minter") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.mint.v1.Params") + golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.mint.v1.Params") } func init() { proto.RegisterFile("x/mint/types/types.proto", fileDescriptor_fcb8be2eaea25b48) } +func init() { golang_proto.RegisterFile("x/mint/types/types.proto", fileDescriptor_fcb8be2eaea25b48) } var fileDescriptor_fcb8be2eaea25b48 = []byte{ - // 439 bytes of a gzipped FileDescriptorProto + // 446 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xb1, 0x6e, 0xd3, 0x40, - 0x1c, 0xc6, 0x6d, 0x48, 0x23, 0xe5, 0xa0, 0x02, 0x8e, 0x82, 0xac, 0x0a, 0xec, 0xca, 0x43, 0xd5, + 0x1c, 0xc6, 0x7d, 0x90, 0x46, 0xca, 0x41, 0x05, 0x1c, 0x05, 0x59, 0x15, 0xd8, 0x95, 0x87, 0xd2, 0x05, 0x5b, 0x88, 0xad, 0xa3, 0x89, 0x18, 0x10, 0x45, 0x91, 0x37, 0x58, 0x4e, 0xff, 0xd8, 0x87, - 0x73, 0x8a, 0xef, 0xce, 0xba, 0xbb, 0x16, 0x67, 0xe5, 0x09, 0x18, 0x19, 0x79, 0x0b, 0x5e, 0xa1, - 0x1b, 0x1d, 0x11, 0x43, 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8, 0xd7, 0xd2, 0x43, 0x9f, 0x1a, 0xcf, 0xf9, 0xd6, 0x78, 0x68, 0xde, 0x78, + 0xe8, 0xb2, 0xf1, 0x9c, 0x1f, 0x8d, 0xe7, 0xbc, 0xdb, 0xeb, 0x8a, 0x8d, 0xfb, 0xdd, 0xdd, 0x79, + 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x32, 0x62, 0xb7, 0x95, 0x03, 0x00, 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { diff --git a/x/params/types/proposal/types.pb.go b/x/params/types/proposal/types.pb.go index 29f95f728a8e..9dc09e4967ab 100644 --- a/x/params/types/proposal/types.pb.go +++ b/x/params/types/proposal/types.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -14,6 +15,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -63,6 +65,10 @@ func (m *ParameterChangeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ParameterChangeProposal proto.InternalMessageInfo +func (*ParameterChangeProposal) XXX_MessageName() string { + return "cosmos_sdk.x.params.v1.ParameterChangeProposal" +} + // ParamChange defines a parameter change. type ParamChange struct { Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` @@ -123,37 +129,46 @@ func (m *ParamChange) GetValue() string { return "" } +func (*ParamChange) XXX_MessageName() string { + return "cosmos_sdk.x.params.v1.ParamChange" +} func init() { proto.RegisterType((*ParameterChangeProposal)(nil), "cosmos_sdk.x.params.v1.ParameterChangeProposal") + golang_proto.RegisterType((*ParameterChangeProposal)(nil), "cosmos_sdk.x.params.v1.ParameterChangeProposal") proto.RegisterType((*ParamChange)(nil), "cosmos_sdk.x.params.v1.ParamChange") + golang_proto.RegisterType((*ParamChange)(nil), "cosmos_sdk.x.params.v1.ParamChange") } func init() { proto.RegisterFile("x/params/types/proposal/types.proto", fileDescriptor_0ab50f1d22a2cb61) } +func init() { + golang_proto.RegisterFile("x/params/types/proposal/types.proto", fileDescriptor_0ab50f1d22a2cb61) +} var fileDescriptor_0ab50f1d22a2cb61 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xae, 0xd0, 0x2f, 0x48, - 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc8, - 0x2f, 0x4e, 0xcc, 0x81, 0x70, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0x92, 0xf3, 0x8b, - 0x73, 0xf3, 0x8b, 0xe3, 0x8b, 0x53, 0xb2, 0xf5, 0x2a, 0xf4, 0x20, 0xea, 0xf5, 0xca, 0x0c, 0xa5, - 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0xc1, 0x4a, 0xf5, - 0xd3, 0xf3, 0xd3, 0xf3, 0x11, 0x2c, 0x88, 0x7e, 0xa5, 0x05, 0x8c, 0x5c, 0xe2, 0x01, 0x20, 0x5d, - 0xa9, 0x25, 0xa9, 0x45, 0xce, 0x19, 0x89, 0x79, 0xe9, 0xa9, 0x01, 0x50, 0x7b, 0x84, 0x44, 0xb8, - 0x58, 0x4b, 0x32, 0x4b, 0x72, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x20, 0x1c, 0x21, - 0x05, 0x2e, 0xee, 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xcc, 0xfc, 0x3c, 0x09, 0x26, - 0xb0, 0x1c, 0xb2, 0x90, 0x90, 0x33, 0x17, 0x7b, 0x32, 0xd8, 0xa4, 0x62, 0x09, 0x66, 0x05, 0x66, - 0x0d, 0x6e, 0x23, 0x65, 0x3d, 0xec, 0xae, 0xd4, 0x03, 0xdb, 0x0c, 0xb1, 0xd5, 0x89, 0xe5, 0xc4, - 0x3d, 0x79, 0x86, 0x20, 0x98, 0x4e, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x33, 0x16, 0xc8, 0x33, - 0x28, 0x85, 0x73, 0x71, 0x23, 0xa9, 0x13, 0x92, 0xe2, 0xe2, 0x28, 0x2e, 0x4d, 0x2a, 0x2e, 0x48, - 0x4c, 0x86, 0x39, 0x0c, 0xce, 0x17, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x84, 0xba, 0x09, 0xc4, - 0x04, 0xf9, 0xa1, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x19, 0xe2, 0x07, 0x30, 0xc7, 0x8a, 0x05, - 0x64, 0xb0, 0x53, 0xd0, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, - 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, - 0xc7, 0x10, 0x65, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x71, - 0x3e, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0xd6, 0xc7, 0x11, 0x37, 0x49, 0x6c, 0xe0, 0x60, 0x35, 0x06, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x17, 0xa9, 0xe7, 0x51, 0xbd, 0x01, 0x00, 0x00, + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74,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, 0xd7, 0xa4, 0xbf, 0xa7, 0xa4, 0xce, 0xd9, 0xbb, 0x76, 0x4a, 0xdb, 0x8f, 0x1a, 0xe8, 0x1f, + 0x94, 0xed, 0xf2, 0xd3, 0xa6, 0x06, 0x5e, 0x36, 0x35, 0xd0, 0x78, 0x44, 0x95, 0x23, 0x1e, 0xae, + 0xa2, 0xb2, 0x59, 0x8c, 0x8c, 0xe2, 0xd1, 0x21, 0xd8, 0x37, 0xc6, 0xe7, 0x28, 0x98, 0x88, 0xf5, + 0x3e, 0x53, 0x31, 0x16, 0x1d, 0x96, 0x7c, 0xba, 0x10, 0x61, 0xe0, 0x3b, 0x38, 0xd0, 0x2e, 0x15, + 0x8b, 0x3b, 0x83, 0xd7, 0x8c, 0xc0, 0x6d, 0x46, 0xe0, 0x2e, 0x23, 0xf0, 0x33, 0x23, 0xf0, 0x39, + 0x27, 0xe0, 0x2d, 0x27, 0x70, 0x9b, 0x13, 0xb8, 0xcb, 0x09, 0x78, 0xcf, 0x09, 0x18, 0x3c, 0x24, + 0xa9, 0x1d, 0x2f, 0x46, 0x34, 0x92, 0x33, 0xe6, 0x6b, 0xec, 0x3f, 0x37, 0x26, 0x9e, 0xb0, 0x3f, + 0xde, 0x68, 0x74, 0xe2, 0xae, 0xf7, 0xfe, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x91, 0x14, 0x0f, + 0xc5, 0x01, 0x00, 0x00, } func (this *ParameterChangeProposal) Equal(that interface{}) bool { diff --git a/x/slashing/types/types.pb.go b/x/slashing/types/types.pb.go index 7358555a1043..21f6ed4b971d 100644 --- a/x/slashing/types/types.pb.go +++ b/x/slashing/types/types.pb.go @@ -10,6 +10,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -19,6 +20,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -74,6 +76,10 @@ func (m *MsgUnjail) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAdd return nil } +func (*MsgUnjail) XXX_MessageName() string { + return "cosmos_sdk.x.slashing.v1.MsgUnjail" +} + // ValidatorSigningInfo defines the signing info for a validator type ValidatorSigningInfo struct { Address github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"address,omitempty"` @@ -163,46 +169,55 @@ func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64 { return 0 } +func (*ValidatorSigningInfo) XXX_MessageName() string { + return "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo" +} func init() { proto.RegisterType((*MsgUnjail)(nil), "cosmos_sdk.x.slashing.v1.MsgUnjail") + golang_proto.RegisterType((*MsgUnjail)(nil), "cosmos_sdk.x.slashing.v1.MsgUnjail") proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo") + golang_proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo") } func init() { proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) } +func init() { + golang_proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) +} var fileDescriptor_57cb37764f972476 = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0x04, 0x4a, 0xb9, 0x84, 0x0e, 0x2e, 0x08, 0x2b, 0xaa, 0x7c, 0x91, 0x07, 0x94, - 0xa5, 0xb6, 0x28, 0x5b, 0x36, 0xdc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 0x71, 0x2a, 0x47, 0x13, 0x15, 0x8d, 0x64, 0x21, 0x34, 0xcd, 0xed, 0xad, 0xba, 0x89, 0xfe, - 0xaa, 0x44, 0x7b, 0xc6, 0xe8, 0xaf, 0x32, 0x37, 0xdc, 0x35, 0x3c, 0xa8, 0xf1, 0xa1, 0xa1, 0xc3, - 0xed, 0xcf, 0xe7, 0xa8, 0xf5, 0xf3, 0x1c, 0x81, 0xe0, 0xe5, 0x97, 0x85, 0x03, 0x2e, 0x16, 0x0e, - 0xb8, 0x5c, 0x38, 0xe0, 0xc7, 0xc2, 0x01, 0x67, 0x4b, 0xa7, 0x75, 0xb9, 0x74, 0x5a, 0xdf, 0x96, - 0x4e, 0xeb, 0xfd, 0xbf, 0x9f, 0xc6, 0xcd, 0xf7, 0x1f, 0x6f, 0xd5, 0xd7, 0xf1, 0xf4, 0x77, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x72, 0x9e, 0xc6, 0x73, 0x1a, 0x03, 0x00, 0x00, + // 499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x8f, 0xd3, 0x30, + 0x14, 0xc7, 0x6b, 0x0a, 0xc7, 0xe1, 0x96, 0x1b, 0x72, 0x20, 0xa2, 0xea, 0x64, 0x57, 0x19, 0x50, + 0x97, 0x4b, 0xc4, 0xb1, 0x75, 0xa3, 0xb7, 0x80, 0xc4, 0x0f, 0x29, 0xf7, 0x63, 0x60, 0x20, 0x72, + 0x6b, 0xd7, 0x35, 0x4d, 0xec, 0x2a, 0x76, 0x4f, 0xed, 0xca, 0x5f, 0x70, 0x23, 0xe3, 0x8d, 0xfc, + 0x11, 0x0c, 0x8c, 0x1d, 0x6f, 0x64, 0x0a, 0xa8, 0x59, 0x10, 0x63, 0xc7, 0x9b, 0x50, 0xe2, 0x86, + 0xab, 0x4e, 0x08, 0xdd, 0x92, 0xe4, 0x7d, 0xf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x81, 0x9f, 0x4b, 0x04, 0xce, 0x73, 0x54, 0xfb, 0x96, 0x23, 0xb0, + 0xc8, 0x11, 0xb8, 0xcc, 0x51, 0xed, 0x7b, 0x8e, 0x6a, 0xef, 0xff, 0xff, 0x8b, 0xdc, 0xbc, 0x07, + 0xfd, 0xad, 0xf2, 0x58, 0x9e, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x14, 0x24, 0x2a, 0x33, 0x22, + 0x03, 0x00, 0x00, } func (this *MsgUnjail) Equal(that interface{}) bool { diff --git a/x/staking/types/types.pb.go b/x/staking/types/types.pb.go index ca9394854763..94b091e2ecc6 100644 --- a/x/staking/types/types.pb.go +++ b/x/staking/types/types.pb.go @@ -11,6 +11,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" types1 "github.com/tendermint/tendermint/abci/types" @@ -22,6 +23,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -118,6 +120,10 @@ func (m *MsgCreateValidator) GetValue() types.Coin { return types.Coin{} } +func (*MsgCreateValidator) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.MsgCreateValidator" +} + // MsgEditValidator defines an SDK message for editing an existing validator. type MsgEditValidator struct { Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` @@ -178,6 +184,10 @@ func (m *MsgEditValidator) GetValidatorAddress() github_com_cosmos_cosmos_sdk_ty return nil } +func (*MsgEditValidator) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.MsgEditValidator" +} + // MsgDelegate defines an SDK message for performing a delegation from a // delegate to a validator. type MsgDelegate struct { @@ -240,6 +250,10 @@ func (m *MsgDelegate) GetAmount() types.Coin { return types.Coin{} } +func (*MsgDelegate) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.MsgDelegate" +} + // MsgBeginRedelegate defines an SDK message for performing a redelegation from // a delegate and source validator to a destination validator. type MsgBeginRedelegate struct { @@ -310,6 +324,10 @@ func (m *MsgBeginRedelegate) GetAmount() types.Coin { return types.Coin{} } +func (*MsgBeginRedelegate) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.MsgBeginRedelegate" +} + // MsgUndelegate defines an SDK message for performing an undelegation from a // delegate and a validator. type MsgUndelegate struct { @@ -372,6 +390,10 @@ func (m *MsgUndelegate) GetAmount() types.Coin { return types.Coin{} } +func (*MsgUndelegate) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.MsgUndelegate" +} + // HistoricalInfo contains the historical information that gets stored at // each height. type HistoricalInfo struct { @@ -426,6 +448,10 @@ func (m *HistoricalInfo) GetValset() []Validator { return nil } +func (*HistoricalInfo) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.HistoricalInfo" +} + // CommissionRates defines the initial commission rates to be used for creating // a validator. type CommissionRates struct { @@ -466,6 +492,10 @@ func (m *CommissionRates) XXX_DiscardUnknown() { var xxx_messageInfo_CommissionRates proto.InternalMessageInfo +func (*CommissionRates) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.CommissionRates" +} + // Commission defines a commission parameters for a given validator. type Commission struct { CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` @@ -511,6 +541,10 @@ func (m *Commission) GetUpdateTime() time.Time { return time.Time{} } +func (*Commission) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Commission" +} + // Description defines a validator description. type Description struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` @@ -587,6 +621,10 @@ func (m *Description) GetDetails() string { return "" } +func (*Description) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Description" +} + // Validator defines the total amount of 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. @@ -640,6 +678,10 @@ func (m *Validator) XXX_DiscardUnknown() { var xxx_messageInfo_Validator proto.InternalMessageInfo +func (*Validator) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Validator" +} + // DVPair is struct that just has a delegator-validator pair with no other data. // It is intended to be used as a marshalable pointer. For example, a DVPair can // be used to construct the key to getting an UnbondingDelegation from state. @@ -694,6 +736,10 @@ func (m *DVPair) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAdd return nil } +func (*DVPair) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.DVPair" +} + // DVPairs defines an array of DVPair objects. type DVPairs struct { Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` @@ -739,6 +785,10 @@ func (m *DVPairs) GetPairs() []DVPair { return nil } +func (*DVPairs) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.DVPairs" +} + // DVVTriplet is struct that just has a delegator-validator-validator triplet // with no other data. It is intended to be used as a marshalable pointer. For // example, a DVVTriplet can be used to construct the key to getting a @@ -802,6 +852,10 @@ func (m *DVVTriplet) GetValidatorDstAddress() github_com_cosmos_cosmos_sdk_types return nil } +func (*DVVTriplet) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.DVVTriplet" +} + // DVVTriplets defines an array of DVVTriplet objects. type DVVTriplets struct { Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` @@ -847,6 +901,10 @@ func (m *DVVTriplets) GetTriplets() []DVVTriplet { return nil } +func (*DVVTriplets) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.DVVTriplets" +} + // Delegation represents the bond with tokens held by an account. It is // owned by one delegator, and is associated with the voting power of one // validator. @@ -902,6 +960,10 @@ func (m *Delegation) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.Va return nil } +func (*Delegation) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Delegation" +} + // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list type UnbondingDelegation struct { @@ -963,6 +1025,10 @@ func (m *UnbondingDelegation) GetEntries() []UnbondingDelegationEntry { return nil } +func (*UnbondingDelegation) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.UnbondingDelegation" +} + // UnbondingDelegationEntry defines an unbonding object with relevant metadata. type UnbondingDelegationEntry struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` @@ -1017,6 +1083,10 @@ func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { return time.Time{} } +func (*UnbondingDelegationEntry) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry" +} + // RedelegationEntry defines a redelegation object with relevant metadata. type RedelegationEntry struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` @@ -1071,6 +1141,10 @@ func (m *RedelegationEntry) GetCompletionTime() time.Time { return time.Time{} } +func (*RedelegationEntry) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.RedelegationEntry" +} + // Redelegation contains the list of a particular delegator's redelegating bonds // from a particular source validator to a particular destination validator. type Redelegation struct { @@ -1140,6 +1214,10 @@ func (m *Redelegation) GetEntries() []RedelegationEntry { return nil } +func (*Redelegation) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Redelegation" +} + // Params defines the parameters for the staking module. type Params struct { UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` @@ -1216,139 +1294,165 @@ func (m *Params) GetBondDenom() string { return "" } +func (*Params) XXX_MessageName() string { + return "cosmos_sdk.x.staking.v1.Params" +} func init() { proto.RegisterType((*MsgCreateValidator)(nil), "cosmos_sdk.x.staking.v1.MsgCreateValidator") + golang_proto.RegisterType((*MsgCreateValidator)(nil), "cosmos_sdk.x.staking.v1.MsgCreateValidator") proto.RegisterType((*MsgEditValidator)(nil), "cosmos_sdk.x.staking.v1.MsgEditValidator") + golang_proto.RegisterType((*MsgEditValidator)(nil), "cosmos_sdk.x.staking.v1.MsgEditValidator") proto.RegisterType((*MsgDelegate)(nil), "cosmos_sdk.x.staking.v1.MsgDelegate") + golang_proto.RegisterType((*MsgDelegate)(nil), "cosmos_sdk.x.staking.v1.MsgDelegate") proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos_sdk.x.staking.v1.MsgBeginRedelegate") + golang_proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos_sdk.x.staking.v1.MsgBeginRedelegate") proto.RegisterType((*MsgUndelegate)(nil), "cosmos_sdk.x.staking.v1.MsgUndelegate") + golang_proto.RegisterType((*MsgUndelegate)(nil), "cosmos_sdk.x.staking.v1.MsgUndelegate") proto.RegisterType((*HistoricalInfo)(nil), "cosmos_sdk.x.staking.v1.HistoricalInfo") + golang_proto.RegisterType((*HistoricalInfo)(nil), "cosmos_sdk.x.staking.v1.HistoricalInfo") proto.RegisterType((*CommissionRates)(nil), "cosmos_sdk.x.staking.v1.CommissionRates") + golang_proto.RegisterType((*CommissionRates)(nil), "cosmos_sdk.x.staking.v1.CommissionRates") proto.RegisterType((*Commission)(nil), "cosmos_sdk.x.staking.v1.Commission") + golang_proto.RegisterType((*Commission)(nil), "cosmos_sdk.x.staking.v1.Commission") proto.RegisterType((*Description)(nil), "cosmos_sdk.x.staking.v1.Description") + golang_proto.RegisterType((*Description)(nil), "cosmos_sdk.x.staking.v1.Description") proto.RegisterType((*Validator)(nil), "cosmos_sdk.x.staking.v1.Validator") + golang_proto.RegisterType((*Validator)(nil), "cosmos_sdk.x.staking.v1.Validator") proto.RegisterType((*DVPair)(nil), "cosmos_sdk.x.staking.v1.DVPair") + golang_proto.RegisterType((*DVPair)(nil), "cosmos_sdk.x.staking.v1.DVPair") proto.RegisterType((*DVPairs)(nil), "cosmos_sdk.x.staking.v1.DVPairs") + golang_proto.RegisterType((*DVPairs)(nil), "cosmos_sdk.x.staking.v1.DVPairs") proto.RegisterType((*DVVTriplet)(nil), "cosmos_sdk.x.staking.v1.DVVTriplet") + golang_proto.RegisterType((*DVVTriplet)(nil), "cosmos_sdk.x.staking.v1.DVVTriplet") proto.RegisterType((*DVVTriplets)(nil), "cosmos_sdk.x.staking.v1.DVVTriplets") + golang_proto.RegisterType((*DVVTriplets)(nil), "cosmos_sdk.x.staking.v1.DVVTriplets") proto.RegisterType((*Delegation)(nil), "cosmos_sdk.x.staking.v1.Delegation") + golang_proto.RegisterType((*Delegation)(nil), "cosmos_sdk.x.staking.v1.Delegation") proto.RegisterType((*UnbondingDelegation)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegation") + golang_proto.RegisterType((*UnbondingDelegation)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegation") proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry") + golang_proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry") proto.RegisterType((*RedelegationEntry)(nil), "cosmos_sdk.x.staking.v1.RedelegationEntry") + golang_proto.RegisterType((*RedelegationEntry)(nil), "cosmos_sdk.x.staking.v1.RedelegationEntry") proto.RegisterType((*Redelegation)(nil), "cosmos_sdk.x.staking.v1.Redelegation") + golang_proto.RegisterType((*Redelegation)(nil), "cosmos_sdk.x.staking.v1.Redelegation") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.staking.v1.Params") + golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.staking.v1.Params") } func init() { proto.RegisterFile("x/staking/types/types.proto", fileDescriptor_c669c0a3ee1b124c) } +func init() { + golang_proto.RegisterFile("x/staking/types/types.proto", fileDescriptor_c669c0a3ee1b124c) +} var fileDescriptor_c669c0a3ee1b124c = []byte{ - // 1682 bytes of a gzipped FileDescriptorProto + // 1690 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x23, 0x49, 0x15, 0x4f, 0xdb, 0x8e, 0x9d, 0x3c, 0x4f, 0xec, 0xa4, 0xa3, 0xc9, 0x78, 0xb2, 0xac, 0x3b, 0xf4, - 0xa2, 0x55, 0x84, 0x58, 0x5b, 0xd9, 0x45, 0x42, 0xca, 0x5e, 0x76, 0x1c, 0x27, 0x4a, 0x50, 0x82, - 0x66, 0x3b, 0xb3, 0x39, 0xf0, 0x21, 0xab, 0xdc, 0x5d, 0x69, 0x17, 0x71, 0x77, 0x9b, 0xae, 0x72, - 0xd6, 0x41, 0x5c, 0x91, 0x10, 0x12, 0x62, 0x2f, 0x48, 0x7b, 0x1c, 0xf1, 0x0f, 0xf0, 0x1f, 0xa0, - 0xe1, 0x36, 0xdc, 0x46, 0x1c, 0x10, 0x70, 0x30, 0x68, 0xe6, 0x82, 0x38, 0x21, 0x1f, 0x40, 0xe2, - 0x84, 0xba, 0xaa, 0xfa, 0x23, 0x6d, 0x7b, 0xc6, 0xc9, 0x30, 0xc3, 0x48, 0x93, 0xcb, 0x8c, 0xeb, - 0xf5, 0x7b, 0xbf, 0x57, 0xf5, 0xbe, 0xab, 0x02, 0xef, 0x0c, 0xea, 0x94, 0xa1, 0x33, 0xe2, 0xda, - 0x75, 0x76, 0xd1, 0xc3, 0x54, 0xfc, 0x5b, 0xeb, 0xf9, 0x1e, 0xf3, 0xd4, 0x3b, 0xa6, 0x47, 0x1d, - 0x8f, 0xb6, 0xa8, 0x75, 0x56, 0x1b, 0xd4, 0x24, 0x5f, 0xed, 0x7c, 0x6b, 0xfd, 0x7d, 0xd6, 0x21, - 0xbe, 0xd5, 0xea, 0x21, 0x9f, 0x5d, 0xd4, 0x39, 0x6f, 0xdd, 0xf6, 0x6c, 0x2f, 0xfe, 0x25, 0x00, - 0xd6, 0x3f, 0x1a,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0xf7, 0x9e, 0xe3, 0xf3, 0x50, 0x4e, 0xfa, - 0x3d, 0x12, 0xd5, 0xff, 0x98, 0x01, 0x78, 0xd1, 0xbb, 0xcf, 0x5b, 0x30, 0xbd, 0xef, 0x41, 0x5e, - 0x76, 0xa5, 0xec, 0xb5, 0x46, 0x5b, 0x29, 0x9d, 0x70, 0xd7, 0x3f, 0x32, 0xb0, 0xfa, 0x59, 0x58, - 0x91, 0x6f, 0x2c, 0xac, 0x7e, 0x0a, 0x05, 0xec, 0x32, 0x9f, 0x70, 0x13, 0x07, 0xe1, 0xba, 0x35, - 0x35, 0x5c, 0x27, 0x98, 0x6d, 0xd7, 0x65, 0xfe, 0x85, 0x0c, 0xde, 0x10, 0x27, 0x61, 0xec, 0x5f, - 0x66, 0xa1, 0x32, 0x4d, 0x4a, 0xdd, 0x81, 0xb2, 0xe9, 0x63, 0x4e, 0x08, 0xdb, 0xb6, 0xc2, 0xdb, - 0xf6, 0x7a, 0xe2, 0x15, 0xea, 0x32, 0x83, 0x6e, 0x94, 0x42, 0x8a, 0x6c, 0xda, 0x36, 0x7f, 0xf4, - 0x0a, 0x72, 0x26, 0xe0, 0x9a, 0x71, 0xe2, 0xd6, 0x65, 0xd7, 0x8e, 0x9f, 0xba, 0x92, 0x00, 0xa2, - 0x6d, 0x97, 0x62, 0x2a, 0xef, 0xdb, 0x3f, 0x82, 0x32, 0x71, 0x09, 0x23, 0xa8, 0xdb, 0x6a, 0xa3, - 0x2e, 0x72, 0xcd, 0xeb, 0x5c, 0x60, 0x44, 0xa3, 0x95, 0x6a, 0x53, 0x70, 0xba, 0x51, 0x92, 0x94, - 0x86, 0x20, 0xa8, 0xfb, 0x50, 0x08, 0x55, 0xe5, 0xae, 0x35, 0xe5, 0x85, 0xe2, 0x09, 0x8f, 0xfc, - 0x22, 0x0b, 0x2b, 0xd1, 0x63, 0xcf, 0x8d, 0x2b, 0x66, 0x75, 0xc5, 0x11, 0x80, 0xa8, 0x24, 0x41, - 0x2f, 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x89, 0x11, 0x44, 0xad, 0x40, 0xc1, 0xf1, 0x5c, 0x72, 0x26, 0x83, 0x73, 0xd1, 0x08, 0x97, 0xea, + 0x3a, 0x2c, 0x10, 0x0b, 0xbb, 0x8c, 0xb0, 0x0b, 0xe1, 0x58, 0x23, 0x5a, 0x07, 0x52, 0x9f, 0xe0, + 0x36, 0x25, 0xa1, 0x3b, 0x8c, 0x70, 0xa9, 0xee, 0xc1, 0x32, 0xc5, 0x66, 0xdf, 0x27, 0xec, 0xa2, + 0x65, 0x7a, 0x2e, 0x43, 0x26, 0x93, 0xbd, 0xfd, 0x8d, 0xd1, 0x50, 0xbb, 0x27, 0xf6, 0x9a, 0xe6, + 0xd0, 0x8d, 0x72, 0x48, 0xda, 0x11, 0x94, 0x40, 0x83, 0x85, 0x19, 0x22, 0x5d, 0x31, 0x2b, 0x2e, + 0x1a, 0xe1, 0x32, 0x71, 0x96, 0x27, 0x05, 0x58, 0x8c, 0xe7, 0xb0, 0x4f, 0x60, 0xd9, 0xeb, 0x61, + 0x7f, 0x42, 0xa1, 0x3a, 0x8c, 0x35, 0xa7, 0x39, 0x6e, 0x50, 0x2b, 0xca, 0x21, 0x46, 0x58, 0x2a, + 0xf6, 0x82, 0xc0, 0x70, 0x29, 0x76, 0x69, 0x9f, 0xb6, 0xe4, 0xb8, 0x99, 0x49, 0x1f, 0x39, 0xcd, + 0xa1, 0x07, 0x11, 0x20, 0x49, 0x0f, 0xc5, 0x50, 0xba, 0x06, 0xf9, 0x1f, 0x21, 0xd2, 0xc5, 0x16, + 0xb7, 0xe9, 0x82, 0x21, 0x57, 0xea, 0x01, 0xe4, 0x29, 0x43, 0xac, 0x2f, 0x26, 0xf6, 0xf9, 0xc6, + 0xd6, 0x8c, 0x7b, 0x6e, 0x78, 0xae, 0x75, 0xcc, 0x05, 0x0d, 0x09, 0xa0, 0xee, 0x41, 0x9e, 0x79, + 0x67, 0xd8, 0x95, 0x46, 0xbd, 0x56, 0xca, 0x1f, 0xb8, 0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, 0x3e, 0x7c, 0xfa, + 0xbc, 0xaa, 0x3c, 0x7b, 0x5e, 0x55, 0xfe, 0xfe, 0xbc, 0xaa, 0x7c, 0x7a, 0x59, 0x9d, 0x7b, 0x72, + 0x59, 0x55, 0x9e, 0x5e, 0x56, 0x95, 0x67, 0x97, 0xd5, 0xb9, 0x3f, 0x5f, 0x56, 0xe7, 0xbe, 0xf7, + 0xad, 0x17, 0x06, 0x4d, 0xea, 0xaf, 0xb2, 0xed, 0x3c, 0xf7, 0xce, 0x7b, 0xff, 0x0b, 0x00, 0x00, + 0xff, 0xff, 0x07, 0xab, 0x87, 0xd0, 0xaf, 0x1d, 0x00, 0x00, } func (this *MsgCreateValidator) Equal(that interface{}) bool { diff --git a/x/supply/types/types.pb.go b/x/supply/types/types.pb.go index d94ee7669f91..bb99f1d723f6 100644 --- a/x/supply/types/types.pb.go +++ b/x/supply/types/types.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -65,6 +67,10 @@ func (m *ModuleAccount) XXX_DiscardUnknown() { var xxx_messageInfo_ModuleAccount proto.InternalMessageInfo +func (*ModuleAccount) XXX_MessageName() string { + return "cosmos_sdk.x.supply.v1.ModuleAccount" +} + // Supply represents a struct that passively keeps track of the total supply // amounts in the network. type Supply struct { @@ -103,38 +109,44 @@ func (m *Supply) XXX_DiscardUnknown() { var xxx_messageInfo_Supply proto.InternalMessageInfo +func (*Supply) XXX_MessageName() string { + return "cosmos_sdk.x.supply.v1.Supply" +} func init() { proto.RegisterType((*ModuleAccount)(nil), "cosmos_sdk.x.supply.v1.ModuleAccount") + golang_proto.RegisterType((*ModuleAccount)(nil), "cosmos_sdk.x.supply.v1.ModuleAccount") proto.RegisterType((*Supply)(nil), "cosmos_sdk.x.supply.v1.Supply") + golang_proto.RegisterType((*Supply)(nil), "cosmos_sdk.x.supply.v1.Supply") } func init() { proto.RegisterFile("x/supply/types/types.proto", fileDescriptor_e14b855c341cf347) } +func init() { golang_proto.RegisterFile("x/supply/types/types.proto", fileDescriptor_e14b855c341cf347) } var fileDescriptor_e14b855c341cf347 = []byte{ - // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xaa, 0xd0, 0x2f, 0x2e, - 0x2d, 0x28, 0xc8, 0xa9, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, - 0x25, 0xf9, 0x42, 0x62, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, - 0x7a, 0x10, 0x65, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, - 0x45, 0x25, 0x95, 0xfa, 0x60, 0xa5, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xbf, 0x94, - 0x20, 0x86, 0x91, 0x52, 0x12, 0x15, 0xfa, 0x89, 0xa5, 0x25, 0x19, 0x98, 0x96, 0x29, 0x6d, 0x62, - 0xe4, 0xe2, 0xf5, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0x75, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x11, - 0x4a, 0xe4, 0xe2, 0x49, 0x4a, 0x2c, 0x4e, 0x8d, 0x4f, 0x84, 0xf0, 0x25, 0x18, 0x15, 0x18, 0x35, - 0xb8, 0x8d, 0x14, 0xf5, 0x50, 0x5c, 0x05, 0x32, 0x4d, 0xaf, 0xcc, 0x50, 0xcf, 0x29, 0xb1, 0x18, - 0xa6, 0xd1, 0x49, 0xfa, 0xc2, 0x3d, 0x79, 0xc6, 0x4f, 0xf7, 0xe4, 0x85, 0x2b, 0x13, 0x73, 0x73, - 0xac, 0x94, 0x90, 0x0d, 0x51, 0x0a, 0xe2, 0x4e, 0x42, 0xa8, 0x14, 0x12, 0xe2, 0x62, 0xc9, 0x4b, - 0xcc, 0x4d, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x14, 0xb8, 0xb8, 0x0b, - 0x52, 0x8b, 0x72, 0x33, 0x8b, 0x8b, 0x33, 0xf3, 0xf3, 0x8a, 0x25, 0x98, 0x15, 0x98, 0x35, 0x38, - 0x83, 0x90, 0x85, 0xac, 0x38, 0x3a, 0x16, 0xc8, 0x33, 0xcc, 0x58, 0x20, 0xcf, 0xa0, 0x54, 0xcc, - 0xc5, 0x16, 0x0c, 0x0e, 0x16, 0xa1, 0x68, 0x2e, 0xd6, 0x92, 0xfc, 0x92, 0xc4, 0x1c, 0x09, 0x46, - 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x61, 0x64, 0x57, 0x96, 0x19, 0xea, 0x39, 0xe7, 0x67, 0xe6, 0x39, - 0x19, 0x9c, 0xb8, 0x27, 0xcf, 0xb0, 0xea, 0xbe, 0xbc, 0x46, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, - 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x44, 0x19, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0x86, 0x06, 0x0a, 0x48, - 0x43, 0x71, 0x10, 0xc4, 0x4c, 0x2b, 0x1e, 0x98, 0x85, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0xb9, 0x9e, - 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, - 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x36, 0x5e, 0x83, 0x51, 0x63, 0x3a, - 0x89, 0x0d, 0x1c, 0xee, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x83, 0x25, 0xe2, 0x0f, 0x02, - 0x02, 0x00, 0x00, + // 361 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x3d, 0x4f, 0xf2, 0x40, + 0x1c, 0xef, 0x3d, 0x3c, 0x0f, 0x79, 0x68, 0x71, 0xb0, 0x24, 0xa6, 0xa9, 0xc9, 0x5d, 0xed, 0x60, + 0x9a, 0x18, 0xaf, 0x82, 0x1b, 0x9b, 0x75, 0x66, 0xa9, 0x9b, 0x0e, 0xe4, 0xfa, 0x12, 0x68, 0x68, + 0x7b, 0x4d, 0xef, 0x4a, 0xe8, 0x37, 0x70, 0x74, 0x74, 0x64, 0x76, 0xf4, 0x13, 0x38, 0x32, 0x32, + 0x3a, 0xa1, 0xa1, 0x8b, 0xb3, 0x9f, 0xc0, 0xd0, 0x42, 0x80, 0x90, 0xb8, 0xdc, 0xfd, 0xef, 0xf2, + 0x7b, 0xcb, 0xef, 0x2f, 0xaa, 0x13, 0x93, 0x65, 0x49, 0x12, 0xe6, 0x26, 0xcf, 0x13, 0x9f, 0x55, + 0x27, 0x4e, 0x52, 0xca, 0xa9, 0x7c, 0xe2, 0x52, 0x16, 0x51, 0xd6, 0x67, 0xde, 0x08, 0x4f, 0x70, + 0x05, 0xc3, 0xe3, 0xb6, 0x7a, 0xce, 0x87, 0x41, 0xea, 0xf5, 0x13, 0x92, 0xf2, 0xdc, 0x2c, 0xa1, + 0xe6, 0x80, 0x0e, 0xe8, 0x76, 0xaa, 0xf8, 0xea, 0xf1, 0x81, 0xa4, 0xaa, 0x4c, 0x4c, 0x92, 0xf1, + 0xe1, 0xa1, 0x99, 0xfe, 0x0a, 0xc4, 0xa3, 0x1e, 0xf5, 0xb2, 0xd0, 0xbf, 0x71, 0x5d, 0x9a, 0xc5, + 0x5c, 0x26, 0x62, 0xd3, 0x21, 0xcc, 0xef, 0x93, 0xea, 0xad, 0x00, 0x0d, 0x18, 0x52, 0xe7, 0x0c, + 0xef, 0xa5, 0x5a, 0xa9, 0xe1, 0x71, 0x1b, 0x5b, 0x84, 0x6d, 0x88, 0xd6, 0xe9, 0x7c, 0x81, 0xc0, + 0xf7, 0x02, 0xb5, 0x72, 0x12, 0x85, 0x5d, 0x7d, 0x57, 0x44, 0xb7, 0x25, 0x67, 0x8b, 0x94, 0x65, + 0xf1, 0x6f, 0x4c, 0x22, 0x5f, 0xf9, 0xa3, 0x01, 0xa3, 0x61, 0x97, 0xb3, 0xac, 0x89, 0x52, 0xe2, + 0xa7, 0x51, 0xc0, 0x58, 0x40, 0x63, 0xa6, 0xd4, 0xb4, 0x9a, 0xd1, 0xb0, 0x77, 0xbf, 0xba, 0xff, + 0x1f, 0xa7, 0x48, 0x78, 0x9e, 0x22, 0x41, 0x67, 0x62, 0xfd, 0xae, 0xac, 0x45, 0x7e, 0x10, 0xff, + 0x71, 0xca, 0x49, 0xa8, 0x00, 0xad, 0x66, 0x48, 0x9d, 0xd6, 0x6e, 0xca, 0x71, 0x1b, 0xdf, 0xd2, + 0x20, 0xb6, 0xae, 0x66, 0x0b, 0x24, 0xbc, 0x7c, 0x20, 0x63, 0x10, 0xf0, 0x61, 0xe6, 0x60, 0x97, + 0x46, 0x66, 0x05, 0x5b, 0x5f, 0x97, 0xcc, 0x1b, 0xad, 0x4b, 0x59, 0x11, 0x98, 0x5d, 0x69, 0x76, + 0x9b, 0x1b, 0xc3, 0xaf, 0x29, 0x02, 0x56, 0x6f, 0xb6, 0x84, 0x60, 0xbe, 0x84, 0xe0, 0x73, 0x09, + 0xc1, 0x53, 0x01, 0x85, 0xb7, 0x02, 0x82, 0x59, 0x01, 0xc1, 0xbc, 0x80, 0xc2, 0x7b, 0x01, 0x85, + 0xfb, 0x8b, 0x5f, 0x0d, 0xf6, 0x37, 0xee, 0xd4, 0xcb, 0xfe, 0xaf, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x51, 0xe8, 0x53, 0x39, 0x0a, 0x02, 0x00, 0x00, } func (this *Supply) Equal(that interface{}) bool { diff --git a/x/upgrade/types/types.pb.go b/x/upgrade/types/types.pb.go index c0cb0cf18de7..fc1055c4be92 100644 --- a/x/upgrade/types/types.pb.go +++ b/x/upgrade/types/types.pb.go @@ -8,6 +8,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -78,6 +80,10 @@ func (m *Plan) XXX_DiscardUnknown() { var xxx_messageInfo_Plan proto.InternalMessageInfo +func (*Plan) XXX_MessageName() string { + return "cosmos_sdk.x.upgrade.v1.Plan" +} + // SoftwareUpgradeProposal is a gov Content type for initiating a software upgrade type SoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -117,6 +123,10 @@ func (m *SoftwareUpgradeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo +func (*SoftwareUpgradeProposal) XXX_MessageName() string { + return "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal" +} + // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software upgrade type CancelSoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -155,40 +165,50 @@ func (m *CancelSoftwareUpgradeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_CancelSoftwareUpgradeProposal proto.InternalMessageInfo +func (*CancelSoftwareUpgradeProposal) XXX_MessageName() string { + return "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal" +} func init() { proto.RegisterType((*Plan)(nil), "cosmos_sdk.x.upgrade.v1.Plan") + golang_proto.RegisterType((*Plan)(nil), "cosmos_sdk.x.upgrade.v1.Plan") proto.RegisterType((*SoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal") + golang_proto.RegisterType((*SoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal") proto.RegisterType((*CancelSoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal") + golang_proto.RegisterType((*CancelSoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal") } func init() { proto.RegisterFile("x/upgrade/types/types.proto", fileDescriptor_2a308fd9dd71aff8) } +func init() { + golang_proto.RegisterFile("x/upgrade/types/types.proto", fileDescriptor_2a308fd9dd71aff8) +} var fileDescriptor_2a308fd9dd71aff8 = []byte{ - // 379 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x41, 0x6f, 0xda, 0x30, - 0x14, 0xc7, 0xe3, 0x91, 0xa1, 0x61, 0x6e, 0xd6, 0x34, 0x22, 0x26, 0x9c, 0x88, 0xc3, 0xc4, 0x61, - 0x73, 0x34, 0x76, 0xd8, 0xb4, 0x23, 0xbb, 0x4f, 0x28, 0x5b, 0x2f, 0x95, 0x2a, 0x64, 0x12, 0x93, - 0x58, 0x24, 0xb1, 0x15, 0x9b, 0x16, 0xbe, 0x40, 0xcf, 0x7c, 0x84, 0x7e, 0x1c, 0x8e, 0x1c, 0x39, - 0xb5, 0x05, 0x2e, 0xfd, 0x18, 0x55, 0xe2, 0xa0, 0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, 0x23, 0x7c, - 0xaf, 0xb9, 0x4e, 0x4f, 0x70, 0x26, 0x41, 0x1e, 0x6c, 0x47, 0x4c, 0x85, 0x05, 0x97, 0x9a, 0x8b, - 0xbc, 0x82, 0x6c, 0x05, 0xcf, 0x8f, 0xd0, 0x4f, 0x68, 0xcb, 0x94, 0xe6, 0x15, 0x43, 0x7b, 0xd8, - 0x23, 0xaf, 0x6c, 0x93, 0x94, 0x0b, 0x18, 0xd9, 0xe5, 0x08, 0x41, 0x55, 0x50, 0x23, 0x5d, 0xc0, - 0xde, 0x1f, 0x9a, 0x87, 0x2c, 0x7d, 0x63, 0x2e, 0x63, 0x3f, 0xfa, 0xbb, 0xd9, 0x63, 0x6b, 0xb7, - 0xc7, 0xd6, 0xe6, 0x80, 0xc1, 0xf6, 0x80, 0xc1, 0xfd, 0x01, 0x83, 0xf5, 0x11, 0x5b, 0xdb, 0x23, - 0xb6, 0x76, 0x47, 0x6c, 0x9d, 0x7f, 0x8d, 0xb9, 0x4e, 0x16, 0x53, 0x12, 0x8a, 0xcc, 0x37, 0xec, - 0xf5, 0xef, 0x9b, 0x8a, 0xe6, 0xfe, 0x8b, 0x87, 0x33, 0x6d, 0x56, 0xf7, 0xf2, 0xe3, 0x31, 0x00, - 0x00, 0xff, 0xff, 0x45, 0x05, 0x01, 0x90, 0x52, 0x02, 0x00, 0x00, + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbd, 0xae, 0xd3, 0x30, + 0x18, 0x8d, 0x69, 0xa8, 0xa8, 0xbb, 0x59, 0x88, 0x46, 0x45, 0x75, 0xa2, 0x0e, 0xa8, 0x03, 0x38, + 0xa2, 0x0c, 0x20, 0xc6, 0xf2, 0x02, 0x55, 0xf8, 0x19, 0x90, 0x50, 0xe5, 0x26, 0x6e, 0x62, 0x35, + 0x89, 0xad, 0xd8, 0x85, 0xf6, 0x05, 0x98, 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3d, 0x80, 0x83, 0xcf, + 0x62, 0xa5, 0x7f, 0xd1, 0x82, 0x7d, 0x35, 0x41, 0xe7, 0x85, 0x90, 0x42, 0xd1, 0x14, 0x3d, 0x87, + 0x4f, 0x35, 0xd7, 0xe9, 0xc5, 0x9c, 0x29, 0x90, 0x07, 0xfb, 0x11, 0x53, 0x61, 0xc1, 0xa5, 0xe6, + 0x22, 0x6f, 0x4c, 0xf6, 0x82, 0xbb, 0x47, 0xe8, 0x3d, 0xb4, 0x65, 0x4a, 0xf3, 0xc6, 0x43, 0x7f, + 0x3a, 0x22, 0x0f, 0x6c, 0x93, 0xd4, 0x0b, 0x98, 0xd9, 0x75, 0x84, 0xa0, 0x69, 0x68, 0x2d, 0xfd, + 0x80, 0xa3, 0x4f, 0x34, 0x0f, 0x59, 0xfa, 0xc8, 0xbe, 0x8c, 0xfc, 0xec, 0x5b, 0x79, 0xc2, 0xd6, + 0xf1, 0x84, 0xad, 0xf2, 0x8c, 0xc1, 0xe1, 0x8c, 0xc1, 0xd5, 0x19, 0x83, 0x7d, 0x85, 0xad, 0xbf, + 0x15, 0x06, 0x65, 0x85, 0xc1, 0xa1, 0xc2, 0xd6, 0xb1, 0xc2, 0xd6, 0xf7, 0xd7, 0x31, 0xd7, 0xc9, + 0x66, 0x49, 0x42, 0x91, 0xf9, 0x26, 0x43, 0xfb, 0x7b, 0xa3, 0xa2, 0xb5, 0x7f, 0xef, 0x01, 0x2d, + 0xbb, 0xcd, 0xfd, 0xbc, 0xbb, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x69, 0xe4, 0xa0, 0x5a, 0x02, + 0x00, 0x00, } func (this *Plan) Equal(that interface{}) bool { From 524b4eaf79069d219031b38e4bee4b8304432004 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 7 Apr 2020 22:26:13 -0400 Subject: [PATCH 10/41] Fix mock tests --- types/module/module_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/module/module_test.go b/types/module/module_test.go index fa5b17ab35e0..27e56641835c 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -153,6 +153,8 @@ func TestManager_RegisterRoutes(t *testing.T) { handler3 := sdk.Querier(nil) mockAppModule1.EXPECT().NewQuerierHandler().Times(1).Return(handler3) queryRouter.EXPECT().AddRoute(gomock.Eq("querierRoute1"), gomock.Eq(handler3)).Times(1) + mockAppModule1.EXPECT().RegisterQueryServer(queryRouter).Times(1) + mockAppModule2.EXPECT().RegisterQueryServer(queryRouter).Times(1) mm.RegisterRoutes(router, queryRouter) } From db2f11347769e2634cf56df81c1a1795ea38be8e Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 10:21:10 -0400 Subject: [PATCH 11/41] Run goimports --- baseapp/queryrouter.go | 1 + types/router.go | 3 ++- x/bank/keeper/querier.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index e487c56c5709..4907b93f504d 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -5,6 +5,7 @@ import ( "strings" gocontext "context" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" diff --git a/types/router.go b/types/router.go index b2c6ccfc0dff..fb5ab055a9d7 100644 --- a/types/router.go +++ b/types/router.go @@ -1,8 +1,9 @@ package types import ( - "google.golang.org/grpc" "regexp" + + "google.golang.org/grpc" ) var ( diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index 681b3ba028f2..fa95509bff76 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -2,6 +2,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/types" ) From e97bdb1110f58dee2bb56a9d4483fc4d29d933a3 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 10:33:28 -0400 Subject: [PATCH 12/41] Run goimports --- x/auth/module.go | 3 ++- x/mint/module.go | 3 ++- x/supply/module.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/x/auth/module.go b/x/auth/module.go index 1d1e99efba69..eb75a131ae42 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -3,9 +3,10 @@ package auth import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/mint/module.go b/x/mint/module.go index edb7590426f8..ef434598223d 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -3,9 +3,10 @@ package mint import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/gorilla/mux" diff --git a/x/supply/module.go b/x/supply/module.go index 8d9ed2785e8e..df4751dd07fd 100644 --- a/x/supply/module.go +++ b/x/supply/module.go @@ -3,9 +3,10 @@ package supply import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" From 480ecb93b130ed362f3530d43c4ca0adf7aebdd1 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 11:02:12 -0400 Subject: [PATCH 13/41] Fix buf lint errors --- baseapp/queryrouter.go | 14 +- .../adr-021-protobuf-query-encoding.md | 28 +- tests/mocks/types_module_module.go | 12 +- types/module/module.go | 10 +- x/auth/module.go | 2 +- x/bank/alias.go | 8 +- x/bank/client/cli/query.go | 10 +- x/bank/client/rest/query.go | 4 +- x/bank/keeper/querier.go | 12 +- x/bank/keeper/querier_test.go | 4 +- x/bank/module.go | 4 +- x/bank/types/querier.go | 12 +- x/bank/types/types.pb.go | 458 +++++++++++++----- x/bank/types/types.proto | 20 +- x/crisis/module.go | 2 +- x/distribution/module.go | 2 +- x/evidence/module.go | 2 +- x/gov/module.go | 2 +- x/mint/module.go | 2 +- x/slashing/module.go | 2 +- x/staking/module.go | 2 +- x/supply/module.go | 2 +- x/upgrade/module.go | 2 +- 23 files changed, 410 insertions(+), 206 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index 4907b93f504d..ef9886c96ca6 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -71,16 +71,16 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ } } -type QueryServerTestHelper struct { +type QueryServiceTestHelper struct { *QueryRouter ctx sdk.Context } -func NewQueryServerTestHelper(ctx sdk.Context) *QueryServerTestHelper { - return &QueryServerTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} +func NewQueryServerTestHelper(ctx sdk.Context) *QueryServiceTestHelper { + return &QueryServiceTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} } -func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { +func (q *QueryServiceTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { path := strings.Split(method, "/") if len(path) != 3 { return fmt.Errorf("unexpected method name %s", method) @@ -100,9 +100,9 @@ func (q *QueryServerTestHelper) Invoke(ctx gocontext.Context, method string, arg return protoCodec.Unmarshal(resBz, reply) } -func (q *QueryServerTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { +func (q *QueryServiceTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("not supported") } -var _ gogogrpc.Server = &QueryServerTestHelper{} -var _ gogogrpc.ClientConn = &QueryServerTestHelper{} +var _ gogogrpc.Server = &QueryServiceTestHelper{} +var _ gogogrpc.ClientConn = &QueryServiceTestHelper{} diff --git a/docs/architecture/adr-021-protobuf-query-encoding.md b/docs/architecture/adr-021-protobuf-query-encoding.md index 198432e94baf..a2d2125343b4 100644 --- a/docs/architecture/adr-021-protobuf-query-encoding.md +++ b/docs/architecture/adr-021-protobuf-query-encoding.md @@ -60,7 +60,7 @@ A hypothetical example for the `gov` module would look something like: import "google/protobuf/any.proto"; -service Query { +service QueryService { rpc GetProposal(GetProposalParams) returns (AnyProposal) { } } @@ -73,11 +73,11 @@ message AnyProposal { ### Custom Query Implementation In order to implement the query service, we can reuse the existing [gogo protobuf](https://github.com/gogo/protobuf) -grpc plugin, which for a service named `Query` generates an interface named -`QueryServer` as below: +grpc plugin, which for a service named `QueryService` generates an interface named +`QueryServiceServer` as below: ```go -type QueryServer interface { +type QueryServiceServer interface { QueryBalance(context.Context, *QueryBalanceParams) (*types.Coin, error) QueryAllBalances(context.Context, *QueryAllBalancesParams) (*QueryAllBalancesResponse, error) } @@ -109,13 +109,13 @@ func (q Querier) QueryBalance(ctx context.Context, params *types.QueryBalancePar ### Custom Query Registration and Routing Query server implementations as above would be registered with `AppModule`s using -a new method `RegisterQueryServer(grpc.Server)` which could be implemented simply +a new method `RegisterQueryService(grpc.Server)` which could be implemented simply as below: ```go // x/bank/module.go -func (am AppModule) RegisterQueryServer(server grpc.Server) { - types.RegisterQueryServer(server, keeper.Querier{am.keeper}) +func (am AppModule) RegisterQueryService(server grpc.Server) { + types.RegisterQueryService(server, keeper.Querier{am.keeper}) } ``` @@ -164,7 +164,7 @@ annotations to their `rpc` methods as in this example below. ```proto // x/bank/types/types.proto -service Query { +service QueryService { rpc QueryBalance(QueryBalanceParams) returns (cosmos_sdk.v1.Coin) { option (google.api.http) = { get: "/x/bank/v1/balance/{address}/{denom}" @@ -196,11 +196,11 @@ file. ### Client Usage The gogo protobuf grpc plugin generates client interfaces in addition to server -interfaces. For the `Query` service defined above we would get a `QueryClient` +interfaces. For the `QueryService` service defined above we would get a `QueryServiceClient` interface like: ```go -type QueryClient interface { +type QueryServiceClient interface { QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) } @@ -218,7 +218,7 @@ Clients (such as CLI methods) will then be able to call query methods like this: ```go cliCtx := context.NewCLIContext() -queryClient := types.NewQueryClient(cliCtx.QueryConn()) +queryClient := types.NewQueryServiceClient(cliCtx.QueryConn()) params := &types.QueryBalanceParams{addr, denom} result, err := queryClient.QueryBalance(gocontext.Background(), params) ``` @@ -226,11 +226,11 @@ result, err := queryClient.QueryBalance(gocontext.Background(), params) ### Testing Tests would be able to create a query client directly from keeper and `sdk.Context` -references using a `QueryServerTestHelper` as below: +references using a `QueryServiceTestHelper` as below: ```go -queryHelper := baseapp.NewQueryServerTestHelper(ctx) -types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) +queryHelper := baseapp.NewQueryServiceTestHelper(ctx) +types.RegisterQueryService(queryHelper, keeper.Querier{app.BankKeeper}) queryClient := types.NewQueryClient(queryHelper) ``` diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index 41cf670e635d..5c370f7cec45 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -492,16 +492,16 @@ func (mr *MockAppModuleMockRecorder) NewQuerierHandler() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewQuerierHandler", reflect.TypeOf((*MockAppModule)(nil).NewQuerierHandler)) } -// RegisterQueryServer mocks base method -func (m *MockAppModule) RegisterQueryServer(arg0 grpc.Server) { +// RegisterQueryService mocks base method +func (m *MockAppModule) RegisterQueryService(arg0 grpc.Server) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterQueryServer", arg0) + m.ctrl.Call(m, "RegisterQueryService", arg0) } -// RegisterQueryServer indicates an expected call of RegisterQueryServer -func (mr *MockAppModuleMockRecorder) RegisterQueryServer(arg0 interface{}) *gomock.Call { +// RegisterQueryService indicates an expected call of RegisterQueryService +func (mr *MockAppModuleMockRecorder) RegisterQueryService(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterQueryServer", reflect.TypeOf((*MockAppModule)(nil).RegisterQueryServer), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterQueryService", reflect.TypeOf((*MockAppModule)(nil).RegisterQueryService), arg0) } // BeginBlock mocks base method diff --git a/types/module/module.go b/types/module/module.go index fb57cf20f5e2..87a7bf155c12 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -142,11 +142,11 @@ type AppModule interface { // routes Route() string NewHandler() sdk.Handler - // TODO: deprecate in favor of RegisterQueryServer + // TODO: deprecate in favor of RegisterQueryService QuerierRoute() string - // TODO: deprecate in favor of RegisterQueryServer + // TODO: deprecate in favor of RegisterQueryService NewQuerierHandler() sdk.Querier - RegisterQueryServer(grpc.Server) + RegisterQueryService(grpc.Server) // ABCI BeginBlock(sdk.Context, abci.RequestBeginBlock) @@ -182,7 +182,7 @@ func (GenesisOnlyAppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns an empty module querier func (gam GenesisOnlyAppModule) NewQuerierHandler() sdk.Querier { return nil } -func (gam GenesisOnlyAppModule) RegisterQueryServer(grpc.Server) {} +func (gam GenesisOnlyAppModule) RegisterQueryService(grpc.Server) {} // BeginBlock returns an empty module begin-block func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} @@ -259,7 +259,7 @@ func (m *Manager) RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter) if module.QuerierRoute() != "" { queryRouter.AddRoute(module.QuerierRoute(), module.NewQuerierHandler()) } - module.RegisterQueryServer(queryRouter) + module.RegisterQueryService(queryRouter) } } diff --git a/x/auth/module.go b/x/auth/module.go index eb75a131ae42..f21e299189da 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -115,7 +115,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.accountKeeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // InitGenesis performs genesis initialization for the auth module. It returns // no validator updates. diff --git a/x/bank/alias.go b/x/bank/alias.go index 13da861c28ae..4beda41c5d9b 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -45,8 +45,8 @@ var ( NewOutput = types.NewOutput ValidateInputsOutputs = types.ValidateInputsOutputs ParamKeyTable = types.ParamKeyTable - NewQueryBalanceParams = types.NewQueryBalanceParams - NewQueryAllBalancesParams = types.NewQueryAllBalancesParams + NewQueryBalanceParams = types.NewQueryBalanceRequest + NewQueryAllBalancesParams = types.NewQueryAllBalancesRequest ModuleCdc = types.ModuleCdc ParamStoreKeySendEnabled = types.ParamStoreKeySendEnabled BalancesPrefix = types.BalancesPrefix @@ -66,7 +66,7 @@ type ( MsgMultiSend = types.MsgMultiSend Input = types.Input Output = types.Output - QueryBalanceParams = types.QueryBalanceParams - QueryAllBalancesParams = types.QueryAllBalancesParams + QueryBalanceRequest = types.QueryBalanceRequest + QueryAllBalancesRequest = types.QueryAllBalancesRequest GenesisBalancesIterator = types.GenesisBalancesIterator ) diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index 66bc9d8a1d76..99fb87b8c5a5 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -48,17 +48,17 @@ func NewBalancesCmd() *cobra.Command { return err } - queryClient := types.NewQueryClient(cliCtx.QueryConn()) + queryClient := types.NewQueryServiceClient(cliCtx.QueryConn()) denom := viper.GetString(flagDenom) if denom == "" { - params := &types.QueryAllBalancesParams{Address: addr} + params := types.NewQueryAllBalancesRequest(addr) result, err := queryClient.QueryAllBalances(gocontext.Background(), params) if err != nil { return err } return cliCtx.Println(result.Balances) } else { - params := &types.QueryBalanceParams{Address: addr, Denom: denom} + params := types.NewQueryBalanceRequest(addr, denom) result, err := queryClient.QueryBalance(gocontext.Background(), params) if err != nil { return err @@ -123,10 +123,10 @@ func GetBalancesCmd(cdc *codec.Codec) *cobra.Command { denom := viper.GetString(flagDenom) if denom == "" { - params = types.NewQueryAllBalancesParams(addr) + params = types.NewQueryAllBalancesRequest(addr) route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryAllBalances) } else { - params = types.NewQueryBalanceParams(addr, denom) + params = types.NewQueryBalanceRequest(addr, denom) route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryBalance) } diff --git a/x/bank/client/rest/query.go b/x/bank/client/rest/query.go index 1b1a3bab4058..b33cc804cd03 100644 --- a/x/bank/client/rest/query.go +++ b/x/bank/client/rest/query.go @@ -48,10 +48,10 @@ func QueryBalancesRequestHandlerFn(ctx context.CLIContext) http.HandlerFunc { denom := r.FormValue("denom") if denom == "" { - params = types.NewQueryAllBalancesParams(addr) + params = types.NewQueryAllBalancesRequest(addr) route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryAllBalances) } else { - params = types.NewQueryBalanceParams(addr, denom) + params = types.NewQueryBalanceRequest(addr, denom) route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryBalance) } diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index fa95509bff76..8ae4c131bed7 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -11,14 +11,14 @@ type Querier struct { Keeper } -var _ types.QueryServer = Querier{} +var _ types.QueryServiceServer = Querier{} -func (q Querier) QueryBalance(ctx context.Context, params *types.QueryBalanceParams) (*sdk.Coin, error) { - balance := q.GetBalance(sdk.UnwrapSDKContext(ctx), params.Address, params.Denom) - return &balance, nil +func (q Querier) QueryBalance(ctx context.Context, req *types.QueryBalanceRequest) (*types.QueryBalanceResponse, error) { + balance := q.GetBalance(sdk.UnwrapSDKContext(ctx), req.Address, req.Denom) + return &types.QueryBalanceResponse{Balance: &balance}, nil } -func (q Querier) QueryAllBalances(ctx context.Context, params *types.QueryAllBalancesParams) (*types.QueryAllBalancesResponse, error) { - balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), params.Address) +func (q Querier) QueryAllBalances(ctx context.Context, req *types.QueryAllBalancesRequest) (*types.QueryAllBalancesResponse, error) { + balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), req.Address) return &types.QueryAllBalancesResponse{Balances: balances}, nil } diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index 01a95cfd85ea..14c7581347f6 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -17,7 +17,7 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) queryClient := types.NewQueryClient(queryHelper) - req := types.NewQueryBalanceParams(addr, fooDenom) + req := types.NewQueryBalanceRequest(addr, fooDenom) balance, err := queryClient.QueryBalance(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(balance) @@ -47,7 +47,7 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { //suite.Require().NotNil(err) //suite.Require().Nil(res) - req := types.NewQueryAllBalancesParams(addr) + req := types.NewQueryAllBalancesRequest(addr) res, err := queryClient.QueryAllBalances(gocontext.Background(), &req) suite.Require().NoError(err) suite.Require().NotNil(res) diff --git a/x/bank/module.go b/x/bank/module.go index fcae7ba272e5..13d97429344b 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -78,8 +78,8 @@ type AppModule struct { accountKeeper types.AccountKeeper } -func (am AppModule) RegisterQueryServer(server grpc.Server) { - types.RegisterQueryServer(server, keeper.Querier{Keeper: am.keeper}) +func (am AppModule) RegisterQueryService(server grpc.Server) { + types.RegisterQueryServiceServer(server, keeper.Querier{Keeper: am.keeper}) } // NewAppModule creates a new AppModule object diff --git a/x/bank/types/querier.go b/x/bank/types/querier.go index f3b79bdd1599..6f9423f8a72c 100644 --- a/x/bank/types/querier.go +++ b/x/bank/types/querier.go @@ -10,12 +10,12 @@ const ( QueryAllBalances = "all_balances" ) -// NewQueryBalanceParams creates a new instance of QueryBalanceParams. -func NewQueryBalanceParams(addr sdk.AccAddress, denom string) QueryBalanceParams { - return QueryBalanceParams{Address: addr, Denom: denom} +// NewQueryBalanceRequest creates a new instance of QueryBalanceRequest. +func NewQueryBalanceRequest(addr sdk.AccAddress, denom string) *QueryBalanceRequest { + return &QueryBalanceRequest{Address: addr, Denom: denom} } -// NewQueryAllBalancesParams creates a new instance of QueryAllBalancesParams. -func NewQueryAllBalancesParams(addr sdk.AccAddress) QueryAllBalancesParams { - return QueryAllBalancesParams{Address: addr} +// NewQueryAllBalancesRequest creates a new instance of QueryAllBalancesRequest. +func NewQueryAllBalancesRequest(addr sdk.AccAddress) *QueryAllBalancesRequest { + return &QueryAllBalancesRequest{Address: addr} } diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index 04a646116b29..e124929580ed 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -271,23 +271,23 @@ func (*MsgMultiSend) XXX_MessageName() string { } // QueryBalanceParams defines the params for querying an account balance. -type QueryBalanceParams struct { +type QueryBalanceRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *QueryBalanceParams) Reset() { *m = QueryBalanceParams{} } -func (m *QueryBalanceParams) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceParams) ProtoMessage() {} -func (*QueryBalanceParams) Descriptor() ([]byte, []int) { +func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } +func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceRequest) ProtoMessage() {} +func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_934ff6b24d3432e2, []int{4} } -func (m *QueryBalanceParams) XXX_Unmarshal(b []byte) error { +func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryBalanceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryBalanceParams.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -297,53 +297,102 @@ func (m *QueryBalanceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryBalanceParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceParams.Merge(m, src) +func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceRequest.Merge(m, src) } -func (m *QueryBalanceParams) XXX_Size() int { +func (m *QueryBalanceRequest) XXX_Size() int { return m.Size() } -func (m *QueryBalanceParams) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceParams.DiscardUnknown(m) +func (m *QueryBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryBalanceParams proto.InternalMessageInfo +var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo -func (m *QueryBalanceParams) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { if m != nil { return m.Address } return nil } -func (m *QueryBalanceParams) GetDenom() string { +func (m *QueryBalanceRequest) GetDenom() string { if m != nil { return m.Denom } return "" } -func (*QueryBalanceParams) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryBalanceParams" +func (*QueryBalanceRequest) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryBalanceRequest" +} + +// QueryBalanceResponse is the response for the QueryBalance rpc method +type QueryBalanceResponse struct { + Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{5} +} +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() *types.Coin { + if m != nil { + return m.Balance + } + return nil +} + +func (*QueryBalanceResponse) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryBalanceResponse" } // QueryAllBalancesParams defines the params for querying all account balances -type QueryAllBalancesParams struct { +type QueryAllBalancesRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` } -func (m *QueryAllBalancesParams) Reset() { *m = QueryAllBalancesParams{} } -func (m *QueryAllBalancesParams) String() string { return proto.CompactTextString(m) } -func (*QueryAllBalancesParams) ProtoMessage() {} -func (*QueryAllBalancesParams) Descriptor() ([]byte, []int) { - return fileDescriptor_934ff6b24d3432e2, []int{5} +func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} } +func (m *QueryAllBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesRequest) ProtoMessage() {} +func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{6} } -func (m *QueryAllBalancesParams) XXX_Unmarshal(b []byte) error { +func (m *QueryAllBalancesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryAllBalancesParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryAllBalancesParams.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAllBalancesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -353,29 +402,30 @@ func (m *QueryAllBalancesParams) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryAllBalancesParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllBalancesParams.Merge(m, src) +func (m *QueryAllBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesRequest.Merge(m, src) } -func (m *QueryAllBalancesParams) XXX_Size() int { +func (m *QueryAllBalancesRequest) XXX_Size() int { return m.Size() } -func (m *QueryAllBalancesParams) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllBalancesParams.DiscardUnknown(m) +func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryAllBalancesParams proto.InternalMessageInfo +var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo -func (m *QueryAllBalancesParams) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { if m != nil { return m.Address } return nil } -func (*QueryAllBalancesParams) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryAllBalancesParams" +func (*QueryAllBalancesRequest) XXX_MessageName() string { + return "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest" } +// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method type QueryAllBalancesResponse struct { Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` } @@ -384,7 +434,7 @@ func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesRespon func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllBalancesResponse) ProtoMessage() {} func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_934ff6b24d3432e2, []int{6} + return fileDescriptor_934ff6b24d3432e2, []int{7} } func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -432,10 +482,12 @@ func init() { golang_proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") golang_proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") - proto.RegisterType((*QueryBalanceParams)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceParams") - golang_proto.RegisterType((*QueryBalanceParams)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceParams") - proto.RegisterType((*QueryAllBalancesParams)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesParams") - golang_proto.RegisterType((*QueryAllBalancesParams)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesParams") + proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") + golang_proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") + proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") + golang_proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") + proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") + golang_proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") golang_proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") } @@ -444,46 +496,47 @@ func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934f func init() { golang_proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 610 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0x73, 0x69, 0x93, 0xd2, 0x6b, 0x06, 0x7a, 0xad, 0x50, 0x14, 0x90, 0x5d, 0x79, 0x40, - 0x01, 0xd1, 0xbb, 0xa6, 0x0c, 0x88, 0x8a, 0x25, 0x41, 0x42, 0xa0, 0x2a, 0x02, 0xc2, 0x06, 0x42, - 0xd1, 0xc5, 0x36, 0xae, 0x15, 0xdb, 0x67, 0xf9, 0xce, 0xa1, 0x51, 0x95, 0x85, 0x81, 0x0d, 0x09, - 0x89, 0x7f, 0x00, 0x31, 0xb2, 0x23, 0x18, 0x11, 0x53, 0xc6, 0x4a, 0x2c, 0x4c, 0x01, 0x25, 0x0c, - 0xcc, 0x1d,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92, 0xcd, - 0xff, 0x01, 0x5c, 0xeb, 0xc0, 0xfc, 0x49, 0x4c, 0xcd, 0xe4, 0x3e, 0xf3, 0xb8, 0x89, 0x28, 0x3c, - 0xd3, 0x90, 0xdf, 0xc9, 0xf0, 0xe7, 0x34, 0xf1, 0xe3, 0xb6, 0xdb, 0xef, 0xd2, 0x30, 0x13, 0xf3, - 0xd1, 0x73, 0x00, 0x73, 0xe3, 0x49, 0xa3, 0xe2, 0xf4, 0x61, 0x4d, 0x4e, 0xa3, 0x30, 0xcd, 0x95, - 0x76, 0xed, 0xd9, 0xe7, 0xef, 0xaf, 0xd2, 0x25, 0x44, 0xc8, 0x68, 0x91, 0xc8, 0x7f, 0xec, 0x56, - 0x89, 0x48, 0x07, 0xe4, 0x40, 0x06, 0xd1, 0x21, 0x07, 0x71, 0xee, 0x1d, 0xf4, 0x06, 0xc0, 0xb3, - 0x27, 0x23, 0x41, 0x57, 0x66, 0x98, 0x99, 0x98, 0x50, 0x01, 0x9f, 0xae, 0x7a, 0x18, 0xb4, 0xb6, - 0x15, 0x7b, 0xbd, 0x8c, 0x8a, 0x33, 0xbd, 0xf2, 0x91, 0xd9, 0xca, 0x6e, 0xb7, 0xaf, 0x80, 0xc3, - 0xbe, 0x02, 0xbe, 0xf5, 0x15, 0xf0, 0x72, 0xa0, 0xa4, 0x3e, 0x0e, 0x14, 0xd0, 0x1d, 0x28, 0xe0, - 0x70, 0xa0, 0xa4, 0xbe, 0x0c, 0x94, 0xd4, 0xc3, 0x4b, 0x33, 0xa7, 0x31, 0x7e, 0x75, 0x35, 0xb2, - 0xf1, 0xa5, 0x71, 0xf5, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xc8, 0x33, 0xa1, 0xd1, 0x06, - 0x00, 0x00, + // 637 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xcf, 0x6b, 0x13, 0x4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, + 0x9a, 0xe7, 0x38, 0x9f, 0x4d, 0xb0, 0x86, 0x2f, 0x5a, 0xae, 0x60, 0x17, 0x25, 0xec, 0x02, 0x6a, + 0x9c, 0x0b, 0xcb, 0x87, 0xb4, 0xed, 0xd5, 0xfd, 0x43, 0x0d, 0x1c, 0x1c, 0x6a, 0xe0, 0xeb, 0xa1, + 0x06, 0x9e, 0x0f, 0xb4, 0xc2, 0xfb, 0x81, 0x06, 0xf6, 0x07, 0x1a, 0x38, 0x18, 0x68, 0x85, 0xcf, + 0x03, 0xad, 0xf0, 0x70, 0xfe, 0xdc, 0xb4, 0x4e, 0x9e, 0x91, 0x9d, 0x92, 0x3c, 0x9d, 0xae, 0xfd, + 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x6c, 0x27, 0x85, 0x3a, 0x07, 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { @@ -631,108 +684,112 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// QueryClient is the client API for Query service. +// QueryServiceClient is the client API for QueryService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) - QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) +type QueryServiceClient interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) } -type queryClient struct { +type queryServiceClient struct { cc grpc1.ClientConn } -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} } -func (c *queryClient) QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) { - out := new(types.Coin) - err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/QueryBalance", in, out, opts...) +func (c *queryServiceClient) QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { + out := new(QueryBalanceResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { +func (c *queryServiceClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { out := new(QueryAllBalancesResponse) - err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/QueryAllBalances", in, out, opts...) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", in, out, opts...) if err != nil { return nil, err } return out, nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - QueryBalance(context.Context, *QueryBalanceParams) (*types.Coin, error) - QueryAllBalances(context.Context, *QueryAllBalancesParams) (*QueryAllBalancesResponse, error) +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { } -func (*UnimplementedQueryServer) QueryBalance(ctx context.Context, req *QueryBalanceParams) (*types.Coin, error) { +func (*UnimplementedQueryServiceServer) QueryBalance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryBalance not implemented") } -func (*UnimplementedQueryServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesParams) (*QueryAllBalancesResponse, error) { +func (*UnimplementedQueryServiceServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") } -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) } -func _Query_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceParams) +func _QueryService_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).QueryBalance(ctx, in) + return srv.(QueryServiceServer).QueryBalance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos_sdk.x.bank.v1.Query/QueryBalance", + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryBalance(ctx, req.(*QueryBalanceParams)) + return srv.(QueryServiceServer).QueryBalance(ctx, req.(*QueryBalanceRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllBalancesParams) +func _QueryService_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllBalancesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).QueryAllBalances(ctx, in) + return srv.(QueryServiceServer).QueryAllBalances(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos_sdk.x.bank.v1.Query/QueryAllBalances", + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryAllBalances(ctx, req.(*QueryAllBalancesParams)) + return srv.(QueryServiceServer).QueryAllBalances(ctx, req.(*QueryAllBalancesRequest)) } return interceptor(ctx, in, info, handler) } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos_sdk.x.bank.v1.Query", - HandlerType: (*QueryServer)(nil), +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.x.bank.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryBalance", - Handler: _Query_QueryBalance_Handler, + Handler: _QueryService_QueryBalance_Handler, }, { MethodName: "QueryAllBalances", - Handler: _Query_QueryAllBalances_Handler, + Handler: _QueryService_QueryAllBalances_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -929,7 +986,7 @@ func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryBalanceParams) Marshal() (dAtA []byte, err error) { +func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -939,12 +996,12 @@ func (m *QueryBalanceParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryBalanceParams) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryBalanceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -966,7 +1023,42 @@ func (m *QueryBalanceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAllBalancesParams) Marshal() (dAtA []byte, err error) { +func (m *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Balance != nil { + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllBalancesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -976,12 +1068,12 @@ func (m *QueryAllBalancesParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllBalancesParams) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllBalancesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllBalancesParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1126,7 +1218,7 @@ func (m *MsgMultiSend) Size() (n int) { return n } -func (m *QueryBalanceParams) Size() (n int) { +func (m *QueryBalanceRequest) Size() (n int) { if m == nil { return 0 } @@ -1143,7 +1235,20 @@ func (m *QueryBalanceParams) Size() (n int) { return n } -func (m *QueryAllBalancesParams) Size() (n int) { +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesRequest) Size() (n int) { if m == nil { return 0 } @@ -1695,7 +1800,7 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBalanceParams) Unmarshal(dAtA []byte) error { +func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1718,10 +1823,10 @@ func (m *QueryBalanceParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceParams: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1814,7 +1919,96 @@ func (m *QueryBalanceParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllBalancesParams) Unmarshal(dAtA []byte) error { +func (m *QueryBalanceResponse) 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 ErrIntOverflowTypes + } + 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: QueryBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1837,10 +2031,10 @@ func (m *QueryAllBalancesParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllBalancesParams: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllBalancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllBalancesParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/bank/types/types.proto b/x/bank/types/types.proto index 05ca5345e29d..2c0f66232349 100644 --- a/x/bank/types/types.proto +++ b/x/bank/types/types.proto @@ -60,13 +60,17 @@ message MsgMultiSend { // Query // -service Query { - rpc QueryBalance(QueryBalanceParams) returns (cosmos_sdk.v1.Coin) { +// Query provides defines the gRPC querier service +service QueryService { + // QueryBalance queries the balance of a single coin for a single account + rpc QueryBalance (QueryBalanceRequest) returns (QueryBalanceResponse) { option (google.api.http) = { get: "/cosmos_sdk/x/bank/v1/balance/{address}/{denom}" }; } - rpc QueryAllBalances(QueryAllBalancesParams) returns (QueryAllBalancesResponse) { + + // QueryBalance queries the balance of all coins for a single account + rpc QueryAllBalances (QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { option (google.api.http) = { get: "/cosmos_sdk/x/bank/v1/balances/{address}" }; @@ -74,20 +78,26 @@ service Query { } // QueryBalanceParams defines the params for querying an account balance. -message QueryBalanceParams { +message QueryBalanceRequest { bytes address = 1 [ (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; string denom = 2; } +// QueryBalanceResponse is the response for the QueryBalance rpc method +message QueryBalanceResponse { + cosmos_sdk.v1.Coin balance = 1; +} + // QueryAllBalancesParams defines the params for querying all account balances -message QueryAllBalancesParams { +message QueryAllBalancesRequest { bytes address = 1 [ (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" ]; } +// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method message QueryAllBalancesResponse { repeated cosmos_sdk.v1.Coin balances = 1 [ (gogoproto.nullable) = false, diff --git a/x/crisis/module.go b/x/crisis/module.go index c3881c8e5f2a..ac72232f5925 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -108,7 +108,7 @@ func (AppModule) QuerierRoute() string { return "" } // NewQuerierHandler returns no sdk.Querier. func (AppModule) NewQuerierHandler() sdk.Querier { return nil } -func (am AppModule) RegisterQueryServer(grpc.Server) { +func (am AppModule) RegisterQueryService(grpc.Server) { } // InitGenesis performs genesis initialization for the crisis module. It returns diff --git a/x/distribution/module.go b/x/distribution/module.go index 644e89e20827..dfa07140a723 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -130,7 +130,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) { +func (am AppModule) RegisterQueryService(grpc.Server) { } // InitGenesis performs genesis initialization for the distribution module. It returns diff --git a/x/evidence/module.go b/x/evidence/module.go index 99c3b95158bd..15e225686559 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -136,7 +136,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // RegisterInvariants registers the evidence module's invariants. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} diff --git a/x/gov/module.go b/x/gov/module.go index 90f605bae6ac..da5ff10c5f42 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -148,7 +148,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // InitGenesis performs genesis initialization for the gov module. It returns // no validator updates. diff --git a/x/mint/module.go b/x/mint/module.go index ef434598223d..af56907bb3ce 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -115,7 +115,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // InitGenesis performs genesis initialization for the mint module. It returns // no validator updates. diff --git a/x/slashing/module.go b/x/slashing/module.go index 29965fabc7cd..fa56c60c6ded 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -126,7 +126,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(server grpc.Server) { +func (am AppModule) RegisterQueryService(server grpc.Server) { } // InitGenesis performs genesis initialization for the slashing module. It returns diff --git a/x/staking/module.go b/x/staking/module.go index 6d6456b3e382..a628ece1a813 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -153,7 +153,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // InitGenesis performs genesis initialization for the staking module. It returns // no validator updates. diff --git a/x/supply/module.go b/x/supply/module.go index df4751dd07fd..399d33b3365f 100644 --- a/x/supply/module.go +++ b/x/supply/module.go @@ -119,7 +119,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) {} +func (am AppModule) RegisterQueryService(grpc.Server) {} // InitGenesis performs genesis initialization for the supply module. It returns // no validator updates. diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 5f8ccc779594..41dd272a65bd 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -103,7 +103,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } -func (am AppModule) RegisterQueryServer(grpc.Server) { +func (am AppModule) RegisterQueryService(grpc.Server) { } // InitGenesis is ignored, no sense in serializing future upgrades From e3c127fa4378dc3b2bb1aa797092bc419616fb6c Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 15:34:10 -0400 Subject: [PATCH 14/41] Fix test errors and goimports --- x/bank/keeper/querier_test.go | 25 ++++++++++++------------- x/bank/module.go | 3 ++- x/gov/module.go | 3 ++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index 14c7581347f6..ad5065fa47a5 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -14,14 +14,14 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { _, _, addr := authtypes.KeyTestPubAddr() queryHelper := baseapp.NewQueryServerTestHelper(ctx) - types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) - queryClient := types.NewQueryClient(queryHelper) + types.RegisterQueryServiceServer(queryHelper, keeper.Querier{app.BankKeeper}) + queryClient := types.NewQueryServiceClient(queryHelper) req := types.NewQueryBalanceRequest(addr, fooDenom) - balance, err := queryClient.QueryBalance(gocontext.Background(), &req) + res, err := queryClient.QueryBalance(gocontext.Background(), req) suite.Require().NoError(err) - suite.Require().NotNil(balance) - suite.True(balance.IsZero()) + suite.Require().NotNil(res) + suite.True(res.Balance.IsZero()) origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) acc := app.AccountKeeper.NewAccountWithAddress(ctx, addr) @@ -29,10 +29,10 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - balance, err = queryClient.QueryBalance(gocontext.Background(), &req) + res, err = queryClient.QueryBalance(gocontext.Background(), req) suite.Require().NoError(err) - suite.Require().NotNil(balance) - suite.True(balance.IsEqual(newFooCoin(50))) + suite.Require().NotNil(res) + suite.True(res.Balance.IsEqual(newFooCoin(50))) } func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { @@ -40,18 +40,17 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { _, _, addr := authtypes.KeyTestPubAddr() queryHelper := baseapp.NewQueryServerTestHelper(ctx) - types.RegisterQueryServer(queryHelper, keeper.Querier{app.BankKeeper}) - queryClient := types.NewQueryClient(queryHelper) + types.RegisterQueryServiceServer(queryHelper, keeper.Querier{app.BankKeeper}) + queryClient := types.NewQueryServiceClient(queryHelper) //res, err := queryClient.QueryAllBalances(nil, nil) //suite.Require().NotNil(err) //suite.Require().Nil(res) req := types.NewQueryAllBalancesRequest(addr) - res, err := queryClient.QueryAllBalances(gocontext.Background(), &req) + res, err := queryClient.QueryAllBalances(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.True(res.Balances.IsZero()) origCoins := sdk.NewCoins(newFooCoin(50), newBarCoin(30)) @@ -60,7 +59,7 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - res, err = queryClient.QueryAllBalances(gocontext.Background(), &req) + res, err = queryClient.QueryAllBalances(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.True(res.Balances.IsEqual(origCoins)) diff --git a/x/bank/module.go b/x/bank/module.go index 13d97429344b..ae0a39babb7a 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -3,9 +3,10 @@ package bank import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/gov/module.go b/x/gov/module.go index da5ff10c5f42..074a82974e47 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -5,9 +5,10 @@ package gov import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" From 579d1846a2c2d78c93ce7a72f1e876e5c659456b Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 15:40:31 -0400 Subject: [PATCH 15/41] Update module tests --- types/module/module_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/module/module_test.go b/types/module/module_test.go index 27e56641835c..2d66b7010f49 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -153,8 +153,8 @@ func TestManager_RegisterRoutes(t *testing.T) { handler3 := sdk.Querier(nil) mockAppModule1.EXPECT().NewQuerierHandler().Times(1).Return(handler3) queryRouter.EXPECT().AddRoute(gomock.Eq("querierRoute1"), gomock.Eq(handler3)).Times(1) - mockAppModule1.EXPECT().RegisterQueryServer(queryRouter).Times(1) - mockAppModule2.EXPECT().RegisterQueryServer(queryRouter).Times(1) + mockAppModule1.EXPECT().RegisterQueryService(queryRouter).Times(1) + mockAppModule2.EXPECT().RegisterQueryService(queryRouter).Times(1) mm.RegisterRoutes(router, queryRouter) } From f234330ba969c310ae75e28d8c7e8576e98929b9 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 15:46:23 -0400 Subject: [PATCH 16/41] Fix goimports --- x/distribution/module.go | 3 ++- x/slashing/module.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x/distribution/module.go b/x/distribution/module.go index dfa07140a723..d107f2587007 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -3,9 +3,10 @@ package distribution import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/slashing/module.go b/x/slashing/module.go index fa56c60c6ded..2d9fa9b6f5ec 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -3,9 +3,10 @@ package slashing import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" From 93810b74455b8ea3069b792db78641a26429b4ab Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 15:52:03 -0400 Subject: [PATCH 17/41] Update x/bank/keeper/querier_test.go Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com> --- x/bank/keeper/querier_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index ad5065fa47a5..ae38798ff862 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -2,6 +2,7 @@ package keeper_test import ( gocontext "context" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" From e0b04fe344f4302740fe8185e764e22df0f4f333 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 15:57:17 -0400 Subject: [PATCH 18/41] Fix goimports --- x/staking/module.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/staking/module.go b/x/staking/module.go index a628ece1a813..466edd8121a1 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -3,9 +3,10 @@ package staking import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" flag "github.com/spf13/pflag" From 5b2442dcfb7f1565a273e7ac13bb832f52846eec Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 16:41:16 -0400 Subject: [PATCH 19/41] Revert baseapp change --- baseapp/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baseapp/router.go b/baseapp/router.go index 02303bbbb4f3..77d2567c6cb2 100644 --- a/baseapp/router.go +++ b/baseapp/router.go @@ -22,7 +22,7 @@ func NewRouter() *Router { // AddRoute adds a route path to the router with a given handler. The route must // be alphanumeric. func (rtr *Router) AddRoute(path string, h sdk.Handler) sdk.Router { - if !sdk.IsAlphaNumeric(path) { + if !isAlphaNumeric(path) { panic("route expressions can only contain alphanumeric characters") } if rtr.routes[path] != nil { From e8d04b9dc8091269ec91de4591685a096b0d9948 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 19:40:30 -0400 Subject: [PATCH 20/41] Add tests and docs --- types/context.go | 15 +++++++++++---- types/context_test.go | 12 ++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/types/context.go b/types/context.go index 9d2bffd68b74..64399251193c 100644 --- a/types/context.go +++ b/types/context.go @@ -226,10 +226,17 @@ func (c Context) CacheContext() (cc Context, writeCache func()) { return cc, cms.Write } -func UnwrapSDKContext(ctx context.Context) Context { - return ctx.Value(sdkContextKey).(Context) -} - +// WrapSDKContext attaches a Context to that Context's context.Context member +// and returns that context. It is useful for passing a Context through methods +// that take a generic context.Context parameter such as generated gRPC +// methods func WrapSDKContext(ctx Context) context.Context { return context.WithValue(ctx.ctx, sdkContextKey, ctx) } + +// UnwrapSDKContext retrieves a Context from a context.Context instance +// attached with WrapSDKContext. It panics if a Context was not properly +// attached +func UnwrapSDKContext(ctx context.Context) Context { + return ctx.Value(sdkContextKey).(Context) +} diff --git a/types/context_test.go b/types/context_test.go index 73e5bab9e39e..38bcd86e55cd 100644 --- a/types/context_test.go +++ b/types/context_test.go @@ -231,3 +231,15 @@ func TestContextHeaderClone(t *testing.T) { }) } } + +func TestUnwrapSDKContext(t *testing.T) { + sdkCtx := types.NewContext(nil, abci.Header{}, false, nil) + ctx := types.WrapSDKContext(sdkCtx) + sdkCtx2 := types.UnwrapSDKContext(ctx) + require.Equal(t, sdkCtx, sdkCtx2) + + ctx = context.Background() + require.Panics(t, func() { + types.UnwrapSDKContext(ctx) + }) +} From d8910d72e6396298ed8cf0bc11f679699ea11700 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 8 Apr 2020 19:44:21 -0400 Subject: [PATCH 21/41] Keep existing bank querier around (for now) --- x/bank/keeper/querier.go | 54 ++++++++++++++++++++++++++++++++++++++++ x/bank/module.go | 4 +-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index 8ae4c131bed7..8749a55c47f0 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -3,6 +3,10 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/codec" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + abci "github.com/tendermint/tendermint/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -22,3 +26,53 @@ func (q Querier) QueryAllBalances(ctx context.Context, req *types.QueryAllBalanc balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), req.Address) return &types.QueryAllBalancesResponse{Balances: balances}, nil } + +// NewQuerier returns a new sdk.Keeper instance. +func NewQuerier(k Keeper) sdk.Querier { + return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { + switch path[0] { + case types.QueryBalance: + return queryBalance(ctx, req, k) + + case types.QueryAllBalances: + return queryAllBalance(ctx, req, k) + + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) + } + } +} + +func queryBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { + var params types.QueryBalanceRequest + + if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + + balance := k.GetBalance(ctx, params.Address, params.Denom) + + bz, err := codec.MarshalJSONIndent(types.ModuleCdc, balance) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) + } + + return bz, nil +} + +func queryAllBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { + var params types.QueryAllBalancesRequest + + if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + + balances := k.GetAllBalances(ctx, params.Address) + + bz, err := codec.MarshalJSONIndent(types.ModuleCdc, balances) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) + } + + return bz, nil +} diff --git a/x/bank/module.go b/x/bank/module.go index ae0a39babb7a..73d320d9f709 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -107,11 +107,11 @@ func (AppModule) Route() string { return RouterKey } func (am AppModule) NewHandler() sdk.Handler { return NewHandler(am.keeper) } // QuerierRoute returns the bank module's querier route name. -func (AppModule) QuerierRoute() string { return "" } +func (AppModule) QuerierRoute() string { return QuerierRoute } // NewQuerierHandler returns the bank module sdk.Querier. func (am AppModule) NewQuerierHandler() sdk.Querier { - return nil + return keeper.NewQuerier(am.keeper) } // InitGenesis performs genesis initialization for the bank module. It returns From 99e36310bdfe88329fb32958a7bf15c90a949ce0 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 14:46:00 -0400 Subject: [PATCH 22/41] Run proto-gen, fix build errors --- codec/testdata/proto.pb.go | 24 +-- go.mod | 1 - go.sum | 12 ++ types/types.pb.go | 112 ++++------ x/auth/vesting/types/types.pb.go | 107 ++++------ x/bank/types/types.pb.go | 124 ++++------- x/capability/module.go | 4 + x/crisis/types/types.pb.go | 18 +- x/distribution/types/types.pb.go | 217 +++++++------------ x/gov/types/types.pb.go | 199 +++++++----------- x/ibc/20-transfer/module.go | 4 + x/ibc/module.go | 3 + x/mint/types/types.pb.go | 66 +++--- x/params/module.go | 4 + x/params/types/proposal/types.pb.go | 57 ++--- x/slashing/types/types.pb.go | 79 +++---- x/staking/types/types.pb.go | 314 ++++++++++------------------ x/supply/types/types.pb.go | 60 +++--- x/upgrade/types/types.pb.go | 70 +++---- 19 files changed, 535 insertions(+), 940 deletions(-) diff --git a/codec/testdata/proto.pb.go b/codec/testdata/proto.pb.go index c93154214891..d92daf3ec229 100644 --- a/codec/testdata/proto.pb.go +++ b/codec/testdata/proto.pb.go @@ -6,7 +6,6 @@ package testdata import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -14,7 +13,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -76,10 +74,6 @@ func (m *Dog) GetName() string { return "" } -func (*Dog) XXX_MessageName() string { - return "cosmos_sdk.codec.v1.Dog" -} - type Cat struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` @@ -132,21 +126,15 @@ func (m *Cat) GetLives() int32 { return 0 } -func (*Cat) XXX_MessageName() string { - return "cosmos_sdk.codec.v1.Cat" -} func init() { proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") - golang_proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") - golang_proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") } func init() { proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } -func init() { golang_proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } var fileDescriptor_ae1353846770e6e2 = []byte{ - // 204 bytes of a gzipped FileDescriptorProto + // 195 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x4f, 0x49, 0x4d, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xc2, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, @@ -154,12 +142,12 @@ var fileDescriptor_ae1353846770e6e2 = []byte{ 0xc5, 0x99, 0x55, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0x36, 0x48, 0x2c, 0x2f, 0x31, 0x37, 0x55, 0x82, 0x09, 0x22, 0x06, 0x62, 0x2b, 0x99, 0x72, 0x31, 0x3b, 0x27, 0x96, 0x08, 0x49, 0x70, 0xb1, 0xe7, 0xe6, 0xe7, 0x65, 0x66, 0xa7, 0x16, 0x41, 0x75, 0xc0, 0xb8, 0x42, 0x22, - 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x93, 0xef, 0x89, + 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x93, 0xeb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, - 0x81, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, - 0x43, 0x94, 0x76, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0x9d, - 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0x1f, 0xd5, 0x57, 0x49, 0x6c, 0x60, 0x0f, 0x19, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xed, 0x78, 0xf2, 0x5e, 0xee, 0x00, 0x00, 0x00, + 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, + 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xdc, 0x07, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x51, 0x7d, + 0x93, 0xc4, 0x06, 0xf6, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x64, 0x25, 0x07, 0xc7, 0xe6, + 0x00, 0x00, 0x00, } func (m *Dog) Marshal() (dAtA []byte, err error) { diff --git a/go.mod b/go.mod index 46cb5c9f2b6b..7cce3cf0771a 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,6 @@ require ( github.com/tendermint/tm-db v0.5.1 google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 google.golang.org/grpc v1.28.0 - google.golang.org/protobuf v1.20.1 // indirect gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index ec436c7c9eb7..3e67ea37457c 100644 --- a/go.sum +++ b/go.sum @@ -139,9 +139,11 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= @@ -360,6 +362,8 @@ github.com/regen-network/cosmos-proto v0.2.2 h1:qAuQxio6lmZ3ghpeSMrhqT+Xq/Fkuimz github.com/regen-network/cosmos-proto v0.2.2/go.mod h1:4jLYG3Qk6EtkOj3/FK7ziS5+LurpGPzJ41ungpzThcw= github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -496,6 +500,8 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -524,6 +530,8 @@ golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -562,6 +570,8 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -572,6 +582,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= @@ -579,6 +590,7 @@ google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLY google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.20.1/go.mod h1:KqelGeouBkcbcuB3HCk4/YH2tmNLk6YSWA5LIWeI/lY= google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/types/types.pb.go b/types/types.pb.go index 919597d89bbd..6b4d9813ab5f 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" types "github.com/tendermint/tendermint/abci/types" io "io" math "math" @@ -18,7 +17,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -76,10 +74,6 @@ func (m *Coin) GetDenom() string { return "" } -func (*Coin) XXX_MessageName() string { - return "cosmos_sdk.v1.Coin" -} - // DecCoin defines a token with a denomination and a decimal amount. // // NOTE: The amount field is an Dec which implements the custom method @@ -128,10 +122,6 @@ func (m *DecCoin) GetDenom() string { return "" } -func (*DecCoin) XXX_MessageName() string { - return "cosmos_sdk.v1.DecCoin" -} - // IntProto defines a Protobuf wrapper around an Int object. type IntProto struct { Int Int `protobuf:"bytes,1,opt,name=int,proto3,customtype=Int" json:"int"` @@ -169,10 +159,6 @@ func (m *IntProto) XXX_DiscardUnknown() { var xxx_messageInfo_IntProto proto.InternalMessageInfo -func (*IntProto) XXX_MessageName() string { - return "cosmos_sdk.v1.IntProto" -} - // DecProto defines a Protobuf wrapper around a Dec object. type DecProto struct { Dec Dec `protobuf:"bytes,1,opt,name=dec,proto3,customtype=Dec" json:"dec"` @@ -210,10 +196,6 @@ func (m *DecProto) XXX_DiscardUnknown() { var xxx_messageInfo_DecProto proto.InternalMessageInfo -func (*DecProto) XXX_MessageName() string { - return "cosmos_sdk.v1.DecProto" -} - // ValAddresses defines a repeated set of validator addresses. type ValAddresses struct { Addresses []ValAddress `protobuf:"bytes,1,rep,name=addresses,proto3,casttype=ValAddress" json:"addresses,omitempty"` @@ -258,10 +240,6 @@ func (m *ValAddresses) GetAddresses() []ValAddress { return nil } -func (*ValAddresses) XXX_MessageName() string { - return "cosmos_sdk.v1.ValAddresses" -} - // GasInfo defines tx execution gas context. type GasInfo struct { // GasWanted is the maximum units of work we allow this tx to perform. @@ -316,10 +294,6 @@ func (m *GasInfo) GetGasUsed() uint64 { return 0 } -func (*GasInfo) XXX_MessageName() string { - return "cosmos_sdk.v1.GasInfo" -} - // Result is the union of ResponseFormat and ResponseCheckTx. type Result struct { // Data is any data returned from message or handler execution. It MUST be length @@ -364,10 +338,6 @@ func (m *Result) XXX_DiscardUnknown() { var xxx_messageInfo_Result proto.InternalMessageInfo -func (*Result) XXX_MessageName() string { - return "cosmos_sdk.v1.Result" -} - // SimulationResponse defines the response generated when a transaction is // successfully simulated. type SimulationResponse struct { @@ -414,67 +384,55 @@ func (m *SimulationResponse) GetResult() *Result { return nil } -func (*SimulationResponse) XXX_MessageName() string { - return "cosmos_sdk.v1.SimulationResponse" -} func init() { proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") - golang_proto.RegisterType((*Coin)(nil), "cosmos_sdk.v1.Coin") proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") - golang_proto.RegisterType((*DecCoin)(nil), "cosmos_sdk.v1.DecCoin") proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") - golang_proto.RegisterType((*IntProto)(nil), "cosmos_sdk.v1.IntProto") proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") - golang_proto.RegisterType((*DecProto)(nil), "cosmos_sdk.v1.DecProto") proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") - golang_proto.RegisterType((*ValAddresses)(nil), "cosmos_sdk.v1.ValAddresses") proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") - golang_proto.RegisterType((*GasInfo)(nil), "cosmos_sdk.v1.GasInfo") proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") - golang_proto.RegisterType((*Result)(nil), "cosmos_sdk.v1.Result") proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") - golang_proto.RegisterType((*SimulationResponse)(nil), "cosmos_sdk.v1.SimulationResponse") } func init() { proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } -func init() { golang_proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } var fileDescriptor_2c0f90c600ad7e2e = []byte{ - // 543 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3f, 0x8f, 0xd3, 0x4e, - 0x10, 0xf5, 0xfe, 0xec, 0x5f, 0xfe, 0x6c, 0xc2, 0x9f, 0x5b, 0x38, 0x14, 0x9d, 0xc0, 0x8e, 0x8c, - 0x84, 0x82, 0xc4, 0xd9, 0x22, 0x47, 0x15, 0x2a, 0x4c, 0xd0, 0x29, 0x88, 0x02, 0x19, 0x01, 0x12, - 0x4d, 0xb4, 0xf1, 0xee, 0xf9, 0xac, 0x8b, 0x77, 0x23, 0xef, 0xe6, 0x50, 0xba, 0x94, 0x94, 0x7c, - 0x84, 0xfb, 0x28, 0x94, 0x29, 0x53, 0x9e, 0x10, 0xb2, 0x20, 0x69, 0xa8, 0xaf, 0xa4, 0x42, 0xbb, - 0x0e, 0x58, 0x97, 0xeb, 0x68, 0x92, 0xd9, 0x99, 0x37, 0x6f, 0x66, 0x9e, 0x1f, 0xdc, 0x91, 0xb3, - 0x09, 0x15, 0xbe, 0xfe, 0xf5, 0x26, 0x19, 0x97, 0x1c, 0x5d, 0x8b, 0xb8, 0x48, 0xb9, 0x18, 0x0a, - 0x72, 0xe2, 0x9d, 0x3e, 0xde, 0x7b, 0x20, 0x8f, 0x93, 0x8c, 0x0c, 0x27, 0x38, 0x93, 0x33, 0x5f, - 0x23, 0xfc, 0x98, 0xc7, 0xbc, 0x8c, 0x8a, 0xb6, 0xbd, 0x83, 0xab, 0x38, 0x49, 0x19, 0xa1, 0x59, - 0x9a, 0x30, 0xe9, 0xe3, 0x51, 0x94, 0xf8, 0x57, 0x66, 0xb9, 0x87, 0xd0, 0x7a, 0xce, 0x13, 0x86, - 0x6e, 0xc3, 0xff, 0x09, 0x65, 0x3c, 0x6d, 0x81, 0x36, 0xe8, 0xd4, 0xc3, 0xe2, 0x81, 0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0x9c, 0x6a, 0x03, 0x00, 0x00, + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0xb5, 0x7f, 0xf6, 0x2f, 0x7f, 0x36, 0xe1, 0x4f, 0x17, 0x8a, 0xa2, 0x0a, 0xec, 0xc8, 0x48, + 0x28, 0x48, 0xd4, 0x16, 0x29, 0xa7, 0x70, 0xc2, 0x04, 0x55, 0xe1, 0x84, 0x16, 0x01, 0x12, 0x97, + 0x68, 0xe3, 0xdd, 0xba, 0x56, 0xe3, 0xdd, 0xc8, 0xbb, 0x29, 0xca, 0x2d, 0x47, 0x8e, 0x7c, 0x84, + 0x7e, 0x9c, 0x1e, 0x73, 0xac, 0x10, 0xb2, 0x20, 0xb9, 0x70, 0xee, 0x91, 0x13, 0xda, 0xb5, 0xc1, + 0x6a, 0x7a, 0xe3, 0x92, 0xcc, 0xce, 0xbc, 0x79, 0x33, 0xf3, 0xfc, 0xc0, 0x8e, 0x5c, 0xcc, 0xa8, + 0x08, 0xf4, 0xaf, 0x3f, 0xcb, 0xb8, 0xe4, 0xf0, 0x46, 0xc4, 0x45, 0xca, 0xc5, 0x58, 0x90, 0x13, + 0xff, 0xf4, 0xe9, 0xde, 0x23, 0x79, 0x9c, 0x64, 0x64, 0x3c, 0xc3, 0x99, 0x5c, 0x04, 0x1a, 0x11, + 0xc4, 0x3c, 0xe6, 0x55, 0x54, 0xb4, 0xed, 0x1d, 0x5c, 0xc7, 0x49, 0xca, 0x08, 0xcd, 0xd2, 0x84, + 0xc9, 0x00, 0x4f, 0xa2, 0x24, 0xb8, 0x36, 0xcb, 0x3b, 0x04, 0xf6, 0x4b, 0x9e, 0x30, 0x78, 0x17, + 0xfc, 0x4f, 0x28, 0xe3, 0x69, 0xc7, 0xec, 0x9a, 0xbd, 0x26, 0x2a, 0x1e, 0xf0, 0x21, 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that interface{}) bool { diff --git a/x/auth/vesting/types/types.pb.go b/x/auth/vesting/types/types.pb.go index b643ccdda662..adfa4af2ee88 100644 --- a/x/auth/vesting/types/types.pb.go +++ b/x/auth/vesting/types/types.pb.go @@ -10,7 +10,6 @@ import ( types "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -18,7 +17,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -70,10 +68,6 @@ func (m *BaseVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_BaseVestingAccount proto.InternalMessageInfo -func (*BaseVestingAccount) XXX_MessageName() string { - return "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount" -} - // ContinuousVestingAccount implements the VestingAccount interface. It // continuously vests by unlocking coins linearly with respect to time. type ContinuousVestingAccount struct { @@ -113,10 +107,6 @@ func (m *ContinuousVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_ContinuousVestingAccount proto.InternalMessageInfo -func (*ContinuousVestingAccount) XXX_MessageName() string { - return "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount" -} - // DelayedVestingAccount implements the VestingAccount interface. It vests all // coins after a specific time, but non prior. In other words, it keeps them // locked until a specified time. @@ -156,10 +146,6 @@ func (m *DelayedVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_DelayedVestingAccount proto.InternalMessageInfo -func (*DelayedVestingAccount) XXX_MessageName() string { - return "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount" -} - // Period defines a length of time and amount of coins that will vest type Period struct { Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` @@ -212,10 +198,6 @@ func (m *Period) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (*Period) XXX_MessageName() string { - return "cosmos_sdk.x.auth.vesting.v1.Period" -} - // PeriodicVestingAccount implements the VestingAccount interface. It // periodically vests by unlocking coins during each specified period type PeriodicVestingAccount struct { @@ -256,67 +238,56 @@ func (m *PeriodicVestingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_PeriodicVestingAccount proto.InternalMessageInfo -func (*PeriodicVestingAccount) XXX_MessageName() string { - return "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount" -} func init() { proto.RegisterType((*BaseVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount") - golang_proto.RegisterType((*BaseVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount") proto.RegisterType((*ContinuousVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount") - golang_proto.RegisterType((*ContinuousVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount") proto.RegisterType((*DelayedVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount") - golang_proto.RegisterType((*DelayedVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount") proto.RegisterType((*Period)(nil), "cosmos_sdk.x.auth.vesting.v1.Period") - golang_proto.RegisterType((*Period)(nil), "cosmos_sdk.x.auth.vesting.v1.Period") proto.RegisterType((*PeriodicVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount") - golang_proto.RegisterType((*PeriodicVestingAccount)(nil), "cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount") } func init() { proto.RegisterFile("x/auth/vesting/types/types.proto", fileDescriptor_b7f744d63a45e116) } -func init() { - golang_proto.RegisterFile("x/auth/vesting/types/types.proto", fileDescriptor_b7f744d63a45e116) -} var fileDescriptor_b7f744d63a45e116 = []byte{ - // 602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0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, 0x4b, 0x12, 0xe2, 0xfa, 0xe6, 0xbb, 0x53, 0x43, - 0xf9, 0x78, 0x6a, 0x28, 0xe6, 0x37, 0x00, 0xb5, 0x03, 0x1a, 0x71, 0x12, 0x75, 0x69, 0x97, 0xa5, - 0x92, 0xd4, 0x82, 0xd7, 0x93, 0x24, 0x49, 0x95, 0xa9, 0x44, 0xed, 0xa1, 0x75, 0x91, 0x47, 0xab, - 0xc9, 0x94, 0x01, 0x53, 0x1b, 0xab, 0x99, 0xbd, 0x0f, 0x21, 0xe3, 0x5e, 0xcc, 0x85, 0x85, 0x8d, - 0xc4, 0x42, 0x71, 0x3a, 0x32, 0x0a, 0xc2, 0xc2, 0x72, 0xcd, 0x74, 0xae, 0x24, 0x83, 0x94, 0x8d, - 0x13, 0x00, 0x8b, 0x0f, 0x71, 0xdb, 0xeb, 0x2f, 0x7a, 0xf2, 0xd7, 0x3d, 0x9c, 0x51, 0x73, 0x0c, - 0x60, 0xee, 0x39, 0x8e, 0x09, 0xf5, 0xd5, 0x12, 0xcc, 0xb5, 0x71, 0x14, 0xf0, 0x56, 0x52, 0x30, - 0xe3, 0xc8, 0x91, 0xfa, 0x06, 0xe6, 0xbc, 0x30, 0x11, 0xb2, 0xe6, 0x36, 0xed, 0xcd, 0x62, 0x73, - 0xa9, 0x68, 0x48, 0xd2, 0x7a, 0x36, 0xd1, 0xf1, 0x79, 0x03, 0x96, 0x84, 0x0e, 0xd2, 0xfc, 0xb7, - 0x8e, 0x56, 0x0d, 0x61, 0x7e, 0x2e, 0xad, 0x93, 0x38, 0x60, 0xf2, 0xaa, 0xdf, 0x5e, 0x2f, 0x4d, - 0xd8, 0xb5, 0x75, 0x79, 0xe1, 0x4a, 0xa2, 0x48, 0x8a, 0xca, 0x74, 0xb6, 0xe5, 0x8c, 0xd8, 0xce, - 0x96, 0x67, 0x67, 0xbf, 0x18, 0x8c, 0x75, 0x30, 0x1c, 0xeb, 0xe0, 0xe7, 0x58, 0x07, 0x1f, 0x26, - 0xba, 0xf2, 0x65, 0xa2, 0x83, 0xc1, 0x44, 0x07, 0xc3, 0x89, 0xae, 0x7c, 0x9f, 0xe8, 0xca, 0xeb, - 0xda, 0xda, 0xd3, 0x38, 0xef, 0x43, 0xd1, 0xc8, 0x25, 0x2f, 0xec, 0x7b, 0xbf, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x75, 0x57, 0x42, 0xcc, 0x47, 0x06, 0x00, 0x00, + // 593 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x4f, 0x8f, 0xd2, 0x40, + 0x1c, 0xed, 0x2c, 0x88, 0xeb, 0xa0, 0xcb, 0xd2, 0x15, 0x6c, 0x88, 0x69, 0xb1, 0x31, 0x86, 0x8b, + 0xd3, 0x65, 0xf5, 0xc4, 0xcd, 0xae, 0x31, 0xd1, 0xf5, 0x60, 0x1a, 0xe3, 0xc1, 0xc4, 0x34, 0x85, + 0x8e, 0x65, 0xb2, 0xb4, 0x43, 0x3a, 0x03, 0x59, 0x3e, 0xc0, 0x26, 0x26, 0x9b, 0x18, 0x8f, 0x1e, + 0xf7, 0xec, 0xcd, 0x8f, 0x60, 0xe2, 0x61, 0x8f, 0x1c, 0x3d, 0xa1, 0x81, 0x6f, 0xc0, 0x27, 0x30, + 0x74, 0x06, 0x58, 0xcb, 0x2e, 0xc9, 0x7a, 0x30, 0xf1, 0x02, 0x9d, 0x3f, 0xef, 0xfd, 0xde, 0xfb, + 0xcd, 0x9b, 0x16, 0x56, 0x8f, 0x2c, 0xaf, 0xc7, 0xdb, 0x56, 0x1f, 0x33, 0x4e, 0xa2, 0xc0, 0xe2, + 0x83, 0x2e, 0x66, 0xe2, 0x17, 0x75, 0x63, 0xca, 0xa9, 0x7a, 0xb7, 0x45, 0x59, 0x48, 0x99, 0xcb, + 0xfc, 0x43, 0x74, 0x84, 0x66, 0x9b, 0x91, 0xdc, 0x8c, 0xfa, 0xf5, 0xca, 0x03, 0xde, 0x26, 0xb1, + 0xef, 0x76, 0xbd, 0x98, 0x0f, 0xac, 0x04, 0x60, 0x05, 0x34, 0xa0, 0xcb, 0x27, 0xc1, 0x52, 0x29, + 0xae, 0x10, 0x57, 0x34, 0x59, 0x7a, 0x65, 0xc5, 0xfc, 0x96, 0x85, 0xaa, 0xed, 0x31, 0xfc, 0x46, + 0xd4, 0x79, 0xd2, 0x6a, 0xd1, 0x5e, 0xc4, 0xd5, 0x17, 0xf0, 0x66, 0xd3, 0x63, 0xd8, 0xf5, 0xc4, + 0x58, 0x03, 0x55, 0x50, 0xcb, 0xef, 0xdd, 0x43, 0x17, 0x08, 0xac, 0xa3, 0x19, 0x5e, 0x02, 0xed, + 0xec, 0x70, 0x64, 0x00, 0x27, 0xdf, 0x5c, 0x4e, 0xa9, 0x27, 0x00, 0x6e, 0xd3, 0x98, 0x04, 0x24, + 0xf2, 0x3a, 0xae, 0xf4, 0xa3, 0x6d, 0x54, 0x33, 0xb5, 0xfc, 0xde, 0xce, 0x79, 0xc2, 0x7e, 0x1d, + 0xed, 0x53, 0x12, 0xd9, 0x07, 0x67, 0x23, 0x43, 0x99, 0x8e, 0x8c, 0x3b, 0x03, 0x2f, 0xec, 0x34, + 0xcc, 0x34, 0xd4, 0xfc, 0xf2, 0xd3, 0xa8, 0x05, 0x84, 0xb7, 0x7b, 0x4d, 0xd4, 0xa2, 0xa1, 0x25, + 0x18, 0xe4, 0xdf, 0x43, 0xe6, 0x1f, 0x4a, 0x7f, 0x33, 0x2e, 0xe6, 0x14, 0xe6, 0x70, 0x69, 0x50, + 0x3d, 0x06, 0x70, 0xcb, 0xc7, 0x1d, 0x1c, 0x78, 0x1c, 0xfb, 0xee, 0xfb, 0x18, 0x63, 0x2d, 0x73, + 0xb9, 0x96, 0xe7, 0x52, 0x4b, 0x49, 0x68, 0xf9, 0x13, 0x78, 0x35, 0x25, 0xb7, 0x16, 0xe0, 0x67, + 0x31, 0xc6, 0xea, 0x47, 0x00, 0x8b, 0x4b, 0xba, 0x79, 0x5b, 0xb2, 0x97, 0x4b, 0x79, 0x29, 0xa5, + 0x68, 0x69, 0x29, 0x7f, 0xd5, 0x97, 0xed, 0x05, 0x7e, 0xde, 0x18, 0x04, 0x37, 0x71, 0xe4, 0xbb, + 0x9c, 0x84, 0x58, 0xbb, 0x56, 0x05, 0xb5, 0x8c, 0xbd, 0x33, 0x1d, 0x19, 0x05, 0x51, 0x6d, 0xbe, + 0x62, 0x3a, 0xd7, 0x71, 0xe4, 0xbf, 0x26, 0x21, 0x6e, 0x6c, 0x7e, 0x38, 0x35, 0x94, 0xcf, 0xa7, + 0x86, 0x62, 0x7e, 0x07, 0x50, 0xdb, 0xa7, 0x11, 0x27, 0x51, 0x8f, 0xf6, 0x58, 0x2a, 0x49, 0x6d, + 0x78, 0x3b, 0x49, 0x92, 0x54, 0x99, 0x4a, 0xd4, 0x2e, 0x5a, 0x17, 0x79, 0xb4, 0x9a, 0x4c, 0x19, + 0x30, 0xb5, 0xb9, 0x9a, 0xd9, 0xc7, 0x10, 0x32, 0xee, 0xc5, 0x5c, 0x58, 0xd8, 0x48, 0x2c, 0x94, + 0xa6, 0x23, 0xa3, 0x28, 0x2c, 0x2c, 0xd7, 0x4c, 0xe7, 0x46, 0x32, 0x48, 0xd9, 0x38, 0x01, 0xb0, + 0xf4, 0x14, 0x77, 0xbc, 0xc1, 0xa2, 0x27, 0xff, 0xdc, 0xc3, 0x39, 0x35, 0xc7, 0x00, 0xe6, 0x5e, + 0xe1, 0x98, 0x50, 0x5f, 0x2d, 0xc3, 0x5c, 0x07, 0x47, 0x01, 0x6f, 0x27, 0x05, 0x33, 0x8e, 0x1c, + 0xa9, 0xef, 0x60, 0xce, 0x0b, 0x13, 0x21, 0x6b, 0x6e, 0xd3, 0xee, 0x2c, 0x36, 0x57, 0x8a, 0x86, + 0x24, 0x6d, 0x64, 0x13, 0x1d, 0x5f, 0x37, 0x60, 0x59, 0xe8, 0x20, 0xad, 0xff, 0xeb, 0x68, 0xd5, + 0x10, 0x16, 0xe6, 0xd2, 0xba, 0x89, 0x03, 0x26, 0xaf, 0xfa, 0xfd, 0xf5, 0xd2, 0x84, 0x5d, 0x5b, + 0x97, 0x17, 0xae, 0x2c, 0x8a, 0xa4, 0xa8, 0x4c, 0x67, 0x4b, 0xce, 0x88, 0xed, 0x6c, 0x79, 0x76, + 0xf6, 0xc1, 0xd9, 0x58, 0x07, 0xc3, 0xb1, 0x0e, 0x7e, 0x8d, 0x75, 0xf0, 0x69, 0xa2, 0x2b, 0xc3, + 0x89, 0xae, 0xfc, 0x98, 0xe8, 0xca, 0xdb, 0xfa, 0xda, 0x53, 0xb8, 0xe8, 0x03, 0xd1, 0xcc, 0x25, + 0x2f, 0xea, 0x47, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x89, 0x54, 0xae, 0x4f, 0x3f, 0x06, 0x00, + 0x00, } func (m *BaseVestingAccount) Marshal() (dAtA []byte, err error) { diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index e124929580ed..bc76cc78880a 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -12,7 +12,6 @@ import ( _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -24,7 +23,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -95,10 +93,6 @@ func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (*MsgSend) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.MsgSend" -} - // Input models transaction input type Input struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -152,10 +146,6 @@ func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (*Input) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.Input" -} - // Output models transaction outputs type Output struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -209,10 +199,6 @@ func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (*Output) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.Output" -} - // MsgMultiSend - high level transaction of the coin module type MsgMultiSend struct { Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` @@ -266,10 +252,6 @@ func (m *MsgMultiSend) GetOutputs() []Output { return nil } -func (*MsgMultiSend) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.MsgMultiSend" -} - // QueryBalanceParams defines the params for querying an account balance. type QueryBalanceRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -323,10 +305,6 @@ func (m *QueryBalanceRequest) GetDenom() string { return "" } -func (*QueryBalanceRequest) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryBalanceRequest" -} - // QueryBalanceResponse is the response for the QueryBalance rpc method type QueryBalanceResponse struct { Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` @@ -372,10 +350,6 @@ func (m *QueryBalanceResponse) GetBalance() *types.Coin { return nil } -func (*QueryBalanceResponse) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryBalanceResponse" -} - // QueryAllBalancesParams defines the params for querying all account balances type QueryAllBalancesRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` @@ -421,10 +395,6 @@ func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_type return nil } -func (*QueryAllBalancesRequest) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest" -} - // QueryAllBalancesResponse is the response to the QueryAllBalances rpc method type QueryAllBalancesResponse struct { Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` @@ -470,73 +440,61 @@ func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_ty return nil } -func (*QueryAllBalancesResponse) XXX_MessageName() string { - return "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse" -} func init() { proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") - golang_proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") - golang_proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") - golang_proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") - golang_proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") - golang_proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") - golang_proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") - golang_proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") - golang_proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") } func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } -func init() { golang_proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 637 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xcf, 0x6b, 0x13, 0x4f, - 0x18, 0xc6, 0x33, 0x69, 0x9b, 0x7c, 0x3b, 0xcd, 0xe1, 0xdb, 0x69, 0xc1, 0x10, 0x65, 0x53, 0xf6, - 0x20, 0x69, 0x21, 0x33, 0x4d, 0x3d, 0x88, 0xc5, 0x4b, 0x23, 0x8a, 0x52, 0x8a, 0xb8, 0xbd, 0x29, - 0x52, 0x36, 0xbb, 0xd3, 0xed, 0xd2, 0xdd, 0x9d, 0x75, 0x67, 0x36, 0x34, 0x94, 0x5e, 0xbc, 0x0b, - 0x82, 0x77, 0x11, 0xbc, 0xf9, 0x0f, 0xe8, 0x51, 0x3c, 0xf5, 0x58, 0x10, 0xc1, 0x53, 0x94, 0xc6, - 0x83, 0xe7, 0x1e, 0x3d, 0xc9, 0xce, 0xce, 0x36, 0xad, 0x5d, 0x4a, 0x95, 0x78, 0xf0, 0x92, 0xec, - 0x8f, 0xf7, 0x79, 0x9f, 0xcf, 0xbc, 0xcf, 0x0e, 0x03, 0xab, 0x3b, 0xa4, 0x63, 0x06, 0xdb, 0x44, - 0xf4, 0x42, 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 0xef, 0xc1, 0xea, - 0x59, 0x1f, 0x85, 0x6c, 0xc2, 0xff, 0x14, 0x4e, 0x96, 0xe2, 0x88, 0x3e, 0x9d, 0xe3, 0xb6, 0x4b, - 0x9f, 0x8a, 0xb0, 0x22, 0xfd, 0xd7, 0x69, 0xd4, 0x75, 0x2d, 0x8a, 0x5e, 0x02, 0xf5, 0x40, 0xd1, - 0xa0, 0xf9, 0xfc, 0xf0, 0x73, 0xd2, 0xad, 0x2d, 0x5c, 0xa4, 0x34, 0x5d, 0x9b, 0x7e, 0xfd, 0xe9, - 0xc7, 0x6f, 0x2f, 0x8a, 0x2d, 0x44, 0xc8, 0x50, 0x43, 0xd4, 0xc9, 0xd0, 0x6d, 0x11, 0x05, 0x48, - 0x76, 0xd5, 0x9c, 0xf6, 0xc8, 0xae, 0x8c, 0x77, 0x0f, 0xbd, 0x06, 0xf0, 0xff, 0x5f, 0x27, 0x86, - 0x9a, 0xe7, 0x38, 0x9f, 0x4d, 0xb0, 0x86, 0x2f, 0x5a, 0xae, 0x60, 0x17, 0x25, 0xec, 0x02, 0x6a, - 0x9c, 0x0b, 0xcb, 0x87, 0xb4, 0xed, 0xd5, 0xfd, 0x43, 0x0d, 0x1c, 0x1c, 0x6a, 0xe0, 0xeb, 0xa1, - 0x06, 0x9e, 0x0f, 0xb4, 0xc2, 0xfb, 0x81, 0x06, 0xf6, 0x07, 0x1a, 0x38, 0x18, 0x68, 0x85, 0xcf, - 0x03, 0xad, 0xf0, 0x70, 0xfe, 0xdc, 0xb4, 0x4e, 0x9e, 0x91, 0x9d, 0x92, 0x3c, 0x9d, 0xae, 0xfd, - 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x6c, 0x27, 0x85, 0x3a, 0x07, 0x00, 0x00, + // 628 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0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xd4, 0x72, 0x09, 0xbb, 0x2c, 0x60, 0x97, 0x60, 0x7d, 0x28, 0x2c, + 0xeb, 0xd3, 0xb6, 0xd6, 0x0f, 0x8f, 0x55, 0xe5, 0xe8, 0x58, 0x55, 0xbe, 0x1d, 0xab, 0xca, 0xcb, + 0x13, 0xb5, 0x70, 0x74, 0xa2, 0x16, 0xbe, 0x9c, 0xa8, 0x85, 0xc7, 0x8b, 0x43, 0x53, 0x3a, 0x7f, + 0x36, 0xb6, 0x4b, 0xe2, 0x54, 0xba, 0xf1, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x32, 0xa0, 0xe8, 0x78, + 0x32, 0x07, 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { diff --git a/x/capability/module.go b/x/capability/module.go index 1ee89573c4b4..1bf11c86e2b7 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -3,6 +3,8 @@ package capability import ( "encoding/json" + "github.com/gogo/protobuf/grpc" + "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -93,6 +95,8 @@ func (am AppModule) NewHandler() sdk.Handler { return nil } // NewQuerierHandler returns the capability module's Querier. func (am AppModule) NewQuerierHandler() sdk.Querier { return nil } +func (am AppModule) RegisterQueryService(grpc.Server) {} + // RegisterInvariants registers the capability module's invariants. func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} diff --git a/x/crisis/types/types.pb.go b/x/crisis/types/types.pb.go index 8517080048ae..c98ec52dfde0 100644 --- a/x/crisis/types/types.pb.go +++ b/x/crisis/types/types.pb.go @@ -9,7 +9,6 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -17,7 +16,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -88,19 +86,14 @@ func (m *MsgVerifyInvariant) GetInvariantRoute() string { return "" } -func (*MsgVerifyInvariant) XXX_MessageName() string { - return "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant" -} func init() { proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant") - golang_proto.RegisterType((*MsgVerifyInvariant)(nil), "cosmos_sdk.x.crisis.v1.MsgVerifyInvariant") } func init() { proto.RegisterFile("x/crisis/types/types.proto", fileDescriptor_d15f5abb7502dad7) } -func init() { golang_proto.RegisterFile("x/crisis/types/types.proto", fileDescriptor_d15f5abb7502dad7) } var fileDescriptor_d15f5abb7502dad7 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto + // 301 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xaa, 0xd0, 0x4f, 0x2e, 0xca, 0x2c, 0xce, 0x2c, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x85, 0x92, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x62, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, @@ -116,11 +109,10 @@ var fileDescriptor_d15f5abb7502dad7 = []byte{ 0x63, 0xa5, 0x84, 0x55, 0x99, 0x52, 0x90, 0x30, 0x5c, 0xdc, 0x17, 0x2c, 0xec, 0x97, 0x98, 0x9b, 0x2a, 0xe4, 0xcc, 0xc5, 0x8f, 0x50, 0x5e, 0x94, 0x5f, 0x5a, 0x92, 0x2a, 0xc1, 0x0c, 0x36, 0x4f, 0xea, 0xd3, 0x3d, 0x79, 0x31, 0x74, 0xf3, 0xc0, 0x0a, 0x94, 0x82, 0xf8, 0xe0, 0x22, 0x41, 0x20, - 0x01, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0x7c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, - 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x0e, 0x3c, 0x96, 0x63, 0x3c, 0xf1, - 0x58, 0x8e, 0xf1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xb4, 0xf1, 0xfa, 0x1c, - 0x35, 0x76, 0x92, 0xd8, 0xc0, 0x01, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x67, 0x54, 0x21, - 0x27, 0xb6, 0x01, 0x00, 0x00, + 0x01, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0x5c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, + 0x58, 0x8e, 0x21, 0x4a, 0x1b, 0xaf, 0x8f, 0x51, 0x63, 0x25, 0x89, 0x0d, 0x1c, 0xa0, 0xc6, 0x80, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x65, 0xef, 0x2c, 0xae, 0x01, 0x00, 0x00, } func (this *MsgVerifyInvariant) Equal(that interface{}) bool { diff --git a/x/distribution/types/types.pb.go b/x/distribution/types/types.pb.go index e0f80b7484b0..e8e131f3a572 100644 --- a/x/distribution/types/types.pb.go +++ b/x/distribution/types/types.pb.go @@ -10,7 +10,6 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -18,7 +17,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -81,10 +79,6 @@ func (m *MsgSetWithdrawAddress) GetWithdrawAddress() github_com_cosmos_cosmos_sd return nil } -func (*MsgSetWithdrawAddress) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress" -} - // msg struct for delegation withdraw from a single validator type MsgWithdrawDelegatorReward struct { DelegatorAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"delegator_address,omitempty" yaml:"delegator_address"` @@ -138,10 +132,6 @@ func (m *MsgWithdrawDelegatorReward) GetValidatorAddress() github_com_cosmos_cos return nil } -func (*MsgWithdrawDelegatorReward) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward" -} - // msg struct for validator withdraw type MsgWithdrawValidatorCommission struct { ValidatorAddress github_com_cosmos_cosmos_sdk_types.ValAddress `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ValAddress" json:"validator_address,omitempty" yaml:"validator_address"` @@ -187,10 +177,6 @@ func (m *MsgWithdrawValidatorCommission) GetValidatorAddress() github_com_cosmos return nil } -func (*MsgWithdrawValidatorCommission) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission" -} - // MsgFundCommunityPool defines a Msg type that allows an account to directly // fund the community pool. type MsgFundCommunityPool struct { @@ -245,10 +231,6 @@ func (m *MsgFundCommunityPool) GetDepositor() github_com_cosmos_cosmos_sdk_types return nil } -func (*MsgFundCommunityPool) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool" -} - // Params defines the set of distribution parameters. type Params struct { CommunityTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax" yaml:"community_tax"` @@ -296,10 +278,6 @@ func (m *Params) GetWithdrawAddrEnabled() bool { return false } -func (*Params) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.Params" -} - // historical rewards for a validator // height is implicit within the store key // cumulative reward ratio is the sum from the zeroeth period @@ -364,10 +342,6 @@ func (m *ValidatorHistoricalRewards) GetReferenceCount() uint32 { return 0 } -func (*ValidatorHistoricalRewards) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards" -} - // current rewards and current period for a validator // kept as a running counter and incremented each block // as long as the validator's tokens remain constant @@ -423,10 +397,6 @@ func (m *ValidatorCurrentRewards) GetPeriod() uint64 { return 0 } -func (*ValidatorCurrentRewards) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards" -} - // accumulated commission for a validator // kept as a running counter, can be withdrawn at any time type ValidatorAccumulatedCommission struct { @@ -473,10 +443,6 @@ func (m *ValidatorAccumulatedCommission) GetCommission() github_com_cosmos_cosmo return nil } -func (*ValidatorAccumulatedCommission) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission" -} - // outstanding (un-withdrawn) rewards for a validator // inexpensive to track, allows simple sanity checks type ValidatorOutstandingRewards struct { @@ -523,10 +489,6 @@ func (m *ValidatorOutstandingRewards) GetRewards() github_com_cosmos_cosmos_sdk_ return nil } -func (*ValidatorOutstandingRewards) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards" -} - // validator slash event // height is implicit within the store key // needed to calculate appropriate amounts of staking token @@ -576,10 +538,6 @@ func (m *ValidatorSlashEvent) GetValidatorPeriod() uint64 { return 0 } -func (*ValidatorSlashEvent) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent" -} - // ValidatorSlashEvents is a collection of ValidatorSlashEvent type ValidatorSlashEvents struct { ValidatorSlashEvents []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events" yaml:"validator_slash_events"` @@ -624,10 +582,6 @@ func (m *ValidatorSlashEvents) GetValidatorSlashEvents() []ValidatorSlashEvent { return nil } -func (*ValidatorSlashEvents) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents" -} - // global fee pool for distribution type FeePool struct { CommunityPool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"community_pool" yaml:"community_pool"` @@ -673,10 +627,6 @@ func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins return nil } -func (*FeePool) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.FeePool" -} - // CommunityPoolSpendProposal spends from the community pool type CommunityPoolSpendProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -717,10 +667,6 @@ func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown() { var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo -func (*CommunityPoolSpendProposal) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal" -} - // starting info for a delegator reward period // tracks the previous validator period, the delegation's amount // of staking token, and the creation height (to check later on @@ -781,118 +727,97 @@ func (m *DelegatorStartingInfo) GetHeight() uint64 { return 0 } -func (*DelegatorStartingInfo) XXX_MessageName() string { - return "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo" -} func init() { proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress") - golang_proto.RegisterType((*MsgSetWithdrawAddress)(nil), "cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress") proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward") - golang_proto.RegisterType((*MsgWithdrawDelegatorReward)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward") proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission") - golang_proto.RegisterType((*MsgWithdrawValidatorCommission)(nil), "cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission") proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool") - golang_proto.RegisterType((*MsgFundCommunityPool)(nil), "cosmos_sdk.x.distribution.v1.MsgFundCommunityPool") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.distribution.v1.Params") - golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.distribution.v1.Params") proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards") - golang_proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards") proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards") - golang_proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards") proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission") - golang_proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission") proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards") - golang_proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards") proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent") - golang_proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvent") proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents") - golang_proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos_sdk.x.distribution.v1.ValidatorSlashEvents") proto.RegisterType((*FeePool)(nil), "cosmos_sdk.x.distribution.v1.FeePool") - golang_proto.RegisterType((*FeePool)(nil), "cosmos_sdk.x.distribution.v1.FeePool") proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal") - golang_proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal") proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo") - golang_proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos_sdk.x.distribution.v1.DelegatorStartingInfo") } func init() { proto.RegisterFile("x/distribution/types/types.proto", fileDescriptor_9fddf2a8e4a90b09) } -func init() { - golang_proto.RegisterFile("x/distribution/types/types.proto", fileDescriptor_9fddf2a8e4a90b09) -} var fileDescriptor_9fddf2a8e4a90b09 = []byte{ - // 1126 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf6, 0x38, 0x6e, 0x9a, 0x4c, 0xd3, 0xa4, 0xd9, 0xd8, 0x49, 0xe4, 0xf4, 0xb7, 0x6b, 0x8d, - 0xf4, 0xab, 0x22, 0xa1, 0x38, 0x84, 0xde, 0x72, 0x40, 0x8a, 0xf3, 0x21, 0x40, 0x0d, 0x8d, 0x36, - 0xa1, 0x95, 0x90, 0xd0, 0x6a, 0xbc, 0x3b, 0xb1, 0x47, 0x59, 0xef, 0xac, 0x66, 0xc6, 0x76, 0xd2, - 0x0b, 0x12, 0x27, 0x10, 0x50, 0x71, 0x40, 0xd0, 0x03, 0x87, 0x5e, 0x90, 0xa0, 0x12,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x0f, - 0x2b, 0xa5, 0xcf, 0x49, 0x87, 0xb2, 0xa0, 0xfd, 0x64, 0xf3, 0x20, 0x53, 0x29, 0xfb, 0x26, 0x20, - 0x73, 0x32, 0x8e, 0xa8, 0x2c, 0xd8, 0x83, 0xd7, 0x84, 0xc4, 0x07, 0x44, 0xa5, 0xc0, 0xdb, 0x43, - 0x77, 0xc1, 0x89, 0x88, 0x28, 0x04, 0x41, 0x66, 0x04, 0xa6, 0x6d, 0xc2, 0xd1, 0x26, 0xa1, 0x8d, - 0x66, 0xe4, 0x75, 0xa1, 0xb6, 0xf4, 0x67, 0xcf, 0x98, 0xb2, 0x39, 0x09, 0x2a, 0xbc, 0x67, 0x45, - 0x43, 0xa9, 0xc8, 0xbe, 0x01, 0x64, 0xaa, 0xc5, 0xb5, 0x87, 0x3f, 0x9c, 0xe8, 0xe0, 0xf8, 0x44, - 0x07, 0xcf, 0x4f, 0x74, 0xf0, 0xc7, 0x89, 0x0e, 0xbe, 0x3a, 0xd5, 0x73, 0x3f, 0x9f, 0xea, 0xe0, - 0xf8, 0x54, 0x07, 0xcf, 0x4f, 0xf5, 0xdc, 0x6f, 0xa7, 0x7a, 0xee, 0xc3, 0x95, 0x97, 0x6a, 0x1d, - 0xf4, 0xe1, 0x53, 0x1f, 0x0d, 0x3f, 0x4d, 0xee, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xbd, - 0xfb, 0xb0, 0x17, 0x0d, 0x00, 0x00, + // 1116 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x38, 0x6e, 0x9a, 0x4c, 0xd3, 0xa4, 0xd9, 0xd8, 0x49, 0xe4, 0x14, 0xaf, 0x35, 0x12, + 0x55, 0x24, 0x14, 0x87, 0xd0, 0x5b, 0x0e, 0x48, 0x71, 0x7e, 0x08, 0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e, 0x1a, 0x63, 0xa4, 0xfa, + 0x7e, 0xee, 0x15, 0xf4, 0xfd, 0xd5, 0xb1, 0x2f, 0x1e, 0x9b, 0x99, 0xe8, 0xa8, 0xfe, 0x01, 0xb0, + 0x10, 0xbf, 0x24, 0xee, 0x49, 0xcc, 0x25, 0xf5, 0xeb, 0xef, 0xfb, 0x07, 0x51, 0xa5, 0x0c, 0x38, + 0x69, 0x53, 0x16, 0xb6, 0x9f, 0x74, 0x1e, 0xa4, 0x2a, 0x65, 0xdf, 0x04, 0x64, 0x4d, 0xf6, 0x22, + 0x3a, 0x0b, 0xf6, 0xe1, 0x35, 0x21, 0xf1, 0x21, 0xd1, 0x29, 0xf0, 0xee, 0xd0, 0x5d, 0x70, 0x42, + 0x11, 0x45, 0x20, 0xc8, 0x52, 0x60, 0xc6, 0x26, 0x1c, 0x6d, 0x10, 0x5a, 0x6f, 0x28, 0xaf, 0x73, + 0xd5, 0xa5, 0xbf, 0xbb, 0xe6, 0x94, 0xc3, 0x49, 0x58, 0xe1, 0x7d, 0x5b, 0x0d, 0x25, 0x22, 0xfb, + 0x06, 0x90, 0xa5, 0x17, 0x57, 0x77, 0x7e, 0x3e, 0x29, 0x81, 0xa7, 0x27, 0x25, 0xf0, 0xec, 0xa4, + 0x04, 0xfe, 0x3a, 0x29, 0x81, 0x6f, 0x4f, 0x4b, 0x99, 0x67, 0xa7, 0xa5, 0xcc, 0x1f, 0xa7, 0xa5, + 0xcc, 0x27, 0x2b, 0x2f, 0xd4, 0x38, 0xe8, 0x83, 0xa7, 0x36, 0x1a, 0x7d, 0x92, 0xdc, 0xfd, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0x34, 0x5a, 0x18, 0x60, 0x0f, 0x0d, 0x00, 0x00, } func (this *MsgSetWithdrawAddress) Equal(that interface{}) bool { diff --git a/x/gov/types/types.pb.go b/x/gov/types/types.pb.go index f014995645ae..038f3297d785 100644 --- a/x/gov/types/types.pb.go +++ b/x/gov/types/types.pb.go @@ -12,7 +12,6 @@ import ( github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -22,7 +21,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -153,10 +151,6 @@ func (m *MsgSubmitProposalBase) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitProposalBase proto.InternalMessageInfo -func (*MsgSubmitProposalBase) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase" -} - // MsgVote defines a message to cast a vote type MsgVote struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` @@ -196,10 +190,6 @@ func (m *MsgVote) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVote proto.InternalMessageInfo -func (*MsgVote) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.MsgVote" -} - // MsgDeposit defines a message to submit a deposit to an existing proposal type MsgDeposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` @@ -239,10 +229,6 @@ func (m *MsgDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo -func (*MsgDeposit) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.MsgDeposit" -} - // TextProposal defines a standard text proposal whose changes need to be // manually updated in case of approval type TextProposal struct { @@ -282,10 +268,6 @@ func (m *TextProposal) XXX_DiscardUnknown() { var xxx_messageInfo_TextProposal proto.InternalMessageInfo -func (*TextProposal) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.TextProposal" -} - // Deposit defines an amount deposited by an account address to an active proposal type Deposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` @@ -325,10 +307,6 @@ func (m *Deposit) XXX_DiscardUnknown() { var xxx_messageInfo_Deposit proto.InternalMessageInfo -func (*Deposit) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.Deposit" -} - // ProposalBase defines the core field members of a governance proposal. It includes // all static fields (i.e fields excluding the dynamic Content). A full proposal // extends the ProposalBase with Content. @@ -376,10 +354,6 @@ func (m *ProposalBase) XXX_DiscardUnknown() { var xxx_messageInfo_ProposalBase proto.InternalMessageInfo -func (*ProposalBase) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.ProposalBase" -} - // TallyResult defines a standard tally for a proposal type TallyResult struct { Yes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"` @@ -420,10 +394,6 @@ func (m *TallyResult) XXX_DiscardUnknown() { var xxx_messageInfo_TallyResult proto.InternalMessageInfo -func (*TallyResult) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.TallyResult" -} - // Vote defines a vote on a governance proposal. A vote corresponds to a proposal // ID, the voter, and the vote option. type Vote struct { @@ -464,115 +434,100 @@ func (m *Vote) XXX_DiscardUnknown() { var xxx_messageInfo_Vote proto.InternalMessageInfo -func (*Vote) XXX_MessageName() string { - return "cosmos_sdk.x.gov.v1.Vote" -} func init() { proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value) - golang_proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) - golang_proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase") - golang_proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase") proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") - golang_proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") - golang_proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal") - golang_proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal") proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit") - golang_proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit") proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase") - golang_proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase") proto.RegisterType((*TallyResult)(nil), "cosmos_sdk.x.gov.v1.TallyResult") - golang_proto.RegisterType((*TallyResult)(nil), "cosmos_sdk.x.gov.v1.TallyResult") proto.RegisterType((*Vote)(nil), "cosmos_sdk.x.gov.v1.Vote") - golang_proto.RegisterType((*Vote)(nil), "cosmos_sdk.x.gov.v1.Vote") } func init() { proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } -func init() { golang_proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } var fileDescriptor_a5ae5e91b5b3fb03 = []byte{ - // 1240 bytes of a gzipped FileDescriptorProto + // 1230 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcf, 0x8f, 0xd3, 0x46, - 0x1b, 0x8e, 0xb3, 0xbf, 0xd8, 0x49, 0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3, + 0x6d, 0x46, 0x17, 0x2a, 0x23, 0xcc, 0xca, 0xb7, 0x4f, 0xa5, 0x85, 0x20, 0x24, 0xeb, 0x1b, 0xab, + 0xca, 0x1a, 0x6a, 0x2e, 0x52, 0x01, 0xf6, 0x75, 0x06, 0x7b, 0xb7, 0x59, 0x75, 0x03, 0x29, 0x6c, + 0x96, 0x18, 0xbb, 0x46, 0xc9, 0x70, 0x19, 0x1c, 0x6a, 0x25, 0x4b, 0xf3, 0xdb, 0xe5, 0xbc, 0xcc, + 0x2d, 0x14, 0xd5, 0x73, 0x7f, 0xf6, 0xa5, 0x33, 0xaf, 0xa1, 0x57, 0x5d, 0x5b, 0xab, 0x7a, 0x5e, + 0xdb, 0xc7, 0xd8, 0x7c, 0x29, 0x71, 0x61, 0xfc, 0xd7, 0x07, 0x12, 0x57, 0xf9, 0x85, 0x03, 0x53, + 0xcb, 0x38, 0x58, 0x41, 0xc4, 0x87, 0x36, 0x28, 0xb4, 0x58, 0xed, 0x4e, 0xe8, 0x95, 0x39, 0x99, + 0x5b, 0x18, 0x57, 0xcf, 0x6f, 0xf7, 0x25, 0x90, 0xb6, 0x44, 0xaf, 0xfd, 0xd6, 0x97, 0xb2, 0xa0, + 0x17, 0x7d, 0x09, 0xd2, 0x52, 0x33, 0xc1, 0x8a, 0x09, 0xd2, 0x27, 0xdd, 0x83, 0x97, 0xc1, 0x44, + 0x07, 0x91, 0x37, 0x59, 0x33, 0xe5, 0xc3, 0xf7, 0xc0, 0x24, 0x6a, 0x91, 0x10, 0xc5, 0xe5, 0x31, + 0x99, 0x5b, 0x28, 0x2d, 0x49, 0xca, 0x1e, 0x63, 0xa2, 0x0c, 0x2a, 0x31, 0x12, 0x98, 0xc9, 0xe0, + 0xac, 0xd2, 0xfb, 0x79, 0x00, 0x96, 0x71, 0x90, 0x76, 0xf3, 0xdf, 0x29, 0xd6, 0x00, 0xd3, 0x6c, + 0xaf, 0xd1, 0x1b, 0x14, 0xbc, 0xa3, 0x01, 0x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, 0xc4, 0xdc, 0x93, 0x67, 0x62, 0xee, 0xcb, 0x6d, 0x31, 0xb7, 0xb5, 0x2d, 0x72, + 0x8f, 0xb7, 0x45, 0xee, 0xe7, 0x6d, 0x91, 0xbb, 0xf7, 0x5c, 0xcc, 0x3d, 0x7e, 0x2e, 0xe6, 0x9e, + 0x3c, 0x17, 0x73, 0x1f, 0xff, 0xbd, 0x59, 0x67, 0xfe, 0xdf, 0xac, 0x4e, 0x26, 0x7e, 0x78, 0xfe, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x53, 0x05, 0xd1, 0xf5, 0x0c, 0x00, 0x00, } func (this *MsgSubmitProposalBase) Equal(that interface{}) bool { diff --git a/x/ibc/20-transfer/module.go b/x/ibc/20-transfer/module.go index a3c5a355626e..91b8a2cd372d 100644 --- a/x/ibc/20-transfer/module.go +++ b/x/ibc/20-transfer/module.go @@ -4,6 +4,8 @@ import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -109,6 +111,8 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return nil } +func (am AppModule) RegisterQueryService(grpc.Server) {} + // InitGenesis performs genesis initialization for the ibc transfer module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONMarshaler, _ json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/ibc/module.go b/x/ibc/module.go index a6168fba8038..dc55e1df4aed 100644 --- a/x/ibc/module.go +++ b/x/ibc/module.go @@ -3,6 +3,7 @@ package ibc import ( "encoding/json" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -116,6 +117,8 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(*am.keeper) } +func (am AppModule) RegisterQueryService(grpc.Server) {} + // InitGenesis performs genesis initialization for the ibc module. It returns // no validator updates. func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONMarshaler, _ json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/mint/types/types.pb.go b/x/mint/types/types.pb.go index 67121501b407..039fcbe0814b 100644 --- a/x/mint/types/types.pb.go +++ b/x/mint/types/types.pb.go @@ -8,7 +8,6 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -16,7 +15,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -67,10 +65,6 @@ func (m *Minter) XXX_DiscardUnknown() { var xxx_messageInfo_Minter proto.InternalMessageInfo -func (*Minter) XXX_MessageName() string { - return "cosmos_sdk.x.mint.v1.Minter" -} - // mint parameters type Params struct { // type of coin to mint @@ -133,49 +127,43 @@ func (m *Params) GetBlocksPerYear() uint64 { return 0 } -func (*Params) XXX_MessageName() string { - return "cosmos_sdk.x.mint.v1.Params" -} func init() { proto.RegisterType((*Minter)(nil), "cosmos_sdk.x.mint.v1.Minter") - golang_proto.RegisterType((*Minter)(nil), "cosmos_sdk.x.mint.v1.Minter") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.mint.v1.Params") - golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.mint.v1.Params") } func init() { proto.RegisterFile("x/mint/types/types.proto", fileDescriptor_fcb8be2eaea25b48) } -func init() { golang_proto.RegisterFile("x/mint/types/types.proto", fileDescriptor_fcb8be2eaea25b48) } var fileDescriptor_fcb8be2eaea25b48 = []byte{ - // 446 bytes of a gzipped FileDescriptorProto + // 439 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xb1, 0x6e, 0xd3, 0x40, - 0x1c, 0xc6, 0x7d, 0x90, 0x46, 0xca, 0x41, 0x05,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0x51, 0xc3, 0x9d, 0x51, 0xd8, 0xa1, 0xfe, 0x88, 0x8a, 0x73, 0xd4, 0x4d, 0x99, 0x1d, + 0x70, 0x86, 0xee, 0x8d, 0x6b, 0x59, 0x4c, 0x35, 0x69, 0xa8, 0x22, 0x33, 0x0a, 0x2a, 0xe8, 0x1f, + 0xf9, 0x27, 0xbd, 0xec, 0xf0, 0x7a, 0x1e, 0x3d, 0x76, 0xcb, 0x5b, 0x86, 0x38, 0xdf, 0x77, 0xca, + 0x88, 0xaa, 0x77, 0x14, 0xd4, 0x69, 0xef, 0xcb, 0xd7, 0xc8, 0xcb, 0xa2, 0xcb, 0x45, 0xe8, 0x5f, + 0x2d, 0x42, 0xff, 0xd7, 0x22, 0xf4, 0x3f, 0x2f, 0x43, 0xef, 0x6a, 0x19, 0x7a, 0x3f, 0x96, 0xa1, + 0xf7, 0x7e, 0xcf, 0x16, 0x1a, 0xf7, 0xed, 0x9d, 0x79, 0xf1, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x9e, + 0xe3, 0xbd, 0x88, 0x8d, 0x03, 0x00, 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { diff --git a/x/params/module.go b/x/params/module.go index c2a6f5860e5a..1103576354ee 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -4,6 +4,8 @@ import ( "encoding/json" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -91,6 +93,8 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { return NewQuerier(am.keeper) } +func (am AppModule) RegisterQueryService(grpc.Server) {} + // ProposalContents returns all the params content functions used to // simulate governance proposals. func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { diff --git a/x/params/types/proposal/types.pb.go b/x/params/types/proposal/types.pb.go index 9dc09e4967ab..29f95f728a8e 100644 --- a/x/params/types/proposal/types.pb.go +++ b/x/params/types/proposal/types.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -15,7 +14,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -65,10 +63,6 @@ func (m *ParameterChangeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ParameterChangeProposal proto.InternalMessageInfo -func (*ParameterChangeProposal) XXX_MessageName() string { - return "cosmos_sdk.x.params.v1.ParameterChangeProposal" -} - // ParamChange defines a parameter change. type ParamChange struct { Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` @@ -129,46 +123,37 @@ func (m *ParamChange) GetValue() string { return "" } -func (*ParamChange) XXX_MessageName() string { - return "cosmos_sdk.x.params.v1.ParamChange" -} func init() { proto.RegisterType((*ParameterChangeProposal)(nil), "cosmos_sdk.x.params.v1.ParameterChangeProposal") - golang_proto.RegisterType((*ParameterChangeProposal)(nil), "cosmos_sdk.x.params.v1.ParameterChangeProposal") proto.RegisterType((*ParamChange)(nil), "cosmos_sdk.x.params.v1.ParamChange") - golang_proto.RegisterType((*ParamChange)(nil), "cosmos_sdk.x.params.v1.ParamChange") } func init() { proto.RegisterFile("x/params/types/proposal/types.proto", fileDescriptor_0ab50f1d22a2cb61) } -func init() { - golang_proto.RegisterFile("x/params/types/proposal/types.proto", fileDescriptor_0ab50f1d22a2cb61) -} var fileDescriptor_0ab50f1d22a2cb61 = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x51, 0xbd, 0x6e, 0xfa, 0x30, - 0x1c, 0xb4, 0xff, 0xe1, 0xdf, 0x52, 0xb3, 0x54, 0x56, 0xd5, 0x46, 0x0c, 0x06, 0x81, 0x54, 0xb1, - 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0x06, 0x5e, 0x36, 0x35, 0xd0, 0x78, 0x44, 0x95, 0x23, 0x1e, 0xae, - 0xa2, 0xb2, 0x59, 0x8c, 0x8c, 0xe2, 0xd1, 0x21, 0xd8, 0x37, 0xc6, 0xe7, 0x28, 0x98, 0x88, 0xf5, - 0x3e, 0x53, 0x31, 0x16, 0x1d, 0x96, 0x7c, 0xba, 0x10, 0x61, 0xe0, 0x3b, 0x38, 0xd0, 0x2e, 0x15, - 0x8b, 0x3b, 0x83, 0xd7, 0x8c, 0xc0, 0x6d, 0x46, 0xe0, 0x2e, 0x23, 0xf0, 0x33, 0x23, 0xf0, 0x39, - 0x27, 0xe0, 0x2d, 0x27, 0x70, 0x9b, 0x13, 0xb8, 0xcb, 0x09, 0x78, 0xcf, 0x09, 0x18, 0x3c, 0x24, - 0xa9, 0x1d, 0x2f, 0x46, 0x34, 0x92, 0x33, 0xe6, 0x6b, 0xec, 0x3f, 0x37, 0x26, 0x9e, 0xb0, 0x3f, - 0xde, 0x68, 0x74, 0xe2, 0xae, 0xf7, 0xfe, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x91, 0x14, 0x0f, - 0xc5, 0x01, 0x00, 0x00, + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xae, 0xd0, 0x2f, 0x48, + 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc8, + 0x2f, 0x4e, 0xcc, 0x81, 0x70, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0x92, 0xf3, 0x8b, + 0x73, 0xf3, 0x8b, 0xe3, 0x8b, 0x53, 0xb2, 0xf5, 0x2a, 0xf4, 0x20, 0xea, 0xf5, 0xca, 0x0c, 0xa5, + 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0xc1, 0x4a, 0xf5, + 0xd3, 0xf3, 0xd3, 0xf3, 0x11, 0x2c, 0x88, 0x7e, 0xa5, 0x05, 0x8c, 0x5c, 0xe2, 0x01, 0x20, 0x5d, + 0xa9, 0x25, 0xa9, 0x45, 0xce, 0x19, 0x89, 0x79, 0xe9, 0xa9, 0x01, 0x50, 0x7b, 0x84, 0x44, 0xb8, + 0x58, 0x4b, 0x32, 0x4b, 0x72, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x20, 0x1c, 0x21, + 0x05, 0x2e, 0xee, 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xcc, 0xfc, 0x3c, 0x09, 0x26, + 0xb0, 0x1c, 0xb2, 0x90, 0x90, 0x33, 0x17, 0x7b, 0x32, 0xd8, 0xa4, 0x62, 0x09, 0x66, 0x05, 0x66, + 0x0d, 0x6e, 0x23, 0x65, 0x3d, 0xec, 0xae, 0xd4, 0x03, 0xdb, 0x0c, 0xb1, 0xd5, 0x89, 0xe5, 0xc4, + 0x3d, 0x79, 0x86, 0x20, 0x98, 0x4e, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x33, 0x16, 0xc8, 0x33, + 0x28, 0x85, 0x73, 0x71, 0x23, 0xa9, 0x13, 0x92, 0xe2, 0xe2, 0x28, 0x2e, 0x4d, 0x2a, 0x2e, 0x48, + 0x4c, 0x86, 0x39, 0x0c, 0xce, 0x17, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x84, 0xba, 0x09, 0xc4, + 0x04, 0xf9, 0xa1, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x19, 0xe2, 0x07, 0x30, 0xc7, 0x8a, 0x05, + 0x64, 0xb0, 0x53, 0xd0, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, + 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, + 0xc7, 0x10, 0x65, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x71, + 0x3e, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0xd6, 0xc7, 0x11, 0x37, 0x49, 0x6c, 0xe0, 0x60, 0x35, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x17, 0xa9, 0xe7, 0x51, 0xbd, 0x01, 0x00, 0x00, } func (this *ParameterChangeProposal) Equal(that interface{}) bool { diff --git a/x/slashing/types/types.pb.go b/x/slashing/types/types.pb.go index 21f6ed4b971d..7358555a1043 100644 --- a/x/slashing/types/types.pb.go +++ b/x/slashing/types/types.pb.go @@ -10,7 +10,6 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -20,7 +19,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -76,10 +74,6 @@ func (m *MsgUnjail) GetValidatorAddr() github_com_cosmos_cosmos_sdk_types.ValAdd return nil } -func (*MsgUnjail) XXX_MessageName() string { - return "cosmos_sdk.x.slashing.v1.MsgUnjail" -} - // ValidatorSigningInfo defines the signing info for a validator type ValidatorSigningInfo struct { Address github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"address,omitempty"` @@ -169,55 +163,46 @@ func (m *ValidatorSigningInfo) GetMissedBlocksCounter() int64 { return 0 } -func (*ValidatorSigningInfo) XXX_MessageName() string { - return "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo" -} func init() { proto.RegisterType((*MsgUnjail)(nil), "cosmos_sdk.x.slashing.v1.MsgUnjail") - golang_proto.RegisterType((*MsgUnjail)(nil), "cosmos_sdk.x.slashing.v1.MsgUnjail") proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo") - golang_proto.RegisterType((*ValidatorSigningInfo)(nil), "cosmos_sdk.x.slashing.v1.ValidatorSigningInfo") } func init() { proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) } -func init() { - golang_proto.RegisterFile("x/slashing/types/types.proto", fileDescriptor_57cb37764f972476) -} var fileDescriptor_57cb37764f972476 = []byte{ - // 499 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0x6b, 0x0a, 0xc7, 0xe1, 0x96, 0x1b, 0x72, 0x20, 0xa2, 0xea, 0x64, 0x57, 0x19, 0x50, - 0x97, 0x4b, 0xc4, 0xb1, 0x75, 0xa3, 0xb7, 0x80, 0xc4, 0x0f, 0x29, 0xf7, 0x63, 0x60, 0x20, 0x72, - 0x6b, 0xd7, 0x35, 0x4d, 0xec, 0x2a, 0x76, 0x4f, 0xed, 0xca, 0x5f, 0x70, 0x23, 0xe3, 0x8d, 0xfc, - 0x11, 0x0c, 0x8c, 0x1d, 0x6f, 0x64, 0x0a, 0xa8, 0x59, 0x10, 0x63, 0xc7, 0x9b, 0x50, 0xe2, 0x86, - 0xab, 0x4e, 0x08, 0xdd, 0x92, 0xe4, 0x7d, 0xfc, 0x7d, 0xef, 0xeb, 0xe7, 0x17, 0xc3, 0xbd, 0x59, - 0xa0, 0x63, 0xa2, 0x47, 0x42, 0xf2, 0xc0, 0xcc, 0x27, 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x8e, 0x6a, 0xef, 0xff, 0xff, 0x8b, 0xdc, 0xbc, 0x07, - 0xfd, 0xad, 0xf2, 0x58, 0x9e, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x14, 0x24, 0x2a, 0x33, 0x22, - 0x03, 0x00, 0x00, + // 492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0x04, 0x4a, 0xb9, 0x84, 0x0e, 0x2e, 0x08, 0x2b, 0xaa, 0x7c, 0x91, 0x07, 0x94, + 0xa5, 0xb6, 0x28, 0x5b, 0x36, 0xdc, 0x05, 0xc4, 0x2f, 0xc9, 0xb4, 0x1d, 0x18, 0xb0, 0xce, 0xb9, + 0xcb, 0xf9, 0x88, 0x7d, 0x17, 0xf9, 0xce, 0x55, 0xb2, 0xf2, 0x17, 0x74, 0x64, 0xec, 0xc8, 0x1f, + 0xc1, 0x1f, 0xd0, 0xb1, 0x23, 0x93, 0x41, 0xc9, 0x82, 0x18, 0x33, 0x76, 0x42, 0xf6, 0xc5, 0x34, + 0xaa, 0x10, 0x62, 0xb1, 0xef, 0x7d, 0xee, 0xfb, 0xde, 0xf7, 0xde, 0xbd, 0x83, 0x7b, 0x33, 0x5f, + 0xa5, 0x58, 0x25, 0x5c, 0x30, 0x5f, 0xcf, 0xa7, 0x54, 0x99, 0xaf, 0x37, 0xcd, 0xa5, 0x96, 0x96, + 0x3d, 0x92, 0x2a, 0x93, 0x2a, 0x52, 0x64, 0xe2, 0xcd, 0xbc, 0x46, 0xe8, 0x9d, 0x3e, 0xe9, 0x3d, + 0xd6, 0x09, 0xcf, 0x49, 0x34, 0xc5, 0xb9, 0x9e, 0xfb, 0xb5, 0xd8, 0x67, 0x92, 0xc9, 0xeb, 0x95, + 0xa9, 0xd0, 0x43, 0x4c, 0x4a, 0x96, 0x52, 0x23, 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 0x6e, 0x75, 0xbb, + 0x94, 0x44, 0x85, 0xd0, 0x3c, 0xb5, 0x6f, 0xf7, 0xc1, 0xa0, 0x73, 0xd0, 0xf3, 0xcc, 0x6c, 0xbc, + 0x66, 0x36, 0xde, 0x51, 0x33, 0x9b, 0x00, 0x5d, 0x94, 0xa8, 0x75, 0x5d, 0x7b, 0x33, 0xdb, 0x3d, + 0xfb, 0x8e, 0x40, 0xd8, 0x31, 0xe8, 0xb8, 0x22, 0x96, 0x03, 0xa1, 0x96, 0x59, 0xac, 0xb4, 0x14, + 0x94, 0xd8, 0x77, 0xfa, 0x60, 0xb0, 0x1d, 0x6e, 0x10, 0xeb, 0x08, 0x3e, 0xcc, 0xb8, 0x52, 0x94, + 0x44, 0x71, 0x2a, 0x47, 0x13, 0x15, 0x8d, 0x64, 0x21, 0x34, 0xcd, 0xed, 0xad, 0xba, 0x89, 0xfe, + 0xaa, 0x44, 0x7b, 0xc6, 0xe8, 0xaf, 0x32, 0x37, 0xdc, 0x35, 0x3c, 0xa8, 0xf1, 0xa1, 0xa1, 0xc3, + 0xed, 0xcf, 0xe7, 0xa8, 0xf5, 0xf3, 0x1c, 0x81, 0xe0, 0xe5, 0x97, 0x85, 0x03, 0x2e, 0x16, 0x0e, + 0xb8, 0x5c, 0x38, 0xe0, 0xc7, 0xc2, 0x01, 0x67, 0x4b, 0xa7, 0x75, 0xb9, 0x74, 0x5a, 0xdf, 0x96, + 0x4e, 0xeb, 0xfd, 0xbf, 0x9f, 0xc6, 0xcd, 0xf7, 0x1f, 0x6f, 0xd5, 0xd7, 0xf1, 0xf4, 0x77, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x72, 0x9e, 0xc6, 0x73, 0x1a, 0x03, 0x00, 0x00, } func (this *MsgUnjail) Equal(that interface{}) bool { diff --git a/x/staking/types/types.pb.go b/x/staking/types/types.pb.go index 94b091e2ecc6..ca9394854763 100644 --- a/x/staking/types/types.pb.go +++ b/x/staking/types/types.pb.go @@ -11,7 +11,6 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" types1 "github.com/tendermint/tendermint/abci/types" @@ -23,7 +22,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -120,10 +118,6 @@ func (m *MsgCreateValidator) GetValue() types.Coin { return types.Coin{} } -func (*MsgCreateValidator) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.MsgCreateValidator" -} - // MsgEditValidator defines an SDK message for editing an existing validator. type MsgEditValidator struct { Description Description `protobuf:"bytes,1,opt,name=description,proto3" json:"description"` @@ -184,10 +178,6 @@ func (m *MsgEditValidator) GetValidatorAddress() github_com_cosmos_cosmos_sdk_ty return nil } -func (*MsgEditValidator) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.MsgEditValidator" -} - // MsgDelegate defines an SDK message for performing a delegation from a // delegate to a validator. type MsgDelegate struct { @@ -250,10 +240,6 @@ func (m *MsgDelegate) GetAmount() types.Coin { return types.Coin{} } -func (*MsgDelegate) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.MsgDelegate" -} - // MsgBeginRedelegate defines an SDK message for performing a redelegation from // a delegate and source validator to a destination validator. type MsgBeginRedelegate struct { @@ -324,10 +310,6 @@ func (m *MsgBeginRedelegate) GetAmount() types.Coin { return types.Coin{} } -func (*MsgBeginRedelegate) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.MsgBeginRedelegate" -} - // MsgUndelegate defines an SDK message for performing an undelegation from a // delegate and a validator. type MsgUndelegate struct { @@ -390,10 +372,6 @@ func (m *MsgUndelegate) GetAmount() types.Coin { return types.Coin{} } -func (*MsgUndelegate) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.MsgUndelegate" -} - // HistoricalInfo contains the historical information that gets stored at // each height. type HistoricalInfo struct { @@ -448,10 +426,6 @@ func (m *HistoricalInfo) GetValset() []Validator { return nil } -func (*HistoricalInfo) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.HistoricalInfo" -} - // CommissionRates defines the initial commission rates to be used for creating // a validator. type CommissionRates struct { @@ -492,10 +466,6 @@ func (m *CommissionRates) XXX_DiscardUnknown() { var xxx_messageInfo_CommissionRates proto.InternalMessageInfo -func (*CommissionRates) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.CommissionRates" -} - // Commission defines a commission parameters for a given validator. type Commission struct { CommissionRates `protobuf:"bytes,1,opt,name=commission_rates,json=commissionRates,proto3,embedded=commission_rates" json:"commission_rates"` @@ -541,10 +511,6 @@ func (m *Commission) GetUpdateTime() time.Time { return time.Time{} } -func (*Commission) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Commission" -} - // Description defines a validator description. type Description struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` @@ -621,10 +587,6 @@ func (m *Description) GetDetails() string { return "" } -func (*Description) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Description" -} - // Validator defines the total amount of 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. @@ -678,10 +640,6 @@ func (m *Validator) XXX_DiscardUnknown() { var xxx_messageInfo_Validator proto.InternalMessageInfo -func (*Validator) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Validator" -} - // DVPair is struct that just has a delegator-validator pair with no other data. // It is intended to be used as a marshalable pointer. For example, a DVPair can // be used to construct the key to getting an UnbondingDelegation from state. @@ -736,10 +694,6 @@ func (m *DVPair) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.ValAdd return nil } -func (*DVPair) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.DVPair" -} - // DVPairs defines an array of DVPair objects. type DVPairs struct { Pairs []DVPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` @@ -785,10 +739,6 @@ func (m *DVPairs) GetPairs() []DVPair { return nil } -func (*DVPairs) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.DVPairs" -} - // DVVTriplet is struct that just has a delegator-validator-validator triplet // with no other data. It is intended to be used as a marshalable pointer. For // example, a DVVTriplet can be used to construct the key to getting a @@ -852,10 +802,6 @@ func (m *DVVTriplet) GetValidatorDstAddress() github_com_cosmos_cosmos_sdk_types return nil } -func (*DVVTriplet) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.DVVTriplet" -} - // DVVTriplets defines an array of DVVTriplet objects. type DVVTriplets struct { Triplets []DVVTriplet `protobuf:"bytes,1,rep,name=triplets,proto3" json:"triplets"` @@ -901,10 +847,6 @@ func (m *DVVTriplets) GetTriplets() []DVVTriplet { return nil } -func (*DVVTriplets) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.DVVTriplets" -} - // Delegation represents the bond with tokens held by an account. It is // owned by one delegator, and is associated with the voting power of one // validator. @@ -960,10 +902,6 @@ func (m *Delegation) GetValidatorAddress() github_com_cosmos_cosmos_sdk_types.Va return nil } -func (*Delegation) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Delegation" -} - // UnbondingDelegation stores all of a single delegator's unbonding bonds // for a single validator in an time-ordered list type UnbondingDelegation struct { @@ -1025,10 +963,6 @@ func (m *UnbondingDelegation) GetEntries() []UnbondingDelegationEntry { return nil } -func (*UnbondingDelegation) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.UnbondingDelegation" -} - // UnbondingDelegationEntry defines an unbonding object with relevant metadata. type UnbondingDelegationEntry struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` @@ -1083,10 +1017,6 @@ func (m *UnbondingDelegationEntry) GetCompletionTime() time.Time { return time.Time{} } -func (*UnbondingDelegationEntry) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry" -} - // RedelegationEntry defines a redelegation object with relevant metadata. type RedelegationEntry struct { CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty" yaml:"creation_height"` @@ -1141,10 +1071,6 @@ func (m *RedelegationEntry) GetCompletionTime() time.Time { return time.Time{} } -func (*RedelegationEntry) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.RedelegationEntry" -} - // Redelegation contains the list of a particular delegator's redelegating bonds // from a particular source validator to a particular destination validator. type Redelegation struct { @@ -1214,10 +1140,6 @@ func (m *Redelegation) GetEntries() []RedelegationEntry { return nil } -func (*Redelegation) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Redelegation" -} - // Params defines the parameters for the staking module. type Params struct { UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time" yaml:"unbonding_time"` @@ -1294,165 +1216,139 @@ func (m *Params) GetBondDenom() string { return "" } -func (*Params) XXX_MessageName() string { - return "cosmos_sdk.x.staking.v1.Params" -} func init() { proto.RegisterType((*MsgCreateValidator)(nil), "cosmos_sdk.x.staking.v1.MsgCreateValidator") - golang_proto.RegisterType((*MsgCreateValidator)(nil), "cosmos_sdk.x.staking.v1.MsgCreateValidator") proto.RegisterType((*MsgEditValidator)(nil), "cosmos_sdk.x.staking.v1.MsgEditValidator") - golang_proto.RegisterType((*MsgEditValidator)(nil), "cosmos_sdk.x.staking.v1.MsgEditValidator") proto.RegisterType((*MsgDelegate)(nil), "cosmos_sdk.x.staking.v1.MsgDelegate") - golang_proto.RegisterType((*MsgDelegate)(nil), "cosmos_sdk.x.staking.v1.MsgDelegate") proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos_sdk.x.staking.v1.MsgBeginRedelegate") - golang_proto.RegisterType((*MsgBeginRedelegate)(nil), "cosmos_sdk.x.staking.v1.MsgBeginRedelegate") proto.RegisterType((*MsgUndelegate)(nil), "cosmos_sdk.x.staking.v1.MsgUndelegate") - golang_proto.RegisterType((*MsgUndelegate)(nil), "cosmos_sdk.x.staking.v1.MsgUndelegate") proto.RegisterType((*HistoricalInfo)(nil), "cosmos_sdk.x.staking.v1.HistoricalInfo") - golang_proto.RegisterType((*HistoricalInfo)(nil), "cosmos_sdk.x.staking.v1.HistoricalInfo") proto.RegisterType((*CommissionRates)(nil), "cosmos_sdk.x.staking.v1.CommissionRates") - golang_proto.RegisterType((*CommissionRates)(nil), "cosmos_sdk.x.staking.v1.CommissionRates") proto.RegisterType((*Commission)(nil), "cosmos_sdk.x.staking.v1.Commission") - golang_proto.RegisterType((*Commission)(nil), "cosmos_sdk.x.staking.v1.Commission") proto.RegisterType((*Description)(nil), "cosmos_sdk.x.staking.v1.Description") - golang_proto.RegisterType((*Description)(nil), "cosmos_sdk.x.staking.v1.Description") proto.RegisterType((*Validator)(nil), "cosmos_sdk.x.staking.v1.Validator") - golang_proto.RegisterType((*Validator)(nil), "cosmos_sdk.x.staking.v1.Validator") proto.RegisterType((*DVPair)(nil), "cosmos_sdk.x.staking.v1.DVPair") - golang_proto.RegisterType((*DVPair)(nil), "cosmos_sdk.x.staking.v1.DVPair") proto.RegisterType((*DVPairs)(nil), "cosmos_sdk.x.staking.v1.DVPairs") - golang_proto.RegisterType((*DVPairs)(nil), "cosmos_sdk.x.staking.v1.DVPairs") proto.RegisterType((*DVVTriplet)(nil), "cosmos_sdk.x.staking.v1.DVVTriplet") - golang_proto.RegisterType((*DVVTriplet)(nil), "cosmos_sdk.x.staking.v1.DVVTriplet") proto.RegisterType((*DVVTriplets)(nil), "cosmos_sdk.x.staking.v1.DVVTriplets") - golang_proto.RegisterType((*DVVTriplets)(nil), "cosmos_sdk.x.staking.v1.DVVTriplets") proto.RegisterType((*Delegation)(nil), "cosmos_sdk.x.staking.v1.Delegation") - golang_proto.RegisterType((*Delegation)(nil), "cosmos_sdk.x.staking.v1.Delegation") proto.RegisterType((*UnbondingDelegation)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegation") - golang_proto.RegisterType((*UnbondingDelegation)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegation") proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry") - golang_proto.RegisterType((*UnbondingDelegationEntry)(nil), "cosmos_sdk.x.staking.v1.UnbondingDelegationEntry") proto.RegisterType((*RedelegationEntry)(nil), "cosmos_sdk.x.staking.v1.RedelegationEntry") - golang_proto.RegisterType((*RedelegationEntry)(nil), "cosmos_sdk.x.staking.v1.RedelegationEntry") proto.RegisterType((*Redelegation)(nil), "cosmos_sdk.x.staking.v1.Redelegation") - golang_proto.RegisterType((*Redelegation)(nil), "cosmos_sdk.x.staking.v1.Redelegation") proto.RegisterType((*Params)(nil), "cosmos_sdk.x.staking.v1.Params") - golang_proto.RegisterType((*Params)(nil), "cosmos_sdk.x.staking.v1.Params") } func init() { proto.RegisterFile("x/staking/types/types.proto", fileDescriptor_c669c0a3ee1b124c) } -func init() { - golang_proto.RegisterFile("x/staking/types/types.proto", fileDescriptor_c669c0a3ee1b124c) -} var fileDescriptor_c669c0a3ee1b124c = []byte{ - // 1690 bytes of a gzipped FileDescriptorProto + // 1682 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x23, 0x49, 0x15, 0x4f, 0xdb, 0x8e, 0x9d, 0x3c, 0x4f, 0xec, 0xa4, 0xa3, 0xc9, 0x78, 0xb2, 0xac, 0x3b, 0xf4, - 0xa2, 0x55, 0x84, 0x58, 0x5b, 0xd9, 0x45, 0x42, 0xca, 0x5e, 0x76, 0x1c, 0x27, 0x4a, 0x50, 0xb2, - 0x9a, 0xed, 0xcc, 0xe6, 0xc0, 0x87, 0xac, 0x72, 0x77, 0xa5, 0x5d, 0xc4, 0xdd, 0x6d, 0xba, 0xca, - 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e, 0x55, 0xcd, 0xb1, 0x2b, 0x87, 0x78, 0x88, 0xb8, 0x3b, 0x96, 0x31, 0x4d, 0xf9, 0xd7, + 0xb4, 0x17, 0xdc, 0x38, 0xbe, 0x9c, 0x70, 0xe3, 0xf8, 0x04, 0x4a, 0x0e, 0x1a, 0xb4, 0xa2, 0x03, + 0x0a, 0x6f, 0x2e, 0x35, 0xee, 0xc6, 0x28, 0x97, 0xbf, 0x8b, 0xa7, 0x94, 0xe8, 0x42, 0x4e, 0xd5, + 0x6f, 0x41, 0x31, 0xe0, 0x88, 0xfb, 0x44, 0x20, 0xbe, 0x16, 0x3f, 0x59, 0x24, 0x3e, 0xea, 0x06, + 0x38, 0x68, 0xb0, 0x2b, 0x16, 0xea, 0x21, 0xa8, 0x9d, 0xe8, 0x09, 0xad, 0x15, 0xdb, 0x32, 0x90, + 0x7f, 0x77, 0x34, 0xd4, 0xee, 0x0a, 0xf9, 0x71, 0x1e, 0xdd, 0x58, 0x89, 0x89, 0x21, 0xda, 0x37, + 0x01, 0x82, 0x73, 0xb5, 0x2c, 0xec, 0x7a, 0x8e, 0xbc, 0xf8, 0xde, 0x1e, 0x0d, 0xb5, 0x15, 0x81, + 0x12, 0x7f, 0xd3, 0x8d, 0xc5, 0x60, 0xd1, 0x0c, 0x7e, 0xc7, 0x86, 0x6f, 0xec, 0x3d, 0x7e, 0x5a, + 0x55, 0x9e, 0x3c, 0xad, 0x2a, 0x7f, 0x7b, 0x5a, 0x55, 0xbe, 0x78, 0x56, 0x9d, 0x7b, 0xf2, 0xac, + 0x3a, 0xf7, 0xa7, 0x67, 0xd5, 0xb9, 0xef, 0x7e, 0xe3, 0xb9, 0xc1, 0x92, 0xfa, 0x6b, 0x6c, 0x3b, + 0xcf, 0xbd, 0xf2, 0xd1, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x93, 0x44, 0xcc, 0xa7, 0x1d, + 0x00, 0x00, } func (this *MsgCreateValidator) Equal(that interface{}) bool { diff --git a/x/supply/types/types.pb.go b/x/supply/types/types.pb.go index bb99f1d723f6..d94ee7669f91 100644 --- a/x/supply/types/types.pb.go +++ b/x/supply/types/types.pb.go @@ -10,7 +10,6 @@ import ( types "github.com/cosmos/cosmos-sdk/x/auth/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" io "io" math "math" math_bits "math/bits" @@ -18,7 +17,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf @@ -67,10 +65,6 @@ func (m *ModuleAccount) XXX_DiscardUnknown() { var xxx_messageInfo_ModuleAccount proto.InternalMessageInfo -func (*ModuleAccount) XXX_MessageName() string { - return "cosmos_sdk.x.supply.v1.ModuleAccount" -} - // Supply represents a struct that passively keeps track of the total supply // amounts in the network. type Supply struct { @@ -109,44 +103,38 @@ func (m *Supply) XXX_DiscardUnknown() { var xxx_messageInfo_Supply proto.InternalMessageInfo -func (*Supply) XXX_MessageName() string { - return "cosmos_sdk.x.supply.v1.Supply" -} func init() { proto.RegisterType((*ModuleAccount)(nil), "cosmos_sdk.x.supply.v1.ModuleAccount") - golang_proto.RegisterType((*ModuleAccount)(nil), "cosmos_sdk.x.supply.v1.ModuleAccount") proto.RegisterType((*Supply)(nil), "cosmos_sdk.x.supply.v1.Supply") - golang_proto.RegisterType((*Supply)(nil), "cosmos_sdk.x.supply.v1.Supply") } func init() { proto.RegisterFile("x/supply/types/types.proto", fileDescriptor_e14b855c341cf347) } -func init() { golang_proto.RegisterFile("x/supply/types/types.proto", fileDescriptor_e14b855c341cf347) } var fileDescriptor_e14b855c341cf347 = []byte{ - // 361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x3d, 0x4f, 0xf2, 0x40, - 0x1c, 0xef, 0x3d, 0x3c, 0x0f, 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, 0x67, 0x8b, 0x94, 0x65, - 0xf1, 0x6f, 0x4c, 0x22, 0x5f, 0xf9, 0xa3, 0x01, 0xa3, 0x61, 0x97, 0xb3, 0xac, 0x89, 0x52, 0xe2, - 0xa7, 0x51, 0xc0, 0x58, 0x40, 0x63, 0xa6, 0xd4, 0xb4, 0x9a, 0xd1, 0xb0, 0x77, 0xbf, 0xba, 0xff, - 0x1f, 0xa7, 0x48, 0x78, 0x9e, 0x22, 0x41, 0x67, 0x62, 0xfd, 0xae, 0xac, 0x45, 0x7e, 0x10, 0xff, - 0x71, 0xca, 0x49, 0xa8, 0x00, 0xad, 0x66, 0x48, 0x9d, 0xd6, 0x6e, 0xca, 0x71, 0x1b, 0xdf, 0xd2, - 0x20, 0xb6, 0xae, 0x66, 0x0b, 0x24, 0xbc, 0x7c, 0x20, 0x63, 0x10, 0xf0, 0x61, 0xe6, 0x60, 0x97, - 0x46, 0x66, 0x05, 0x5b, 0x5f, 0x97, 0xcc, 0x1b, 0xad, 0x4b, 0x59, 0x11, 0x98, 0x5d, 0x69, 0x76, - 0x9b, 0x1b, 0xc3, 0xaf, 0x29, 0x02, 0x56, 0x6f, 0xb6, 0x84, 0x60, 0xbe, 0x84, 0xe0, 0x73, 0x09, - 0xc1, 0x53, 0x01, 0x85, 0xb7, 0x02, 0x82, 0x59, 0x01, 0xc1, 0xbc, 0x80, 0xc2, 0x7b, 0x01, 0x85, - 0xfb, 0x8b, 0x5f, 0x0d, 0xf6, 0x37, 0xee, 0xd4, 0xcb, 0xfe, 0xaf, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x51, 0xe8, 0x53, 0x39, 0x0a, 0x02, 0x00, 0x00, + // 355 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xaa, 0xd0, 0x2f, 0x2e, + 0x2d, 0x28, 0xc8, 0xa9, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, + 0x25, 0xf9, 0x42, 0x62, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, + 0x7a, 0x10, 0x65, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, + 0x45, 0x25, 0x95, 0xfa, 0x60, 0xa5, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xbf, 0x94, + 0x20, 0x86, 0x91, 0x52, 0x12, 0x15, 0xfa, 0x89, 0xa5, 0x25, 0x19, 0x98, 0x96, 0x29, 0x6d, 0x62, + 0xe4, 0xe2, 0xf5, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0x75, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x11, + 0x4a, 0xe4, 0xe2, 0x49, 0x4a, 0x2c, 0x4e, 0x8d, 0x4f, 0x84, 0xf0, 0x25, 0x18, 0x15, 0x18, 0x35, + 0xb8, 0x8d, 0x14, 0xf5, 0x50, 0x5c, 0x05, 0x32, 0x4d, 0xaf, 0xcc, 0x50, 0xcf, 0x29, 0xb1, 0x18, + 0xa6, 0xd1, 0x49, 0xfa, 0xc2, 0x3d, 0x79, 0xc6, 0x4f, 0xf7, 0xe4, 0x85, 0x2b, 0x13, 0x73, 0x73, + 0xac, 0x94, 0x90, 0x0d, 0x51, 0x0a, 0xe2, 0x4e, 0x42, 0xa8, 0x14, 0x12, 0xe2, 0x62, 0xc9, 0x4b, + 0xcc, 0x4d, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x14, 0xb8, 0xb8, 0x0b, + 0x52, 0x8b, 0x72, 0x33, 0x8b, 0x8b, 0x33, 0xf3, 0xf3, 0x8a, 0x25, 0x98, 0x15, 0x98, 0x35, 0x38, + 0x83, 0x90, 0x85, 0xac, 0x38, 0x3a, 0x16, 0xc8, 0x33, 0xcc, 0x58, 0x20, 0xcf, 0xa0, 0x54, 0xcc, + 0xc5, 0x16, 0x0c, 0x0e, 0x16, 0xa1, 0x68, 0x2e, 0xd6, 0x92, 0xfc, 0x92, 0xc4, 0x1c, 0x09, 0x46, + 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x61, 0x64, 0x57, 0x96, 0x19, 0xea, 0x39, 0xe7, 0x67, 0xe6, 0x39, + 0x19, 0x9c, 0xb8, 0x27, 0xcf, 0xb0, 0xea, 0xbe, 0xbc, 0x46, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, + 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x44, 0x19, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0x86, 0x06, 0x0a, 0x48, + 0x43, 0x71, 0x10, 0xc4, 0x4c, 0x2b, 0x1e, 0x98, 0x85, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0xb9, 0x9e, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x36, 0x5e, 0x83, 0x51, 0x63, 0x3a, + 0x89, 0x0d, 0x1c, 0xee, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x83, 0x25, 0xe2, 0x0f, 0x02, + 0x02, 0x00, 0x00, } func (this *Supply) Equal(that interface{}) bool { diff --git a/x/upgrade/types/types.pb.go b/x/upgrade/types/types.pb.go index fc1055c4be92..c0cb0cf18de7 100644 --- a/x/upgrade/types/types.pb.go +++ b/x/upgrade/types/types.pb.go @@ -8,7 +8,6 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - golang_proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" @@ -18,7 +17,6 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen @@ -80,10 +78,6 @@ func (m *Plan) XXX_DiscardUnknown() { var xxx_messageInfo_Plan proto.InternalMessageInfo -func (*Plan) XXX_MessageName() string { - return "cosmos_sdk.x.upgrade.v1.Plan" -} - // SoftwareUpgradeProposal is a gov Content type for initiating a software upgrade type SoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -123,10 +117,6 @@ func (m *SoftwareUpgradeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo -func (*SoftwareUpgradeProposal) XXX_MessageName() string { - return "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal" -} - // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software upgrade type CancelSoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -165,50 +155,40 @@ func (m *CancelSoftwareUpgradeProposal) XXX_DiscardUnknown() { var xxx_messageInfo_CancelSoftwareUpgradeProposal proto.InternalMessageInfo -func (*CancelSoftwareUpgradeProposal) XXX_MessageName() string { - return "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal" -} func init() { proto.RegisterType((*Plan)(nil), "cosmos_sdk.x.upgrade.v1.Plan") - golang_proto.RegisterType((*Plan)(nil), "cosmos_sdk.x.upgrade.v1.Plan") proto.RegisterType((*SoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal") - golang_proto.RegisterType((*SoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal") proto.RegisterType((*CancelSoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal") - golang_proto.RegisterType((*CancelSoftwareUpgradeProposal)(nil), "cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal") } func init() { proto.RegisterFile("x/upgrade/types/types.proto", fileDescriptor_2a308fd9dd71aff8) } -func init() { - golang_proto.RegisterFile("x/upgrade/types/types.proto", fileDescriptor_2a308fd9dd71aff8) -} var fileDescriptor_2a308fd9dd71aff8 = []byte{ - // 386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbd, 0xae, 0xd3, 0x30, - 0x18, 0x8d, 0x69, 0xa8, 0xa8, 0xbb, 0x59, 0x88, 0x46, 0x45, 0x75, 0xa2, 0x0e, 0xa8, 0x03, 0x38, - 0xa2, 0x0c, 0x20, 0xc6, 0xf2, 0x02, 0x55, 0xf8, 0x19, 0x90, 0x50, 0xe5, 0x26, 0x6e, 0x62, 0x35, - 0x89, 0xad, 0xd8, 0x85, 0xf6, 0x05, 0x98, 0xfb, 0x08, 0x3c, 0x0a, 0x63, 0xc6, 0x8e, 0x9d, 0xe0, - 0xb6, 0x59, 0xee, 0x63, 0x5c, 0x25, 0x4e, 0x75, 0xaf, 0xae, 0x74, 0xb7, 0xbb, 0x24, 0xe7, 0xb3, - 0xce, 0x77, 0xbe, 0x73, 0x3e, 0x1b, 0xbe, 0xdc, 0xfa, 0x1b, 0x19, 0x17, 0x34, 0x62, 0xbe, 0xde, - 0x49, 0xa6, 0xcc, 0x97, 0xc8, 0x42, 0x68, 0x81, 0x06, 0xa1, 0x50, 0x99, 0x50, 0x0b, 0x15, 0xad, - 0xc9, 0x96, 0xb4, 0x3c, 0xf2, 0xf3, 0xed, 0xf0, 0x95, 0x4e, 0x78, 0x11, 0x2d, 0x24, 0x2d, 0xf4, - 0xce, 0x6f, 0xb8, 0x7e, 0x2c, 0x62, 0x71, 0x8b, 0x8c, 0xc0, 0xd0, 0x8d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f1, 0x84, 0xad, 0xf2, 0x8c, 0xc1, 0xe1, 0x8c, 0xc1, 0xd5, 0x19, 0x83, 0x7d, 0x85, 0xad, 0xbf, - 0x15, 0x06, 0x65, 0x85, 0xc1, 0xa1, 0xc2, 0xd6, 0xb1, 0xc2, 0xd6, 0xf7, 0xd7, 0x31, 0xd7, 0xc9, - 0x66, 0x49, 0x42, 0x91, 0xf9, 0x26, 0x43, 0xfb, 0x7b, 0xa3, 0xa2, 0xb5, 0x7f, 0xef, 0x01, 0x2d, - 0xbb, 0xcd, 0xfd, 0xbc, 0xbb, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x69, 0xe4, 0xa0, 0x5a, 0x02, - 0x00, 0x00, + // 379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x41, 0x6f, 0xda, 0x30, + 0x14, 0xc7, 0xe3, 0x91, 0xa1, 0x61, 0x6e, 0xd6, 0x34, 0x22, 0x26, 0x9c, 0x88, 0xc3, 0xc4, 0x61, + 0x73, 0x34, 0x76, 0xd8, 0xb4, 0x23, 0xbb, 0x4f, 0x28, 0x5b, 0x2f, 0x95, 0x2a, 0x64, 0x12, 0x93, + 0x58, 0x24, 0xb1, 0x15, 0x9b, 0x16, 0xbe, 0x40, 0xcf, 0x7c, 0x84, 0x7e, 0x1c, 0x8e, 0x1c, 0x39, + 0xb5, 0x05, 0x2e, 0xfd, 0x18, 0x55, 0xe2, 0xa0, 0x56, 0x95, 0x7a, 0xeb, 0x25, 0x79, 0xcf, 0xfa, + 0xbf, 0xff, 0xfb, 0xbd, 0x67, 0xc3, 0xcf, 0x4b, 0x7f, 0x21, 0xe3, 0x82, 0x46, 0xcc, 0xd7, 0x2b, + 0xc9, 0x94, 0xf9, 0x12, 0x59, 0x08, 0x2d, 0x50, 0x27, 0x14, 0x2a, 0x13, 0x6a, 0xa2, 0xa2, 0x39, + 0x59, 0x92,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0xd9, 0xe5, 0x08, 0x41, 0x55, 0x50, 0x23, 0x5d, 0xc0, + 0xde, 0x1f, 0x9a, 0x87, 0x2c, 0x7d, 0x63, 0x2e, 0x63, 0x3f, 0xfa, 0xbb, 0xd9, 0x63, 0x6b, 0xb7, + 0xc7, 0xd6, 0xe6, 0x80, 0xc1, 0xf6, 0x80, 0xc1, 0xfd, 0x01, 0x83, 0xf5, 0x11, 0x5b, 0xdb, 0x23, + 0xb6, 0x76, 0x47, 0x6c, 0x9d, 0x7f, 0x8d, 0xb9, 0x4e, 0x16, 0x53, 0x12, 0x8a, 0xcc, 0x37, 0xec, + 0xf5, 0xef, 0x9b, 0x8a, 0xe6, 0xfe, 0x8b, 0x87, 0x33, 0x6d, 0x56, 0xf7, 0xf2, 0xe3, 0x31, 0x00, + 0x00, 0xff, 0xff, 0x45, 0x05, 0x01, 0x90, 0x52, 0x02, 0x00, 0x00, } func (this *Plan) Equal(that interface{}) bool { From 74ee551252b904682922bdb0f404a418c7b557fa Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 15:26:39 -0400 Subject: [PATCH 23/41] Tidying up + docs --- baseapp/queryrouter.go | 4 ++++ types/context.go | 4 ++++ types/module/module.go | 6 ++++-- types/queryable.go | 4 ---- types/router.go | 3 ++- x/bank/alias.go | 1 - x/bank/module.go | 2 +- x/bank/types/key.go | 3 --- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index ef9886c96ca6..d70a58a41dd5 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -71,6 +71,10 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ } } +// QueryServiceTestHelper provides a helper for making grpc query service +// rpc calls in unit tests. It implements both the grpc Server and ClientConn +// interfaces needed to register a query service server and create a query +// service client. type QueryServiceTestHelper struct { *QueryRouter ctx sdk.Context diff --git a/types/context.go b/types/context.go index 64399251193c..b48fe2d5733c 100644 --- a/types/context.go +++ b/types/context.go @@ -226,6 +226,10 @@ func (c Context) CacheContext() (cc Context, writeCache func()) { return cc, cms.Write } +type sdkContextKeyType string + +const sdkContextKey sdkContextKeyType = "sdk-context" + // WrapSDKContext attaches a Context to that Context's context.Context member // and returns that context. It is useful for passing a Context through methods // that take a generic context.Context parameter such as generated gRPC diff --git a/types/module/module.go b/types/module/module.go index 87a7bf155c12..e837845b1014 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -30,6 +30,7 @@ package module import ( "encoding/json" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" @@ -142,10 +143,11 @@ type AppModule interface { // routes Route() string NewHandler() sdk.Handler - // TODO: deprecate in favor of RegisterQueryService + // Deprecated: use RegisterQueryService QuerierRoute() string - // TODO: deprecate in favor of RegisterQueryService + // Deprecated: use RegisterQueryService NewQuerierHandler() sdk.Querier + // RegisterQueryService allows a module to register a query service grpc RegisterQueryService(grpc.Server) // ABCI diff --git a/types/queryable.go b/types/queryable.go index 24dc501b2862..f89965906af8 100644 --- a/types/queryable.go +++ b/types/queryable.go @@ -7,7 +7,3 @@ import ( // Querier defines a function type that a module querier must implement to handle // custom client queries. type Querier = func(ctx Context, path []string, req abci.RequestQuery) ([]byte, error) - -type sdkContextKeyType string - -const sdkContextKey sdkContextKeyType = "sdk-context" diff --git a/types/router.go b/types/router.go index fb5ab055a9d7..2d43b6d5e563 100644 --- a/types/router.go +++ b/types/router.go @@ -38,5 +38,6 @@ type Router interface { type QueryRouter interface { AddRoute(r string, h Querier) QueryRouter Route(path string) Querier - RegisterService(sd *grpc.ServiceDesc, ss interface{}) + // RegisterService registers a querier which implements the provide grpc service description + RegisterService(sd *grpc.ServiceDesc, querier interface{}) } diff --git a/x/bank/alias.go b/x/bank/alias.go index 4beda41c5d9b..512f82ae4c69 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -11,7 +11,6 @@ const ( QueryBalance = types.QueryBalance QueryAllBalances = types.QueryAllBalances ModuleName = types.ModuleName - QuerierRoute = types.QuerierRoute RouterKey = types.RouterKey StoreKey = types.StoreKey DefaultParamspace = types.DefaultParamspace diff --git a/x/bank/module.go b/x/bank/module.go index 73d320d9f709..b0415b1b8356 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -107,7 +107,7 @@ func (AppModule) Route() string { return RouterKey } func (am AppModule) NewHandler() sdk.Handler { return NewHandler(am.keeper) } // QuerierRoute returns the bank module's querier route name. -func (AppModule) QuerierRoute() string { return QuerierRoute } +func (AppModule) QuerierRoute() string { return RouterKey } // NewQuerierHandler returns the bank module sdk.Querier. func (am AppModule) NewQuerierHandler() sdk.Querier { diff --git a/x/bank/types/key.go b/x/bank/types/key.go index dcb106553478..cb893e0f86b4 100644 --- a/x/bank/types/key.go +++ b/x/bank/types/key.go @@ -15,9 +15,6 @@ const ( // RouterKey defines the module's message routing key RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName ) // KVStore key prefixes From fa9aa951cbf5c864a298de6ca02c4403a8ae303b Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 15:39:43 -0400 Subject: [PATCH 24/41] Revert deletion --- x/bank/alias.go | 1 + x/bank/types/key.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/x/bank/alias.go b/x/bank/alias.go index 512f82ae4c69..4beda41c5d9b 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -11,6 +11,7 @@ const ( QueryBalance = types.QueryBalance QueryAllBalances = types.QueryAllBalances ModuleName = types.ModuleName + QuerierRoute = types.QuerierRoute RouterKey = types.RouterKey StoreKey = types.StoreKey DefaultParamspace = types.DefaultParamspace diff --git a/x/bank/types/key.go b/x/bank/types/key.go index cb893e0f86b4..dcb106553478 100644 --- a/x/bank/types/key.go +++ b/x/bank/types/key.go @@ -15,6 +15,9 @@ const ( // RouterKey defines the module's message routing key RouterKey = ModuleName + + // QuerierRoute defines the module's query routing key + QuerierRoute = ModuleName ) // KVStore key prefixes From 1351a684716a098c95f21d4169057f2ed67c7d44 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 15:57:03 -0400 Subject: [PATCH 25/41] Add Marshaler param to new cli cmd --- x/bank/client/cli/query.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index 99fb87b8c5a5..b028a30f98ef 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -20,7 +20,7 @@ const ( ) // NewQueryCmd returns a root CLI command handler for all x/bank query commands. -func NewQueryCmd() *cobra.Command { +func NewQueryCmd(cdc codec.Marshaler) *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: "Querying commands for the bank module", @@ -29,19 +29,19 @@ func NewQueryCmd() *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(NewBalancesCmd()) + cmd.AddCommand(NewBalancesCmd(cdc)) return cmd } // NewBalancesCmd returns a CLI command handler for querying account balance(s). -func NewBalancesCmd() *cobra.Command { +func NewBalancesCmd(cdc codec.Marshaler) *cobra.Command { cmd := &cobra.Command{ Use: "balances [address]", Short: "Query for account balance(s) by address", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - cliCtx := context.NewCLIContext() + cliCtx := context.NewCLIContext().WithMarshaler(cdc) addr, err := sdk.AccAddressFromBech32(args[0]) if err != nil { From 64c2b99450fc50026ad0f5b98f55b70a61982c97 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 16:25:34 -0400 Subject: [PATCH 26/41] Revert name change --- x/bank/client/cli/query.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index b028a30f98ef..a87d7cc470cb 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -20,7 +20,7 @@ const ( ) // NewQueryCmd returns a root CLI command handler for all x/bank query commands. -func NewQueryCmd(cdc codec.Marshaler) *cobra.Command { +func NewQueryCmd(m codec.Marshaler) *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: "Querying commands for the bank module", @@ -29,19 +29,19 @@ func NewQueryCmd(cdc codec.Marshaler) *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(NewBalancesCmd(cdc)) + cmd.AddCommand(NewBalancesCmd(m)) return cmd } // NewBalancesCmd returns a CLI command handler for querying account balance(s). -func NewBalancesCmd(cdc codec.Marshaler) *cobra.Command { +func NewBalancesCmd(m codec.Marshaler) *cobra.Command { cmd := &cobra.Command{ Use: "balances [address]", Short: "Query for account balance(s) by address", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - cliCtx := context.NewCLIContext().WithMarshaler(cdc) + cliCtx := context.NewCLIContext().WithMarshaler(m) addr, err := sdk.AccAddressFromBech32(args[0]) if err != nil { From 608facdaec7ff20c4127bcac67a999af5d53014a Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 16:52:39 -0400 Subject: [PATCH 27/41] Add grpc QueryRouter tests --- baseapp/queryrouter_test.go | 34 +++ buf.yaml | 1 + codec/testdata/proto.pb.go | 449 +++++++++++++++++++++++++++++++++++- codec/testdata/proto.proto | 11 + 4 files changed, 488 insertions(+), 7 deletions(-) diff --git a/baseapp/queryrouter_test.go b/baseapp/queryrouter_test.go index c7637f17000e..a1633118b310 100644 --- a/baseapp/queryrouter_test.go +++ b/baseapp/queryrouter_test.go @@ -1,8 +1,12 @@ package baseapp import ( + "context" + "fmt" "testing" + "github.com/cosmos/cosmos-sdk/codec/testdata" + "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -31,3 +35,33 @@ func TestQueryRouter(t *testing.T) { qr.AddRoute("testRoute", testQuerier) }) } + +type echoer struct{} + +func (e echoer) Echo(_ context.Context, req *testdata.EchoRequest) (*testdata.EchoResponse, error) { + if req == nil { + return nil, fmt.Errorf("empty request") + } + return &testdata.EchoResponse{Message: req.Message}, nil +} + +var _ testdata.EchoServiceServer = echoer{} + +func TestRegisterQueryService(t *testing.T) { + qr := NewQueryRouter() + testdata.RegisterEchoServiceServer(qr, echoer{}) + helper := &QueryServiceTestHelper{ + QueryRouter: qr, + ctx: sdk.Context{}, + } + client := testdata.NewEchoServiceClient(helper) + + res, err := client.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) + require.Nil(t, err) + require.NotNil(t, res) + require.Equal(t, "hello", res.Message) + + res, err = client.Echo(context.Background(), nil) + require.NotNil(t, err) + +} diff --git a/buf.yaml b/buf.yaml index a0b081889b21..e184f300ef29 100644 --- a/buf.yaml +++ b/buf.yaml @@ -18,3 +18,4 @@ breaking: - FILE ignore: - third_party + - codec/testdata diff --git a/codec/testdata/proto.pb.go b/codec/testdata/proto.pb.go index d92daf3ec229..3c33ac1c3140 100644 --- a/codec/testdata/proto.pb.go +++ b/codec/testdata/proto.pb.go @@ -4,8 +4,13 @@ package testdata import ( + context "context" fmt "fmt" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" @@ -126,15 +131,105 @@ func (m *Cat) GetLives() int32 { return 0 } +type EchoRequest struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoRequest) Reset() { *m = EchoRequest{} } +func (m *EchoRequest) String() string { return proto.CompactTextString(m) } +func (*EchoRequest) ProtoMessage() {} +func (*EchoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{2} +} +func (m *EchoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoRequest.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 *EchoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoRequest.Merge(m, src) +} +func (m *EchoRequest) XXX_Size() int { + return m.Size() +} +func (m *EchoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EchoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoRequest proto.InternalMessageInfo + +func (m *EchoRequest) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +type EchoResponse struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoResponse) Reset() { *m = EchoResponse{} } +func (m *EchoResponse) String() string { return proto.CompactTextString(m) } +func (*EchoResponse) ProtoMessage() {} +func (*EchoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{3} +} +func (m *EchoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoResponse.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 *EchoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoResponse.Merge(m, src) +} +func (m *EchoResponse) XXX_Size() int { + return m.Size() +} +func (m *EchoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EchoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoResponse proto.InternalMessageInfo + +func (m *EchoResponse) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + func init() { proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") + proto.RegisterType((*EchoRequest)(nil), "cosmos_sdk.codec.v1.EchoRequest") + proto.RegisterType((*EchoResponse)(nil), "cosmos_sdk.codec.v1.EchoResponse") } func init() { proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } var fileDescriptor_ae1353846770e6e2 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto + // 268 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x4f, 0x49, 0x4d, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xc2, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, @@ -142,12 +237,96 @@ var fileDescriptor_ae1353846770e6e2 = []byte{ 0xc5, 0x99, 0x55, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0x36, 0x48, 0x2c, 0x2f, 0x31, 0x37, 0x55, 0x82, 0x09, 0x22, 0x06, 0x62, 0x2b, 0x99, 0x72, 0x31, 0x3b, 0x27, 0x96, 0x08, 0x49, 0x70, 0xb1, 0xe7, 0xe6, 0xe7, 0x65, 0x66, 0xa7, 0x16, 0x41, 0x75, 0xc0, 0xb8, 0x42, 0x22, - 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x93, 0xeb, 0x89, - 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, - 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, - 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xdc, 0x07, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x51, 0x7d, - 0x93, 0xc4, 0x06, 0xf6, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x64, 0x25, 0x07, 0xc7, 0xe6, - 0x00, 0x00, 0x00, + 0x5c, 0xac, 0x39, 0x99, 0x65, 0xa9, 0xc5, 0x60, 0x5d, 0xac, 0x41, 0x10, 0x8e, 0x92, 0x3a, 0x17, + 0xb7, 0x6b, 0x72, 0x46, 0x7e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x31, 0x44, 0x7b, 0x6a, 0x71, 0x71, + 0x62, 0x7a, 0x2a, 0x5c, 0x3b, 0x84, 0xab, 0xa4, 0xc1, 0xc5, 0x03, 0x51, 0x58, 0x5c, 0x90, 0x9f, + 0x57, 0x9c, 0x8a, 0x5b, 0xa5, 0x51, 0x14, 0xc4, 0xc8, 0xe0, 0xd4, 0xa2, 0xb2, 0xcc, 0xe4, 0x54, + 0x21, 0x6f, 0x2e, 0x16, 0x10, 0x57, 0x48, 0x41, 0x0f, 0x8b, 0x2f, 0xf5, 0x90, 0x2c, 0x97, 0x52, + 0xc4, 0xa3, 0x02, 0x62, 0xab, 0x93, 0xeb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, + 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, + 0x44, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x8c, 0x81, + 0x52, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0xa8, 0x81, 0x9f, 0xc4, 0x06, 0x0e, 0x77, 0x63, 0x40, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xed, 0x32, 0x05, 0xe3, 0x95, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// EchoServiceClient is the client API for EchoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EchoServiceClient interface { + Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) +} + +type echoServiceClient struct { + cc grpc1.ClientConn +} + +func NewEchoServiceClient(cc grpc1.ClientConn) EchoServiceClient { + return &echoServiceClient{cc} +} + +func (c *echoServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { + out := new(EchoResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.codec.v1.EchoService/Echo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EchoServiceServer is the server API for EchoService service. +type EchoServiceServer interface { + Echo(context.Context, *EchoRequest) (*EchoResponse, error) +} + +// UnimplementedEchoServiceServer can be embedded to have forward compatible implementations. +type UnimplementedEchoServiceServer struct { +} + +func (*UnimplementedEchoServiceServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") +} + +func RegisterEchoServiceServer(s grpc1.Server, srv EchoServiceServer) { + s.RegisterService(&_EchoService_serviceDesc, srv) +} + +func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EchoServiceServer).Echo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.codec.v1.EchoService/Echo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EchoServiceServer).Echo(ctx, req.(*EchoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _EchoService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.codec.v1.EchoService", + HandlerType: (*EchoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Echo", + Handler: _EchoService_Echo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "codec/testdata/proto.proto", } func (m *Dog) Marshal() (dAtA []byte, err error) { @@ -222,6 +401,66 @@ func (m *Cat) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EchoRequest) 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 *EchoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EchoResponse) 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 *EchoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintProto(dAtA []byte, offset int, v uint64) int { offset -= sovProto(v) base := offset @@ -266,6 +505,32 @@ func (m *Cat) Size() (n int) { return n } +func (m *EchoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + +func (m *EchoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + func sovProto(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -493,6 +758,176 @@ func (m *Cat) Unmarshal(dAtA []byte) error { } return nil } +func (m *EchoRequest) 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 ErrIntOverflowProto + } + 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: EchoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EchoResponse) 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 ErrIntOverflowProto + } + 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: EchoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipProto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/codec/testdata/proto.proto b/codec/testdata/proto.proto index ed8c0418dbce..e4a1af9b3171 100644 --- a/codec/testdata/proto.proto +++ b/codec/testdata/proto.proto @@ -12,3 +12,14 @@ message Cat { string moniker = 1; int32 lives = 2; } + +service EchoService { + rpc Echo(EchoRequest) returns (EchoResponse); +} + +message EchoRequest { + string message = 1; +} +message EchoResponse { + string message = 1; +} From 2718e03ea2e54a15a0b933d52802288d8e18b8df Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 16:57:21 -0400 Subject: [PATCH 28/41] Fix lint error --- baseapp/queryrouter_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baseapp/queryrouter_test.go b/baseapp/queryrouter_test.go index a1633118b310..86cd605c7fac 100644 --- a/baseapp/queryrouter_test.go +++ b/baseapp/queryrouter_test.go @@ -61,7 +61,7 @@ func TestRegisterQueryService(t *testing.T) { require.NotNil(t, res) require.Equal(t, "hello", res.Message) - res, err = client.Echo(context.Background(), nil) + _, err = client.Echo(context.Background(), nil) require.NotNil(t, err) } From 1cb6c6185d73520f3a5056d38b5b188ecab3ef31 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 16 Apr 2020 17:22:38 -0400 Subject: [PATCH 29/41] Fix tests --- baseapp/queryrouter_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/baseapp/queryrouter_test.go b/baseapp/queryrouter_test.go index 86cd605c7fac..90448532c61f 100644 --- a/baseapp/queryrouter_test.go +++ b/baseapp/queryrouter_test.go @@ -2,7 +2,6 @@ package baseapp import ( "context" - "fmt" "testing" "github.com/cosmos/cosmos-sdk/codec/testdata" @@ -39,9 +38,6 @@ func TestQueryRouter(t *testing.T) { type echoer struct{} func (e echoer) Echo(_ context.Context, req *testdata.EchoRequest) (*testdata.EchoResponse, error) { - if req == nil { - return nil, fmt.Errorf("empty request") - } return &testdata.EchoResponse{Message: req.Message}, nil } @@ -61,7 +57,7 @@ func TestRegisterQueryService(t *testing.T) { require.NotNil(t, res) require.Equal(t, "hello", res.Message) - _, err = client.Echo(context.Background(), nil) - require.NotNil(t, err) - + require.Panics(t, func() { + _, _ = client.Echo(context.Background(), nil) + }) } From b905be0db9000866f56aab5fcfa448f93a860f4b Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 17 Apr 2020 12:35:41 -0400 Subject: [PATCH 30/41] Address review comments --- baseapp/queryrouter.go | 6 +++++- client/context/query.go | 6 +++++- go.sum | 9 --------- x/bank/client/cli/query.go | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index d70a58a41dd5..7cb70448a6ef 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -80,11 +80,14 @@ type QueryServiceTestHelper struct { ctx sdk.Context } +// NewQueryServerTestHelper creates a new QueryServiceTestHelper that wraps +// the provided sdk.Context func NewQueryServerTestHelper(ctx sdk.Context) *QueryServiceTestHelper { return &QueryServiceTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} } -func (q *QueryServiceTestHelper) Invoke(ctx gocontext.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { +// Invoke implements the grpc ClientConn.Invoke method +func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { path := strings.Split(method, "/") if len(path) != 3 { return fmt.Errorf("unexpected method name %s", method) @@ -104,6 +107,7 @@ func (q *QueryServiceTestHelper) Invoke(ctx gocontext.Context, method string, ar return protoCodec.Unmarshal(resBz, reply) } +// NewStream implements the grpc ClientConn.NewStream method func (q *QueryServiceTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("not supported") } diff --git a/client/context/query.go b/client/context/query.go index 8b6c2cf41548..3c93945e4c54 100644 --- a/client/context/query.go +++ b/client/context/query.go @@ -235,6 +235,8 @@ func parseQueryStorePath(path string) (storeName string, err error) { return paths[1], nil } +// QueryConn returns a new grpc ClientConn for making grpc query calls that +// get routed to the node's ABCI query handler func (ctx CLIContext) QueryConn() gogogrpc.ClientConn { return cliQueryConn{ctx} } @@ -247,7 +249,8 @@ var _ gogogrpc.ClientConn = cliQueryConn{} var protoCodec = encoding.GetCodec(proto.Name) -func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error { +// Invoke implements the grpc ClientConn.Invoke method +func (c cliQueryConn) Invoke(_ context.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { reqBz, err := protoCodec.Marshal(args) if err != nil { return err @@ -259,6 +262,7 @@ func (c cliQueryConn) Invoke(ctx context.Context, method string, args, reply int return protoCodec.Unmarshal(resBz, reply) } +// NewStream implements the grpc ClientConn.NewStream method func (c cliQueryConn) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("streaming rpc not supported") } diff --git a/go.sum b/go.sum index 3e67ea37457c..4bd659bf369e 100644 --- a/go.sum +++ b/go.sum @@ -143,7 +143,6 @@ github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgj github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= @@ -360,8 +359,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhD github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.2.2 h1:qAuQxio6lmZ3ghpeSMrhqT+Xq/FkuimzWD8o0YR9Gmo= github.com/regen-network/cosmos-proto v0.2.2/go.mod h1:4jLYG3Qk6EtkOj3/FK7ziS5+LurpGPzJ41ungpzThcw= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE= github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -498,8 +495,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -526,7 +521,6 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -568,8 +562,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -590,7 +582,6 @@ google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLY google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.20.1/go.mod h1:KqelGeouBkcbcuB3HCk4/YH2tmNLk6YSWA5LIWeI/lY= google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index a87d7cc470cb..bd3e7f8b77c4 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -51,8 +51,8 @@ func NewBalancesCmd(m codec.Marshaler) *cobra.Command { queryClient := types.NewQueryServiceClient(cliCtx.QueryConn()) denom := viper.GetString(flagDenom) if denom == "" { - params := types.NewQueryAllBalancesRequest(addr) - result, err := queryClient.QueryAllBalances(gocontext.Background(), params) + request := types.NewQueryAllBalancesRequest(addr) + result, err := queryClient.QueryAllBalances(gocontext.Background(), request) if err != nil { return err } From 6a293e30fa037aa5fd583c9a75e5cc5894d787b4 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 17 Apr 2020 12:38:01 -0400 Subject: [PATCH 31/41] Address review comments --- baseapp/queryrouter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index 7cb70448a6ef..d8905f82ffa6 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -50,6 +50,7 @@ func (qrt *QueryRouter) Route(path string) sdk.Querier { return qrt.routes[path] } +// RegisterService implements the grpc Server.RegisterService method func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // adds a top-level querier based on the GRPC service name qrt.routes[sd.ServiceName] = From 17c318ad54d031808377398f3521d3740d865463 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 17 Apr 2020 12:38:53 -0400 Subject: [PATCH 32/41] Update baseapp/queryrouter.go Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- baseapp/queryrouter.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index d8905f82ffa6..ae22845c9d3a 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -58,15 +58,17 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ path0 := path[0] for _, md := range sd.Methods { // checks each GRPC service method to see if it matches the path - if md.MethodName == path0 { - res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { - return protoCodec.Unmarshal(req.Data, i) - }, nil) - if err != nil { - return nil, err - } - return protoCodec.Marshal(res) + if md.MethodName != path0 { + continue } + res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { + return protoCodec.Unmarshal(req.Data, i) + }, nil) + if err != nil { + return nil, err + } + return protoCodec.Marshal(res) + } } return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) } From 6f589045dd3bdd77d15dc680aeba7751454df886 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 17 Apr 2020 12:39:08 -0400 Subject: [PATCH 33/41] Update baseapp/queryrouter.go Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- baseapp/queryrouter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index ae22845c9d3a..3fc6067d21a8 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -97,7 +97,7 @@ func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args } querier := q.Route(path[1]) if querier == nil { - return fmt.Errorf("handler not found for %s", path[2]) + return fmt.Errorf("handler not found for %s", path[1]) } reqBz, err := protoCodec.Marshal(args) if err != nil { From 64f3b3121ba31b652ab7b62faa240b44cfc6a822 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 17 Apr 2020 12:41:24 -0400 Subject: [PATCH 34/41] Fix build error --- baseapp/queryrouter.go | 1 - go.mod | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index 3fc6067d21a8..8cb8cb1213b4 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -69,7 +69,6 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ } return protoCodec.Marshal(res) } - } return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) } } diff --git a/go.mod b/go.mod index 7cce3cf0771a..f080705c8352 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/gorilla/mux v1.7.4 github.com/hashicorp/golang-lru v0.5.4 github.com/mattn/go-isatty v0.0.12 + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/otiai10/copy v1.1.1 github.com/pelletier/go-toml v1.7.0 github.com/pkg/errors v0.9.1 From 0911f55b86c460d26804f1a2c174c64ed04516b2 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 6 May 2020 17:35:04 -0400 Subject: [PATCH 35/41] fix build errors --- codec/testdata/proto.pb.go | 475 ++++++++++++++- go.mod | 3 +- go.sum | 12 +- x/bank/types/types.pb.go | 1179 ++++++++++++++++++++++++++++++++---- x/mint/module.go | 2 - 5 files changed, 1506 insertions(+), 165 deletions(-) diff --git a/codec/testdata/proto.pb.go b/codec/testdata/proto.pb.go index 8250f11e4001..530255d0d110 100644 --- a/codec/testdata/proto.pb.go +++ b/codec/testdata/proto.pb.go @@ -4,9 +4,14 @@ package testdata import ( + context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" @@ -267,37 +272,211 @@ func (m *HasHasHasAnimal) GetHasHasAnimal() *types.Any { return nil } +type EchoRequest struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoRequest) Reset() { *m = EchoRequest{} } +func (m *EchoRequest) String() string { return proto.CompactTextString(m) } +func (*EchoRequest) ProtoMessage() {} +func (*EchoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{5} +} +func (m *EchoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoRequest.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 *EchoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoRequest.Merge(m, src) +} +func (m *EchoRequest) XXX_Size() int { + return m.Size() +} +func (m *EchoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EchoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoRequest proto.InternalMessageInfo + +func (m *EchoRequest) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +type EchoResponse struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoResponse) Reset() { *m = EchoResponse{} } +func (m *EchoResponse) String() string { return proto.CompactTextString(m) } +func (*EchoResponse) ProtoMessage() {} +func (*EchoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{6} +} +func (m *EchoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoResponse.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 *EchoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoResponse.Merge(m, src) +} +func (m *EchoResponse) XXX_Size() int { + return m.Size() +} +func (m *EchoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EchoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoResponse proto.InternalMessageInfo + +func (m *EchoResponse) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + func init() { proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") proto.RegisterType((*HasAnimal)(nil), "cosmos_sdk.codec.v1.HasAnimal") proto.RegisterType((*HasHasAnimal)(nil), "cosmos_sdk.codec.v1.HasHasAnimal") proto.RegisterType((*HasHasHasAnimal)(nil), "cosmos_sdk.codec.v1.HasHasHasAnimal") + proto.RegisterType((*EchoRequest)(nil), "cosmos_sdk.codec.v1.EchoRequest") + proto.RegisterType((*EchoResponse)(nil), "cosmos_sdk.codec.v1.EchoResponse") } func init() { proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } var fileDescriptor_ae1353846770e6e2 = []byte{ - // 304 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x4e, 0xc3, 0x30, - 0x10, 0xc6, 0x6b, 0x4a, 0x8b, 0x7a, 0x54, 0x20, 0x99, 0x0e, 0xa1, 0x83, 0x85, 0x32, 0x21, 0x41, - 0x1d, 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0x7f, 0xc6, 0xe4, 0x8e, 0x35, 0x06, 0x88, 0x98, 0x9c, - 0xef, 0xc1, 0xeb, 0x45, 0x4d, 0xc8, 0x7e, 0x81, 0x53, 0x03, 0xd9, 0x71, 0xee, 0xe1, 0xa4, 0xe2, - 0xec, 0xc9, 0xea, 0x47, 0x7f, 0xb2, 0x0f, 0x4f, 0x5f, 0x05, 0x41, 0xdb, 0x82, 0xa0, 0x9f, 0x82, - 0xa0, 0xcf, 0x92, 0xb4, 0xb6, 0x25, 0x69, 0x7d, 0x97, 0xa4, 0xf5, 0x7a, 0x15, 0xc6, 0x2a, 0x5a, - 0x7a, 0xd4, 0x17, 0x99, 0x63, 0xee, 0x52, 0x7f, 0x23, 0x19, 0x24, 0xce, 0xff, 0x2b, 0x7a, 0x5d, - 0x3d, 0x62, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x65, 0xc6, 0xd8, 0xe9, 0xde, 0x01, 0x00, 0x00, + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4e, 0xc2, 0x40, + 0x10, 0xc6, 0xa9, 0xfc, 0x31, 0x0c, 0x8d, 0x26, 0x2b, 0x07, 0xe4, 0xd0, 0x60, 0x2f, 0x92, 0x28, + 0xdb, 0x08, 0xf1, 0xe2, 0x0d, 0x91, 0x48, 0x62, 0xbc, 0xd4, 0x1b, 0x17, 0xb2, 0xb4, 0x6b, 0xdb, + 0x40, 0xbb, 0xc8, 0x14, 0x02, 0x3e, 0x85, 0x8f, 0xe5, 0x91, 0xa3, 0x47, 0x03, 0x2f, 0x62, 0xba, + 0x0b, 0x82, 0x89, 0x1a, 0x2e, 0xed, 0x7c, 0x93, 0xef, 0xfb, 0xcd, 0x64, 0x5a, 0x28, 0x3b, 0xc2, + 0xe5, 0x8e, 0x15, 0x73, 0x8c, 0x5d, 0x16, 0x33, 0x6b, 0x34, 0x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91, 0x88, 0x90, 0xff, 0xed, 0xac, 0x77, 0x15, 0xf2, 0x89, 0x8f, 0xa7, 0x81, 0xc3, 0xc9, + 0x03, 0x64, 0x12, 0x49, 0x2a, 0xf4, 0x97, 0xaf, 0x4b, 0x77, 0x86, 0x97, 0xcf, 0xfe, 0x71, 0xa8, + 0xa9, 0xb7, 0xed, 0xf7, 0xa5, 0xa1, 0x2d, 0x96, 0x86, 0xf6, 0xb9, 0x34, 0xb4, 0xb7, 0x95, 0x91, + 0x5a, 0xac, 0x8c, 0xd4, 0xc7, 0xca, 0x48, 0x75, 0x2f, 0xbc, 0x20, 0xf6, 0x27, 0x7d, 0xea, 0x88, + 0xd0, 0x52, 0x98, 0xf5, 0xab, 0x86, 0xee, 0xc0, 0xfa, 0xf9, 0xd3, 0xf5, 0x73, 0xf2, 0x22, 0x8d, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xdc, 0x8d, 0x87, 0x8d, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// EchoServiceClient is the client API for EchoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EchoServiceClient interface { + Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) +} + +type echoServiceClient struct { + cc grpc1.ClientConn +} + +func NewEchoServiceClient(cc grpc1.ClientConn) EchoServiceClient { + return &echoServiceClient{cc} +} + +func (c *echoServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { + out := new(EchoResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.codec.v1.EchoService/Echo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EchoServiceServer is the server API for EchoService service. +type EchoServiceServer interface { + Echo(context.Context, *EchoRequest) (*EchoResponse, error) +} + +// UnimplementedEchoServiceServer can be embedded to have forward compatible implementations. +type UnimplementedEchoServiceServer struct { +} + +func (*UnimplementedEchoServiceServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") +} + +func RegisterEchoServiceServer(s grpc1.Server, srv EchoServiceServer) { + s.RegisterService(&_EchoService_serviceDesc, srv) +} + +func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EchoServiceServer).Echo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.codec.v1.EchoService/Echo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EchoServiceServer).Echo(ctx, req.(*EchoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _EchoService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.codec.v1.EchoService", + HandlerType: (*EchoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Echo", + Handler: _EchoService_Echo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "codec/testdata/proto.proto", } func (m *Dog) Marshal() (dAtA []byte, err error) { @@ -482,6 +661,66 @@ func (m *HasHasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EchoRequest) 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 *EchoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EchoResponse) 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 *EchoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintProto(dAtA []byte, offset int, v uint64) int { offset -= sovProto(v) base := offset @@ -568,6 +807,32 @@ func (m *HasHasHasAnimal) Size() (n int) { return n } +func (m *EchoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + +func (m *EchoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + func sovProto(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1081,6 +1346,176 @@ func (m *HasHasHasAnimal) Unmarshal(dAtA []byte) error { } return nil } +func (m *EchoRequest) 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 ErrIntOverflowProto + } + 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: EchoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EchoResponse) 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 ErrIntOverflowProto + } + 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: EchoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipProto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/go.mod b/go.mod index 70a7a03827c5..0d7c547f7bcb 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/gorilla/mux v1.7.4 github.com/hashicorp/golang-lru v0.5.4 github.com/mattn/go-isatty v0.0.12 - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/otiai10/copy v1.1.1 github.com/pelletier/go-toml v1.7.0 github.com/pkg/errors v0.9.1 @@ -33,7 +32,7 @@ require ( github.com/tendermint/tendermint v0.33.4 github.com/tendermint/tm-db v0.5.1 google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 - google.golang.org/grpc v1.28.0 + google.golang.org/grpc v1.28.1 gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index 1ae3080db590..462ed67cd10f 100644 --- a/go.sum +++ b/go.sum @@ -379,8 +379,8 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.0 h1:24dVpPrPi0GDoPVLesf2Ug98iK5QgVscPl0ga4Eoub0= github.com/regen-network/cosmos-proto v0.3.0/go.mod h1:zuP2jVPHab6+IIyOx3nXHFN+euFNeS3W8XQkcdd4s7A= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -518,8 +518,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -546,7 +544,6 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -588,8 +585,8 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -600,6 +597,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= diff --git a/x/bank/types/types.pb.go b/x/bank/types/types.pb.go index 62a7f1df2ceb..a9cd170ade64 100644 --- a/x/bank/types/types.pb.go +++ b/x/bank/types/types.pb.go @@ -5,11 +5,17 @@ package types import ( bytes "bytes" + context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/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" io "io" math "math" math_bits "math/bits" @@ -284,47 +290,252 @@ func (m *Supply) XXX_DiscardUnknown() { var xxx_messageInfo_Supply proto.InternalMessageInfo +// QueryBalanceParams defines the params for querying an account balance. +type QueryBalanceRequest struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } +func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceRequest) ProtoMessage() {} +func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{5} +} +func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceRequest.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 *QueryBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceRequest.Merge(m, src) +} +func (m *QueryBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo + +func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *QueryBalanceRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryBalanceResponse is the response for the QueryBalance rpc method +type QueryBalanceResponse struct { + Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{6} +} +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() *types.Coin { + if m != nil { + return m.Balance + } + return nil +} + +// QueryAllBalancesParams defines the params for querying all account balances +type QueryAllBalancesRequest struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` +} + +func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} } +func (m *QueryAllBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesRequest) ProtoMessage() {} +func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{7} +} +func (m *QueryAllBalancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesRequest.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 *QueryAllBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesRequest.Merge(m, src) +} +func (m *QueryAllBalancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo + +func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method +type QueryAllBalancesResponse struct { + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` +} + +func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } +func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesResponse) ProtoMessage() {} +func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_934ff6b24d3432e2, []int{8} +} +func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) +} +func (m *QueryAllBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo + +func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + func init() { proto.RegisterType((*MsgSend)(nil), "cosmos_sdk.x.bank.v1.MsgSend") proto.RegisterType((*Input)(nil), "cosmos_sdk.x.bank.v1.Input") proto.RegisterType((*Output)(nil), "cosmos_sdk.x.bank.v1.Output") proto.RegisterType((*MsgMultiSend)(nil), "cosmos_sdk.x.bank.v1.MsgMultiSend") proto.RegisterType((*Supply)(nil), "cosmos_sdk.x.bank.v1.Supply") + proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") + proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") + proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") + proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") } func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) } var fileDescriptor_934ff6b24d3432e2 = []byte{ - // 449 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xa8, 0xd0, 0x4f, 0x4a, - 0xcc, 0xcb, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, - 0x42, 0x22, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, 0x20, - 0x45, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, 0x45, 0x25, - 0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x20, 0x86, - 0x81, 0x4a, 0x87, 0x98, 0xb8, 0xd8, 0x7d, 0x8b, 0xd3, 0x83, 0x53, 0xf3, 0x52, 0x84, 0xb2, 0xb9, - 0x78, 0xd2, 0x8a, 0xf2, 0x73, 0xe3, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, - 0x18, 0x35, 0x78, 0x9c, 0x3c, 0x3e, 0xdd, 0x93, 0x17, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, - 0x96, 0x55, 0xfa, 0x75, 0x4f, 0x5e, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, - 0x57, 0x1f, 0xe2, 0x30, 0x28, 0xa5, 0x5b, 0x9c, 0x02, 0x75, 0xbd, 0x9e, 0x63, 0x72, 0xb2, 0x23, - 0x44, 0x47, 0x10, 0x37, 0x48, 0x3f, 0x94, 0x23, 0x94, 0xca, 0xc5, 0x55, 0x92, 0x0f, 0xb7, 0x8a, - 0x09, 0x6c, 0x95, 0xdb, 0xa7, 0x7b, 0xf2, 0x82, 0x10, 0xab, 0x10, 0x72, 0x64, 0x58, 0xc4, 0x59, - 0x92, 0x0f, 0xb3, 0x26, 0x96, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x59, 0x81, - 0x59, 0x83, 0xdb, 0x48, 0x58, 0x0f, 0x29, 0x04, 0xcb, 0x0c, 0xf5, 0x9c, 0xf3, 0x33, 0xf3, 0x9c, - 0x0c, 0x4e, 0xdc, 0x93, 0x67, 0x58, 0x75, 0x5f, 0x5e, 0x83, 0x08, 0x6b, 0x40, 0x1a, 0x8a, 0x83, - 0xa0, 0x86, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xa8, 0xb4, 0x9d, 0x91, 0x8b, 0xd5, 0x33, 0xaf, - 0xa0, 0xb4, 0x44, 0xc8, 0x9b, 0x8b, 0x1d, 0x35, 0xf4, 0x0c, 0x49, 0x77, 0x3d, 0xcc, 0x04, 0xa1, - 0x68, 0x2e, 0xd6, 0x64, 0x90, 0x6d, 0x12, 0x4c, 0xd4, 0x74, 0x3a, 0xc4, 0x4c, 0xa8, 0xcb, 0x77, - 0x30, 0x72, 0xb1, 0xf9, 0x97, 0x96, 0x0c, 0x45, 0xa7, 0xf7, 0x32, 0x72, 0xf1, 0xf8, 0x16, 0xa7, - 0xfb, 0x96, 0xe6, 0x94, 0x64, 0x82, 0x93, 0xaf, 0x25, 0x17, 0x5b, 0x26, 0x28, 0x12, 0x40, 0xee, - 0x07, 0x59, 0x2a, 0xad, 0x87, 0x2d, 0xb3, 0xe8, 0x81, 0x23, 0xca, 0x89, 0x05, 0x64, 0x79, 0x10, - 0x54, 0x83, 0x90, 0x0d, 0x17, 0x7b, 0x3e, 0x38, 0x14, 0x60, 0x0e, 0x96, 0xc1, 0xae, 0x17, 0x12, - 0x54, 0x50, 0xcd, 0x30, 0x2d, 0x50, 0xf7, 0x14, 0x73, 0xb1, 0x05, 0x97, 0x16, 0x14, 0xe4, 0x54, - 0x82, 0x3c, 0x5f, 0x92, 0x5f, 0x92, 0x98, 0x03, 0x75, 0x07, 0xb5, 0x3c, 0x0f, 0x36, 0xd3, 0x8a, - 0xa7, 0x63, 0x81, 0x3c, 0xc3, 0x8c, 0x05, 0xf2, 0x0c, 0x20, 0x4b, 0x9d, 0x9c, 0x4f, 0x3c, 0x92, - 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, - 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x13, 0xaf, 0xc1, 0xc8, 0x05, 0x4c, 0x12, 0x1b, - 0xb8, 0x28, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x0e, 0x1e, 0x07, 0x77, 0x04, 0x00, - 0x00, + // 660 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xb1, 0x6b, 0x14, 0x4f, + 0x14, 0xc7, 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xef, + 0x70, 0x21, 0x39, 0xa8, 0xd6, 0x68, 0x6a, 0x6e, 0x29, 0x01, 0xbc, 0x09, 0xca, 0x4c, 0x76, 0xa1, + 0x0f, 0x7c, 0x25, 0x5f, 0x9b, 0xb5, 0x4a, 0x89, 0xfb, 0x12, 0xc5, 0xc3, 0x41, 0x69, 0x35, 0x89, + 0x22, 0xbf, 0x9b, 0x16, 0x2f, 0x98, 0x20, 0xbe, 0xe2, 0x18, 0x56, 0xf1, 0x32, 0xe7, 0x62, 0xe5, + 0xd9, 0xae, 0x51, 0x78, 0xb5, 0x6b, 0x14, 0xa4, 0xe9, 0x16, 0x98, 0x7a, 0x90, 0xd0, 0xb8, 0xdb, + 0x22, 0x3e, 0x09, 0x6d, 0x6a, 0xd1, 0x27, 0x09, 0xe5, 0x43, 0x9e, 0xe5, 0x34, 0x18, 0x73, 0x68, + 0xc8, 0x02, 0x79, 0x48, 0xc7, 0xad, 0xec, 0xc5, 0xbc, 0x05, 0xa6, 0x4f, 0x3b, 0xf3, 0x88, 0x85, + 0x9c, 0xc2, 0x06, 0x28, 0xb7, 0xb3, 0x4f, 0xd2, 0x3a, 0xbf, 0x7c, 0xab, 0x1f, 0x63, 0xae, 0x83, + 0x4b, 0x32, 0xcd, 0x92, 0xef, 0xab, 0x4c, 0xfc, 0x6f, 0x14, 0x61, 0xee, 0x80, 0xea, 0x59, 0x1f, + 0x85, 0x4c, 0xc0, 0x7f, 0x0a, 0x87, 0x0f, 0x77, 0x64, 0xc7, 0x69, 0x17, 0x3e, 0x15, 0x41, 0x45, + 0xfa, 0xaf, 0xd2, 0xb8, 0xe3, 0xd9, 0x14, 0xbe, 0xd6, 0xd4, 0x07, 0x45, 0x03, 0x67, 0xf3, 0x77, + 0x5c, 0xce, 0x74, 0x6b, 0x73, 0x17, 0x09, 0xcd, 0x6a, 0x33, 0xaf, 0x3f, 0xfd, 0xf8, 0xed, 0x65, + 0xb1, 0x09, 0x31, 0x1e, 0x68, 0xb0, 0xba, 0x8e, 0x3a, 0x4d, 0xac, 0x00, 0xf1, 0xb6, 0xea, 0xd3, + 0x0e, 0xde, 0x96, 0xe3, 0xdd, 0x81, 0x6f, 0x34, 0xf0, 0xff, 0xaf, 0x1d, 0x83, 0x8d, 0x73, 0x9c, + 0xcf, 0x4e, 0xb0, 0x86, 0x2e, 0x1a, 0xae, 0x60, 0xe7, 0x25, 0xec, 0x1c, 0xac, 0x9f, 0x0b, 0xcb, + 0x07, 0xb4, 0xad, 0xe5, 0xbd, 0x03, 0x5d, 0xdb, 0x3f, 0xd0, 0xb5, 0xaf, 0x07, 0xba, 0xf6, 0xe2, + 0x50, 0x2f, 0xec, 0x1f, 0xea, 0x85, 0xcf, 0x87, 0x7a, 0xe1, 0xe1, 0xec, 0xb9, 0x53, 0x3a, 0x79, + 0x21, 0xb7, 0x4b, 0xf2, 0x2a, 0xbc, 0xf6, 0x33, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xce, 0x2c, 0xa9, + 0xa7, 0x07, 0x00, 0x00, } func (this *MsgSend) Equal(that interface{}) bool { @@ -492,6 +703,127 @@ func (this *Supply) Equal(that interface{}) bool { } return true } + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { + out := new(QueryBalanceResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { + out := new(QueryAllBalancesResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QueryBalance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryBalance not implemented") +} +func (*UnimplementedQueryServiceServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryBalance(ctx, req.(*QueryBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryAllBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryAllBalances(ctx, req.(*QueryAllBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.x.bank.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryBalance", + Handler: _QueryService_QueryBalance_Handler, + }, + { + MethodName: "QueryAllBalances", + Handler: _QueryService_QueryAllBalances_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "x/bank/types/types.proto", +} + func (m *MsgSend) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -719,67 +1051,206 @@ func (m *Supply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgSend) Size() (n int) { - if m == nil { - return 0 - } + +func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 } - if len(m.Amount) > 0 { - for _, e := range m.Amount { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Input) Size() (n int) { - if m == nil { - return 0 +func (m *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Coins) > 0 { - for _, e := range m.Coins { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) + if m.Balance != nil { + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Output) Size() (n int) { - if m == nil { - return 0 +func (m *QueryAllBalancesRequest) 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 *QueryAllBalancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Address) - if l > 0 { + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FromAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ToAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Input) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Coins) > 0 { + for _, e := range m.Coins { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Output) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if len(m.Coins) > 0 { @@ -827,6 +1298,64 @@ func (m *Supply) Size() (n int) { return n } +func (m *QueryBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -888,17 +1417,259 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLengthTypes } - if postIndex > l { + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) + if m.FromAddress == nil { + m.FromAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ToAddress == nil { + m.ToAddress = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Input) 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 ErrIntOverflowTypes + } + 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: Input: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Output) 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 ErrIntOverflowTypes + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...) - if m.FromAddress == nil { - m.FromAddress = []byte{} + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Output: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -925,14 +1696,14 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ToAddress == nil { - m.ToAddress = []byte{} + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -959,8 +1730,8 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types.Coin{}) - if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Coins = append(m.Coins, types.Coin{}) + if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -988,7 +1759,7 @@ func (m *MsgSend) Unmarshal(dAtA []byte) error { } return nil } -func (m *Input) Unmarshal(dAtA []byte) error { +func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1011,17 +1782,17 @@ func (m *Input) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Input: wiretype end group for non-group") + return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1031,29 +1802,29 @@ func (m *Input) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} + m.Inputs = append(m.Inputs, Input{}) + if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1080,8 +1851,8 @@ func (m *Input) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Coins = append(m.Coins, types.Coin{}) - if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Outputs = append(m.Outputs, Output{}) + if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1109,7 +1880,7 @@ func (m *Input) Unmarshal(dAtA []byte) error { } return nil } -func (m *Output) Unmarshal(dAtA []byte) error { +func (m *Supply) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1132,10 +1903,97 @@ func (m *Output) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Output: wiretype end group for non-group") + return fmt.Errorf("proto: Supply: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Supply: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Total = append(m.Total, types.Coin{}) + if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceRequest) 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 ErrIntOverflowTypes + } + 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: QueryBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1174,9 +2032,9 @@ func (m *Output) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1186,25 +2044,23 @@ func (m *Output) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Coins = append(m.Coins, types.Coin{}) - if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1230,7 +2086,7 @@ func (m *Output) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { +func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1253,15 +2109,15 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1288,16 +2144,71 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Inputs = append(m.Inputs, Input{}) - if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllBalancesRequest) 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 ErrIntOverflowTypes + } + 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: QueryAllBalancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1307,24 +2218,24 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } - m.Outputs = append(m.Outputs, Output{}) - if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex default: @@ -1351,7 +2262,7 @@ func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { } return nil } -func (m *Supply) Unmarshal(dAtA []byte) error { +func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1374,15 +2285,15 @@ func (m *Supply) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Supply: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllBalancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Supply: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1409,8 +2320,8 @@ func (m *Supply) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Total = append(m.Total, types.Coin{}) - if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/mint/module.go b/x/mint/module.go index f5c175c3cf39..dec468c8aa07 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -7,8 +7,6 @@ import ( "github.com/gogo/protobuf/grpc" - "github.com/cosmos/cosmos-sdk/x/mint/types" - "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" From 29345f3f1047b4f0f1654fb568b1c9470454ebe9 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 6 May 2020 18:37:43 -0400 Subject: [PATCH 36/41] WIP --- baseapp/baseapp.go | 1 + baseapp/grpcrouter.go | 96 ++++++++++++++++++++++++++++++++++++++++++ baseapp/queryrouter.go | 52 ----------------------- 3 files changed, 97 insertions(+), 52 deletions(-) create mode 100644 baseapp/grpcrouter.go diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 43160a384987..6088d7c29ef9 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -48,6 +48,7 @@ type BaseApp struct { // nolint: maligned storeLoader StoreLoader // function to handle store loading, may be overridden with SetStoreLoader() router sdk.Router // handle any kind of message queryRouter sdk.QueryRouter // router for redirecting query calls + grpcRouter GRPCRouter // router for redirecting gRPC query calls txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx anteHandler sdk.AnteHandler // ante handler for fee and auth diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go new file mode 100644 index 000000000000..4d785cf15a0c --- /dev/null +++ b/baseapp/grpcrouter.go @@ -0,0 +1,96 @@ +package baseapp + +import ( + gocontext "context" + "fmt" + "strings" + + gogogrpc "github.com/gogo/protobuf/grpc" + abci "github.com/tendermint/tendermint/abci/types" + "google.golang.org/grpc" + "google.golang.org/grpc/encoding" + "google.golang.org/grpc/encoding/proto" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var protoCodec = encoding.GetCodec(proto.Name) + +type GRPCRouter struct { + routes map[string]sdk.Querier + server *grpc.Server +} + +// Route returns the Querier for a given query route path. +func (qrt *GRPCRouter) Route(path string) sdk.Querier { + return qrt.routes[path] +} + +// RegisterService implements the grpc Server.RegisterService method +func (qrt *GRPCRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { + qrt.server.RegisterService(sd, handler) + // adds a top-level querier based on the GRPC service name + qrt.routes[sd.ServiceName] = + func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { + path0 := path[0] + for _, md := range sd.Methods { + // checks each GRPC service method to see if it matches the path + if md.MethodName != path0 { + continue + } + res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { + return protoCodec.Unmarshal(req.Data, i) + }, nil) + if err != nil { + return nil, err + } + return protoCodec.Marshal(res) + } + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) + } +} + +// QueryServiceTestHelper provides a helper for making grpc query service +// rpc calls in unit tests. It implements both the grpc Server and ClientConn +// interfaces needed to register a query service server and create a query +// service client. +type QueryServiceTestHelper struct { + *QueryRouter + ctx sdk.Context +} + +// NewQueryServerTestHelper creates a new QueryServiceTestHelper that wraps +// the provided sdk.Context +func NewQueryServerTestHelper(ctx sdk.Context) *QueryServiceTestHelper { + return &QueryServiceTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} +} + +// Invoke implements the grpc ClientConn.Invoke method +func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { + path := strings.Split(method, "/") + if len(path) != 3 { + return fmt.Errorf("unexpected method name %s", method) + } + querier := q.Route(path[1]) + if querier == nil { + return fmt.Errorf("handler not found for %s", path[1]) + } + reqBz, err := protoCodec.Marshal(args) + if err != nil { + return err + } + resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) + if err != nil { + return err + } + return protoCodec.Unmarshal(resBz, reply) +} + +// NewStream implements the grpc ClientConn.NewStream method +func (q *QueryServiceTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, fmt.Errorf("not supported") +} + +var _ gogogrpc.Server = &QueryServiceTestHelper{} +var _ gogogrpc.ClientConn = &QueryServiceTestHelper{} diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index 062576e1d84e..5c030a2c18cc 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -2,23 +2,15 @@ package baseapp import ( "fmt" - "strings" - gocontext "context" - - gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/encoding/proto" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdk "github.com/cosmos/cosmos-sdk/types" ) -var protoCodec = encoding.GetCodec(proto.Name) - type QueryRouter struct { routes map[string]sdk.Querier } @@ -75,47 +67,3 @@ func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{ return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) } } - -// QueryServiceTestHelper provides a helper for making grpc query service -// rpc calls in unit tests. It implements both the grpc Server and ClientConn -// interfaces needed to register a query service server and create a query -// service client. -type QueryServiceTestHelper struct { - *QueryRouter - ctx sdk.Context -} - -// NewQueryServerTestHelper creates a new QueryServiceTestHelper that wraps -// the provided sdk.Context -func NewQueryServerTestHelper(ctx sdk.Context) *QueryServiceTestHelper { - return &QueryServiceTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} -} - -// Invoke implements the grpc ClientConn.Invoke method -func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { - path := strings.Split(method, "/") - if len(path) != 3 { - return fmt.Errorf("unexpected method name %s", method) - } - querier := q.Route(path[1]) - if querier == nil { - return fmt.Errorf("handler not found for %s", path[1]) - } - reqBz, err := protoCodec.Marshal(args) - if err != nil { - return err - } - resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) - if err != nil { - return err - } - return protoCodec.Unmarshal(resBz, reply) -} - -// NewStream implements the grpc ClientConn.NewStream method -func (q *QueryServiceTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { - return nil, fmt.Errorf("not supported") -} - -var _ gogogrpc.Server = &QueryServiceTestHelper{} -var _ gogogrpc.ClientConn = &QueryServiceTestHelper{} From 2c14a543b66792f2a9735a411c87f0effec80f72 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 15 May 2020 15:45:44 -0400 Subject: [PATCH 37/41] Implement pagination --- crypto/types/types.pb.go | 110 +++++++++++++++++------------------ go.mod | 2 +- go.sum | 12 ++-- types/query/pagination.go | 62 ++++++++++++++++++++ types/query/pagination.proto | 16 +++++ x/bank/keeper/querier.go | 34 +++++++++-- x/bank/types/query.proto | 56 ++++++++++++++++++ x/bank/types/types.proto | 50 ---------------- 8 files changed, 224 insertions(+), 118 deletions(-) create mode 100644 types/query/pagination.go create mode 100644 types/query/pagination.proto create mode 100644 x/bank/types/query.proto diff --git a/crypto/types/types.pb.go b/crypto/types/types.pb.go index f859315e093e..394067599fca 100644 --- a/crypto/types/types.pb.go +++ b/crypto/types/types.pb.go @@ -218,25 +218,25 @@ func (m *PubKeyMultisigThreshold) GetPubKeys() []*PublicKey { return nil } -// Multisignature wraps the signatures from a PubKeyMultisigThreshold. +// MultiSignature wraps the signatures from a PubKeyMultisigThreshold. // See cosmos_sdk.tx.v1.ModeInfo.Multi for how to specify which signers signed // and with which modes -type Multisignature struct { +type MultiSignature struct { Sigs [][]byte `protobuf:"bytes,1,rep,name=sigs,proto3" json:"sigs,omitempty"` } -func (m *Multisignature) Reset() { *m = Multisignature{} } -func (m *Multisignature) String() string { return proto.CompactTextString(m) } -func (*Multisignature) ProtoMessage() {} -func (*Multisignature) Descriptor() ([]byte, []int) { +func (m *MultiSignature) Reset() { *m = MultiSignature{} } +func (m *MultiSignature) String() string { return proto.CompactTextString(m) } +func (*MultiSignature) ProtoMessage() {} +func (*MultiSignature) Descriptor() ([]byte, []int) { return fileDescriptor_2165b2a1badb1b0c, []int{2} } -func (m *Multisignature) XXX_Unmarshal(b []byte) error { +func (m *MultiSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Multisignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MultiSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Multisignature.Marshal(b, m, deterministic) + return xxx_messageInfo_MultiSignature.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -246,19 +246,19 @@ func (m *Multisignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *Multisignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_Multisignature.Merge(m, src) +func (m *MultiSignature) XXX_Merge(src proto.Message) { + xxx_messageInfo_MultiSignature.Merge(m, src) } -func (m *Multisignature) XXX_Size() int { +func (m *MultiSignature) XXX_Size() int { return m.Size() } -func (m *Multisignature) XXX_DiscardUnknown() { - xxx_messageInfo_Multisignature.DiscardUnknown(m) +func (m *MultiSignature) XXX_DiscardUnknown() { + xxx_messageInfo_MultiSignature.DiscardUnknown(m) } -var xxx_messageInfo_Multisignature proto.InternalMessageInfo +var xxx_messageInfo_MultiSignature proto.InternalMessageInfo -func (m *Multisignature) GetSigs() [][]byte { +func (m *MultiSignature) GetSigs() [][]byte { if m != nil { return m.Sigs } @@ -324,45 +324,45 @@ func (m *CompactBitArray) GetElems() []byte { func init() { proto.RegisterType((*PublicKey)(nil), "cosmos_sdk.crypto.v1.PublicKey") proto.RegisterType((*PubKeyMultisigThreshold)(nil), "cosmos_sdk.crypto.v1.PubKeyMultisigThreshold") - proto.RegisterType((*Multisignature)(nil), "cosmos_sdk.crypto.v1.Multisignature") + proto.RegisterType((*MultiSignature)(nil), "cosmos_sdk.crypto.v1.MultiSignature") proto.RegisterType((*CompactBitArray)(nil), "cosmos_sdk.crypto.v1.CompactBitArray") } func init() { proto.RegisterFile("crypto/types/types.proto", fileDescriptor_2165b2a1badb1b0c) } var fileDescriptor_2165b2a1badb1b0c = []byte{ - // 486 bytes of a gzipped FileDescriptorProto + // 488 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xdd, 0x8a, 0xd3, 0x40, - 0x14, 0x6e, 0xda, 0xad, 0xb5, 0xb3, 0xeb, 0x56, 0x87, 0x82, 0xd9, 0x82, 0x49, 0x09, 0x22, 0x55, - 0xd8, 0x84, 0x54, 0xaa, 0xe8, 0xdd, 0x66, 0x6f, 0x16, 0x8a, 0x50, 0xb2, 0x5e, 0x88, 0x37, 0x21, - 0x3f, 0x63, 0x1a, 0x9a, 0x64, 0xc2, 0x9c, 0x89, 0x38, 0x2f, 0x21, 0x3e, 0x88, 0x0f, 0xe2, 0xe5, - 0x5e, 0x7a, 0x55, 0x24, 0x7d, 0x83, 0x7d, 0x02, 0xd9, 0x4c, 0xb2, 0x5d, 0xc4, 0xbd, 0x49, 0x66, - 0xce, 0xf7, 0x9d, 0x2f, 0xdf, 0x77, 0x4e, 0x90, 0x1a, 0x32, 0x51, 0x70, 0x6a, 0x71, 0x51, 0x10, - 0x90, 0x4f, 0xb3, 0x60, 0x94, 0x53, 0x3c, 0x0e, 0x29, 0x64, 0x14, 0x3c, 0x88, 0x36, 0xa6, 0x24, - 0x99, 0x5f, 0xed, 0xc9, 0x0b, 0xbe, 0x4e, 0x58, 0xe4, 0x15, 0x3e, 0xe3, 0xc2, 0xaa, 0x89, 0x56, - 0x4c, 0x63, 0xba, 0x3f, 0xc9, 0xee, 0xc9, 0x49, 0x4c, 0x69, 0x9c, 0x12, 0x49, 0x09, 0xca, 0x2f, - 0x96, 0x9f, 0x0b, 0x09, 0x19, 0xdf, 0xbb, 0x68, 0xb8, 0x2a, 0x83, 0x34, 0x09, 0x97, 0x44, 0x60, - 0x0d, 0x0d, 0x81, 0x84, 0xc5, 0x7c, 0xf1, 0x66, 0x63, 0xab, 0xca, 0x54, 0x99, 0x1d, 0x5d, 0x74, - 0xdc, 0x7d, 0x09, 0x4f, 0xd0, 0x80, 0x44, 0xf3, 0xc5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a8, - 0xca, 0xb4, 0x37, 0x3b, 0x72, 0xeb, 0xb3, 0x71, 0x89, 0x46, 0xe7, 0x34, 0x2b, 0xfc, 0x90, 0x3b, - 0x09, 0x3f, 0x63, 0xcc, 0x17, 0xf8, 0x15, 0x7a, 0x42, 0xbe, 0x71, 0xe6, 0x7b, 0x41, 0xc2, 0xc1, - 0x03, 0x4e, 0x19, 0x69, 0x32, 0xb9, 0xa3, 0x1a, 0x70, 0x12, 0x0e, 0x97, 0x75, 0x19, 0x8f, 0x51, - 0x9f, 0xa4, 0x24, 0x03, 0xb9, 0x74, 0x57, 0x5e, 0x9c, 0xf3, 0x5f, 0x95, 0xa6, 0x5c, 0x55, 0x9a, - 0xf2, 0xa7, 0xd2, 0x94, 0x1f, 0x3b, 0xad, 0x73, 0xb5, 0xd3, 0x3a, 0xbf, 0x77, 0x5a, 0xe7, 0xf3, - 0xcb, 0x38, 0xe1, 0xeb, 0x32, 0x30, 0x43, 0x9a, 0x59, 0x32, 0x67, 0xf3, 0x3a, 0x85, 0x68, 0x63, - 0xdd, 0xfd, 0xc9, 0x83, 0x07, 0xf5, 0x42, 0x5e, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x57, 0x64, - 0xcc, 0x04, 0xfb, 0x02, 0x00, 0x00, + 0x18, 0x4d, 0xda, 0xad, 0xb5, 0xb3, 0xeb, 0x56, 0x87, 0x82, 0xd9, 0x82, 0x49, 0x09, 0x22, 0x55, + 0xd8, 0x84, 0x54, 0xaa, 0xe8, 0xdd, 0x66, 0x6f, 0x16, 0x8a, 0x50, 0x52, 0x2f, 0xc4, 0x9b, 0x90, + 0x9f, 0x31, 0x1d, 0x9a, 0x64, 0xc2, 0xcc, 0x44, 0x9c, 0x97, 0x10, 0x1f, 0xc4, 0x07, 0xf1, 0x72, + 0x2f, 0xbd, 0x2a, 0x92, 0xbe, 0xc1, 0x3e, 0x81, 0x6c, 0x26, 0xd9, 0x2e, 0x62, 0x6f, 0x92, 0x99, + 0xef, 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x2b, 0xbf, 0x77, 0xba, + 0xf2, 0xf9, 0x65, 0x82, 0xf9, 0xba, 0x0c, 0xad, 0x88, 0x64, 0xb6, 0xcc, 0xd9, 0xbc, 0xce, 0x59, + 0xbc, 0xb1, 0xef, 0xff, 0xe4, 0xe1, 0x83, 0x7a, 0x21, 0xaf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x82, 0xd0, 0x7b, 0xf3, 0xfb, 0x02, 0x00, 0x00, } func (m *PublicKey) Marshal() (dAtA []byte, err error) { @@ -545,7 +545,7 @@ func (m *PubKeyMultisigThreshold) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *Multisignature) Marshal() (dAtA []byte, err error) { +func (m *MultiSignature) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -555,12 +555,12 @@ func (m *Multisignature) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Multisignature) MarshalTo(dAtA []byte) (int, error) { +func (m *MultiSignature) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Multisignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -725,7 +725,7 @@ func (m *PubKeyMultisigThreshold) Size() (n int) { return n } -func (m *Multisignature) Size() (n int) { +func (m *MultiSignature) Size() (n int) { if m == nil { return 0 } @@ -1123,7 +1123,7 @@ func (m *PubKeyMultisigThreshold) Unmarshal(dAtA []byte) error { } return nil } -func (m *Multisignature) Unmarshal(dAtA []byte) error { +func (m *MultiSignature) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1146,10 +1146,10 @@ func (m *Multisignature) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Multisignature: wiretype end group for non-group") + return fmt.Errorf("proto: MultiSignature: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Multisignature: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/go.mod b/go.mod index 52bca770f6c0..6b8e93cc1dfa 100644 --- a/go.mod +++ b/go.mod @@ -32,9 +32,9 @@ require ( github.com/tendermint/iavl v0.13.3 github.com/tendermint/tendermint v0.33.4 github.com/tendermint/tm-db v0.5.1 - gopkg.in/yaml.v2 v2.3.0 google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 google.golang.org/grpc v1.28.1 + gopkg.in/yaml.v2 v2.3.0 ) replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4 diff --git a/go.sum b/go.sum index 9d2f3e62d1de..eb8f56595e38 100644 --- a/go.sum +++ b/go.sum @@ -404,8 +404,8 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.0 h1:24dVpPrPi0GDoPVLesf2Ug98iK5QgVscPl0ga4Eoub0= github.com/regen-network/cosmos-proto v0.3.0/go.mod h1:zuP2jVPHab6+IIyOx3nXHFN+euFNeS3W8XQkcdd4s7A= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= -github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE= +github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -559,8 +559,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -592,7 +590,6 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -656,8 +653,8 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -669,6 +666,7 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= diff --git a/types/query/pagination.go b/types/query/pagination.go new file mode 100644 index 000000000000..d914822063f0 --- /dev/null +++ b/types/query/pagination.go @@ -0,0 +1,62 @@ +package query + +import ( + "github.com/cosmos/cosmos-sdk/store/types" +) + +func Paginate( + prefixStore types.KVStore, + req *PageRequest, + onResult func(key []byte, value []byte) error, +) (*PageResponse, error) { + if req.PageNum >= 1 { + iterator := prefixStore.Iterator(req.PageKey, nil) + defer iterator.Close() + + pageStart := req.PageNum * req.Limit + pageEnd := pageStart + req.Limit + var count uint64 + var nextPageKey []byte + + for ; iterator.Valid(); iterator.Next() { + count++ + if count < pageStart { + continue + } else if count <= pageEnd { + err := onResult(iterator.Key(), iterator.Value()) + if err != nil { + return PageResponse{}, err + } + } else if !req.CountTotal { + nextPageKey = iterator.Key() + break + } + } + + res := PageResponse{NextPageKey: nextPageKey} + if req.CountTotal { + res.Total = count + } + return res, nil + } else { + iterator := prefixStore.Iterator(req.PageKey, nil) + defer iterator.Close() + + var count uint64 + var nextPageKey []byte + for ; iterator.Valid(); iterator.Next() { + if count == req.Limit { + nextPageKey = iterator.Key() + break + } + err := onResult(iterator.Key(), iterator.Value()) + if err != nil { + return PageResponse{}, err + } + count++ + } + return PageResponse{ + NextPageKey: nextPageKey, + }, nil + } +} diff --git a/types/query/pagination.proto b/types/query/pagination.proto new file mode 100644 index 000000000000..cbb453a5ade7 --- /dev/null +++ b/types/query/pagination.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos_sdk.query.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +message PageRequest { + bytes page_key = 1; + uint64 page_num = 2; + uint64 limit = 3; + bool count_total = 4; +} + +message PageResponse { + bytes next_page_key = 1; + uint64 total = 2; +} diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index 5bc9d940daa7..ab1a9be7613d 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -3,17 +3,21 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" + "github.com/cosmos/cosmos-sdk/types/query" + + abci "github.com/tendermint/tendermint/abci/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/types" ) type Querier struct { - Keeper + BaseKeeper } var _ types.QueryServiceServer = Querier{} @@ -23,9 +27,29 @@ func (q Querier) QueryBalance(ctx context.Context, req *types.QueryBalanceReques return &types.QueryBalanceResponse{Balance: &balance}, nil } -func (q Querier) QueryAllBalances(ctx context.Context, req *types.QueryAllBalancesRequest) (*types.QueryAllBalancesResponse, error) { - balances := q.GetAllBalances(sdk.UnwrapSDKContext(ctx), req.Address) - return &types.QueryAllBalancesResponse{Balances: balances}, nil +func (q Querier) QueryAllBalances(c context.Context, req *types.QueryAllBalancesRequest) (*types.QueryAllBalancesResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(q.storeKey) + + balancesStore := prefix.NewStore(store, types.BalancesPrefix) + accountStore := prefix.NewStore(balancesStore, req.Address.Bytes()) + + balances := sdk.Coins{} + + pageRes, err := query.Paginate(accountStore, req.Page, func(key []byte, value []byte) error { + var balance sdk.Coin + err := q.cdc.UnmarshalBinaryBare(value, &balance) + balances = balances.Add(balance) + if err != nil { + return err + } + return nil + }) + if err != nil { + return nil, err + } + + return &types.QueryAllBalancesResponse{Balances: balances, Page: pageRes}, nil } // NewQuerier returns a new sdk.Keeper instance. diff --git a/x/bank/types/query.proto b/x/bank/types/query.proto new file mode 100644 index 000000000000..40d9cc4a7da0 --- /dev/null +++ b/x/bank/types/query.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package cosmos_sdk.x.bank.v1; + +import "third_party/proto/gogoproto/gogo.proto"; +import "third_party/proto/google/api/annotations.proto"; +import "types/types.proto"; +import "types/query/pagination.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Query provides defines the gRPC querier service +service QueryService { + // QueryBalance queries the balance of a single coin for a single account + rpc QueryBalance (QueryBalanceRequest) returns (QueryBalanceResponse) { + option (google.api.http) = { + get: "/cosmos_sdk/x/bank/v1/balance/{address}/{denom}" + }; + } + + // QueryBalance queries the balance of all coins for a single account + rpc QueryAllBalances (QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + option (google.api.http) = { + get: "/cosmos_sdk/x/bank/v1/balances/{address}" + }; + } +} + +// QueryBalanceParams defines the params for querying an account balance. +message QueryBalanceRequest { + bytes address = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" + ]; + string denom = 2; +} + +// QueryBalanceResponse is the response for the QueryBalance rpc method +message QueryBalanceResponse { + cosmos_sdk.v1.Coin balance = 1; +} + +// QueryAllBalancesParams defines the params for querying all account balances +message QueryAllBalancesRequest { + bytes address = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" + ]; + cosmos_sdk.query.v1.PageRequest page = 2; +} + +// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method +message QueryAllBalancesResponse { + repeated cosmos_sdk.v1.Coin balances = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + cosmos_sdk.query.v1.PageResponse page = 2; +} diff --git a/x/bank/types/types.proto b/x/bank/types/types.proto index e9f963f9e243..3cd381bf64ef 100644 --- a/x/bank/types/types.proto +++ b/x/bank/types/types.proto @@ -3,7 +3,6 @@ package cosmos_sdk.x.bank.v1; import "third_party/proto/gogoproto/gogo.proto"; import "third_party/proto/cosmos-proto/cosmos.proto"; -import "third_party/proto/google/api/annotations.proto"; import "types/types.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; @@ -61,52 +60,3 @@ message Supply { repeated cosmos_sdk.v1.Coin total = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } - -// -// Query -// - -// Query provides defines the gRPC querier service -service QueryService { - // QueryBalance queries the balance of a single coin for a single account - rpc QueryBalance (QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http) = { - get: "/cosmos_sdk/x/bank/v1/balance/{address}/{denom}" - }; - } - - // QueryBalance queries the balance of all coins for a single account - rpc QueryAllBalances (QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { - option (google.api.http) = { - get: "/cosmos_sdk/x/bank/v1/balances/{address}" - }; - } -} - -// QueryBalanceParams defines the params for querying an account balance. -message QueryBalanceRequest { - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" - ]; - string denom = 2; -} - -// QueryBalanceResponse is the response for the QueryBalance rpc method -message QueryBalanceResponse { - cosmos_sdk.v1.Coin balance = 1; -} - -// QueryAllBalancesParams defines the params for querying all account balances -message QueryAllBalancesRequest { - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" - ]; -} - -// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method -message QueryAllBalancesResponse { - repeated cosmos_sdk.v1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} From d94ac1851af36986314d51e39c6ef22870603f39 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 15 May 2020 15:54:08 -0400 Subject: [PATCH 38/41] Docs --- types/query/pagination.pb.go | 674 +++++++++++++++++++ types/query/pagination.proto | 31 + x/bank/types/query.pb.go | 1187 ++++++++++++++++++++++++++++++++++ x/bank/types/query.proto | 13 +- 4 files changed, 1895 insertions(+), 10 deletions(-) create mode 100644 types/query/pagination.pb.go create mode 100644 x/bank/types/query.pb.go diff --git a/types/query/pagination.pb.go b/types/query/pagination.pb.go new file mode 100644 index 000000000000..cb8fd00c9b2d --- /dev/null +++ b/types/query/pagination.pb.go @@ -0,0 +1,674 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/query/pagination.proto + +package query + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest page = 2; +// } +type PageRequest struct { + // page_key is a value returned in PageResponse.next_page_key to begin + // querying the next page most efficiently + PageKey []byte `protobuf:"bytes,1,opt,name=page_key,json=pageKey,proto3" json:"page_key,omitempty"` + // page_num is a page number that can be used when PageResponse.next_page_key + // is unavailable. It is less efficient than using page_key. page_num 0 + // is the first page and page_num n indicates the page starting from result + // n * limit + PageNum uint64 `protobuf:"varint,2,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"` + // limit is the total number of results to be returned in the result page + Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` + // count_total is set to true to indicate that the result set should include + // a count of the total number of items available for pagination in UIs + CountTotal bool `protobuf:"varint,4,opt,name=count_total,json=countTotal,proto3" json:"count_total,omitempty"` +} + +func (m *PageRequest) Reset() { *m = PageRequest{} } +func (m *PageRequest) String() string { return proto.CompactTextString(m) } +func (*PageRequest) ProtoMessage() {} +func (*PageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1bc1d15c71a57e43, []int{0} +} +func (m *PageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PageRequest.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 *PageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PageRequest.Merge(m, src) +} +func (m *PageRequest) XXX_Size() int { + return m.Size() +} +func (m *PageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PageRequest proto.InternalMessageInfo + +func (m *PageRequest) GetPageKey() []byte { + if m != nil { + return m.PageKey + } + return nil +} + +func (m *PageRequest) GetPageNum() uint64 { + if m != nil { + return m.PageNum + } + return 0 +} + +func (m *PageRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *PageRequest) GetCountTotal() bool { + if m != nil { + return m.CountTotal + } + return false +} + +// PageResponse is to be embedded in gRPC response messages where the corresponding +// request message has used PageRequest +// +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } +type PageResponse struct { + // next_page_key is the key to be passed to PageRequest.page_key to + // query the next page most efficiently + NextPageKey []byte `protobuf:"bytes,1,opt,name=next_page_key,json=nextPageKey,proto3" json:"next_page_key,omitempty"` + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` +} + +func (m *PageResponse) Reset() { *m = PageResponse{} } +func (m *PageResponse) String() string { return proto.CompactTextString(m) } +func (*PageResponse) ProtoMessage() {} +func (*PageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1bc1d15c71a57e43, []int{1} +} +func (m *PageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PageResponse.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 *PageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PageResponse.Merge(m, src) +} +func (m *PageResponse) XXX_Size() int { + return m.Size() +} +func (m *PageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PageResponse proto.InternalMessageInfo + +func (m *PageResponse) GetNextPageKey() []byte { + if m != nil { + return m.NextPageKey + } + return nil +} + +func (m *PageResponse) GetTotal() uint64 { + if m != nil { + return m.Total + } + return 0 +} + +func init() { + proto.RegisterType((*PageRequest)(nil), "cosmos_sdk.query.v1.PageRequest") + proto.RegisterType((*PageResponse)(nil), "cosmos_sdk.query.v1.PageResponse") +} + +func init() { proto.RegisterFile("types/query/pagination.proto", fileDescriptor_1bc1d15c71a57e43) } + +var fileDescriptor_1bc1d15c71a57e43 = []byte{ + // 266 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xa9, 0x2c, 0x48, + 0x2d, 0xd6, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2f, 0x48, 0x4c, 0xcf, 0xcc, 0x4b, 0x2c, 0xc9, + 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4e, 0xce, 0x2f, 0xce, 0xcd, 0x2f, + 0x8e, 0x2f, 0x4e, 0xc9, 0xd6, 0x03, 0x2b, 0xd1, 0x2b, 0x33, 0x54, 0xaa, 0xe2, 0xe2, 0x0e, 0x48, + 0x4c, 0x4f, 0x0d, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe4, 0xe2, 0x28, 0x48, 0x4c, + 0x4f, 0x8d, 0xcf, 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x62, 0x07, 0xf1, 0xbd, + 0x53, 0x2b, 0xe1, 0x52, 0x79, 0xa5, 0xb9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x10, 0x29, 0xbf, + 0xd2, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0x9c, 0xcc, 0xdc, 0xcc, 0x12, 0x09, 0x66, 0xb0, 0x38, 0x84, + 0x23, 0x24, 0xcf, 0xc5, 0x9d, 0x9c, 0x5f, 0x9a, 0x57, 0x12, 0x5f, 0x92, 0x5f, 0x92, 0x98, 0x23, + 0xc1, 0xa2, 0xc0, 0xa8, 0xc1, 0x11, 0xc4, 0x05, 0x16, 0x0a, 0x01, 0x89, 0x28, 0x79, 0x70, 0xf1, + 0x40, 0xec, 0x2e, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x52, 0xe2, 0xe2, 0xcd, 0x4b, 0xad, 0x28, + 0x89, 0x47, 0x73, 0x01, 0x37, 0x48, 0x30, 0x00, 0xea, 0x0a, 0x11, 0x2e, 0x56, 0x88, 0x71, 0x10, + 0x27, 0x40, 0x38, 0x4e, 0x4e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, + 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, + 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf1, 0x3f, 0x94, 0xd2, + 0x2d, 0x4e, 0xc9, 0xd6, 0x47, 0x0a, 0xaf, 0x24, 0x36, 0x70, 0x28, 0x19, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x8f, 0x7c, 0x3c, 0x37, 0x45, 0x01, 0x00, 0x00, +} + +func (m *PageRequest) 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 *PageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CountTotal { + i-- + if m.CountTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Limit != 0 { + i = encodeVarintPagination(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x18 + } + if m.PageNum != 0 { + i = encodeVarintPagination(dAtA, i, uint64(m.PageNum)) + i-- + dAtA[i] = 0x10 + } + if len(m.PageKey) > 0 { + i -= len(m.PageKey) + copy(dAtA[i:], m.PageKey) + i = encodeVarintPagination(dAtA, i, uint64(len(m.PageKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PageResponse) 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 *PageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Total != 0 { + i = encodeVarintPagination(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if len(m.NextPageKey) > 0 { + i -= len(m.NextPageKey) + copy(dAtA[i:], m.NextPageKey) + i = encodeVarintPagination(dAtA, i, uint64(len(m.NextPageKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintPagination(dAtA []byte, offset int, v uint64) int { + offset -= sovPagination(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PageKey) + if l > 0 { + n += 1 + l + sovPagination(uint64(l)) + } + if m.PageNum != 0 { + n += 1 + sovPagination(uint64(m.PageNum)) + } + if m.Limit != 0 { + n += 1 + sovPagination(uint64(m.Limit)) + } + if m.CountTotal { + n += 2 + } + return n +} + +func (m *PageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NextPageKey) + if l > 0 { + n += 1 + l + sovPagination(uint64(l)) + } + if m.Total != 0 { + n += 1 + sovPagination(uint64(m.Total)) + } + return n +} + +func sovPagination(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPagination(x uint64) (n int) { + return sovPagination(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PageRequest) 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 ErrIntOverflowPagination + } + 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: PageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PageKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPagination + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPagination + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PageKey = append(m.PageKey[:0], dAtA[iNdEx:postIndex]...) + if m.PageKey == nil { + m.PageKey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageNum", wireType) + } + m.PageNum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageNum |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CountTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CountTotal = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipPagination(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPagination + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPagination + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PageResponse) 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 ErrIntOverflowPagination + } + 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: PageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPageKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPagination + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPagination + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextPageKey = append(m.NextPageKey[:0], dAtA[iNdEx:postIndex]...) + if m.NextPageKey == nil { + m.NextPageKey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPagination + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPagination(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPagination + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPagination + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPagination(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPagination + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPagination + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPagination + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPagination + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPagination + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPagination + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPagination = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPagination = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPagination = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/query/pagination.proto b/types/query/pagination.proto index cbb453a5ade7..ec2791f4c314 100644 --- a/types/query/pagination.proto +++ b/types/query/pagination.proto @@ -3,14 +3,45 @@ package cosmos_sdk.query.v1; option go_package = "github.com/cosmos/cosmos-sdk/types/query"; +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest page = 2; +// } message PageRequest { + // page_key is a value returned in PageResponse.next_page_key to begin + // querying the next page most efficiently bytes page_key = 1; + + // page_num is a page number that can be used when PageResponse.next_page_key + // is unavailable. It is less efficient than using page_key. page_num 0 + // is the first page and page_num n indicates the page starting from result + // n * limit uint64 page_num = 2; + + // limit is the total number of results to be returned in the result page uint64 limit = 3; + + // count_total is set to true to indicate that the result set should include + // a count of the total number of items available for pagination in UIs bool count_total = 4; } +// PageResponse is to be embedded in gRPC response messages where the corresponding +// request message has used PageRequest +// +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } message PageResponse { + // next_page_key is the key to be passed to PageRequest.page_key to + // query the next page most efficiently bytes next_page_key = 1; + + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise uint64 total = 2; } diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go new file mode 100644 index 000000000000..bcf18523f9a7 --- /dev/null +++ b/x/bank/types/query.pb.go @@ -0,0 +1,1187 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: x/bank/types/query.proto + +package types + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/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" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryBalanceParams defines the params for querying an account balance. +type QueryBalanceRequest struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } +func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceRequest) ProtoMessage() {} +func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{0} +} +func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceRequest.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 *QueryBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceRequest.Merge(m, src) +} +func (m *QueryBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo + +func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *QueryBalanceRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +// QueryBalanceResponse is the response for the QueryBalance rpc method +type QueryBalanceResponse struct { + Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } +func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBalanceResponse) ProtoMessage() {} +func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{1} +} +func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +} +func (m *QueryBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo + +func (m *QueryBalanceResponse) GetBalance() *types.Coin { + if m != nil { + return m.Balance + } + return nil +} + +// QueryAllBalancesParams defines the params for querying all account balances +type QueryAllBalancesRequest struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Page *query.PageRequest `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} } +func (m *QueryAllBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesRequest) ProtoMessage() {} +func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{2} +} +func (m *QueryAllBalancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesRequest.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 *QueryAllBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesRequest.Merge(m, src) +} +func (m *QueryAllBalancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo + +func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *QueryAllBalancesRequest) GetPage() *query.PageRequest { + if m != nil { + return m.Page + } + return nil +} + +// QueryAllBalancesResponse is the response to the QueryAllBalances rpc method +type QueryAllBalancesResponse struct { + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` + Page *query.PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } +func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllBalancesResponse) ProtoMessage() {} +func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{3} +} +func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) +} +func (m *QueryAllBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo + +func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + +func (m *QueryAllBalancesResponse) GetPage() *query.PageResponse { + if m != nil { + return m.Page + } + return nil +} + +func init() { + proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") + proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") + proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") + proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") +} + +func init() { proto.RegisterFile("x/bank/types/query.proto", fileDescriptor_b761440f9b86d1e8) } + +var fileDescriptor_b761440f9b86d1e8 = []byte{ + // 504 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xbf, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xe3, 0xf0, 0xa3, 0xe0, 0x76, 0x00, 0x37, 0x12, 0x51, 0x84, 0x2e, 0xe1, 0x06, 0x94, + 0x56, 0x8a, 0xdd, 0x0b, 0x20, 0xe6, 0xa4, 0x62, 0x62, 0x81, 0x63, 0x63, 0xa9, 0x9c, 0x3b, 0xeb, + 0x7a, 0x6a, 0x62, 0x5f, 0xcf, 0xce, 0x29, 0x51, 0xd5, 0x85, 0xbf, 0x00, 0x89, 0x15, 0xb1, 0xb0, + 0x31, 0xf3, 0x47, 0x74, 0xac, 0x84, 0x90, 0x98, 0x0a, 0x4a, 0xf8, 0x2b, 0x98, 0xd0, 0xd9, 0x0e, + 0xb9, 0xd2, 0x70, 0xca, 0xc2, 0x92, 0xdc, 0xd9, 0xdf, 0xf7, 0xde, 0xe7, 0xeb, 0xf7, 0x7c, 0xb0, + 0x3e, 0x21, 0x03, 0xca, 0x8f, 0x88, 0x9a, 0x26, 0x4c, 0x92, 0xe3, 0x31, 0x4b, 0xa7, 0x38, 0x49, + 0x85, 0x12, 0xa8, 0x16, 0x08, 0x39, 0x12, 0xf2, 0x40, 0x86, 0x47, 0x78, 0x82, 0x73, 0x11, 0xce, + 0xbc, 0xc6, 0x43, 0x75, 0x18, 0xa7, 0xe1, 0x41, 0x42, 0x53, 0x35, 0x25, 0x5a, 0x48, 0x22, 0x11, + 0x89, 0xe5, 0x93, 0x89, 0x6e, 0xe0, 0x55, 0x3a, 0x11, 0x0d, 0x19, 0xa1, 0x49, 0x4c, 0x28, 0xe7, + 0x42, 0x51, 0x15, 0x0b, 0x2e, 0xad, 0xfe, 0xae, 0x01, 0xd0, 0xbf, 0x76, 0xe9, 0x7e, 0x81, 0x89, + 0x24, 0x34, 0x8a, 0xb9, 0x8e, 0x30, 0xbb, 0xee, 0x04, 0x6e, 0xbf, 0xcc, 0x77, 0xfa, 0x74, 0x48, + 0x79, 0xc0, 0x7c, 0x76, 0x3c, 0x66, 0x52, 0xa1, 0xe7, 0x70, 0x83, 0x86, 0x61, 0xca, 0xa4, 0xac, + 0x83, 0x16, 0x68, 0x6f, 0xf5, 0xbd, 0x5f, 0x17, 0xcd, 0x4e, 0x14, 0xab, 0xc3, 0xf1, 0x00, 0x07, + 0x62, 0x44, 0x8c, 0x2b, 0xfb, 0xd7, 0x91, 0xa1, 0xb5, 0x8e, 0x7b, 0x41, 0xd0, 0x33, 0x81, 0xfe, + 0x22, 0x03, 0xaa, 0xc1, 0x1b, 0x21, 0xe3, 0x62, 0x54, 0xaf, 0xb6, 0x40, 0xfb, 0xb6, 0x6f, 0x5e, + 0xdc, 0x67, 0xb0, 0x76, 0xb9, 0xb2, 0x4c, 0x04, 0x97, 0x0c, 0x75, 0xe0, 0xc6, 0xc0, 0x2c, 0xe9, + 0xd2, 0x9b, 0xdd, 0x6d, 0x5c, 0x38, 0xc2, 0xcc, 0xc3, 0xfb, 0x22, 0xe6, 0xfe, 0x42, 0xe3, 0xbe, + 0x07,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9d, 0xca, 0xf9, 0xdc, 0xa9, 0x7c, 0x9b, 0x3b, 0x95, 0xd7, 0x3b, + 0xa5, 0xcd, 0x2d, 0x7e, 0x5e, 0x06, 0x37, 0xf5, 0xd5, 0x7d, 0xf4, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xaa, 0xc7, 0xf5, 0x9c, 0x75, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { + out := new(QueryBalanceResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { + out := new(QueryAllBalancesResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + // QueryBalance queries the balance of a single coin for a single account + QueryBalance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) + // QueryBalance queries the balance of all coins for a single account + QueryAllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QueryBalance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryBalance not implemented") +} +func (*UnimplementedQueryServiceServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryBalance(ctx, req.(*QueryBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryAllBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryAllBalances(ctx, req.(*QueryAllBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.x.bank.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryBalance", + Handler: _QueryService_QueryBalance_Handler, + }, + { + MethodName: "QueryAllBalances", + Handler: _QueryService_QueryAllBalances_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "x/bank/types/query.proto", +} + +func (m *QueryBalanceRequest) 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 *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Balance != nil { + { + size, err := m.Balance.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 *QueryAllBalancesRequest) 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 *QueryAllBalancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Page != nil { + { + size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Page != nil { + { + size, err := m.Page.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Page != nil { + l = m.Page.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Page != nil { + l = m.Page.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryBalanceRequest) 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: QueryBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBalanceResponse) 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: QueryBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllBalancesRequest) 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: QueryAllBalancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", 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.Page == nil { + m.Page = &query.PageRequest{} + } + if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllBalancesResponse) 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: QueryAllBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", 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.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", 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.Page == nil { + m.Page = &query.PageResponse{} + } + if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/bank/types/query.proto b/x/bank/types/query.proto index 40d9cc4a7da0..9f79ea52063a 100644 --- a/x/bank/types/query.proto +++ b/x/bank/types/query.proto @@ -27,9 +27,7 @@ service QueryService { // QueryBalanceParams defines the params for querying an account balance. message QueryBalanceRequest { - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" - ]; + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; string denom = 2; } @@ -40,17 +38,12 @@ message QueryBalanceResponse { // QueryAllBalancesParams defines the params for querying all account balances message QueryAllBalancesRequest { - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" - ]; + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; cosmos_sdk.query.v1.PageRequest page = 2; } // QueryAllBalancesResponse is the response to the QueryAllBalances rpc method message QueryAllBalancesResponse { - repeated cosmos_sdk.v1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + repeated cosmos_sdk.v1.Coin balances = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; cosmos_sdk.query.v1.PageResponse page = 2; } From 7729b5254672574957657c5dab8f59ef57b418ef Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 15 May 2020 16:02:52 -0400 Subject: [PATCH 39/41] Fixes, docs --- types/query/pagination.go | 37 +++++++++++++++++++++++++++++-------- x/bank/keeper/querier.go | 5 ++++- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/types/query/pagination.go b/types/query/pagination.go index d914822063f0..b63ec4e7ca74 100644 --- a/types/query/pagination.go +++ b/types/query/pagination.go @@ -4,28 +4,44 @@ import ( "github.com/cosmos/cosmos-sdk/store/types" ) +// Paginate does pagination of the results in the prefixStore based on the +// provided PageRequest. onResult should be used to do actual unmarshaling. +// +// Ex: +// prefixStore := prefix.NewStore(store, someRequestParam) +// var results []Result +// pageRes, err := query.Paginate(accountStore, req.Page, func(key []byte, value []byte) error { +// var result Result +// err := Unmarshal(value, &balance) +// results = append(results, result) +// ... +// }) func Paginate( prefixStore types.KVStore, req *PageRequest, onResult func(key []byte, value []byte) error, ) (*PageResponse, error) { - if req.PageNum >= 1 { + pageNum := req.PageNum + limit := req.Limit + + if pageNum >= 1 { iterator := prefixStore.Iterator(req.PageKey, nil) defer iterator.Close() - pageStart := req.PageNum * req.Limit - pageEnd := pageStart + req.Limit + pageStart := pageNum * limit + pageEnd := pageStart + limit var count uint64 var nextPageKey []byte for ; iterator.Valid(); iterator.Next() { count++ + if count < pageStart { continue } else if count <= pageEnd { err := onResult(iterator.Key(), iterator.Value()) if err != nil { - return PageResponse{}, err + return nil, err } } else if !req.CountTotal { nextPageKey = iterator.Key() @@ -33,10 +49,11 @@ func Paginate( } } - res := PageResponse{NextPageKey: nextPageKey} + res := &PageResponse{NextPageKey: nextPageKey} if req.CountTotal { res.Total = count } + return res, nil } else { iterator := prefixStore.Iterator(req.PageKey, nil) @@ -44,18 +61,22 @@ func Paginate( var count uint64 var nextPageKey []byte + for ; iterator.Valid(); iterator.Next() { - if count == req.Limit { + if count == limit { nextPageKey = iterator.Key() break } + err := onResult(iterator.Key(), iterator.Value()) if err != nil { - return PageResponse{}, err + return nil, err } + count++ } - return PageResponse{ + + return &PageResponse{ NextPageKey: nextPageKey, }, nil } diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index ab1a9be7613d..3daeef74fac2 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -38,11 +38,14 @@ func (q Querier) QueryAllBalances(c context.Context, req *types.QueryAllBalances pageRes, err := query.Paginate(accountStore, req.Page, func(key []byte, value []byte) error { var balance sdk.Coin + err := q.cdc.UnmarshalBinaryBare(value, &balance) - balances = balances.Add(balance) if err != nil { return err } + + balances = balances.Add(balance) + return nil }) if err != nil { From 0deb60fa8062f0a6f7bc05654f58425cb594a30e Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 2 Jun 2020 14:31:41 -0400 Subject: [PATCH 40/41] Update x/bank gRPC querier --- buf.yaml | 1 + client/query.go | 4 +- simapp/cmd/simcli/main.go | 7 +- tests/mocks/types_module_module.go | 6 +- tests/mocks/types_router.go | 8 +- types/module/module.go | 6 +- x/auth/module.go | 4 +- x/bank/alias.go | 4 +- x/bank/client/cli/query.go | 135 +-- x/bank/keeper/keeper.go | 2 + x/bank/keeper/querier.go | 38 +- x/bank/module.go | 6 +- x/bank/types/querier.go | 8 +- x/bank/types/query.pb.go | 1219 ++++++++++++++++++++++------ x/bank/types/query.proto | 58 +- x/capability/module.go | 2 +- x/crisis/module.go | 3 +- x/distribution/module.go | 4 +- x/evidence/module.go | 7 +- x/genutil/module.go | 2 +- x/gov/module.go | 4 +- x/ibc-transfer/module.go | 4 +- x/ibc/module.go | 4 +- x/mint/module.go | 4 +- x/params/module.go | 2 +- x/slashing/module.go | 4 +- x/staking/module.go | 4 +- x/upgrade/module.go | 7 +- 28 files changed, 1125 insertions(+), 432 deletions(-) diff --git a/buf.yaml b/buf.yaml index 11fb8f487faf..9dbea6b153a6 100644 --- a/buf.yaml +++ b/buf.yaml @@ -12,6 +12,7 @@ lint: - UNARY_RPC - COMMENT_FIELD - PACKAGE_DIRECTORY_MATCH + - SERVICE_SUFFIX ignore: - third_party - codec/testdata diff --git a/client/query.go b/client/query.go index c0adb475175d..bd381a9bd59e 100644 --- a/client/query.go +++ b/client/query.go @@ -242,12 +242,12 @@ func parseQueryStorePath(path string) (storeName string, err error) { // QueryConn returns a new grpc ClientConn for making grpc query calls that // get routed to the node's ABCI query handler -func (ctx CLIContext) QueryConn() gogogrpc.ClientConn { +func (ctx Context) QueryConn() gogogrpc.ClientConn { return cliQueryConn{ctx} } type cliQueryConn struct { - ctx CLIContext + ctx Context } var _ gogogrpc.ClientConn = cliQueryConn{} diff --git a/simapp/cmd/simcli/main.go b/simapp/cmd/simcli/main.go index 780fcaca7f42..66a1cb90051d 100644 --- a/simapp/cmd/simcli/main.go +++ b/simapp/cmd/simcli/main.go @@ -102,8 +102,13 @@ func queryCmd(cdc *codec.Codec) *cobra.Command { flags.LineBreak, ) + clientCtx := client.Context{} + clientCtx = clientCtx. + WithJSONMarshaler(appCodec). + WithCodec(cdc) + // add modules' query commands - simapp.ModuleBasics.AddQueryCommands(queryCmd, cdc) + simapp.ModuleBasics.AddQueryCommands(queryCmd, clientCtx) return queryCmd } diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index 20afd6efac9b..c0237794fe17 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -121,7 +121,7 @@ func (mr *MockAppModuleBasicMockRecorder) GetTxCmd(arg0 interface{}) *gomock.Cal } // GetQueryCmd mocks base method -func (m *MockAppModuleBasic) GetQueryCmd(arg0 *codec.Codec) *cobra.Command { +func (m *MockAppModuleBasic) GetQueryCmd(arg0 client.Context) *cobra.Command { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetQueryCmd", arg0) ret0, _ := ret[0].(*cobra.Command) @@ -238,7 +238,7 @@ func (mr *MockAppModuleGenesisMockRecorder) GetTxCmd(arg0 interface{}) *gomock.C } // GetQueryCmd mocks base method -func (m *MockAppModuleGenesis) GetQueryCmd(arg0 *codec.Codec) *cobra.Command { +func (m *MockAppModuleGenesis) GetQueryCmd(arg0 client.Context) *cobra.Command { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetQueryCmd", arg0) ret0, _ := ret[0].(*cobra.Command) @@ -383,7 +383,7 @@ func (mr *MockAppModuleMockRecorder) GetTxCmd(arg0 interface{}) *gomock.Call { } // GetQueryCmd mocks base method -func (m *MockAppModule) GetQueryCmd(arg0 *codec.Codec) *cobra.Command { +func (m *MockAppModule) GetQueryCmd(arg0 client.Context) *cobra.Command { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetQueryCmd", arg0) ret0, _ := ret[0].(*cobra.Command) diff --git a/tests/mocks/types_router.go b/tests/mocks/types_router.go index e5177b4a7e31..536a4a3a9635 100644 --- a/tests/mocks/types_router.go +++ b/tests/mocks/types_router.go @@ -114,13 +114,13 @@ func (mr *MockQueryRouterMockRecorder) Route(path interface{}) *gomock.Call { } // RegisterService mocks base method -func (m *MockQueryRouter) RegisterService(sd *grpc.ServiceDesc, ss interface{}) { +func (m *MockQueryRouter) RegisterService(sd *grpc.ServiceDesc, querier interface{}) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterService", sd, ss) + m.ctrl.Call(m, "RegisterService", sd, querier) } // RegisterService indicates an expected call of RegisterService -func (mr *MockQueryRouterMockRecorder) RegisterService(sd, ss interface{}) *gomock.Call { +func (mr *MockQueryRouterMockRecorder) RegisterService(sd, querier interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterService", reflect.TypeOf((*MockQueryRouter)(nil).RegisterService), sd, ss) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterService", reflect.TypeOf((*MockQueryRouter)(nil).RegisterService), sd, querier) } diff --git a/types/module/module.go b/types/module/module.go index 2cfbe1dbcf61..048f470705fc 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -55,7 +55,7 @@ type AppModuleBasic interface { // client functionality RegisterRESTRoutes(client.Context, *mux.Router) GetTxCmd(client.Context) *cobra.Command - GetQueryCmd(*codec.Codec) *cobra.Command + GetQueryCmd(client.Context) *cobra.Command } // BasicManager is a collection of AppModuleBasic @@ -115,9 +115,9 @@ func (bm BasicManager) AddTxCommands(rootTxCmd *cobra.Command, ctx client.Contex } // AddQueryCommands adds all query commands to the rootQueryCmd -func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command, cdc *codec.Codec) { +func (bm BasicManager) AddQueryCommands(rootQueryCmd *cobra.Command, clientCtx client.Context) { for _, b := range bm { - if cmd := b.GetQueryCmd(cdc); cmd != nil { + if cmd := b.GetQueryCmd(clientCtx); cmd != nil { rootQueryCmd.AddCommand(cmd) } } diff --git a/x/auth/module.go b/x/auth/module.go index 72aa4cb77d1b..0d07d9cfbdb9 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -70,8 +70,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns the root query command for the auth module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(context.Codec) } // RegisterInterfaceTypes registers interfaces and implementations of the auth module. diff --git a/x/bank/alias.go b/x/bank/alias.go index 79b299f528fb..10a95b428249 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -66,8 +66,8 @@ type ( MsgMultiSend = types.MsgMultiSend Input = types.Input Output = types.Output - QueryBalanceRequest = types.QueryBalanceRequest - QueryAllBalancesRequest = types.QueryAllBalancesRequest + BalanceRequest = types.BalanceRequest + AllBalancesRequest = types.AllBalancesRequest GenesisBalancesIterator = types.GenesisBalancesIterator Keeper = keeper.Keeper GenesisState = types.GenesisState diff --git a/x/bank/client/cli/query.go b/x/bank/client/cli/query.go index d8766bb20f63..f443c87232c6 100644 --- a/x/bank/client/cli/query.go +++ b/x/bank/client/cli/query.go @@ -10,7 +10,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -21,7 +20,7 @@ const ( ) // NewQueryCmd returns a root CLI command handler for all x/bank query commands. -func NewQueryCmd(m codec.Marshaler) *cobra.Command { +func NewQueryCmd(clientCtx client.Context) *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: "Querying commands for the bank module", @@ -30,137 +29,43 @@ func NewQueryCmd(m codec.Marshaler) *cobra.Command { RunE: client.ValidateCmd, } - cmd.AddCommand(NewBalancesCmd(m)) + cmd.AddCommand( + NewBalancesCmd(clientCtx), + NewCmdQueryTotalSupply(clientCtx), + ) return cmd } // NewBalancesCmd returns a CLI command handler for querying account balance(s). -func NewBalancesCmd(m codec.Marshaler) *cobra.Command { +func NewBalancesCmd(clientCtx client.Context) *cobra.Command { cmd := &cobra.Command{ Use: "balances [address]", Short: "Query for account balance(s) by address", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - cliCtx := context.NewCLIContext().WithMarshaler(m) - addr, err := sdk.AccAddressFromBech32(args[0]) if err != nil { return err } - queryClient := types.NewQueryServiceClient(cliCtx.QueryConn()) + queryClient := types.NewQueryClient(clientCtx.QueryConn()) denom := viper.GetString(flagDenom) if denom == "" { request := types.NewQueryAllBalancesRequest(addr) - result, err := queryClient.QueryAllBalances(gocontext.Background(), request) + result, err := queryClient.AllBalances(gocontext.Background(), request) if err != nil { return err } - return cliCtx.Println(result.Balances) + return clientCtx.Println(result.Balances) } else { params := types.NewQueryBalanceRequest(addr, denom) - result, err := queryClient.QueryBalance(gocontext.Background(), params) + result, err := queryClient.Balance(gocontext.Background(), params) if err != nil { return err } - return cliCtx.Println(result) - } - }, - } - - cmd.Flags().String(flagDenom, "", "The specific balance denomination to query for") - - return flags.GetCommands(cmd)[0] -} - -// --------------------------------------------------------------------------- -// Deprecated -// -// TODO: Remove once client-side Protobuf migration has been completed. -// --------------------------------------------------------------------------- - -// GetQueryCmd returns the parent querying command for the bank module. -// -// TODO: Remove once client-side Protobuf migration has been completed. -// ref: https://github.com/cosmos/cosmos-sdk/issues/5864 -func GetQueryCmd(cdc *codec.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the bank module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetBalancesCmd(cdc), - GetCmdQueryTotalSupply(cdc), - ) - - return cmd -} - -// GetAccountCmd returns a CLI command handler that facilitates querying for a -// single or all account balances by address. -// -// TODO: Remove once client-side Protobuf migration has been completed. -// ref: https://github.com/cosmos/cosmos-sdk/issues/5864 -func GetBalancesCmd(cdc *codec.Codec) *cobra.Command { - cmd := &cobra.Command{ - Use: "balances [address]", - Short: "Query for account balances by address", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.NewContext().WithCodec(cdc) - - addr, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - var ( - params interface{} - result interface{} - route string - ) - - denom := viper.GetString(flagDenom) - if denom == "" { - params = types.NewQueryAllBalancesRequest(addr) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryAllBalances) - } else { - params = types.NewQueryBalanceRequest(addr, denom) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryBalance) - } - - bz, err := cdc.MarshalJSON(params) - if err != nil { - return fmt.Errorf("failed to marshal params: %w", err) - } - - res, _, err := clientCtx.QueryWithData(route, bz) - if err != nil { - return err - } - - if denom == "" { - var balances sdk.Coins - if err := cdc.UnmarshalJSON(res, &balances); err != nil { - return err - } - - result = balances - } else { - var balance sdk.Coin - if err := cdc.UnmarshalJSON(res, &balance); err != nil { - return err - } - - result = balance + return clientCtx.Println(result) } - - return clientCtx.PrintOutput(result) }, } @@ -169,9 +74,7 @@ func GetBalancesCmd(cdc *codec.Codec) *cobra.Command { return flags.GetCommands(cmd)[0] } -// TODO: Remove once client-side Protobuf migration has been completed. -// ref: https://github.com/cosmos/cosmos-sdk/issues/5864 -func GetCmdQueryTotalSupply(cdc *codec.Codec) *cobra.Command { +func NewCmdQueryTotalSupply(clientCtx client.Context) *cobra.Command { cmd := &cobra.Command{ Use: "total [denom]", Args: cobra.MaximumNArgs(1), @@ -190,13 +93,21 @@ $ %s query %s total stake ), ), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.NewContext().WithCodec(cdc) + queryClient := types.NewQueryClient(clientCtx.QueryConn()) if len(args) == 0 { - return queryTotalSupply(clientCtx, cdc) + res, err := queryClient.TotalSupply(gocontext.Background(), &types.TotalSupplyRequest{}) + if err != nil { + return err + } + return clientCtx.PrintOutput(res.Balances) } - return querySupplyOf(clientCtx, cdc, args[0]) + res, err := queryClient.SupplyOf(gocontext.Background(), &types.SupplyOfRequest{Denom: args[0]}) + if err != nil { + return err + } + return clientCtx.PrintOutput(res.Amount) }, } diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index d50655566959..6c0fa582c038 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -41,6 +41,8 @@ type Keeper interface { UnmarshalSupply(bz []byte) (exported.SupplyI, error) MarshalSupplyJSON(supply exported.SupplyI) ([]byte, error) UnmarshalSupplyJSON(bz []byte) (exported.SupplyI, error) + + types.QueryServer } // BaseKeeper manages transfers between accounts. It implements the Keeper interface. diff --git a/x/bank/keeper/querier.go b/x/bank/keeper/querier.go index 3daeef74fac2..50f4597371e4 100644 --- a/x/bank/keeper/querier.go +++ b/x/bank/keeper/querier.go @@ -10,24 +10,19 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/bank/types" ) -type Querier struct { - BaseKeeper -} - -var _ types.QueryServiceServer = Querier{} +var _ types.QueryServer = BaseKeeper{} -func (q Querier) QueryBalance(ctx context.Context, req *types.QueryBalanceRequest) (*types.QueryBalanceResponse, error) { +func (q BaseKeeper) Balance(ctx context.Context, req *types.BalanceRequest) (*types.BalanceResponse, error) { balance := q.GetBalance(sdk.UnwrapSDKContext(ctx), req.Address, req.Denom) - return &types.QueryBalanceResponse{Balance: &balance}, nil + return &types.BalanceResponse{Balance: &balance}, nil } -func (q Querier) QueryAllBalances(c context.Context, req *types.QueryAllBalancesRequest) (*types.QueryAllBalancesResponse, error) { +func (q BaseKeeper) AllBalances(c context.Context, req *types.AllBalancesRequest) (*types.AllBalancesResponse, error) { ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(q.storeKey) @@ -52,7 +47,24 @@ func (q Querier) QueryAllBalances(c context.Context, req *types.QueryAllBalances return nil, err } - return &types.QueryAllBalancesResponse{Balances: balances, Page: pageRes}, nil + return &types.AllBalancesResponse{Balances: balances, Page: pageRes}, nil +} + +func (q BaseKeeper) TotalSupply(c context.Context, request *types.TotalSupplyRequest) (*types.TotalSupplyResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + // TODO: add pagination once it can be supported properly with supply no longer being stored as a single blob + totalSupply := q.GetSupply(ctx).GetTotal() + + return &types.TotalSupplyResponse{Balances: totalSupply}, nil +} + +func (q BaseKeeper) SupplyOf(c context.Context, request *types.SupplyOfRequest) (*types.SupplyOfResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + supply := q.GetSupply(ctx).GetTotal().AmountOf(request.Denom) + + return &types.SupplyOfResponse{Amount: supply}, nil } // NewQuerier returns a new sdk.Keeper instance. @@ -78,7 +90,7 @@ func NewQuerier(k Keeper) sdk.Querier { } func queryBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { - var params types.QueryBalanceRequest + var params types.BalanceRequest if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) @@ -95,7 +107,7 @@ func queryBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, err } func queryAllBalance(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { - var params types.QueryAllBalancesRequest + var params types.AllBalancesRequest if err := types.ModuleCdc.UnmarshalJSON(req.Data, ¶ms); err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) diff --git a/x/bank/module.go b/x/bank/module.go index 8a97a2383897..dfb726b07e66 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -69,8 +69,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns no root query command for the bank module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.NewQueryCmd(context) } // RegisterInterfaceTypes registers interfaces and implementations of the bank module. @@ -89,7 +89,7 @@ type AppModule struct { } func (am AppModule) RegisterQueryService(server grpc.Server) { - types.RegisterQueryServiceServer(server, keeper.Querier{Keeper: am.keeper}) + types.RegisterQueryServer(server, am.keeper) } // NewAppModule creates a new AppModule object diff --git a/x/bank/types/querier.go b/x/bank/types/querier.go index 5599f64afc2e..ff39e216d582 100644 --- a/x/bank/types/querier.go +++ b/x/bank/types/querier.go @@ -13,13 +13,13 @@ const ( ) // NewQueryBalanceRequest creates a new instance of QueryBalanceRequest. -func NewQueryBalanceRequest(addr sdk.AccAddress, denom string) *QueryBalanceRequest { - return &QueryBalanceRequest{Address: addr, Denom: denom} +func NewQueryBalanceRequest(addr sdk.AccAddress, denom string) *BalanceRequest { + return &BalanceRequest{Address: addr, Denom: denom} } // NewQueryAllBalancesRequest creates a new instance of QueryAllBalancesRequest. -func NewQueryAllBalancesRequest(addr sdk.AccAddress) *QueryAllBalancesRequest { - return &QueryAllBalancesRequest{Address: addr} +func NewQueryAllBalancesRequest(addr sdk.AccAddress) *AllBalancesRequest { + return &AllBalancesRequest{Address: addr} } // QueryTotalSupply defines the params for the following queries: diff --git a/x/bank/types/query.pb.go b/x/bank/types/query.pb.go index bcf18523f9a7..cb1e89dc5114 100644 --- a/x/bank/types/query.pb.go +++ b/x/bank/types/query.pb.go @@ -33,23 +33,23 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryBalanceParams defines the params for querying an account balance. -type QueryBalanceRequest struct { +type BalanceRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } -func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceRequest) ProtoMessage() {} -func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { +func (m *BalanceRequest) Reset() { *m = BalanceRequest{} } +func (m *BalanceRequest) String() string { return proto.CompactTextString(m) } +func (*BalanceRequest) ProtoMessage() {} +func (*BalanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b761440f9b86d1e8, []int{0} } -func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { +func (m *BalanceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_BalanceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -59,26 +59,26 @@ func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceRequest.Merge(m, src) +func (m *BalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceRequest.Merge(m, src) } -func (m *QueryBalanceRequest) XXX_Size() int { +func (m *BalanceRequest) XXX_Size() int { return m.Size() } -func (m *QueryBalanceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) +func (m *BalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo +var xxx_messageInfo_BalanceRequest proto.InternalMessageInfo -func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *BalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { if m != nil { return m.Address } return nil } -func (m *QueryBalanceRequest) GetDenom() string { +func (m *BalanceRequest) GetDenom() string { if m != nil { return m.Denom } @@ -86,22 +86,22 @@ func (m *QueryBalanceRequest) GetDenom() string { } // QueryBalanceResponse is the response for the QueryBalance rpc method -type QueryBalanceResponse struct { +type BalanceResponse struct { Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` } -func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } -func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryBalanceResponse) ProtoMessage() {} -func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { +func (m *BalanceResponse) Reset() { *m = BalanceResponse{} } +func (m *BalanceResponse) String() string { return proto.CompactTextString(m) } +func (*BalanceResponse) ProtoMessage() {} +func (*BalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b761440f9b86d1e8, []int{1} } -func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { +func (m *BalanceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_BalanceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -111,19 +111,19 @@ func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryBalanceResponse.Merge(m, src) +func (m *BalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalanceResponse.Merge(m, src) } -func (m *QueryBalanceResponse) XXX_Size() int { +func (m *BalanceResponse) XXX_Size() int { return m.Size() } -func (m *QueryBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) +func (m *BalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BalanceResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo +var xxx_messageInfo_BalanceResponse proto.InternalMessageInfo -func (m *QueryBalanceResponse) GetBalance() *types.Coin { +func (m *BalanceResponse) GetBalance() *types.Coin { if m != nil { return m.Balance } @@ -131,23 +131,23 @@ func (m *QueryBalanceResponse) GetBalance() *types.Coin { } // QueryAllBalancesParams defines the params for querying all account balances -type QueryAllBalancesRequest struct { +type AllBalancesRequest struct { Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` Page *query.PageRequest `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` } -func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} } -func (m *QueryAllBalancesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllBalancesRequest) ProtoMessage() {} -func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) { +func (m *AllBalancesRequest) Reset() { *m = AllBalancesRequest{} } +func (m *AllBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*AllBalancesRequest) ProtoMessage() {} +func (*AllBalancesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b761440f9b86d1e8, []int{2} } -func (m *QueryAllBalancesRequest) XXX_Unmarshal(b []byte) error { +func (m *AllBalancesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryAllBalancesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_AllBalancesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -157,26 +157,26 @@ func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryAllBalancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllBalancesRequest.Merge(m, src) +func (m *AllBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllBalancesRequest.Merge(m, src) } -func (m *QueryAllBalancesRequest) XXX_Size() int { +func (m *AllBalancesRequest) XXX_Size() int { return m.Size() } -func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllBalancesRequest.DiscardUnknown(m) +func (m *AllBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AllBalancesRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo +var xxx_messageInfo_AllBalancesRequest proto.InternalMessageInfo -func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *AllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { if m != nil { return m.Address } return nil } -func (m *QueryAllBalancesRequest) GetPage() *query.PageRequest { +func (m *AllBalancesRequest) GetPage() *query.PageRequest { if m != nil { return m.Page } @@ -184,23 +184,23 @@ func (m *QueryAllBalancesRequest) GetPage() *query.PageRequest { } // QueryAllBalancesResponse is the response to the QueryAllBalances rpc method -type QueryAllBalancesResponse struct { +type AllBalancesResponse struct { Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` Page *query.PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` } -func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} } -func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllBalancesResponse) ProtoMessage() {} -func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) { +func (m *AllBalancesResponse) Reset() { *m = AllBalancesResponse{} } +func (m *AllBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*AllBalancesResponse) ProtoMessage() {} +func (*AllBalancesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b761440f9b86d1e8, []int{3} } -func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error { +func (m *AllBalancesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryAllBalancesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_AllBalancesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -210,75 +210,247 @@ func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *QueryAllBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src) +func (m *AllBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllBalancesResponse.Merge(m, src) } -func (m *QueryAllBalancesResponse) XXX_Size() int { +func (m *AllBalancesResponse) XXX_Size() int { return m.Size() } -func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m) +func (m *AllBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AllBalancesResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo +var xxx_messageInfo_AllBalancesResponse proto.InternalMessageInfo -func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *AllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Balances } return nil } -func (m *QueryAllBalancesResponse) GetPage() *query.PageResponse { +func (m *AllBalancesResponse) GetPage() *query.PageResponse { if m != nil { return m.Page } return nil } +type TotalSupplyRequest struct { +} + +func (m *TotalSupplyRequest) Reset() { *m = TotalSupplyRequest{} } +func (m *TotalSupplyRequest) String() string { return proto.CompactTextString(m) } +func (*TotalSupplyRequest) ProtoMessage() {} +func (*TotalSupplyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{4} +} +func (m *TotalSupplyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TotalSupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TotalSupplyRequest.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 *TotalSupplyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalSupplyRequest.Merge(m, src) +} +func (m *TotalSupplyRequest) XXX_Size() int { + return m.Size() +} +func (m *TotalSupplyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TotalSupplyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TotalSupplyRequest proto.InternalMessageInfo + +type TotalSupplyResponse struct { + Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"` +} + +func (m *TotalSupplyResponse) Reset() { *m = TotalSupplyResponse{} } +func (m *TotalSupplyResponse) String() string { return proto.CompactTextString(m) } +func (*TotalSupplyResponse) ProtoMessage() {} +func (*TotalSupplyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{5} +} +func (m *TotalSupplyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TotalSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TotalSupplyResponse.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 *TotalSupplyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalSupplyResponse.Merge(m, src) +} +func (m *TotalSupplyResponse) XXX_Size() int { + return m.Size() +} +func (m *TotalSupplyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TotalSupplyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TotalSupplyResponse proto.InternalMessageInfo + +func (m *TotalSupplyResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Balances + } + return nil +} + +type SupplyOfRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *SupplyOfRequest) Reset() { *m = SupplyOfRequest{} } +func (m *SupplyOfRequest) String() string { return proto.CompactTextString(m) } +func (*SupplyOfRequest) ProtoMessage() {} +func (*SupplyOfRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{6} +} +func (m *SupplyOfRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupplyOfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SupplyOfRequest.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 *SupplyOfRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupplyOfRequest.Merge(m, src) +} +func (m *SupplyOfRequest) XXX_Size() int { + return m.Size() +} +func (m *SupplyOfRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SupplyOfRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SupplyOfRequest proto.InternalMessageInfo + +func (m *SupplyOfRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type SupplyOfResponse struct { + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` +} + +func (m *SupplyOfResponse) Reset() { *m = SupplyOfResponse{} } +func (m *SupplyOfResponse) String() string { return proto.CompactTextString(m) } +func (*SupplyOfResponse) ProtoMessage() {} +func (*SupplyOfResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b761440f9b86d1e8, []int{7} +} +func (m *SupplyOfResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SupplyOfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SupplyOfResponse.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 *SupplyOfResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SupplyOfResponse.Merge(m, src) +} +func (m *SupplyOfResponse) XXX_Size() int { + return m.Size() +} +func (m *SupplyOfResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SupplyOfResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SupplyOfResponse proto.InternalMessageInfo + func init() { - proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceRequest") - proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos_sdk.x.bank.v1.QueryBalanceResponse") - proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesRequest") - proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.QueryAllBalancesResponse") + proto.RegisterType((*BalanceRequest)(nil), "cosmos_sdk.x.bank.v1.BalanceRequest") + proto.RegisterType((*BalanceResponse)(nil), "cosmos_sdk.x.bank.v1.BalanceResponse") + proto.RegisterType((*AllBalancesRequest)(nil), "cosmos_sdk.x.bank.v1.AllBalancesRequest") + proto.RegisterType((*AllBalancesResponse)(nil), "cosmos_sdk.x.bank.v1.AllBalancesResponse") + proto.RegisterType((*TotalSupplyRequest)(nil), "cosmos_sdk.x.bank.v1.TotalSupplyRequest") + proto.RegisterType((*TotalSupplyResponse)(nil), "cosmos_sdk.x.bank.v1.TotalSupplyResponse") + proto.RegisterType((*SupplyOfRequest)(nil), "cosmos_sdk.x.bank.v1.SupplyOfRequest") + proto.RegisterType((*SupplyOfResponse)(nil), "cosmos_sdk.x.bank.v1.SupplyOfResponse") } func init() { proto.RegisterFile("x/bank/types/query.proto", fileDescriptor_b761440f9b86d1e8) } var fileDescriptor_b761440f9b86d1e8 = []byte{ - // 504 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xbf, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xe3, 0xf0, 0xa3, 0xe0, 0x76, 0x00, 0x37, 0x12, 0x51, 0x84, 0x2e, 0xe1, 0x06, 0x94, - 0x56, 0x8a, 0xdd, 0x0b, 0x20, 0xe6, 0xa4, 0x62, 0x62, 0x81, 0x63, 0x63, 0xa9, 0x9c, 0x3b, 0xeb, - 0x7a, 0x6a, 0x62, 0x5f, 0xcf, 0xce, 0x29, 0x51, 0xd5, 0x85, 0xbf, 0x00, 0x89, 0x15, 0xb1, 0xb0, - 0x31, 0xf3, 0x47, 0x74, 0xac, 0x84, 0x90, 0x98, 0x0a, 0x4a, 0xf8, 0x2b, 0x98, 0xd0, 0xd9, 0x0e, - 0xb9, 0xd2, 0x70, 0xca, 0xc2, 0x92, 0xdc, 0xd9, 0xdf, 0xf7, 0xde, 0xe7, 0xeb, 0xf7, 0x7c, 0xb0, - 0x3e, 0x21, 0x03, 0xca, 0x8f, 0x88, 0x9a, 0x26, 0x4c, 0x92, 0xe3, 0x31, 0x4b, 0xa7, 0x38, 0x49, - 0x85, 0x12, 0xa8, 0x16, 0x08, 0x39, 0x12, 0xf2, 0x40, 0x86, 0x47, 0x78, 0x82, 0x73, 0x11, 0xce, - 0xbc, 0xc6, 0x43, 0x75, 0x18, 0xa7, 0xe1, 0x41, 0x42, 0x53, 0x35, 0x25, 0x5a, 0x48, 0x22, 0x11, - 0x89, 0xe5, 0x93, 0x89, 0x6e, 0xe0, 0x55, 0x3a, 0x11, 0x0d, 0x19, 0xa1, 0x49, 0x4c, 0x28, 0xe7, - 0x42, 0x51, 0x15, 0x0b, 0x2e, 0xad, 0xfe, 0xae, 0x01, 0xd0, 0xbf, 0x76, 0xe9, 0x7e, 0x81, 0x89, - 0x24, 0x34, 0x8a, 0xb9, 0x8e, 0x30, 0xbb, 0xee, 0x04, 0x6e, 0xbf, 0xcc, 0x77, 0xfa, 0x74, 0x48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c2, 0x2d, 0x8d, 0xfd, 0x8a, 0xa5, 0x59, 0x1c, 0x30, 0xf4, 0x01, 0xd8, 0x05, - 0x6b, 0x02, 0xed, 0xe0, 0x55, 0x83, 0x8d, 0x57, 0x0c, 0x53, 0x63, 0x77, 0x1d, 0xa9, 0x29, 0xef, - 0x3e, 0x7d, 0xf3, 0xe5, 0xe7, 0xbb, 0xaa, 0x87, 0x08, 0x59, 0xc6, 0x10, 0x7b, 0xb9, 0x32, 0x8f, - 0x58, 0x5f, 0xe4, 0xc4, 0x76, 0xe5, 0x94, 0x9c, 0xe8, 0x69, 0x3a, 0x45, 0x1f, 0x01, 0xbc, 0xf3, - 0xf7, 0x41, 0xa3, 0x4e, 0x49, 0xe5, 0xab, 0xf3, 0xd2, 0xc0, 0xeb, 0xca, 0x2d, 0xec, 0x9e, 0x86, - 0xdd, 0x45, 0xed, 0x52, 0x58, 0xb9, 0xa4, 0xed, 0xef, 0x9f, 0xcd, 0x1c, 0x70, 0x3e, 0x73, 0xc0, - 0x8f, 0x99, 0x03, 0xde, 0xce, 0x9d, 0xca, 0xf9, 0xdc, 0xa9, 0x7c, 0x9b, 0x3b, 0x95, 0xd7, 0x3b, - 0xa5, 0xcd, 0x2d, 0x7e, 0x5e, 0x06, 0x37, 0xf5, 0xd5, 0x7d, 0xf4, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0xaa, 0xc7, 0xf5, 0x9c, 0x75, 0x04, 0x00, 0x00, + // 612 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x86, 0xe3, 0x7e, 0xfd, 0xfb, 0x26, 0x40, 0x61, 0x12, 0xa4, 0xc8, 0x20, 0x27, 0xb5, 0x20, + 0x4d, 0x17, 0x19, 0x93, 0x00, 0x7b, 0x92, 0x4a, 0x48, 0x88, 0x05, 0x60, 0x58, 0x75, 0x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58, 0x15, 0xd7, 0xec, 0xdd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xf6, 0x39, 0x8d, + 0x21, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -289,119 +461,191 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// QueryServiceClient is the client API for QueryService service. +// QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // QueryBalance queries the balance of a single coin for a single account - QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) - // QueryBalance queries the balance of all coins for a single account - QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) +type QueryClient interface { + // Balance queries the balance of a single coin for a single account + Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) + // AllBalances queries the balance of all coins for a single account + AllBalances(ctx context.Context, in *AllBalancesRequest, opts ...grpc.CallOption) (*AllBalancesResponse, error) + TotalSupply(ctx context.Context, in *TotalSupplyRequest, opts ...grpc.CallOption) (*TotalSupplyResponse, error) + SupplyOf(ctx context.Context, in *SupplyOfRequest, opts ...grpc.CallOption) (*SupplyOfResponse, error) } -type queryServiceClient struct { +type queryClient struct { cc grpc1.ClientConn } -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} } -func (c *queryServiceClient) QueryBalance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { - out := new(QueryBalanceResponse) - err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", in, out, opts...) +func (c *queryClient) Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) { + out := new(BalanceResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/Balance", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryServiceClient) QueryAllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) { - out := new(QueryAllBalancesResponse) - err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", in, out, opts...) +func (c *queryClient) AllBalances(ctx context.Context, in *AllBalancesRequest, opts ...grpc.CallOption) (*AllBalancesResponse, error) { + out := new(AllBalancesResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/AllBalances", in, out, opts...) if err != nil { return nil, err } return out, nil } -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // QueryBalance queries the balance of a single coin for a single account - QueryBalance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) - // QueryBalance queries the balance of all coins for a single account - QueryAllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) +func (c *queryClient) TotalSupply(ctx context.Context, in *TotalSupplyRequest, opts ...grpc.CallOption) (*TotalSupplyResponse, error) { + out := new(TotalSupplyResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/TotalSupply", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { +func (c *queryClient) SupplyOf(ctx context.Context, in *SupplyOfRequest, opts ...grpc.CallOption) (*SupplyOfResponse, error) { + out := new(SupplyOfResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.x.bank.v1.Query/SupplyOf", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Balance queries the balance of a single coin for a single account + Balance(context.Context, *BalanceRequest) (*BalanceResponse, error) + // AllBalances queries the balance of all coins for a single account + AllBalances(context.Context, *AllBalancesRequest) (*AllBalancesResponse, error) + TotalSupply(context.Context, *TotalSupplyRequest) (*TotalSupplyResponse, error) + SupplyOf(context.Context, *SupplyOfRequest) (*SupplyOfResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Balance(ctx context.Context, req *BalanceRequest) (*BalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") +} +func (*UnimplementedQueryServer) AllBalances(ctx context.Context, req *AllBalancesRequest) (*AllBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllBalances not implemented") +} +func (*UnimplementedQueryServer) TotalSupply(ctx context.Context, req *TotalSupplyRequest) (*TotalSupplyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalSupply not implemented") +} +func (*UnimplementedQueryServer) SupplyOf(ctx context.Context, req *SupplyOfRequest) (*SupplyOfResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SupplyOf not implemented") } -func (*UnimplementedQueryServiceServer) QueryBalance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryBalance not implemented") +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -func (*UnimplementedQueryServiceServer) QueryAllBalances(ctx context.Context, req *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryAllBalances not implemented") + +func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Balance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.Query/Balance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Balance(ctx, req.(*BalanceRequest)) + } + return interceptor(ctx, in, info, handler) } -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) +func _Query_AllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AllBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.x.bank.v1.Query/AllBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllBalances(ctx, req.(*AllBalancesRequest)) + } + return interceptor(ctx, in, info, handler) } -func _QueryService_QueryBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryBalanceRequest) +func _Query_TotalSupply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TotalSupplyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServiceServer).QueryBalance(ctx, in) + return srv.(QueryServer).TotalSupply(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryBalance", + FullMethod: "/cosmos_sdk.x.bank.v1.Query/TotalSupply", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).QueryBalance(ctx, req.(*QueryBalanceRequest)) + return srv.(QueryServer).TotalSupply(ctx, req.(*TotalSupplyRequest)) } return interceptor(ctx, in, info, handler) } -func _QueryService_QueryAllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllBalancesRequest) +func _Query_SupplyOf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SupplyOfRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServiceServer).QueryAllBalances(ctx, in) + return srv.(QueryServer).SupplyOf(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos_sdk.x.bank.v1.QueryService/QueryAllBalances", + FullMethod: "/cosmos_sdk.x.bank.v1.Query/SupplyOf", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).QueryAllBalances(ctx, req.(*QueryAllBalancesRequest)) + return srv.(QueryServer).SupplyOf(ctx, req.(*SupplyOfRequest)) } return interceptor(ctx, in, info, handler) } -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos_sdk.x.bank.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.x.bank.v1.Query", + HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "QueryBalance", - Handler: _QueryService_QueryBalance_Handler, + MethodName: "Balance", + Handler: _Query_Balance_Handler, + }, + { + MethodName: "AllBalances", + Handler: _Query_AllBalances_Handler, + }, + { + MethodName: "TotalSupply", + Handler: _Query_TotalSupply_Handler, }, { - MethodName: "QueryAllBalances", - Handler: _QueryService_QueryAllBalances_Handler, + MethodName: "SupplyOf", + Handler: _Query_SupplyOf_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "x/bank/types/query.proto", } -func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { +func (m *BalanceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -411,12 +655,12 @@ func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *BalanceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -438,7 +682,7 @@ func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { +func (m *BalanceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -448,12 +692,12 @@ func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *BalanceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -473,7 +717,7 @@ func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAllBalancesRequest) Marshal() (dAtA []byte, err error) { +func (m *AllBalancesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -483,12 +727,12 @@ func (m *QueryAllBalancesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllBalancesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *AllBalancesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -515,7 +759,7 @@ func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryAllBalancesResponse) Marshal() (dAtA []byte, err error) { +func (m *AllBalancesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -525,12 +769,12 @@ func (m *QueryAllBalancesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *AllBalancesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -564,6 +808,129 @@ func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *TotalSupplyRequest) 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 *TotalSupplyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TotalSupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *TotalSupplyResponse) 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 *TotalSupplyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TotalSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[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 *SupplyOfRequest) 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 *SupplyOfRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupplyOfRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SupplyOfResponse) 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 *SupplyOfResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SupplyOfResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -575,7 +942,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryBalanceRequest) Size() (n int) { +func (m *BalanceRequest) Size() (n int) { if m == nil { return 0 } @@ -592,7 +959,7 @@ func (m *QueryBalanceRequest) Size() (n int) { return n } -func (m *QueryBalanceResponse) Size() (n int) { +func (m *BalanceResponse) Size() (n int) { if m == nil { return 0 } @@ -605,7 +972,7 @@ func (m *QueryBalanceResponse) Size() (n int) { return n } -func (m *QueryAllBalancesRequest) Size() (n int) { +func (m *AllBalancesRequest) Size() (n int) { if m == nil { return 0 } @@ -622,7 +989,7 @@ func (m *QueryAllBalancesRequest) Size() (n int) { return n } -func (m *QueryAllBalancesResponse) Size() (n int) { +func (m *AllBalancesResponse) Size() (n int) { if m == nil { return 0 } @@ -634,20 +1001,276 @@ func (m *QueryAllBalancesResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - if m.Page != nil { - l = m.Page.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} + if m.Page != nil { + l = m.Page.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TotalSupplyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *TotalSupplyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SupplyOfRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SupplyOfResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Amount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *BalanceRequest) 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: BalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalanceResponse) 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: BalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { +func (m *AllBalancesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -670,10 +1293,10 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AllBalancesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -712,9 +1335,9 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -724,23 +1347,27 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + if m.Page == nil { + m.Page = &query.PageRequest{} + } + if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -766,7 +1393,7 @@ func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { +func (m *AllBalancesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -789,15 +1416,15 @@ func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AllBalancesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -824,10 +1451,44 @@ func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Balance == nil { - m.Balance = &types.Coin{} + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", 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.Page == nil { + m.Page = &query.PageResponse{} + } + if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -855,7 +1516,7 @@ func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { +func (m *TotalSupplyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -878,49 +1539,68 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllBalancesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: TotalSupplyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TotalSupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", 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 - } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - if byteLen < 0 { + if skippy < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + byteLen - if postIndex < 0 { + if (iNdEx + skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TotalSupplyResponse) 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 } - iNdEx = postIndex - case 2: + 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: TotalSupplyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TotalSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -947,10 +1627,8 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Page == nil { - m.Page = &query.PageRequest{} - } - if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Balances = append(m.Balances, types.Coin{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -978,7 +1656,7 @@ func (m *QueryAllBalancesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error { +func (m *SupplyOfRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1001,17 +1679,17 @@ func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllBalancesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SupplyOfRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupplyOfRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1021,31 +1699,82 @@ func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Balances = append(m.Balances, types.Coin{}) - if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 2: + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SupplyOfResponse) 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: SupplyOfResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SupplyOfResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1055,25 +1784,23 @@ func (m *QueryAllBalancesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Page == nil { - m.Page = &query.PageResponse{} - } - if err := m.Page.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/bank/types/query.proto b/x/bank/types/query.proto index 9f79ea52063a..387d76c056c0 100644 --- a/x/bank/types/query.proto +++ b/x/bank/types/query.proto @@ -9,41 +9,73 @@ import "types/query/pagination.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; // Query provides defines the gRPC querier service -service QueryService { - // QueryBalance queries the balance of a single coin for a single account - rpc QueryBalance (QueryBalanceRequest) returns (QueryBalanceResponse) { +service Query { + // Balance queries the balance of a single coin for a single account + rpc Balance (BalanceRequest) returns (BalanceResponse) { option (google.api.http) = { - get: "/cosmos_sdk/x/bank/v1/balance/{address}/{denom}" - }; + get: "/bank/balance/{address}/{denom}" + }; } - // QueryBalance queries the balance of all coins for a single account - rpc QueryAllBalances (QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + // AllBalances queries the balance of all coins for a single account + rpc AllBalances (AllBalancesRequest) returns (AllBalancesResponse) { option (google.api.http) = { - get: "/cosmos_sdk/x/bank/v1/balances/{address}" - }; + get: "/bank/balances/{address}" + }; + } + + rpc TotalSupply (TotalSupplyRequest) returns (TotalSupplyResponse) { + option (google.api.http) = { + get: "/bank/total" + }; + } + + rpc SupplyOf (SupplyOfRequest) returns (SupplyOfResponse) { + option (google.api.http) = { + get: "/bank/total/{denom}" + }; } } // QueryBalanceParams defines the params for querying an account balance. -message QueryBalanceRequest { +message BalanceRequest { bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; string denom = 2; } // QueryBalanceResponse is the response for the QueryBalance rpc method -message QueryBalanceResponse { +message BalanceResponse { cosmos_sdk.v1.Coin balance = 1; } // QueryAllBalancesParams defines the params for querying all account balances -message QueryAllBalancesRequest { +message AllBalancesRequest { bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; cosmos_sdk.query.v1.PageRequest page = 2; } // QueryAllBalancesResponse is the response to the QueryAllBalances rpc method -message QueryAllBalancesResponse { +message AllBalancesResponse { repeated cosmos_sdk.v1.Coin balances = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; cosmos_sdk.query.v1.PageResponse page = 2; } + +message TotalSupplyRequest { + // TODO: add pagination once supply is can be supported + // cosmos_sdk.query.v1.PageRequest page = 1; +} + +message TotalSupplyResponse { + repeated cosmos_sdk.v1.Coin balances = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // TODO: add pagination once supply is can be supported + // cosmos_sdk.query.v1.PageResponse page = 2; +} + +message SupplyOfRequest { + string denom = 1; +} + +message SupplyOfResponse { + string amount = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} diff --git a/x/capability/module.go b/x/capability/module.go index 96623c186603..9daefa2f59bd 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -69,7 +69,7 @@ func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} func (a AppModuleBasic) GetTxCmd(_ client.Context) *cobra.Command { return nil } // GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command { return nil } +func (AppModuleBasic) GetQueryCmd(_ client.Context) *cobra.Command { return nil } // ---------------------------------------------------------------------------- // AppModule diff --git a/x/crisis/module.go b/x/crisis/module.go index 453e4fc22045..a2f6ac38659f 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -3,6 +3,7 @@ package crisis import ( "encoding/json" "fmt" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" @@ -62,7 +63,7 @@ func (b AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns no root query command for the crisis module. -func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command { return nil } +func (AppModuleBasic) GetQueryCmd(_ client.Context) *cobra.Command { return nil } //____________________________________________________________________________ diff --git a/x/distribution/module.go b/x/distribution/module.go index 13af5c3a64b2..6879c63defc7 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -73,8 +73,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns the root query command for the distribution module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(StoreKey, cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(StoreKey, context.Codec) } // RegisterInterfaceTypes implements InterfaceModule diff --git a/x/evidence/module.go b/x/evidence/module.go index acb94dad5d2b..35d6a9cb241e 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -3,9 +3,10 @@ package evidence import ( "encoding/json" "fmt" - "github.com/gogo/protobuf/grpc" "math/rand" + "github.com/gogo/protobuf/grpc" + "github.com/gorilla/mux" "github.com/spf13/cobra" @@ -94,8 +95,8 @@ func (a AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetTxCmd returns the evidence module's root query command. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(StoreKey, cdc) +func (AppModuleBasic) GetQueryCmd(cdc client.Context) *cobra.Command { + return cli.GetQueryCmd(StoreKey, cdc.Codec) } func (AppModuleBasic) RegisterInterfaceTypes(registry types.InterfaceRegistry) { diff --git a/x/genutil/module.go b/x/genutil/module.go index f0a7d866aa17..cff4cc98ea6e 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -55,7 +55,7 @@ func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} func (AppModuleBasic) GetTxCmd(_ client.Context) *cobra.Command { return nil } // GetQueryCmd returns no root query command for the genutil module. -func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command { return nil } +func (AppModuleBasic) GetQueryCmd(_ client.Context) *cobra.Command { return nil } //____________________________________________________________________________ diff --git a/x/gov/module.go b/x/gov/module.go index 7597fe40e41b..899808a169c2 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -94,8 +94,8 @@ func (a AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns the root query command for the gov module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(StoreKey, cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(StoreKey, context.Codec) } // RegisterInterfaceTypes implements InterfaceModule.RegisterInterfaceTypes diff --git a/x/ibc-transfer/module.go b/x/ibc-transfer/module.go index e1d86a5619da..f4a1b1c26b17 100644 --- a/x/ibc-transfer/module.go +++ b/x/ibc-transfer/module.go @@ -77,8 +77,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd implements AppModuleBasic interface -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(cdc, QuerierRoute) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(context.Codec, QuerierRoute) } // RegisterInterfaceTypes registers module concrete types into protobuf Any. diff --git a/x/ibc/module.go b/x/ibc/module.go index 98d656d3e3aa..a865acfc3bc5 100644 --- a/x/ibc/module.go +++ b/x/ibc/module.go @@ -72,8 +72,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns no root query command for the ibc module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(QuerierRoute, cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(QuerierRoute, context.Codec) } // RegisterInterfaceTypes registers module concrete types into protobuf Any. diff --git a/x/mint/module.go b/x/mint/module.go index b2c8f4d6e5e3..3f3506ad6028 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -68,8 +68,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout func (AppModuleBasic) GetTxCmd(_ client.Context) *cobra.Command { return nil } // GetQueryCmd returns the root query command for the mint module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(context.Codec) } //____________________________________________________________________________ diff --git a/x/params/module.go b/x/params/module.go index 6748dd07388e..cdfb62f2e5ed 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -54,7 +54,7 @@ func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} func (AppModuleBasic) GetTxCmd(_ client.Context) *cobra.Command { return nil } // GetQueryCmd returns no root query command for the params module. -func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command { return nil } +func (AppModuleBasic) GetQueryCmd(_ client.Context) *cobra.Command { return nil } func (am AppModuleBasic) RegisterInterfaceTypes(registry types.InterfaceRegistry) { proposal.RegisterInterfaces(registry) diff --git a/x/slashing/module.go b/x/slashing/module.go index caa1da706c14..73fab6f1c68e 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -74,8 +74,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns no root query command for the slashing module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(StoreKey, cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(StoreKey, context.Codec) } //____________________________________________________________________________ diff --git a/x/staking/module.go b/x/staking/module.go index 14fa1e26bcc3..635cc7ab9f9e 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -77,8 +77,8 @@ func (AppModuleBasic) GetTxCmd(clientCtx client.Context) *cobra.Command { } // GetQueryCmd returns no root query command for the staking module. -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { - return cli.GetQueryCmd(StoreKey, cdc) +func (AppModuleBasic) GetQueryCmd(context client.Context) *cobra.Command { + return cli.GetQueryCmd(StoreKey, context.Codec) } //_____________________________________ diff --git a/x/upgrade/module.go b/x/upgrade/module.go index c54a1c206444..1153e025fca7 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -2,6 +2,7 @@ package upgrade import ( "encoding/json" + "github.com/gogo/protobuf/grpc" "github.com/gorilla/mux" @@ -52,14 +53,14 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, r *mux.Router } // GetQueryCmd returns the cli query commands for this module -func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command { +func (AppModuleBasic) GetQueryCmd(cdc client.Context) *cobra.Command { queryCmd := &cobra.Command{ Use: "upgrade", Short: "Querying commands for the upgrade module", } queryCmd.AddCommand(flags.GetCommands( - cli.GetPlanCmd(StoreKey, cdc), - cli.GetAppliedHeightCmd(StoreKey, cdc), + cli.GetPlanCmd(StoreKey, cdc.Codec), + cli.GetAppliedHeightCmd(StoreKey, cdc.Codec), )...) return queryCmd From 9dbd66083010b31dac1ced5321e712311467919d Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 2 Jun 2020 15:52:51 -0400 Subject: [PATCH 41/41] Fixes --- baseapp/abci.go | 49 ++ baseapp/baseapp.go | 8 +- baseapp/grpcrouter.go | 78 +-- baseapp/grpcrouter_test.go | 49 ++ baseapp/queryrouter.go | 28 - baseapp/queryrouter_test.go | 30 -- client/query.go | 2 +- codec/testdata/proto.pb.go | 478 ++++++++++++++++-- codec/testdata/proto.proto | 12 +- .../adr-021-protobuf-query-encoding.md | 2 +- simapp/app.go | 1 + types/module/module.go | 8 +- types/module/module_test.go | 4 +- types/router.go | 4 - x/bank/keeper/querier_test.go | 27 +- 15 files changed, 616 insertions(+), 164 deletions(-) create mode 100644 baseapp/grpcrouter_test.go diff --git a/baseapp/abci.go b/baseapp/abci.go index 72173ada2226..21c7901be3df 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -294,6 +294,10 @@ func (app *BaseApp) halt() { // Query implements the ABCI interface. It delegates to CommitMultiStore if it // implements Queryable. func (app *BaseApp) Query(req abci.RequestQuery) abci.ResponseQuery { + if grpcHandler := app.grpcRouter.Route(req.Path); grpcHandler != nil { + return handleQueryGRPC(app, grpcHandler, req) + } + path := splitPath(req.Path) if len(path) == 0 { sdkerrors.QueryResult(sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "no query path provided")) @@ -317,6 +321,51 @@ func (app *BaseApp) Query(req abci.RequestQuery) abci.ResponseQuery { return sdkerrors.QueryResult(sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown query path")) } +func handleQueryGRPC(app *BaseApp, handler GRPCHandler, req abci.RequestQuery) abci.ResponseQuery { + // when a client did not provide a query height, manually inject the latest + if req.Height == 0 { + req.Height = app.LastBlockHeight() + } + + if req.Height <= 1 && req.Prove { + return sdkerrors.QueryResult( + sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "cannot query with proof when height <= 1; please provide a valid height", + ), + ) + } + + cacheMS, err := app.cms.CacheMultiStoreWithVersion(req.Height) + if err != nil { + return sdkerrors.QueryResult( + sdkerrors.Wrapf( + sdkerrors.ErrInvalidRequest, + "failed to load state at height %d; %s (latest height: %d)", req.Height, err, app.LastBlockHeight(), + ), + ) + } + + // cache wrap the commit-multistore for safety + ctx := sdk.NewContext( + cacheMS, app.checkState.ctx.BlockHeader(), true, app.logger, + ).WithMinGasPrices(app.minGasPrices) + + res, err := handler(ctx, req) + + if err != nil { + space, code, log := sdkerrors.ABCIInfo(err, false) + return abci.ResponseQuery{ + Code: code, + Codespace: space, + Log: log, + Height: req.Height, + } + } + + return res +} + func handleQueryApp(app *BaseApp, path []string, req abci.RequestQuery) abci.ResponseQuery { if len(path) >= 2 { switch path[1] { diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 918101ad5f02..3535cb327de0 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -6,6 +6,8 @@ import ( "runtime/debug" "strings" + "github.com/gogo/protobuf/grpc" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" @@ -48,7 +50,7 @@ type BaseApp struct { // nolint: maligned storeLoader StoreLoader // function to handle store loading, may be overridden with SetStoreLoader() router sdk.Router // handle any kind of message queryRouter sdk.QueryRouter // router for redirecting query calls - grpcRouter GRPCRouter // router for redirecting gRPC query calls + grpcRouter *GRPCRouter // router for redirecting gRPC query calls txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx anteHandler sdk.AnteHandler // ante handler for fee and auth @@ -109,6 +111,7 @@ func NewBaseApp( storeLoader: DefaultStoreLoader, router: NewRouter(), queryRouter: NewQueryRouter(), + grpcRouter: NewGRPCRouter(), txDecoder: txDecoder, fauxMerkleMode: false, } @@ -283,6 +286,9 @@ func (app *BaseApp) Router() sdk.Router { // QueryRouter returns the QueryRouter of a BaseApp. func (app *BaseApp) QueryRouter() sdk.QueryRouter { return app.queryRouter } +// GRPCRouter returns the GRPCRouter of a BaseApp. +func (app *BaseApp) GRPCRouter() grpc.Server { return app.grpcRouter } + // Seal seals a BaseApp. It prohibits any further modifications to a BaseApp. func (app *BaseApp) Seal() { app.sealed = true } diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index 4d785cf15a0c..e9c8915a1449 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -3,7 +3,6 @@ package baseapp import ( gocontext "context" "fmt" - "strings" gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" @@ -12,43 +11,59 @@ import ( "google.golang.org/grpc/encoding/proto" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var protoCodec = encoding.GetCodec(proto.Name) type GRPCRouter struct { - routes map[string]sdk.Querier - server *grpc.Server + routes map[string]GRPCHandler } +var _ gogogrpc.Server + +func NewGRPCRouter() *GRPCRouter { + return &GRPCRouter{ + routes: map[string]GRPCHandler{}, + } +} + +type GRPCHandler = func(ctx sdk.Context, req abci.RequestQuery) (abci.ResponseQuery, error) + // Route returns the Querier for a given query route path. -func (qrt *GRPCRouter) Route(path string) sdk.Querier { - return qrt.routes[path] +func (qrt *GRPCRouter) Route(path string) GRPCHandler { + handler, found := qrt.routes[path] + if !found { + return nil + } + return handler } // RegisterService implements the grpc Server.RegisterService method func (qrt *GRPCRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { - qrt.server.RegisterService(sd, handler) // adds a top-level querier based on the GRPC service name - qrt.routes[sd.ServiceName] = - func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - path0 := path[0] - for _, md := range sd.Methods { - // checks each GRPC service method to see if it matches the path - if md.MethodName != path0 { - continue - } - res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { - return protoCodec.Unmarshal(req.Data, i) - }, nil) - if err != nil { - return nil, err - } - return protoCodec.Marshal(res) + for _, method := range sd.Methods { + fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + qrt.routes[fqName] = func(ctx sdk.Context, req abci.RequestQuery) (abci.ResponseQuery, error) { + res, err := methodHandler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { + return protoCodec.Unmarshal(req.Data, i) + }, nil) + if err != nil { + return abci.ResponseQuery{}, err } - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) + + resBytes, err := protoCodec.Marshal(res) + if err != nil { + return abci.ResponseQuery{}, err + } + + return abci.ResponseQuery{ + Height: req.Height, + Value: resBytes, + }, nil } + } } // QueryServiceTestHelper provides a helper for making grpc query service @@ -56,35 +71,32 @@ func (qrt *GRPCRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{} // interfaces needed to register a query service server and create a query // service client. type QueryServiceTestHelper struct { - *QueryRouter + *GRPCRouter ctx sdk.Context } // NewQueryServerTestHelper creates a new QueryServiceTestHelper that wraps // the provided sdk.Context func NewQueryServerTestHelper(ctx sdk.Context) *QueryServiceTestHelper { - return &QueryServiceTestHelper{QueryRouter: NewQueryRouter(), ctx: ctx} + return &QueryServiceTestHelper{GRPCRouter: NewGRPCRouter(), ctx: ctx} } // Invoke implements the grpc ClientConn.Invoke method func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args, reply interface{}, _ ...grpc.CallOption) error { - path := strings.Split(method, "/") - if len(path) != 3 { - return fmt.Errorf("unexpected method name %s", method) - } - querier := q.Route(path[1]) + querier := q.Route(method) if querier == nil { - return fmt.Errorf("handler not found for %s", path[1]) + return fmt.Errorf("handler not found for %s", method) } reqBz, err := protoCodec.Marshal(args) if err != nil { return err } - resBz, err := querier(q.ctx, path[2:], abci.RequestQuery{Data: reqBz}) + res, err := querier(q.ctx, abci.RequestQuery{Data: reqBz}) + if err != nil { return err } - return protoCodec.Unmarshal(resBz, reply) + return protoCodec.Unmarshal(res.Value, reply) } // NewStream implements the grpc ClientConn.NewStream method diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go new file mode 100644 index 000000000000..0db3e9c51dc3 --- /dev/null +++ b/baseapp/grpcrouter_test.go @@ -0,0 +1,49 @@ +package baseapp + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type testServer struct{} + +func (e testServer) Echo(_ context.Context, req *testdata.EchoRequest) (*testdata.EchoResponse, error) { + return &testdata.EchoResponse{Message: req.Message}, nil +} + +func (e testServer) SayHello(_ context.Context, request *testdata.SayHelloRequest) (*testdata.SayHelloResponse, error) { + greeting := fmt.Sprintf("Hello %s!", request.Name) + return &testdata.SayHelloResponse{Greeting: greeting}, nil +} + +var _ testdata.TestServiceServer = testServer{} + +func TestGRPCRouter(t *testing.T) { + qr := NewGRPCRouter() + testdata.RegisterTestServiceServer(qr, testServer{}) + helper := &QueryServiceTestHelper{ + GRPCRouter: qr, + ctx: sdk.Context{}, + } + client := testdata.NewTestServiceClient(helper) + + res, err := client.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) + require.Nil(t, err) + require.NotNil(t, res) + require.Equal(t, "hello", res.Message) + + require.Panics(t, func() { + _, _ = client.Echo(context.Background(), nil) + }) + + res2, err := client.SayHello(context.Background(), &testdata.SayHelloRequest{Name: "Foo"}) + require.Nil(t, err) + require.NotNil(t, res) + require.Equal(t, "Hello Foo!", res2.Greeting) +} diff --git a/baseapp/queryrouter.go b/baseapp/queryrouter.go index efc965a65097..1727b2ab2df6 100644 --- a/baseapp/queryrouter.go +++ b/baseapp/queryrouter.go @@ -3,11 +3,6 @@ package baseapp import ( "fmt" - abci "github.com/tendermint/tendermint/abci/types" - "google.golang.org/grpc" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -44,26 +39,3 @@ func (qrt *QueryRouter) AddRoute(path string, q sdk.Querier) sdk.QueryRouter { func (qrt *QueryRouter) Route(path string) sdk.Querier { return qrt.routes[path] } - -// RegisterService implements the grpc Server.RegisterService method -func (qrt *QueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { - // adds a top-level querier based on the GRPC service name - qrt.routes[sd.ServiceName] = - func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - path0 := path[0] - for _, md := range sd.Methods { - // checks each GRPC service method to see if it matches the path - if md.MethodName != path0 { - continue - } - res, err := md.Handler(handler, sdk.WrapSDKContext(ctx), func(i interface{}) error { - return protoCodec.Unmarshal(req.Data, i) - }, nil) - if err != nil { - return nil, err - } - return protoCodec.Marshal(res) - } - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) - } -} diff --git a/baseapp/queryrouter_test.go b/baseapp/queryrouter_test.go index 90448532c61f..c7637f17000e 100644 --- a/baseapp/queryrouter_test.go +++ b/baseapp/queryrouter_test.go @@ -1,11 +1,8 @@ package baseapp import ( - "context" "testing" - "github.com/cosmos/cosmos-sdk/codec/testdata" - "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -34,30 +31,3 @@ func TestQueryRouter(t *testing.T) { qr.AddRoute("testRoute", testQuerier) }) } - -type echoer struct{} - -func (e echoer) Echo(_ context.Context, req *testdata.EchoRequest) (*testdata.EchoResponse, error) { - return &testdata.EchoResponse{Message: req.Message}, nil -} - -var _ testdata.EchoServiceServer = echoer{} - -func TestRegisterQueryService(t *testing.T) { - qr := NewQueryRouter() - testdata.RegisterEchoServiceServer(qr, echoer{}) - helper := &QueryServiceTestHelper{ - QueryRouter: qr, - ctx: sdk.Context{}, - } - client := testdata.NewEchoServiceClient(helper) - - res, err := client.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) - require.Nil(t, err) - require.NotNil(t, res) - require.Equal(t, "hello", res.Message) - - require.Panics(t, func() { - _, _ = client.Echo(context.Background(), nil) - }) -} diff --git a/client/query.go b/client/query.go index bd381a9bd59e..e1e91f1beda9 100644 --- a/client/query.go +++ b/client/query.go @@ -260,7 +260,7 @@ func (c cliQueryConn) Invoke(_ context.Context, method string, args, reply inter if err != nil { return err } - resBz, _, err := c.ctx.QueryWithData(fmt.Sprintf("custom%s", method), reqBz) + resBz, _, err := c.ctx.QueryWithData(method, reqBz) if err != nil { return err } diff --git a/codec/testdata/proto.pb.go b/codec/testdata/proto.pb.go index 530255d0d110..458fc7987b62 100644 --- a/codec/testdata/proto.pb.go +++ b/codec/testdata/proto.pb.go @@ -360,6 +360,94 @@ func (m *EchoResponse) GetMessage() string { return "" } +type SayHelloRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *SayHelloRequest) Reset() { *m = SayHelloRequest{} } +func (m *SayHelloRequest) String() string { return proto.CompactTextString(m) } +func (*SayHelloRequest) ProtoMessage() {} +func (*SayHelloRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{7} +} +func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SayHelloRequest.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 *SayHelloRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SayHelloRequest.Merge(m, src) +} +func (m *SayHelloRequest) XXX_Size() int { + return m.Size() +} +func (m *SayHelloRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SayHelloRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SayHelloRequest proto.InternalMessageInfo + +func (m *SayHelloRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type SayHelloResponse struct { + Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` +} + +func (m *SayHelloResponse) Reset() { *m = SayHelloResponse{} } +func (m *SayHelloResponse) String() string { return proto.CompactTextString(m) } +func (*SayHelloResponse) ProtoMessage() {} +func (*SayHelloResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1353846770e6e2, []int{8} +} +func (m *SayHelloResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SayHelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SayHelloResponse.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 *SayHelloResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SayHelloResponse.Merge(m, src) +} +func (m *SayHelloResponse) XXX_Size() int { + return m.Size() +} +func (m *SayHelloResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SayHelloResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SayHelloResponse proto.InternalMessageInfo + +func (m *SayHelloResponse) GetGreeting() string { + if m != nil { + return m.Greeting + } + return "" +} + func init() { proto.RegisterType((*Dog)(nil), "cosmos_sdk.codec.v1.Dog") proto.RegisterType((*Cat)(nil), "cosmos_sdk.codec.v1.Cat") @@ -368,35 +456,41 @@ func init() { proto.RegisterType((*HasHasHasAnimal)(nil), "cosmos_sdk.codec.v1.HasHasHasAnimal") proto.RegisterType((*EchoRequest)(nil), "cosmos_sdk.codec.v1.EchoRequest") proto.RegisterType((*EchoResponse)(nil), "cosmos_sdk.codec.v1.EchoResponse") + proto.RegisterType((*SayHelloRequest)(nil), "cosmos_sdk.codec.v1.SayHelloRequest") + proto.RegisterType((*SayHelloResponse)(nil), "cosmos_sdk.codec.v1.SayHelloResponse") } func init() { proto.RegisterFile("codec/testdata/proto.proto", fileDescriptor_ae1353846770e6e2) } var fileDescriptor_ae1353846770e6e2 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4e, 0xc2, 0x40, - 0x10, 0xc6, 0xa9, 0xfc, 0x31, 0x0c, 0x8d, 0x26, 0x2b, 0x07, 0xe4, 0xd0, 0x60, 0x2f, 0x92, 0x28, - 0xdb, 0x08, 0xf1, 0xe2, 0x0d, 0x91, 0x48, 0x62, 0xbc, 0xd4, 0x1b, 0x17, 0xb2, 0xb4, 0x6b, 0xdb, - 0x40, 0xbb, 0xc8, 0x14, 0x02, 0x3e, 0x85, 0x8f, 0xe5, 0x91, 0xa3, 0x47, 0x03, 0x2f, 0x62, 0xba, - 0x0b, 0x82, 0x89, 0x1a, 0x2e, 0xed, 0x7c, 0x93, 0xef, 0xfb, 0xcd, 0x64, 0x5a, 0x28, 0x3b, 0xc2, - 0xe5, 0x8e, 0x15, 0x73, 0x8c, 0x5d, 0x16, 0x33, 0x6b, 0x34, 0x16, 0xb1, 0xa0, 0xf2, 0x49, 0x4e, - 0x1c, 0x81, 0xa1, 0xc0, 0x1e, 0xba, 0x03, 0x2a, 0x6d, 0x74, 0x7a, 0x55, 0x3e, 0xf5, 0x84, 0xf0, - 0x86, 0x5c, 0x19, 0xfb, 0x93, 0x67, 0x8b, 0x45, 0x73, 0xe5, 0x37, 0x6b, 0x90, 0xbe, 0x13, 0x1e, - 0x21, 0x90, 0xc1, 0xe0, 0x95, 0x97, 0xb4, 0x8a, 0x56, 0xcd, 0xdb, 0xb2, 0x4e, 0x7a, 0x11, 0x0b, - 0x79, 0xe9, 0x40, 0xf5, 0x92, 0xda, 0xbc, 0x86, 0x74, 0x8b, 0xc5, 0xa4, 0x04, 0x87, 0xa1, 0x88, - 0x82, 0x01, 0x1f, 0xaf, 0x13, 0x1b, 0x49, 0x8a, 0x90, 0x1d, 0x06, 0x53, 0x8e, 0x32, 0x95, 0xb5, - 0x95, 0x30, 0xef, 0x21, 0xdf, 0x61, 0xd8, 0x8c, 0x82, 0x90, 0x0d, 0xc9, 0x25, 0xe4, 0x98, 0xac, - 0x64, 0xb6, 0x50, 0x2f, 0x52, 0xb5, 0x1e, 0xdd, 0xac, 0x47, 0x9b, 0xd1, 0xdc, 0x5e, 0x7b, 0x88, - 0x0e, 0xda, 0x4c, 0xc2, 0xd2, 0xb6, 0x36, 0x33, 0x5b, 0xa0, 0x77, 0x18, 0x6e, 0x59, 0x0d, 0x00, - 0x9f, 0x61, 0x6f, 0x0f, 0x5e, 0xde, 0xdf, 0x84, 0xcc, 0x47, 0x38, 0x56, 0x90, 0x2d, 0xe7, 0x06, - 0x8e, 0x12, 0xce, 0x9e, 0x2c, 0xdd, 0xdf, 0xc9, 0x9a, 0xe7, 0x50, 0x68, 0x3b, 0xbe, 0xb0, 0xf9, - 0xcb, 0x84, 0xa3, 0xba, 0x0d, 0x47, 0x64, 0x1e, 0xff, 0xbe, 0x8d, 0x92, 0x66, 0x15, 0x74, 0x65, - 0xc4, 0x91, 0x88, 0x90, 0xff, 0xed, 0xac, 0x77, 0x15, 0xf2, 0x89, 0x8f, 0xa7, 0x81, 0xc3, 0xc9, - 0x03, 0x64, 0x12, 0x49, 0x2a, 0xf4, 0x97, 0xaf, 0x4b, 0x77, 0x86, 0x97, 0xcf, 0xfe, 0x71, 0xa8, - 0xa9, 0xb7, 0xed, 0xf7, 0xa5, 0xa1, 0x2d, 0x96, 0x86, 0xf6, 0xb9, 0x34, 0xb4, 0xb7, 0x95, 0x91, - 0x5a, 0xac, 0x8c, 0xd4, 0xc7, 0xca, 0x48, 0x75, 0x2f, 0xbc, 0x20, 0xf6, 0x27, 0x7d, 0xea, 0x88, - 0xd0, 0x52, 0x98, 0xf5, 0xab, 0x86, 0xee, 0xc0, 0xfa, 0xf9, 0xd3, 0xf5, 0x73, 0xf2, 0x22, 0x8d, - 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xdc, 0x8d, 0x87, 0x8d, 0x02, 0x00, 0x00, + // 429 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x40, 0xb3, 0xa4, 0x2d, 0xcd, 0xc4, 0xa2, 0x68, 0xe9, 0x21, 0xf8, 0x60, 0x15, 0x8b, 0x8a, + 0x4a, 0xd0, 0xb5, 0x68, 0xc5, 0x85, 0x5b, 0x29, 0x15, 0x91, 0x10, 0x17, 0x17, 0x09, 0x89, 0x4b, + 0xb5, 0xb1, 0x07, 0xdb, 0x8a, 0xed, 0x2d, 0x9e, 0x4d, 0xd4, 0xf0, 0x15, 0xfc, 0x0b, 0x3f, 0xc1, + 0xb1, 0x47, 0x8e, 0x28, 0xf9, 0x11, 0xe4, 0x5d, 0x3b, 0x09, 0xa8, 0x2a, 0xbd, 0xd8, 0x33, 0xab, + 0x37, 0xcf, 0xb3, 0x3b, 0x5e, 0x70, 0x23, 0x15, 0x63, 0x14, 0x68, 0x24, 0x1d, 0x4b, 0x2d, 0x83, + 0xcb, 0x4a, 0x69, 0x25, 0xcc, 0x93, 0x3f, 0x8a, 0x14, 0x15, 0x8a, 0x2e, 0x28, 0x1e, 0x0b, 0x83, + 0x89, 0xe9, 0x4b, 0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b6, 0x9d, 0x06, 0x5b, 0x9b, 0x86, 0x80, + 0x87, 0x2b, 0xac, 0x91, 0xba, 0xb0, 0x9d, 0x54, 0x88, 0x3a, 0x2b, 0x93, 0x86, 0x5d, 0xe6, 0x47, + 0x3f, 0x18, 0xf4, 0x3f, 0x22, 0xe9, 0x73, 0xac, 0xa6, 0x59, 0x84, 0xfc, 0x3d, 0x6c, 0xd4, 0x0d, + 0xf1, 0x3d, 0x71, 0xc3, 0x5f, 0x23, 0xd6, 0x36, 0xe5, 0x3e, 0xb9, 0x85, 0x68, 0x3e, 0xfc, 0x09, + 0xb6, 0xdb, 0x66, 0xf8, 0xd3, 0x1b, 0xf1, 0x7f, 0xb6, 0xe4, 0xee, 0xff, 0x87, 0xb2, 0xe2, 0x37, + 0x67, 0x3f, 0xe7, 0x1e, 0xbb, 0x9e, 0x7b, 0xec, 0xf7, 0xdc, 0x63, 0xdf, 0x17, 0x5e, 0xe7, 0x7a, + 0xe1, 0x75, 0x7e, 0x2d, 0xbc, 0xce, 0xe7, 0xe7, 0x49, 0xa6, 0xd3, 0xc9, 0x48, 0x44, 0xaa, 0x08, + 0xac, 0xaa, 0x79, 0x1d, 0x52, 0x3c, 0x0e, 0xfe, 0xbe, 0x25, 0xa3, 0x2d, 0x33, 0xc2, 0xe3, 0x3f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0x91, 0x9b, 0x3e, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -407,72 +501,108 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// EchoServiceClient is the client API for EchoService service. +// TestServiceClient is the client API for TestService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EchoServiceClient interface { +type TestServiceClient interface { Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) + SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) } -type echoServiceClient struct { +type testServiceClient struct { cc grpc1.ClientConn } -func NewEchoServiceClient(cc grpc1.ClientConn) EchoServiceClient { - return &echoServiceClient{cc} +func NewTestServiceClient(cc grpc1.ClientConn) TestServiceClient { + return &testServiceClient{cc} } -func (c *echoServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { +func (c *testServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { out := new(EchoResponse) - err := c.cc.Invoke(ctx, "/cosmos_sdk.codec.v1.EchoService/Echo", in, out, opts...) + err := c.cc.Invoke(ctx, "/cosmos_sdk.codec.v1.TestService/Echo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *testServiceClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) { + out := new(SayHelloResponse) + err := c.cc.Invoke(ctx, "/cosmos_sdk.codec.v1.TestService/SayHello", in, out, opts...) if err != nil { return nil, err } return out, nil } -// EchoServiceServer is the server API for EchoService service. -type EchoServiceServer interface { +// TestServiceServer is the server API for TestService service. +type TestServiceServer interface { Echo(context.Context, *EchoRequest) (*EchoResponse, error) + SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) } -// UnimplementedEchoServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEchoServiceServer struct { +// UnimplementedTestServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTestServiceServer struct { } -func (*UnimplementedEchoServiceServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { +func (*UnimplementedTestServiceServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") } +func (*UnimplementedTestServiceServer) SayHello(ctx context.Context, req *SayHelloRequest) (*SayHelloResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") +} -func RegisterEchoServiceServer(s grpc1.Server, srv EchoServiceServer) { - s.RegisterService(&_EchoService_serviceDesc, srv) +func RegisterTestServiceServer(s grpc1.Server, srv TestServiceServer) { + s.RegisterService(&_TestService_serviceDesc, srv) } -func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _TestService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EchoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(EchoServiceServer).Echo(ctx, in) + return srv.(TestServiceServer).Echo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos_sdk.codec.v1.EchoService/Echo", + FullMethod: "/cosmos_sdk.codec.v1.TestService/Echo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).Echo(ctx, req.(*EchoRequest)) + return srv.(TestServiceServer).Echo(ctx, req.(*EchoRequest)) } return interceptor(ctx, in, info, handler) } -var _EchoService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos_sdk.codec.v1.EchoService", - HandlerType: (*EchoServiceServer)(nil), +func _TestService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SayHelloRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TestServiceServer).SayHello(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos_sdk.codec.v1.TestService/SayHello", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TestServiceServer).SayHello(ctx, req.(*SayHelloRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _TestService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos_sdk.codec.v1.TestService", + HandlerType: (*TestServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", - Handler: _EchoService_Echo_Handler, + Handler: _TestService_Echo_Handler, + }, + { + MethodName: "SayHello", + Handler: _TestService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -721,6 +851,66 @@ func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SayHelloRequest) 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 *SayHelloRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SayHelloResponse) 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 *SayHelloResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SayHelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Greeting) > 0 { + i -= len(m.Greeting) + copy(dAtA[i:], m.Greeting) + i = encodeVarintProto(dAtA, i, uint64(len(m.Greeting))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintProto(dAtA []byte, offset int, v uint64) int { offset -= sovProto(v) base := offset @@ -833,6 +1023,32 @@ func (m *EchoResponse) Size() (n int) { return n } +func (m *SayHelloRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + +func (m *SayHelloResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Greeting) + if l > 0 { + n += 1 + l + sovProto(uint64(l)) + } + return n +} + func sovProto(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1516,6 +1732,176 @@ func (m *EchoResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *SayHelloRequest) 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 ErrIntOverflowProto + } + 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: SayHelloRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SayHelloResponse) 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 ErrIntOverflowProto + } + 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: SayHelloResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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 ErrInvalidLengthProto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Greeting = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipProto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/codec/testdata/proto.proto b/codec/testdata/proto.proto index 6153cff61560..f0b5f60a0ed2 100644 --- a/codec/testdata/proto.proto +++ b/codec/testdata/proto.proto @@ -28,13 +28,23 @@ message HasHasHasAnimal { google.protobuf.Any has_has_animal = 1; } -service EchoService { +service TestService { rpc Echo(EchoRequest) returns (EchoResponse); + rpc SayHello(SayHelloRequest) returns (SayHelloResponse); } message EchoRequest { string message = 1; } + message EchoResponse { string message = 1; } + +message SayHelloRequest { + string name = 1; +} + +message SayHelloResponse { + string greeting = 1; +} diff --git a/docs/architecture/adr-021-protobuf-query-encoding.md b/docs/architecture/adr-021-protobuf-query-encoding.md index b08f7b92a703..178c582df7af 100644 --- a/docs/architecture/adr-021-protobuf-query-encoding.md +++ b/docs/architecture/adr-021-protobuf-query-encoding.md @@ -200,7 +200,7 @@ interfaces. For the `Query` service defined above we would get a `QueryClient` interface like: ```go -type QueryServiceClient interface { +type QueryClient interface { QueryBalance(ctx context.Context, in *QueryBalanceParams, opts ...grpc.CallOption) (*types.Coin, error) QueryAllBalances(ctx context.Context, in *QueryAllBalancesParams, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) } diff --git a/simapp/app.go b/simapp/app.go index e13a361b8af4..b9ac2214d1e4 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -304,6 +304,7 @@ func NewSimApp( app.mm.RegisterInvariants(&app.CrisisKeeper) app.mm.RegisterRoutes(app.Router(), app.QueryRouter()) + app.mm.RegisterQueryServices(app.Router(), app.GRPCRouter()) // create the simulation manager and define the order of the modules for deterministic simulations // diff --git a/types/module/module.go b/types/module/module.go index 048f470705fc..5c16cf13762b 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -261,7 +261,13 @@ func (m *Manager) RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter) if module.QuerierRoute() != "" { queryRouter.AddRoute(module.QuerierRoute(), module.NewQuerierHandler()) } - module.RegisterQueryService(queryRouter) + } +} + +// RegisterQueryServices registers all module query services +func (m *Manager) RegisterQueryServices(router sdk.Router, grpcRouter grpc.Server) { + for _, module := range m.Modules { + module.RegisterQueryService(grpcRouter) } } diff --git a/types/module/module_test.go b/types/module/module_test.go index a92a97cfa05f..4f359dffde22 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -55,7 +55,7 @@ func TestBasicManager(t *testing.T) { mockCmd := &cobra.Command{Use: "root"} mm.AddTxCommands(mockCmd, clientCtx) - mm.AddQueryCommands(mockCmd, cdc) + mm.AddQueryCommands(mockCmd, clientCtx) // validate genesis returns nil require.Nil(t, module.NewBasicManager().ValidateGenesis(cdc, wantDefaultGenesis)) @@ -155,8 +155,6 @@ func TestManager_RegisterRoutes(t *testing.T) { handler3 := sdk.Querier(nil) mockAppModule1.EXPECT().NewQuerierHandler().Times(1).Return(handler3) queryRouter.EXPECT().AddRoute(gomock.Eq("querierRoute1"), gomock.Eq(handler3)).Times(1) - mockAppModule1.EXPECT().RegisterQueryService(queryRouter).Times(1) - mockAppModule2.EXPECT().RegisterQueryService(queryRouter).Times(1) mm.RegisterRoutes(router, queryRouter) } diff --git a/types/router.go b/types/router.go index 2d43b6d5e563..c6328e92d782 100644 --- a/types/router.go +++ b/types/router.go @@ -2,8 +2,6 @@ package types import ( "regexp" - - "google.golang.org/grpc" ) var ( @@ -38,6 +36,4 @@ type Router interface { type QueryRouter interface { AddRoute(r string, h Querier) QueryRouter Route(path string) Querier - // RegisterService registers a querier which implements the provide grpc service description - RegisterService(sd *grpc.ServiceDesc, querier interface{}) } diff --git a/x/bank/keeper/querier_test.go b/x/bank/keeper/querier_test.go index 8cf2871b7b49..5ade98dae9bd 100644 --- a/x/bank/keeper/querier_test.go +++ b/x/bank/keeper/querier_test.go @@ -2,6 +2,9 @@ package keeper_test import ( gocontext "context" + "fmt" + + abci "github.com/tendermint/tendermint/abci/types" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,11 +19,11 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { _, _, addr := authtypes.KeyTestPubAddr() queryHelper := baseapp.NewQueryServerTestHelper(ctx) - types.RegisterQueryServiceServer(queryHelper, keeper.Querier{app.BankKeeper}) - queryClient := types.NewQueryServiceClient(queryHelper) + types.RegisterQueryServer(queryHelper, app.BankKeeper) + queryClient := types.NewQueryClient(queryHelper) req := types.NewQueryBalanceRequest(addr, fooDenom) - res, err := queryClient.QueryBalance(gocontext.Background(), req) + res, err := queryClient.Balance(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.True(res.Balance.IsZero()) @@ -31,7 +34,7 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryBalance() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - res, err = queryClient.QueryBalance(gocontext.Background(), req) + res, err = queryClient.Balance(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.True(res.Balance.IsEqual(newFooCoin(50))) @@ -42,15 +45,11 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { _, _, addr := authtypes.KeyTestPubAddr() queryHelper := baseapp.NewQueryServerTestHelper(ctx) - types.RegisterQueryServiceServer(queryHelper, keeper.Querier{app.BankKeeper}) - queryClient := types.NewQueryServiceClient(queryHelper) - - //res, err := queryClient.QueryAllBalances(nil, nil) - //suite.Require().NotNil(err) - //suite.Require().Nil(res) + types.RegisterQueryServer(queryHelper, app.BankKeeper) + queryClient := types.NewQueryClient(queryHelper) req := types.NewQueryAllBalancesRequest(addr) - res, err := queryClient.QueryAllBalances(gocontext.Background(), req) + res, err := queryClient.AllBalances(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) suite.True(res.Balances.IsZero()) @@ -61,11 +60,10 @@ func (suite *IntegrationTestSuite) TestQuerier_QueryAllBalances() { app.AccountKeeper.SetAccount(ctx, acc) suite.Require().NoError(app.BankKeeper.SetBalances(ctx, acc.GetAddress(), origCoins)) - res, err = queryClient.QueryAllBalances(gocontext.Background(), req) + res, err = queryClient.AllBalances(gocontext.Background(), req) suite.Require().NoError(err) suite.Require().NotNil(res) - suite.Require().NoError(app.Codec().UnmarshalJSON(res, &balances)) - suite.True(balances.IsEqual(origCoins)) + suite.True(res.Balances.IsEqual(origCoins)) } func (suite *IntegrationTestSuite) TestQuerier_QueryTotalSupply() { @@ -133,5 +131,4 @@ func (suite *IntegrationTestSuite) TestQuerierRouteNotFound() { querier := keeper.NewQuerier(app.BankKeeper) _, err := querier(ctx, []string{"invalid"}, req) suite.Error(err) - suite.True(res.Balances.IsEqual(origCoins)) }