From 7cb99a09795766ee57bf13b2418c4649049e406f Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 16:46:22 +0200 Subject: [PATCH 01/35] add protos --- modules/core/04-channel/types/query.pb.go | 729 +++---------------- modules/core/04-channel/types/query.pb.gw.go | 123 ---- modules/core/04-channel/types/tx.pb.go | 563 +++++++------- proto/ibc/core/channel/v1/tx.proto | 30 +- 4 files changed, 436 insertions(+), 1009 deletions(-) diff --git a/modules/core/04-channel/types/query.pb.go b/modules/core/04-channel/types/query.pb.go index 7d6e075cf6b..9e9f503473b 100644 --- a/modules/core/04-channel/types/query.pb.go +++ b/modules/core/04-channel/types/query.pb.go @@ -1676,120 +1676,6 @@ func (m *QueryNextSequenceReceiveResponse) GetProofHeight() types.Height { return types.Height{} } -// QueryUpgradeSequenceRequest is the request type for the QueryUpgradeSequence RPC method -type QueryUpgradeSequenceRequest struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` -} - -func (m *QueryUpgradeSequenceRequest) Reset() { *m = QueryUpgradeSequenceRequest{} } -func (m *QueryUpgradeSequenceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUpgradeSequenceRequest) ProtoMessage() {} -func (*QueryUpgradeSequenceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{26} -} -func (m *QueryUpgradeSequenceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryUpgradeSequenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryUpgradeSequenceRequest.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 *QueryUpgradeSequenceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUpgradeSequenceRequest.Merge(m, src) -} -func (m *QueryUpgradeSequenceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryUpgradeSequenceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUpgradeSequenceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryUpgradeSequenceRequest proto.InternalMessageInfo - -func (m *QueryUpgradeSequenceRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *QueryUpgradeSequenceRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -// QueryUpgradeSequenceResponse is the response type for the QueryUpgradeSequence RPC method -type QueryUpgradeSequenceResponse struct { - UpgradeSequence uint64 `protobuf:"varint,1,opt,name=upgrade_sequence,json=upgradeSequence,proto3" json:"upgrade_sequence,omitempty"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` -} - -func (m *QueryUpgradeSequenceResponse) Reset() { *m = QueryUpgradeSequenceResponse{} } -func (m *QueryUpgradeSequenceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUpgradeSequenceResponse) ProtoMessage() {} -func (*QueryUpgradeSequenceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{27} -} -func (m *QueryUpgradeSequenceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryUpgradeSequenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryUpgradeSequenceResponse.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 *QueryUpgradeSequenceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUpgradeSequenceResponse.Merge(m, src) -} -func (m *QueryUpgradeSequenceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryUpgradeSequenceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUpgradeSequenceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryUpgradeSequenceResponse proto.InternalMessageInfo - -func (m *QueryUpgradeSequenceResponse) GetUpgradeSequence() uint64 { - if m != nil { - return m.UpgradeSequence - } - return 0 -} - -func (m *QueryUpgradeSequenceResponse) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -func (m *QueryUpgradeSequenceResponse) GetProofHeight() types.Height { - if m != nil { - return m.ProofHeight - } - return types.Height{} -} - // QueryUpgradeErrorRequest is the request type for the Query/QueryUpgradeError RPC method type QueryUpgradeErrorRequest struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` @@ -1800,7 +1686,7 @@ func (m *QueryUpgradeErrorRequest) Reset() { *m = QueryUpgradeErrorReque func (m *QueryUpgradeErrorRequest) String() string { return proto.CompactTextString(m) } func (*QueryUpgradeErrorRequest) ProtoMessage() {} func (*QueryUpgradeErrorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{28} + return fileDescriptor_1034a1e9abc4cca1, []int{26} } func (m *QueryUpgradeErrorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1856,7 +1742,7 @@ func (m *QueryUpgradeErrorResponse) Reset() { *m = QueryUpgradeErrorResp func (m *QueryUpgradeErrorResponse) String() string { return proto.CompactTextString(m) } func (*QueryUpgradeErrorResponse) ProtoMessage() {} func (*QueryUpgradeErrorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{29} + return fileDescriptor_1034a1e9abc4cca1, []int{27} } func (m *QueryUpgradeErrorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1933,8 +1819,6 @@ func init() { proto.RegisterType((*QueryUnreceivedAcksResponse)(nil), "ibc.core.channel.v1.QueryUnreceivedAcksResponse") proto.RegisterType((*QueryNextSequenceReceiveRequest)(nil), "ibc.core.channel.v1.QueryNextSequenceReceiveRequest") proto.RegisterType((*QueryNextSequenceReceiveResponse)(nil), "ibc.core.channel.v1.QueryNextSequenceReceiveResponse") - proto.RegisterType((*QueryUpgradeSequenceRequest)(nil), "ibc.core.channel.v1.QueryUpgradeSequenceRequest") - proto.RegisterType((*QueryUpgradeSequenceResponse)(nil), "ibc.core.channel.v1.QueryUpgradeSequenceResponse") proto.RegisterType((*QueryUpgradeErrorRequest)(nil), "ibc.core.channel.v1.QueryUpgradeErrorRequest") proto.RegisterType((*QueryUpgradeErrorResponse)(nil), "ibc.core.channel.v1.QueryUpgradeErrorResponse") } @@ -1942,110 +1826,106 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1636 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0xd4, 0xd6, - 0x16, 0xce, 0x4d, 0x02, 0x24, 0x87, 0x40, 0xe0, 0x26, 0x79, 0x24, 0x26, 0x4c, 0xc2, 0x3c, 0xbd, - 0x47, 0x40, 0xc2, 0x26, 0x81, 0x07, 0xbc, 0xaa, 0x45, 0x22, 0x51, 0x0b, 0x69, 0xcb, 0x2f, 0xa7, - 0x51, 0x01, 0xa9, 0x9d, 0x7a, 0x3c, 0x97, 0x89, 0x95, 0xc4, 0x36, 0x63, 0xcf, 0x00, 0x4a, 0x53, - 0x55, 0x5d, 0x50, 0x96, 0x55, 0x59, 0x54, 0x6a, 0x17, 0x95, 0xaa, 0x6e, 0x58, 0x74, 0xd1, 0xbf, - 0xa0, 0x9b, 0x2e, 0x90, 0xba, 0x28, 0x12, 0x5d, 0x54, 0x42, 0xa2, 0x15, 0x41, 0xa2, 0xdb, 0x6e, - 0xba, 0xae, 0x7c, 0xef, 0xb1, 0xc7, 0x9e, 0xf1, 0x78, 0x66, 0xe2, 0x8c, 0x84, 0xba, 0x1b, 0x5f, - 0x9f, 0x73, 0xee, 0xf7, 0x7d, 0xe7, 0xde, 0xe3, 0x7b, 0xee, 0xc0, 0x84, 0x91, 0xd7, 0x15, 0xdd, - 0x2a, 0x31, 0x45, 0x5f, 0xd2, 0x4c, 0x93, 0xad, 0x28, 0x95, 0x69, 0xe5, 0x66, 0x99, 0x95, 0xee, - 0xc8, 0x76, 0xc9, 0x72, 0x2d, 0x3a, 0x64, 0xe4, 0x75, 0xd9, 0x33, 0x90, 0xd1, 0x40, 0xae, 0x4c, - 0x4b, 0x21, 0xaf, 0x15, 0x83, 0x99, 0xae, 0xe7, 0x24, 0x7e, 0x09, 0x2f, 0xe9, 0x88, 0x6e, 0x39, - 0xab, 0x96, 0xa3, 0xe4, 0x35, 0x87, 0x89, 0x70, 0x4a, 0x65, 0x3a, 0xcf, 0x5c, 0x6d, 0x5a, 0xb1, - 0xb5, 0xa2, 0x61, 0x6a, 0xae, 0x61, 0x99, 0x68, 0x7b, 0x30, 0x0e, 0x82, 0x3f, 0x99, 0x30, 0x19, - 0x2f, 0x5a, 0x56, 0x71, 0x85, 0x29, 0x9a, 0x6d, 0x28, 0x9a, 0x69, 0x5a, 0x2e, 0xf7, 0x77, 0xf0, - 0xed, 0x18, 0xbe, 0xe5, 0x4f, 0xf9, 0xf2, 0x0d, 0x45, 0x33, 0x11, 0xbd, 0x34, 0x5c, 0xb4, 0x8a, - 0x16, 0xff, 0xa9, 0x78, 0xbf, 0x92, 0x66, 0x2c, 0xdb, 0xc5, 0x92, 0x56, 0x60, 0xc2, 0x24, 0x7b, - 0x01, 0x86, 0xae, 0x78, 0xb0, 0xe7, 0x84, 0x81, 0xca, 0x6e, 0x96, 0x99, 0xe3, 0xd2, 0x7d, 0xb0, - 0xc3, 0xb6, 0x4a, 0x6e, 0xce, 0x28, 0x8c, 0x92, 0x49, 0x32, 0xd5, 0xaf, 0x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xf7, 0x08, 0x64, 0x04, 0x41, 0xcb, 0x34, 0x99, 0xee, 0x45, 0xab, 0xd5, 0x32, 0x03, - 0xa0, 0x07, 0x2f, 0x71, 0x29, 0x85, 0x46, 0x6a, 0xb4, 0xee, 0xde, 0xb4, 0xd6, 0x7f, 0x10, 0x98, - 0x68, 0x08, 0xe5, 0x9f, 0xa5, 0xfa, 0x55, 0x5f, 0x74, 0x81, 0x69, 0x8e, 0x5b, 0x2f, 0xb8, 0x9a, - 0xcb, 0xd2, 0x6e, 0xde, 0xdf, 0x02, 0x11, 0x63, 0x42, 0xa3, 0x88, 0x1a, 0xec, 0x33, 0x02, 0x7d, - 0x72, 0x02, 0x6a, 0xce, 0xf1, 0x4c, 0x70, 0xa7, 0x1c, 0x8e, 0x23, 0x12, 0x92, 0x34, 0x14, 0x73, - 0xc4, 0x88, 0x1b, 0xee, 0xe4, 0x96, 0xff, 0x8e, 0xc0, 0xc1, 0x08, 0x43, 0x8f, 0x93, 0xe9, 0x94, - 0x9d, 0xad, 0xd0, 0x8f, 0x1e, 0x82, 0xc1, 0x12, 0xab, 0x18, 0x8e, 0x61, 0x99, 0x39, 0xb3, 0xbc, - 0x9a, 0x67, 0x25, 0x8e, 0xb2, 0x57, 0xdd, 0xed, 0x0f, 0x5f, 0xe4, 0xa3, 0x11, 0x43, 0xa4, 0xd3, - 0x1b, 0x35, 0x44, 0xbc, 0x4f, 0x08, 0x64, 0x93, 0xf0, 0x62, 0x52, 0x5e, 0x83, 0x41, 0xdd, 0x7f, - 0x13, 0x49, 0xc6, 0xb0, 0x2c, 0x3e, 0x19, 0xb2, 0xff, 0xc9, 0x90, 0xcf, 0x9a, 0x77, 0xd4, 0xdd, - 0x7a, 0x24, 0x0c, 0xdd, 0x0f, 0xfd, 0x98, 0xc8, 0x80, 0x55, 0x9f, 0x18, 0x98, 0x2f, 0x54, 0xb3, - 0xd1, 0x93, 0x94, 0x8d, 0xde, 0xcd, 0x64, 0xa3, 0x04, 0xe3, 0x9c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xcb, 0x90, 0xcf, 0x36, 0x32, 0x5d, - 0x8f, 0x36, 0x32, 0x5d, 0xbf, 0x6e, 0x64, 0xba, 0xae, 0xff, 0xbf, 0x68, 0xb8, 0x4b, 0xe5, 0xbc, - 0xac, 0x5b, 0xab, 0x0a, 0xfe, 0xc9, 0x6f, 0xe4, 0xf5, 0xa3, 0x45, 0x4b, 0xa9, 0x9c, 0x52, 0x56, - 0xad, 0x42, 0x79, 0x85, 0x39, 0x02, 0xc2, 0xb1, 0x13, 0x47, 0x7d, 0x14, 0xee, 0x1d, 0x9b, 0x39, - 0xf9, 0xed, 0xfc, 0xdf, 0x96, 0xe3, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x16, 0x63, 0x14, - 0x74, 0x20, 0x00, 0x00, + // 1570 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0x13, 0x47, + 0x14, 0xce, 0x38, 0x06, 0x92, 0x47, 0xf8, 0x35, 0x49, 0x4a, 0x58, 0x82, 0x13, 0x5c, 0xb5, 0x04, + 0x24, 0x76, 0x49, 0xa0, 0x40, 0xab, 0x16, 0x89, 0x44, 0x2d, 0xa4, 0x2a, 0xbf, 0x36, 0x45, 0x05, + 0xa4, 0xd6, 0x5d, 0xaf, 0x07, 0x67, 0x95, 0x78, 0x77, 0xf1, 0xae, 0x0d, 0x28, 0x75, 0x55, 0xf5, + 0x40, 0x39, 0x56, 0xe5, 0x50, 0xa9, 0x97, 0x4a, 0xbd, 0x71, 0xe8, 0xa1, 0x7f, 0x41, 0x2f, 0x3d, + 0x70, 0xa9, 0x8a, 0x44, 0x0f, 0x95, 0x90, 0x68, 0x45, 0x90, 0xe8, 0xb5, 0x97, 0x9e, 0xab, 0x9d, + 0x79, 0xbb, 0xde, 0xb5, 0xd7, 0x1b, 0x3b, 0x8e, 0xa5, 0xa8, 0x37, 0xef, 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0xa0, 0x07, 0x93, 0xb8, 0x95, + 0x42, 0x23, 0x0d, 0x5a, 0xa7, 0xd6, 0xad, 0xf5, 0xdf, 0x04, 0x26, 0x5a, 0x42, 0xf9, 0x7f, 0xa9, + 0x7e, 0xcd, 0x17, 0x5d, 0x60, 0x9a, 0xe3, 0xd6, 0x0b, 0xae, 0xe6, 0xb2, 0x6e, 0x0f, 0xef, 0x9f, + 0x81, 0x88, 0x31, 0xa1, 0x51, 0x44, 0x0d, 0xf6, 0x1a, 0x81, 0x3e, 0x39, 0x01, 0x35, 0xe7, 0x78, + 0x26, 0x78, 0x52, 0x0e, 0xc7, 0x11, 0x09, 0x49, 0x1a, 0x8a, 0x39, 0x6a, 0xc4, 0x0d, 0xf7, 0xf2, + 0xc8, 0xff, 0x48, 0xe0, 0x60, 0x84, 0xa1, 0xc7, 0xc9, 0x74, 0x2a, 0xce, 0x46, 0xe8, 0x47, 0x0f, + 0xc1, 0xae, 0x32, 0xab, 0x1a, 0x8e, 0x61, 0x99, 0x39, 0xb3, 0x52, 0xca, 0xb3, 0x32, 0x47, 0x99, + 0x56, 0x77, 0xfa, 0xc3, 0x17, 0xf9, 0x68, 0xc4, 0x10, 0xe9, 0xa4, 0xa3, 0x86, 0x88, 0xf7, 0x29, + 0x81, 0x6c, 0x12, 0x5e, 0x4c, 0xca, 0x3b, 0xb0, 0x4b, 0xf7, 0x67, 0x22, 0xc9, 0x18, 0x91, 0xc5, + 0x2b, 0x43, 0xf6, 0x5f, 0x19, 0xf2, 0x59, 0xf3, 0xae, 0xba, 0x53, 0x8f, 0x84, 0xa1, 0xfb, 0x61, + 0x10, 0x13, 0x19, 0xb0, 0x1a, 0x10, 0x03, 0xf3, 0x85, 0x7a, 0x36, 0xfa, 0x93, 0xb2, 0x91, 0x5e, + 0x4f, 0x36, 0xca, 0x30, 0xce, 0xc9, 0x5d, 0xd6, 0xf4, 0x25, 0xe6, 0xce, 0x59, 0xa5, 0x92, 0xe1, + 0x96, 0x98, 0xe9,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 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2094,8 +1974,6 @@ type QueryClient interface { UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAcksRequest, opts ...grpc.CallOption) (*QueryUnreceivedAcksResponse, error) // NextSequenceReceive returns the next receive sequence for a given channel. NextSequenceReceive(ctx context.Context, in *QueryNextSequenceReceiveRequest, opts ...grpc.CallOption) (*QueryNextSequenceReceiveResponse, error) - // UpgradeSequence returns the upgrade sequence for a given channel. - UpgradeSequence(ctx context.Context, in *QueryUpgradeSequenceRequest, opts ...grpc.CallOption) (*QueryUpgradeSequenceResponse, error) // UpgradeError returns the error receipt if the upgrade handshake failed. UpgradeError(ctx context.Context, in *QueryUpgradeErrorRequest, opts ...grpc.CallOption) (*QueryUpgradeErrorResponse, error) } @@ -2225,15 +2103,6 @@ func (c *queryClient) NextSequenceReceive(ctx context.Context, in *QueryNextSequ return out, nil } -func (c *queryClient) UpgradeSequence(ctx context.Context, in *QueryUpgradeSequenceRequest, opts ...grpc.CallOption) (*QueryUpgradeSequenceResponse, error) { - out := new(QueryUpgradeSequenceResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/UpgradeSequence", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) UpgradeError(ctx context.Context, in *QueryUpgradeErrorRequest, opts ...grpc.CallOption) (*QueryUpgradeErrorResponse, error) { out := new(QueryUpgradeErrorResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/UpgradeError", in, out, opts...) @@ -2279,8 +2148,6 @@ type QueryServer interface { UnreceivedAcks(context.Context, *QueryUnreceivedAcksRequest) (*QueryUnreceivedAcksResponse, error) // NextSequenceReceive returns the next receive sequence for a given channel. NextSequenceReceive(context.Context, *QueryNextSequenceReceiveRequest) (*QueryNextSequenceReceiveResponse, error) - // UpgradeSequence returns the upgrade sequence for a given channel. - UpgradeSequence(context.Context, *QueryUpgradeSequenceRequest) (*QueryUpgradeSequenceResponse, error) // UpgradeError returns the error receipt if the upgrade handshake failed. UpgradeError(context.Context, *QueryUpgradeErrorRequest) (*QueryUpgradeErrorResponse, error) } @@ -2328,9 +2195,6 @@ func (*UnimplementedQueryServer) UnreceivedAcks(ctx context.Context, req *QueryU func (*UnimplementedQueryServer) NextSequenceReceive(ctx context.Context, req *QueryNextSequenceReceiveRequest) (*QueryNextSequenceReceiveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NextSequenceReceive not implemented") } -func (*UnimplementedQueryServer) UpgradeSequence(ctx context.Context, req *QueryUpgradeSequenceRequest) (*QueryUpgradeSequenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpgradeSequence not implemented") -} func (*UnimplementedQueryServer) UpgradeError(ctx context.Context, req *QueryUpgradeErrorRequest) (*QueryUpgradeErrorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpgradeError not implemented") } @@ -2573,24 +2437,6 @@ func _Query_NextSequenceReceive_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_UpgradeSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUpgradeSequenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UpgradeSequence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.channel.v1.Query/UpgradeSequence", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UpgradeSequence(ctx, req.(*QueryUpgradeSequenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_UpgradeError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUpgradeErrorRequest) if err := dec(in); err != nil { @@ -2665,10 +2511,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "NextSequenceReceive", Handler: _Query_NextSequenceReceive_Handler, }, - { - MethodName: "UpgradeSequence", - Handler: _Query_UpgradeSequence_Handler, - }, { MethodName: "UpgradeError", Handler: _Query_UpgradeError_Handler, @@ -3955,88 +3797,6 @@ func (m *QueryNextSequenceReceiveResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryUpgradeSequenceRequest) 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 *QueryUpgradeSequenceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryUpgradeSequenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - 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 *QueryUpgradeSequenceResponse) 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 *QueryUpgradeSequenceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryUpgradeSequenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof))) - i-- - dAtA[i] = 0x12 - } - if m.UpgradeSequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.UpgradeSequence)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *QueryUpgradeErrorRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4651,41 +4411,6 @@ func (m *QueryNextSequenceReceiveResponse) Size() (n int) { return n } -func (m *QueryUpgradeSequenceRequest) 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.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryUpgradeSequenceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UpgradeSequence != 0 { - n += 1 + sovQuery(uint64(m.UpgradeSequence)) - } - l = len(m.Proof) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = m.ProofHeight.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - func (m *QueryUpgradeErrorRequest) Size() (n int) { if m == nil { return 0 @@ -8575,256 +8300,6 @@ func (m *QueryNextSequenceReceiveResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUpgradeSequenceRequest) 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: QueryUpgradeSequenceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUpgradeSequenceRequest: 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 ChannelId", 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.ChannelId = 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 *QueryUpgradeSequenceResponse) 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: QueryUpgradeSequenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUpgradeSequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeSequence", wireType) - } - m.UpgradeSequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UpgradeSequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", 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 err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryUpgradeErrorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/types/query.pb.gw.go b/modules/core/04-channel/types/query.pb.gw.go index 694025a048f..f4cd06baa1a 100644 --- a/modules/core/04-channel/types/query.pb.gw.go +++ b/modules/core/04-channel/types/query.pb.gw.go @@ -1167,82 +1167,6 @@ func local_request_Query_NextSequenceReceive_0(ctx context.Context, marshaler ru } -func request_Query_UpgradeSequence_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUpgradeSequenceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") - } - - protoReq.ChannelId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) - } - - val, ok = pathParams["port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") - } - - protoReq.PortId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) - } - - msg, err := client.UpgradeSequence(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_UpgradeSequence_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUpgradeSequenceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") - } - - protoReq.ChannelId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) - } - - val, ok = pathParams["port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") - } - - protoReq.PortId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) - } - - msg, err := server.UpgradeSequence(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_UpgradeError_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUpgradeErrorRequest var metadata runtime.ServerMetadata @@ -1624,29 +1548,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UpgradeSequence_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_UpgradeSequence_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UpgradeSequence_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_UpgradeError_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1971,26 +1872,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UpgradeSequence_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) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_UpgradeSequence_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_UpgradeSequence_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_UpgradeError_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -2041,8 +1922,6 @@ var ( pattern_Query_NextSequenceReceive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1", "channels", "channel_id", "ports", "port_id", "next_sequence"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UpgradeSequence_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1", "channels", "channel_id", "ports", "port_id", "upgrade_sequence"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UpgradeError_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1", "channels", "channel_id", "ports", "port_id", "upgrade_error"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -2073,7 +1952,5 @@ var ( forward_Query_NextSequenceReceive_0 = runtime.ForwardResponseMessage - forward_Query_UpgradeSequence_0 = runtime.ForwardResponseMessage - forward_Query_UpgradeError_0 = runtime.ForwardResponseMessage ) diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index 5158db2dda4..cb5919202be 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -39,18 +39,22 @@ const ( NOOP ResponseResultType = 1 // The message was executed successfully SUCCESS ResponseResultType = 2 + // The message was executed unsuccessfully + FAILURE ResponseResultType = 3 ) var ResponseResultType_name = map[int32]string{ 0: "RESPONSE_RESULT_TYPE_UNSPECIFIED", 1: "RESPONSE_RESULT_TYPE_NOOP", 2: "RESPONSE_RESULT_TYPE_SUCCESS", + 3: "RESPONSE_RESULT_TYPE_FAILURE", } var ResponseResultType_value = map[string]int32{ "RESPONSE_RESULT_TYPE_UNSPECIFIED": 0, "RESPONSE_RESULT_TYPE_NOOP": 1, "RESPONSE_RESULT_TYPE_SUCCESS": 2, + "RESPONSE_RESULT_TYPE_FAILURE": 3, } func (x ResponseResultType) String() string { @@ -1003,18 +1007,16 @@ func (m *MsgChannelUpgradeInitResponse) GetUpgradeSequence() uint64 { // MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc type MsgChannelUpgradeTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - CounterpartyChannel Channel `protobuf:"bytes,3,opt,name=counterparty_channel,json=counterpartyChannel,proto3" json:"counterparty_channel"` - CounterpartySequence uint64 `protobuf:"varint,4,opt,name=counterparty_sequence,json=counterpartySequence,proto3" json:"counterparty_sequence,omitempty"` - ProposedUpgradeChannel Channel `protobuf:"bytes,5,opt,name=proposed_upgrade_channel,json=proposedUpgradeChannel,proto3" json:"proposed_upgrade_channel"` - TimeoutHeight types.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height"` - TimeoutTimestamp uint64 `protobuf:"varint,7,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - ProofChannel []byte `protobuf:"bytes,8,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` - ProofUpgradeTimeout []byte `protobuf:"bytes,9,opt,name=proof_upgrade_timeout,json=proofUpgradeTimeout,proto3" json:"proof_upgrade_timeout,omitempty"` - ProofUpgradeSequence []byte `protobuf:"bytes,10,opt,name=proof_upgrade_sequence,json=proofUpgradeSequence,proto3" json:"proof_upgrade_sequence,omitempty"` - ProofHeight types.Height `protobuf:"bytes,11,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` - Signer string `protobuf:"bytes,12,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` + ProposedUpgradeTimeout UpgradeTimeout `protobuf:"bytes,4,opt,name=proposed_upgrade_timeout,json=proposedUpgradeTimeout,proto3" json:"proposed_upgrade_timeout"` + CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` + CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` + ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` + ProofUpgrade []byte `protobuf:"bytes,8,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty"` + ProofHeight types.Height `protobuf:"bytes,9,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelUpgradeTry) Reset() { *m = MsgChannelUpgradeTry{} } @@ -1052,6 +1054,9 @@ var xxx_messageInfo_MsgChannelUpgradeTry proto.InternalMessageInfo // MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type type MsgChannelUpgradeTryResponse struct { + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Result ResponseResultType `protobuf:"varint,3,opt,name=result,proto3,enum=ibc.core.channel.v1.ResponseResultType" json:"result,omitempty"` } func (m *MsgChannelUpgradeTryResponse) Reset() { *m = MsgChannelUpgradeTryResponse{} } @@ -1087,6 +1092,27 @@ func (m *MsgChannelUpgradeTryResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChannelUpgradeTryResponse proto.InternalMessageInfo +func (m *MsgChannelUpgradeTryResponse) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *MsgChannelUpgradeTryResponse) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *MsgChannelUpgradeTryResponse) GetResult() ResponseResultType { + if m != nil { + return m.Result + } + return UNSPECIFIED +} + // MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc type MsgChannelUpgradeAck struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` @@ -1451,114 +1477,116 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1711 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, - 0x16, 0x16, 0x65, 0x3d, 0xec, 0xe3, 0x37, 0x65, 0x3b, 0x0a, 0xed, 0x48, 0x8a, 0x02, 0x24, 0xce, - 0xc3, 0x52, 0xec, 0x24, 0xf7, 0x22, 0x41, 0x80, 0x7b, 0x1d, 0x5d, 0xe5, 0xd6, 0x40, 0x1c, 0x1b, - 0x94, 0x5c, 0xa0, 0x6d, 0x5a, 0x41, 0xa6, 0x26, 0x32, 0x21, 0x89, 0x64, 0x48, 0x4a, 0x89, 0x0b, - 0x74, 0xd1, 0x45, 0xd1, 0x20, 0x40, 0x81, 0xee, 0x8b, 0x00, 0x01, 0x5a, 0xa0, 0xe8, 0xaa, 0xbb, - 0x2e, 0xba, 0xee, 0x22, 0xcb, 0x00, 0x05, 0xda, 0x2e, 0x8a, 0xa2, 0x48, 0x16, 0xed, 0x4f, 0xe8, - 0xb2, 0xe0, 0x70, 0x86, 0x22, 0x29, 0x52, 0xa2, 0x22, 0x27, 0xe9, 0xca,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13, 0x00, 0x44, 0x55, 0xd7, 0xb3, 0x09, 0x32, 0xb2, 0x55, 0x63, 0x93, 0x10, 0xef, - 0x20, 0x55, 0x13, 0x65, 0x09, 0x3b, 0x37, 0xc1, 0xd3, 0x9f, 0xd9, 0x9f, 0xc3, 0x30, 0xef, 0xd4, - 0x5b, 0x56, 0x0f, 0xfd, 0xa3, 0xdc, 0x80, 0x84, 0xa2, 0xa2, 0x8e, 0x28, 0xb7, 0xb5, 0x8a, 0xcd, - 0x20, 0x56, 0x7a, 0x23, 0x9c, 0x64, 0xf8, 0x79, 0x3a, 0x5d, 0xb0, 0x8c, 0xdb, 0x90, 0x19, 0x1b, - 0x1e, 0x99, 0x75, 0x58, 0x10, 0xe4, 0xb6, 0xa4, 0x23, 0x55, 0xa9, 0xaa, 0xfa, 0x61, 0x85, 0xc6, - 0x11, 0xc1, 0x7e, 0x25, 0xec, 0x73, 0x6f, 0x9b, 0x53, 0x06, 0x18, 0x8a, 0x2a, 0xcb, 0x77, 0x2b, - 0xa2, 0x24, 0xea, 0xc9, 0x68, 0x86, 0x59, 0x9d, 0xe2, 0x27, 0xf0, 0x08, 0xa6, 0xb0, 0x00, 0x53, - 0xe6, 0xf4, 0x01, 0x12, 0xeb, 0x07, 0x7a, 0x32, 0x86, 0x9d, 0xe2, 0x6c, 0x4e, 0x99, 0xd9, 0xd4, - 0x59, 0xcf, 0xbd, 0x85, 0x25, 0x88, 0x4b, 0x93, 0x78, 0x95, 0x39, 0x64, 0x23, 0x2c, 0xee, 0x43, - 0x58, 0x19, 0x8e, 0xf7, 0x00, 0x6b, 0xf1, 0x65, 0x23, 0x84, 0x71, 0x10, 0xe2, 0x62, 0x32, 0xec, - 0x62, 0x32, 0xfb, 0x7d, 0x0f, 0x5f, 0x9b, 0x42, 0xc3, 0x9f, 0xaf, 0xfe, 0xda, 0xd8, 0x7f, 0xc1, - 0x31, 0x07, 0xb8, 0x36, 0x59, 0x33, 0x0f, 0x17, 0xed, 0xd3, 0x5d, 0x4a, 0x5f, 0x82, 0x94, 0x65, - 0x30, 0x29, 0xa8, 0xe8, 0xea, 0x21, 0xe1, 0x64, 0x1c, 0x0f, 0x18, 0xf9, 0xf6, 0x9a, 0x28, 0x59, - 0x76, 0x53, 0xb2, 0x29, 0x34, 0x28, 0x25, 0xd9, 0x1f, 0x19, 0x58, 0x74, 0xce, 0x16, 0x64, 0xe9, - 0xae, 0xa8, 0xb6, 0x5e, 0x1a, 0x5d, 0x2b, 0xe4, 0xaa, 0xd0, 0xc0, 0x78, 0xd2, 0x90, 0x0d, 0xca, - 0xdc, 0x21, 0x47, 0x46, 0x0b, 0x39, 0xea, 0x13, 0x72, 0x1a, 0x4e, 0x78, 0x06, 0x65, 0x85, 0x2d, - 0x43, 0xa2, 0x2b, 0x50, 0x68, 0xca, 0x1a, 0xea, 0x5f, 0xe7, 0x06, 0xc4, 0x3c, 0xb8, 0x90, 0x9d, - 0x80, 0x65, 0x0f, 0x83, 0x96, 0x3f, 0x3f, 0x31, 0xb0, 0xe4, 0x9a, 0x1f, 0x95, 0x07, 0x67, 0x3d, - 0x18, 0x1b, 0x54, 0x0f, 0x5e, 0x11, 0x13, 0x19, 0x48, 0x79, 0xc7, 0x65, 0x85, 0xfe, 0x2b, 0x03, - 0xd3, 0xdb, 0x5a, 0x9d, 0x47, 0x42, 0x67, 0xb7, 0x2a, 0x34, 0x90, 0xce, 0x5e, 0x85, 0x98, 0x82, - 0xbf, 0x70, 0xc0, 0x93, 0x1b, 0xcb, 0x9e, 0x95, 0xd3, 0x14, 0x26, 0x5e, 0x91, 0x05, 0xec, 0x59, - 0x98, 0x33, 0xa3, 0x12, 0xe4, 0x56, 0x4b, 0xd4, 0x5b, 0x48, 0xd2, 0x31, 0x32, 0x53, 0xfc, 0x2c, - 0x1e, 0x2f, 0x58, 0xc3, 0x3d, 0x00, 0x8c, 0x8d, 0x06, 0x40, 0xc4, 0x07, 0x80, 0x0f, 0xf0, 0xfe, - 0xea, 0x46, 0x67, 0x15, 0xc3, 0xff, 0x40, 0x4c, 0x45, 0x5a, 0xbb, 0x69, 0x46, 0x39, 0xb3, 0x71, - 0xc6, 0x33, 0x4a, 0x2a, 0xce, 0x63, 0xd1, 0xf2, 0xa1, 0x82, 0x78, 0xb2, 0xec, 0x5a, 0xc4, 0xb0, - 0x91, 0xfd, 0x34, 0x0c, 0xb0, 0xad, 0xd5, 0xcb, 0x62, 0x0b, 0xc9, 0xed, 0xa3, 0xc1, 0xae, 0x2d, - 0xa9, 0x48, 0x40, 0x62, 0x07, 0xd5, 0x1c, 0xd8, 0xed, 0x59, 0xc3, 0x47, 0x83, 0xdd, 0x05, 0x60, - 0x25, 0xf4, 0x40, 0xaf, 0x68, 0xe8, 0x5e, 0x1b, 0x49, 0x02, 0xaa, 0xa8, 0x48, 0xe8, 0x60, 0x1c, - 0x23, 0xfc, 0x9c, 0x31, 0x53, 0x22, 0x13, 0x06, 0x78, 0x01, 0x52, 0xed, 0x3d, 0xdc, 0xba, 0x10, - 0x20, 0x8e, 0x1a, 0xe6, 0x6f, 0xcd, 0x13, 0x88, 0x68, 0xdf, 0x91, 0x70, 0x2a, 0xbf, 0x26, 0xb4, - 0xd3, 0x30, 0x49, 0x92, 0xda, 0x30, 0x4a, 0xb6, 0xb2, 0xb9, 0xb9, 0x4d, 0x37, 0x8e, 0x64, 0x2f, - 0x7b, 0xd3, 0x11, 0x1d, 0x48, 0x47, 0xcc, 0x87, 0x8e, 0x7d, 0x7c, 0xec, 0x38, 0x01, 0x3b, 0x6a, - 0x56, 0x3e, 0x0e, 0x63, 0xce, 0x37, 0x85, 0x86, 0x24, 0xdf, 0x6f, 0xa2, 0x5a, 0x1d, 0xe1, 0xad, - 0x3d, 0x02, 0x2d, 0xab, 0x30, 0x5b, 0x75, 0x6a, 0xa3, 0xac, 0xb8, 0x86, 0xbb, 0xac, 0x18, 0x0b, - 0x6b, 0x0e, 0x56, 0x36, 0x8d, 0x91, 0xd7, 0x55, 0x61, 0x05, 0xdc, 0x22, 0xbb, 0x20, 0x38, 0x6a, - 0xa0, 0xff, 0x72, 0xb4, 0x09, 0x7b, 0xe6, 0x9d, 0x61, 0xa4, 0x23, 0xf3, 0xbf, 0x10, 0xbb, 0x2b, - 0xa2, 0x66, 0x4d, 0x23, 0xc5, 0x23, 0xeb, 0xe9, 0x18, 0xb1, 0x74, 0x13, 0x4b, 0x52, 0xaa, 0xcc, - 0x75, 0x6c, 0x01, 0xe2, 0xba, 0x99, 0x5d, 0x04, 0xda, 0x53, 0xfd, 0x54, 0x90, 0x44, 0xa4, 0x8d, - 0x36, 0x59, 0x19, 0x00, 0xdf, 0xaf, 0x19, 0x7b, 0x33, 0x61, 0x0b, 0x3d, 0xe8, 0x35, 0xe4, 0x3a, - 0xc4, 0xc9, 0x25, 0xab, 0xef, 0x1d, 0x89, 0x68, 0xa6, 0x0e, 0x92, 0x25, 0x46, 0x9d, 0x20, 0x9f, - 0xd6, 0xce, 0xc4, 0x88, 0x45, 0xf8, 0x59, 0x32, 0x4e, 0xf7, 0x65, 0xf6, 0xab, 0x28, 0x2c, 0xf4, - 0x78, 0xda, 0xf7, 0x62, 0x33, 0x80, 0xa3, 0x3d, 0x57, 0xc3, 0x3b, 0xfc, 0x85, 0x26, 0xe1, 0xd1, - 0x49, 0xb3, 0x97, 0xc0, 0xd1, 0x60, 0x77, 0xe3, 0x32, 0x6b, 0xbf, 0xc3, 0x26, 0x0d, 0x8e, 0xbd, - 0x03, 0x49, 0x45, 0x95, 0x15, 0x59, 0x43, 0xb5, 0x0a, 0x05, 0x84, 0xfa, 0x13, 0x0d, 0xec, 0xcf, - 0x12, 0xd5, 0x41, 0xd0, 0xa1, 0x2e, 0xfd, 0x1f, 0x66, 0x48, 0x46, 0x0c, 0xdb, 0x8c, 0x4f, 0x93, - 0x75, 0x64, 0xbf, 0x9e, 0x87, 0x79, 0xaa, 0xc8, 0xf8, 0xab, 0xe9, 0xd5, 0x96, 0x82, 0x3b, 0xf3, - 0x08, 0x3f, 0x47, 0x26, 0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e, 0x9f, 0xd7, 0x82, 0xe9, 0xa2, - 0x5b, 0xec, 0xca, 0x50, 0xe2, 0xfe, 0xe6, 0xe9, 0xa6, 0x08, 0x68, 0x9e, 0x6e, 0x91, 0x2b, 0x43, - 0x89, 0x5b, 0xe6, 0x3f, 0x84, 0x05, 0xcf, 0x7e, 0xe4, 0x42, 0xc0, 0x68, 0xb0, 0x34, 0x77, 0x79, - 0x18, 0x69, 0x6a, 0xfb, 0x46, 0xe9, 0xe9, 0xf3, 0x14, 0xf3, 0xec, 0x79, 0x8a, 0xf9, 0xfd, 0x79, - 0x8a, 0xf9, 0xfc, 0x45, 0x2a, 0xf4, 0xec, 0x45, 0x2a, 0xf4, 0xcb, 0x8b, 0x54, 0xe8, 0xdd, 0xab, - 0x75, 0x51, 0x3f, 0x68, 0xef, 0xe7, 0x04, 0xb9, 0x95, 0x17, 0x64, 0xad, 0x25, 0x6b, 0x79, 0x71, - 0x5f, 0x58, 0xab, 0xcb, 0xf9, 0xce, 0xbf, 0xf3, 0x2d, 0xb9, 0xd6, 0x6e, 0x22, 0xcd, 0xfc, 0x3f, - 0xf9, 0xc5, 0xcb, 0x6b, 0xf4, 0x5f, 0xe5, 0xfa, 0xa1, 0x82, 0xb4, 0xfd, 0x18, 0xfe, 0x37, 0xf9, - 0xa5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x84, 0xce, 0x31, 0xd8, 0x1f, 0x00, 0x00, + // 1729 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6b, 0x1b, 0xd7, + 0x16, 0xd7, 0x48, 0xb2, 0x64, 0x1f, 0x3b, 0xb1, 0x3d, 0x76, 0x1c, 0x65, 0x6c, 0x4b, 0x8a, 0x02, + 0x89, 0x93, 0x17, 0x4b, 0xb1, 0x93, 0xbc, 0x47, 0x42, 0xe0, 0x3d, 0x5b, 0x4f, 0x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xde, 0x81, 0x24, 0x95, 0x95, 0x8a, 0x66, 0x99, 0xa5, 0xf1, 0xd5, 0x85, + 0xbc, 0x8f, 0x4f, 0x79, 0x2a, 0x6f, 0x3d, 0xfe, 0xe2, 0xa7, 0x4c, 0x84, 0x37, 0x97, 0xb0, 0x73, + 0x90, 0x50, 0xc5, 0xba, 0x84, 0x94, 0x54, 0xcc, 0x90, 0x6a, 0x7c, 0xdd, 0x1e, 0x7d, 0xf2, 0x3c, + 0x13, 0xf9, 0xf5, 0x79, 0x26, 0x92, 0xab, 0x00, 0xe7, 0x35, 0x87, 0x47, 0xaa, 0x8c, 0x25, 0x15, + 0xb1, 0x8b, 0x00, 0x54, 0x54, 0xd7, 0xb2, 0x31, 0x3a, 0xb2, 0x51, 0x63, 0x53, 0x90, 0xec, 0x20, + 0x45, 0x15, 0xb1, 0x44, 0x8c, 0x1b, 0xe3, 0xcd, 0xcf, 0xdc, 0xf7, 0x51, 0x98, 0x76, 0xca, 0xdd, + 0x51, 0x0e, 0x83, 0xbd, 0x5c, 0x85, 0x19, 0x59, 0x41, 0x1d, 0x11, 0xb7, 0xd5, 0xaa, 0x4d, 0x21, + 0x11, 0xba, 0x1e, 0x4d, 0x31, 0xfc, 0xb4, 0x39, 0x5d, 0xb4, 0x94, 0xdb, 0x22, 0x13, 0x1b, 0x3c, + 0x32, 0x2b, 0x30, 0x2b, 0xe0, 0xb6, 0xa4, 0x21, 0x45, 0xde, 0x55, 0xb4, 0xc3, 0xaa, 0xe9, 0x47, + 0x9c, 0xd8, 0x35, 0x63, 0x9f, 0xfb, 0xb7, 0x31, 0xa5, 0x07, 0x43, 0x56, 0x30, 0xde, 0xaf, 0x8a, + 0x92, 0xa8, 0xa5, 0x46, 0xb2, 0xcc, 0xd2, 0x04, 0x3f, 0x46, 0x46, 0x08, 0x85, 0x45, 0x98, 0x30, + 0xa6, 0x0f, 0x90, 0x58, 0x3f, 0xd0, 0x52, 0x09, 0x62, 0x14, 0x67, 0x33, 0xca, 0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x6f, 0x85, 0x16, 0xae, 0xb5, 0x9b, 0x48, + 0x35, 0xfe, 0x86, 0xbf, 0x76, 0x63, 0xd9, 0xfc, 0x27, 0x5e, 0x3b, 0x94, 0x91, 0xba, 0x97, 0x20, + 0xff, 0xc2, 0x5f, 0xff, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x30, 0x12, 0xe9, 0x37, 0x20, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3245,7 +3273,7 @@ func (m *MsgChannelUpgradeTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Signer) i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x52 } { size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) @@ -3256,35 +3284,28 @@ func (m *MsgChannelUpgradeTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a - if len(m.ProofUpgradeSequence) > 0 { - i -= len(m.ProofUpgradeSequence) - copy(dAtA[i:], m.ProofUpgradeSequence) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUpgradeSequence))) + dAtA[i] = 0x4a + if len(m.ProofUpgrade) > 0 { + i -= len(m.ProofUpgrade) + copy(dAtA[i:], m.ProofUpgrade) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUpgrade))) i-- - dAtA[i] = 0x52 - } - if len(m.ProofUpgradeTimeout) > 0 { - i -= len(m.ProofUpgradeTimeout) - copy(dAtA[i:], m.ProofUpgradeTimeout) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUpgradeTimeout))) - i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(m.ProofChannel) > 0 { i -= len(m.ProofChannel) copy(dAtA[i:], m.ProofChannel) i = encodeVarintTx(dAtA, i, uint64(len(m.ProofChannel))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } - if m.TimeoutTimestamp != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TimeoutTimestamp)) + if m.CounterpartyUpgradeSequence != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.CounterpartyUpgradeSequence)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.CounterpartyProposedUpgrade.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3292,9 +3313,9 @@ func (m *MsgChannelUpgradeTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a { - size, err := m.ProposedUpgradeChannel.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ProposedUpgradeTimeout.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3302,22 +3323,16 @@ func (m *MsgChannelUpgradeTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - if m.CounterpartySequence != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.CounterpartySequence)) - i-- - dAtA[i] = 0x20 - } - { - size, err := m.CounterpartyChannel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + dAtA[i] = 0x22 + if len(m.ProposedUpgradeConnectionHops) > 0 { + for iNdEx := len(m.ProposedUpgradeConnectionHops) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ProposedUpgradeConnectionHops[iNdEx]) + copy(dAtA[i:], m.ProposedUpgradeConnectionHops[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProposedUpgradeConnectionHops[iNdEx]))) + i-- + dAtA[i] = 0x1a } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) @@ -3355,6 +3370,25 @@ func (m *MsgChannelUpgradeTryResponse) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l + if m.Result != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x18 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintTx(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -4218,27 +4252,24 @@ func (m *MsgChannelUpgradeTry) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.CounterpartyChannel.Size() - n += 1 + l + sovTx(uint64(l)) - if m.CounterpartySequence != 0 { - n += 1 + sovTx(uint64(m.CounterpartySequence)) + if len(m.ProposedUpgradeConnectionHops) > 0 { + for _, s := range m.ProposedUpgradeConnectionHops { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } } - l = m.ProposedUpgradeChannel.Size() + l = m.ProposedUpgradeTimeout.Size() n += 1 + l + sovTx(uint64(l)) - l = m.TimeoutHeight.Size() + l = m.CounterpartyProposedUpgrade.Size() n += 1 + l + sovTx(uint64(l)) - if m.TimeoutTimestamp != 0 { - n += 1 + sovTx(uint64(m.TimeoutTimestamp)) + if m.CounterpartyUpgradeSequence != 0 { + n += 1 + sovTx(uint64(m.CounterpartyUpgradeSequence)) } l = len(m.ProofChannel) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.ProofUpgradeTimeout) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ProofUpgradeSequence) + l = len(m.ProofUpgrade) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -4257,6 +4288,17 @@ func (m *MsgChannelUpgradeTryResponse) Size() (n int) { } var l int _ = l + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Result != 0 { + n += 1 + sovTx(uint64(m.Result)) + } return n } @@ -7689,9 +7731,9 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyChannel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProposedUpgradeConnectionHops", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -7701,47 +7743,27 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.CounterpartyChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ProposedUpgradeConnectionHops = append(m.ProposedUpgradeConnectionHops, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartySequence", wireType) - } - m.CounterpartySequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CounterpartySequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposedUpgradeChannel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProposedUpgradeTimeout", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7768,13 +7790,13 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ProposedUpgradeChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ProposedUpgradeTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyProposedUpgrade", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7801,15 +7823,15 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CounterpartyProposedUpgrade.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyUpgradeSequence", wireType) } - m.TimeoutTimestamp = 0 + m.CounterpartyUpgradeSequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -7819,12 +7841,12 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TimeoutTimestamp |= uint64(b&0x7F) << shift + m.CounterpartyUpgradeSequence |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofChannel", wireType) } @@ -7858,43 +7880,9 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { m.ProofChannel = []byte{} } iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofUpgradeTimeout", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofUpgradeTimeout = append(m.ProofUpgradeTimeout[:0], dAtA[iNdEx:postIndex]...) - if m.ProofUpgradeTimeout == nil { - m.ProofUpgradeTimeout = []byte{} - } - iNdEx = postIndex - case 10: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofUpgradeSequence", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofUpgrade", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -7921,12 +7909,12 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProofUpgradeSequence = append(m.ProofUpgradeSequence[:0], dAtA[iNdEx:postIndex]...) - if m.ProofUpgradeSequence == nil { - m.ProofUpgradeSequence = []byte{} + m.ProofUpgrade = append(m.ProofUpgrade[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUpgrade == nil { + m.ProofUpgrade = []byte{} } iNdEx = postIndex - case 11: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -7959,7 +7947,7 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 12: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } @@ -8041,6 +8029,89 @@ func (m *MsgChannelUpgradeTryResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgChannelUpgradeTryResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Result |= ResponseResultType(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index a76ef7dcc6b..4c754082e14 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -71,6 +71,8 @@ enum ResponseResultType { RESPONSE_RESULT_TYPE_NOOP = 1 [(gogoproto.enumvalue_customname) = "NOOP"]; // The message was executed successfully RESPONSE_RESULT_TYPE_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "SUCCESS"]; + // The message was executed unsuccessfully + RESPONSE_RESULT_TYPE_FAILURE = 3 [(gogoproto.enumvalue_customname) = "FAILURE"]; } // MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It @@ -280,22 +282,24 @@ message MsgChannelUpgradeTry { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string port_id = 1; - string channel_id = 2; - Channel counterparty_channel = 3 [(gogoproto.nullable) = false]; - uint64 counterparty_sequence = 4; - Channel proposed_upgrade_channel = 5 [(gogoproto.nullable) = false]; - ibc.core.client.v1.Height timeout_height = 6 [(gogoproto.nullable) = false]; - uint64 timeout_timestamp = 7; - bytes proof_channel = 8; - bytes proof_upgrade_timeout = 9; - bytes proof_upgrade_sequence = 10; - ibc.core.client.v1.Height proof_height = 11 [(gogoproto.nullable) = false]; - string signer = 12; + string port_id = 1; + string channel_id = 2; + repeated string proposed_upgrade_connection_hops = 3; + UpgradeTimeout proposed_upgrade_timeout = 4 [(gogoproto.nullable) = false]; + Upgrade counterparty_proposed_upgrade = 5 [(gogoproto.nullable) = false]; + uint64 counterparty_upgrade_sequence = 6; + bytes proof_channel = 7; + bytes proof_upgrade = 8; + ibc.core.client.v1.Height proof_height = 9 [(gogoproto.nullable) = false]; + string signer = 10; } // MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type -message MsgChannelUpgradeTryResponse {} +message MsgChannelUpgradeTryResponse { + string channel_id = 1; + string version = 2; + ResponseResultType result = 3; +} // MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc message MsgChannelUpgradeAck { From 2018ef68de344e47e6da9bc499ecbd27173bf975 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 17:04:15 +0200 Subject: [PATCH 02/35] update msgs and msg testing --- modules/core/04-channel/types/msgs.go | 59 +++--- modules/core/04-channel/types/msgs_test.go | 52 ++--- modules/core/04-channel/types/query.pb.go | 214 ++++++++++----------- 3 files changed, 146 insertions(+), 179 deletions(-) diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index bd14ccffc97..5d22a6040e7 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -533,31 +533,28 @@ var _ sdk.Msg = &MsgChannelUpgradeTry{} // NewMsgChannelUpgradeTry constructs a new MsgChannelUpgradeTry // nolint:interfacer func NewMsgChannelUpgradeTry( - portID, channelID string, - counterpartyChannel Channel, - counterpartySequence uint64, - proposedUpgradeChannel Channel, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + portID, + channelID string, + proposedConnectionHops []string, + proposedUpgradeTimeout UpgradeTimeout, + counterpartyProposedUpgrade Upgrade, + counterpartyUpgradeSequence uint64, proofChannel []byte, - proofUpgradeTimeout []byte, - proofUpgradeSequence []byte, + proofUpgrade []byte, proofHeight clienttypes.Height, signer string, ) *MsgChannelUpgradeTry { return &MsgChannelUpgradeTry{ - PortId: portID, - ChannelId: channelID, - CounterpartyChannel: counterpartyChannel, - CounterpartySequence: counterpartySequence, - ProposedUpgradeChannel: proposedUpgradeChannel, - TimeoutHeight: timeoutHeight, - TimeoutTimestamp: timeoutTimestamp, - ProofChannel: proofChannel, - ProofUpgradeTimeout: proofUpgradeTimeout, - ProofUpgradeSequence: proofUpgradeSequence, - ProofHeight: proofHeight, - Signer: signer, + PortId: portID, + ChannelId: channelID, + ProposedUpgradeConnectionHops: proposedConnectionHops, + ProposedUpgradeTimeout: proposedUpgradeTimeout, + CounterpartyProposedUpgrade: counterpartyProposedUpgrade, + CounterpartyUpgradeSequence: counterpartyUpgradeSequence, + ProofChannel: proofChannel, + ProofUpgrade: proofUpgrade, + ProofHeight: proofHeight, + Signer: signer, } } @@ -569,29 +566,17 @@ func (msg MsgChannelUpgradeTry) ValidateBasic() error { if !IsValidChannelID(msg.ChannelId) { return ErrInvalidChannelIdentifier } - if msg.CounterpartyChannel.State != INITUPGRADE { - return errorsmod.Wrapf(ErrInvalidChannelState, "expected: %s, got: %s", INITUPGRADE, msg.CounterpartyChannel.State) - } - if msg.CounterpartySequence == 0 { + if msg.CounterpartyUpgradeSequence == 0 { return errorsmod.Wrap(ibcerrors.ErrInvalidSequence, "counterparty sequence cannot be 0") } - if msg.ProposedUpgradeChannel.State != TRYUPGRADE { - return errorsmod.Wrapf(ErrInvalidChannelState, "expected: %s, got: %s", TRYUPGRADE, msg.CounterpartyChannel.State) - } - if msg.TimeoutHeight.IsZero() { - return errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "timeout height must be non-zero") - } - if msg.TimeoutTimestamp == 0 && msg.TimeoutHeight.IsZero() { - return errorsmod.Wrap(ErrInvalidUpgradeTimeout, "invalid upgrade timeout timestamp or timeout height") + if msg.ProposedUpgradeTimeout.Height.IsZero() && msg.ProposedUpgradeTimeout.Timestamp == 0 { + return errorsmod.Wrap(ErrInvalidUpgradeTimeout, "timeout height or timeout timestamp must be non-zero") } if len(msg.ProofChannel) == 0 { return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty channel proof") } - if len(msg.ProofUpgradeTimeout) == 0 { - return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty upgrade timeout proof") - } - if len(msg.ProofUpgradeSequence) == 0 { - return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty upgrade sequence proof") + if len(msg.ProofUpgrade) == 0 { + return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty upgrade proof") } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index af9e9df3c4e..a0b2e47909f 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -531,32 +531,18 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { }, false, }, - { - "invalid counterparty channel state", - func() { - msg.CounterpartyChannel.State = types.TRYUPGRADE - }, - false, - }, { "counterparty sequence cannot be zero", func() { - msg.CounterpartySequence = 0 - }, - false, - }, - { - "invalid proposed upgrade channel state", - func() { - msg.ProposedUpgradeChannel.State = types.INITUPGRADE + msg.CounterpartyUpgradeSequence = 0 }, false, }, { "timeout height is zero && timeout timestamp is zero", func() { - msg.TimeoutHeight = clienttypes.ZeroHeight() - msg.TimeoutTimestamp = 0 + msg.ProposedUpgradeTimeout.Height = clienttypes.ZeroHeight() + msg.ProposedUpgradeTimeout.Timestamp = 0 }, false, }, @@ -568,16 +554,9 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { false, }, { - "cannot submit an empty upgrade timeout proof", + "cannot submit an empty upgrade proof", func() { - msg.ProofUpgradeTimeout = emptyProof - }, - false, - }, - { - "cannot submit an empty upgrade sequence proof", - func() { - msg.ProofUpgradeSequence = emptyProof + msg.ProofUpgrade = emptyProof }, false, }, @@ -593,15 +572,22 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { for _, tc := range testCases { tc := tc suite.Run(tc.name, func() { + counterpartyProposedUpgrade := types.NewUpgrade( + types.NewUpgradeFields(types.UNORDERED, []string{ibctesting.FirstChannelID}, mock.Version), + types.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), + 1, + ) msg = types.NewMsgChannelUpgradeTry( - ibctesting.MockPort, ibctesting.FirstChannelID, - types.Channel{State: types.INITUPGRADE}, + ibctesting.MockPort, + ibctesting.FirstChannelID, + []string{ibctesting.FirstChannelID}, + types.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), + *counterpartyProposedUpgrade, 1, - types.Channel{State: types.TRYUPGRADE}, - clienttypes.NewHeight(0, 10000), - 0, - suite.proof, suite.proof, suite.proof, - height, addr, + suite.proof, + suite.proof, + height, + addr, ) tc.malleate() diff --git a/modules/core/04-channel/types/query.pb.go b/modules/core/04-channel/types/query.pb.go index 550134ad74f..3bf9d440bd5 100644 --- a/modules/core/04-channel/types/query.pb.go +++ b/modules/core/04-channel/types/query.pb.go @@ -1802,7 +1802,7 @@ func (m *QueryUpgradeRequest) Reset() { *m = QueryUpgradeRequest{} } func (m *QueryUpgradeRequest) String() string { return proto.CompactTextString(m) } func (*QueryUpgradeRequest) ProtoMessage() {} func (*QueryUpgradeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{30} + return fileDescriptor_1034a1e9abc4cca1, []int{28} } func (m *QueryUpgradeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1858,7 +1858,7 @@ func (m *QueryUpgradeResponse) Reset() { *m = QueryUpgradeResponse{} } func (m *QueryUpgradeResponse) String() string { return proto.CompactTextString(m) } func (*QueryUpgradeResponse) ProtoMessage() {} func (*QueryUpgradeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{31} + return fileDescriptor_1034a1e9abc4cca1, []int{29} } func (m *QueryUpgradeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1944,113 +1944,109 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1693 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0xcf, 0x6f, 0x14, 0x47, - 0x16, 0x76, 0xd9, 0x06, 0xdb, 0x0f, 0x83, 0xa1, 0x6c, 0x2f, 0xa6, 0x31, 0x63, 0x33, 0xab, 0x5d, - 0x0c, 0x12, 0xdd, 0xd8, 0xb0, 0xc0, 0xae, 0x58, 0x24, 0xec, 0xdd, 0x05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0x01, 0xad, 0x22, 0x22, 0x00, 0x00, + // 1630 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0xd4, 0xd6, + 0x13, 0xcf, 0x4b, 0x02, 0x49, 0x86, 0xf0, 0xeb, 0x25, 0xf9, 0x12, 0x4c, 0xd8, 0x84, 0xfd, 0xaa, + 0x25, 0x20, 0x61, 0x93, 0x40, 0x81, 0x56, 0x14, 0x89, 0xa4, 0x2d, 0x04, 0x95, 0x5f, 0x4e, 0x51, + 0x01, 0xa9, 0xdd, 0x7a, 0xbd, 0x8f, 0x8d, 0x95, 0xc4, 0x36, 0x6b, 0xef, 0x02, 0x4a, 0xb7, 0xaa, + 0x7a, 0xa0, 0x1c, 0xab, 0x72, 0xa8, 0xd4, 0x4b, 0xa5, 0xde, 0xa8, 0x54, 0x55, 0xfd, 0x0b, 0x7a, + 0xe9, 0x81, 0x5b, 0x91, 0xe8, 0xa1, 0x12, 0x12, 0xad, 0x08, 0x12, 0xbd, 0xf6, 0xd2, 0x43, 0x4f, + 0x95, 0xdf, 0x1b, 0x7b, 0xed, 0x5d, 0xaf, 0xb3, 0x1b, 0x67, 0x25, 0xd4, 0xdb, 0xfa, 0x79, 0x66, + 0xde, 0xe7, 0xf3, 0x19, 0xbf, 0xb1, 0x67, 0x16, 0xc6, 0x8d, 0xbc, 0xae, 0xe8, 0x56, 0x89, 0x29, + 0xfa, 0x82, 0x66, 0x9a, 0x6c, 0x49, 0xa9, 0x4c, 0x29, 0x37, 0xcb, 0xac, 0x74, 0x47, 0xb6, 0x4b, + 0x96, 0x6b, 0xd1, 0x21, 0x23, 0xaf, 0xcb, 0x9e, 0x81, 0x8c, 0x06, 0x72, 0x65, 0x4a, 0x0a, 0x79, + 0x2d, 0x19, 0xcc, 0x74, 0x3d, 0x27, 0xf1, 0x4b, 0x78, 0x49, 0x07, 0x75, 0xcb, 0x59,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, 0xda, 0x89, 0xd8, 0x4a, 0x2b, 0x82, 0x88, 0x67, 0x39, 0xec, 0xf4, 0x32, 0x94, + 0x59, 0x0b, 0x76, 0x87, 0x88, 0xaa, 0x4c, 0x67, 0x86, 0xdd, 0xd1, 0x27, 0xf3, 0x3e, 0x01, 0x29, + 0x6e, 0x47, 0x94, 0x55, 0x82, 0xfe, 0x92, 0xb7, 0x54, 0x61, 0x22, 0x6e, 0xbf, 0x1a, 0x5c, 0x77, + 0xf2, 0x8c, 0xde, 0xc2, 0x82, 0x29, 0x40, 0x9d, 0xd6, 0x17, 0x4d, 0xeb, 0xd6, 0x12, 0x2b, 0x14, + 0x59, 0xa7, 0x0f, 0xea, 0x03, 0xbf, 0xf4, 0x35, 0xd9, 0x19, 0x65, 0x99, 0x84, 0xed, 0x5a, 0xf4, + 0x16, 0x1e, 0xd9, 0xfa, 0xe5, 0x4e, 0x9e, 0xdb, 0xe7, 0x89, 0x58, 0x5f, 0x96, 0xc3, 0x4b, 0x4f, + 0xc1, 0x1e, 0x9b, 0x03, 0xcc, 0xd5, 0xce, 0x5a, 0xce, 0x17, 0xdc, 0x19, 0xed, 0x9d, 0xe8, 0x99, + 0xec, 0x55, 0x77, 0xdb, 0x75, 0x27, 0x7b, 0xde, 0x37, 0xc8, 0xfe, 0x4d, 0xe0, 0xff, 0x89, 0x34, + 0x31, 0x27, 0xef, 0xc2, 0x8e, 0x3a, 0xf1, 0x5b, 0x2f, 0x03, 0x0d, 0x9e, 0x2f, 0x43, 0x2d, 0xf8, + 0xca, 0xaf, 0xcb, 0x57, 0x4c, 0xff, 0xcc, 0x09, 0xcc, 0xa9, 0x53, 0xbb, 0x46, 0x4a, 0x7a, 0xd6, + 0x4a, 0xc9, 0x6d, 0x2c, 0xc7, 0x31, 0xc0, 0x30, 0x19, 0x63, 0x30, 0x50, 0x8b, 0x47, 0x78, 0xbc, + 0xda, 0x42, 0x48, 0x93, 0xee, 0x36, 0x35, 0xb9, 0xeb, 0x97, 0xab,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x6f, 0x28, 0x09, 0xc3, 0x36, 0x47, 0x59, 0xa9, 0x09, 0x5c, 0x55, 0x3c, 0xd9, 0x1d, 0x65, + 0x05, 0x93, 0x51, 0xa5, 0xf7, 0x08, 0xf4, 0xfb, 0xc3, 0x03, 0xba, 0xf6, 0xde, 0x7e, 0xc9, 0x93, + 0x0e, 0xb6, 0x62, 0x8a, 0x38, 0x5f, 0xe1, 0x38, 0xc7, 0xe9, 0xde, 0x44, 0x9c, 0xf4, 0x27, 0x02, + 0xb4, 0x71, 0xa2, 0x41, 0x8f, 0x24, 0xec, 0xd4, 0x6c, 0x14, 0x23, 0x1d, 0x6d, 0xcf, 0x09, 0x81, + 0x9e, 0xe2, 0x40, 0x4f, 0xd0, 0x63, 0xf1, 0x40, 0x03, 0x47, 0x4f, 0xd3, 0xe0, 0xa2, 0x5a, 0x63, + 0xf0, 0xc8, 0x63, 0xd0, 0x30, 0x4e, 0x48, 0x64, 0xd0, 0x6c, 0xae, 0x91, 0xc8, 0xa0, 0xe9, 0xc4, + 0x22, 0x7b, 0x91, 0x33, 0x98, 0xa3, 0x67, 0xd6, 0xff, 0x48, 0x28, 0xe1, 0x39, 0x07, 0xfd, 0xb2, + 0x1b, 0x46, 0x62, 0xfb, 0x71, 0x7a, 0x6c, 0x6d, 0x80, 0x71, 0x03, 0x07, 0xe9, 0x78, 0xdb, 0x7e, + 0xc8, 0xed, 0x73, 0xc2, 0xc9, 0x7d, 0x4a, 0xe8, 0x27, 0x69, 0xd8, 0x45, 0x67, 0x07, 0x8a, 0x3f, + 0x84, 0x50, 0x56, 0xea, 0xc6, 0x19, 0x55, 0x45, 0x94, 0x81, 0xd0, 0x0d, 0xb1, 0x50, 0xa5, 0x4f, + 0x08, 0xec, 0xa8, 0xef, 0x09, 0xe9, 0x54, 0x73, 0x5e, 0x4d, 0x7a, 0x7e, 0x69, 0xba, 0x1d, 0x17, + 0x54, 0xe1, 0x23, 0x2e, 0xc2, 0x75, 0x7a, 0x35, 0x85, 0x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+ 0x8f, 0x74, 0x78, 0x11, 0xda, 0xde, 0x13, 0x4f, 0x7f, 0x25, 0x30, 0x14, 0xd3, 0x01, 0xd1, 0x84, + 0xcf, 0x80, 0xe6, 0xcd, 0x98, 0xf4, 0x5a, 0x9b, 0x5e, 0x28, 0xc1, 0x25, 0x2e, 0xc1, 0x39, 0x7a, + 0x36, 0x85, 0x04, 0x91, 0x3e, 0xcd, 0xfb, 0xa6, 0x1b, 0x0c, 0x37, 0x34, 0xf4, 0x50, 0x42, 0x5e, + 0x1a, 0xbb, 0x29, 0x49, 0x6e, 0xd5, 0x7c, 0x03, 0x19, 0x60, 0x93, 0x90, 0xe3, 0x2d, 0x13, 0xfd, + 0x8e, 0x40, 0x1f, 0x6e, 0x95, 0xf4, 0x15, 0x1f, 0xed, 0x77, 0x92, 0xbe, 0xe2, 0xeb, 0x3a, 0x99, + 0xec, 0x39, 0x0e, 0xf9, 0x2d, 0x3a, 0x93, 0x1e, 0xf2, 0xcc, 0xfc, 0xc3, 0x67, 0x19, 0xf2, 0xe8, + 0x59, 0x86, 0xfc, 0xf1, 0x2c, 0x43, 0xbe, 0x58, 0xcd, 0x74, 0x3d, 0x5a, 0xcd, 0x74, 0xfd, 0xb6, + 0x9a, 0xe9, 0xba, 0xfe, 0x7a, 0xd1, 0x70, 0x17, 0xca, 0x79, 0x59, 0xb7, 0x96, 0x15, 0xfc, 0x1b, + 0xdf, 0xc8, 0xeb, 0x87, 0x8a, 0x96, 0x52, 0x39, 0xae, 0x2c, 0x5b, 0x85, 0xf2, 0x12, 0x73, 0xc4, + 0xe6, 0x87, 0x8f, 0x1e, 0xf2, 0xf7, 0x77, 0xef, 0xd8, 0xcc, 0xc9, 0x6f, 0xe6, 0xff, 0xa7, 0x1c, + 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x09, 0xda, 0x4b, 0x56, 0x20, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 59c3c164ce87e894cf4e38cbf456683fd0ed487d Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 17:51:36 +0200 Subject: [PATCH 03/35] msg_server --- .../controller/ibc_middleware.go | 4 +- .../27-interchain-accounts/host/ibc_module.go | 4 +- modules/apps/29-fee/ibc_middleware.go | 6 +- modules/apps/transfer/ibc_module.go | 4 +- modules/core/04-channel/keeper/upgrade.go | 29 ++++++++ modules/core/05-port/types/module.go | 10 +-- modules/core/keeper/msg_server.go | 73 ++++++++++++++++++- testing/mock/ibc_module.go | 4 +- 8 files changed, 116 insertions(+), 18 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index b733beced10..a11e88b3367 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -230,8 +230,8 @@ func (im IBCMiddleware) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Or return icatypes.Version, nil } -// OnChanUpgradeTry implements the IBCModule interface -func (im IBCMiddleware) OnChanUpgradeTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, sequence uint64, counterparty channeltypes.Counterparty, previousVersion, counterpartyVersion string) (string, error) { +// OnUpgradeBlock implements the IBCModule interface +func (im IBCMiddleware) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index df12eb52304..f9ae7400f7c 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -154,8 +154,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } -// OnChanUpgradeTry implements the IBCModule interface -func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, sequence uint64, counterparty channeltypes.Counterparty, previousVersion, counterpartyVersion string) (string, error) { +// OnUpgradeBlock implements the IBCModule interface +func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return icatypes.Version, nil } diff --git a/modules/apps/29-fee/ibc_middleware.go b/modules/apps/29-fee/ibc_middleware.go index 71c0b2d3fcb..201f933f28c 100644 --- a/modules/apps/29-fee/ibc_middleware.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -325,9 +325,9 @@ func (im IBCMiddleware) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Or return im.app.OnChanUpgradeInit(ctx, order, connectionHops, portID, channelID, sequence, version, previousVersion) } -// OnChanUpgradeTry implement s the IBCModule interface -func (im IBCMiddleware) OnChanUpgradeTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, sequence uint64, counterparty channeltypes.Counterparty, previousVersion, counterpartyVersion string) (string, error) { - return im.app.OnChanUpgradeTry(ctx, order, connectionHops, portID, channelID, sequence, counterparty, previousVersion, counterpartyVersion) +// OnUpgradeBlock implement s the IBCModule interface +func (im IBCMiddleware) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { + return im.app.OnUpgradeBlock(ctx, portID, channelID, order, connectionHops, counterpartyVersion) } // OnChanUpgradeAck implements the IBCModule interface diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index df74cace90b..6149c96c023 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -306,8 +306,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return types.Version, nil } -// OnChanUpgradeTry implements the IBCModule interface -func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, sequence uint64, counterparty channeltypes.Counterparty, previousVersion, counterpartyVersion string) (string, error) { +// OnUpgradeBlock implements the IBCModule interface +func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return types.Version, nil } diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index 3e09d707126..c142563d8a0 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) @@ -56,6 +57,34 @@ func (k Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID strin emitChannelUpgradeInitEvent(ctx, portID, channelID, currentChannel, upgrade) } +// UpgradeBlock +func (k Keeper) UpgradeBlock( + ctx sdk.Context, + portID, + channelID string, + proposedConnectionHops []string, + proposedUpgradeTimeout types.UpgradeTimeout, + counterpartyProposedUpgrade types.Upgrade, + counterpartyUpgradeSequence uint64, + proofCounterpartyChannel, + proofUpgrade []byte, + proofHeight clienttypes.Height, +) (types.Upgrade, types.Channel, error) { + // TODO + return types.Upgrade{}, types.Channel{}, nil +} + +// WriteUpgradeBlockChannel writes a channel which has successfully passed the UpgradeBlock step. +// An event is emitted for the handshake step. +func (k Keeper) WriteUpgradeBlockChannel( + ctx sdk.Context, + portID, channelID string, + proposedUpgrade types.Upgrade, +) { + // TODO + // grab channel inside this function to get most current channel status +} + // constructProposedUpgrade returns the proposed upgrade from the provided arguments. func (k Keeper) constructProposedUpgrade(ctx sdk.Context, portID, channelID string, fields types.UpgradeFields, timeout types.UpgradeTimeout) (types.Upgrade, error) { seq, found := k.GetNextSequenceSend(ctx, portID, channelID) diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index d9d4c0a6a31..059c7eabdf2 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -119,15 +119,13 @@ type UpgradableModule interface { version, previousVersion string, ) (string, error) - // OnChanUpgradeTry TODO - OnChanUpgradeTry( + // OnUpgradeBlock + OnUpgradeBlock( ctx sdk.Context, + portID, channelID string, order channeltypes.Order, connectionHops []string, - portID, channelID string, - sequence uint64, - counterparty channeltypes.Counterparty, - previousVersion, counterpartyVersion string, + counterpartyVersion string, ) (string, error) // OnChanUpgradeAck TODO diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index fa727003b82..d5ada14bb47 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -751,7 +751,78 @@ func (k Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgC // ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTry) (*channeltypes.MsgChannelUpgradeTryResponse, error) { - return nil, nil + // cbs.OnUpgradeBlock() + + // k.ChannelKeeper.WriteUpgradeBlock() + + ctx := sdk.UnwrapSDKContext(goCtx) + + module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) + if err != nil { + ctx.Logger().Error("channel upgrade try failed", "port-id", msg.PortId, "error", errorsmod.Wrap(err, "could not retrieve module from port-id")) + return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") + } + + cbs, ok := k.Router.GetRoute(module) + if !ok { + ctx.Logger().Error("channel upgrade try failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) + return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) + } + + // k.ChannelKeeper.UpgradeBlockStep() + // TODO: this may be updated based on refactors to this step + proposedUpgrade, _, err := k.ChannelKeeper.UpgradeBlock( + ctx, + msg.PortId, + msg.ChannelId, + msg.ProposedUpgradeConnectionHops, + msg.ProposedUpgradeTimeout, + msg.CounterpartyProposedUpgrade, + msg.CounterpartyUpgradeSequence, + msg.ProofChannel, + msg.ProofUpgrade, + msg.ProofHeight, + ) + if err != nil { + ctx.Logger().Error("channel upgrade try failed", "error", errorsmod.Wrap(err, "channel handshake upgrade try failed")) + + return &channeltypes.MsgChannelUpgradeTryResponse{ + Result: channeltypes.FAILURE, + }, nil + } + + proposedVersion, err := cbs.OnUpgradeBlock( + ctx, + msg.PortId, + msg.ChannelId, + msg.CounterpartyProposedUpgrade.Fields.Ordering, + msg.CounterpartyProposedUpgrade.Fields.ConnectionHops, + msg.CounterpartyProposedUpgrade.Fields.Version, + ) + if err != nil { + ctx.Logger().Error("channel upgrade try callback failed", "port-id", msg.PortId, "channel-id", msg.ChannelId, "error", err.Error()) + // TODO: commit error receipt to state and abort channel upgrade + return &channeltypes.MsgChannelUpgradeTryResponse{ + Result: channeltypes.FAILURE, + }, nil + } + + // set version to return value of callback + proposedUpgrade.Fields.Version = proposedVersion + + // k.ChannelKeeper.WriteUpgradeBlock() + k.ChannelKeeper.WriteUpgradeBlockChannel( + ctx, + msg.PortId, + msg.ChannelId, + proposedUpgrade, + ) + + return &channeltypes.MsgChannelUpgradeTryResponse{ + ChannelId: msg.ChannelId, + Version: proposedVersion, + Result: channeltypes.SUCCESS, + }, nil } // ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. diff --git a/testing/mock/ibc_module.go b/testing/mock/ibc_module.go index c126ec6bf7c..c8486b32d61 100644 --- a/testing/mock/ibc_module.go +++ b/testing/mock/ibc_module.go @@ -167,8 +167,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return Version, nil } -// OnChanUpgradeTry implements the IBCModule interface -func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, sequence uint64, counterparty channeltypes.Counterparty, previousVersion, counterpartyVersion string) (string, error) { +// OnUpgradeBlock mplements the IBCModule interface +func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return Version, nil } From 63e209aac3f226312a56b395fa03f0bb745626f1 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 18:02:37 +0200 Subject: [PATCH 04/35] update pr comments --- modules/core/04-channel/types/msgs.go | 24 ++- modules/core/04-channel/types/tx.pb.go | 229 ++++++++++++------------- proto/ibc/core/channel/v1/tx.proto | 2 +- 3 files changed, 134 insertions(+), 121 deletions(-) diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index 5d22a6040e7..7cba409c93c 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -536,7 +536,7 @@ func NewMsgChannelUpgradeTry( portID, channelID string, proposedConnectionHops []string, - proposedUpgradeTimeout UpgradeTimeout, + upgradeTimeout UpgradeTimeout, counterpartyProposedUpgrade Upgrade, counterpartyUpgradeSequence uint64, proofChannel []byte, @@ -548,7 +548,7 @@ func NewMsgChannelUpgradeTry( PortId: portID, ChannelId: channelID, ProposedUpgradeConnectionHops: proposedConnectionHops, - ProposedUpgradeTimeout: proposedUpgradeTimeout, + UpgradeTimeout: upgradeTimeout, CounterpartyProposedUpgrade: counterpartyProposedUpgrade, CounterpartyUpgradeSequence: counterpartyUpgradeSequence, ProofChannel: proofChannel, @@ -563,21 +563,35 @@ func (msg MsgChannelUpgradeTry) ValidateBasic() error { if err := host.PortIdentifierValidator(msg.PortId); err != nil { return errorsmod.Wrap(err, "invalid port ID") } + if !IsValidChannelID(msg.ChannelId) { return ErrInvalidChannelIdentifier } - if msg.CounterpartyUpgradeSequence == 0 { - return errorsmod.Wrap(ibcerrors.ErrInvalidSequence, "counterparty sequence cannot be 0") + + if len(msg.ProposedUpgradeConnectionHops) == 0 { + return errorsmod.Wrap(ErrInvalidUpgrade, "proposed connection hops cannot be empty") } - if msg.ProposedUpgradeTimeout.Height.IsZero() && msg.ProposedUpgradeTimeout.Timestamp == 0 { + + if msg.UpgradeTimeout.Height.IsZero() && msg.UpgradeTimeout.Timestamp == 0 { return errorsmod.Wrap(ErrInvalidUpgradeTimeout, "timeout height or timeout timestamp must be non-zero") } + + if err := msg.CounterpartyProposedUpgrade.Fields.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "error validating counterparty upgrade fields") + } + + if msg.CounterpartyUpgradeSequence == 0 { + return errorsmod.Wrap(ibcerrors.ErrInvalidSequence, "counterparty sequence cannot be 0") + } + if len(msg.ProofChannel) == 0 { return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty channel proof") } + if len(msg.ProofUpgrade) == 0 { return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty upgrade proof") } + _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index cb5919202be..811658f2fe8 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -1010,7 +1010,7 @@ type MsgChannelUpgradeTry struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` - ProposedUpgradeTimeout UpgradeTimeout `protobuf:"bytes,4,opt,name=proposed_upgrade_timeout,json=proposedUpgradeTimeout,proto3" json:"proposed_upgrade_timeout"` + UpgradeTimeout UpgradeTimeout `protobuf:"bytes,4,opt,name=upgrade_timeout,json=upgradeTimeout,proto3" json:"upgrade_timeout"` CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` @@ -1477,116 +1477,115 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1729 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6b, 0x1b, 0xd7, - 0x16, 0xd7, 0x48, 0xb2, 0x64, 0x1f, 0x3b, 0xb1, 0x3d, 0x76, 0x1c, 0x65, 0x6c, 0x4b, 0x8a, 0x02, - 0x89, 0x93, 0x17, 0x4b, 0xb1, 0x93, 0xbc, 0x47, 0x42, 0xe0, 0x3d, 0x5b, 0x4f, 0x79, 0x31, 0xc4, - 0xb1, 0x19, 0x59, 0x0f, 0xde, 0x47, 0x2b, 0xec, 0xd1, 0xb5, 0x3c, 0x48, 0x9a, 0x3b, 0x99, 0x19, - 0x29, 0x71, 0xa1, 0x8b, 0x2e, 0x4a, 0x43, 0xa0, 0xd0, 0x65, 0xa1, 0x04, 0x02, 0x5d, 0x74, 0xd9, - 0x5d, 0x17, 0x5d, 0x77, 0x91, 0x65, 0xa0, 0xd0, 0xa6, 0x50, 0x4a, 0x49, 0x16, 0xed, 0x9f, 0xd0, - 0x65, 0x99, 0x3b, 0x77, 0x46, 0xf3, 0x29, 0x8d, 0x2c, 0xd7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- 0xf6, 0x36, 0xc2, 0x97, 0xc3, 0x09, 0xd2, 0x0b, 0xc7, 0x4a, 0x68, 0x68, 0xb0, 0x4a, 0xbd, 0x7c, - 0x84, 0x54, 0xa9, 0x57, 0x90, 0x95, 0xd0, 0x50, 0x4b, 0xe5, 0xfb, 0x70, 0xc6, 0xff, 0xb6, 0xbd, - 0x1c, 0x4e, 0x96, 0xb9, 0xc5, 0x6e, 0x0e, 0x04, 0x0f, 0x56, 0x6f, 0x6e, 0x8a, 0x90, 0xea, 0xcd, - 0x2d, 0x72, 0x73, 0x20, 0xb8, 0xa5, 0xfe, 0x3d, 0x98, 0xf5, 0xbd, 0xbe, 0x5c, 0x0d, 0xe9, 0x0d, - 0x41, 0x73, 0x37, 0x06, 0x41, 0x9b, 0xba, 0xd7, 0xcb, 0x2f, 0x5e, 0xa7, 0x99, 0x97, 0xaf, 0xd3, - 0xcc, 0xcf, 0xaf, 0xd3, 0xcc, 0x27, 0x6f, 0xd2, 0x91, 0x97, 0x6f, 0xd2, 0x91, 0x57, 0x6f, 0xd2, - 0x91, 0xff, 0xde, 0xaa, 0x8b, 0xda, 0x41, 0x7b, 0x2f, 0x2f, 0xe0, 0x56, 0x41, 0xc0, 0x6a, 0x0b, - 0xab, 0x05, 0x71, 0x4f, 0x58, 0xae, 0xe3, 0x42, 0xe7, 0x6f, 0x85, 0x16, 0xae, 0xb5, 0x9b, 0x48, - 0x35, 0xfe, 0x86, 0xbf, 0x76, 0x63, 0xd9, 0xfc, 0x27, 0x5e, 0x3b, 0x94, 0x91, 0xba, 0x97, 0x20, - 0xff, 0xc2, 0x5f, 0xff, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x30, 0x12, 0xe9, 0x37, 0x20, 0x00, - 0x00, + // 1726 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xbf, 0x6f, 0xdb, 0xc6, + 0x17, 0x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+ 0xc4, 0x48, 0x9a, 0x59, 0x9a, 0xe0, 0xc7, 0xc8, 0x08, 0xa1, 0x30, 0x0f, 0x13, 0xc6, 0xf4, 0x3e, + 0x12, 0x6b, 0xfb, 0x5a, 0x22, 0x46, 0x8c, 0xe2, 0x6c, 0x46, 0x19, 0xd9, 0xd4, 0x5e, 0xc9, 0xde, + 0x21, 0x08, 0x6a, 0xd2, 0x38, 0x59, 0x65, 0x0c, 0xd9, 0x08, 0x8b, 0xfb, 0x10, 0xb6, 0x03, 0x67, + 0xba, 0x02, 0x6b, 0xf1, 0x65, 0x23, 0x84, 0x71, 0x10, 0xe2, 0x62, 0x32, 0xec, 0x62, 0x32, 0xf3, + 0x63, 0x17, 0x5f, 0x6b, 0x42, 0xdd, 0x9f, 0xaf, 0xde, 0xd2, 0xd8, 0xff, 0xc3, 0x69, 0x47, 0x70, + 0x6d, 0x58, 0x23, 0x0f, 0x4f, 0xda, 0xa7, 0x3b, 0x94, 0x1e, 0x82, 0x94, 0x79, 0x30, 0x28, 0x28, + 0x6b, 0xca, 0x01, 0xe5, 0x64, 0x94, 0x0c, 0xe8, 0xf9, 0x76, 0x4c, 0x94, 0xcc, 0xbb, 0x29, 0x59, + 0x13, 0xea, 0x26, 0x25, 0x99, 0x9f, 0x19, 0x38, 0xe9, 0x9c, 0xcd, 0x63, 0x69, 0x4f, 0x54, 0x9a, + 0x87, 0x8e, 0xae, 0xe5, 0x72, 0x45, 0xa8, 0x93, 0x78, 0x9a, 0x2e, 0xeb, 0x94, 0xb9, 0x5d, 0x8e, + 0x0e, 0xe7, 0xf2, 0x88, 0x8f, 0xcb, 0x29, 0x58, 0xf4, 0x74, 0xca, 0x72, 0x1b, 0xc3, 0x6c, 0x07, + 0x90, 0x6f, 0x60, 0x15, 0xf5, 0xae, 0x73, 0x7d, 0x7c, 0xee, 0x5f, 0xc8, 0x16, 0x61, 0xde, 0x43, + 0xa1, 0x65, 0xcf, 0x2f, 0x0c, 0x9c, 0x72, 0xcd, 0x0f, 0xcb, 0x83, 0xb3, 0x1e, 0x44, 0xfa, 0xd5, + 0x83, 0x7f, 0x89, 0x89, 0x34, 0x24, 0xbd, 0xfd, 0xb2, 0x5c, 0xff, 0x8d, 0x81, 0x13, 0x9b, 0x6a, + 0x8d, 0x47, 0x42, 0x7b, 0xbb, 0x22, 0xd4, 0x91, 0xc6, 0xde, 0x80, 0x98, 0x4c, 0x9e, 0x88, 0xc3, + 0xe3, 0xab, 0xf3, 0x9e, 0x95, 0xd3, 0x00, 0x53, 0xab, 0xe8, 0x02, 0xf6, 0x22, 0x4c, 0x1b, 0x5e, + 0x09, 0xb8, 0xd9, 0x14, 0xb5, 0x26, 0x92, 0x34, 0x12, 0x99, 0x09, 0x7e, 0x8a, 0x8c, 0xe7, 0xad, + 0xe1, 0xae, 0x00, 0x44, 0x86, 0x0b, 0x40, 0xd4, 0x27, 0x00, 0x1f, 0x93, 0xfd, 0xd5, 0xf1, 0xce, + 0x2a, 0x86, 0x6f, 0x42, 0x4c, 0x41, 0x6a, 0xab, 0x61, 0x78, 0x39, 0xb9, 0x7a, 0xc1, 0xd3, 0x4b, + 0x13, 0xce, 0x13, 0xe8, 0xce, 0x81, 0x8c, 0x78, 0xba, 0xec, 0x66, 0x54, 0xd7, 0x91, 0xf9, 0x22, + 0x0c, 0xb0, 0xa9, 0xd6, 0x76, 0xc4, 0x26, 0xc2, 0xad, 0xa3, 0x89, 0x5d, 0x4b, 0x52, 0x90, 0x80, + 0xc4, 0x36, 0xaa, 0x3a, 0x62, 0x57, 0xb2, 0x86, 0x8f, 0x26, 0x76, 0x97, 0x81, 0x95, 0xd0, 0x43, + 0xad, 0xac, 0xa2, 0xfb, 0x2d, 0x24, 0x09, 0xa8, 0xac, 0x20, 0xa1, 0x4d, 0xe2, 0x18, 0xe5, 0xa7, + 0xf5, 0x99, 0x22, 0x9d, 0xd0, 0x83, 0x17, 0x20, 0xd5, 0x3e, 0x20, 0x47, 0x17, 0x1a, 0x88, 0xa3, + 0x0e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 0x4a, 0x86, 0x5e, 0xbc, 0x4a, 0x86, 0xde, 0xbf, + 0x51, 0x13, 0xb5, 0xfd, 0xd6, 0x6e, 0x56, 0xc0, 0xcd, 0x9c, 0x80, 0xd5, 0x26, 0x56, 0x73, 0xe2, + 0xae, 0xb0, 0x5c, 0xc3, 0xb9, 0xf6, 0x1b, 0xb9, 0x26, 0xae, 0xb6, 0x1a, 0x48, 0x35, 0xfe, 0xba, + 0x5f, 0xb9, 0xb6, 0x6c, 0xfe, 0x78, 0xd7, 0x0e, 0x64, 0xa4, 0xee, 0xc6, 0xc8, 0x4f, 0xf7, 0xab, + 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x52, 0x8e, 0xa5, 0x54, 0x26, 0x20, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3315,7 +3314,7 @@ func (m *MsgChannelUpgradeTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a { - size, err := m.ProposedUpgradeTimeout.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.UpgradeTimeout.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4258,7 +4257,7 @@ func (m *MsgChannelUpgradeTry) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - l = m.ProposedUpgradeTimeout.Size() + l = m.UpgradeTimeout.Size() n += 1 + l + sovTx(uint64(l)) l = m.CounterpartyProposedUpgrade.Size() n += 1 + l + sovTx(uint64(l)) @@ -7763,7 +7762,7 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposedUpgradeTimeout", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UpgradeTimeout", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7790,7 +7789,7 @@ func (m *MsgChannelUpgradeTry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ProposedUpgradeTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.UpgradeTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 4c754082e14..aac5c57d5e7 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -285,7 +285,7 @@ message MsgChannelUpgradeTry { string port_id = 1; string channel_id = 2; repeated string proposed_upgrade_connection_hops = 3; - UpgradeTimeout proposed_upgrade_timeout = 4 [(gogoproto.nullable) = false]; + UpgradeTimeout upgrade_timeout = 4 [(gogoproto.nullable) = false]; Upgrade counterparty_proposed_upgrade = 5 [(gogoproto.nullable) = false]; uint64 counterparty_upgrade_sequence = 6; bytes proof_channel = 7; From 53054b9fa7512aa1815e60433038dd4b1474be0d Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 18:15:48 +0200 Subject: [PATCH 05/35] update field name --- modules/core/04-channel/types/msgs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index a0b2e47909f..2590afec7d7 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -541,8 +541,8 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { { "timeout height is zero && timeout timestamp is zero", func() { - msg.ProposedUpgradeTimeout.Height = clienttypes.ZeroHeight() - msg.ProposedUpgradeTimeout.Timestamp = 0 + msg.UpgradeTimeout.Height = clienttypes.ZeroHeight() + msg.UpgradeTimeout.Timestamp = 0 }, false, }, From dd8e5aa28c9304d506b8b50378ee8ad88be56765 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 26 Apr 2023 18:47:06 +0200 Subject: [PATCH 06/35] update field name --- modules/core/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index d5ada14bb47..2891dadcb02 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -776,7 +776,7 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh msg.PortId, msg.ChannelId, msg.ProposedUpgradeConnectionHops, - msg.ProposedUpgradeTimeout, + msg.UpgradeTimeout, msg.CounterpartyProposedUpgrade, msg.CounterpartyUpgradeSequence, msg.ProofChannel, From 406ded296651786d96bb2734a30b60feaf651b91 Mon Sep 17 00:00:00 2001 From: Charly Date: Thu, 27 Apr 2023 14:17:05 +0200 Subject: [PATCH 07/35] update pr comments --- modules/core/04-channel/types/errors.go | 3 ++- modules/core/04-channel/types/msgs.go | 6 +++--- modules/core/04-channel/types/msgs_test.go | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/modules/core/04-channel/types/errors.go b/modules/core/04-channel/types/errors.go index ffcf0997221..032f1d91aa1 100644 --- a/modules/core/04-channel/types/errors.go +++ b/modules/core/04-channel/types/errors.go @@ -44,5 +44,6 @@ var ( ErrUpgradeSequenceNotFound = errorsmod.Register(SubModuleName, 28, "upgrade sequence not found") ErrUpgradeErrorNotFound = errorsmod.Register(SubModuleName, 29, "upgrade error receipt not found") ErrInvalidUpgrade = errorsmod.Register(SubModuleName, 30, "invalid upgrade") - ErrUpgradeNotFound = errorsmod.Register(SubModuleName, 31, "upgrade not found") + ErrInvalidUpgradeSequence = errorsmod.Register(SubModuleName, 31, "invalid upgrade sequence") + ErrUpgradeNotFound = errorsmod.Register(SubModuleName, 32, "upgrade not found") ) diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index 7cba409c93c..68b747f5a5f 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -576,12 +576,12 @@ func (msg MsgChannelUpgradeTry) ValidateBasic() error { return errorsmod.Wrap(ErrInvalidUpgradeTimeout, "timeout height or timeout timestamp must be non-zero") } - if err := msg.CounterpartyProposedUpgrade.Fields.ValidateBasic(); err != nil { - return errorsmod.Wrap(err, "error validating counterparty upgrade fields") + if err := msg.CounterpartyProposedUpgrade.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "error validating counterparty upgrade") } if msg.CounterpartyUpgradeSequence == 0 { - return errorsmod.Wrap(ibcerrors.ErrInvalidSequence, "counterparty sequence cannot be 0") + return errorsmod.Wrap(ErrInvalidUpgradeSequence, "counterparty sequence cannot be 0") } if len(msg.ProofChannel) == 0 { diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 2590afec7d7..0b9bc41605b 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -538,6 +538,21 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { }, false, }, + { + "invalid connection hops", + func() { + msg.ProposedUpgradeConnectionHops = []string{} + }, + false, + }, + { + "invalid counterparty upgrade", + func() { + msg.CounterpartyProposedUpgrade.Timeout.Height = clienttypes.ZeroHeight() + msg.CounterpartyProposedUpgrade.Timeout.Timestamp = 0 + }, + false, + }, { "timeout height is zero && timeout timestamp is zero", func() { From 405c3f0870c51c5b199f6f3681079228022666cd Mon Sep 17 00:00:00 2001 From: Charly Date: Thu, 27 Apr 2023 16:26:07 +0200 Subject: [PATCH 08/35] add util function for HasPassed, tests for UpgradeTimeout --- .../core/04-channel/keeper/upgrade_test.go | 2 + modules/core/04-channel/types/upgrade.go | 21 +++++ modules/core/04-channel/types/upgrade_test.go | 83 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 modules/core/04-channel/types/upgrade_test.go diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index ca0e1b63b0f..9ef55f3379a 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -130,3 +130,5 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { }) } } + +// TODO: add test for UpgradeTimeout.HasPassed() in this test suite diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index a9f44483e6c..9e214ed2629 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -2,9 +2,11 @@ package types import ( "strings" + "time" errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/internal/collections" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" ) @@ -69,3 +71,22 @@ func (uf UpgradeFields) ValidateBasic() error { func (ut UpgradeTimeout) IsValid() bool { return !ut.Height.IsZero() || ut.Timestamp != 0 } + +// HasPassed returns true if the upgrade has passed the timeout height or timestamp +func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, error) { + if !ut.IsValid() { + return true, errorsmod.Wrap(ErrInvalidUpgrade, "upgrade timeout cannot be empty") + } + + selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height + if selfHeight.GTE(timeoutHeight) && timeoutHeight.GT(clienttypes.ZeroHeight()) { + return true, errorsmod.Wrapf(ErrInvalidUpgrade, "block height >= upgrade timeout height (%s >= %s)", selfHeight, timeoutHeight) + } + + selfTime, timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()), ut.Timestamp + if selfTime >= timeoutTimestamp && timeoutTimestamp > 0 { + return true, errorsmod.Wrapf(ErrInvalidUpgrade, "block timestamp >= upgrade timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(timeoutTimestamp))) + } + + return false, nil +} diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go new file mode 100644 index 00000000000..fe43692ec4d --- /dev/null +++ b/modules/core/04-channel/types/upgrade_test.go @@ -0,0 +1,83 @@ +package types_test + +import ( + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v7/testing/mock" +) + +func (suite *TypesTestSuite) TestUpgradeTimeout() { + var ( + upgrade *types.Upgrade + ) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() { + }, + true, + }, + { + "invalid ordering", + func() { + upgrade.Fields.Ordering = types.NONE + }, + false, + }, + { + "more than one connection hop", + func() { + upgrade.Fields.ConnectionHops = []string{"connection-0", "connection-1"} + }, + false, + }, + { + "empty version", + func() { + upgrade.Fields.Version = "" + }, + false, + }, + { + "invalid timeout", + func() { + upgrade.Timeout.Height = clienttypes.ZeroHeight() + upgrade.Timeout.Timestamp = 0 + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + upgrade = types.NewUpgrade( + types.NewUpgradeFields( + types.ORDERED, + []string{"connection-0"}, + mock.Version, + ), + types.NewUpgradeTimeout( + clienttypes.NewHeight(0, 100), + 0, + ), + 0, + ) + + tc.malleate() + + err := upgrade.ValidateBasic() + + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} From 9f43f1d3a073f0c381015c1d36862c5070e85e26 Mon Sep 17 00:00:00 2001 From: Charly Date: Thu, 27 Apr 2023 17:03:55 +0200 Subject: [PATCH 09/35] linter --- modules/core/04-channel/types/upgrade_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index fe43692ec4d..032c7a5363a 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -7,9 +7,7 @@ import ( ) func (suite *TypesTestSuite) TestUpgradeTimeout() { - var ( - upgrade *types.Upgrade - ) + var upgrade *types.Upgrade testCases := []struct { name string From 82ae892c0791b3906971eab3565593a24ea8da8c Mon Sep 17 00:00:00 2001 From: Charly Date: Thu, 27 Apr 2023 19:40:03 +0200 Subject: [PATCH 10/35] update pr comments --- .../controller/ibc_middleware.go | 4 ++-- .../27-interchain-accounts/host/ibc_module.go | 4 ++-- modules/apps/29-fee/ibc_middleware.go | 6 +++--- modules/apps/transfer/ibc_module.go | 4 ++-- modules/core/04-channel/keeper/upgrade.go | 16 ++++++++-------- modules/core/05-port/types/module.go | 4 ++-- modules/core/keeper/msg_server.go | 14 ++++---------- testing/mock/ibc_module.go | 4 ++-- 8 files changed, 25 insertions(+), 31 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index a11e88b3367..09df817987e 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -230,8 +230,8 @@ func (im IBCMiddleware) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Or return icatypes.Version, nil } -// OnUpgradeBlock implements the IBCModule interface -func (im IBCMiddleware) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { +// OnChanUpgradeTry implements the IBCModule interface +func (im IBCMiddleware) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index f9ae7400f7c..530e4f98320 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -154,8 +154,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } -// OnUpgradeBlock implements the IBCModule interface -func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { +// OnChanUpgradeTry implements the IBCModule interface +func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return icatypes.Version, nil } diff --git a/modules/apps/29-fee/ibc_middleware.go b/modules/apps/29-fee/ibc_middleware.go index 201f933f28c..0c5edb2efb0 100644 --- a/modules/apps/29-fee/ibc_middleware.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -325,9 +325,9 @@ func (im IBCMiddleware) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Or return im.app.OnChanUpgradeInit(ctx, order, connectionHops, portID, channelID, sequence, version, previousVersion) } -// OnUpgradeBlock implement s the IBCModule interface -func (im IBCMiddleware) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { - return im.app.OnUpgradeBlock(ctx, portID, channelID, order, connectionHops, counterpartyVersion) +// OnChanUpgradeTry implement s the IBCModule interface +func (im IBCMiddleware) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { + return im.app.OnChanUpgradeTry(ctx, portID, channelID, order, connectionHops, counterpartyVersion) } // OnChanUpgradeAck implements the IBCModule interface diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index 6149c96c023..7d76f01ee16 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -306,8 +306,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return types.Version, nil } -// OnUpgradeBlock implements the IBCModule interface -func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { +// OnChanUpgradeTry implements the IBCModule interface +func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return types.Version, nil } diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index c142563d8a0..776877bff94 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -57,26 +57,26 @@ func (k Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID strin emitChannelUpgradeInitEvent(ctx, portID, channelID, currentChannel, upgrade) } -// UpgradeBlock -func (k Keeper) UpgradeBlock( +// upgradeTry +func (k Keeper) ChanUpgradeTry( ctx sdk.Context, portID, channelID string, proposedConnectionHops []string, - proposedUpgradeTimeout types.UpgradeTimeout, + upgradeTimeout types.UpgradeTimeout, counterpartyProposedUpgrade types.Upgrade, counterpartyUpgradeSequence uint64, proofCounterpartyChannel, - proofUpgrade []byte, + proofCounterpartyUpgrade []byte, proofHeight clienttypes.Height, -) (types.Upgrade, types.Channel, error) { +) (types.Upgrade, error) { // TODO - return types.Upgrade{}, types.Channel{}, nil + return types.Upgrade{}, nil } -// WriteUpgradeBlockChannel writes a channel which has successfully passed the UpgradeBlock step. +// WriteUpgradeTryChannel writes a channel which has successfully passed the UpgradeTry step. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeBlockChannel( +func (k Keeper) WriteUpgradeTryChannel( ctx sdk.Context, portID, channelID string, proposedUpgrade types.Upgrade, diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index 059c7eabdf2..4b775ee1376 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -119,8 +119,8 @@ type UpgradableModule interface { version, previousVersion string, ) (string, error) - // OnUpgradeBlock - OnUpgradeBlock( + // OnChanUpgradeTry verifies the counterparty upgrade and sets the upgrade on TRY chain + OnChanUpgradeTry( ctx sdk.Context, portID, channelID string, order channeltypes.Order, diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 2891dadcb02..a23f496cc44 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -751,10 +751,6 @@ func (k Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgC // ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTry) (*channeltypes.MsgChannelUpgradeTryResponse, error) { - // cbs.OnUpgradeBlock() - - // k.ChannelKeeper.WriteUpgradeBlock() - ctx := sdk.UnwrapSDKContext(goCtx) module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) @@ -769,9 +765,8 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) } - // k.ChannelKeeper.UpgradeBlockStep() // TODO: this may be updated based on refactors to this step - proposedUpgrade, _, err := k.ChannelKeeper.UpgradeBlock( + proposedUpgrade, err := k.ChannelKeeper.ChanUpgradeTry( ctx, msg.PortId, msg.ChannelId, @@ -784,14 +779,14 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh msg.ProofHeight, ) if err != nil { - ctx.Logger().Error("channel upgrade try failed", "error", errorsmod.Wrap(err, "channel handshake upgrade try failed")) + ctx.Logger().Error("channel upgrade try failed", "error", err) return &channeltypes.MsgChannelUpgradeTryResponse{ Result: channeltypes.FAILURE, }, nil } - proposedVersion, err := cbs.OnUpgradeBlock( + proposedVersion, err := cbs.OnChanUpgradeTry( ctx, msg.PortId, msg.ChannelId, @@ -810,8 +805,7 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh // set version to return value of callback proposedUpgrade.Fields.Version = proposedVersion - // k.ChannelKeeper.WriteUpgradeBlock() - k.ChannelKeeper.WriteUpgradeBlockChannel( + k.ChannelKeeper.WriteUpgradeTryChannel( ctx, msg.PortId, msg.ChannelId, diff --git a/testing/mock/ibc_module.go b/testing/mock/ibc_module.go index c8486b32d61..b9be22d9ed1 100644 --- a/testing/mock/ibc_module.go +++ b/testing/mock/ibc_module.go @@ -167,8 +167,8 @@ func (im IBCModule) OnChanUpgradeInit(ctx sdk.Context, order channeltypes.Order, return Version, nil } -// OnUpgradeBlock mplements the IBCModule interface -func (im IBCModule) OnUpgradeBlock(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { +// OnChanUpgradeTry implements the IBCModule interface +func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, order channeltypes.Order, connectionHops []string, counterpartyVersion string) (string, error) { return Version, nil } From 83d1a83fc68d65a4b78e47c1f9467f900db01c83 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 3 May 2023 11:12:23 +0200 Subject: [PATCH 11/35] update unit test --- modules/core/04-channel/types/msgs_test.go | 17 ++++ modules/core/04-channel/types/upgrade.go | 2 +- modules/core/04-channel/types/upgrade_test.go | 81 +++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 0b9bc41605b..7782b4e2638 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -72,6 +72,12 @@ type TypesTestSuite struct { suite.Suite proof []byte + + coordinator *ibctesting.Coordinator + + // testing chains used for convenience and readability + chainA *ibctesting.TestChain + chainB *ibctesting.TestChain } func (suite *TypesTestSuite) SetupTest() { @@ -103,6 +109,17 @@ func (suite *TypesTestSuite) SetupTest() { suite.proof = proof } +// SetupTestCoordinator creates a coordinator with 2 test chains. +func (suite *TypesTestSuite) SetupTestCoordinator() { + suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) + suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) + // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) + suite.coordinator.CommitNBlocks(suite.chainA, 2) + suite.coordinator.CommitNBlocks(suite.chainB, 2) +} + + func TestTypesTestSuite(t *testing.T) { suite.Run(t, new(TypesTestSuite)) } diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 9e214ed2629..5710d54d2ef 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -75,7 +75,7 @@ func (ut UpgradeTimeout) IsValid() bool { // HasPassed returns true if the upgrade has passed the timeout height or timestamp func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, error) { if !ut.IsValid() { - return true, errorsmod.Wrap(ErrInvalidUpgrade, "upgrade timeout cannot be empty") + return true, errorsmod.Wrap(ErrInvalidUpgradeTimeout, "upgrade timeout cannot be empty") } selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 032c7a5363a..1ba3be77794 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -1,8 +1,11 @@ package types_test import ( + "fmt" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/mock" ) @@ -79,3 +82,81 @@ func (suite *TypesTestSuite) TestUpgradeTimeout() { }) } } + +func (suite *TypesTestSuite) TestHasPassed() { + var ( + path *ibctesting.Path + upgrade *types.Upgrade + proposedConnectionHops []string + ) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success: timeout has not passed", + func() {}, + true, + }, + { + "fail: timeout height has passed", + func() { + upgrade.Timeout.Height = clienttypes.NewHeight( + clienttypes.ParseChainID(path.EndpointA.Chain.GetContext().ChainID()), + uint64(suite.chainA.GetContext().BlockHeight())-1, + ) + }, + false, + }, + { + "fail: timeout timestamp has passed", + func() { + upgrade.Timeout.Height = clienttypes.ZeroHeight() + upgrade.Timeout.Timestamp = uint64(suite.chainA.GetContext().BlockTime().UnixNano() - 1) + }, + false, + }, + { + "fail: invalid upgrade timeout", + func() { + upgrade.Timeout.Height = clienttypes.ZeroHeight() + upgrade.Timeout.Timestamp = 0 + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTestCoordinator() + + path = ibctesting.NewPath(suite.chainA, suite.chainB) + suite.coordinator.Setup(path) + + proposedConnectionHops = []string{path.EndpointB.ConnectionID} + + upgrade = types.NewUpgrade( + types.NewUpgradeFields( + types.UNORDERED, proposedConnectionHops, fmt.Sprintf("%s-v2", mock.Version), + ), + types.NewUpgradeTimeout(path.EndpointA.Chain.GetTimeoutHeight(), 0), + 0, + ) + + tc.malleate() + + passed, err := upgrade.Timeout.HasPassed(suite.chainA.GetContext()) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().False(passed) + } else { + suite.Require().Error(err) + suite.Require().True(passed) + } + }) + } +} From 55dc5b4b7dc7afe4ee734e149a5c7ef7ae899928 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 3 May 2023 11:13:58 +0200 Subject: [PATCH 12/35] lint --- modules/core/04-channel/keeper/upgrade_test.go | 2 -- modules/core/04-channel/types/msgs_test.go | 1 - 2 files changed, 3 deletions(-) diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index 9ef55f3379a..ca0e1b63b0f 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -130,5 +130,3 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { }) } } - -// TODO: add test for UpgradeTimeout.HasPassed() in this test suite diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 7782b4e2638..3ecd711ce2e 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -119,7 +119,6 @@ func (suite *TypesTestSuite) SetupTestCoordinator() { suite.coordinator.CommitNBlocks(suite.chainB, 2) } - func TestTypesTestSuite(t *testing.T) { suite.Run(t, new(TypesTestSuite)) } From db18c44922176ef4eb6049706c391976324260c3 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 3 May 2023 12:27:56 +0200 Subject: [PATCH 13/35] update func api --- modules/core/04-channel/types/upgrade.go | 12 +++++++----- modules/core/04-channel/types/upgrade_test.go | 5 ++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 5710d54d2ef..aa645cf06fa 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -1,6 +1,7 @@ package types import ( + "fmt" "strings" "time" @@ -73,20 +74,21 @@ func (ut UpgradeTimeout) IsValid() bool { } // HasPassed returns true if the upgrade has passed the timeout height or timestamp -func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, error) { +func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, string) { if !ut.IsValid() { - return true, errorsmod.Wrap(ErrInvalidUpgradeTimeout, "upgrade timeout cannot be empty") + return true, "upgrade timeout cannot be empty" } selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height if selfHeight.GTE(timeoutHeight) && timeoutHeight.GT(clienttypes.ZeroHeight()) { - return true, errorsmod.Wrapf(ErrInvalidUpgrade, "block height >= upgrade timeout height (%s >= %s)", selfHeight, timeoutHeight) + + return true, fmt.Sprintf("block height >= upgrade timeout height (%s >= %s)", selfHeight, timeoutHeight) } selfTime, timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()), ut.Timestamp if selfTime >= timeoutTimestamp && timeoutTimestamp > 0 { - return true, errorsmod.Wrapf(ErrInvalidUpgrade, "block timestamp >= upgrade timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(timeoutTimestamp))) + return true, fmt.Sprintf("block timestamp >= upgrade timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(timeoutTimestamp))) } - return false, nil + return false, "" } diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 1ba3be77794..d8ca685a4bb 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -148,13 +148,12 @@ func (suite *TypesTestSuite) TestHasPassed() { tc.malleate() - passed, err := upgrade.Timeout.HasPassed(suite.chainA.GetContext()) + passed, info := upgrade.Timeout.HasPassed(suite.chainA.GetContext()) if tc.expPass { - suite.Require().NoError(err) suite.Require().False(passed) + suite.Require().Equal("", info) } else { - suite.Require().Error(err) suite.Require().True(passed) } }) From 76ca1fe66f6179242e01eb3e7dc0ada67458e0ee Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 3 May 2023 12:38:35 +0200 Subject: [PATCH 14/35] lint --- modules/core/04-channel/types/upgrade.go | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index aa645cf06fa..9f7558bdb12 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -81,7 +81,6 @@ func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, string) { selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height if selfHeight.GTE(timeoutHeight) && timeoutHeight.GT(clienttypes.ZeroHeight()) { - return true, fmt.Sprintf("block height >= upgrade timeout height (%s >= %s)", selfHeight, timeoutHeight) } From 0f7fe20d36284f51b725062488bd663d63ce481e Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 3 May 2023 19:54:29 +0200 Subject: [PATCH 15/35] pr review --- modules/core/04-channel/types/msgs_test.go | 3 - modules/core/04-channel/types/upgrade.go | 28 ++++++---- modules/core/04-channel/types/upgrade_test.go | 56 +++++++------------ 3 files changed, 39 insertions(+), 48 deletions(-) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 3ecd711ce2e..80d9ab9618b 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -114,9 +114,6 @@ func (suite *TypesTestSuite) SetupTestCoordinator() { suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) - // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) - suite.coordinator.CommitNBlocks(suite.chainA, 2) - suite.coordinator.CommitNBlocks(suite.chainB, 2) } func TestTypesTestSuite(t *testing.T) { diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 9f7558bdb12..970c0dd3935 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -3,7 +3,6 @@ package types import ( "fmt" "strings" - "time" errorsmod "cosmossdk.io/errors" @@ -73,21 +72,30 @@ func (ut UpgradeTimeout) IsValid() bool { return !ut.Height.IsZero() || ut.Timestamp != 0 } -// HasPassed returns true if the upgrade has passed the timeout height or timestamp +// HasPassed returns true if the upgrade has passed the timeout height or timestamp. +// A string is returned containing information about the timeout relative to the context's time and height. func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, string) { - if !ut.IsValid() { - return true, "upgrade timeout cannot be empty" - } + var ( + hasPassed bool + info string + ) + + hasPassed = false + info = "upgrade timeout has not passed" selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height - if selfHeight.GTE(timeoutHeight) && timeoutHeight.GT(clienttypes.ZeroHeight()) { - return true, fmt.Sprintf("block height >= upgrade timeout height (%s >= %s)", selfHeight, timeoutHeight) + if !timeoutHeight.IsZero() { + if hasPassed = selfHeight.GTE(timeoutHeight); hasPassed { + info = fmt.Sprintf("upgrade timeout has passed at block height %s, timeout height %s", selfHeight, timeoutHeight) + } } selfTime, timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()), ut.Timestamp - if selfTime >= timeoutTimestamp && timeoutTimestamp > 0 { - return true, fmt.Sprintf("block timestamp >= upgrade timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(timeoutTimestamp))) + if timeoutTimestamp != 0 { + if hasPassed = selfTime >= timeoutTimestamp; hasPassed { + info = fmt.Sprintf("upgrade timeout has passed at block timestamp %d, timeout timestamp %d", selfTime, timeoutTimestamp) + } } - return false, "" + return hasPassed, info } diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index d8ca685a4bb..60d2b0e9b4e 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -1,8 +1,6 @@ package types_test import ( - "fmt" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" @@ -85,9 +83,9 @@ func (suite *TypesTestSuite) TestUpgradeTimeout() { func (suite *TypesTestSuite) TestHasPassed() { var ( - path *ibctesting.Path - upgrade *types.Upgrade - proposedConnectionHops []string + path *ibctesting.Path + upgradeTimeout types.UpgradeTimeout + passInfo string ) testCases := []struct { @@ -96,35 +94,29 @@ func (suite *TypesTestSuite) TestHasPassed() { expPass bool }{ { - "success: timeout has not passed", + "timeout has not passed", func() {}, - true, + false, }, { - "fail: timeout height has passed", + "timeout height has passed", func() { - upgrade.Timeout.Height = clienttypes.NewHeight( + upgradeTimeout.Height = clienttypes.NewHeight( clienttypes.ParseChainID(path.EndpointA.Chain.GetContext().ChainID()), uint64(suite.chainA.GetContext().BlockHeight())-1, ) + passInfo = "upgrade timeout has passed at block height 1-17, timeout height 1-16" }, - false, - }, - { - "fail: timeout timestamp has passed", - func() { - upgrade.Timeout.Height = clienttypes.ZeroHeight() - upgrade.Timeout.Timestamp = uint64(suite.chainA.GetContext().BlockTime().UnixNano() - 1) - }, - false, + true, }, { - "fail: invalid upgrade timeout", + "timeout timestamp has passed", func() { - upgrade.Timeout.Height = clienttypes.ZeroHeight() - upgrade.Timeout.Timestamp = 0 + upgradeTimeout.Height = clienttypes.ZeroHeight() + upgradeTimeout.Timestamp = uint64(suite.chainA.GetContext().BlockTime().UnixNano() - 1) + passInfo = "upgrade timeout has passed at block timestamp 1577923350000000000, timeout timestamp 1577923349999999999" }, - false, + true, }, } @@ -136,25 +128,19 @@ func (suite *TypesTestSuite) TestHasPassed() { path = ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.Setup(path) - proposedConnectionHops = []string{path.EndpointB.ConnectionID} - - upgrade = types.NewUpgrade( - types.NewUpgradeFields( - types.UNORDERED, proposedConnectionHops, fmt.Sprintf("%s-v2", mock.Version), - ), - types.NewUpgradeTimeout(path.EndpointA.Chain.GetTimeoutHeight(), 0), - 0, - ) + upgradeTimeout = types.NewUpgradeTimeout(path.EndpointA.Chain.GetTimeoutHeight(), 0) tc.malleate() - passed, info := upgrade.Timeout.HasPassed(suite.chainA.GetContext()) + passed, info := upgradeTimeout.HasPassed(suite.chainA.GetContext()) if tc.expPass { - suite.Require().False(passed) - suite.Require().Equal("", info) - } else { suite.Require().True(passed) + suite.Require().Equal(passInfo, info) + + } else { + suite.Require().False(passed) + suite.Require().Equal("upgrade timeout has not passed", info) } }) } From 9e6afb15e0b5a3bd977b065ab46fac796f365af4 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 09:59:27 +0200 Subject: [PATCH 16/35] add timeout methods --- modules/core/04-channel/types/upgrade.go | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 970c0dd3935..9ad5884f675 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -67,35 +67,35 @@ func (uf UpgradeFields) ValidateBasic() error { return nil } -// IsValid returns true if either the height or timestamp is non-zero -func (ut UpgradeTimeout) IsValid() bool { - return !ut.Height.IsZero() || ut.Timestamp != 0 +// Timeout defines an exeuction deadline structure for 04-channel msg handlers. +// This includes packet lifecycle handlers as well as handshake and upgrade protocol handlers. +// A valid Timeout contains either one or both of a timestamp and block height (sequence). +type Timeout struct { + Height clienttypes.Height + Timestamp uint64 } -// HasPassed returns true if the upgrade has passed the timeout height or timestamp. -// A string is returned containing information about the timeout relative to the context's time and height. -func (ut UpgradeTimeout) HasPassed(ctx sdk.Context) (bool, string) { - var ( - hasPassed bool - info string - ) - - hasPassed = false - info = "upgrade timeout has not passed" - - selfHeight, timeoutHeight := clienttypes.GetSelfHeight(ctx), ut.Height - if !timeoutHeight.IsZero() { - if hasPassed = selfHeight.GTE(timeoutHeight); hasPassed { - info = fmt.Sprintf("upgrade timeout has passed at block height %s, timeout height %s", selfHeight, timeoutHeight) - } - } +// AfterHeight returns true if Timeout height is greater than the provided height. +func (t Timeout) AfterHeight(height clienttypes.Height) bool { + return t.Height.GT(height) +} - selfTime, timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()), ut.Timestamp - if timeoutTimestamp != 0 { - if hasPassed = selfTime >= timeoutTimestamp; hasPassed { - info = fmt.Sprintf("upgrade timeout has passed at block timestamp %d, timeout timestamp %d", selfTime, timeoutTimestamp) - } - } +// AfterTimestamp returns true is Timeout timestamp is greater than the provided timestamp. +func (t Timeout) AfterTimestamp(timestamp uint64) bool { + return t.Timestamp > timestamp +} - return hasPassed, info +// IsValid validates the Timeout. It ensures that either height or timestamp is set. +func (t Timeout) IsValid() bool { + return !t.ZeroHeight() || !t.ZeroTimestamp() } + +// ZeroHeight returns true if Timeout height is zero, otherwise false. +func (t Timeout) ZeroHeight() bool { + return t.Height.IsZero() +} + +// ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. +func (t Timeout) ZeroTimestamp() bool { + return t.Timestamp == 0 +} \ No newline at end of file From 81f3330226ca0dfbfbdc2e1e0d09fd026491aa31 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 10:17:36 +0200 Subject: [PATCH 17/35] rename upgrade timeout --- modules/core/04-channel/keeper/upgrade.go | 6 +- modules/core/04-channel/types/channel.pb.go | 314 ++++++++++++++++---- modules/core/04-channel/types/msgs.go | 4 +- modules/core/04-channel/types/tx.pb.go | 249 ++++++++-------- modules/core/04-channel/types/upgrade.go | 8 +- modules/core/04-channel/types/upgrade.pb.go | 280 ++--------------- proto/ibc/core/channel/v1/channel.proto | 9 + proto/ibc/core/channel/v1/tx.proto | 12 +- proto/ibc/core/channel/v1/upgrade.proto | 16 +- 9 files changed, 447 insertions(+), 451 deletions(-) diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index 776877bff94..f51d158626e 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -16,7 +16,7 @@ func (k Keeper) ChanUpgradeInit( portID string, channelID string, upgradeFields types.UpgradeFields, - upgradeTimeout types.UpgradeTimeout, + upgradeTimeout types.Timeout, ) (types.Upgrade, error) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { @@ -63,7 +63,7 @@ func (k Keeper) ChanUpgradeTry( portID, channelID string, proposedConnectionHops []string, - upgradeTimeout types.UpgradeTimeout, + upgradeTimeout types.Timeout, counterpartyProposedUpgrade types.Upgrade, counterpartyUpgradeSequence uint64, proofCounterpartyChannel, @@ -86,7 +86,7 @@ func (k Keeper) WriteUpgradeTryChannel( } // constructProposedUpgrade returns the proposed upgrade from the provided arguments. -func (k Keeper) constructProposedUpgrade(ctx sdk.Context, portID, channelID string, fields types.UpgradeFields, timeout types.UpgradeTimeout) (types.Upgrade, error) { +func (k Keeper) constructProposedUpgrade(ctx sdk.Context, portID, channelID string, fields types.UpgradeFields, timeout types.Timeout) (types.Upgrade, error) { seq, found := k.GetNextSequenceSend(ctx, portID, channelID) if !found { return types.Upgrade{}, types.ErrSequenceSendNotFound diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index e0bd66f9847..252df36476d 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -499,6 +499,62 @@ func (*Acknowledgement) XXX_OneofWrappers() []interface{} { } } +// Timeout defines a type which encapsulates the timeout values at which the counterparty +// must no longer proceed either a handshake or an upgrade. +type Timeout struct { + // block height after which the upgrade times out + Height types.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` + // block timestamp (in nanoseconds) after which the upgrade times out + Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *Timeout) Reset() { *m = Timeout{} } +func (m *Timeout) String() string { return proto.CompactTextString(m) } +func (*Timeout) ProtoMessage() {} +func (*Timeout) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{7} +} +func (m *Timeout) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timeout.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 *Timeout) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timeout.Merge(m, src) +} +func (m *Timeout) XXX_Size() int { + return m.Size() +} +func (m *Timeout) XXX_DiscardUnknown() { + xxx_messageInfo_Timeout.DiscardUnknown(m) +} + +var xxx_messageInfo_Timeout proto.InternalMessageInfo + +func (m *Timeout) GetHeight() types.Height { + if m != nil { + return m.Height + } + return types.Height{} +} + +func (m *Timeout) GetTimestamp() uint64 { + if m != nil { + return m.Timestamp + } + return 0 +} + func init() { proto.RegisterEnum("ibc.core.channel.v1.State", State_name, State_value) proto.RegisterEnum("ibc.core.channel.v1.Order", Order_name, Order_value) @@ -509,67 +565,70 @@ func init() { proto.RegisterType((*PacketState)(nil), "ibc.core.channel.v1.PacketState") proto.RegisterType((*PacketId)(nil), "ibc.core.channel.v1.PacketId") proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") + proto.RegisterType((*Timeout)(nil), "ibc.core.channel.v1.Timeout") } func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 872 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0xb7, 0xb3, 0xce, 0xbf, 0x97, 0x4d, 0xe2, 0x9d, 0xc2, 0x62, 0x59, 0x90, 0xb8, 0xab, 0x02, - 0x69, 0x51, 0xe3, 0x6e, 0x41, 0x20, 0xb8, 0xed, 0x6e, 0x4c, 0xd7, 0x62, 0x95, 0x44, 0x4e, 0xf6, - 0x40, 0x2f, 0x91, 0x63, 0x0f, 0x89, 0xd5, 0xc4, 0x63, 0xec, 0x49, 0xaa, 0x8a, 0x33, 0x52, 0x95, - 0x13, 0x5f, 0x20, 0x12, 0x12, 0x5f, 0x81, 0x0f, 0x51, 0x89, 0x4b, 0x8f, 0x3d, 0x21, 0xb4, 0xfb, - 0x45, 0x90, 0x67, 0xc6, 0x49, 0xb6, 0x5a, 0xf5, 0x80, 0xc4, 0xad, 0x27, 0xcf, 0xfb, 0xbd, 0xdf, - 0xfb, 0xbd, 0x99, 0xdf, 0xb3, 0x3d, 0x70, 0x37, 0x18, 0x7b, 0xa6, 0x47, 0x62, 0x6c, 0x7a, 0x53, - 0x37, 0x0c, 0xf1, 0xcc, 0x5c, 0x1e, 0x67, 0xcb, 0x76, 0x14, 0x13, 0x4a, 0xd0, 0x9d, 0x60, 0xec, - 0xb5, 0x53,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39, 0x38, 0xb0, 0x7d, 0x1c, 0xd2, 0xe0, 0xa7, - 0x00, 0xfb, 0xef, 0x0d, 0xfc, 0x08, 0x8a, 0x11, 0x89, 0xe9, 0x28, 0xf0, 0x99, 0x6f, 0x65, 0xa7, - 0x90, 0x86, 0xb6, 0x8f, 0x3e, 0x01, 0x10, 0x5b, 0x49, 0x73, 0x45, 0x96, 0x2b, 0x0b, 0xc4, 0xf6, - 0x85, 0x9b, 0x17, 0xb0, 0xbf, 0xbb, 0xc9, 0x5d, 0x35, 0xf9, 0x1d, 0x6a, 0xb9, 0xdb, 0xd5, 0xde, + // 898 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x26, 0x65, 0xea, 0x6f, 0x64, 0x49, 0xf4, 0xa6, 0x4d, 0x09, 0x22, 0x95, 0x18, 0x23, 0x6d, + 0x95, 0x14, 0x11, 0xe3, 0xb4, 0xe8, 0xdf, 0xcd, 0xb6, 0xd8, 0x98, 0xa8, 0x21, 0x09, 0x94, 0x7c, + 0x68, 0x2e, 0x02, 0x45, 0x6e, 0x25, 0x22, 0x12, 0x97, 0x25, 0x57, 0x0a, 0x82, 0x9e, 0x0b, 0x04, + 0x3a, 0xf5, 0x05, 0x04, 0x14, 0xe8, 0x2b, 0xf4, 0x21, 0x02, 0xf4, 0x92, 0x63, 0x4e, 0x45, 0x61, + 0xbf, 0x48, 0xc1, 0xdd, 0xa5, 0x24, 0x07, 0x46, 0x50, 0x14, 0xe8, 0xad, 0x27, 0xee, 0x7c, 0xf3, + 0xcd, 0x37, 0xbb, 0xdf, 0x90, 0x5c, 0xb8, 0x1b, 0x8c, 0x3d, 0xd3, 0x23, 0x31, 0x36, 0xbd, 0xa9, + 0x1b, 0x86, 0x78, 0x66, 0x2e, 0x8f, 0xb2, 0x65, 0x3b, 0x8a, 0x09, 0x25, 0xe8, 0x56, 0x30, 0xf6, + 0xda, 0x29, 0xa5, 0x9d, 0xe1, 0xcb, 0x23, 0xfd, 0xbd, 0x09, 0x99, 0x10, 0x96, 0x37, 0xd3, 0x15, + 0xa7, 0xea, 0xcd, 0xad, 0xda, 0x2c, 0xc0, 0x21, 0x65, 0x62, 0x6c, 0xc5, 0x09, 0x87, 0xbf, 0xe7, + 0xa0, 0x78, 0xca, 0x55, 0xd0, 0x23, 0xc8, 0x27, 0xd4, 0xa5, 0x58, 0x93, 0x0d, 0xb9, 0x55, 0x7b, + 0xac, 0xb7, 0x6f, 0xe8, 0xd3, 0x1e, 0xa4, 0x0c, 0x87, 0x13, 0xd1, 0x17, 0x50, 0x22, 0xb1, 0x8f, + 0xe3, 0x20, 0x9c, 0x68, 0xb9, 0x77, 0x14, 0xf5, 0x52, 0x92, 0xb3, 0xe1, 0xa2, 0xef, 0x60, 0xdf, + 0x23, 0x8b, 0x90, 0xe2, 0x38, 0x72, 0x63, 0xfa, 0x42, 0xdb, 0x33, 0xe4, 0x56, 0xe5, 0xf1, 0xdd, + 0x1b, 0x6b, 0x4f, 0x77, 0x88, 0x27, 0xca, 0xab, 0x3f, 0x9b, 0x92, 0x73, 0xad, 0x18, 0x7d, 0x02, + 0x75, 0x8f, 0x84, 0x21, 0xf6, 0x68, 0x40, 0xc2, 0xd1, 0x94, 0x44, 0x89, 0xa6, 0x18, 0x7b, 0xad, + 0xb2, 0x53, 0xdb, 0xc2, 0x67, 0x24, 0x4a, 0x90, 0x06, 0xc5, 0x25, 0x8e, 0x93, 0x80, 0x84, 0x5a, + 0xde, 0x90, 0x5b, 0x65, 0x27, 0x0b, 0xd1, 0x7d, 0x50, 0x17, 0xd1, 0x24, 0x76, 0x7d, 0x3c, 0x4a, + 0xf0, 0x8f, 0x0b, 0x1c, 0x7a, 0x58, 0x2b, 0x18, 0x72, 0x4b, 0x71, 0xea, 0x02, 0x1f, 0x08, 0xf8, + 0x1b, 0xe5, 0xe5, 0xaf, 0x4d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, 0x65, 0xbd, 0xba, 0x5a, 0x1b, 0xe5, + 0x0d, 0x90, 0x1e, 0x9f, 0x73, 0x32, 0x86, 0x38, 0xbe, 0x08, 0x79, 0xe3, 0x93, 0xc1, 0xab, 0xcb, + 0x86, 0xfc, 0xfa, 0xb2, 0x21, 0xff, 0x75, 0xd9, 0x90, 0x7f, 0xb9, 0x6a, 0x48, 0xaf, 0xaf, 0x1a, + 0xd2, 0x9b, 0xab, 0x86, 0xf4, 0xf4, 0xeb, 0x49, 0x40, 0xa7, 0x8b, 0x71, 0xdb, 0x23, 0x73, 0xd3, + 0x23, 0xc9, 0x9c, 0x24, 0x66, 0x30, 0xf6, 0x1e, 0x4e, 0x88, 0xb9, 0xfc, 0xd2, 0x9c, 0x13, 0x7f, + 0x31, 0xc3, 0x09, 0xbf, 0xa0, 0x1f, 0x7d, 0xfe, 0x30, 0xbb, 0xf1, 0xe9, 0x8b, 0x08, 0x27, 0xe3, + 0x02, 0xbb, 0xa1, 0x3f, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xb0, 0x25, 0x8f, 0x12, 0x08, + 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -981,6 +1040,44 @@ func (m *Acknowledgement_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xb2 return len(dAtA) - i, nil } +func (m *Timeout) 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 *Timeout) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i = encodeVarintChannel(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintChannel(dAtA []byte, offset int, v uint64) int { offset -= sovChannel(v) base := offset @@ -1189,6 +1286,19 @@ func (m *Acknowledgement_Error) Size() (n int) { n += 2 + l + sovChannel(uint64(l)) return n } +func (m *Timeout) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Height.Size() + n += 1 + l + sovChannel(uint64(l)) + if m.Timestamp != 0 { + n += 1 + sovChannel(uint64(m.Timestamp)) + } + return n +} func sovChannel(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -2461,6 +2571,108 @@ func (m *Acknowledgement) Unmarshal(dAtA []byte) error { } return nil } +func (m *Timeout) 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 ErrIntOverflowChannel + } + 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: Timeout: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timeout: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChannel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipChannel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthChannel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipChannel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index 68b747f5a5f..f74babd0ec6 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -485,7 +485,7 @@ var _ sdk.Msg = &MsgChannelUpgradeInit{} func NewMsgChannelUpgradeInit( portID, channelID string, upgradeFields UpgradeFields, - upgradeTimeout UpgradeTimeout, + upgradeTimeout Timeout, signer string, ) *MsgChannelUpgradeInit { return &MsgChannelUpgradeInit{ @@ -536,7 +536,7 @@ func NewMsgChannelUpgradeTry( portID, channelID string, proposedConnectionHops []string, - upgradeTimeout UpgradeTimeout, + upgradeTimeout Timeout, counterpartyProposedUpgrade Upgrade, counterpartyUpgradeSequence uint64, proofChannel []byte, diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index 811658f2fe8..ce6bcd2eb0c 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -904,11 +904,11 @@ var xxx_messageInfo_MsgAcknowledgementResponse proto.InternalMessageInfo // MsgChannelUpgradeInit defines the request type for the ChannelUpgradeInit rpc type MsgChannelUpgradeInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - Fields UpgradeFields `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields"` - Timeout UpgradeTimeout `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + Fields UpgradeFields `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields"` + Timeout Timeout `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelUpgradeInit) Reset() { *m = MsgChannelUpgradeInit{} } @@ -1007,16 +1007,16 @@ func (m *MsgChannelUpgradeInitResponse) GetUpgradeSequence() uint64 { // MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc type MsgChannelUpgradeTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` - UpgradeTimeout UpgradeTimeout `protobuf:"bytes,4,opt,name=upgrade_timeout,json=upgradeTimeout,proto3" json:"upgrade_timeout"` - CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` - CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` - ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` - ProofUpgrade []byte `protobuf:"bytes,8,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty"` - ProofHeight types.Height `protobuf:"bytes,9,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` - Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` + UpgradeTimeout Timeout `protobuf:"bytes,4,opt,name=upgrade_timeout,json=upgradeTimeout,proto3" json:"upgrade_timeout"` + CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` + CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` + ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` + ProofUpgrade []byte `protobuf:"bytes,8,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty"` + ProofHeight types.Height `protobuf:"bytes,9,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelUpgradeTry) Reset() { *m = MsgChannelUpgradeTry{} } @@ -1477,115 +1477,116 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xbf, 0x6f, 0xdb, 0xc6, - 0x17, 0x17, 0x25, 0x59, 0xb2, 0x9f, 0x1d, 0xff, 0xa0, 0x9d, 0x44, 0xa1, 0x6d, 0x49, 0x51, 0x80, - 0xc4, 0xc9, 0x37, 0x96, 0x62, 0x27, 0xf9, 0x16, 0x09, 0x02, 0xb4, 0xb6, 0xaa, 0x34, 0x06, 0xe2, - 0xd8, 0xa0, 0xac, 0x02, 0xfd, 0x29, 0xc8, 0xd4, 0x59, 0x26, 0x24, 0xf1, 0x18, 0x92, 0x52, 0xe2, - 0x02, 0x1d, 0x3a, 0x14, 0x0d, 0x02, 0x14, 0xe8, 0x58, 0xa0, 0x08, 0x10, 0xa0, 0x43, 0xc7, 0x6e, - 0x1d, 0x3a, 0x77, 0xc8, 0x18, 0xa0, 0x40, 0x9b, 0xa1, 0x28, 0x8a, 0x64, 0x68, 0xff, 0x84, 0x8e, - 0x05, 0x8f, 0x47, 0x8a, 0xa4, 0x48, 0x89, 0xb2, 0x5c, 0xa7, 0x1b, 0x79, 0xf7, 0xb9, 0xf7, 0xeb, - 0xf3, 0xee, 0xf1, 0xde, 0x11, 0x16, 0xc4, 0x5d, 0x21, 0x27, 0x60, 0x05, 0xe5, 0x84, 0xfd, 0x8a, - 0x24, 0xa1, 0x46, 0xae, 0xbd, 0x92, 0xd3, 0x1e, 0x66, 0x65, 0x05, 0x6b, 0x98, 0x9d, 0x15, 0x77, - 0x85, 0xac, 0x3e, 0x9b, 0xa5,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a, 0xd9, 0xa6, 0x90, 0x08, 0x5d, - 0x0f, 0x27, 0x18, 0x7e, 0xc6, 0x9c, 0xce, 0x5b, 0xca, 0x6d, 0x91, 0x89, 0x0c, 0x1e, 0x99, 0x15, - 0x98, 0x13, 0x70, 0x4b, 0xd2, 0x90, 0x22, 0x57, 0x14, 0xed, 0xa0, 0x6c, 0xfa, 0x11, 0x25, 0x76, - 0xcd, 0xda, 0xe7, 0xde, 0x35, 0xa6, 0xf4, 0x60, 0xc8, 0x0a, 0xc6, 0x7b, 0x65, 0x51, 0x12, 0xb5, - 0xc4, 0x48, 0x9a, 0x59, 0x9a, 0xe0, 0xc7, 0xc8, 0x08, 0xa1, 0x30, 0x0f, 0x13, 0xc6, 0xf4, 0x3e, - 0x12, 0x6b, 0xfb, 0x5a, 0x22, 0x46, 0x8c, 0xe2, 0x6c, 0x46, 0x19, 0xd9, 0xd4, 0x5e, 0xc9, 0xde, - 0x21, 0x08, 0x6a, 0xd2, 0x38, 0x59, 0x65, 0x0c, 0xd9, 0x08, 0x8b, 0xfb, 0x10, 0xb6, 0x03, 0x67, - 0xba, 0x02, 0x6b, 0xf1, 0x65, 0x23, 0x84, 0x71, 0x10, 0xe2, 0x62, 0x32, 0xec, 0x62, 0x32, 0xf3, - 0x63, 0x17, 0x5f, 0x6b, 0x42, 0xdd, 0x9f, 0xaf, 0xde, 0xd2, 0xd8, 0xff, 0xc3, 0x69, 0x47, 0x70, - 0x6d, 0x58, 0x23, 0x0f, 0x4f, 0xda, 0xa7, 0x3b, 0x94, 0x1e, 0x82, 0x94, 0x79, 0x30, 0x28, 0x28, - 0x6b, 0xca, 0x01, 0xe5, 0x64, 0x94, 0x0c, 0xe8, 0xf9, 0x76, 0x4c, 0x94, 0xcc, 0xbb, 0x29, 0x59, - 0x13, 0xea, 0x26, 0x25, 0x99, 0x9f, 0x19, 0x38, 0xe9, 0x9c, 0xcd, 0x63, 0x69, 0x4f, 0x54, 0x9a, - 0x87, 0x8e, 0xae, 0xe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0x10, 0xdc, 0x5f, 0xbd, 0xb9, 0x29, 0x02, 0xaa, 0x37, 0xb7, 0xc8, 0xf5, - 0x81, 0xe0, 0x96, 0xfa, 0x4f, 0x60, 0xce, 0xf3, 0xf8, 0x72, 0x39, 0xa0, 0x37, 0x04, 0xcd, 0x5d, - 0x1b, 0x04, 0x6d, 0xea, 0x5e, 0x2f, 0x3e, 0x7b, 0x99, 0x64, 0x9e, 0xbf, 0x4c, 0x32, 0x7f, 0xbc, - 0x4c, 0x32, 0x5f, 0xbd, 0x4a, 0x86, 0x9e, 0xbf, 0x4a, 0x86, 0x5e, 0xbc, 0x4a, 0x86, 0xde, 0xbf, - 0x51, 0x13, 0xb5, 0xfd, 0xd6, 0x6e, 0x56, 0xc0, 0xcd, 0x9c, 0x80, 0xd5, 0x26, 0x56, 0x73, 0xe2, - 0xae, 0xb0, 0x5c, 0xc3, 0xb9, 0xf6, 0x1b, 0xb9, 0x26, 0xae, 0xb6, 0x1a, 0x48, 0x35, 0xfe, 0xba, - 0x5f, 0xb9, 0xb6, 0x6c, 0xfe, 0x78, 0xd7, 0x0e, 0x64, 0xa4, 0xee, 0xc6, 0xc8, 0x4f, 0xf7, 0xab, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x52, 0x8e, 0xa5, 0x54, 0x26, 0x20, 0x00, 0x00, + // 1729 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6b, 0x1b, 0x47, + 0x1b, 0xd7, 0x4a, 0xb2, 0x64, 0x3f, 0x76, 0xfc, 0xb1, 0x76, 0x12, 0x45, 0xb6, 0x25, 0x45, 0x2f, + 0x24, 0x4e, 0xde, 0x58, 0x8a, 0x9d, 0xe4, 0x7d, 0x49, 0x08, 0xb4, 0xb6, 0xaa, 0x34, 0xa6, 0x71, + 0x6c, 0x56, 0x56, 0xa1, 0x9f, 0xc2, 0x5e, 0x8d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73, + 0x39, 0x0f, 0x9f, 0x72, 0x54, 0xde, 0x6a, 0xf4, 0xe9, 0x6f, 0xe9, 0x90, 0xc0, 0x96, 0xf0, 0xa7, + 0x20, 0xa6, 0x49, 0x35, 0x19, 0xa9, 0x89, 0x88, 0x29, 0xd5, 0xfc, 0xba, 0x31, 0xfc, 0xf0, 0x49, + 0x3a, 0xf4, 0xe7, 0x93, 0x74, 0x28, 0x5b, 0x86, 0x64, 0xb7, 0x39, 0x02, 0xd2, 0x14, 0x2c, 0x6b, + 0x88, 0x9f, 0x07, 0xa0, 0xa2, 0x3a, 0x96, 0x8d, 0xd0, 0x91, 0xb5, 0x2a, 0x9f, 0x80, 0x78, 0x1b, + 0xa9, 0x9a, 0x84, 0x65, 0x62, 0xdc, 0x88, 0xc0, 0x3e, 0xb3, 0xbf, 0x84, 0x61, 0xca, 0x29, 0x77, + 0x4b, 0xdd, 0xf7, 0xf7, 0x72, 0x19, 0xa6, 0x15, 0x15, 0xb5, 0x25, 0xdc, 0xd2, 0x2a, 0x36, 0x85, + 0x44, 0xe8, 0x6a, 0x38, 0xc1, 0x09, 0x53, 0x6c, 0xba, 0x60, 0x29, 0xb7, 0x45, 0x26, 0xd2, 0x7f, + 0x64, 0x96, 0x60, 0x46, 0xc4, 0x2d, 0x59, 0x47, 0xaa, 0xb2, 0xad, 0xea, 0xfb, 0x15, 0xe6, 0x47, + 0x94, 0xd8, 0x35, 0x6d, 0x9f, 0x7b, 0xdb, 0x9c, 0x32, 0x82, 0xa1, 0xa8, 0x18, 0xef, 0x56, 0x24, + 0x59, 0xd2, 0x13, 0x43, 0x19, 0x6e, 0x61, 0x4c, 0x18, 0x21, 0x23, 0x84, 0xc2, 0x02, 0x8c, 0x99, + 0xd3, 0x7b, 0x48, 0xaa, 0xed, 0xe9, 0x89, 0x18, 0x31, 0x2a, 0x69, 0x33, 0xca, 0xcc, 0xa6, 0xf6, + 0x52, 0xee, 0x36, 0x41, 0x50, 0x93, 0x46, 0xc9, 0x2a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, 0x16, 0x59, + 0x18, 0x11, 0xe6, 0x19, 0x8e, 0x6a, 0x2d, 0x58, 0xa8, 0xdb, 0x58, 0xd1, 0xf8, 0xb7, 0x80, 0x19, + 0x5b, 0xe9, 0x9f, 0xab, 0x71, 0xba, 0x94, 0x9d, 0x6d, 0xbb, 0x30, 0xef, 0xb8, 0x7f, 0xbb, 0x4d, + 0x24, 0x4c, 0x06, 0x8b, 0xf2, 0xac, 0x5d, 0xd0, 0xa6, 0xd3, 0x05, 0x7e, 0xd5, 0xa5, 0xa7, 0x8b, + 0x86, 0x18, 0xa1, 0xc1, 0x21, 0xa3, 0xec, 0xa4, 0x84, 0xff, 0x0f, 0x9c, 0xa0, 0x35, 0x9b, 0x36, + 0x81, 0x71, 0x52, 0x1f, 0xcc, 0x8a, 0x40, 0x89, 0xea, 0x80, 0x98, 0x03, 0xc3, 0x36, 0x10, 0xb3, + 0xc6, 0x5d, 0x46, 0x46, 0x06, 0x2b, 0x23, 0xe0, 0x93, 0xed, 0x5f, 0x72, 0x30, 0xe7, 0x95, 0x43, + 0x03, 0x37, 0xdb, 0xb6, 0x12, 0x14, 0x39, 0x54, 0x09, 0xca, 0xfe, 0x11, 0xf6, 0x48, 0xef, 0x41, + 0x1a, 0xc0, 0xb2, 0xab, 0x91, 0xeb, 0xbf, 0x51, 0x9f, 0xf6, 0xe8, 0x10, 0xbb, 0x39, 0x8f, 0x7a, + 0x70, 0x7e, 0x15, 0x4e, 0x39, 0x38, 0xef, 0x64, 0x95, 0xd9, 0x1e, 0xce, 0xd8, 0xc9, 0xb7, 0xd2, + 0xe9, 0x98, 0x5a, 0xc5, 0x94, 0x47, 0x0e, 0xd8, 0xbb, 0xc5, 0xaf, 0x22, 0x90, 0xe8, 0x02, 0x0c, + 0xda, 0xa8, 0xbc, 0x4a, 0x36, 0x72, 0x30, 0xed, 0x64, 0x03, 0xa9, 0x2a, 0x56, 0x29, 0x15, 0x53, + 0x76, 0x2a, 0x8a, 0xc6, 0xc4, 0x01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5, 0x45, 0xf6, 0x57, 0xbb, 0xbe, 0xaf, 0x20, 0x6d, 0x27, 0x46, 0xfe, + 0x66, 0xbf, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x87, 0xbf, 0x67, 0x18, 0x20, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index a9f44483e6c..95938cb7a90 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -10,7 +10,7 @@ import ( ) // NewUpgrade creates a new Upgrade instance. -func NewUpgrade(upgradeFields UpgradeFields, timeout UpgradeTimeout, latestPacketSent uint64) *Upgrade { +func NewUpgrade(upgradeFields UpgradeFields, timeout Timeout, latestPacketSent uint64) *Upgrade { return &Upgrade{ Fields: upgradeFields, Timeout: timeout, @@ -28,8 +28,8 @@ func NewUpgradeFields(ordering Order, connectionHops []string, version string) U } // NewUpgradeTimeout returns a new UpgradeTimeout instance. -func NewUpgradeTimeout(height clienttypes.Height, timestamp uint64) UpgradeTimeout { - return UpgradeTimeout{ +func NewUpgradeTimeout(height clienttypes.Height, timestamp uint64) Timeout { + return Timeout{ Height: height, Timestamp: timestamp, } @@ -66,6 +66,6 @@ func (uf UpgradeFields) ValidateBasic() error { } // IsValid returns true if either the height or timestamp is non-zero -func (ut UpgradeTimeout) IsValid() bool { +func (ut Timeout) IsValid() bool { return !ut.Height.IsZero() || ut.Timestamp != 0 } diff --git a/modules/core/04-channel/types/upgrade.pb.go b/modules/core/04-channel/types/upgrade.pb.go index 079809c35be..3ce355ef4d1 100644 --- a/modules/core/04-channel/types/upgrade.pb.go +++ b/modules/core/04-channel/types/upgrade.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" io "io" math "math" math_bits "math/bits" @@ -29,9 +28,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // end, the timeout for this upgrade attempt and the latest packet sequence sent // to allow the counterparty to block sends after the upgrade has started. type Upgrade struct { - Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` - Timeout UpgradeTimeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` - LatestSequenceSend uint64 `protobuf:"varint,3,opt,name=latest_sequence_send,json=latestSequenceSend,proto3" json:"latest_sequence_send,omitempty"` + Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` + Timeout Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` + LatestSequenceSend uint64 `protobuf:"varint,3,opt,name=latest_sequence_send,json=latestSequenceSend,proto3" json:"latest_sequence_send,omitempty"` } func (m *Upgrade) Reset() { *m = Upgrade{} } @@ -74,11 +73,11 @@ func (m *Upgrade) GetFields() UpgradeFields { return UpgradeFields{} } -func (m *Upgrade) GetTimeout() UpgradeTimeout { +func (m *Upgrade) GetTimeout() Timeout { if m != nil { return m.Timeout } - return UpgradeTimeout{} + return Timeout{} } func (m *Upgrade) GetLatestSequenceSend() uint64 { @@ -150,62 +149,6 @@ func (m *UpgradeFields) GetVersion() string { return "" } -// UpgradeTimeout defines a type which encapsulates the upgrade timeout values at which the counterparty -// must no longer proceed with the upgrade handshake. -type UpgradeTimeout struct { - // block height after which the upgrade times out - Height types.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` - // block timestamp (in nanoseconds) after which the upgrade times out - Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (m *UpgradeTimeout) Reset() { *m = UpgradeTimeout{} } -func (m *UpgradeTimeout) String() string { return proto.CompactTextString(m) } -func (*UpgradeTimeout) ProtoMessage() {} -func (*UpgradeTimeout) Descriptor() ([]byte, []int) { - return fileDescriptor_fb1cef68588848b2, []int{2} -} -func (m *UpgradeTimeout) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpgradeTimeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpgradeTimeout.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 *UpgradeTimeout) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeTimeout.Merge(m, src) -} -func (m *UpgradeTimeout) XXX_Size() int { - return m.Size() -} -func (m *UpgradeTimeout) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeTimeout.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeTimeout proto.InternalMessageInfo - -func (m *UpgradeTimeout) GetHeight() types.Height { - if m != nil { - return m.Height - } - return types.Height{} -} - -func (m *UpgradeTimeout) GetTimestamp() uint64 { - if m != nil { - return m.Timestamp - } - return 0 -} - // ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the // upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the // next sequence. @@ -220,7 +163,7 @@ func (m *ErrorReceipt) Reset() { *m = ErrorReceipt{} } func (m *ErrorReceipt) String() string { return proto.CompactTextString(m) } func (*ErrorReceipt) ProtoMessage() {} func (*ErrorReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_fb1cef68588848b2, []int{3} + return fileDescriptor_fb1cef68588848b2, []int{2} } func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -266,43 +209,38 @@ func (m *ErrorReceipt) GetError() string { func init() { proto.RegisterType((*Upgrade)(nil), "ibc.core.channel.v1.Upgrade") proto.RegisterType((*UpgradeFields)(nil), "ibc.core.channel.v1.UpgradeFields") - proto.RegisterType((*UpgradeTimeout)(nil), "ibc.core.channel.v1.UpgradeTimeout") proto.RegisterType((*ErrorReceipt)(nil), "ibc.core.channel.v1.ErrorReceipt") } func init() { proto.RegisterFile("ibc/core/channel/v1/upgrade.proto", fileDescriptor_fb1cef68588848b2) } var fileDescriptor_fb1cef68588848b2 = []byte{ - // 450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x9b, 0xad, 0xb4, 0xab, 0x81, 0x22, 0x99, 0x1e, 0xa2, 0x0a, 0x65, 0x25, 0x1c, 0xe8, - 0x65, 0xc9, 0x3a, 0x10, 0x7f, 0x6e, 0xd3, 0x10, 0x68, 0x37, 0xa4, 0x14, 0x2e, 0x5c, 0xaa, 0xc6, - 0x79, 0x49, 0x2c, 0x25, 0x7e, 0x83, 0xed, 0x44, 0xe2, 0x2b, 0x70, 0xe2, 0x33, 0x71, 0xda, 0x71, - 0x47, 0x4e, 0x08, 0xb5, 0x5f, 0x04, 0xc5, 0x4e, 0x56, 0x26, 0x55, 0xbb, 0xf9, 0xf5, 0xfb, 0xf3, - 0xe3, 0xc7, 0x8f, 0x5f, 0xf2, 0x94, 0xc7, 0x2c, 0x64, 0x28, 0x21, 0x64, 0xd9, 0x5a, 0x08, 0xc8, - 0xc3, 0x7a, 0x11, 0x56, 0x65, 0x2a, 0xd7, 0x09, 0x04, 0xa5, 0x44, 0x8d, 0xf4, 0x31, 0x8f, 0x59, - 0xd0, 0x20, 0x41, 0x8b, 0x04, 0xf5, 0x62, 0x3a, 0x49, 0x31, 0x45, 0xd3, 0x0f, 0x9b, 0x95, 0x45, - 0xa7, 0xc7, 0x3b, 0xb5, 0x9c, 0x83, 0xd0, 0x8d, 0x98, 0x5d, 0xb5, 0xc0, 0xde, 0xeb, 0x3a, 0x59, - 0x83, 0xf8, 0xbf, 0x1c, 0x32, 0xfc, 0x6c, 0x0d, 0xd0, 0x73, 0x32, 0xf8, 0xca, 0x21, 0x4f, 0x94, - 0xeb, 0xcc, 0x9c, 0xf9, 0xfd, 0x33, 0x3f, 0xd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, 0xd4, 0x74, 0x4a, - 0x8e, 0xba, 0xc4, 0xcc, 0x4d, 0xfd, 0xe8, 0xa6, 0xa6, 0x13, 0x72, 0x0f, 0x1a, 0xd6, 0xa8, 0x8c, - 0x22, 0x5b, 0x5c, 0x2c, 0xaf, 0x36, 0x9e, 0x73, 0xbd, 0xf1, 0x9c, 0xbf, 0x1b, 0xcf, 0xf9, 0xb9, - 0xf5, 0x7a, 0xd7, 0x5b, 0xaf, 0xf7, 0x7b, 0xeb, 0xf5, 0xbe, 0xbc, 0x4d, 0xb9, 0xce, 0xaa, 0x38, - 0x60, 0x58, 0x84, 0x0c, 0x55, 0x81, 0x2a, 0xe4, 0x31, 0x3b, 0x49, 0x31, 0xac, 0x5f, 0x87, 0x05, - 0x26, 0x55, 0x0e, 0xca, 0x8e, 0xd6, 0xe9, 0xcb, 0x93, 0x6e, 0xba, 0xf4, 0xf7, 0x12, 0x54, 0x3c, - 0x30, 0x93, 0xf5, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x32, 0xbd, 0xfd, 0xed, 0x02, - 0x00, 0x00, + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xad, 0xac, 0xab, 0x81, 0x21, 0x99, 0x1e, 0xa2, 0x0a, 0x85, 0x92, 0x0b, 0xbd, + 0x2c, 0xde, 0x06, 0x02, 0x21, 0x71, 0x98, 0x26, 0x81, 0xb8, 0x21, 0xb9, 0x70, 0xe1, 0x52, 0x35, + 0xce, 0x23, 0xb5, 0x94, 0xf8, 0x05, 0xdb, 0x89, 0xc4, 0x57, 0xe0, 0xc4, 0xf7, 0xe1, 0x0b, 0xec, + 0xb8, 0x23, 0x27, 0x84, 0xda, 0x2f, 0x82, 0xe2, 0x24, 0x43, 0x93, 0x72, 0xf3, 0xf3, 0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, 0x1b, 0x1c, 0x2c, 0x0e, 0x97, 0x53, 0x71, 0xf2, 0xff, 0xfa, 0x03, 0x96, + 0x96, 0x05, 0x74, 0x52, 0x83, 0xb1, 0x0a, 0xb5, 0xcf, 0x35, 0x15, 0x7d, 0x19, 0x5d, 0xd2, 0x07, + 0xef, 0x8c, 0x41, 0x23, 0x40, 0x82, 0x2a, 0x1d, 0x9b, 0xd3, 0xe3, 0x7e, 0x0e, 0x1f, 0x65, 0x2c, + 0x6e, 0x6b, 0x36, 0xa3, 0xf7, 0xa0, 0x61, 0xfd, 0x37, 0x4d, 0x45, 0x5b, 0x5c, 0xad, 0xae, 0x77, + 0x21, 0xb9, 0xd9, 0x85, 0xe4, 0xef, 0x2e, 0x24, 0x3f, 0xf7, 0xe1, 0xe8, 0x66, 0x1f, 0x8e, 0x7e, + 0xef, 0xc3, 0xd1, 0x97, 0x37, 0x99, 0x72, 0xdb, 0x2a, 0x89, 0x25, 0x16, 0x5c, 0xa2, 0x2d, 0xd0, + 0x72, 0x95, 0xc8, 0xd3, 0x0c, 0x79, 0xfd, 0x9a, 0x17, 0x98, 0x56, 0x39, 0xd8, 0x76, 0xd3, 0x67, + 0x2f, 0x4f, 0xfb, 0x65, 0xbb, 0xef, 0x25, 0xd8, 0xe4, 0xc8, 0x2f, 0xfa, 0xc5, 0xbf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x02, 0xa2, 0xb4, 0xcd, 0x5b, 0x02, 0x00, 0x00, } func (m *Upgrade) Marshal() (dAtA []byte, err error) { @@ -397,44 +335,6 @@ func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *UpgradeTimeout) 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 *UpgradeTimeout) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpgradeTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintUpgrade(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintUpgrade(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ErrorReceipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -519,20 +419,6 @@ func (m *UpgradeFields) Size() (n int) { return n } -func (m *UpgradeTimeout) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Height.Size() - n += 1 + l + sovUpgrade(uint64(l)) - if m.Timestamp != 0 { - n += 1 + sovUpgrade(uint64(m.Timestamp)) - } - return n -} - func (m *ErrorReceipt) Size() (n int) { if m == nil { return 0 @@ -823,108 +709,6 @@ func (m *UpgradeFields) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpgradeTimeout) 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 ErrIntOverflowUpgrade - } - 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: UpgradeTimeout: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradeTimeout: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUpgrade - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUpgrade - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthUpgrade - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUpgrade - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipUpgrade(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthUpgrade - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ErrorReceipt) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index bd103d0fed6..6f1a54e5287 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -168,3 +168,12 @@ message Acknowledgement { string error = 22; } } + +// Timeout defines a type which encapsulates the timeout values at which the counterparty +// must no longer proceed either a handshake or an upgrade. +message Timeout { + // block height after which the upgrade times out + ibc.core.client.v1.Height height = 1 [(gogoproto.nullable) = false]; + // block timestamp (in nanoseconds) after which the upgrade times out + uint64 timestamp = 2; +} \ No newline at end of file diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index aac5c57d5e7..a80deff794a 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -263,11 +263,11 @@ message MsgChannelUpgradeInit { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string port_id = 1; - string channel_id = 2; - UpgradeFields fields = 3 [(gogoproto.nullable) = false]; - UpgradeTimeout timeout = 4 [(gogoproto.nullable) = false]; - string signer = 5; + string port_id = 1; + string channel_id = 2; + UpgradeFields fields = 3 [(gogoproto.nullable) = false]; + Timeout timeout = 4 [(gogoproto.nullable) = false]; + string signer = 5; } // MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type @@ -285,7 +285,7 @@ message MsgChannelUpgradeTry { string port_id = 1; string channel_id = 2; repeated string proposed_upgrade_connection_hops = 3; - UpgradeTimeout upgrade_timeout = 4 [(gogoproto.nullable) = false]; + Timeout upgrade_timeout = 4 [(gogoproto.nullable) = false]; Upgrade counterparty_proposed_upgrade = 5 [(gogoproto.nullable) = false]; uint64 counterparty_upgrade_sequence = 6; bytes proof_channel = 7; diff --git a/proto/ibc/core/channel/v1/upgrade.proto b/proto/ibc/core/channel/v1/upgrade.proto index 1584651e3b0..6282bf38d31 100644 --- a/proto/ibc/core/channel/v1/upgrade.proto +++ b/proto/ibc/core/channel/v1/upgrade.proto @@ -5,7 +5,6 @@ package ibc.core.channel.v1; option go_package = "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; import "ibc/core/channel/v1/channel.proto"; // Upgrade is a verifiable type which contains the relevant information @@ -13,9 +12,9 @@ import "ibc/core/channel/v1/channel.proto"; // end, the timeout for this upgrade attempt and the latest packet sequence sent // to allow the counterparty to block sends after the upgrade has started. message Upgrade { - UpgradeFields fields = 1 [(gogoproto.nullable) = false]; - UpgradeTimeout timeout = 2 [(gogoproto.nullable) = false]; - uint64 latest_sequence_send = 3; + UpgradeFields fields = 1 [(gogoproto.nullable) = false]; + Timeout timeout = 2 [(gogoproto.nullable) = false]; + uint64 latest_sequence_send = 3; } // UpgradeFields are the fields in a channel end which may be changed @@ -26,15 +25,6 @@ message UpgradeFields { string version = 3; } -// UpgradeTimeout defines a type which encapsulates the upgrade timeout values at which the counterparty -// must no longer proceed with the upgrade handshake. -message UpgradeTimeout { - // block height after which the upgrade times out - ibc.core.client.v1.Height height = 1 [(gogoproto.nullable) = false]; - // block timestamp (in nanoseconds) after which the upgrade times out - uint64 timestamp = 2; -} - // ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the // upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the // next sequence. From 89379ef765479ce0cf3cdc07636e6f5eaf09171b Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 10:22:52 +0200 Subject: [PATCH 18/35] update protodoc --- proto/ibc/core/channel/v1/channel.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 6f1a54e5287..84714bf5102 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -169,8 +169,9 @@ message Acknowledgement { } } -// Timeout defines a type which encapsulates the timeout values at which the counterparty -// must no longer proceed either a handshake or an upgrade. +// Timeout defines an exeuction deadline structure for 04-channel msg handlers. +// This includes packet lifecycle handlers as well as handshake and upgrade protocol handlers. +// A valid Timeout contains either one or both of a timestamp and block height (sequence). message Timeout { // block height after which the upgrade times out ibc.core.client.v1.Height height = 1 [(gogoproto.nullable) = false]; From 3bcbb5e9ec9831710f1490d3f66322693f7b0f74 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 10:27:50 +0200 Subject: [PATCH 19/35] merge --- modules/core/04-channel/keeper/upgrade.go | 6 +- modules/core/04-channel/types/channel.pb.go | 314 +++++++++++++++--- modules/core/04-channel/types/msgs.go | 4 +- modules/core/04-channel/types/tx.pb.go | 249 +++++++------- modules/core/04-channel/types/upgrade.go | 26 +- modules/core/04-channel/types/upgrade.pb.go | 280 ++-------------- modules/core/04-channel/types/upgrade_test.go | 2 +- proto/ibc/core/channel/v1/channel.proto | 9 + proto/ibc/core/channel/v1/tx.proto | 12 +- proto/ibc/core/channel/v1/upgrade.proto | 16 +- 10 files changed, 454 insertions(+), 464 deletions(-) diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index 776877bff94..f51d158626e 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -16,7 +16,7 @@ func (k Keeper) ChanUpgradeInit( portID string, channelID string, upgradeFields types.UpgradeFields, - upgradeTimeout types.UpgradeTimeout, + upgradeTimeout types.Timeout, ) (types.Upgrade, error) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { @@ -63,7 +63,7 @@ func (k Keeper) ChanUpgradeTry( portID, channelID string, proposedConnectionHops []string, - upgradeTimeout types.UpgradeTimeout, + upgradeTimeout types.Timeout, counterpartyProposedUpgrade types.Upgrade, counterpartyUpgradeSequence uint64, proofCounterpartyChannel, @@ -86,7 +86,7 @@ func (k Keeper) WriteUpgradeTryChannel( } // constructProposedUpgrade returns the proposed upgrade from the provided arguments. -func (k Keeper) constructProposedUpgrade(ctx sdk.Context, portID, channelID string, fields types.UpgradeFields, timeout types.UpgradeTimeout) (types.Upgrade, error) { +func (k Keeper) constructProposedUpgrade(ctx sdk.Context, portID, channelID string, fields types.UpgradeFields, timeout types.Timeout) (types.Upgrade, error) { seq, found := k.GetNextSequenceSend(ctx, portID, channelID) if !found { return types.Upgrade{}, types.ErrSequenceSendNotFound diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index e0bd66f9847..252df36476d 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -499,6 +499,62 @@ func (*Acknowledgement) XXX_OneofWrappers() []interface{} { } } +// Timeout defines a type which encapsulates the timeout values at which the counterparty +// must no longer proceed either a handshake or an upgrade. +type Timeout struct { + // block height after which the upgrade times out + Height types.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` + // block timestamp (in nanoseconds) after which the upgrade times out + Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *Timeout) Reset() { *m = Timeout{} } +func (m *Timeout) String() string { return proto.CompactTextString(m) } +func (*Timeout) ProtoMessage() {} +func (*Timeout) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{7} +} +func (m *Timeout) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timeout.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 *Timeout) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timeout.Merge(m, src) +} +func (m *Timeout) XXX_Size() int { + return m.Size() +} +func (m *Timeout) XXX_DiscardUnknown() { + xxx_messageInfo_Timeout.DiscardUnknown(m) +} + +var xxx_messageInfo_Timeout proto.InternalMessageInfo + +func (m *Timeout) GetHeight() types.Height { + if m != nil { + return m.Height + } + return types.Height{} +} + +func (m *Timeout) GetTimestamp() uint64 { + if m != nil { + return m.Timestamp + } + return 0 +} + func init() { proto.RegisterEnum("ibc.core.channel.v1.State", State_name, State_value) proto.RegisterEnum("ibc.core.channel.v1.Order", Order_name, Order_value) @@ -509,67 +565,70 @@ func init() { proto.RegisterType((*PacketState)(nil), "ibc.core.channel.v1.PacketState") proto.RegisterType((*PacketId)(nil), "ibc.core.channel.v1.PacketId") proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") + proto.RegisterType((*Timeout)(nil), "ibc.core.channel.v1.Timeout") } func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 872 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0xb7, 0xb3, 0xce, 0xbf, 0x97, 0x4d, 0xe2, 0x9d, 0xc2, 0x62, 0x59, 0x90, 0xb8, 0xab, 0x02, - 0x69, 0x51, 0xe3, 0x6e, 0x41, 0x20, 0xb8, 0xed, 0x6e, 0x4c, 0xd7, 0x62, 0x95, 0x44, 0x4e, 0xf6, - 0x40, 0x2f, 0x91, 0x63, 0x0f, 0x89, 0xd5, 0xc4, 0x63, 0xec, 0x49, 0xaa, 0x8a, 0x33, 0x52, 0x95, - 0x13, 0x5f, 0x20, 0x12, 0x12, 0x5f, 0x81, 0x0f, 0x51, 0x89, 0x4b, 0x8f, 0x3d, 0x21, 0xb4, 0xfb, - 0x45, 0x90, 0x67, 0xc6, 0x49, 0xb6, 0x5a, 0xf5, 0x80, 0xc4, 0xad, 0x27, 0xcf, 0xfb, 0xbd, 0xdf, - 0xfb, 0xbd, 0x99, 0xdf, 0xb3, 0x3d, 0x70, 0x37, 0x18, 0x7b, 0xa6, 0x47, 0x62, 0x6c, 0x7a, 0x53, - 0x37, 0x0c, 0xf1, 0xcc, 0x5c, 0x1e, 0x67, 0xcb, 0x76, 0x14, 0x13, 0x4a, 0xd0, 0x9d, 0x60, 0xec, - 0xb5, 0x53, 0x4a, 0x3b, 0xc3, 0x97, 0xc7, 0xfa, 0x07, 0x13, 0x32, 0x21, 0x2c, 0x6f, 0xa6, 0x2b, - 0x4e, 0xd5, 0x9b, 0x5b, 0xb5, 0x59, 0x80, 0x43, 0xca, 0xc4, 0xd8, 0x8a, 0x13, 0x8e, 0xfe, 0xcc, - 0x41, 0xf1, 0x8c, 0xab, 0xa0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x2b, 0x0b, 0xc4, 0xf6, - 0x85, 0x9b, 0x17, 0xb0, 0xbf, 0xbb, 0xc9, 0x5d, 0x35, 0xf9, 0x1d, 0x6a, 0xb9, 0xdb, 0xd5, 0xde, + // 898 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x26, 0x65, 0xea, 0x6f, 0x64, 0x49, 0xf4, 0xa6, 0x4d, 0x09, 0x22, 0x95, 0x18, 0x23, 0x6d, + 0x95, 0x14, 0x11, 0xe3, 0xb4, 0xe8, 0xdf, 0xcd, 0xb6, 0xd8, 0x98, 0xa8, 0x21, 0x09, 0x94, 0x7c, + 0x68, 0x2e, 0x02, 0x45, 0x6e, 0x25, 0x22, 0x12, 0x97, 0x25, 0x57, 0x0a, 0x82, 0x9e, 0x0b, 0x04, + 0x3a, 0xf5, 0x05, 0x04, 0x14, 0xe8, 0x2b, 0xf4, 0x21, 0x02, 0xf4, 0x92, 0x63, 0x4e, 0x45, 0x61, + 0xbf, 0x48, 0xc1, 0xdd, 0xa5, 0x24, 0x07, 0x46, 0x50, 0x14, 0xe8, 0xad, 0x27, 0xee, 0x7c, 0xf3, + 0xcd, 0x37, 0xbb, 0xdf, 0x90, 0x5c, 0xb8, 0x1b, 0x8c, 0x3d, 0xd3, 0x23, 0x31, 0x36, 0xbd, 0xa9, + 0x1b, 0x86, 0x78, 0x66, 0x2e, 0x8f, 0xb2, 0x65, 0x3b, 0x8a, 0x09, 0x25, 0xe8, 0x56, 0x30, 0xf6, + 0xda, 0x29, 0xa5, 0x9d, 0xe1, 0xcb, 0x23, 0xfd, 0xbd, 0x09, 0x99, 0x10, 0x96, 0x37, 0xd3, 0x15, + 0xa7, 0xea, 0xcd, 0xad, 0xda, 0x2c, 0xc0, 0x21, 0x65, 0x62, 0x6c, 0xc5, 0x09, 0x87, 0xbf, 0xe7, + 0x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af, 0xaf, 0x1a, + 0xd2, 0x9b, 0xab, 0x86, 0xf4, 0xf4, 0xeb, 0x49, 0x40, 0xa7, 0x8b, 0x71, 0xdb, 0x23, 0x73, 0xd3, + 0x23, 0xc9, 0x9c, 0x24, 0x66, 0x30, 0xf6, 0x1e, 0x4e, 0x88, 0xb9, 0xfc, 0xd2, 0x9c, 0x13, 0x7f, + 0x31, 0xc3, 0x09, 0xbf, 0xa0, 0x1f, 0x7d, 0xfe, 0x30, 0xbb, 0xf1, 0xe9, 0x8b, 0x08, 0x27, 0xe3, + 0x02, 0xbb, 0xa1, 0x3f, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xb0, 0x25, 0x8f, 0x12, 0x08, + 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -981,6 +1040,44 @@ func (m *Acknowledgement_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xb2 return len(dAtA) - i, nil } +func (m *Timeout) 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 *Timeout) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i = encodeVarintChannel(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintChannel(dAtA []byte, offset int, v uint64) int { offset -= sovChannel(v) base := offset @@ -1189,6 +1286,19 @@ func (m *Acknowledgement_Error) Size() (n int) { n += 2 + l + sovChannel(uint64(l)) return n } +func (m *Timeout) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Height.Size() + n += 1 + l + sovChannel(uint64(l)) + if m.Timestamp != 0 { + n += 1 + sovChannel(uint64(m.Timestamp)) + } + return n +} func sovChannel(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -2461,6 +2571,108 @@ func (m *Acknowledgement) Unmarshal(dAtA []byte) error { } return nil } +func (m *Timeout) 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 ErrIntOverflowChannel + } + 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: Timeout: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timeout: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthChannel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipChannel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthChannel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipChannel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index 68b747f5a5f..f74babd0ec6 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -485,7 +485,7 @@ var _ sdk.Msg = &MsgChannelUpgradeInit{} func NewMsgChannelUpgradeInit( portID, channelID string, upgradeFields UpgradeFields, - upgradeTimeout UpgradeTimeout, + upgradeTimeout Timeout, signer string, ) *MsgChannelUpgradeInit { return &MsgChannelUpgradeInit{ @@ -536,7 +536,7 @@ func NewMsgChannelUpgradeTry( portID, channelID string, proposedConnectionHops []string, - upgradeTimeout UpgradeTimeout, + upgradeTimeout Timeout, counterpartyProposedUpgrade Upgrade, counterpartyUpgradeSequence uint64, proofChannel []byte, diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index 811658f2fe8..ce6bcd2eb0c 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -904,11 +904,11 @@ var xxx_messageInfo_MsgAcknowledgementResponse proto.InternalMessageInfo // MsgChannelUpgradeInit defines the request type for the ChannelUpgradeInit rpc type MsgChannelUpgradeInit struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - Fields UpgradeFields `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields"` - Timeout UpgradeTimeout `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout"` - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + Fields UpgradeFields `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields"` + Timeout Timeout `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelUpgradeInit) Reset() { *m = MsgChannelUpgradeInit{} } @@ -1007,16 +1007,16 @@ func (m *MsgChannelUpgradeInitResponse) GetUpgradeSequence() uint64 { // MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc type MsgChannelUpgradeTry struct { - PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` - UpgradeTimeout UpgradeTimeout `protobuf:"bytes,4,opt,name=upgrade_timeout,json=upgradeTimeout,proto3" json:"upgrade_timeout"` - CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` - CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` - ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` - ProofUpgrade []byte `protobuf:"bytes,8,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty"` - ProofHeight types.Height `protobuf:"bytes,9,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` - Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + ProposedUpgradeConnectionHops []string `protobuf:"bytes,3,rep,name=proposed_upgrade_connection_hops,json=proposedUpgradeConnectionHops,proto3" json:"proposed_upgrade_connection_hops,omitempty"` + UpgradeTimeout Timeout `protobuf:"bytes,4,opt,name=upgrade_timeout,json=upgradeTimeout,proto3" json:"upgrade_timeout"` + CounterpartyProposedUpgrade Upgrade `protobuf:"bytes,5,opt,name=counterparty_proposed_upgrade,json=counterpartyProposedUpgrade,proto3" json:"counterparty_proposed_upgrade"` + CounterpartyUpgradeSequence uint64 `protobuf:"varint,6,opt,name=counterparty_upgrade_sequence,json=counterpartyUpgradeSequence,proto3" json:"counterparty_upgrade_sequence,omitempty"` + ProofChannel []byte `protobuf:"bytes,7,opt,name=proof_channel,json=proofChannel,proto3" json:"proof_channel,omitempty"` + ProofUpgrade []byte `protobuf:"bytes,8,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty"` + ProofHeight types.Height `protobuf:"bytes,9,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + Signer string `protobuf:"bytes,10,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgChannelUpgradeTry) Reset() { *m = MsgChannelUpgradeTry{} } @@ -1477,115 +1477,116 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1726 bytes of a gzipped FileDescriptorProto -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, 0x76, - 0xcd, 0xda, 0xe7, 0xde, 0x35, 0xa6, 0xf4, 0x60, 0xc8, 0x0a, 0xc6, 0x7b, 0x65, 0x51, 0x12, 0xb5, - 0xc4, 0x48, 0x9a, 0x59, 0x9a, 0xe0, 0xc7, 0xc8, 0x08, 0xa1, 0x30, 0x0f, 0x13, 0xc6, 0xf4, 0x3e, - 0x12, 0x6b, 0xfb, 0x5a, 0x22, 0x46, 0x8c, 0xe2, 0x6c, 0x46, 0x19, 0xd9, 0xd4, 0x5e, 0xc9, 0xde, - 0x21, 0x08, 0x6a, 0xd2, 0x38, 0x59, 0x65, 0x0c, 0xd9, 0x08, 0x8b, 0xfb, 0x10, 0xb6, 0x03, 0x67, - 0xba, 0x02, 0x6b, 0xf1, 0x65, 0x23, 0x84, 0x71, 0x10, 0xe2, 0x62, 0x32, 0xec, 0x62, 0x32, 0xf3, - 0x63, 0x17, 0x5f, 0x6b, 0x42, 0xdd, 0x9f, 0xaf, 0xde, 0xd2, 0xd8, 0xff, 0xc3, 0x69, 0x47, 0x70, - 0x6d, 0x58, 0x23, 0x0f, 0x4f, 0xda, 0xa7, 0x3b, 0x94, 0x1e, 0x82, 0x94, 0x79, 0x30, 0x28, 0x28, - 0x6b, 0xca, 0x01, 0xe5, 0x64, 0x94, 0x0c, 0xe8, 0xf9, 0x76, 0x4c, 0x94, 0xcc, 0xbb, 0x29, 0x59, - 0x13, 0xea, 0x26, 0x25, 0x99, 0x9f, 0x19, 0x38, 0xe9, 0x9c, 0xcd, 0x63, 0x69, 0x4f, 0x54, 0x9a, - 0x87, 0x8e, 0xae, 0xe5, 0x72, 0x45, 0xa8, 0x93, 0x78, 0x9a, 0x2e, 0xeb, 0x94, 0xb9, 0x5d, 0x8e, - 0x0e, 0xe7, 0xf2, 0x88, 0x8f, 0xcb, 0x29, 0x58, 0xf4, 0x74, 0xca, 0x72, 0x1b, 0xc3, 0x6c, 0x07, - 0x90, 0x6f, 0x60, 0x15, 0xf5, 0xae, 0x73, 0x7d, 0x7c, 0xee, 0x5f, 0xc8, 0x16, 0x61, 0xde, 0x43, - 0xa1, 0x65, 0xcf, 0x2f, 0x0c, 0x9c, 0x72, 0xcd, 0x0f, 0xcb, 0x83, 0xb3, 0x1e, 0x44, 0xfa, 0xd5, - 0x83, 0x7f, 0x89, 0x89, 0x34, 0x24, 0xbd, 0xfd, 0xb2, 0x5c, 0xff, 0x8d, 0x81, 0x13, 0x9b, 0x6a, - 0x8d, 0x47, 0x42, 0x7b, 0xbb, 0x22, 0xd4, 0x91, 0xc6, 0xde, 0x80, 0x98, 0x4c, 0x9e, 0x88, 0xc3, - 0xe3, 0xab, 0xf3, 0x9e, 0x95, 0xd3, 0x00, 0x53, 0xab, 0xe8, 0x02, 0xf6, 0x22, 0x4c, 0x1b, 0x5e, - 0x09, 0xb8, 0xd9, 0x14, 0xb5, 0x26, 0x92, 0x34, 0x12, 0x99, 0x09, 0x7e, 0x8a, 0x8c, 0xe7, 0xad, - 0xe1, 0xae, 0x00, 0x44, 0x86, 0x0b, 0x40, 0xd4, 0x27, 0x00, 0x1f, 0x93, 0xfd, 0xd5, 0xf1, 0xce, - 0x2a, 0x86, 0x6f, 0x42, 0x4c, 0x41, 0x6a, 0xab, 0x61, 0x78, 0x39, 0xb9, 0x7a, 0xc1, 0xd3, 0x4b, - 0x13, 0xce, 0x13, 0xe8, 0xce, 0x81, 0x8c, 0x78, 0xba, 0xec, 0x66, 0x54, 0xd7, 0x91, 0xf9, 0x22, - 0x0c, 0xb0, 0xa9, 0xd6, 0x76, 0xc4, 0x26, 0xc2, 0xad, 0xa3, 0x89, 0x5d, 0x4b, 0x52, 0x90, 0x80, - 0xc4, 0x36, 0xaa, 0x3a, 0x62, 0x57, 0xb2, 0x86, 0x8f, 0x26, 0x76, 0x97, 0x81, 0x95, 0xd0, 0x43, - 0xad, 0xac, 0xa2, 0xfb, 0x2d, 0x24, 0x09, 0xa8, 0xac, 0x20, 0xa1, 0x4d, 0xe2, 0x18, 0xe5, 0xa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x7b, 0x99, 0x64, 0x9e, 0xbf, 0x4c, 0x32, 0x7f, 0xbc, - 0x4c, 0x32, 0x5f, 0xbd, 0x4a, 0x86, 0x9e, 0xbf, 0x4a, 0x86, 0x5e, 0xbc, 0x4a, 0x86, 0xde, 0xbf, - 0x51, 0x13, 0xb5, 0xfd, 0xd6, 0x6e, 0x56, 0xc0, 0xcd, 0x9c, 0x80, 0xd5, 0x26, 0x56, 0x73, 0xe2, - 0xae, 0xb0, 0x5c, 0xc3, 0xb9, 0xf6, 0x1b, 0xb9, 0x26, 0xae, 0xb6, 0x1a, 0x48, 0x35, 0xfe, 0xba, - 0x5f, 0xb9, 0xb6, 0x6c, 0xfe, 0x78, 0xd7, 0x0e, 0x64, 0xa4, 0xee, 0xc6, 0xc8, 0x4f, 0xf7, 0xab, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x52, 0x8e, 0xa5, 0x54, 0x26, 0x20, 0x00, 0x00, + // 1729 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6b, 0x1b, 0x47, + 0x1b, 0xd7, 0x4a, 0xb2, 0x64, 0x3f, 0x76, 0xfc, 0xb1, 0x76, 0x12, 0x45, 0xb6, 0x25, 0x45, 0x2f, + 0x24, 0x4e, 0xde, 0x58, 0x8a, 0x9d, 0xe4, 0x7d, 0x49, 0x08, 0xb4, 0xb6, 0xaa, 0x34, 0xa6, 0x71, + 0x6c, 0x56, 0x56, 0xa1, 0x9f, 0xc2, 0x5e, 0x8d, 0xe5, 0x45, 0xd2, 0xce, 0x66, 0x77, 0xa5, 0xc4, + 0x85, 0x1e, 0x7a, 0x28, 0x0d, 0x81, 0x42, 0x8f, 0x85, 0x12, 0x08, 0xf4, 0xd0, 0x63, 0x6f, 0x3d, + 0xf4, 0x56, 0xe8, 0x21, 0xc7, 0x40, 0xa1, 0xcd, 0xa1, 0x94, 0x92, 0x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 0x93, 0x74, 0x28, 0x5b, 0x86, 0x64, 0xb7, 0x39, 0x02, 0xd2, 0x14, 0x2c, 0x6b, + 0x88, 0x9f, 0x07, 0xa0, 0xa2, 0x3a, 0x96, 0x8d, 0xd0, 0x91, 0xb5, 0x2a, 0x9f, 0x80, 0x78, 0x1b, + 0xa9, 0x9a, 0x84, 0x65, 0x62, 0xdc, 0x88, 0xc0, 0x3e, 0xb3, 0xbf, 0x84, 0x61, 0xca, 0x29, 0x77, + 0x4b, 0xdd, 0xf7, 0xf7, 0x72, 0x19, 0xa6, 0x15, 0x15, 0xb5, 0x25, 0xdc, 0xd2, 0x2a, 0x36, 0x85, + 0x44, 0xe8, 0x6a, 0x38, 0xc1, 0x09, 0x53, 0x6c, 0xba, 0x60, 0x29, 0xb7, 0x45, 0x26, 0xd2, 0x7f, + 0x64, 0x96, 0x60, 0x46, 0xc4, 0x2d, 0x59, 0x47, 0xaa, 0xb2, 0xad, 0xea, 0xfb, 0x15, 0xe6, 0x47, + 0x94, 0xd8, 0x35, 0x6d, 0x9f, 0x7b, 0xdb, 0x9c, 0x32, 0x82, 0xa1, 0xa8, 0x18, 0xef, 0x56, 0x24, + 0x59, 0xd2, 0x13, 0x43, 0x19, 0x6e, 0x61, 0x4c, 0x18, 0x21, 0x23, 0x84, 0xc2, 0x02, 0x8c, 0x99, + 0xd3, 0x7b, 0x48, 0xaa, 0xed, 0xe9, 0x89, 0x18, 0x31, 0x2a, 0x69, 0x33, 0xca, 0xcc, 0xa6, 0xf6, + 0x52, 0xee, 0x36, 0x41, 0x50, 0x93, 0x46, 0xc9, 0x2a, 0x73, 0xc8, 0x46, 0x58, 0xdc, 0x87, 0xb0, + 0x2d, 0x38, 0xd3, 0x15, 0x58, 0x8b, 0x2f, 0x1b, 0x21, 0x9c, 0x83, 0x10, 0x17, 0x93, 0x61, 0x17, + 0x93, 0xd9, 0xef, 0xbb, 0xf8, 0x5a, 0x11, 0xeb, 0xfe, 0x7c, 0x1d, 0x2c, 0x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x57, 0xa2, 0xdb, 0xb0, 0x3d, 0x13, 0xdd, 0xab, 0xf9, 0xbe, 0x07, 0x53, + 0xdd, 0x0d, 0xef, 0x85, 0x60, 0x82, 0x8c, 0xc2, 0xb1, 0x14, 0x18, 0xea, 0xaf, 0xd2, 0x28, 0x1f, + 0x01, 0x55, 0x1a, 0x15, 0x64, 0x29, 0x30, 0xd4, 0x52, 0xf9, 0x31, 0x9c, 0xf4, 0xbe, 0x6d, 0x2f, + 0x06, 0x93, 0xc5, 0xb6, 0xd8, 0xb5, 0xbe, 0xe0, 0xfe, 0xea, 0xd9, 0xa6, 0x08, 0xa8, 0x9e, 0x6d, + 0x91, 0x6b, 0x7d, 0xc1, 0x2d, 0xf5, 0x1f, 0xc1, 0x8c, 0xe7, 0xf5, 0xe5, 0x52, 0x40, 0x6f, 0x08, + 0x3a, 0x79, 0xb5, 0x1f, 0x34, 0xd3, 0xbd, 0x5a, 0x7a, 0xfa, 0x22, 0xc5, 0x3d, 0x7b, 0x91, 0xe2, + 0x7e, 0x7f, 0x91, 0xe2, 0xbe, 0x78, 0x99, 0x0a, 0x3d, 0x7b, 0x99, 0x0a, 0x3d, 0x7f, 0x99, 0x0a, + 0xbd, 0x7b, 0xbd, 0x26, 0xe9, 0x7b, 0xad, 0x9d, 0x9c, 0x88, 0x9b, 0x79, 0x11, 0x6b, 0x4d, 0xac, + 0xe5, 0xa5, 0x1d, 0x71, 0xb1, 0x86, 0xf3, 0xed, 0xff, 0xe7, 0x9b, 0xb8, 0xda, 0x6a, 0x20, 0xcd, + 0xfc, 0x9f, 0xfd, 0xf2, 0xd5, 0x45, 0xf6, 0x57, 0xbb, 0xbe, 0xaf, 0x20, 0x6d, 0x27, 0x46, 0xfe, + 0x66, 0xbf, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x28, 0x87, 0xbf, 0x67, 0x18, 0x20, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 9ad5884f675..5bb7a2841af 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -1,18 +1,16 @@ package types import ( - "fmt" "strings" errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/internal/collections" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" ) // NewUpgrade creates a new Upgrade instance. -func NewUpgrade(upgradeFields UpgradeFields, timeout UpgradeTimeout, latestPacketSent uint64) *Upgrade { +func NewUpgrade(upgradeFields UpgradeFields, timeout Timeout, latestPacketSent uint64) *Upgrade { return &Upgrade{ Fields: upgradeFields, Timeout: timeout, @@ -30,8 +28,8 @@ func NewUpgradeFields(ordering Order, connectionHops []string, version string) U } // NewUpgradeTimeout returns a new UpgradeTimeout instance. -func NewUpgradeTimeout(height clienttypes.Height, timestamp uint64) UpgradeTimeout { - return UpgradeTimeout{ +func NewUpgradeTimeout(height clienttypes.Height, timestamp uint64) Timeout { + return Timeout{ Height: height, Timestamp: timestamp, } @@ -67,35 +65,31 @@ func (uf UpgradeFields) ValidateBasic() error { return nil } -// Timeout defines an exeuction deadline structure for 04-channel msg handlers. +// Timeout defines an exeuction deadline structure for 04-channel msg handlers. // This includes packet lifecycle handlers as well as handshake and upgrade protocol handlers. // A valid Timeout contains either one or both of a timestamp and block height (sequence). -type Timeout struct { - Height clienttypes.Height - Timestamp uint64 -} // AfterHeight returns true if Timeout height is greater than the provided height. func (t Timeout) AfterHeight(height clienttypes.Height) bool { - return t.Height.GT(height) + return t.Height.GT(height) } // AfterTimestamp returns true is Timeout timestamp is greater than the provided timestamp. func (t Timeout) AfterTimestamp(timestamp uint64) bool { - return t.Timestamp > timestamp + return t.Timestamp > timestamp } // IsValid validates the Timeout. It ensures that either height or timestamp is set. func (t Timeout) IsValid() bool { - return !t.ZeroHeight() || !t.ZeroTimestamp() + return !t.ZeroHeight() || !t.ZeroTimestamp() } // ZeroHeight returns true if Timeout height is zero, otherwise false. func (t Timeout) ZeroHeight() bool { - return t.Height.IsZero() + return t.Height.IsZero() } // ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. func (t Timeout) ZeroTimestamp() bool { - return t.Timestamp == 0 -} \ No newline at end of file + return t.Timestamp == 0 +} diff --git a/modules/core/04-channel/types/upgrade.pb.go b/modules/core/04-channel/types/upgrade.pb.go index 079809c35be..3ce355ef4d1 100644 --- a/modules/core/04-channel/types/upgrade.pb.go +++ b/modules/core/04-channel/types/upgrade.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" io "io" math "math" math_bits "math/bits" @@ -29,9 +28,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // end, the timeout for this upgrade attempt and the latest packet sequence sent // to allow the counterparty to block sends after the upgrade has started. type Upgrade struct { - Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` - Timeout UpgradeTimeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` - LatestSequenceSend uint64 `protobuf:"varint,3,opt,name=latest_sequence_send,json=latestSequenceSend,proto3" json:"latest_sequence_send,omitempty"` + Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` + Timeout Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` + LatestSequenceSend uint64 `protobuf:"varint,3,opt,name=latest_sequence_send,json=latestSequenceSend,proto3" json:"latest_sequence_send,omitempty"` } func (m *Upgrade) Reset() { *m = Upgrade{} } @@ -74,11 +73,11 @@ func (m *Upgrade) GetFields() UpgradeFields { return UpgradeFields{} } -func (m *Upgrade) GetTimeout() UpgradeTimeout { +func (m *Upgrade) GetTimeout() Timeout { if m != nil { return m.Timeout } - return UpgradeTimeout{} + return Timeout{} } func (m *Upgrade) GetLatestSequenceSend() uint64 { @@ -150,62 +149,6 @@ func (m *UpgradeFields) GetVersion() string { return "" } -// UpgradeTimeout defines a type which encapsulates the upgrade timeout values at which the counterparty -// must no longer proceed with the upgrade handshake. -type UpgradeTimeout struct { - // block height after which the upgrade times out - Height types.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` - // block timestamp (in nanoseconds) after which the upgrade times out - Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (m *UpgradeTimeout) Reset() { *m = UpgradeTimeout{} } -func (m *UpgradeTimeout) String() string { return proto.CompactTextString(m) } -func (*UpgradeTimeout) ProtoMessage() {} -func (*UpgradeTimeout) Descriptor() ([]byte, []int) { - return fileDescriptor_fb1cef68588848b2, []int{2} -} -func (m *UpgradeTimeout) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpgradeTimeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpgradeTimeout.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 *UpgradeTimeout) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeTimeout.Merge(m, src) -} -func (m *UpgradeTimeout) XXX_Size() int { - return m.Size() -} -func (m *UpgradeTimeout) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeTimeout.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeTimeout proto.InternalMessageInfo - -func (m *UpgradeTimeout) GetHeight() types.Height { - if m != nil { - return m.Height - } - return types.Height{} -} - -func (m *UpgradeTimeout) GetTimestamp() uint64 { - if m != nil { - return m.Timestamp - } - return 0 -} - // ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the // upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the // next sequence. @@ -220,7 +163,7 @@ func (m *ErrorReceipt) Reset() { *m = ErrorReceipt{} } func (m *ErrorReceipt) String() string { return proto.CompactTextString(m) } func (*ErrorReceipt) ProtoMessage() {} func (*ErrorReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_fb1cef68588848b2, []int{3} + return fileDescriptor_fb1cef68588848b2, []int{2} } func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -266,43 +209,38 @@ func (m *ErrorReceipt) GetError() string { func init() { proto.RegisterType((*Upgrade)(nil), "ibc.core.channel.v1.Upgrade") proto.RegisterType((*UpgradeFields)(nil), "ibc.core.channel.v1.UpgradeFields") - proto.RegisterType((*UpgradeTimeout)(nil), "ibc.core.channel.v1.UpgradeTimeout") proto.RegisterType((*ErrorReceipt)(nil), "ibc.core.channel.v1.ErrorReceipt") } func init() { proto.RegisterFile("ibc/core/channel/v1/upgrade.proto", fileDescriptor_fb1cef68588848b2) } var fileDescriptor_fb1cef68588848b2 = []byte{ - // 450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x9b, 0xad, 0xb4, 0xab, 0x81, 0x22, 0x99, 0x1e, 0xa2, 0x0a, 0x65, 0x25, 0x1c, 0xe8, - 0x65, 0xc9, 0x3a, 0x10, 0x7f, 0x6e, 0xd3, 0x10, 0x68, 0x37, 0xa4, 0x14, 0x2e, 0x5c, 0xaa, 0xc6, - 0x79, 0x49, 0x2c, 0x25, 0x7e, 0x83, 0xed, 0x44, 0xe2, 0x2b, 0x70, 0xe2, 0x33, 0x71, 0xda, 0x71, - 0x47, 0x4e, 0x08, 0xb5, 0x5f, 0x04, 0xc5, 0x4e, 0x56, 0x26, 0x55, 0xbb, 0xf9, 0xf5, 0xfb, 0xf3, - 0xe3, 0xc7, 0x8f, 0x5f, 0xf2, 0x94, 0xc7, 0x2c, 0x64, 0x28, 0x21, 0x64, 0xd9, 0x5a, 0x08,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, 0xc3, 0xf9, 0x28, 0x1a, 0xef, 0xb6, 0x2f, 0xb1, 0x54, 0xd4, 0x25, 0xc3, - 0x1a, 0xa4, 0xe2, 0x28, 0x8c, 0xaf, 0x51, 0xd4, 0x95, 0x7e, 0x46, 0xc6, 0xb7, 0xdf, 0x47, 0xdf, - 0x90, 0x41, 0x06, 0x3c, 0xcd, 0x74, 0x9b, 0xeb, 0xff, 0x56, 0xec, 0x77, 0xd5, 0x8b, 0xe0, 0xd2, - 0x10, 0x5d, 0x9e, 0x96, 0xa7, 0x4f, 0xc8, 0xa8, 0x49, 0x45, 0xe9, 0x75, 0x51, 0x9a, 0x44, 0xfb, - 0xd1, 0x6e, 0xc3, 0x3f, 0x27, 0x0f, 0xde, 0x4b, 0x89, 0x32, 0x02, 0x06, 0xbc, 0xd4, 0x74, 0x4a, - 0x8e, 0xba, 0xc4, 0xcc, 0x4d, 0xfd, 0xe8, 0xa6, 0xa6, 0x13, 0x72, 0x0f, 0x1a, 0xd6, 0xa8, 0x8c, - 0x22, 0x5b, 0x5c, 0x2c, 0xaf, 0x36, 0x9e, 0x73, 0xbd, 0xf1, 0x9c, 0xbf, 0x1b, 0xcf, 0xf9, 0xb9, - 0xf5, 0x7a, 0xd7, 0x5b, 0xaf, 0xf7, 0x7b, 0xeb, 0xf5, 0xbe, 0xbc, 0x4d, 0xb9, 0xce, 0xaa, 0x38, - 0x60, 0x58, 0x84, 0x0c, 0x55, 0x81, 0x2a, 0xe4, 0x31, 0x3b, 0x49, 0x31, 0xac, 0x5f, 0x87, 0x05, - 0x26, 0x55, 0x0e, 0xca, 0x8e, 0xd6, 0xe9, 0xcb, 0x93, 0x6e, 0xba, 0xf4, 0xf7, 0x12, 0x54, 0x3c, - 0x30, 0x93, 0xf5, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x32, 0xbd, 0xfd, 0xed, 0x02, - 0x00, 0x00, + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xad, 0xac, 0xab, 0x81, 0x21, 0x99, 0x1e, 0xa2, 0x0a, 0x85, 0x92, 0x0b, 0xbd, + 0x2c, 0xde, 0x06, 0x02, 0x21, 0x71, 0x98, 0x26, 0x81, 0xb8, 0x21, 0xb9, 0x70, 0xe1, 0x52, 0x35, + 0xce, 0x23, 0xb5, 0x94, 0xf8, 0x05, 0xdb, 0x89, 0xc4, 0x57, 0xe0, 0xc4, 0xf7, 0xe1, 0x0b, 0xec, + 0xb8, 0x23, 0x27, 0x84, 0xda, 0x2f, 0x82, 0xe2, 0x24, 0x43, 0x93, 0x72, 0xf3, 0xf3, 0xfb, 0xfd, + 0xff, 0xfe, 0x3f, 0x3f, 0xfa, 0x4c, 0x25, 0x92, 0x4b, 0x34, 0xc0, 0xe5, 0x76, 0xa3, 0x35, 0xe4, + 0xbc, 0x3e, 0xe7, 0x55, 0x99, 0x99, 0x4d, 0x0a, 0x71, 0x69, 0xd0, 0x21, 0x7b, 0xac, 0x12, 0x19, + 0x37, 0x48, 0xdc, 0x21, 0x71, 0x7d, 0x3e, 0x9f, 0x65, 0x98, 0xa1, 0xef, 0xf3, 0xe6, 0xd4, 0xa2, + 0xf3, 0x41, 0xb7, 0x5e, 0xe5, 0x91, 0xe8, 0x17, 0xa1, 0x93, 0xcf, 0xad, 0x3f, 0xbb, 0xa4, 0x47, + 0x5f, 0x15, 0xe4, 0xa9, 0x0d, 0xc8, 0x82, 0x2c, 0xef, 0x5f, 0x44, 0xf1, 0xc0, 0x53, 0x71, 0x47, + 0xbf, 0xf7, 0xe4, 0xd5, 0xf8, 0xfa, 0xcf, 0xd3, 0x91, 0xe8, 0x74, 0xec, 0x2d, 0x9d, 0x38, 0x55, + 0x00, 0x56, 0x2e, 0x38, 0xf0, 0x16, 0x4f, 0x06, 0x2d, 0x3e, 0xb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 0x4f, 0xfb, 0x65, 0xbb, 0xef, 0x25, 0xd8, 0xe4, 0xc8, 0x2f, 0xfa, 0xc5, 0xbf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x02, 0xa2, 0xb4, 0xcd, 0x5b, 0x02, 0x00, 0x00, } func (m *Upgrade) Marshal() (dAtA []byte, err error) { @@ -397,44 +335,6 @@ func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *UpgradeTimeout) 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 *UpgradeTimeout) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpgradeTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != 0 { - i = encodeVarintUpgrade(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintUpgrade(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ErrorReceipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -519,20 +419,6 @@ func (m *UpgradeFields) Size() (n int) { return n } -func (m *UpgradeTimeout) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Height.Size() - n += 1 + l + sovUpgrade(uint64(l)) - if m.Timestamp != 0 { - n += 1 + sovUpgrade(uint64(m.Timestamp)) - } - return n -} - func (m *ErrorReceipt) Size() (n int) { if m == nil { return 0 @@ -823,108 +709,6 @@ func (m *UpgradeFields) Unmarshal(dAtA []byte) error { } return nil } -func (m *UpgradeTimeout) 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 ErrIntOverflowUpgrade - } - 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: UpgradeTimeout: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradeTimeout: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUpgrade - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthUpgrade - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthUpgrade - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUpgrade - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipUpgrade(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthUpgrade - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ErrorReceipt) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 60d2b0e9b4e..cc4771b5304 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -84,7 +84,7 @@ func (suite *TypesTestSuite) TestUpgradeTimeout() { func (suite *TypesTestSuite) TestHasPassed() { var ( path *ibctesting.Path - upgradeTimeout types.UpgradeTimeout + upgradeTimeout types.Timeout passInfo string ) diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index bd103d0fed6..6f1a54e5287 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -168,3 +168,12 @@ message Acknowledgement { string error = 22; } } + +// Timeout defines a type which encapsulates the timeout values at which the counterparty +// must no longer proceed either a handshake or an upgrade. +message Timeout { + // block height after which the upgrade times out + ibc.core.client.v1.Height height = 1 [(gogoproto.nullable) = false]; + // block timestamp (in nanoseconds) after which the upgrade times out + uint64 timestamp = 2; +} \ No newline at end of file diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index aac5c57d5e7..a80deff794a 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -263,11 +263,11 @@ message MsgChannelUpgradeInit { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string port_id = 1; - string channel_id = 2; - UpgradeFields fields = 3 [(gogoproto.nullable) = false]; - UpgradeTimeout timeout = 4 [(gogoproto.nullable) = false]; - string signer = 5; + string port_id = 1; + string channel_id = 2; + UpgradeFields fields = 3 [(gogoproto.nullable) = false]; + Timeout timeout = 4 [(gogoproto.nullable) = false]; + string signer = 5; } // MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type @@ -285,7 +285,7 @@ message MsgChannelUpgradeTry { string port_id = 1; string channel_id = 2; repeated string proposed_upgrade_connection_hops = 3; - UpgradeTimeout upgrade_timeout = 4 [(gogoproto.nullable) = false]; + Timeout upgrade_timeout = 4 [(gogoproto.nullable) = false]; Upgrade counterparty_proposed_upgrade = 5 [(gogoproto.nullable) = false]; uint64 counterparty_upgrade_sequence = 6; bytes proof_channel = 7; diff --git a/proto/ibc/core/channel/v1/upgrade.proto b/proto/ibc/core/channel/v1/upgrade.proto index 1584651e3b0..6282bf38d31 100644 --- a/proto/ibc/core/channel/v1/upgrade.proto +++ b/proto/ibc/core/channel/v1/upgrade.proto @@ -5,7 +5,6 @@ package ibc.core.channel.v1; option go_package = "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; import "ibc/core/channel/v1/channel.proto"; // Upgrade is a verifiable type which contains the relevant information @@ -13,9 +12,9 @@ import "ibc/core/channel/v1/channel.proto"; // end, the timeout for this upgrade attempt and the latest packet sequence sent // to allow the counterparty to block sends after the upgrade has started. message Upgrade { - UpgradeFields fields = 1 [(gogoproto.nullable) = false]; - UpgradeTimeout timeout = 2 [(gogoproto.nullable) = false]; - uint64 latest_sequence_send = 3; + UpgradeFields fields = 1 [(gogoproto.nullable) = false]; + Timeout timeout = 2 [(gogoproto.nullable) = false]; + uint64 latest_sequence_send = 3; } // UpgradeFields are the fields in a channel end which may be changed @@ -26,15 +25,6 @@ message UpgradeFields { string version = 3; } -// UpgradeTimeout defines a type which encapsulates the upgrade timeout values at which the counterparty -// must no longer proceed with the upgrade handshake. -message UpgradeTimeout { - // block height after which the upgrade times out - ibc.core.client.v1.Height height = 1 [(gogoproto.nullable) = false]; - // block timestamp (in nanoseconds) after which the upgrade times out - uint64 timestamp = 2; -} - // ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the // upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the // next sequence. From 566e1d60a14834687fc3ab8ef12b521f5d39b445 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 11:19:49 +0200 Subject: [PATCH 20/35] util functions --- modules/core/04-channel/types/msgs_test.go | 13 ---- modules/core/04-channel/types/packet.go | 33 ++++++++++ modules/core/04-channel/types/packet_test.go | 1 + modules/core/04-channel/types/upgrade.go | 29 -------- modules/core/04-channel/types/upgrade_test.go | 66 ------------------- 5 files changed, 34 insertions(+), 108 deletions(-) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 80d9ab9618b..0b9bc41605b 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -72,12 +72,6 @@ type TypesTestSuite struct { suite.Suite proof []byte - - coordinator *ibctesting.Coordinator - - // testing chains used for convenience and readability - chainA *ibctesting.TestChain - chainB *ibctesting.TestChain } func (suite *TypesTestSuite) SetupTest() { @@ -109,13 +103,6 @@ func (suite *TypesTestSuite) SetupTest() { suite.proof = proof } -// SetupTestCoordinator creates a coordinator with 2 test chains. -func (suite *TypesTestSuite) SetupTestCoordinator() { - suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) - suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) - suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) -} - func TestTypesTestSuite(t *testing.T) { suite.Run(t, new(TypesTestSuite)) } diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index c007f3af9b0..15ea217c06b 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -133,3 +133,36 @@ func (p PacketId) Validate() error { func NewPacketID(portID, channelID string, seq uint64) PacketId { return PacketId{PortId: portID, ChannelId: channelID, Sequence: seq} } + +// NewTimeout creates a new Timeout instance. +func NewTimeout(height clienttypes.Height, timestamp uint64) Timeout { + return Timeout{ + Height: height, + Timestamp: timestamp, + } +} + +// AfterHeight returns true if Timeout height is greater than the provided height. +func (t Timeout) AfterHeight(height clienttypes.Height) bool { + return t.Height.GT(height) +} + +// AfterTimestamp returns true is Timeout timestamp is greater than the provided timestamp. +func (t Timeout) AfterTimestamp(timestamp uint64) bool { + return t.Timestamp > timestamp +} + +// IsValid validates the Timeout. It ensures that either height or timestamp is set. +func (t Timeout) IsValid() bool { + return !t.ZeroHeight() || !t.ZeroTimestamp() +} + +// ZeroHeight returns true if Timeout height is zero, otherwise false. +func (t Timeout) ZeroHeight() bool { + return t.Height.IsZero() +} + +// ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. +func (t Timeout) ZeroTimestamp() bool { + return t.Timestamp == 0 +} diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index 780844dbb54..78b271242d5 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -51,3 +51,4 @@ func TestPacketValidateBasic(t *testing.T) { } } } + diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 5bb7a2841af..a2cf2d87619 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -64,32 +64,3 @@ func (uf UpgradeFields) ValidateBasic() error { return nil } - -// Timeout defines an exeuction deadline structure for 04-channel msg handlers. -// This includes packet lifecycle handlers as well as handshake and upgrade protocol handlers. -// A valid Timeout contains either one or both of a timestamp and block height (sequence). - -// AfterHeight returns true if Timeout height is greater than the provided height. -func (t Timeout) AfterHeight(height clienttypes.Height) bool { - return t.Height.GT(height) -} - -// AfterTimestamp returns true is Timeout timestamp is greater than the provided timestamp. -func (t Timeout) AfterTimestamp(timestamp uint64) bool { - return t.Timestamp > timestamp -} - -// IsValid validates the Timeout. It ensures that either height or timestamp is set. -func (t Timeout) IsValid() bool { - return !t.ZeroHeight() || !t.ZeroTimestamp() -} - -// ZeroHeight returns true if Timeout height is zero, otherwise false. -func (t Timeout) ZeroHeight() bool { - return t.Height.IsZero() -} - -// ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. -func (t Timeout) ZeroTimestamp() bool { - return t.Timestamp == 0 -} diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index cc4771b5304..032c7a5363a 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -3,7 +3,6 @@ package types_test import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/mock" ) @@ -80,68 +79,3 @@ func (suite *TypesTestSuite) TestUpgradeTimeout() { }) } } - -func (suite *TypesTestSuite) TestHasPassed() { - var ( - path *ibctesting.Path - upgradeTimeout types.Timeout - passInfo string - ) - - testCases := []struct { - name string - malleate func() - expPass bool - }{ - { - "timeout has not passed", - func() {}, - false, - }, - { - "timeout height has passed", - func() { - upgradeTimeout.Height = clienttypes.NewHeight( - clienttypes.ParseChainID(path.EndpointA.Chain.GetContext().ChainID()), - uint64(suite.chainA.GetContext().BlockHeight())-1, - ) - passInfo = "upgrade timeout has passed at block height 1-17, timeout height 1-16" - }, - true, - }, - { - "timeout timestamp has passed", - func() { - upgradeTimeout.Height = clienttypes.ZeroHeight() - upgradeTimeout.Timestamp = uint64(suite.chainA.GetContext().BlockTime().UnixNano() - 1) - passInfo = "upgrade timeout has passed at block timestamp 1577923350000000000, timeout timestamp 1577923349999999999" - }, - true, - }, - } - - for _, tc := range testCases { - tc := tc - suite.Run(tc.name, func() { - suite.SetupTestCoordinator() - - path = ibctesting.NewPath(suite.chainA, suite.chainB) - suite.coordinator.Setup(path) - - upgradeTimeout = types.NewUpgradeTimeout(path.EndpointA.Chain.GetTimeoutHeight(), 0) - - tc.malleate() - - passed, info := upgradeTimeout.HasPassed(suite.chainA.GetContext()) - - if tc.expPass { - suite.Require().True(passed) - suite.Require().Equal(passInfo, info) - - } else { - suite.Require().False(passed) - suite.Require().Equal("upgrade timeout has not passed", info) - } - }) - } -} From 1ac3ece45d84c9d2e4422c23342a54678139e435 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 11:23:01 +0200 Subject: [PATCH 21/35] update protodoc in generated pb --- modules/core/04-channel/types/channel.pb.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 252df36476d..8034f853fe5 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -499,8 +499,9 @@ func (*Acknowledgement) XXX_OneofWrappers() []interface{} { } } -// Timeout defines a type which encapsulates the timeout values at which the counterparty -// must no longer proceed either a handshake or an upgrade. +// Timeout defines an exeuction deadline structure for 04-channel msg handlers. +// This includes packet lifecycle handlers as well as handshake and upgrade protocol handlers. +// A valid Timeout contains either one or both of a timestamp and block height (sequence). type Timeout struct { // block height after which the upgrade times out Height types.Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height"` From 0ee912b4817107f9411404361b01fe3730ddf402 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 11:35:47 +0200 Subject: [PATCH 22/35] update --- modules/core/03-connection/keeper/verify_test.go | 2 +- modules/core/04-channel/keeper/grpc_query_test.go | 2 +- modules/core/04-channel/keeper/upgrade_test.go | 4 ++-- modules/core/04-channel/types/msgs_test.go | 6 +++--- modules/core/04-channel/types/upgrade.go | 9 --------- modules/core/04-channel/types/upgrade_test.go | 2 +- testing/endpoint.go | 2 +- 7 files changed, 9 insertions(+), 18 deletions(-) diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index 55e2cad1679..7026824e644 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -889,7 +889,7 @@ func (suite *KeeperTestSuite) TestVerifyUpgrade() { upgrade = channeltypes.NewUpgrade( channeltypes.NewUpgradeFields(channeltypes.UNORDERED, []string{path.EndpointA.ConnectionID}, "v1.0.0"), - channeltypes.NewUpgradeTimeout(clienttypes.ZeroHeight(), 100000), + channeltypes.NewTimeout(clienttypes.ZeroHeight(), 100000), 0, ) diff --git a/modules/core/04-channel/keeper/grpc_query_test.go b/modules/core/04-channel/keeper/grpc_query_test.go index 8ac7371de45..bd2194c25a4 100644 --- a/modules/core/04-channel/keeper/grpc_query_test.go +++ b/modules/core/04-channel/keeper/grpc_query_test.go @@ -1615,7 +1615,7 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { expectedUpgrade = *types.NewUpgrade( types.NewUpgradeFields(types.UNORDERED, []string{ibctesting.FirstConnectionID}, mock.Version), - types.NewUpgradeTimeout(clienttypes.ZeroHeight(), 1000000), + types.NewTimeout(clienttypes.ZeroHeight(), 1000000), 1, ) diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index ca0e1b63b0f..cc42c6d0e81 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -44,7 +44,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { types.NewUpgradeFields( channel.Ordering, channel.ConnectionHops, channel.Version, ), - types.NewUpgradeTimeout(path.EndpointB.Chain.GetTimeoutHeight(), 0), + types.NewTimeout(path.EndpointB.Chain.GetTimeoutHeight(), 0), 0, ) }, @@ -106,7 +106,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { types.NewUpgradeFields( types.UNORDERED, []string{path.EndpointA.ConnectionID}, fmt.Sprintf("%s-v2", mock.Version), ), - types.NewUpgradeTimeout(path.EndpointB.Chain.GetTimeoutHeight(), 0), + types.NewTimeout(path.EndpointB.Chain.GetTimeoutHeight(), 0), 0, ) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 0b9bc41605b..e40a87dcbd5 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -488,7 +488,7 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeInitValidateBasic() { msg = types.NewMsgChannelUpgradeInit( ibctesting.MockPort, ibctesting.FirstChannelID, types.NewUpgradeFields(types.UNORDERED, []string{ibctesting.FirstConnectionID}, mock.Version), - types.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), + types.NewTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), addr, ) @@ -589,14 +589,14 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTryValidateBasic() { suite.Run(tc.name, func() { counterpartyProposedUpgrade := types.NewUpgrade( types.NewUpgradeFields(types.UNORDERED, []string{ibctesting.FirstChannelID}, mock.Version), - types.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), + types.NewTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), 1, ) msg = types.NewMsgChannelUpgradeTry( ibctesting.MockPort, ibctesting.FirstChannelID, []string{ibctesting.FirstChannelID}, - types.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), + types.NewTimeout(clienttypes.NewHeight(0, 10000), timeoutTimestamp), *counterpartyProposedUpgrade, 1, suite.proof, diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index a2cf2d87619..0f07d4e7b62 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -6,7 +6,6 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/ibc-go/v7/internal/collections" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" ) // NewUpgrade creates a new Upgrade instance. @@ -27,14 +26,6 @@ func NewUpgradeFields(ordering Order, connectionHops []string, version string) U } } -// NewUpgradeTimeout returns a new UpgradeTimeout instance. -func NewUpgradeTimeout(height clienttypes.Height, timestamp uint64) Timeout { - return Timeout{ - Height: height, - Timestamp: timestamp, - } -} - // ValidateBasic performs a basic validation of the upgrade fields func (u Upgrade) ValidateBasic() error { if err := u.Fields.ValidateBasic(); err != nil { diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 032c7a5363a..c92a880d9ff 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -60,7 +60,7 @@ func (suite *TypesTestSuite) TestUpgradeTimeout() { []string{"connection-0"}, mock.Version, ), - types.NewUpgradeTimeout( + types.NewTimeout( clienttypes.NewHeight(0, 100), 0, ), diff --git a/testing/endpoint.go b/testing/endpoint.go index 1705940c741..5368dfcd8a7 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -569,7 +569,7 @@ func (endpoint *Endpoint) ChanUpgradeInit(timeoutHeight clienttypes.Height, time endpoint.ChannelConfig.PortID, endpoint.ChannelID, channeltypes.NewUpgradeFields(endpoint.ChannelConfig.Order, []string{endpoint.ConnectionID}, endpoint.ChannelConfig.Version), - channeltypes.NewUpgradeTimeout(timeoutHeight, timeoutTimestamp), + channeltypes.NewTimeout(timeoutHeight, timeoutTimestamp), endpoint.Chain.SenderAccount.GetAddress().String(), ) From 3797dea58b086461a419627ce5d2ddc8fcad3f5e Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 11:46:55 +0200 Subject: [PATCH 23/35] lint --- modules/core/04-channel/types/packet_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index 78b271242d5..780844dbb54 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -51,4 +51,3 @@ func TestPacketValidateBasic(t *testing.T) { } } } - From 662eccddcf963ef5434a7c4aecd052cb7e7de560 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 10 May 2023 12:16:06 +0200 Subject: [PATCH 24/35] update send packet api --- .../controller/ibc_middleware.go | 4 +--- .../controller/keeper/relay.go | 3 ++- modules/apps/29-fee/ibc_middleware.go | 6 ++---- modules/apps/29-fee/keeper/relay.go | 6 ++---- modules/apps/transfer/keeper/relay.go | 3 ++- modules/core/04-channel/keeper/packet.go | 16 ++++++++++------ modules/core/04-channel/keeper/packet_test.go | 3 ++- modules/core/05-port/types/module.go | 4 +--- testing/endpoint.go | 3 ++- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index d58b3ac04d3..066a1c14695 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" @@ -256,8 +255,7 @@ func (im IBCMiddleware) SendPacket( chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + timeout channeltypes.Timeout, data []byte, ) (uint64, error) { panic("SendPacket not supported for ICA controller module. Please use SendTx") diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay.go b/modules/apps/27-interchain-accounts/controller/keeper/relay.go index b8a5996a5a0..25c01a59c79 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay.go @@ -44,7 +44,8 @@ func (k Keeper) sendTx(ctx sdk.Context, connectionID, portID string, icaPacketDa return 0, errorsmod.Wrap(err, "invalid interchain account packet data") } - sequence, err := k.ics4Wrapper.SendPacket(ctx, chanCap, portID, activeChannelID, clienttypes.ZeroHeight(), timeoutTimestamp, icaPacketData.GetBytes()) + timeout := channeltypes.NewTimeout(clienttypes.ZeroHeight(), timeoutTimestamp) + sequence, err := k.ics4Wrapper.SendPacket(ctx, chanCap, portID, activeChannelID, timeout, icaPacketData.GetBytes()) if err != nil { return 0, err } diff --git a/modules/apps/29-fee/ibc_middleware.go b/modules/apps/29-fee/ibc_middleware.go index 65ad464f13f..301596a813d 100644 --- a/modules/apps/29-fee/ibc_middleware.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -351,11 +350,10 @@ func (im IBCMiddleware) SendPacket( chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + timeout channeltypes.Timeout, data []byte, ) (uint64, error) { - return im.keeper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + return im.keeper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeout, data) } // WriteAcknowledgement implements the ICS4 Wrapper interface diff --git a/modules/apps/29-fee/keeper/relay.go b/modules/apps/29-fee/keeper/relay.go index 556e056c22d..13b008c0c79 100644 --- a/modules/apps/29-fee/keeper/relay.go +++ b/modules/apps/29-fee/keeper/relay.go @@ -8,7 +8,6 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) @@ -19,11 +18,10 @@ func (k Keeper) SendPacket( chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + timeout channeltypes.Timeout, data []byte, ) (uint64, error) { - return k.ics4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + return k.ics4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeout, data) } // WriteAcknowledgement wraps IBC ChannelKeeper's WriteAcknowledgement function diff --git a/modules/apps/transfer/keeper/relay.go b/modules/apps/transfer/keeper/relay.go index 62d4135e072..191201d212b 100644 --- a/modules/apps/transfer/keeper/relay.go +++ b/modules/apps/transfer/keeper/relay.go @@ -134,7 +134,8 @@ func (k Keeper) sendTransfer( fullDenomPath, token.Amount.String(), sender.String(), receiver, memo, ) - sequence, err := k.ics4Wrapper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetData.GetBytes()) + timeout := channeltypes.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := k.ics4Wrapper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeout, packetData.GetBytes()) if err != nil { return 0, err } diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index 59be12b73ec..72336459b4d 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -24,8 +24,7 @@ func (k Keeper) SendPacket( channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + timeout types.Timeout, data []byte, ) (uint64, error) { channel, found := k.GetChannel(ctx, sourcePort, sourceChannel) @@ -54,7 +53,7 @@ func (k Keeper) SendPacket( // construct packet from given fields and channel state packet := types.NewPacket(data, sequence, sourcePort, sourceChannel, - channel.Counterparty.PortId, channel.Counterparty.ChannelId, timeoutHeight, timeoutTimestamp) + channel.Counterparty.PortId, channel.Counterparty.ChannelId, timeout.Height, timeout.Timestamp) if err := packet.ValidateBasic(); err != nil { return 0, errorsmod.Wrap(err, "constructed packet failed basic validation") @@ -77,10 +76,15 @@ func (k Keeper) SendPacket( // check if packet is timed out on the receiving chain latestHeight := clientState.GetLatestHeight() - if !timeoutHeight.IsZero() && latestHeight.GTE(timeoutHeight) { + timeoutHeight, ok := latestHeight.(clienttypes.Height) + if !ok { + return 0, errorsmod.Wrapf(clienttypes.ErrInvalidHeight, "invalid height type %T, expected %T", latestHeight, clienttypes.Height{}) + } + + if !timeout.ZeroHeight() && !timeout.AfterHeight(timeoutHeight) { return 0, errorsmod.Wrapf( types.ErrPacketTimeout, - "receiving chain block height >= packet timeout height (%s >= %s)", latestHeight, timeoutHeight, + "receiving chain block height >= packet timeout height (%s >= %s)", latestHeight, timeout.Height, ) } @@ -101,7 +105,7 @@ func (k Keeper) SendPacket( k.SetNextSequenceSend(ctx, sourcePort, sourceChannel, sequence+1) k.SetPacketCommitment(ctx, sourcePort, sourceChannel, packet.GetSequence(), commitment) - emitSendPacketEvent(ctx, packet, channel, timeoutHeight) + emitSendPacketEvent(ctx, packet, channel, timeout.Height) k.Logger(ctx).Info( "packet sent", diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 64a1154a2a2..a51e4709b46 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -238,8 +238,9 @@ func (suite *KeeperTestSuite) TestSendPacket() { // only check if nextSequenceSend exists in no error case since it is a tested error case above. expectedSequence, ok := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceSend(suite.chainA.GetContext(), sourcePort, sourceChannel) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) sequence, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.SendPacket(suite.chainA.GetContext(), channelCap, - sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetData) + sourcePort, sourceChannel, timeout, packetData) if tc.expPass { suite.Require().NoError(err) diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index 2d5f0e1572a..3a35db7be8b 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -4,7 +4,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" ) @@ -159,8 +158,7 @@ type ICS4Wrapper interface { chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, + timeout channeltypes.Timeout, data []byte, ) (sequence uint64, err error) diff --git a/testing/endpoint.go b/testing/endpoint.go index 5368dfcd8a7..2cf205b80e2 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -431,7 +431,8 @@ func (endpoint *Endpoint) SendPacket( channelCap := endpoint.Chain.GetChannelCapability(endpoint.ChannelConfig.PortID, endpoint.ChannelID) // no need to send message, acting as a module - sequence, err := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.SendPacket(endpoint.Chain.GetContext(), channelCap, endpoint.ChannelConfig.PortID, endpoint.ChannelID, timeoutHeight, timeoutTimestamp, data) + timeout := channeltypes.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.SendPacket(endpoint.Chain.GetContext(), channelCap, endpoint.ChannelConfig.PortID, endpoint.ChannelID, timeout, data) if err != nil { return 0, err } From 058da606151dd367bd6031f6e7a94297f56ebd01 Mon Sep 17 00:00:00 2001 From: Charly Date: Tue, 16 May 2023 13:36:36 +0200 Subject: [PATCH 25/35] update --- modules/core/04-channel/types/timeout.go | 8 +- modules/core/04-channel/types/timeout_test.go | 108 ++++++++++++++++++ 2 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 modules/core/04-channel/types/timeout_test.go diff --git a/modules/core/04-channel/types/timeout.go b/modules/core/04-channel/types/timeout.go index 8691fbef283..17c6265445b 100644 --- a/modules/core/04-channel/types/timeout.go +++ b/modules/core/04-channel/types/timeout.go @@ -24,15 +24,15 @@ func (t Timeout) AfterTimestamp(timestamp uint64) bool { // IsValid validates the Timeout. It ensures that either height or timestamp is set. func (t Timeout) IsValid() bool { - return !t.ZeroHeight() || !t.ZeroTimestamp() + return !t.IsZeroHeight() || !t.IsZeroTimestamp() } -// ZeroHeight returns true if Timeout height is zero, otherwise false. -func (t Timeout) ZeroHeight() bool { +// IsZeroHeight returns true if Timeout height is zero, otherwise false. +func (t Timeout) IsZeroHeight() bool { return t.Height.IsZero() } // ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. -func (t Timeout) ZeroTimestamp() bool { +func (t Timeout) IsZeroTimestamp() bool { return t.Timestamp == 0 } diff --git a/modules/core/04-channel/types/timeout_test.go b/modules/core/04-channel/types/timeout_test.go new file mode 100644 index 00000000000..2e6b5be00c8 --- /dev/null +++ b/modules/core/04-channel/types/timeout_test.go @@ -0,0 +1,108 @@ +package types_test + +import ( + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" +) + +func (suite *TypesTestSuite) TestTimeoutPassed() { + var timeout types.Timeout + var passed bool + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "client height is not after timeout height", + func() { + passed = timeout.AfterHeight(clienttypes.NewHeight(0, 75)) + }, + false, + }, + { + "client timestamp is not after timeout timestamp", + func() { + passed = timeout.AfterTimestamp(75) + }, + false, + }, + { + "client height is after timeout height", + func() { + passed = timeout.AfterHeight(clienttypes.NewHeight(0, 25)) + }, + true, + }, + { + "client timestamp is after timeout timestamp", + func() { + passed = timeout.AfterTimestamp(25) + }, + true, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + timeout = types.NewTimeout( + clienttypes.NewHeight(0, 50), + 50, + ) + + tc.malleate() + + if tc.expPass { + suite.Require().True(passed) + } else { + suite.Require().False(passed) + } + }) + } +} +func (suite *TypesTestSuite) TestTimeout() { + var timeout types.Timeout + var valid bool + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "valid timeout", + func() {}, + true, + }, + { + "invalid timeout", + func() { + timeout.Height = clienttypes.ZeroHeight() + timeout.Timestamp = 0 + }, + false, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + timeout = types.NewTimeout( + clienttypes.NewHeight(0, 50), + 0, + ) + + tc.malleate() + + valid = timeout.IsValid() + + if tc.expPass { + suite.Require().True(valid) + } else { + suite.Require().False(valid) + } + }) + } +} From b29e55dee87326f06992526640dbcc8f2da3584a Mon Sep 17 00:00:00 2001 From: Charly Date: Tue, 16 May 2023 14:01:19 +0200 Subject: [PATCH 26/35] merge artifact --- modules/core/04-channel/types/upgrade_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index c92a880d9ff..9d518d80d0e 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -7,7 +7,7 @@ import ( ) func (suite *TypesTestSuite) TestUpgradeTimeout() { - var upgrade *types.Upgrade + var upgrade types.Upgrade testCases := []struct { name string From cf76f8a1f03a055d80a6a7bb6fa9a4be5947aed3 Mon Sep 17 00:00:00 2001 From: Charly Date: Tue, 16 May 2023 14:13:33 +0200 Subject: [PATCH 27/35] lint --- modules/core/04-channel/types/timeout_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/04-channel/types/timeout_test.go b/modules/core/04-channel/types/timeout_test.go index 2e6b5be00c8..3ed8e0d9ae8 100644 --- a/modules/core/04-channel/types/timeout_test.go +++ b/modules/core/04-channel/types/timeout_test.go @@ -62,6 +62,7 @@ func (suite *TypesTestSuite) TestTimeoutPassed() { }) } } + func (suite *TypesTestSuite) TestTimeout() { var timeout types.Timeout var valid bool From f58b7704ac8a01b4d47b1abba3f38e342323a964 Mon Sep 17 00:00:00 2001 From: Charly Date: Tue, 16 May 2023 14:28:41 +0200 Subject: [PATCH 28/35] fix e2e --- e2e/tests/core/04-channel/channel_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests/core/04-channel/channel_test.go b/e2e/tests/core/04-channel/channel_test.go index 8b08a118eea..6f1740d6934 100644 --- a/e2e/tests/core/04-channel/channel_test.go +++ b/e2e/tests/core/04-channel/channel_test.go @@ -31,7 +31,7 @@ func (s *ChannelUpgradeTestSuite) TestChannelUpgrade() { rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) t.Run("channel upgrade init", func(t *testing.T) { - upgradeTimeout := channeltypes.NewUpgradeTimeout(clienttypes.NewHeight(0, 10000), 0) + upgradeTimeout := channeltypes.NewTimeout(clienttypes.NewHeight(0, 10000), 0) upgradeFields := channeltypes.NewUpgradeFields(channeltypes.UNORDERED, channelA.ConnectionHops, `{"fee_version":"ics29-1","app_version":"ics20-1"}`) msgChanUpgradeInit := channeltypes.NewMsgChannelUpgradeInit( channelA.PortID, channelA.ChannelID, upgradeFields, upgradeTimeout, rlyWallet.FormattedAddress(), From f3544ddf0c236158ef1bf1b27084174ddeba9315 Mon Sep 17 00:00:00 2001 From: Charly Date: Tue, 16 May 2023 14:47:56 +0200 Subject: [PATCH 29/35] typo --- modules/core/04-channel/types/timeout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/04-channel/types/timeout.go b/modules/core/04-channel/types/timeout.go index 17c6265445b..25bed179ecd 100644 --- a/modules/core/04-channel/types/timeout.go +++ b/modules/core/04-channel/types/timeout.go @@ -32,7 +32,7 @@ func (t Timeout) IsZeroHeight() bool { return t.Height.IsZero() } -// ZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. +// IsZeroTimestamp returns true if Timeout timestamp is zero, otherwise false. func (t Timeout) IsZeroTimestamp() bool { return t.Timestamp == 0 } From 63ffea765a143960c8866fd0b5979346c0866c82 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 11:55:53 +0200 Subject: [PATCH 30/35] update tests --- modules/core/04-channel/types/timeout_test.go | 30 ++++++++++++++++--- modules/core/04-channel/types/upgrade_test.go | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/modules/core/04-channel/types/timeout_test.go b/modules/core/04-channel/types/timeout_test.go index 3ed8e0d9ae8..8ad260df93c 100644 --- a/modules/core/04-channel/types/timeout_test.go +++ b/modules/core/04-channel/types/timeout_test.go @@ -6,8 +6,10 @@ import ( ) func (suite *TypesTestSuite) TestTimeoutPassed() { - var timeout types.Timeout - var passed bool + var ( + timeout types.Timeout + passed bool + ) testCases := []struct { name string @@ -42,6 +44,27 @@ func (suite *TypesTestSuite) TestTimeoutPassed() { }, true, }, + { + "client timestamp equal to timeout timestamp", + func() { + passed = timeout.AfterTimestamp(50) + }, + false, + }, + { + "client block height equal to timeout block height", + func() { + passed = timeout.AfterHeight(clienttypes.NewHeight(0, 50)) + }, + false, + }, + { + "client block height equal to timeout block height, with different revision height", + func() { + passed = timeout.AfterHeight(clienttypes.NewHeight(1, 50)) + }, + false, + }, } for _, tc := range testCases { @@ -65,7 +88,6 @@ func (suite *TypesTestSuite) TestTimeoutPassed() { func (suite *TypesTestSuite) TestTimeout() { var timeout types.Timeout - var valid bool testCases := []struct { name string @@ -97,7 +119,7 @@ func (suite *TypesTestSuite) TestTimeout() { tc.malleate() - valid = timeout.IsValid() + valid := timeout.IsValid() if tc.expPass { suite.Require().True(valid) diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 9d518d80d0e..5ff156c1c5e 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/ibc-go/v7/testing/mock" ) -func (suite *TypesTestSuite) TestUpgradeTimeout() { +func (suite *TypesTestSuite) TestUpgradeValidateBasic() { var upgrade types.Upgrade testCases := []struct { From bb5c363550eeda17e5ca39505c1886028eb1e20e Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 11:57:34 +0200 Subject: [PATCH 31/35] update endpoint.go --- testing/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/endpoint.go b/testing/endpoint.go index 7bc438fe642..a5812500585 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -569,7 +569,7 @@ func (endpoint *Endpoint) ChanUpgradeInit(timeout channeltypes.Timeout) error { endpoint.ChannelConfig.PortID, endpoint.ChannelID, channeltypes.NewUpgradeFields(endpoint.ChannelConfig.Order, []string{endpoint.ConnectionID}, endpoint.ChannelConfig.Version), - channeltypes.NewTimeout(timeout.Height, timeout.Timestamp), + timeout, endpoint.Chain.SenderAccount.GetAddress().String(), ) From 97114b70c1c14856fe09bba36dfa8b7e43c6f0e4 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 12:49:21 +0200 Subject: [PATCH 32/35] update some tests --- .../core/04-channel/keeper/timeout_test.go | 150 +++++++++--------- modules/core/04-channel/types/upgrade_test.go | 2 +- 2 files changed, 75 insertions(+), 77 deletions(-) diff --git a/modules/core/04-channel/keeper/timeout_test.go b/modules/core/04-channel/keeper/timeout_test.go index e2f8ebc9305..91fc4876ff9 100644 --- a/modules/core/04-channel/keeper/timeout_test.go +++ b/modules/core/04-channel/keeper/timeout_test.go @@ -25,6 +25,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { nextSeqRecv uint64 ordered bool expError *errorsmod.Error + timeout types.Timeout ) testCases := []testCase{ @@ -33,12 +34,9 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) @@ -47,64 +45,64 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { ordered = false suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, true}, + }, + true}, {"packet already timed out: ORDERED", func() { expError = types.ErrNoOpMsg ordered = true path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, false}, + }, + false}, {"packet already timed out: UNORDERED", func() { expError = types.ErrNoOpMsg ordered = false suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, false}, + }, + false}, {"channel not found", func() { expError = types.ErrChannelNotFound // use wrong channel naming suite.coordinator.Setup(path) packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, + false}, {"channel not open", func() { expError = types.ErrInvalidChannelState suite.coordinator.Setup(path) timeoutHeight := path.EndpointA.GetClientState().GetLatestHeight().Increment().(clienttypes.Height) + timeout = types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) // need to update chainA's client representing chainB to prove missing ack @@ -113,19 +111,22 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { err = path.EndpointA.SetChannelState(types.CLOSED) suite.Require().NoError(err) - }, false}, + }, + false}, {"packet destination port ≠ channel counterparty port", func() { expError = types.ErrInvalidPacket suite.coordinator.Setup(path) // use wrong port for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, + false}, {"packet destination channel ID ≠ channel counterparty channel ID", func() { expError = types.ErrInvalidPacket suite.coordinator.Setup(path) // use wrong channel for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, + false}, {"connection not found", func() { expError = connectiontypes.ErrConnectionNotFound // pass channel check @@ -135,16 +136,21 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{connIDA}, path.EndpointA.ChannelConfig.Version), ) packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, + false}, {"timeout", func() { expError = types.ErrPacketTimeout suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, + false}, {"packet already received ", func() { expError = types.ErrPacketReceived ordered = true @@ -152,11 +158,10 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { suite.coordinator.Setup(path) nextSeqRecv = 2 - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -179,11 +184,11 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -195,11 +200,11 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -218,6 +223,10 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { nextSeqRecv = 1 // must be explicitly changed path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) + tc.malleate() orderedPacketKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) @@ -253,6 +262,7 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path *ibctesting.Path packet types.Packet chanCap *capabilitytypes.Capability + timeout types.Timeout ) testCases := []testCase{ @@ -260,13 +270,10 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"channel not found", func() { @@ -278,13 +285,10 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) chanCap = capabilitytypes.NewCapability(100) }, false}, } @@ -295,6 +299,10 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { suite.SetupTest() // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) + tc.malleate() err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutExecuted(suite.chainA.GetContext(), chanCap, packet) @@ -319,6 +327,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { chanCap *capabilitytypes.Capability nextSeqRecv uint64 ordered bool + timeout types.Timeout ) testCases := []testCase{ @@ -327,10 +336,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) @@ -338,16 +344,16 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"success: UNORDERED", func() { ordered = false suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) @@ -355,7 +361,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"channel not found", func() { @@ -401,10 +407,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { ordered = true suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) @@ -412,7 +415,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"channel verification failed ORDERED", func() { @@ -420,12 +423,9 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"next seq receive verification failed ORDERED", func() { @@ -434,10 +434,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) @@ -452,16 +449,16 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { ordered = true suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"channel capability not found ORDERED", func() { @@ -469,10 +466,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) suite.Require().NoError(err) @@ -494,6 +488,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { nextSeqRecv = 1 // must be explicitly changed path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) + tc.malleate() channelKey := host.ChannelKey(packet.GetDestPort(), packet.GetDestChannel()) diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index c92a880d9ff..9d518d80d0e 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -7,7 +7,7 @@ import ( ) func (suite *TypesTestSuite) TestUpgradeTimeout() { - var upgrade *types.Upgrade + var upgrade types.Upgrade testCases := []struct { name string From e5d5d728d22b1398c585f96e9f402cbe9ce38893 Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 12:59:58 +0200 Subject: [PATCH 33/35] update tests --- modules/core/04-channel/types/timeout_test.go | 10 +++++++++- modules/core/04-channel/types/upgrade_test.go | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/types/timeout_test.go b/modules/core/04-channel/types/timeout_test.go index 8ad260df93c..207c7e7a0d5 100644 --- a/modules/core/04-channel/types/timeout_test.go +++ b/modules/core/04-channel/types/timeout_test.go @@ -95,10 +95,18 @@ func (suite *TypesTestSuite) TestTimeout() { expPass bool }{ { - "valid timeout", + "valid timeout: timestamp not set", func() {}, true, }, + { + "valid timeout: height not set", + func() { + timeout.Height = clienttypes.ZeroHeight() + timeout.Timestamp = 50 + }, + true, + }, { "invalid timeout", func() { diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index 5ff156c1c5e..c35f1f8e696 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -3,6 +3,7 @@ package types_test import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/mock" ) @@ -57,7 +58,7 @@ func (suite *TypesTestSuite) TestUpgradeValidateBasic() { upgrade = types.NewUpgrade( types.NewUpgradeFields( types.ORDERED, - []string{"connection-0"}, + []string{ibctesting.FirstConnectionID}, mock.Version, ), types.NewTimeout( From 9f92ef1508fbc8ea6f0ead455a008866c03f968b Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 13:53:13 +0200 Subject: [PATCH 34/35] fix tests --- modules/apps/29-fee/keeper/msg_server_test.go | 6 +- .../core/03-connection/keeper/verify_test.go | 13 +- modules/core/04-channel/keeper/packet.go | 2 +- modules/core/04-channel/keeper/packet_test.go | 42 +++--- .../core/04-channel/keeper/timeout_test.go | 131 ++++++++++-------- modules/core/ante/ante_test.go | 13 +- modules/core/keeper/msg_server_test.go | 82 ++++++----- .../07-tendermint/client_state_test.go | 9 +- 8 files changed, 177 insertions(+), 121 deletions(-) diff --git a/modules/apps/29-fee/keeper/msg_server_test.go b/modules/apps/29-fee/keeper/msg_server_test.go index 4c7269931ad..153586fd9c4 100644 --- a/modules/apps/29-fee/keeper/msg_server_test.go +++ b/modules/apps/29-fee/keeper/msg_server_test.go @@ -429,9 +429,10 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { "packet already timed out", func() { timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) // try to incentivize a packet which is timed out - sequence, err := suite.path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := suite.path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack @@ -512,9 +513,10 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { suite.coordinator.Setup(suite.path) // setup channel timeoutHeight := clienttypes.NewHeight(clienttypes.ParseChainID(suite.chainB.ChainID), 100) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) // send a packet to incentivize - sequence, err := suite.path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := suite.path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, sequence) packet = channeltypes.NewPacket(ibctesting.MockPacketData, packetID.Sequence, packetID.PortId, packetID.ChannelId, suite.path.EndpointB.ChannelConfig.PortID, suite.path.EndpointB.ChannelID, timeoutHeight, 0) diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index 1a1486d771e..a23ce4abc95 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -341,7 +341,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { path = ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(defaultTimeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, 0) @@ -435,7 +436,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { suite.coordinator.Setup(path) // send and receive packet - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(defaultTimeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // increment receiving chain's (chainB) time by 2 hour to always pass receive @@ -540,7 +542,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { suite.coordinator.Setup(path) // send, only receive in malleate if applicable - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(defaultTimeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, 0) @@ -641,7 +644,9 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { suite.coordinator.Setup(path) // send and receive packet - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(defaultTimeoutHeight, 0) + + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // increment receiving chain's (chainB) time by 2 hour to always pass receive diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index 72336459b4d..4063e905dc0 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -81,7 +81,7 @@ func (k Keeper) SendPacket( return 0, errorsmod.Wrapf(clienttypes.ErrInvalidHeight, "invalid height type %T, expected %T", latestHeight, clienttypes.Height{}) } - if !timeout.ZeroHeight() && !timeout.AfterHeight(timeoutHeight) { + if !timeout.IsZeroHeight() && !timeout.AfterHeight(timeoutHeight) { return 0, errorsmod.Wrapf( types.ErrPacketTimeout, "receiving chain block height >= packet timeout height (%s >= %s)", latestHeight, timeout.Height, diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index a51e4709b46..757bcda6506 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -263,6 +263,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packet exported.PacketI channelCap *capabilitytypes.Capability expError *errorsmod.Error + timeout types.Timeout ) testCases := []testCase{ @@ -270,7 +271,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -278,7 +279,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { {"success UNORDERED channel", func() { // setup uses an UNORDERED channel suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -287,9 +288,9 @@ func (suite *KeeperTestSuite) TestRecvPacket() { // setup uses an UNORDERED channel suite.coordinator.Setup(path) // send 2 packets - _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + _, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) // attempts to receive packet 2 without receiving packet 1 @@ -301,7 +302,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -314,7 +315,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { // setup uses an UNORDERED channel suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -330,9 +331,9 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) // send 2 packets - _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + _, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) // attempts to receive packet 2 without receiving packet 1 @@ -362,7 +363,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) channelCap = capabilitytypes.NewCapability(3) @@ -460,7 +461,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { expError = types.ErrNoOpMsg suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetPacketReceipt(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sequence) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) @@ -483,6 +484,8 @@ func (suite *KeeperTestSuite) TestRecvPacket() { expError = nil // must explicitly set for failed cases path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeout = types.NewTimeout(defaultTimeoutHeight, disabledTimeoutTimestamp) + tc.malleate() // get proof of packet commitment from chainA @@ -624,6 +627,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap *capabilitytypes.Capability expError *errorsmod.Error + timeout types.Timeout ) testCases := []testCase{ @@ -632,7 +636,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -647,7 +651,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -664,7 +668,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -684,7 +688,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -721,7 +725,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -793,7 +797,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) @@ -805,7 +809,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet receipt and acknowledgement @@ -854,7 +858,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // create packet acknowledgement @@ -875,6 +879,8 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { expError = nil // must explcitly set error for failed cases path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeout = types.NewTimeout(defaultTimeoutHeight, disabledTimeoutTimestamp) + tc.malleate() packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) diff --git a/modules/core/04-channel/keeper/timeout_test.go b/modules/core/04-channel/keeper/timeout_test.go index 91fc4876ff9..d6e71576176 100644 --- a/modules/core/04-channel/keeper/timeout_test.go +++ b/modules/core/04-channel/keeper/timeout_test.go @@ -25,7 +25,6 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { nextSeqRecv uint64 ordered bool expError *errorsmod.Error - timeout types.Timeout ) testCases := []testCase{ @@ -34,9 +33,13 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) @@ -45,37 +48,43 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { ordered = false suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, - true}, + }, true}, {"packet already timed out: ORDERED", func() { expError = types.ErrNoOpMsg ordered = true path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, - false}, + }, false}, {"packet already timed out: UNORDERED", func() { expError = types.ErrNoOpMsg ordered = false suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -83,24 +92,22 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, - false}, + }, false}, {"channel not found", func() { expError = types.ErrChannelNotFound // use wrong channel naming suite.coordinator.Setup(path) packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, - false}, + }, false}, {"channel not open", func() { expError = types.ErrInvalidChannelState suite.coordinator.Setup(path) timeoutHeight := path.EndpointA.GetClientState().GetLatestHeight().Increment().(clienttypes.Height) - timeout = types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -111,22 +118,19 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { err = path.EndpointA.SetChannelState(types.CLOSED) suite.Require().NoError(err) - }, - false}, + }, false}, {"packet destination port ≠ channel counterparty port", func() { expError = types.ErrInvalidPacket suite.coordinator.Setup(path) // use wrong port for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, - false}, + }, false}, {"packet destination channel ID ≠ channel counterparty channel ID", func() { expError = types.ErrInvalidPacket suite.coordinator.Setup(path) // use wrong channel for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, - false}, + }, false}, {"connection not found", func() { expError = connectiontypes.ErrConnectionNotFound // pass channel check @@ -136,21 +140,18 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{connIDA}, path.EndpointA.ChannelConfig.Version), ) packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, - false}, + }, false}, {"timeout", func() { expError = types.ErrPacketTimeout suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) - + timeout := types.NewTimeout(defaultTimeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, - false}, + }, false}, {"packet already received ", func() { expError = types.ErrPacketReceived ordered = true @@ -158,10 +159,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { suite.coordinator.Setup(path) nextSeqRecv = 2 + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(defaultTimeoutHeight, timeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, timeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -184,11 +187,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -200,11 +204,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, false}, @@ -223,10 +228,6 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { nextSeqRecv = 1 // must be explicitly changed path = ibctesting.NewPath(suite.chainA, suite.chainB) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) - tc.malleate() orderedPacketKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) @@ -262,7 +263,6 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path *ibctesting.Path packet types.Packet chanCap *capabilitytypes.Capability - timeout types.Timeout ) testCases := []testCase{ @@ -270,10 +270,14 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"channel not found", func() { @@ -285,10 +289,14 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) chanCap = capabilitytypes.NewCapability(100) }, false}, } @@ -299,10 +307,6 @@ func (suite *KeeperTestSuite) TestTimeoutExecuted() { suite.SetupTest() // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) - tc.malleate() err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutExecuted(suite.chainA.GetContext(), chanCap, packet) @@ -327,7 +331,6 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { chanCap *capabilitytypes.Capability nextSeqRecv uint64 ordered bool - timeout types.Timeout ) testCases := []testCase{ @@ -336,6 +339,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) @@ -344,14 +351,15 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"success: UNORDERED", func() { ordered = false suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -361,7 +369,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"channel not found", func() { @@ -407,6 +415,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { ordered = true suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) @@ -415,7 +427,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"channel verification failed ORDERED", func() { @@ -423,9 +435,13 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, timeout.Timestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"next seq receive verification failed ORDERED", func() { @@ -434,6 +450,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) @@ -449,7 +469,8 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { ordered = true suite.coordinator.Setup(path) - timeout = types.NewTimeout(timeout.Height, disabledTimeoutTimestamp) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, disabledTimeoutTimestamp) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -458,7 +479,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeout.Height, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) chanCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"channel capability not found ORDERED", func() { @@ -466,6 +487,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { path.SetChannelOrdered() suite.coordinator.Setup(path) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = path.EndpointB.SetChannelState(types.CLOSED) @@ -488,10 +513,6 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { nextSeqRecv = 1 // must be explicitly changed path = ibctesting.NewPath(suite.chainA, suite.chainB) - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - timeout = types.NewTimeout(timeoutHeight, timeoutTimestamp) - tc.malleate() channelKey := host.ChannelKey(packet.GetDestPort(), packet.GetDestChannel()) diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index 20ed350a053..cbf50eaa8c4 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/suite" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" "github.com/cosmos/ibc-go/v7/modules/core/ante" @@ -46,7 +47,8 @@ func TestAnteTestSuite(t *testing.T) { // createRecvPacketMessage creates a RecvPacket message for a packet sent from chain A to chain B. func (suite *AnteTestSuite) createRecvPacketMessage(isRedundant bool) sdk.Msg { - sequence, err := suite.path.EndpointA.SendPacket(clienttypes.NewHeight(2, 0), 0, ibctesting.MockPacketData) + timeout := types.NewTimeout(clienttypes.NewHeight(2, 0), 0) + sequence, err := suite.path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, @@ -70,7 +72,8 @@ func (suite *AnteTestSuite) createRecvPacketMessage(isRedundant bool) sdk.Msg { // createAcknowledgementMessage creates an Acknowledgement message for a packet sent from chain B to chain A. func (suite *AnteTestSuite) createAcknowledgementMessage(isRedundant bool) sdk.Msg { - sequence, err := suite.path.EndpointB.SendPacket(clienttypes.NewHeight(2, 0), 0, ibctesting.MockPacketData) + timeout := types.NewTimeout(clienttypes.NewHeight(2, 0), 0) + sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, @@ -95,8 +98,9 @@ func (suite *AnteTestSuite) createAcknowledgementMessage(isRedundant bool) sdk.M func (suite *AnteTestSuite) createTimeoutMessage(isRedundant bool) sdk.Msg { height := suite.chainA.LastHeader.GetHeight() timeoutHeight := clienttypes.NewHeight(height.GetRevisionNumber(), height.GetRevisionHeight()+1) + timeout := types.NewTimeout(timeoutHeight, 0) - sequence, err := suite.path.EndpointB.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) suite.coordinator.CommitNBlocks(suite.chainA, 3) @@ -124,8 +128,9 @@ func (suite *AnteTestSuite) createTimeoutMessage(isRedundant bool) sdk.Msg { func (suite *AnteTestSuite) createTimeoutOnCloseMessage(isRedundant bool) sdk.Msg { height := suite.chainA.LastHeader.GetHeight() timeoutHeight := clienttypes.NewHeight(height.GetRevisionNumber(), height.GetRevisionHeight()+1) + timeout := types.NewTimeout(timeoutHeight, 0) - sequence, err := suite.path.EndpointB.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) err = suite.path.EndpointA.SetChannelState(channeltypes.CLOSED) suite.Require().NoError(err) diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index b46dbcff4c8..58a99c5d3ed 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -5,6 +5,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" @@ -27,9 +28,10 @@ var ( // 04-channel/keeper/packet_test.go. func (suite *KeeperTestSuite) TestHandleRecvPacket() { var ( - packet channeltypes.Packet - path *ibctesting.Path - async bool // indicate no ack written + packet channeltypes.Packet + path *ibctesting.Path + async bool // indicate no ack written + timeout types.Timeout ) testCases := []struct { @@ -42,7 +44,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -50,7 +52,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { {"success: UNORDERED", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -61,7 +63,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { // attempts to receive packet with sequence 10 without receiving packet with sequence 1 for i := uint64(1); i < 10; i++ { - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -70,7 +72,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { {"success: OnRecvPacket callback returns revert=true", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockFailPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockFailPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockFailPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -80,7 +82,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.coordinator.Setup(path) async = true - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibcmock.MockAsyncPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibcmock.MockAsyncPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibcmock.MockAsyncPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -89,7 +91,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.coordinator.Setup(path) async = true - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibcmock.MockAsyncPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibcmock.MockAsyncPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibcmock.MockAsyncPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -100,7 +102,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { // attempts to receive packet with sequence 10 without receiving packet with sequence 1 for i := uint64(1); i < 10; i++ { - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -119,7 +121,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -130,7 +132,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { // mock will panic if application callback is called twice on the same packet suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -146,6 +148,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.SetupTest() // reset async = false // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeout = types.NewTimeout(timeoutHeight, 0) tc.malleate() @@ -204,8 +207,9 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { // can be found in the 04-channel/keeper/packet_test.go. func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { var ( - packet channeltypes.Packet - path *ibctesting.Path + packet channeltypes.Packet + path *ibctesting.Path + timeout types.Timeout ) testCases := []struct { @@ -217,7 +221,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { path.SetChannelOrdered() suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -227,7 +231,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { {"success: UNORDERED", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -240,7 +244,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { // attempts to acknowledge ack with sequence 10 without acknowledging ack with sequence 1 (removing packet commitment) for i := uint64(1); i < 10; i++ { - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -254,7 +258,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { // attempts to acknowledge ack with sequence 10 without acknowledging ack with sequence 1 (removing packet commitment for i := uint64(1); i < 10; i++ { - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -269,7 +273,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { {"packet not received", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -277,7 +281,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { {"successful no-op: ORDERED - packet already acknowledged (replay)", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -290,7 +294,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { {"successful no-op: UNORDERED - packet already acknowledged (replay)", func() { suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -308,6 +312,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { suite.Run(tc.name, func() { suite.SetupTest() // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) + timeout = types.NewTimeout(timeoutHeight, 0) tc.malleate() @@ -364,9 +369,10 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA client to prove missing ack @@ -381,9 +387,10 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) + timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA client to prove missing ack @@ -399,11 +406,12 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 - for i := uint64(1); i < maxSequence; i++ { - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, 0) + for i := uint64(1); i < maxSequence; i++ { // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -420,11 +428,12 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 - for i := uint64(1); i < maxSequence; i++ { - timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) + timeout := types.NewTimeout(timeoutHeight, 0) + for i := uint64(1); i < maxSequence; i++ { // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -509,7 +518,8 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + timeout := types.NewTimeout(timeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA client to prove missing ack @@ -527,7 +537,8 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + timeout := types.NewTimeout(timeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA client to prove missing ack @@ -547,9 +558,10 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 + timeout := types.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -570,9 +582,10 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 + timeout := types.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) @@ -607,7 +620,8 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - sequence, err := path.EndpointA.SendPacket(timeoutHeight, 0, ibctesting.MockPacketData) + timeout := types.NewTimeout(timeoutHeight, 0) + sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // need to update chainA client to prove missing ack diff --git a/modules/light-clients/07-tendermint/client_state_test.go b/modules/light-clients/07-tendermint/client_state_test.go index 9df8c6047ba..05ae591d59e 100644 --- a/modules/light-clients/07-tendermint/client_state_test.go +++ b/modules/light-clients/07-tendermint/client_state_test.go @@ -292,7 +292,8 @@ func (suite *TendermintTestSuite) TestVerifyMembership() { { "successful PacketCommitment verification", func() { // send from chainB to chainA since we are proving chainB sent a packet - sequence, err := testingpath.EndpointB.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(clienttypes.NewHeight(1, 100), 0) + sequence, err := testingpath.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // make packet commitment proof @@ -310,7 +311,8 @@ func (suite *TendermintTestSuite) TestVerifyMembership() { { "successful Acknowledgement verification", func() { // send from chainA to chainB since we are proving chainB wrote an acknowledgement - sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(clienttypes.NewHeight(1, 100), 0) + sequence, err := testingpath.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // write receipt and ack @@ -334,7 +336,8 @@ func (suite *TendermintTestSuite) TestVerifyMembership() { // send from chainA to chainB since we are proving chainB incremented the sequence recv // send packet - sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + timeout := channeltypes.NewTimeout(clienttypes.NewHeight(1, 100), 0) + sequence, err := testingpath.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) // next seq recv incremented From 5c8f1480cf75ca7b41c7ff13a69cf0ba652b005f Mon Sep 17 00:00:00 2001 From: Charly Date: Wed, 17 May 2023 14:05:03 +0200 Subject: [PATCH 35/35] linter --- modules/core/ante/ante_test.go | 9 ++++----- modules/core/keeper/msg_server_test.go | 27 +++++++++++++------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index cbf50eaa8c4..d784b0c2157 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/suite" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" "github.com/cosmos/ibc-go/v7/modules/core/ante" @@ -47,7 +46,7 @@ func TestAnteTestSuite(t *testing.T) { // createRecvPacketMessage creates a RecvPacket message for a packet sent from chain A to chain B. func (suite *AnteTestSuite) createRecvPacketMessage(isRedundant bool) sdk.Msg { - timeout := types.NewTimeout(clienttypes.NewHeight(2, 0), 0) + timeout := channeltypes.NewTimeout(clienttypes.NewHeight(2, 0), 0) sequence, err := suite.path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -72,7 +71,7 @@ func (suite *AnteTestSuite) createRecvPacketMessage(isRedundant bool) sdk.Msg { // createAcknowledgementMessage creates an Acknowledgement message for a packet sent from chain B to chain A. func (suite *AnteTestSuite) createAcknowledgementMessage(isRedundant bool) sdk.Msg { - timeout := types.NewTimeout(clienttypes.NewHeight(2, 0), 0) + timeout := channeltypes.NewTimeout(clienttypes.NewHeight(2, 0), 0) sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -98,7 +97,7 @@ func (suite *AnteTestSuite) createAcknowledgementMessage(isRedundant bool) sdk.M func (suite *AnteTestSuite) createTimeoutMessage(isRedundant bool) sdk.Msg { height := suite.chainA.LastHeader.GetHeight() timeoutHeight := clienttypes.NewHeight(height.GetRevisionNumber(), height.GetRevisionHeight()+1) - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -128,7 +127,7 @@ func (suite *AnteTestSuite) createTimeoutMessage(isRedundant bool) sdk.Msg { func (suite *AnteTestSuite) createTimeoutOnCloseMessage(isRedundant bool) sdk.Msg { height := suite.chainA.LastHeader.GetHeight() timeoutHeight := clienttypes.NewHeight(height.GetRevisionNumber(), height.GetRevisionHeight()+1) - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) sequence, err := suite.path.EndpointB.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index 58a99c5d3ed..f4136c45fa7 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -5,7 +5,6 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" @@ -31,7 +30,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { packet channeltypes.Packet path *ibctesting.Path async bool // indicate no ack written - timeout types.Timeout + timeout channeltypes.Timeout ) testCases := []struct { @@ -148,7 +147,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.SetupTest() // reset async = false // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) - timeout = types.NewTimeout(timeoutHeight, 0) + timeout = channeltypes.NewTimeout(timeoutHeight, 0) tc.malleate() @@ -209,7 +208,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { var ( packet channeltypes.Packet path *ibctesting.Path - timeout types.Timeout + timeout channeltypes.Timeout ) testCases := []struct { @@ -312,7 +311,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { suite.Run(tc.name, func() { suite.SetupTest() // reset path = ibctesting.NewPath(suite.chainA, suite.chainB) - timeout = types.NewTimeout(timeoutHeight, 0) + timeout = channeltypes.NewTimeout(timeoutHeight, 0) tc.malleate() @@ -369,7 +368,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + timeout := channeltypes.NewTimeout(timeoutHeight, timeoutTimestamp) // create packet commitment sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) @@ -387,7 +386,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) timeoutTimestamp := uint64(suite.chainB.GetContext().BlockTime().UnixNano()) - timeout := types.NewTimeout(timeoutHeight, timeoutTimestamp) + timeout := channeltypes.NewTimeout(timeoutHeight, timeoutTimestamp) // create packet commitment sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) @@ -407,7 +406,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment @@ -429,7 +428,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 timeoutHeight := clienttypes.GetSelfHeight(suite.chainB.GetContext()) - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment @@ -518,7 +517,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -537,7 +536,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err) @@ -558,7 +557,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) @@ -582,7 +581,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // attempts to timeout the last packet sent without timing out the first packet // packet sequences begin at 1 - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) for i := uint64(1); i < maxSequence; i++ { // create packet commitment sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) @@ -620,7 +619,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.coordinator.Setup(path) // create packet commitment - timeout := types.NewTimeout(timeoutHeight, 0) + timeout := channeltypes.NewTimeout(timeoutHeight, 0) sequence, err := path.EndpointA.SendPacket(timeout, ibctesting.MockPacketData) suite.Require().NoError(err)