From ac8c1750e76981027e980e928a3e7f0697166a54 Mon Sep 17 00:00:00 2001 From: Woojinger Date: Sun, 18 Sep 2022 19:52:52 +0900 Subject: [PATCH 1/5] implement cli and add proof in packet data --- docs/ibc/proto-docs.md | 51 +- modules/apps/31-ibc-query/client/cli/cli.go | 4 +- modules/apps/31-ibc-query/client/cli/query.go | 43 ++ .../apps/31-ibc-query/keeper/grpc_query.go | 4 +- modules/apps/31-ibc-query/module.go | 5 +- modules/apps/31-ibc-query/types/packet.pb.go | 476 ++++++++++++++++++ modules/apps/31-ibc-query/types/query.pb.go | 162 +++--- .../apps/31-ibc-query/types/query.pb.gw.go | 28 +- .../applications/ibc_query/v1/packet.proto | 14 + .../ibc/applications/ibc_query/v1/query.proto | 8 +- 10 files changed, 683 insertions(+), 112 deletions(-) create mode 100644 modules/apps/31-ibc-query/types/packet.pb.go create mode 100644 proto/ibc/applications/ibc_query/v1/packet.proto diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index a365d89e8b8..24a29b3ee46 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -90,9 +90,12 @@ - [QueryResult](#ibc.applications.ibc_query.v1.QueryResult) +- [ibc/applications/ibc_query/v1/packet.proto](#ibc/applications/ibc_query/v1/packet.proto) + - [IBCQueryPacketData](#ibc.applications.ibc_query.v1.IBCQueryPacketData) + - [ibc/applications/ibc_query/v1/query.proto](#ibc/applications/ibc_query/v1/query.proto) - - [QueryCrossChainQuery](#ibc.applications.ibc_query.v1.QueryCrossChainQuery) - - [QueryCrossChainQueryResponse](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResponse) + - [QueryCrossChainQueryResult](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResult) + - [QueryCrossChainQueryResultResponse](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResultResponse) - [Query](#ibc.applications.ibc_query.v1.Query) @@ -1562,6 +1565,40 @@ QueryResult + +

Top

+ +## ibc/applications/ibc_query/v1/packet.proto + + + + + +### IBCQueryPacketData +IBCQueryPacketData defines a struct for the packet payload + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | +| `path` | [string](#string) | | | +| `query_height` | [uint64](#uint64) | | | +| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | TODO Proof specifications used in verifying counterparty state | + + + + + + + + + + + + + + +

Top

@@ -1569,9 +1606,9 @@ QueryResult - + -### QueryCrossChainQuery +### QueryCrossChainQueryResult QueryCrossChainQuery @@ -1584,9 +1621,9 @@ QueryCrossChainQuery - + -### QueryCrossChainQueryResponse +### QueryCrossChainQueryResultResponse QueryCrossChainQueryResponse @@ -1614,7 +1651,7 @@ Query | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CrossChainQuery` | [QueryCrossChainQuery](#ibc.applications.ibc_query.v1.QueryCrossChainQuery) | [QueryCrossChainQueryResponse](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResponse) | query CrossChainQuery | GET|/ibc/apps/ibc-query/v1/{id}| +| `CrossChainQueryResult` | [QueryCrossChainQueryResult](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResult) | [QueryCrossChainQueryResultResponse](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResultResponse) | query CrossChainQueryResult | GET|/ibc/apps/ibc-query/v1/{id}| diff --git a/modules/apps/31-ibc-query/client/cli/cli.go b/modules/apps/31-ibc-query/client/cli/cli.go index efd5d0a6e55..3bfd64b900a 100644 --- a/modules/apps/31-ibc-query/client/cli/cli.go +++ b/modules/apps/31-ibc-query/client/cli/cli.go @@ -15,7 +15,7 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( - + GetCmdQueryCrossChainQueryResult(), ) return queryCmd @@ -25,7 +25,7 @@ func GetQueryCmd() *cobra.Command { func NewTxCmd() *cobra.Command { txCmd := &cobra.Command{ Use: "ibc-query", - Short: "IBC query command", + Short: "Query cross chain query result", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, diff --git a/modules/apps/31-ibc-query/client/cli/query.go b/modules/apps/31-ibc-query/client/cli/query.go index 7f1e458cd3a..cb2642277b9 100644 --- a/modules/apps/31-ibc-query/client/cli/query.go +++ b/modules/apps/31-ibc-query/client/cli/query.go @@ -1 +1,44 @@ package cli + +import ( + "fmt" + "github.com/cosmos/cosmos-sdk/version" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types" +) + +// GetCmdQueryCrossChainQueryResult defines the command to query CrossChainQueryResult from store +func GetCmdQueryCrossChainQueryResult() *cobra.Command { + cmd := &cobra.Command{ + Use: "query-ibc-query-result [query id]", + Short: "query cross chain query result with query id", + Long: "query cross chain query result with query id", + Example: fmt.Sprintf("%s query ibc-query query-ibc-query-result 3", version.AppName), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + req := &types.QueryCrossChainQueryResult{ + Id: args[0], + } + + res, err := queryClient.CrossChainQueryResult(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/modules/apps/31-ibc-query/keeper/grpc_query.go b/modules/apps/31-ibc-query/keeper/grpc_query.go index b92c801ecfe..e4b2073c3d7 100644 --- a/modules/apps/31-ibc-query/keeper/grpc_query.go +++ b/modules/apps/31-ibc-query/keeper/grpc_query.go @@ -7,8 +7,8 @@ import ( var _ types.QueryServer = Keeper{} -// CrossChainQuery implements the Query/CrossChainQuery gRPC method -func (k Keeper) CrossChainQuery(context context.Context, query *types.QueryCrossChainQuery) (*types.QueryCrossChainQueryResponse, error) { +// CrossChainQueryResult implements the Query/CrossChainQueryResult gRPC method +func (k Keeper) CrossChainQueryResult(context context.Context, query *types.QueryCrossChainQueryResult) (*types.QueryCrossChainQueryResultResponse, error) { // TODO // get queryResult from private store return nil, nil diff --git a/modules/apps/31-ibc-query/module.go b/modules/apps/31-ibc-query/module.go index a3b38a1b6e3..393805c3fbe 100644 --- a/modules/apps/31-ibc-query/module.go +++ b/modules/apps/31-ibc-query/module.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/client/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -67,12 +68,12 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // GetTxCmd implements AppModuleBasic interface func (AppModuleBasic) GetTxCmd() *cobra.Command { - return nil + return cli.NewTxCmd() } // GetQueryCmd implements AppModuleBasic interface func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return nil + return cli.GetQueryCmd() } type AppModule struct { diff --git a/modules/apps/31-ibc-query/types/packet.pb.go b/modules/apps/31-ibc-query/types/packet.pb.go new file mode 100644 index 00000000000..29254e4f81c --- /dev/null +++ b/modules/apps/31-ibc-query/types/packet.pb.go @@ -0,0 +1,476 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/ibc_query/v1/packet.proto + +package types + +import ( + fmt "fmt" + _go "github.com/confio/ics23/go" + 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 + +// IBCQueryPacketData defines a struct for the packet payload +type IBCQueryPacketData struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + // TODO + // Proof specifications used in verifying counterparty state + ProofSpecs []*_go.ProofSpec `protobuf:"bytes,4,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty"` +} + +func (m *IBCQueryPacketData) Reset() { *m = IBCQueryPacketData{} } +func (m *IBCQueryPacketData) String() string { return proto.CompactTextString(m) } +func (*IBCQueryPacketData) ProtoMessage() {} +func (*IBCQueryPacketData) Descriptor() ([]byte, []int) { + return fileDescriptor_0c3b95af207674c8, []int{0} +} +func (m *IBCQueryPacketData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IBCQueryPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IBCQueryPacketData.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 *IBCQueryPacketData) XXX_Merge(src proto.Message) { + xxx_messageInfo_IBCQueryPacketData.Merge(m, src) +} +func (m *IBCQueryPacketData) XXX_Size() int { + return m.Size() +} +func (m *IBCQueryPacketData) XXX_DiscardUnknown() { + xxx_messageInfo_IBCQueryPacketData.DiscardUnknown(m) +} + +var xxx_messageInfo_IBCQueryPacketData proto.InternalMessageInfo + +func (m *IBCQueryPacketData) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *IBCQueryPacketData) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *IBCQueryPacketData) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + +func (m *IBCQueryPacketData) GetProofSpecs() []*_go.ProofSpec { + if m != nil { + return m.ProofSpecs + } + return nil +} + +func init() { + proto.RegisterType((*IBCQueryPacketData)(nil), "ibc.applications.ibc_query.v1.IBCQueryPacketData") +} + +func init() { + proto.RegisterFile("ibc/applications/ibc_query/v1/packet.proto", fileDescriptor_0c3b95af207674c8) +} + +var fileDescriptor_0c3b95af207674c8 = []byte{ + // 281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x31, 0x4b, 0xc4, 0x30, + 0x1c, 0xc5, 0x2f, 0x77, 0x45, 0x30, 0x3d, 0x44, 0x32, 0x15, 0xc1, 0x50, 0x9d, 0x8a, 0x70, 0x09, + 0xbd, 0xba, 0xb9, 0x9d, 0x0e, 0xba, 0x9d, 0x15, 0x17, 0x97, 0x92, 0xa6, 0xb1, 0x0d, 0x5e, 0x4d, + 0x6c, 0xd2, 0xc2, 0x7d, 0x09, 0xf1, 0x63, 0x39, 0xde, 0xe8, 0x28, 0xed, 0x17, 0x91, 0xe6, 0x50, + 0xdc, 0x1e, 0xef, 0x3d, 0xde, 0x9f, 0xff, 0x0f, 0x5e, 0xc8, 0x9c, 0x53, 0xa6, 0xf5, 0x46, 0x72, + 0x66, 0xa5, 0x7a, 0x35, 0x54, 0xe6, 0x3c, 0x7b, 0x6b, 0x45, 0xb3, 0xa5, 0x5d, 0x4c, 0x35, 0xe3, + 0x2f, 0xc2, 0x12, 0xdd, 0x28, 0xab, 0xd0, 0xa9, 0xcc, 0x39, 0xf9, 0xdf, 0x25, 0x7f, 0x5d, 0xd2, + 0xc5, 0x27, 0x73, 0xdd, 0x28, 0xf5, 0x6c, 0xf6, 0xe5, 0xf3, 0x77, 0x00, 0xd1, 0xdd, 0xea, 0xfa, + 0x7e, 0x4c, 0xd7, 0x6e, 0xe5, 0x86, 0x59, 0x86, 0x8e, 0xe0, 0x54, 0x16, 0x01, 0x08, 0x41, 0x74, + 0x98, 0x4e, 0x65, 0x81, 0x10, 0xf4, 0x34, 0xb3, 0x55, 0x30, 0x75, 0x8e, 0xd3, 0xe8, 0x0c, 0xce, + 0xdd, 0x68, 0x56, 0x09, 0x59, 0x56, 0x36, 0x98, 0x85, 0x20, 0xf2, 0x52, 0xdf, 0x79, 0xb7, 0xce, + 0x42, 0x31, 0xf4, 0xdd, 0xb5, 0xcc, 0x68, 0xc1, 0x4d, 0xe0, 0x85, 0xb3, 0xc8, 0x5f, 0x1e, 0x13, + 0xc9, 0xcd, 0x32, 0x21, 0xeb, 0x31, 0x79, 0xd0, 0x82, 0xa7, 0x50, 0xff, 0x4a, 0xb3, 0x7a, 0xfc, + 0xec, 0x31, 0xd8, 0xf5, 0x18, 0x7c, 0xf7, 0x18, 0x7c, 0x0c, 0x78, 0xb2, 0x1b, 0xf0, 0xe4, 0x6b, + 0xc0, 0x93, 0xa7, 0xab, 0x52, 0xda, 0xaa, 0xcd, 0x09, 0x57, 0x35, 0xe5, 0xca, 0xd4, 0xca, 0x41, + 0x58, 0x94, 0x8a, 0x76, 0x97, 0xb4, 0x56, 0x45, 0xbb, 0x11, 0x66, 0x64, 0x64, 0x68, 0x12, 0x2f, + 0xc6, 0x64, 0x8f, 0xc7, 0x6e, 0xb5, 0x30, 0xf9, 0x81, 0x7b, 0x37, 0xf9, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x89, 0x0a, 0x68, 0x8f, 0x49, 0x01, 0x00, 0x00, +} + +func (m *IBCQueryPacketData) 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 *IBCQueryPacketData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IBCQueryPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProofSpecs) > 0 { + for iNdEx := len(m.ProofSpecs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ProofSpecs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPacket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.QueryHeight != 0 { + i = encodeVarintPacket(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintPacket(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintPacket(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintPacket(dAtA []byte, offset int, v uint64) int { + offset -= sovPacket(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *IBCQueryPacketData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovPacket(uint64(l)) + } + l = len(m.Path) + if l > 0 { + n += 1 + l + sovPacket(uint64(l)) + } + if m.QueryHeight != 0 { + n += 1 + sovPacket(uint64(m.QueryHeight)) + } + if len(m.ProofSpecs) > 0 { + for _, e := range m.ProofSpecs { + l = e.Size() + n += 1 + l + sovPacket(uint64(l)) + } + } + return n +} + +func sovPacket(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPacket(x uint64) (n int) { + return sovPacket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IBCQueryPacketData) 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 ErrIntOverflowPacket + } + 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: IBCQueryPacketData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IBCQueryPacketData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + 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 ErrInvalidLengthPacket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + 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 ErrInvalidLengthPacket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofSpecs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPacket + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProofSpecs = append(m.ProofSpecs, &_go.ProofSpec{}) + if err := m.ProofSpecs[len(m.ProofSpecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPacket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPacket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPacket(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, ErrIntOverflowPacket + } + 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, ErrIntOverflowPacket + } + 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, ErrIntOverflowPacket + } + 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, ErrInvalidLengthPacket + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPacket + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPacket + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPacket = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPacket = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/apps/31-ibc-query/types/query.pb.go b/modules/apps/31-ibc-query/types/query.pb.go index c348c254419..cfb9b3beb07 100644 --- a/modules/apps/31-ibc-query/types/query.pb.go +++ b/modules/apps/31-ibc-query/types/query.pb.go @@ -29,23 +29,23 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryCrossChainQuery -type QueryCrossChainQuery struct { +type QueryCrossChainQueryResult struct { // query id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *QueryCrossChainQuery) Reset() { *m = QueryCrossChainQuery{} } -func (m *QueryCrossChainQuery) String() string { return proto.CompactTextString(m) } -func (*QueryCrossChainQuery) ProtoMessage() {} -func (*QueryCrossChainQuery) Descriptor() ([]byte, []int) { +func (m *QueryCrossChainQueryResult) Reset() { *m = QueryCrossChainQueryResult{} } +func (m *QueryCrossChainQueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryCrossChainQueryResult) ProtoMessage() {} +func (*QueryCrossChainQueryResult) Descriptor() ([]byte, []int) { return fileDescriptor_41a30807902c5755, []int{0} } -func (m *QueryCrossChainQuery) XXX_Unmarshal(b []byte) error { +func (m *QueryCrossChainQueryResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCrossChainQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCrossChainQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCrossChainQuery.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCrossChainQueryResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -55,19 +55,19 @@ func (m *QueryCrossChainQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueryCrossChainQuery) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCrossChainQuery.Merge(m, src) +func (m *QueryCrossChainQueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCrossChainQueryResult.Merge(m, src) } -func (m *QueryCrossChainQuery) XXX_Size() int { +func (m *QueryCrossChainQueryResult) XXX_Size() int { return m.Size() } -func (m *QueryCrossChainQuery) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCrossChainQuery.DiscardUnknown(m) +func (m *QueryCrossChainQueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCrossChainQueryResult.DiscardUnknown(m) } -var xxx_messageInfo_QueryCrossChainQuery proto.InternalMessageInfo +var xxx_messageInfo_QueryCrossChainQueryResult proto.InternalMessageInfo -func (m *QueryCrossChainQuery) GetId() string { +func (m *QueryCrossChainQueryResult) GetId() string { if m != nil { return m.Id } @@ -75,24 +75,24 @@ func (m *QueryCrossChainQuery) GetId() string { } // QueryCrossChainQueryResponse -type QueryCrossChainQueryResponse struct { +type QueryCrossChainQueryResultResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Result QueryResult `protobuf:"varint,2,opt,name=result,proto3,enum=ibc.applications.ibc_query.v1.QueryResult" json:"result,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` } -func (m *QueryCrossChainQueryResponse) Reset() { *m = QueryCrossChainQueryResponse{} } -func (m *QueryCrossChainQueryResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCrossChainQueryResponse) ProtoMessage() {} -func (*QueryCrossChainQueryResponse) Descriptor() ([]byte, []int) { +func (m *QueryCrossChainQueryResultResponse) Reset() { *m = QueryCrossChainQueryResultResponse{} } +func (m *QueryCrossChainQueryResultResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCrossChainQueryResultResponse) ProtoMessage() {} +func (*QueryCrossChainQueryResultResponse) Descriptor() ([]byte, []int) { return fileDescriptor_41a30807902c5755, []int{1} } -func (m *QueryCrossChainQueryResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCrossChainQueryResultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCrossChainQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCrossChainQueryResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCrossChainQueryResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCrossChainQueryResultResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -102,33 +102,33 @@ func (m *QueryCrossChainQueryResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryCrossChainQueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCrossChainQueryResponse.Merge(m, src) +func (m *QueryCrossChainQueryResultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCrossChainQueryResultResponse.Merge(m, src) } -func (m *QueryCrossChainQueryResponse) XXX_Size() int { +func (m *QueryCrossChainQueryResultResponse) XXX_Size() int { return m.Size() } -func (m *QueryCrossChainQueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCrossChainQueryResponse.DiscardUnknown(m) +func (m *QueryCrossChainQueryResultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCrossChainQueryResultResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryCrossChainQueryResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCrossChainQueryResultResponse proto.InternalMessageInfo -func (m *QueryCrossChainQueryResponse) GetId() string { +func (m *QueryCrossChainQueryResultResponse) GetId() string { if m != nil { return m.Id } return "" } -func (m *QueryCrossChainQueryResponse) GetResult() QueryResult { +func (m *QueryCrossChainQueryResultResponse) GetResult() QueryResult { if m != nil { return m.Result } return QueryResult_QUERY_RESULT_UNSPECIFIED } -func (m *QueryCrossChainQueryResponse) GetData() []byte { +func (m *QueryCrossChainQueryResultResponse) GetData() []byte { if m != nil { return m.Data } @@ -136,8 +136,8 @@ func (m *QueryCrossChainQueryResponse) GetData() []byte { } func init() { - proto.RegisterType((*QueryCrossChainQuery)(nil), "ibc.applications.ibc_query.v1.QueryCrossChainQuery") - proto.RegisterType((*QueryCrossChainQueryResponse)(nil), "ibc.applications.ibc_query.v1.QueryCrossChainQueryResponse") + proto.RegisterType((*QueryCrossChainQueryResult)(nil), "ibc.applications.ibc_query.v1.QueryCrossChainQueryResult") + proto.RegisterType((*QueryCrossChainQueryResultResponse)(nil), "ibc.applications.ibc_query.v1.QueryCrossChainQueryResultResponse") } func init() { @@ -145,29 +145,29 @@ func init() { } var fileDescriptor_41a30807902c5755 = []byte{ - // 339 bytes of a gzipped FileDescriptorProto + // 340 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcc, 0x4c, 0x4a, 0xd6, 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0x4c, 0x4a, 0x8e, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x07, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x64, 0x33, 0x93, 0x92, 0xf5, 0x90, 0x95, 0xea, 0xc1, 0x95, 0xea, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x40, 0x15, 0x81, 0x35, 0x4b, 0x69, 0xe3, 0xb7, 0x27, 0x3d, 0x35, 0x2f, 0xb5, 0x38, - 0x13, 0xaa, 0x58, 0x49, 0x8d, 0x4b, 0x24, 0x10, 0x24, 0xe3, 0x5c, 0x94, 0x5f, 0x5c, 0xec, 0x9c, - 0x91, 0x98, 0x99, 0x07, 0xe6, 0x0a, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, - 0x70, 0x06, 0x31, 0x65, 0xa6, 0x28, 0xb5, 0x31, 0x72, 0xc9, 0x60, 0x53, 0x18, 0x94, 0x5a, 0x5c, - 0x90, 0x9f, 0x57, 0x9c, 0x8a, 0xae, 0x41, 0xc8, 0x89, 0x8b, 0xad, 0x28, 0xb5, 0xb8, 0x34, 0xa7, - 0x44, 0x82, 0x49, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x4b, 0x0f, 0xaf, 0x9f, 0xf4, 0x60, 0xa6, 0x95, - 0xe6, 0x94, 0x04, 0x41, 0x75, 0x0a, 0x09, 0x71, 0xb1, 0xa4, 0x24, 0x96, 0x24, 0x4a, 0x30, 0x2b, - 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x46, 0x9b, 0x18, 0xb9, 0x58, 0x21, 0x4e, 0x5c, 0xc1, 0xc8, - 0xc5, 0x8f, 0xee, 0x6c, 0x63, 0x62, 0x6c, 0x41, 0xd3, 0x24, 0x65, 0x4d, 0x86, 0x26, 0x98, 0xbf, - 0x95, 0x94, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0x24, 0x2b, 0x24, 0xad, 0x0f, 0x0d, 0x76, 0x70, 0x70, - 0xeb, 0xc2, 0x83, 0xbb, 0x3a, 0x33, 0xa5, 0xd6, 0x29, 0xf4, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, - 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0xac, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, - 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x21, 0xda, 0xd3, 0xf3, 0xf5, 0xcb, 0x4c, 0xf4, 0x73, 0xf3, 0x53, - 0x4a, 0x73, 0x52, 0x8b, 0x21, 0xa6, 0x1a, 0x1b, 0xea, 0x22, 0x0c, 0x2e, 0xa9, 0x2c, 0x48, 0x2d, - 0x4e, 0x62, 0x03, 0xc7, 0xa1, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x45, 0x0b, 0x2d, 0x87, 0x5a, - 0x02, 0x00, 0x00, + 0x13, 0xaa, 0x58, 0x49, 0x87, 0x4b, 0x2a, 0x10, 0x24, 0xe3, 0x5c, 0x94, 0x5f, 0x5c, 0xec, 0x9c, + 0x91, 0x98, 0x99, 0x07, 0xe6, 0x06, 0xa5, 0x16, 0x97, 0xe6, 0x94, 0x08, 0xf1, 0x71, 0x31, 0x65, + 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x31, 0x65, 0xa6, 0x28, 0xf5, 0x30, 0x72, 0x29, + 0xe1, 0x56, 0x1e, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x8a, 0xae, 0x4d, 0xc8, 0x89, 0x8b, + 0xad, 0x08, 0xac, 0x42, 0x82, 0x49, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x4b, 0x0f, 0xaf, 0xff, 0xf4, + 0x90, 0xcd, 0x84, 0xea, 0x14, 0x12, 0xe2, 0x62, 0x49, 0x49, 0x2c, 0x49, 0x94, 0x60, 0x56, 0x60, + 0xd4, 0xe0, 0x09, 0x02, 0xb3, 0x8d, 0x8e, 0x30, 0x72, 0xb1, 0x82, 0xd5, 0x0a, 0xed, 0x62, 0xe4, + 0x12, 0xc5, 0xee, 0x05, 0x4b, 0x62, 0xec, 0xc2, 0xaa, 0x55, 0xca, 0x91, 0x6c, 0xad, 0xb0, 0x90, + 0x50, 0x52, 0x6e, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xac, 0x90, 0xb4, 0x3e, 0x34, 0x52, 0xc0, 0x91, + 0xa1, 0x0b, 0x8f, 0x8c, 0xea, 0xcc, 0x94, 0x5a, 0xa7, 0xd0, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, + 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x87, 0x68, 0x4f, 0xcf, 0xd7, 0x2f, 0x33, 0xd1, 0xcf, 0xcd, 0x4f, + 0x29, 0xcd, 0x49, 0x2d, 0x86, 0x98, 0x6a, 0x6c, 0xa8, 0x8b, 0x30, 0xb8, 0xa4, 0xb2, 0x20, 0xb5, + 0x38, 0x89, 0x0d, 0x1c, 0xc3, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x53, 0x49, 0x71, + 0x78, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -182,8 +182,8 @@ const _ = grpc.SupportPackageIsVersion4 // // 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 { - // query CrossChainQuery - CrossChainQuery(ctx context.Context, in *QueryCrossChainQuery, opts ...grpc.CallOption) (*QueryCrossChainQueryResponse, error) + // query CrossChainQueryResult + CrossChainQueryResult(ctx context.Context, in *QueryCrossChainQueryResult, opts ...grpc.CallOption) (*QueryCrossChainQueryResultResponse, error) } type queryClient struct { @@ -194,9 +194,9 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) CrossChainQuery(ctx context.Context, in *QueryCrossChainQuery, opts ...grpc.CallOption) (*QueryCrossChainQueryResponse, error) { - out := new(QueryCrossChainQueryResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.ibc_query.v1.Query/CrossChainQuery", in, out, opts...) +func (c *queryClient) CrossChainQueryResult(ctx context.Context, in *QueryCrossChainQueryResult, opts ...grpc.CallOption) (*QueryCrossChainQueryResultResponse, error) { + out := new(QueryCrossChainQueryResultResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.ibc_query.v1.Query/CrossChainQueryResult", in, out, opts...) if err != nil { return nil, err } @@ -205,36 +205,36 @@ func (c *queryClient) CrossChainQuery(ctx context.Context, in *QueryCrossChainQu // QueryServer is the server API for Query service. type QueryServer interface { - // query CrossChainQuery - CrossChainQuery(context.Context, *QueryCrossChainQuery) (*QueryCrossChainQueryResponse, error) + // query CrossChainQueryResult + CrossChainQueryResult(context.Context, *QueryCrossChainQueryResult) (*QueryCrossChainQueryResultResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) CrossChainQuery(ctx context.Context, req *QueryCrossChainQuery) (*QueryCrossChainQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CrossChainQuery not implemented") +func (*UnimplementedQueryServer) CrossChainQueryResult(ctx context.Context, req *QueryCrossChainQueryResult) (*QueryCrossChainQueryResultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CrossChainQueryResult not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_CrossChainQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCrossChainQuery) +func _Query_CrossChainQueryResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCrossChainQueryResult) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).CrossChainQuery(ctx, in) + return srv.(QueryServer).CrossChainQueryResult(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.ibc_query.v1.Query/CrossChainQuery", + FullMethod: "/ibc.applications.ibc_query.v1.Query/CrossChainQueryResult", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CrossChainQuery(ctx, req.(*QueryCrossChainQuery)) + return srv.(QueryServer).CrossChainQueryResult(ctx, req.(*QueryCrossChainQueryResult)) } return interceptor(ctx, in, info, handler) } @@ -244,15 +244,15 @@ var _Query_serviceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "CrossChainQuery", - Handler: _Query_CrossChainQuery_Handler, + MethodName: "CrossChainQueryResult", + Handler: _Query_CrossChainQueryResult_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/applications/ibc_query/v1/query.proto", } -func (m *QueryCrossChainQuery) Marshal() (dAtA []byte, err error) { +func (m *QueryCrossChainQueryResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -262,12 +262,12 @@ func (m *QueryCrossChainQuery) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCrossChainQuery) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCrossChainQueryResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCrossChainQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCrossChainQueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -282,7 +282,7 @@ func (m *QueryCrossChainQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryCrossChainQueryResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCrossChainQueryResultResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -292,12 +292,12 @@ func (m *QueryCrossChainQueryResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCrossChainQueryResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCrossChainQueryResultResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCrossChainQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCrossChainQueryResultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -335,7 +335,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryCrossChainQuery) Size() (n int) { +func (m *QueryCrossChainQueryResult) Size() (n int) { if m == nil { return 0 } @@ -348,7 +348,7 @@ func (m *QueryCrossChainQuery) Size() (n int) { return n } -func (m *QueryCrossChainQueryResponse) Size() (n int) { +func (m *QueryCrossChainQueryResultResponse) Size() (n int) { if m == nil { return 0 } @@ -374,7 +374,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryCrossChainQuery) Unmarshal(dAtA []byte) error { +func (m *QueryCrossChainQueryResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -397,10 +397,10 @@ func (m *QueryCrossChainQuery) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCrossChainQuery: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCrossChainQueryResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCrossChainQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCrossChainQueryResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -456,7 +456,7 @@ func (m *QueryCrossChainQuery) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCrossChainQueryResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCrossChainQueryResultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -479,10 +479,10 @@ func (m *QueryCrossChainQueryResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCrossChainQueryResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCrossChainQueryResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCrossChainQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCrossChainQueryResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/modules/apps/31-ibc-query/types/query.pb.gw.go b/modules/apps/31-ibc-query/types/query.pb.gw.go index 80976ba7994..a5b73d74040 100644 --- a/modules/apps/31-ibc-query/types/query.pb.gw.go +++ b/modules/apps/31-ibc-query/types/query.pb.gw.go @@ -31,8 +31,8 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -func request_Query_CrossChainQuery_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCrossChainQuery +func request_Query_CrossChainQueryResult_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCrossChainQueryResult var metadata runtime.ServerMetadata var ( @@ -53,13 +53,13 @@ func request_Query_CrossChainQuery_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.CrossChainQuery(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CrossChainQueryResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_CrossChainQuery_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCrossChainQuery +func local_request_Query_CrossChainQueryResult_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCrossChainQueryResult var metadata runtime.ServerMetadata var ( @@ -80,7 +80,7 @@ func local_request_Query_CrossChainQuery_0(ctx context.Context, marshaler runtim return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.CrossChainQuery(ctx, &protoReq) + msg, err := server.CrossChainQueryResult(ctx, &protoReq) return msg, metadata, err } @@ -91,7 +91,7 @@ func local_request_Query_CrossChainQuery_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_CrossChainQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CrossChainQueryResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -100,14 +100,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_CrossChainQuery_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_CrossChainQueryResult_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_CrossChainQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CrossChainQueryResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -152,7 +152,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_CrossChainQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CrossChainQueryResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -161,14 +161,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_CrossChainQuery_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_CrossChainQueryResult_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_CrossChainQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CrossChainQueryResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -176,9 +176,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_CrossChainQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "apps", "ibc-query", "v1", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_CrossChainQueryResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "apps", "ibc-query", "v1", "id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( - forward_Query_CrossChainQuery_0 = runtime.ForwardResponseMessage + forward_Query_CrossChainQueryResult_0 = runtime.ForwardResponseMessage ) diff --git a/proto/ibc/applications/ibc_query/v1/packet.proto b/proto/ibc/applications/ibc_query/v1/packet.proto new file mode 100644 index 00000000000..80873e5d9b2 --- /dev/null +++ b/proto/ibc/applications/ibc_query/v1/packet.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package ibc.applications.ibc_query.v1; +import "proofs.proto"; + +option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types"; + +// IBCQueryPacketData defines a struct for the packet payload +message IBCQueryPacketData { + string id = 1; + string path = 2; + uint64 query_height = 3; + repeated ics23.ProofSpec proof_specs = 4; // TODO: Proof specifications used in verifying counterparty state +} \ No newline at end of file diff --git a/proto/ibc/applications/ibc_query/v1/query.proto b/proto/ibc/applications/ibc_query/v1/query.proto index baa4389890f..bcdd2024b2e 100644 --- a/proto/ibc/applications/ibc_query/v1/query.proto +++ b/proto/ibc/applications/ibc_query/v1/query.proto @@ -9,20 +9,20 @@ import "ibc/applications/ibc_query/v1/genesis.proto"; // Query service Query { - // query CrossChainQuery - rpc CrossChainQuery(QueryCrossChainQuery) returns (QueryCrossChainQueryResponse) { + // query CrossChainQueryResult + rpc CrossChainQueryResult(QueryCrossChainQueryResult) returns (QueryCrossChainQueryResultResponse) { option (google.api.http).get = "/ibc/apps/ibc-query/v1/{id}"; } } // QueryCrossChainQuery -message QueryCrossChainQuery { +message QueryCrossChainQueryResult { // query id string id = 1; } // QueryCrossChainQueryResponse -message QueryCrossChainQueryResponse { +message QueryCrossChainQueryResultResponse { string id = 1; QueryResult result = 2; bytes data = 3; From f5067ec55bd07b590b4a5cfd6991e4d306f8d3c1 Mon Sep 17 00:00:00 2001 From: Woojinger Date: Sun, 18 Sep 2022 20:24:42 +0900 Subject: [PATCH 2/5] separate crosschainquery proto --- go.mod | 89 ++ go.sum | 79 -- .../31-ibc-query/types/crosschainquery.pb.go | 865 ++++++++++++++++++ 3 files changed, 954 insertions(+), 79 deletions(-) create mode 100644 modules/apps/31-ibc-query/types/crosschainquery.pb.go diff --git a/go.mod b/go.mod index 9f9e4afa6ea..70baed8d7ef 100644 --- a/go.mod +++ b/go.mod @@ -27,8 +27,97 @@ require ( ) require ( + filippo.io/edwards25519 v1.0.0-beta.2 // indirect + github.com/99designs/keyring v1.1.6 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/DataDog/zstd v1.4.5 // indirect + github.com/Workiva/go-datastructures v1.0.53 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/btcsuite/btcd v0.22.0-beta // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect + github.com/cosmos/btcutil v1.0.4 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/iavl v0.17.3 // indirect + github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect + github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/danieljoos/wincred v1.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.2 // indirect + github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/felixge/httpsnoop v1.0.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/gin-gonic/gin v1.7.0 // indirect + github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/gateway v1.1.0 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/btree v1.0.0 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect + github.com/improbable-eng/grpc-web v0.14.1 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect + github.com/klauspost/compress v1.13.6 // indirect + github.com/lib/pq v1.10.4 // indirect + github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect + github.com/rs/cors v1.8.2 // indirect github.com/rs/zerolog v1.26.1 // indirect + github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.3.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect + github.com/tendermint/btcd v0.1.1 // indirect + github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/zondax/hid v0.9.0 // indirect + go.etcd.io/bbolt v1.3.6 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect + golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + nhooyr.io/websocket v1.8.6 // indirect ) diff --git a/go.sum b/go.sum index a2094e3b459..01f587eac52 100644 --- a/go.sum +++ b/go.sum @@ -29,18 +29,12 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -328,7 +322,6 @@ github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -444,9 +437,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= @@ -480,12 +471,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -534,7 +521,6 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -567,7 +553,6 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= @@ -591,7 +576,6 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= @@ -634,7 +618,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -739,7 +722,6 @@ github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -755,7 +737,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -788,11 +769,6 @@ github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -834,7 +810,6 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -884,15 +859,12 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -900,7 +872,6 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= -github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -1040,15 +1011,11 @@ go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1210,13 +1177,7 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1236,9 +1197,6 @@ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1250,7 +1208,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1351,14 +1308,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1427,10 +1378,8 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1454,8 +1403,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= @@ -1493,13 +1440,6 @@ google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdr google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1578,21 +1518,6 @@ google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1630,10 +1555,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1647,7 +1570,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -1688,7 +1610,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/modules/apps/31-ibc-query/types/crosschainquery.pb.go b/modules/apps/31-ibc-query/types/crosschainquery.pb.go new file mode 100644 index 00000000000..8292fa4a8aa --- /dev/null +++ b/modules/apps/31-ibc-query/types/crosschainquery.pb.go @@ -0,0 +1,865 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/applications/ibc_query/v1/crosschainquery.proto + +package types + +import ( + fmt "fmt" + types "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + 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 + +// QueryResult +type QueryResult int32 + +const ( + // UNSPECIFIED + QueryResult_QUERY_RESULT_UNSPECIFIED QueryResult = 0 + // SUCCESS + QueryResult_QUERY_RESULT_SUCCESS QueryResult = 1 + // FAILURE + QueryResult_QUERY_RESULT_FAILURE QueryResult = 2 + // TIMEOUT + QueryResult_QUERY_RESULT_TIMEOUT QueryResult = 3 +) + +var QueryResult_name = map[int32]string{ + 0: "QUERY_RESULT_UNSPECIFIED", + 1: "QUERY_RESULT_SUCCESS", + 2: "QUERY_RESULT_FAILURE", + 3: "QUERY_RESULT_TIMEOUT", +} + +var QueryResult_value = map[string]int32{ + "QUERY_RESULT_UNSPECIFIED": 0, + "QUERY_RESULT_SUCCESS": 1, + "QUERY_RESULT_FAILURE": 2, + "QUERY_RESULT_TIMEOUT": 3, +} + +func (x QueryResult) String() string { + return proto.EnumName(QueryResult_name, int32(x)) +} + +func (QueryResult) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_bcb4ce27fb7943fa, []int{0} +} + +// CrossChainQuery +type CrossChainQuery struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + LocalTimeoutHeight *types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height,omitempty"` + LocalTimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=local_timeout_timestamp,json=localTimeoutTimestamp,proto3" json:"local_timeout_timestamp,omitempty"` + QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` +} + +func (m *CrossChainQuery) Reset() { *m = CrossChainQuery{} } +func (m *CrossChainQuery) String() string { return proto.CompactTextString(m) } +func (*CrossChainQuery) ProtoMessage() {} +func (*CrossChainQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_bcb4ce27fb7943fa, []int{0} +} +func (m *CrossChainQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CrossChainQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CrossChainQuery.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 *CrossChainQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_CrossChainQuery.Merge(m, src) +} +func (m *CrossChainQuery) XXX_Size() int { + return m.Size() +} +func (m *CrossChainQuery) XXX_DiscardUnknown() { + xxx_messageInfo_CrossChainQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_CrossChainQuery proto.InternalMessageInfo + +func (m *CrossChainQuery) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *CrossChainQuery) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *CrossChainQuery) GetLocalTimeoutHeight() *types.Height { + if m != nil { + return m.LocalTimeoutHeight + } + return nil +} + +func (m *CrossChainQuery) GetLocalTimeoutTimestamp() uint64 { + if m != nil { + return m.LocalTimeoutTimestamp + } + return 0 +} + +func (m *CrossChainQuery) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + +func (m *CrossChainQuery) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +// CrossChainQueryResult +type CrossChainQueryResult struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Result QueryResult `protobuf:"varint,2,opt,name=result,proto3,enum=ibc.applications.ibc_query.v1.QueryResult" json:"result,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *CrossChainQueryResult) Reset() { *m = CrossChainQueryResult{} } +func (m *CrossChainQueryResult) String() string { return proto.CompactTextString(m) } +func (*CrossChainQueryResult) ProtoMessage() {} +func (*CrossChainQueryResult) Descriptor() ([]byte, []int) { + return fileDescriptor_bcb4ce27fb7943fa, []int{1} +} +func (m *CrossChainQueryResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CrossChainQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CrossChainQueryResult.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 *CrossChainQueryResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_CrossChainQueryResult.Merge(m, src) +} +func (m *CrossChainQueryResult) XXX_Size() int { + return m.Size() +} +func (m *CrossChainQueryResult) XXX_DiscardUnknown() { + xxx_messageInfo_CrossChainQueryResult.DiscardUnknown(m) +} + +var xxx_messageInfo_CrossChainQueryResult proto.InternalMessageInfo + +func (m *CrossChainQueryResult) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *CrossChainQueryResult) GetResult() QueryResult { + if m != nil { + return m.Result + } + return QueryResult_QUERY_RESULT_UNSPECIFIED +} + +func (m *CrossChainQueryResult) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterEnum("ibc.applications.ibc_query.v1.QueryResult", QueryResult_name, QueryResult_value) + proto.RegisterType((*CrossChainQuery)(nil), "ibc.applications.ibc_query.v1.CrossChainQuery") + proto.RegisterType((*CrossChainQueryResult)(nil), "ibc.applications.ibc_query.v1.CrossChainQueryResult") +} + +func init() { + proto.RegisterFile("ibc/applications/ibc_query/v1/crosschainquery.proto", fileDescriptor_bcb4ce27fb7943fa) +} + +var fileDescriptor_bcb4ce27fb7943fa = []byte{ + // 455 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcf, 0x6f, 0xd3, 0x30, + 0x14, 0xae, 0xbb, 0x51, 0x31, 0x77, 0x1a, 0x95, 0xb5, 0x89, 0x68, 0x40, 0x28, 0x3b, 0x55, 0x93, + 0x66, 0xab, 0x2b, 0xe2, 0xc2, 0x89, 0x85, 0x4c, 0x44, 0x2a, 0x3f, 0xe6, 0x24, 0x07, 0xb8, 0x44, + 0x89, 0x13, 0x35, 0x96, 0x92, 0x3a, 0xc4, 0x4e, 0xa5, 0x9e, 0xf8, 0x17, 0xf8, 0xb3, 0x38, 0xee, + 0xc8, 0x11, 0xb5, 0x7f, 0x06, 0x17, 0x64, 0xa7, 0x43, 0x1d, 0x95, 0x38, 0xf9, 0xe9, 0xfb, 0xfc, + 0x7d, 0xef, 0xbd, 0x4f, 0x0f, 0x4e, 0x78, 0xc2, 0x48, 0x5c, 0x55, 0x05, 0x67, 0xb1, 0xe2, 0x62, + 0x2e, 0x09, 0x4f, 0x58, 0xf4, 0xb5, 0xc9, 0xea, 0x25, 0x59, 0x8c, 0x09, 0xab, 0x85, 0x94, 0x2c, + 0x8f, 0xf9, 0xdc, 0x40, 0xb8, 0xaa, 0x85, 0x12, 0xe8, 0x19, 0x4f, 0x18, 0xde, 0x16, 0xe1, 0xbf, + 0x22, 0xbc, 0x18, 0x9f, 0x3e, 0xd7, 0x9e, 0x4c, 0xd4, 0x19, 0x61, 0x05, 0xcf, 0xe6, 0xca, 0x18, + 0x99, 0xaa, 0xd5, 0x9f, 0xfd, 0x06, 0xf0, 0x91, 0xa3, 0x9d, 0x1d, 0xed, 0x7c, 0xa3, 0x75, 0xe8, + 0x08, 0x76, 0x79, 0x6a, 0x81, 0x21, 0x18, 0x1d, 0xd0, 0x2e, 0x4f, 0x11, 0x82, 0xfb, 0x55, 0xac, + 0x72, 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, 0x1b, 0x6f, 0x1a, 0x52, 0x77, 0xd0, 0xdd, 0x61, 0x02, + 0xef, 0xbd, 0xfb, 0x31, 0x0c, 0x06, 0x7b, 0x57, 0xe1, 0x8f, 0x95, 0x0d, 0x6e, 0x57, 0x36, 0xf8, + 0xb5, 0xb2, 0xc1, 0xf7, 0xb5, 0xdd, 0xb9, 0x5d, 0xdb, 0x9d, 0x9f, 0x6b, 0xbb, 0xf3, 0xe5, 0xf5, + 0x8c, 0xab, 0xbc, 0x49, 0x30, 0x13, 0x25, 0x61, 0x42, 0x96, 0xc2, 0x5c, 0xe2, 0xc5, 0x4c, 0x90, + 0xc5, 0x4b, 0x52, 0x8a, 0xb4, 0x29, 0x32, 0xa9, 0x0f, 0x55, 0x92, 0xc9, 0xf8, 0x42, 0x33, 0xed, + 0x8d, 0xaa, 0x65, 0x95, 0xc9, 0xa4, 0x67, 0xee, 0x6a, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4f, + 0xd5, 0x0b, 0xc8, 0xce, 0x02, 0x00, 0x00, +} + +func (m *CrossChainQuery) 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 *CrossChainQuery) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CrossChainQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintCrosschainquery(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x32 + } + if m.QueryHeight != 0 { + i = encodeVarintCrosschainquery(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x28 + } + if m.LocalTimeoutTimestamp != 0 { + i = encodeVarintCrosschainquery(dAtA, i, uint64(m.LocalTimeoutTimestamp)) + i-- + dAtA[i] = 0x20 + } + if m.LocalTimeoutHeight != nil { + { + size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCrosschainquery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintCrosschainquery(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCrosschainquery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CrossChainQueryResult) 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 *CrossChainQueryResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CrossChainQueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintCrosschainquery(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if m.Result != 0 { + i = encodeVarintCrosschainquery(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintCrosschainquery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintCrosschainquery(dAtA []byte, offset int, v uint64) int { + offset -= sovCrosschainquery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CrossChainQuery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCrosschainquery(uint64(l)) + } + l = len(m.Path) + if l > 0 { + n += 1 + l + sovCrosschainquery(uint64(l)) + } + if m.LocalTimeoutHeight != nil { + l = m.LocalTimeoutHeight.Size() + n += 1 + l + sovCrosschainquery(uint64(l)) + } + if m.LocalTimeoutTimestamp != 0 { + n += 1 + sovCrosschainquery(uint64(m.LocalTimeoutTimestamp)) + } + if m.QueryHeight != 0 { + n += 1 + sovCrosschainquery(uint64(m.QueryHeight)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovCrosschainquery(uint64(l)) + } + return n +} + +func (m *CrossChainQueryResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovCrosschainquery(uint64(l)) + } + if m.Result != 0 { + n += 1 + sovCrosschainquery(uint64(m.Result)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovCrosschainquery(uint64(l)) + } + return n +} + +func sovCrosschainquery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCrosschainquery(x uint64) (n int) { + return sovCrosschainquery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CrossChainQuery) 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 ErrIntOverflowCrosschainquery + } + 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: CrossChainQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrossChainQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + 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 ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + 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 ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalTimeoutHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LocalTimeoutHeight == nil { + m.LocalTimeoutHeight = &types.Height{} + } + if err := m.LocalTimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalTimeoutTimestamp", wireType) + } + m.LocalTimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocalTimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + 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 ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrosschainquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCrosschainquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CrossChainQueryResult) 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 ErrIntOverflowCrosschainquery + } + 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: CrossChainQueryResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CrossChainQueryResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + 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 ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= QueryResult(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrosschainquery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCrosschainquery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCrosschainquery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrosschainquery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCrosschainquery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCrosschainquery(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, ErrIntOverflowCrosschainquery + } + 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, ErrIntOverflowCrosschainquery + } + 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, ErrIntOverflowCrosschainquery + } + 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, ErrInvalidLengthCrosschainquery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCrosschainquery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCrosschainquery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCrosschainquery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCrosschainquery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCrosschainquery = fmt.Errorf("proto: unexpected end of group") +) From e09daae39aa88f0bc20e90e49bda5e2e36edb9d6 Mon Sep 17 00:00:00 2001 From: Woojinger Date: Sun, 18 Sep 2022 22:59:09 +0900 Subject: [PATCH 3/5] feat: add IBCQueryResultPacketData --- docs/ibc/proto-docs.md | 22 +- modules/apps/31-ibc-query/keeper/relay.go | 24 +- modules/apps/31-ibc-query/types/packet.pb.go | 401 ++++++++++++++++-- .../applications/ibc_query/v1/packet.proto | 20 +- 4 files changed, 426 insertions(+), 41 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 55522b29b4d..24c3175110a 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -94,6 +94,7 @@ - [ibc/applications/ibc_query/v1/packet.proto](#ibc/applications/ibc_query/v1/packet.proto) - [IBCQueryPacketData](#ibc.applications.ibc_query.v1.IBCQueryPacketData) + - [IBCQueryResultPacketData](#ibc.applications.ibc_query.v1.IBCQueryResultPacketData) - [ibc/applications/ibc_query/v1/query.proto](#ibc/applications/ibc_query/v1/query.proto) - [QueryCrossChainQueryResult](#ibc.applications.ibc_query.v1.QueryCrossChainQueryResult) @@ -1593,7 +1594,7 @@ GenesisState defines the ICS31 ibc-query genesis state ### IBCQueryPacketData -IBCQueryPacketData defines a struct for the packet payload +IBCQueryPacketData defines a struct for the cross chain query packet payload | Field | Type | Label | Description | @@ -1601,6 +1602,25 @@ IBCQueryPacketData defines a struct for the packet payload | `id` | [string](#string) | | | | `path` | [string](#string) | | | | `query_height` | [uint64](#uint64) | | | + + + + + + + + +### IBCQueryResultPacketData +IBCQueryPacketData defines a struct for the cross chain query result packet payload + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | +| `path` | [string](#string) | | | +| `query_height` | [uint64](#uint64) | | | +| `result` | [QueryResult](#ibc.applications.ibc_query.v1.QueryResult) | | | +| `data` | [bytes](#bytes) | | | | `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | TODO: Proof specifications used in verifying counterparty state | diff --git a/modules/apps/31-ibc-query/keeper/relay.go b/modules/apps/31-ibc-query/keeper/relay.go index 13e755ab58a..0c596ca5876 100644 --- a/modules/apps/31-ibc-query/keeper/relay.go +++ b/modules/apps/31-ibc-query/keeper/relay.go @@ -55,22 +55,28 @@ func (k Keeper) SendQuery(ctx sdk.Context, // OnRecvPacket processes a cross chain query result. func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) error { - var data types.CrossChainQueryResult + var packetData types.IBCQueryResultPacketData + var queryResult types.CrossChainQueryResult - if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { - return sdkerrors.Wrapf(types.ErrUnknownDataType, "cannot unmarshal ICS-31 interchain query packet data") + if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &packetData); err != nil { + return sdkerrors.Wrapf(types.ErrUnknownDataType, "cannot unmarshal ICS-31 interchain query packet packetData") } - // check CrossChainQuery exist - if _, found := k.GetCrossChainQuery(ctx, data.Id); !found { - return sdkerrors.Wrapf(types.ErrCrossChainQueryNotFound, "query Id doesn't exist in store") + // TODO: validate query packetData with proof + + queryResult = types.CrossChainQueryResult{ + Id: packetData.Id, + Result: queryResult.Result, + Data: packetData.Data, } - // remove query from privateStore - k.DeleteCrossChainQuery(ctx, data.Id) + // remove CrossChainQuery from privateStore + if _, found := k.GetCrossChainQuery(ctx, queryResult.Id); found { + k.DeleteCrossChainQuery(ctx, queryResult.Id) + } // store result in privateStore - k.SetCrossChainQueryResult(ctx, data) + k.SetCrossChainQueryResult(ctx, queryResult) return nil } diff --git a/modules/apps/31-ibc-query/types/packet.pb.go b/modules/apps/31-ibc-query/types/packet.pb.go index 01f158604f6..5e69e0f8132 100644 --- a/modules/apps/31-ibc-query/types/packet.pb.go +++ b/modules/apps/31-ibc-query/types/packet.pb.go @@ -23,12 +23,11 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// IBCQueryPacketData defines a struct for the packet payload +// IBCQueryPacketData defines a struct for the cross chain query packet payload type IBCQueryPacketData struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` - ProofSpecs []*_go.ProofSpec `protobuf:"bytes,4,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *IBCQueryPacketData) Reset() { *m = IBCQueryPacketData{} } @@ -85,7 +84,85 @@ func (m *IBCQueryPacketData) GetQueryHeight() uint64 { return 0 } -func (m *IBCQueryPacketData) GetProofSpecs() []*_go.ProofSpec { +// IBCQueryPacketData defines a struct for the cross chain query result packet payload +type IBCQueryResultPacketData struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + QueryHeight uint64 `protobuf:"varint,3,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + Result QueryResult `protobuf:"varint,4,opt,name=result,proto3,enum=ibc.applications.ibc_query.v1.QueryResult" json:"result,omitempty"` + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + ProofSpecs []*_go.ProofSpec `protobuf:"bytes,6,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty"` +} + +func (m *IBCQueryResultPacketData) Reset() { *m = IBCQueryResultPacketData{} } +func (m *IBCQueryResultPacketData) String() string { return proto.CompactTextString(m) } +func (*IBCQueryResultPacketData) ProtoMessage() {} +func (*IBCQueryResultPacketData) Descriptor() ([]byte, []int) { + return fileDescriptor_0c3b95af207674c8, []int{1} +} +func (m *IBCQueryResultPacketData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IBCQueryResultPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IBCQueryResultPacketData.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 *IBCQueryResultPacketData) XXX_Merge(src proto.Message) { + xxx_messageInfo_IBCQueryResultPacketData.Merge(m, src) +} +func (m *IBCQueryResultPacketData) XXX_Size() int { + return m.Size() +} +func (m *IBCQueryResultPacketData) XXX_DiscardUnknown() { + xxx_messageInfo_IBCQueryResultPacketData.DiscardUnknown(m) +} + +var xxx_messageInfo_IBCQueryResultPacketData proto.InternalMessageInfo + +func (m *IBCQueryResultPacketData) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *IBCQueryResultPacketData) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *IBCQueryResultPacketData) GetQueryHeight() uint64 { + if m != nil { + return m.QueryHeight + } + return 0 +} + +func (m *IBCQueryResultPacketData) GetResult() QueryResult { + if m != nil { + return m.Result + } + return QueryResult_QUERY_RESULT_UNSPECIFIED +} + +func (m *IBCQueryResultPacketData) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *IBCQueryResultPacketData) GetProofSpecs() []*_go.ProofSpec { if m != nil { return m.ProofSpecs } @@ -94,6 +171,7 @@ func (m *IBCQueryPacketData) GetProofSpecs() []*_go.ProofSpec { func init() { proto.RegisterType((*IBCQueryPacketData)(nil), "ibc.applications.ibc_query.v1.IBCQueryPacketData") + proto.RegisterType((*IBCQueryResultPacketData)(nil), "ibc.applications.ibc_query.v1.IBCQueryResultPacketData") } func init() { @@ -101,25 +179,29 @@ func init() { } var fileDescriptor_0c3b95af207674c8 = []byte{ - // 281 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x31, 0x4b, 0xc4, 0x30, - 0x1c, 0xc5, 0x2f, 0x77, 0x45, 0x30, 0x3d, 0x44, 0x32, 0x15, 0xc1, 0x50, 0x9d, 0x8a, 0x70, 0x09, - 0xbd, 0xba, 0xb9, 0x9d, 0x0e, 0xba, 0x9d, 0x15, 0x17, 0x97, 0x92, 0xa6, 0xb1, 0x0d, 0x5e, 0x4d, - 0x6c, 0xd2, 0xc2, 0x7d, 0x09, 0xf1, 0x63, 0x39, 0xde, 0xe8, 0x28, 0xed, 0x17, 0x91, 0xe6, 0x50, - 0xdc, 0x1e, 0xef, 0x3d, 0xde, 0x9f, 0xff, 0x0f, 0x5e, 0xc8, 0x9c, 0x53, 0xa6, 0xf5, 0x46, 0x72, - 0x66, 0xa5, 0x7a, 0x35, 0x54, 0xe6, 0x3c, 0x7b, 0x6b, 0x45, 0xb3, 0xa5, 0x5d, 0x4c, 0x35, 0xe3, - 0x2f, 0xc2, 0x12, 0xdd, 0x28, 0xab, 0xd0, 0xa9, 0xcc, 0x39, 0xf9, 0xdf, 0x25, 0x7f, 0x5d, 0xd2, - 0xc5, 0x27, 0x73, 0xdd, 0x28, 0xf5, 0x6c, 0xf6, 0xe5, 0xf3, 0x77, 0x00, 0xd1, 0xdd, 0xea, 0xfa, - 0x7e, 0x4c, 0xd7, 0x6e, 0xe5, 0x86, 0x59, 0x86, 0x8e, 0xe0, 0x54, 0x16, 0x01, 0x08, 0x41, 0x74, - 0x98, 0x4e, 0x65, 0x81, 0x10, 0xf4, 0x34, 0xb3, 0x55, 0x30, 0x75, 0x8e, 0xd3, 0xe8, 0x0c, 0xce, - 0xdd, 0x68, 0x56, 0x09, 0x59, 0x56, 0x36, 0x98, 0x85, 0x20, 0xf2, 0x52, 0xdf, 0x79, 0xb7, 0xce, - 0x42, 0x31, 0xf4, 0xdd, 0xb5, 0xcc, 0x68, 0xc1, 0x4d, 0xe0, 0x85, 0xb3, 0xc8, 0x5f, 0x1e, 0x13, - 0xc9, 0xcd, 0x32, 0x21, 0xeb, 0x31, 0x79, 0xd0, 0x82, 0xa7, 0x50, 0xff, 0x4a, 0xb3, 0x7a, 0xfc, - 0xec, 0x31, 0xd8, 0xf5, 0x18, 0x7c, 0xf7, 0x18, 0x7c, 0x0c, 0x78, 0xb2, 0x1b, 0xf0, 0xe4, 0x6b, - 0xc0, 0x93, 0xa7, 0xab, 0x52, 0xda, 0xaa, 0xcd, 0x09, 0x57, 0x35, 0xe5, 0xca, 0xd4, 0xca, 0x41, - 0x58, 0x94, 0x8a, 0x76, 0x97, 0xb4, 0x56, 0x45, 0xbb, 0x11, 0x66, 0x64, 0x64, 0x68, 0x12, 0x2f, - 0xc6, 0x64, 0x8f, 0xc7, 0x6e, 0xb5, 0x30, 0xf9, 0x81, 0x7b, 0x37, 0xf9, 0x09, 0x00, 0x00, 0xff, - 0xff, 0x89, 0x0a, 0x68, 0x8f, 0x49, 0x01, 0x00, 0x00, + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x51, 0x3f,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f1, 0x3e, 0x3d, 0x16, 0xa6, 0x98, 0xdb, 0x7f, 0xef, 0x40, 0x63, 0xd8, 0xca, 0x5d, + 0x34, 0x6e, 0xfa, 0x20, 0xe8, 0x8e, 0x06, 0xe4, 0xe8, 0xcd, 0xc8, 0xc1, 0x67, 0xe2, 0x5f, 0x67, + 0x59, 0x9d, 0x32, 0xcb, 0xf0, 0x89, 0x0f, 0x82, 0x4e, 0xec, 0x30, 0x0a, 0x61, 0xdb, 0x5d, 0x77, + 0x6a, 0xb4, 0xe0, 0x06, 0xb7, 0xfc, 0x46, 0xd0, 0x1e, 0x9d, 0x11, 0xc9, 0xcd, 0x28, 0x22, 0x93, + 0xf2, 0xe5, 0x41, 0x0b, 0x1e, 0x43, 0xbd, 0x87, 0x66, 0xfc, 0xf8, 0xb1, 0xf5, 0xc0, 0x66, 0xeb, + 0x81, 0xaf, 0xad, 0x07, 0xde, 0x77, 0x5e, 0x6d, 0xb3, 0xf3, 0x6a, 0x9f, 0x3b, 0xaf, 0xf6, 0x74, + 0x35, 0x93, 0x36, 0x2b, 0x12, 0xc2, 0xd5, 0x82, 0x72, 0x65, 0x16, 0xca, 0x6d, 0x33, 0x9c, 0x29, + 0xba, 0xba, 0xa4, 0x0b, 0x95, 0x16, 0x73, 0x61, 0xca, 0xe9, 0x0c, 0x8d, 0xc2, 0x61, 0xf9, 0x52, + 0xad, 0x66, 0xd7, 0x5a, 0x98, 0xa4, 0xe5, 0x96, 0x8a, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x60, + 0xbd, 0x89, 0xab, 0x39, 0x02, 0x00, 0x00, } func (m *IBCQueryPacketData) Marshal() (dAtA []byte, err error) { @@ -138,6 +220,48 @@ func (m *IBCQueryPacketData) MarshalTo(dAtA []byte) (int, error) { } func (m *IBCQueryPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.QueryHeight != 0 { + i = encodeVarintPacket(dAtA, i, uint64(m.QueryHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintPacket(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintPacket(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IBCQueryResultPacketData) 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 *IBCQueryResultPacketData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IBCQueryResultPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -153,9 +277,21 @@ func (m *IBCQueryPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintPacket(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintPacket(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x2a + } + if m.Result != 0 { + i = encodeVarintPacket(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x20 + } if m.QueryHeight != 0 { i = encodeVarintPacket(dAtA, i, uint64(m.QueryHeight)) i-- @@ -206,6 +342,33 @@ func (m *IBCQueryPacketData) Size() (n int) { if m.QueryHeight != 0 { n += 1 + sovPacket(uint64(m.QueryHeight)) } + return n +} + +func (m *IBCQueryResultPacketData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovPacket(uint64(l)) + } + l = len(m.Path) + if l > 0 { + n += 1 + l + sovPacket(uint64(l)) + } + if m.QueryHeight != 0 { + n += 1 + sovPacket(uint64(m.QueryHeight)) + } + if m.Result != 0 { + n += 1 + sovPacket(uint64(m.Result)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovPacket(uint64(l)) + } if len(m.ProofSpecs) > 0 { for _, e := range m.ProofSpecs { l = e.Size() @@ -250,6 +413,139 @@ func (m *IBCQueryPacketData) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: IBCQueryPacketData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + 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 ErrInvalidLengthPacket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + 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 ErrInvalidLengthPacket + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryHeight", wireType) + } + m.QueryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QueryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPacket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPacket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IBCQueryResultPacketData) 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 ErrIntOverflowPacket + } + 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: IBCQueryResultPacketData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IBCQueryResultPacketData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) @@ -334,6 +630,59 @@ func (m *IBCQueryPacketData) Unmarshal(dAtA []byte) error { } } case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + m.Result = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= QueryResult(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPacket + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPacket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofSpecs", wireType) } diff --git a/proto/ibc/applications/ibc_query/v1/packet.proto b/proto/ibc/applications/ibc_query/v1/packet.proto index 6383df20c65..68b9055da83 100644 --- a/proto/ibc/applications/ibc_query/v1/packet.proto +++ b/proto/ibc/applications/ibc_query/v1/packet.proto @@ -3,13 +3,23 @@ syntax = "proto3"; package ibc.applications.ibc_query.v1; import "proofs.proto"; +import "ibc/applications/ibc_query/v1/crosschainquery.proto"; option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types"; -// IBCQueryPacketData defines a struct for the packet payload +// IBCQueryPacketData defines a struct for the cross chain query packet payload message IBCQueryPacketData { - string id = 1; - string path = 2; - uint64 query_height = 3; - repeated ics23.ProofSpec proof_specs = 4; // TODO: Proof specifications used in verifying counterparty state + string id = 1; + string path = 2; + uint64 query_height = 3; +} + +// IBCQueryPacketData defines a struct for the cross chain query result packet payload +message IBCQueryResultPacketData { + string id = 1; + string path = 2; + uint64 query_height = 3; + QueryResult result = 4; + bytes data = 5; + repeated ics23.ProofSpec proof_specs = 6; // TODO: Proof specifications used in verifying counterparty state } \ No newline at end of file From c6a3c5901b176b17a238f15ac4d1acacbd971d37 Mon Sep 17 00:00:00 2001 From: sujine2 Date: Mon, 19 Sep 2022 00:02:47 +0900 Subject: [PATCH 4/5] refactor: remove height pointer --- .../31-ibc-query/keeper/msg_server_test.go | 2 +- .../31-ibc-query/types/crosschainquery.pb.go | 106 +++++++++--------- modules/apps/31-ibc-query/types/event.pb.go | 86 +++++++------- modules/apps/31-ibc-query/types/events.go | 3 +- modules/apps/31-ibc-query/types/msgs.go | 4 +- modules/apps/31-ibc-query/types/tx.pb.go | 103 ++++++++--------- .../ibc_query/v1/crosschainquery.proto | 4 +- .../ibc/applications/ibc_query/v1/event.proto | 4 +- proto/ibc/applications/ibc_query/v1/tx.proto | 3 +- 9 files changed, 154 insertions(+), 161 deletions(-) diff --git a/modules/apps/31-ibc-query/keeper/msg_server_test.go b/modules/apps/31-ibc-query/keeper/msg_server_test.go index 921b0c2acfa..641884ad4b2 100644 --- a/modules/apps/31-ibc-query/keeper/msg_server_test.go +++ b/modules/apps/31-ibc-query/keeper/msg_server_test.go @@ -35,7 +35,7 @@ func (suite *KeeperTestSuite) TestSubmitCrossChainQuery() { true, func() { suite.coordinator.CreateChannels(path) - msg = types.NewMsgSubmitCrossChainQuery("query-1", "test/query_path", &timeoutHeight, timeoutTimestamp, queryHeight.RevisionHeight, addr, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) + msg = types.NewMsgSubmitCrossChainQuery("query-1", "test/query_path", timeoutHeight, timeoutTimestamp, queryHeight.RevisionHeight, addr, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, }, } diff --git a/modules/apps/31-ibc-query/types/crosschainquery.pb.go b/modules/apps/31-ibc-query/types/crosschainquery.pb.go index 8292fa4a8aa..defca493a9c 100644 --- a/modules/apps/31-ibc-query/types/crosschainquery.pb.go +++ b/modules/apps/31-ibc-query/types/crosschainquery.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -61,12 +62,12 @@ func (QueryResult) EnumDescriptor() ([]byte, []int) { // CrossChainQuery type CrossChainQuery struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - LocalTimeoutHeight *types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height,omitempty"` - LocalTimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=local_timeout_timestamp,json=localTimeoutTimestamp,proto3" json:"local_timeout_timestamp,omitempty"` - QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` - ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + LocalTimeoutHeight types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height" yaml:"timeout_height"` + LocalTimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=local_timeout_timestamp,json=localTimeoutTimestamp,proto3" json:"local_timeout_timestamp,omitempty"` + QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` } func (m *CrossChainQuery) Reset() { *m = CrossChainQuery{} } @@ -116,11 +117,11 @@ func (m *CrossChainQuery) GetPath() string { return "" } -func (m *CrossChainQuery) GetLocalTimeoutHeight() *types.Height { +func (m *CrossChainQuery) GetLocalTimeoutHeight() types.Height { if m != nil { return m.LocalTimeoutHeight } - return nil + return types.Height{} } func (m *CrossChainQuery) GetLocalTimeoutTimestamp() uint64 { @@ -216,36 +217,38 @@ func init() { } var fileDescriptor_bcb4ce27fb7943fa = []byte{ - // 455 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0xae, 0xbb, 0x51, 0x31, 0x77, 0x1a, 0x95, 0xb5, 0x89, 0x68, 0x40, 0x28, 0x3b, 0x55, 0x93, - 0x66, 0xab, 0x2b, 0xe2, 0xc2, 0x89, 0x85, 0x4c, 0x44, 0x2a, 0x3f, 0xe6, 0x24, 0x07, 0xb8, 0x44, - 0x89, 0x13, 0x35, 0x96, 0x92, 0x3a, 0xc4, 0x4e, 0xa5, 0x9e, 0xf8, 0x17, 0xf8, 0xb3, 0x38, 0xee, - 0xc8, 0x11, 0xb5, 0x7f, 0x06, 0x17, 0x64, 0xa7, 0x43, 0x1d, 0x95, 0x38, 0xf9, 0xe9, 0xfb, 0xfc, - 0x7d, 0xef, 0xbd, 0x4f, 0x0f, 0x4e, 0x78, 0xc2, 0x48, 0x5c, 0x55, 0x05, 0x67, 0xb1, 0xe2, 0x62, - 0x2e, 0x09, 0x4f, 0x58, 0xf4, 0xb5, 0xc9, 0xea, 0x25, 0x59, 0x8c, 0x09, 0xab, 0x85, 0x94, 0x2c, - 0x8f, 0xf9, 0xdc, 0x40, 0xb8, 0xaa, 0x85, 0x12, 0xe8, 0x19, 0x4f, 0x18, 0xde, 0x16, 0xe1, 0xbf, - 0x22, 0xbc, 0x18, 0x9f, 0x3e, 0xd7, 0x9e, 0x4c, 0xd4, 0x19, 0x61, 0x05, 0xcf, 0xe6, 0xca, 0x18, - 0x99, 0xaa, 0xd5, 0x9f, 0xfd, 0x06, 0xf0, 0x91, 0xa3, 0x9d, 0x1d, 0xed, 0x7c, 0xa3, 0x75, 0xe8, - 0x08, 0x76, 0x79, 0x6a, 0x81, 0x21, 0x18, 0x1d, 0xd0, 0x2e, 0x4f, 0x11, 0x82, 0xfb, 0x55, 0xac, - 0x72, 0xab, 0x6b, 0x10, 0x53, 0xa3, 0x29, 0x3c, 0x2e,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x61, 0x02, - 0xef, 0xbd, 0xfb, 0x31, 0x0c, 0x06, 0x7b, 0x57, 0xe1, 0x8f, 0x95, 0x0d, 0x6e, 0x57, 0x36, 0xf8, - 0xb5, 0xb2, 0xc1, 0xf7, 0xb5, 0xdd, 0xb9, 0x5d, 0xdb, 0x9d, 0x9f, 0x6b, 0xbb, 0xf3, 0xe5, 0xf5, - 0x8c, 0xab, 0xbc, 0x49, 0x30, 0x13, 0x25, 0x61, 0x42, 0x96, 0xc2, 0x5c, 0xe2, 0xc5, 0x4c, 0x90, - 0xc5, 0x4b, 0x52, 0x8a, 0xb4, 0x29, 0x32, 0xa9, 0x0f, 0x55, 0x92, 0xc9, 0xf8, 0x42, 0x33, 0xed, - 0x8d, 0xaa, 0x65, 0x95, 0xc9, 0xa4, 0x67, 0xee, 0x6a, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4f, - 0xd5, 0x0b, 0xc8, 0xce, 0x02, 0x00, 0x00, + // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0xb5, 0xdd, 0x12, 0xd1, 0x49, 0x55, 0x22, 0x2b, 0x11, 0x56, 0xa0, 0x4e, 0xc8, 0x2a, 0xaa, + 0xd4, 0x19, 0xa5, 0x41, 0x2c, 0x60, 0x45, 0x8c, 0x2b, 0x2c, 0x95, 0x47, 0xfd, 0x58, 0xc0, 0xc6, + 0xb2, 0xc7, 0x96, 0x3d, 0xc2, 0xce, 0x18, 0x7b, 0x1c, 0x29, 0x2b, 0x7e, 0x81, 0x35, 0x5f, 0xd4, + 0x65, 0x97, 0xac, 0x2a, 0x94, 0xfc, 0x01, 0x5f, 0x80, 0x66, 0x9c, 0xa2, 0x84, 0x48, 0xac, 0x7c, + 0x75, 0xcf, 0x3d, 0xe7, 0x5c, 0x9f, 0xb9, 0x60, 0x4a, 0x42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b3, 0xb8, 0xe2, 0xd7, 0x5d, 0xa1, 0xe9, 0xe4, 0x9c, 0x23, 0xcd, + 0x61, 0xb3, 0x65, 0x11, 0x57, 0x61, 0x4b, 0x9c, 0xdd, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x31, 0x92, 0xc0, 0x31, 0x03, 0x03, 0x00, 0x00, } func (m *CrossChainQuery) Marshal() (dAtA []byte, err error) { @@ -285,18 +288,16 @@ func (m *CrossChainQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if m.LocalTimeoutHeight != nil { - { - size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCrosschainquery(dAtA, i, uint64(size)) + { + size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintCrosschainquery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Path) > 0 { i -= len(m.Path) copy(dAtA[i:], m.Path) @@ -381,10 +382,8 @@ func (m *CrossChainQuery) Size() (n int) { if l > 0 { n += 1 + l + sovCrosschainquery(uint64(l)) } - if m.LocalTimeoutHeight != nil { - l = m.LocalTimeoutHeight.Size() - n += 1 + l + sovCrosschainquery(uint64(l)) - } + l = m.LocalTimeoutHeight.Size() + n += 1 + l + sovCrosschainquery(uint64(l)) if m.LocalTimeoutTimestamp != 0 { n += 1 + sovCrosschainquery(uint64(m.LocalTimeoutTimestamp)) } @@ -546,9 +545,6 @@ func (m *CrossChainQuery) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LocalTimeoutHeight == nil { - m.LocalTimeoutHeight = &types.Height{} - } if err := m.LocalTimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/modules/apps/31-ibc-query/types/event.pb.go b/modules/apps/31-ibc-query/types/event.pb.go index 7c7131b9625..3c453570569 100644 --- a/modules/apps/31-ibc-query/types/event.pb.go +++ b/modules/apps/31-ibc-query/types/event.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -25,11 +26,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EventQuerySubmitted emitted when process MsgSubmitCrossChainQuery tx type EventQuerySubmitted struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - LocalTimeoutHeight *types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height,omitempty"` - LocalTimeoutStamp uint64 `protobuf:"varint,4,opt,name=local_timeout_stamp,json=localTimeoutStamp,proto3" json:"local_timeout_stamp,omitempty"` - QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + LocalTimeoutHeight types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height" yaml:"timeout_height"` + LocalTimeoutStamp uint64 `protobuf:"varint,4,opt,name=local_timeout_stamp,json=localTimeoutStamp,proto3" json:"local_timeout_stamp,omitempty"` + QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` } func (m *EventQuerySubmitted) Reset() { *m = EventQuerySubmitted{} } @@ -79,11 +80,11 @@ func (m *EventQuerySubmitted) GetPath() string { return "" } -func (m *EventQuerySubmitted) GetLocalTimeoutHeight() *types.Height { +func (m *EventQuerySubmitted) GetLocalTimeoutHeight() types.Height { if m != nil { return m.LocalTimeoutHeight } - return nil + return types.Height{} } func (m *EventQuerySubmitted) GetLocalTimeoutStamp() uint64 { @@ -109,27 +110,29 @@ func init() { } var fileDescriptor_6ae7439c9b13df65 = []byte{ - // 320 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xb1, 0x4e, 0xf3, 0x30, - 0x14, 0x85, 0xeb, 0xfe, 0xfd, 0x91, 0x70, 0x11, 0x12, 0x2e, 0x43, 0x54, 0x89, 0x50, 0x98, 0xca, - 0x50, 0x5b, 0xa1, 0x6c, 0x6c, 0x48, 0x48, 0x0c, 0x2c, 0xb4, 0xb0, 0xb0, 0x54, 0x89, 0x63, 0x35, - 0x57, 0x4a, 0x6a, 0x53, 0xdf, 0x44, 0xea, 0x5b, 0xf0, 0x58, 0x8c, 0x1d, 0x11, 0x13, 0x6a, 0x5f, - 0x04, 0xd9, 0x06, 0x54, 0xb6, 0xab, 0x7b, 0xcf, 0x77, 0x4e, 0x72, 0x4c, 0x2f, 0x20, 0x93, 0x22, - 0x35, 0xa6, 0x04, 0x99, 0x22, 0xe8, 0x85, 0x15, 0x90, 0xc9, 0xd9, 0x4b, 0xad, 0x96, 0x2b, 0xd1, - 0x24, 0x42, 0x35, 0x6a, 0x81, 0xdc, 0x2c, 0x35, 0x6a, 0x76, 0x02, 0x99, 0xe4, 0xbb, 0x52, 0xfe, - 0x2b, 0xe5, 0x4d, 0xd2, 0x3f, 0x75, 0x4e, 0x52, 0x2f, 0x95, 0x90, 0x25, 0xa8, 0x05, 0x3a, 0x3c, - 0x4c, 0x81, 0x3f, 0xff, 0x20, 0xb4, 0x77, 0xeb, 0xfc, 0x1e, 0x1c, 0x32, 0xad, 0xb3, 0x0a, 0x10, - 0x55, 0xce, 0x0e, 0x69, 0x1b, 0xf2, 0x88, 0x0c, 0xc8, 0x70, 0x7f, 0xd2, 0x86, 0x9c, 0x31, 0xda, - 0x31, 0x29, 0x16, 0x51, 0xdb, 0x6f, 0xfc, 0xcc, 0xee, 0xe9, 0x71, 0xa9, 0x65, 0x5a, 0xce, 0x10, - 0x2a, 0xa5, 0x6b, 0x9c, 0x15, 0x0a, 0xe6, 0x05, 0x46, 0xff, 0x06, 0x64, 0xd8, 0xbd, 0xec, 0xbb, - 0x2f, 0xe1, 0x2e, 0x9b, 0x7f, 0x27, 0x36, 0x09, 0xbf, 0xf3, 0x8a, 0x09, 0xf3, 0xdc, 0x63, 0xc0, - 0xc2, 0x8e, 0x71, 0xda, 0xfb, 0xeb, 0x66, 0x31, 0xad, 0x4c, 0xd4, 0x19, 0x90, 0x61, 0x67, 0x72, - 0xb4, 0x0b, 0x4c, 0xdd, 0x81, 0x9d, 0xd1, 0x03, 0xff, 0x9b, 0x3f, 0xa9, 0xff, 0xbd, 0xb0, 0xeb, - 0x77, 0xc1, 0xf2, 0xe6, 0xe9, 0x6d, 0x13, 0x93, 0xf5, 0x26, 0x26, 0x9f, 0x9b, 0x98, 0xbc, 0x6e, - 0xe3, 0xd6, 0x7a, 0x1b, 0xb7, 0xde, 0xb7, 0x71, 0xeb, 0xf9, 0x7a, 0x0e, 0x58, 0xd4, 0x19, 0x97, - 0xba, 0x12, 0x52, 0xdb, 0x4a, 0xfb, 0x8a, 0x47, 0x73, 0x2d, 0x9a, 0x2b, 0x51, 0xe9, 0xbc, 0x2e, - 0x95, 0x75, 0x2f, 0x60, 0xc5, 0x38, 0x19, 0xb9, 0x4b, 0x28, 0x1f, 0x57, 0x46, 0xd9, 0x6c, 0xcf, - 0x57, 0x37, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xbd, 0x15, 0x2a, 0xa7, 0x01, 0x00, 0x00, + // 350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x4e, 0xf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e, 0xc0, 0xfd, 0xd7, 0x43, 0x83, 0xc6, 0x55, 0xdb, 0xec, 0x47, 0x4d, + 0x36, 0xdd, 0x25, 0x96, 0x3e, 0x7d, 0xb0, 0xc4, 0x5d, 0x67, 0xb9, 0xee, 0x3a, 0x5f, 0xeb, 0xee, + 0xf9, 0x22, 0x50, 0xe9, 0x4d, 0xff, 0x50, 0xdf, 0x1f, 0x13, 0x6b, 0xfb, 0x54, 0x75, 0x2b, 0x09, + 0xa1, 0xb8, 0x79, 0x18, 0x96, 0x43, 0xa0, 0x32, 0xb7, 0xde, 0x43, 0x83, 0xfa, 0xf8, 0x6c, 0x5f, + 0x30, 0x31, 0x03, 0x72, 0x81, 0x4f, 0xec, 0x6d, 0x7e, 0x97, 0xfa, 0x6f, 0xc1, 0x86, 0xed, 0xed, + 0xb6, 0x78, 0x5e, 0x6e, 0x3c, 0xb4, 0xda, 0x78, 0xe8, 0x73, 0xe3, 0xa1, 0xf7, 0xad, 0xe7, 0xac, + 0xb6, 0x9e, 0xf3, 0xb1, 0xf5, 0x9c, 0x97, 0xdb, 0x58, 0x42, 0x52, 0x84, 0x94, 0x6b, 0xc5, 0xb8, + 0xce, 0x95, 0xb6, 0x7f, 0x19, 0xc6, 0x9a, 0x95, 0xd7, 0x4c, 0xe9, 0xa8, 0x48, 0x45, 0x6e, 0xde, + 0x96, 0xb3, 0x91, 0x3f, 0x34, 0x93, 0xea, 0x63, 0xb0, 0xc8, 0x44, 0x1e, 0x1e, 0xd9, 0xcb, 0x8e, + 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x86, 0xe2, 0x51, 0x14, 0xdc, 0x01, 0x00, 0x00, } func (m *EventQuerySubmitted) Marshal() (dAtA []byte, err error) { @@ -162,18 +165,16 @@ func (m *EventQuerySubmitted) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if m.LocalTimeoutHeight != nil { - { - size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvent(dAtA, i, uint64(size)) + { + size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Path) > 0 { i -= len(m.Path) copy(dAtA[i:], m.Path) @@ -216,10 +217,8 @@ func (m *EventQuerySubmitted) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - if m.LocalTimeoutHeight != nil { - l = m.LocalTimeoutHeight.Size() - n += 1 + l + sovEvent(uint64(l)) - } + l = m.LocalTimeoutHeight.Size() + n += 1 + l + sovEvent(uint64(l)) if m.LocalTimeoutStamp != 0 { n += 1 + sovEvent(uint64(m.LocalTimeoutStamp)) } @@ -357,9 +356,6 @@ func (m *EventQuerySubmitted) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LocalTimeoutHeight == nil { - m.LocalTimeoutHeight = &types.Height{} - } if err := m.LocalTimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/modules/apps/31-ibc-query/types/events.go b/modules/apps/31-ibc-query/types/events.go index ae87157d879..a905880ff57 100644 --- a/modules/apps/31-ibc-query/types/events.go +++ b/modules/apps/31-ibc-query/types/events.go @@ -2,6 +2,7 @@ package types import ( fmt "fmt" + clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" host "github.com/cosmos/ibc-go/v4/modules/core/24-host" ) @@ -33,7 +34,7 @@ func NewEventQuerySubmitted( return &EventQuerySubmitted{ Id: id, Path: path, - LocalTimeoutHeight: &localTimeoutHeight, + LocalTimeoutHeight: localTimeoutHeight, LocalTimeoutStamp: localTimeoutStamp, QueryHeight: queryHeight, } diff --git a/modules/apps/31-ibc-query/types/msgs.go b/modules/apps/31-ibc-query/types/msgs.go index 2efee7202d7..c52abe8f512 100644 --- a/modules/apps/31-ibc-query/types/msgs.go +++ b/modules/apps/31-ibc-query/types/msgs.go @@ -11,7 +11,7 @@ const ( ) // NewMsgSubmitCrossChainQuery creates a new instance of NewMsgSubmitCrossChainQuery -func NewMsgSubmitCrossChainQuery(id string, path string, localTimeoutHeight *clienttypes.Height, localTimeoutStamp uint64, queryHeight uint64, creator string, srcPort string, srcChannel string) *MsgSubmitCrossChainQuery { +func NewMsgSubmitCrossChainQuery(id string, path string, localTimeoutHeight clienttypes.Height, localTimeoutStamp uint64, queryHeight uint64, creator string, srcPort string, srcChannel string) *MsgSubmitCrossChainQuery { return &MsgSubmitCrossChainQuery{ Id: id, Path: path, @@ -28,7 +28,7 @@ func (msg MsgSubmitCrossChainQuery) GetQueryId() string { return msg.Id } func (msg MsgSubmitCrossChainQuery) GetPath() string { return msg.Path } -func (msg MsgSubmitCrossChainQuery) GetTimeoutHeight() *clienttypes.Height { +func (msg MsgSubmitCrossChainQuery) GetTimeoutHeight() clienttypes.Height { return msg.LocalTimeoutHeight } diff --git a/modules/apps/31-ibc-query/types/tx.pb.go b/modules/apps/31-ibc-query/types/tx.pb.go index 36d5836e1d8..1b77f5e52af 100644 --- a/modules/apps/31-ibc-query/types/tx.pb.go +++ b/modules/apps/31-ibc-query/types/tx.pb.go @@ -31,12 +31,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgSubmitCrossChainQuery type MsgSubmitCrossChainQuery struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - LocalTimeoutHeight *types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height,omitempty"` - LocalTimeoutStamp uint64 `protobuf:"varint,4,opt,name=local_timeout_stamp,json=localTimeoutStamp,proto3" json:"local_timeout_stamp,omitempty"` - QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` - ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + LocalTimeoutHeight types.Height `protobuf:"bytes,3,opt,name=local_timeout_height,json=localTimeoutHeight,proto3" json:"local_timeout_height" yaml:"timeout_height"` + LocalTimeoutStamp uint64 `protobuf:"varint,4,opt,name=local_timeout_stamp,json=localTimeoutStamp,proto3" json:"local_timeout_stamp,omitempty"` + QueryHeight uint64 `protobuf:"varint,5,opt,name=query_height,json=queryHeight,proto3" json:"query_height,omitempty"` + ClientId string `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // sender address Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"` SourcePort string `protobuf:"bytes,8,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` @@ -139,38 +139,40 @@ func init() { } var fileDescriptor_5d40a119a77c1eef = []byte{ - // 495 bytes of a gzipped FileDescriptorProto + // 517 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0x4e, 0xba, 0xd2, 0x1f, 0x2e, 0x4c, 0xc2, 0x0c, 0x08, 0x45, 0xa4, 0x65, 0x12, 0xa8, 0x97, - 0xd9, 0xea, 0x86, 0x84, 0x04, 0x07, 0x24, 0x7a, 0x61, 0x82, 0x49, 0x90, 0x01, 0x07, 0x2e, 0x51, - 0xe2, 0x58, 0x89, 0x45, 0x92, 0x67, 0x62, 0xa7, 0xa2, 0xff, 0x01, 0x47, 0x38, 0x72, 0xdb, 0x9f, - 0xc3, 0x71, 0x47, 0x8e, 0xa8, 0x95, 0x10, 0x7f, 0x06, 0x8a, 0xdd, 0x4d, 0x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, 0x00, 0xff, 0xff, 0x00, 0x01, 0xc8, + 0xee, 0x59, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -313,18 +315,16 @@ func (m *MsgSubmitCrossChainQuery) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x20 } - if m.LocalTimeoutHeight != nil { - { - size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.LocalTimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Path) > 0 { i -= len(m.Path) copy(dAtA[i:], m.Path) @@ -402,10 +402,8 @@ func (m *MsgSubmitCrossChainQuery) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.LocalTimeoutHeight != nil { - l = m.LocalTimeoutHeight.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.LocalTimeoutHeight.Size() + n += 1 + l + sovTx(uint64(l)) if m.LocalTimeoutStamp != 0 { n += 1 + sovTx(uint64(m.LocalTimeoutStamp)) } @@ -575,9 +573,6 @@ func (m *MsgSubmitCrossChainQuery) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LocalTimeoutHeight == nil { - m.LocalTimeoutHeight = &types.Height{} - } if err := m.LocalTimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/proto/ibc/applications/ibc_query/v1/crosschainquery.proto b/proto/ibc/applications/ibc_query/v1/crosschainquery.proto index 142b7ae6b4e..7cc2efe6b72 100644 --- a/proto/ibc/applications/ibc_query/v1/crosschainquery.proto +++ b/proto/ibc/applications/ibc_query/v1/crosschainquery.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package ibc.applications.ibc_query.v1; +import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types"; @@ -10,7 +11,8 @@ option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types message CrossChainQuery { string id = 1; string path = 2; - ibc.core.client.v1.Height local_timeout_height = 3; + ibc.core.client.v1.Height local_timeout_height = 3 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 local_timeout_timestamp = 4; uint64 query_height = 5; string client_id = 6; diff --git a/proto/ibc/applications/ibc_query/v1/event.proto b/proto/ibc/applications/ibc_query/v1/event.proto index ea4abcd879c..ad5b508c993 100644 --- a/proto/ibc/applications/ibc_query/v1/event.proto +++ b/proto/ibc/applications/ibc_query/v1/event.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package ibc.applications.ibc_query.v1; +import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types"; @@ -10,7 +11,8 @@ option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/31-ibc-query/types message EventQuerySubmitted { string id = 1; string path = 2; - ibc.core.client.v1.Height local_timeout_height = 3; + ibc.core.client.v1.Height local_timeout_height = 3 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 local_timeout_stamp = 4; uint64 query_height = 5; } \ No newline at end of file diff --git a/proto/ibc/applications/ibc_query/v1/tx.proto b/proto/ibc/applications/ibc_query/v1/tx.proto index 4631095a4ca..56405d4a8fd 100644 --- a/proto/ibc/applications/ibc_query/v1/tx.proto +++ b/proto/ibc/applications/ibc_query/v1/tx.proto @@ -20,7 +20,8 @@ message MsgSubmitCrossChainQuery { string id = 1; string path = 2; - ibc.core.client.v1.Height local_timeout_height = 3; + ibc.core.client.v1.Height local_timeout_height = 3 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; uint64 local_timeout_stamp = 4; uint64 query_height = 5; string client_id = 6; From b9c97ddb6872dcebc012f7a0e441729b7dfdaafd Mon Sep 17 00:00:00 2001 From: sujine2 Date: Mon, 19 Sep 2022 00:05:51 +0900 Subject: [PATCH 5/5] refactor: remove height pointer --- modules/apps/31-ibc-query/client/cli/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/31-ibc-query/client/cli/tx.go b/modules/apps/31-ibc-query/client/cli/tx.go index 11efb498f08..f4ccb91ad7f 100644 --- a/modules/apps/31-ibc-query/client/cli/tx.go +++ b/modules/apps/31-ibc-query/client/cli/tx.go @@ -57,7 +57,7 @@ func NewMsgCrossChainQueryCmd() *cobra.Command { return err } - msg := types.NewMsgSubmitCrossChainQuery(queryId, path, &timeoutHeight, timeoutTimestamp, queryHeight, creator, srcPort, srcChannel) + msg := types.NewMsgSubmitCrossChainQuery(queryId, path, timeoutHeight, timeoutTimestamp, queryHeight, creator, srcPort, srcChannel) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) },