From 62033800bcefc7d72b7ebf21a6702f26434a1a2e Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 23 Aug 2022 12:38:07 +0200 Subject: [PATCH 1/6] delete queries generated from the removed `QueryAppVersionRequest`/`QueryAppVersionResponse` (#2045) * delete unused code * remove RegisterQueryService * remove unused import --- modules/core/05-port/module.go | 6 - modules/core/05-port/types/query.go | 9 - modules/core/05-port/types/query.pb.go | 844 ------------------------- 3 files changed, 859 deletions(-) delete mode 100644 modules/core/05-port/types/query.go delete mode 100644 modules/core/05-port/types/query.pb.go diff --git a/modules/core/05-port/module.go b/modules/core/05-port/module.go index 770aef4c1f0..c6cf049c115 100644 --- a/modules/core/05-port/module.go +++ b/modules/core/05-port/module.go @@ -1,7 +1,6 @@ package port import ( - "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" @@ -17,8 +16,3 @@ func Name() string { func GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } - -// RegisterQueryService registers the gRPC query service for IBC ports. -func RegisterQueryService(server grpc.Server, queryServer types.QueryServer) { - types.RegisterQueryServer(server, queryServer) -} diff --git a/modules/core/05-port/types/query.go b/modules/core/05-port/types/query.go deleted file mode 100644 index 7da3fe678af..00000000000 --- a/modules/core/05-port/types/query.go +++ /dev/null @@ -1,9 +0,0 @@ -package types - -// NewQueryAppVersionResponse creates a new QueryAppVersionResponse instance -func NewQueryAppVersionResponse(portID, version string) *QueryAppVersionResponse { - return &QueryAppVersionResponse{ - PortId: portID, - Version: version, - } -} diff --git a/modules/core/05-port/types/query.pb.go b/modules/core/05-port/types/query.pb.go deleted file mode 100644 index 68efeeb04ea..00000000000 --- a/modules/core/05-port/types/query.pb.go +++ /dev/null @@ -1,844 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/core/port/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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 - -// QueryAppVersionRequest is the request type for the Query/AppVersion RPC method -type QueryAppVersionRequest struct { - // port unique identifier - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // connection unique identifier - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - // whether the channel is ordered or unordered - Ordering types.Order `protobuf:"varint,3,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"` - // counterparty channel end - Counterparty *types.Counterparty `protobuf:"bytes,4,opt,name=counterparty,proto3" json:"counterparty,omitempty"` - // proposed version - ProposedVersion string `protobuf:"bytes,5,opt,name=proposed_version,json=proposedVersion,proto3" json:"proposed_version,omitempty"` -} - -func (m *QueryAppVersionRequest) Reset() { *m = QueryAppVersionRequest{} } -func (m *QueryAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAppVersionRequest) ProtoMessage() {} -func (*QueryAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a256596009a8334, []int{0} -} -func (m *QueryAppVersionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAppVersionRequest.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 *QueryAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAppVersionRequest.Merge(m, src) -} -func (m *QueryAppVersionRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAppVersionRequest proto.InternalMessageInfo - -func (m *QueryAppVersionRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryAppVersionRequest) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *QueryAppVersionRequest) GetOrdering() types.Order { - if m != nil { - return m.Ordering - } - return types.NONE -} - -func (m *QueryAppVersionRequest) GetCounterparty() *types.Counterparty { - if m != nil { - return m.Counterparty - } - return nil -} - -func (m *QueryAppVersionRequest) GetProposedVersion() string { - if m != nil { - return m.ProposedVersion - } - return "" -} - -// QueryAppVersionResponse is the response type for the Query/AppVersion RPC method. -type QueryAppVersionResponse struct { - // port id associated with the request identifiers - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // supported app version - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (m *QueryAppVersionResponse) Reset() { *m = QueryAppVersionResponse{} } -func (m *QueryAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAppVersionResponse) ProtoMessage() {} -func (*QueryAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a256596009a8334, []int{1} -} -func (m *QueryAppVersionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAppVersionResponse.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 *QueryAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAppVersionResponse.Merge(m, src) -} -func (m *QueryAppVersionResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAppVersionResponse proto.InternalMessageInfo - -func (m *QueryAppVersionResponse) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryAppVersionResponse) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func init() { - proto.RegisterType((*QueryAppVersionRequest)(nil), "ibc.core.port.v1.QueryAppVersionRequest") - proto.RegisterType((*QueryAppVersionResponse)(nil), "ibc.core.port.v1.QueryAppVersionResponse") -} - -func init() { proto.RegisterFile("ibc/core/port/v1/query.proto", fileDescriptor_9a256596009a8334) } - -var fileDescriptor_9a256596009a8334 = []byte{ - // 371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0xee, 0x12, 0x31, - 0x10, 0xdf, 0x45, 0x01, 0xad, 0xa8, 0xa4, 0x07, 0xd9, 0x10, 0xb3, 0x01, 0xbc, 0x2c, 0x07, 0x5a, - 0x81, 0xc8, 0x5d, 0x8d, 0x07, 0x12, 0x13, 0x75, 0x0f, 0x1e, 0xbc, 0x10, 0xb6, 0xdb, 0x40, 0x13, - 0xe8, 0x94, 0xb6, 0xbb, 0x09, 0x37, 0x1f, 0xc1, 0xc7, 0xf2, 0xc8, 0xd1, 0xa3, 0x81, 0x17, 0x31, - 0xdd, 0x65, 0xc1, 0x0f, 0x4c, 0xfe, 0xb7, 0xce, 0xfc, 0x3e, 0xf2, 0x9b, 0xe9, 0xa0, 0xe7, 0x22, - 0x61, 0x94, 0x81, 0xe6, 0x54, 0x81, 0xb6, 0x34, 0x1f, 0xd3, 0x5d, 0xc6, 0xf5, 0x9e, 0x28, 0x0d, - 0x16, 0x70, 0x5b, 0x24, 0x8c, 0x38, 0x94, 0x38, 0x94, 0xe4, 0xe3, 0x6e, 0xff, 0xc2, 0x67, 0xeb, - 0xa5, 0x94, 0x7c, 0xe3, 0x24, 0xe7, 0x67, 0x29, 0x1a, 0x7c, 0xad, 0xa1, 0x67, 0x9f, 0x9c, 0xc9, - 0x6b, 0xa5, 0x3e, 0x73, 0x6d, 0x04, 0xc8, 0x98, 0xef, 0x32, 0x6e, 0x2c, 0xee, 0xa0, 0xa6, 0x33, - 0x5a, 0x88, 0x34, 0xf0, 0x7b, 0x7e, 0xf4, 0x30, 0x6e, 0xb8, 0x72, 0x9e, 0xe2, 0x17, 0xe8, 0x31, - 0x03, 0x29, 0x39, 0xb3, 0x02, 0xa4, 0x83, 0x6b, 0x05, 0xdc, 0xba, 0x36, 0xe7, 0x29, 0x9e, 0xa1, - 0x07, 0xa0, 0x53, 0xae, 0x85, 0x5c, 0x05, 0xf7, 0x7a, 0x7e, 0xf4, 0x64, 0xd2, 0x25, 0x97, 0x80, - 0x55, 0x86, 0x7c, 0x4c, 0x3e, 0x38, 0x52, 0x7c, 0xe1, 0xe2, 0x77, 0xa8, 0xc5, 0x20, 0x93, 0x96, - 0x6b, 0xb5, 0xd4, 0x76, 0x1f, 0xdc, 0xef, 0xf9, 0xd1, 0xa3, 0x49, 0xff, 0xa6, 0xf6, 0xed, 0x6f, - 0xc4, 0xf8, 0x0f, 0x19, 0x1e, 0xa2, 0xb6, 0xd2, 0xa0, 0xc0, 0xf0, 0x74, 0x91, 0x97, 0x73, 0x05, - 0xf5, 0x22, 0xe6, 0xd3, 0xaa, 0x7f, 0x1e, 0x77, 0xf0, 0x1e, 0x75, 0xfe, 0xd9, 0x80, 0x51, 0x20, - 0x0d, 0xff, 0xff, 0x0a, 0x02, 0xd4, 0xac, 0x5c, 0xcb, 0xe1, 0xab, 0x72, 0xb2, 0x41, 0xf5, 0xc2, - 0x0d, 0x33, 0x84, 0xae, 0x8e, 0x38, 0x22, 0x7f, 0xff, 0x0e, 0xb9, 0xbd, 0xf6, 0xee, 0xf0, 0x0e, - 0xcc, 0x32, 0xde, 0xc0, 0x7b, 0xf3, 0xf1, 0xfb, 0x31, 0xf4, 0x0f, 0xc7, 0xd0, 0xff, 0x79, 0x0c, - 0xfd, 0x6f, 0xa7, 0xd0, 0x3b, 0x9c, 0x42, 0xef, 0xc7, 0x29, 0xf4, 0xbe, 0xcc, 0x56, 0xc2, 0xae, - 0xb3, 0x84, 0x30, 0xd8, 0x52, 0x06, 0x66, 0x0b, 0x86, 0x8a, 0x84, 0x8d, 0x56, 0x40, 0xf3, 0x29, - 0xdd, 0x42, 0x9a, 0x6d, 0xb8, 0x29, 0x6f, 0xe3, 0xe5, 0xab, 0x51, 0x71, 0x4e, 0x76, 0xaf, 0xb8, - 0x49, 0x1a, 0xc5, 0x5d, 0x4c, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x19, 0x37, 0x7f, 0x1d, 0x6c, - 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // AppVersion queries an IBC Port and determines the appropriate application version to be used - AppVersion(ctx context.Context, in *QueryAppVersionRequest, opts ...grpc.CallOption) (*QueryAppVersionResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) AppVersion(ctx context.Context, in *QueryAppVersionRequest, opts ...grpc.CallOption) (*QueryAppVersionResponse, error) { - out := new(QueryAppVersionResponse) - err := c.cc.Invoke(ctx, "/ibc.core.port.v1.Query/AppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // AppVersion queries an IBC Port and determines the appropriate application version to be used - AppVersion(context.Context, *QueryAppVersionRequest) (*QueryAppVersionResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) AppVersion(ctx context.Context, req *QueryAppVersionRequest) (*QueryAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppVersion not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_AppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.port.v1.Query/AppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AppVersion(ctx, req.(*QueryAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.core.port.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AppVersion", - Handler: _Query_AppVersion_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/core/port/v1/query.proto", -} - -func (m *QueryAppVersionRequest) 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 *QueryAppVersionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAppVersionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProposedVersion) > 0 { - i -= len(m.ProposedVersion) - copy(dAtA[i:], m.ProposedVersion) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposedVersion))) - i-- - dAtA[i] = 0x2a - } - if m.Counterparty != nil { - { - size, err := m.Counterparty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Ordering != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Ordering)) - i-- - dAtA[i] = 0x18 - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAppVersionResponse) 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 *QueryAppVersionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAppVersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryAppVersionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Ordering != 0 { - n += 1 + sovQuery(uint64(m.Ordering)) - } - if m.Counterparty != nil { - l = m.Counterparty.Size() - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ProposedVersion) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAppVersionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryAppVersionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAppVersionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAppVersionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ordering", wireType) - } - m.Ordering = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Ordering |= types.Order(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Counterparty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Counterparty == nil { - m.Counterparty = &types.Counterparty{} - } - if err := m.Counterparty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposedVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposedVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAppVersionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAppVersionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAppVersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) From da6315a683f59bd907f9a4f3f7458f7bf25133fb Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 23 Aug 2022 13:07:34 +0200 Subject: [PATCH 2/6] add backport task for release/v5.1.x (#2078) --- .github/mergify.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/mergify.yml b/.github/mergify.yml index 9ea86d5912e..fa163d3cd5a 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -90,6 +90,14 @@ pull_request_rules: backport: branches: - release/v5.0.x + - name: backport patches to v5.1.x branch + conditions: + - base=main + - label=backport-to-v5.1.x + actions: + backport: + branches: + - release/v5.1.x - name: backport patches to v6.0.x branch conditions: - base=main From 2355afc9beed744a5b16f00d8a09ecf1853f1be3 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 23 Aug 2022 18:57:00 +0700 Subject: [PATCH 3/6] Group indirect dependencies (#2079) ## Description This is a teeny PR that properly groups indirect dependencies in go.mod --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes --- go.mod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 0596e10319c..525a5af57a7 100644 --- a/go.mod +++ b/go.mod @@ -27,9 +27,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 ) -require github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect - require ( + github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect cloud.google.com/go v0.100.2 // indirect cloud.google.com/go/compute v1.6.1 // indirect cloud.google.com/go/iam v0.3.0 // indirect From 397b88cf98214e62437a94db1a26c935d4d153fd Mon Sep 17 00:00:00 2001 From: Matt Witkowski Date: Tue, 23 Aug 2022 09:34:49 -0400 Subject: [PATCH 4/6] Added interface to accept any type of ADR 031 message router. (#2058) ## Description Updated the controller and host keeper to take in an interface for the router. This allows systems that implement ADR 031, but do not use the default baseapp.router to use ICA. closes: #2044 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes --- CHANGELOG.md | 1 + .../controller/keeper/keeper.go | 5 ++--- .../27-interchain-accounts/host/keeper/keeper.go | 5 ++--- modules/apps/27-interchain-accounts/types/router.go | 12 ++++++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 modules/apps/27-interchain-accounts/types/router.go diff --git a/CHANGELOG.md b/CHANGELOG.md index e95cbd905a9..c51400b4b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (transfer) [\#2034](https://github.com/cosmos/ibc-go/pull/2034) Transfer Keeper now expects a keeper which fulfills the expected `ScopedKeeper` interface for the capability keeper. * (05-port) [\#2025](https://github.com/cosmos/ibc-go/pull/2025) Port Keeper now expects a keeper which fulfills the expected `ScopedKeeper` interface for the capability keeper. * (04-channel) [\#2024](https://github.com/cosmos/ibc-go/pull/2024) Channel Keeper now expects a keeper which fulfills the expected `ScopedKeeper` interface for the capability keeper. +* (apps/27-interchain-accounts) [\#2058](https://github.com/cosmos/ibc-go/pull/2058) Added `MessageRouter` interface and replaced `*baseapp.MsgServiceRouter` with it. The controller and host keepers of apps/27-interchain-accounts have been updated to use it. ### State Machine Breaking diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 7ec112d5874..2b281e93a45 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "fmt" "strings" - baseapp "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,14 +29,14 @@ type Keeper struct { scopedKeeper icatypes.ScopedKeeper - msgRouter *baseapp.MsgServiceRouter + msgRouter icatypes.MessageRouter } // NewKeeper creates a new interchain accounts controller Keeper instance func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper icatypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, - scopedKeeper icatypes.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, + scopedKeeper icatypes.ScopedKeeper, msgRouter icatypes.MessageRouter, ) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 943baf4d2a8..acad2ea4622 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "fmt" "strings" - baseapp "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,14 +29,14 @@ type Keeper struct { scopedKeeper icatypes.ScopedKeeper - msgRouter *baseapp.MsgServiceRouter + msgRouter icatypes.MessageRouter } // NewKeeper creates a new interchain accounts host Keeper instance func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, - accountKeeper icatypes.AccountKeeper, scopedKeeper icatypes.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, + accountKeeper icatypes.AccountKeeper, scopedKeeper icatypes.ScopedKeeper, msgRouter icatypes.MessageRouter, ) Keeper { // ensure ibc interchain accounts module account is set if addr := accountKeeper.GetModuleAddress(icatypes.ModuleName); addr == nil { diff --git a/modules/apps/27-interchain-accounts/types/router.go b/modules/apps/27-interchain-accounts/types/router.go new file mode 100644 index 00000000000..007091b9d0d --- /dev/null +++ b/modules/apps/27-interchain-accounts/types/router.go @@ -0,0 +1,12 @@ +package types + +import ( + baseapp "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// MessageRouter ADR 031 request type routing +// https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-031-msg-service.md +type MessageRouter interface { + Handler(msg sdk.Msg) baseapp.MsgServiceHandler +} From 05c4bfbbebb20d1cc078ddf1d29dadc766d9251b Mon Sep 17 00:00:00 2001 From: Sean King Date: Tue, 23 Aug 2022 17:35:51 +0200 Subject: [PATCH 5/6] refactor: use 4 val nodes for e2e tests (#2016) * refactor: use 3 val nodes for e2e tests * fix: try out 2vals 1fullnode * refactor: try with 4 vals Co-authored-by: Carlos Rodriguez --- e2e/testsuite/testsuite.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 4ca5f00df90..6592590a26b 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -322,8 +322,8 @@ func (s *E2ETestSuite) createCosmosChains(chainOptions testconfig.ChainOptions) logger := zaptest.NewLogger(s.T()) // TODO(chatton): allow for controller over number of validators and full nodes. - chainA := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainAConfig, 1, 0, logger) - chainB := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainBConfig, 1, 0, logger) + chainA := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainAConfig, 4, 1, logger) + chainB := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainBConfig, 4, 1, logger) return chainA, chainB } From 0fa2978b0edad338f995790b5ab3a517ff302351 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 24 Aug 2022 11:17:27 +0100 Subject: [PATCH 6/6] Fix ICA tests between versions v0.3.2 and v0.1.3 (#2082) --- e2e/interchain_accounts_test.go | 19 +++++++++++++++++-- e2e/testconfig/testconfig.go | 16 ++++++++++++++++ e2e/testsuite/testsuite.go | 8 ++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/e2e/interchain_accounts_test.go b/e2e/interchain_accounts_test.go index e52f3f26b1e..d01d1c1891d 100644 --- a/e2e/interchain_accounts_test.go +++ b/e2e/interchain_accounts_test.go @@ -9,11 +9,13 @@ import ( "github.com/strangelove-ventures/ibctest/ibc" "github.com/strangelove-ventures/ibctest/test" "github.com/stretchr/testify/suite" + "golang.org/x/mod/semver" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + "github.com/cosmos/ibc-go/e2e/testconfig" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -33,6 +35,7 @@ type InterchainAccountsTestSuite struct { // RegisterInterchainAccount will attempt to register an interchain account on the counterparty chain. func (s *InterchainAccountsTestSuite) RegisterInterchainAccount(ctx context.Context, chain *cosmos.CosmosChain, user *ibctest.User, msgRegisterAccount *intertxtypes.MsgRegisterAccount) error { txResp, err := s.BroadcastMessages(ctx, chain, user, msgRegisterAccount) + s.Require().NoError(err) s.AssertValidTxResponse(txResp) return err } @@ -44,6 +47,18 @@ func (s *InterchainAccountsTestSuite) RegisterCounterPartyPayee(ctx context.Cont return s.BroadcastMessages(ctx, chain, user, msg) } +// getICAVersion returns the version which should be used in the MsgRegisterAccount broadcast from the +// controller chain. +func getICAVersion(chainAVersion, chainBVersion string) string { + chainBIsGreaterThanChainA := semver.Compare(chainAVersion, chainBVersion) == -1 + if chainBIsGreaterThanChainA { + // allow version to be specified by the controller chain + return "" + } + // explicitly set the version string because the host chain might not yet support incentivized channels. + return icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) +} + func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_SuccessfulTransfer() { t := s.T() ctx := context.TODO() @@ -60,7 +75,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_SuccessfulTransfer() { var hostAccount string t.Run("register interchain account", func(t *testing.T) { - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) + version := getICAVersion(testconfig.GetChainATag(), testconfig.GetChainBTag()) msgRegisterAccount := intertxtypes.NewMsgRegisterAccount(controllerAccount.Bech32Address(chainA.Config().Bech32Prefix), ibctesting.FirstConnectionID, version) err := s.RegisterInterchainAccount(ctx, chainA, controllerAccount, msgRegisterAccount) s.Require().NoError(err) @@ -154,7 +169,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_FailedTransfer_Insufficien var hostAccount string t.Run("register interchain account", func(t *testing.T) { - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) + version := getICAVersion(testconfig.GetChainATag(), testconfig.GetChainBTag()) msgRegisterAccount := intertxtypes.NewMsgRegisterAccount(controllerAccount.Bech32Address(chainA.Config().Bech32Prefix), ibctesting.FirstConnectionID, version) err := s.RegisterInterchainAccount(ctx, chainA, controllerAccount, msgRegisterAccount) s.Require().NoError(err) diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go index 9128eed9bf8..4e87e6f0cc0 100644 --- a/e2e/testconfig/testconfig.go +++ b/e2e/testconfig/testconfig.go @@ -90,6 +90,22 @@ func FromEnv() TestConfig { } } +func GetChainATag() string { + chainATag, ok := os.LookupEnv(ChainATagEnv) + if !ok { + panic(fmt.Sprintf("no environment variable specified for %s", ChainATagEnv)) + } + return chainATag +} + +func GetChainBTag() string { + chainBTag, ok := os.LookupEnv(ChainBTagEnv) + if !ok { + return GetChainATag() + } + return chainBTag +} + // ChainOptions stores chain configurations for the chains that will be // created for the tests. They can be modified by passing ChainOptionConfiguration // to E2ETestSuite.GetChains. diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 6592590a26b..ea1a72adb02 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -31,6 +31,11 @@ const ( ChainARelayerName = "rlyA" // ChainBRelayerName is the name given to the relayer wallet on ChainB ChainBRelayerName = "rlyB" + + // emptyLogs is the string value returned from `BroadcastMessages`. There are some situations in which + // the result is empty, when this happens we include the raw logs instead to get as much information + // amount the failure as possible. + emptyLogs = "[]" ) // E2ETestSuite has methods and functionality which can be shared among all test suites. @@ -297,6 +302,9 @@ func (s *E2ETestSuite) initGRPCClients(chain *cosmos.CosmosChain) { // has non-empty values. func (s *E2ETestSuite) AssertValidTxResponse(resp sdk.TxResponse) { respLogsMsg := resp.Logs.String() + if respLogsMsg == emptyLogs { + respLogsMsg = resp.RawLog + } s.Require().NotEqual(int64(0), resp.GasUsed, respLogsMsg) s.Require().NotEqual(int64(0), resp.GasWanted, respLogsMsg) s.Require().NotEmpty(resp.Events, respLogsMsg)