From 354dbe9e21ec33e3df606e57e72d46e79db70406 Mon Sep 17 00:00:00 2001 From: chatton Date: Thu, 12 Sep 2024 10:53:02 +0100 Subject: [PATCH 1/8] chore: adding proto for packetV2 --- modules/core/04-channel/types/channel.pb.go | 1103 +++++++++++++++++-- proto/ibc/core/channel/v1/channel.proto | 36 + 2 files changed, 1062 insertions(+), 77 deletions(-) diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index b4e1cafde7c..48ba9217677 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -445,6 +445,218 @@ func (m *PacketId) XXX_DiscardUnknown() { var xxx_messageInfo_PacketId proto.InternalMessageInfo +// PacketV2 defines a type that carries data across different chains through IBC +type PacketV2 struct { + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + // identifies the sending chain. + SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + // identifies the receiving chain. + DestinationId string `protobuf:"bytes,3,opt,name=destination_id,json=destinationId,proto3" json:"destination_id,omitempty"` + // timeout after which the packet times out + Timeout string `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` + // a list of packet data, each one for a specific application. + Data []PacketData `protobuf:"bytes,5,rep,name=data,proto3" json:"data"` +} + +func (m *PacketV2) Reset() { *m = PacketV2{} } +func (m *PacketV2) String() string { return proto.CompactTextString(m) } +func (*PacketV2) ProtoMessage() {} +func (*PacketV2) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{6} +} +func (m *PacketV2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PacketV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PacketV2.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 *PacketV2) XXX_Merge(src proto.Message) { + xxx_messageInfo_PacketV2.Merge(m, src) +} +func (m *PacketV2) XXX_Size() int { + return m.Size() +} +func (m *PacketV2) XXX_DiscardUnknown() { + xxx_messageInfo_PacketV2.DiscardUnknown(m) +} + +var xxx_messageInfo_PacketV2 proto.InternalMessageInfo + +func (m *PacketV2) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *PacketV2) GetSourceId() string { + if m != nil { + return m.SourceId + } + return "" +} + +func (m *PacketV2) GetDestinationId() string { + if m != nil { + return m.DestinationId + } + return "" +} + +func (m *PacketV2) GetTimeout() string { + if m != nil { + return m.Timeout + } + return "" +} + +func (m *PacketV2) GetData() []PacketData { + if m != nil { + return m.Data + } + return nil +} + +// PacketData contains the source and destination ports and payload for the application +type PacketData struct { + // specifies the source port of the packet. + SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` + // specifies the destination port of the packet. + DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` + // the payload to be sent to the application. + Payload *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *PacketData) Reset() { *m = PacketData{} } +func (m *PacketData) String() string { return proto.CompactTextString(m) } +func (*PacketData) ProtoMessage() {} +func (*PacketData) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{7} +} +func (m *PacketData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PacketData.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 *PacketData) XXX_Merge(src proto.Message) { + xxx_messageInfo_PacketData.Merge(m, src) +} +func (m *PacketData) XXX_Size() int { + return m.Size() +} +func (m *PacketData) XXX_DiscardUnknown() { + xxx_messageInfo_PacketData.DiscardUnknown(m) +} + +var xxx_messageInfo_PacketData proto.InternalMessageInfo + +func (m *PacketData) GetSourcePort() string { + if m != nil { + return m.SourcePort + } + return "" +} + +func (m *PacketData) GetDestinationPort() string { + if m != nil { + return m.DestinationPort + } + return "" +} + +func (m *PacketData) GetPayload() *Payload { + if m != nil { + return m.Payload + } + return nil +} + +// Payload holds the version, encoding and raw bytes to be passed to an application +type Payload struct { + // version of the specified application. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // the encoding used for the provided value. + Encoding string `protobuf:"bytes,2,opt,name=encoding,proto3" json:"encoding,omitempty"` + // the raw bytes for the payload. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *Payload) Reset() { *m = Payload{} } +func (m *Payload) String() string { return proto.CompactTextString(m) } +func (*Payload) ProtoMessage() {} +func (*Payload) Descriptor() ([]byte, []int) { + return fileDescriptor_c3a07336710636a0, []int{8} +} +func (m *Payload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Payload.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 *Payload) XXX_Merge(src proto.Message) { + xxx_messageInfo_Payload.Merge(m, src) +} +func (m *Payload) XXX_Size() int { + return m.Size() +} +func (m *Payload) XXX_DiscardUnknown() { + xxx_messageInfo_Payload.DiscardUnknown(m) +} + +var xxx_messageInfo_Payload proto.InternalMessageInfo + +func (m *Payload) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Payload) GetEncoding() string { + if m != nil { + return m.Encoding + } + return "" +} + +func (m *Payload) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + // Acknowledgement is the recommended acknowledgement format to be used by // app-specific protocols. // NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental @@ -456,6 +668,7 @@ type Acknowledgement struct { // response contains either a result or an error and must be non-empty // // Types that are valid to be assigned to Response: + // // *Acknowledgement_Result // *Acknowledgement_Error Response isAcknowledgement_Response `protobuf_oneof:"response"` @@ -465,7 +678,7 @@ func (m *Acknowledgement) Reset() { *m = Acknowledgement{} } func (m *Acknowledgement) String() string { return proto.CompactTextString(m) } func (*Acknowledgement) ProtoMessage() {} func (*Acknowledgement) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{6} + return fileDescriptor_c3a07336710636a0, []int{9} } func (m *Acknowledgement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -553,7 +766,7 @@ 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} + return fileDescriptor_c3a07336710636a0, []int{10} } func (m *Timeout) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +819,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{8} + return fileDescriptor_c3a07336710636a0, []int{11} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -652,6 +865,9 @@ func init() { proto.RegisterType((*Packet)(nil), "ibc.core.channel.v1.Packet") proto.RegisterType((*PacketState)(nil), "ibc.core.channel.v1.PacketState") proto.RegisterType((*PacketId)(nil), "ibc.core.channel.v1.PacketId") + proto.RegisterType((*PacketV2)(nil), "ibc.core.channel.v1.PacketV2") + proto.RegisterType((*PacketData)(nil), "ibc.core.channel.v1.PacketData") + proto.RegisterType((*Payload)(nil), "ibc.core.channel.v1.Payload") proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") proto.RegisterType((*Timeout)(nil), "ibc.core.channel.v1.Timeout") proto.RegisterType((*Params)(nil), "ibc.core.channel.v1.Params") @@ -660,71 +876,79 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 1013 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0x8e, 0x53, 0xe7, 0xeb, 0x6d, 0x93, 0xb8, 0x53, 0xe8, 0x5a, 0xa6, 0x24, 0xde, 0x0a, 0x44, - 0xb7, 0x68, 0x93, 0x6d, 0x41, 0x88, 0xe5, 0xd6, 0xa6, 0xde, 0xad, 0xd9, 0x92, 0x54, 0x4e, 0xb2, - 0x12, 0x7b, 0xb1, 0x5c, 0x7b, 0x48, 0xad, 0x4d, 0x3c, 0xc6, 0x9e, 0x74, 0xb5, 0xe2, 0x8c, 0xb4, - 0xca, 0x89, 0x3f, 0x10, 0x09, 0x89, 0xbf, 0xc0, 0x5f, 0x40, 0xda, 0xe3, 0x1e, 0x39, 0x21, 0xd4, - 0xfe, 0x07, 0xce, 0xc8, 0x33, 0xe3, 0x7c, 0x54, 0x51, 0x85, 0x90, 0xb8, 0x71, 0xca, 0xbc, 0xcf, - 0xfb, 0xbc, 0x1f, 0xf3, 0xce, 0x33, 0x13, 0xc3, 0x7d, 0xff, 0xc2, 0x6d, 0xba, 0x24, 0xc2, 0x4d, - 0xf7, 0xd2, 0x09, 0x02, 0x3c, 0x6c, 0x5e, 0x1d, 0xa4, 0xcb, 0x46, 0x18, 0x11, 0x4a, 0xd0, 0x96, - 0x7f, 0xe1, 0x36, 0x12, 0x4a, 0x23, 0xc5, 0xaf, 0x0e, 0xb4, 0x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, 0xf3, 0xb1, 0xf7, 0xff, 0x00, 0xef, 0x41, 0x21, 0x24, 0x11, 0xb5, 0x7d, 0x8f, 0xcd, - 0xad, 0x64, 0xe5, 0x13, 0xd3, 0xf4, 0xd0, 0x87, 0x00, 0xa2, 0x95, 0xc4, 0x57, 0x60, 0xbe, 0x92, - 0x40, 0x4c, 0x6f, 0xe5, 0xe0, 0x8b, 0x77, 0x0d, 0xfe, 0x0c, 0x36, 0x16, 0xf7, 0xb3, 0x58, 0x58, - 0xba, 0xa3, 0x70, 0xf6, 0x56, 0x61, 0x91, 0xed, 0xb7, 0x35, 0xc8, 0x9f, 0x3b, 0xee, 0x4b, 0x4c, - 0x91, 0x06, 0xc5, 0x59, 0x07, 0x12, 0xeb, 0x60, 0x66, 0xa3, 0x3a, 0xac, 0xc7, 0x64, 0x1c, 0xb9, - 0xd8, 0x4e, 0x92, 0x8b, 0x64, 0xc0, 0xa1, 0x73, 0x12, 0x51, 0xf4, 0x31, 0x54, 0x04, 0x41, 0x54, - 0x60, 0x07, 0x52, 0xb2, 0xca, 0x1c, 0x4d, 0xf5, 0xf1, 0x00, 0x14, 0x0f, 0xc7, 0xd4, 0x0f, 0x1c, - 0x36, 0x69, 0x96, 0x4c, 0x66, 0xc4, 0xea, 0x02, 0xce, 0x32, 0x36, 0x61, 0x6b, 0x91, 0x9a, 0xa6, - 0xe5, 0x63, 0x47, 0x0b, 0xae, 0x34, 0x37, 0x02, 0xd9, 0x73, 0xa8, 0xc3, 0xc6, 0xbf, 0x61, 0xb1, - 0x35, 0x7a, 0x0a, 0x15, 0xea, 0x8f, 0x30, 0x19, 0x53, 0xfb, 0x12, 0xfb, 0x83, 0x4b, 0xca, 0x0e, - 0x60, 0x7d, 0x49, 0x63, 0xfc, 0x31, 0xb8, 0x3a, 0x68, 0x9c, 0x32, 0x86, 0x10, 0x48, 0x59, 0xc4, - 0x71, 0x10, 0x7d, 0x0a, 0x9b, 0x69, 0xa2, 0xe4, 0x37, 0xa6, 0xce,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b, 0xfd, 0x1a, 0x27, 0x8a, 0xa4, 0x95, 0x27, 0x53, 0xbd, 0x34, - 0x03, 0x92, 0xed, 0x73, 0x4e, 0xca, 0x10, 0xdb, 0x17, 0xa6, 0x28, 0xdc, 0x07, 0x98, 0x5f, 0x5a, - 0xf4, 0x01, 0xdc, 0x33, 0x8f, 0x5b, 0xf6, 0x73, 0xc3, 0xea, 0x9a, 0x9d, 0xf6, 0x72, 0x79, 0xb4, - 0x09, 0xe5, 0x45, 0xe7, 0x81, 0x22, 0xdd, 0x86, 0x0e, 0x95, 0x2c, 0x4f, 0x7b, 0xdc, 0x7d, 0x7b, - 0x5d, 0x93, 0xde, 0x5d, 0xd7, 0xa4, 0x3f, 0xaf, 0x6b, 0xd2, 0x4f, 0x37, 0xb5, 0xcc, 0xbb, 0x9b, - 0x5a, 0xe6, 0xf7, 0x9b, 0x5a, 0xe6, 0xc5, 0xe3, 0x81, 0x4f, 0x2f, 0xc7, 0x17, 0x0d, 0x97, 0x8c, - 0x9a, 0x2e, 0x89, 0x47, 0x24, 0x6e, 0xfa, 0x17, 0xee, 0xc3, 0x01, 0x69, 0x5e, 0x3d, 0x6e, 0x8e, - 0x88, 0x37, 0x1e, 0xe2, 0x98, 0x7f, 0xe6, 0x3c, 0xfa, 0xfc, 0x61, 0xfa, 0xdd, 0x44, 0x5f, 0x87, - 0x38, 0xbe, 0xc8, 0xb3, 0x27, 0xe5, 0xb3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x70, 0x20, 0xe4, - 0xc3, 0x58, 0x09, 0x00, 0x00, + // 1141 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0xf5, 0xaf, 0xd1, 0x1f, 0xbd, 0x49, 0x1d, 0x81, 0x71, 0x25, 0x46, 0x68, 0x51, 0xc5, + 0x45, 0xa4, 0xd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x67, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x60, 0xa0, 0x3e, + 0xf0, 0x04, 0x0b, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -1087,6 +1311,162 @@ func (m *PacketId) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PacketV2) 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 *PacketV2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PacketV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Timeout) > 0 { + i -= len(m.Timeout) + copy(dAtA[i:], m.Timeout) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Timeout))) + i-- + dAtA[i] = 0x22 + } + if len(m.DestinationId) > 0 { + i -= len(m.DestinationId) + copy(dAtA[i:], m.DestinationId) + i = encodeVarintChannel(dAtA, i, uint64(len(m.DestinationId))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceId) > 0 { + i -= len(m.SourceId) + copy(dAtA[i:], m.SourceId) + i = encodeVarintChannel(dAtA, i, uint64(len(m.SourceId))) + i-- + dAtA[i] = 0x12 + } + if m.Sequence != 0 { + i = encodeVarintChannel(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PacketData) 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 *PacketData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Payload != nil { + { + size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationPort) > 0 { + i -= len(m.DestinationPort) + copy(dAtA[i:], m.DestinationPort) + i = encodeVarintChannel(dAtA, i, uint64(len(m.DestinationPort))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourcePort) > 0 { + i -= len(m.SourcePort) + copy(dAtA[i:], m.SourcePort) + i = encodeVarintChannel(dAtA, i, uint64(len(m.SourcePort))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Payload) 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 *Payload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Payload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Acknowledgement) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1408,21 +1788,93 @@ func (m *PacketId) Size() (n int) { return n } -func (m *Acknowledgement) Size() (n int) { +func (m *PacketV2) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Response != nil { - n += m.Response.Size() + if m.Sequence != 0 { + n += 1 + sovChannel(uint64(m.Sequence)) } - return n -} - -func (m *Acknowledgement_Result) Size() (n int) { - if m == nil { - return 0 + l = len(m.SourceId) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.DestinationId) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.Timeout) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + if len(m.Data) > 0 { + for _, e := range m.Data { + l = e.Size() + n += 1 + l + sovChannel(uint64(l)) + } + } + return n +} + +func (m *PacketData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourcePort) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.DestinationPort) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + if m.Payload != nil { + l = m.Payload.Size() + n += 1 + l + sovChannel(uint64(l)) + } + return n +} + +func (m *Payload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.Encoding) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } + return n +} + +func (m *Acknowledgement) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *Acknowledgement_Result) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -2693,6 +3145,503 @@ func (m *PacketId) Unmarshal(dAtA []byte) error { } return nil } +func (m *PacketV2) 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: PacketV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PacketV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timeout = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", 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 + } + m.Data = append(m.Data, PacketData{}) + if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 (m *PacketData) 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: PacketData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PacketData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourcePort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourcePort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationPort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", 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 m.Payload == nil { + m.Payload = &Payload{} + } + if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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 (m *Payload) 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: Payload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Payload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthChannel + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + 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 (m *Acknowledgement) 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 cf3ecbb61e0..f70cb2bc6c5 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -174,6 +174,42 @@ message PacketId { uint64 sequence = 3; } +// PacketV2 defines a type that carries data across different chains through IBC +message PacketV2 { + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + uint64 sequence = 1; + // identifies the sending chain. + string source_id = 2; + // identifies the receiving chain. + string destination_id = 3; + // timeout after which the packet times out + string timeout = 4; + // a list of packet data, each one for a specific application. + repeated PacketData data = 5 [(gogoproto.nullable) = false]; +} + +// PacketData contains the source and destination ports and payload for the application +message PacketData { + // specifies the source port of the packet. + string source_port = 1; + // specifies the destination port of the packet. + string destination_port = 2; + // the payload to be sent to the application. + Payload payload = 3; +} + +// Payload holds the version, encoding and raw bytes to be passed to an application +message Payload { + // version of the specified application. + string version = 1; + // the encoding used for the provided value. + string encoding = 2; + // the raw bytes for the payload. + bytes value = 3; +} + // Acknowledgement is the recommended acknowledgement format to be used by // app-specific protocols. // NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental From 94a57fc82b3ef9babb11bfc4e7efa196970b171e Mon Sep 17 00:00:00 2001 From: chatton Date: Thu, 12 Sep 2024 11:08:52 +0100 Subject: [PATCH 2/8] chore: adding commitV2 hash fn --- modules/core/04-channel/types/packet.go | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 49b569af9b2..434d33df692 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -26,6 +26,7 @@ func CommitPacket(packet Packet) []byte { case IBC_VERSION_UNSPECIFIED, IBC_VERSION_1: return commitV1Packet(packet) case IBC_VERSION_2: + // TODO: convert to PacketV2 and commit. return commitV2Packet(packet) default: panic("unsupported version") @@ -100,6 +101,43 @@ func commitV2Packet(packet Packet) []byte { return hash[:] } +// CommitPacketV2 returns the V2 packet commitment bytes. The commitment consists of: +// sha256_hash(timeout) + sha256_hash(destinationID) + sha256_hash(packetData) from a given packet. +// This results in a fixed length preimage. +// NOTE: A fixed length preimage is ESSENTIAL to prevent relayers from being able +// to malleate the packet fields and create a commitment hash that matches the original packet. +func CommitPacketV2(packet PacketV2) []byte { + timeoutHash := sha256.Sum256([]byte(packet.Timeout)) + buf := timeoutHash[:] + + destIDHash := sha256.Sum256([]byte(packet.DestinationId)) + buf = append(buf, destIDHash[:]...) + + for _, data := range packet.Data { + buf = append(buf, hashPacketData(data)...) + } + + hash := sha256.Sum256(buf) + return hash[:] +} + +// hashPacketData returns the hash of the packet data. +func hashPacketData(data PacketData) []byte { + var buf []byte + sourceHash := sha256.Sum256([]byte(data.SourcePort)) + buf = append(buf, sourceHash[:]...) + destHash := sha256.Sum256([]byte(data.DestinationPort)) + buf = append(buf, destHash[:]...) + payloadValueHash := sha256.Sum256(data.Payload.Value) + buf = append(buf, payloadValueHash[:]...) + payloadEncodingHash := sha256.Sum256([]byte(data.Payload.Encoding)) + buf = append(buf, payloadEncodingHash[:]...) + payloadVersionHash := sha256.Sum256([]byte(data.Payload.Version)) + buf = append(buf, payloadVersionHash[:]...) + hash := sha256.Sum256(buf) + return hash[:] +} + // CommitAcknowledgement returns the hash of commitment bytes func CommitAcknowledgement(data []byte) []byte { hash := sha256.Sum256(data) From 8bd656272e916ca057c24f757cbcbd739ea3b662 Mon Sep 17 00:00:00 2001 From: chatton Date: Thu, 12 Sep 2024 15:27:50 +0100 Subject: [PATCH 3/8] chore: addressing PR feedback --- modules/core/04-channel/types/channel.pb.go | 223 +++++++++----------- modules/core/04-channel/types/packet.go | 3 +- modules/core/packet-server/keeper/relay.go | 2 + proto/ibc/core/channel/v1/channel.proto | 6 +- 4 files changed, 106 insertions(+), 128 deletions(-) diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 48ba9217677..0b6d4306164 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -455,8 +455,8 @@ type PacketV2 struct { SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` // identifies the receiving chain. DestinationId string `protobuf:"bytes,3,opt,name=destination_id,json=destinationId,proto3" json:"destination_id,omitempty"` - // timeout after which the packet times out - Timeout string `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` + // timeout timestamp after which the packet times out. + TimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` // a list of packet data, each one for a specific application. Data []PacketData `protobuf:"bytes,5,rep,name=data,proto3" json:"data"` } @@ -515,11 +515,11 @@ func (m *PacketV2) GetDestinationId() string { return "" } -func (m *PacketV2) GetTimeout() string { +func (m *PacketV2) GetTimeoutTimestamp() uint64 { if m != nil { - return m.Timeout + return m.TimeoutTimestamp } - return "" + return 0 } func (m *PacketV2) GetData() []PacketData { @@ -536,7 +536,7 @@ type PacketData struct { // specifies the destination port of the packet. DestinationPort string `protobuf:"bytes,2,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` // the payload to be sent to the application. - Payload *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + Payload Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload"` } func (m *PacketData) Reset() { *m = PacketData{} } @@ -586,11 +586,11 @@ func (m *PacketData) GetDestinationPort() string { return "" } -func (m *PacketData) GetPayload() *Payload { +func (m *PacketData) GetPayload() Payload { if m != nil { return m.Payload } - return nil + return Payload{} } // Payload holds the version, encoding and raw bytes to be passed to an application @@ -876,79 +876,79 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 1141 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0xf5, 0xaf, 0xd1, 0x1f, 0xbd, 0x49, 0x1d, 0x81, 0x71, 0x25, 0x46, 0x68, 0x51, 0xc5, - 0x45, 0xa4, 0xd8, 0x2d, 0x82, 0xba, 0x37, 0x5b, 0x62, 0x62, 0x36, 0xae, 0x64, 0x50, 0x92, 0x81, - 0xe6, 0x22, 0xd0, 0xe4, 0x56, 0x26, 0x22, 0x71, 0x59, 0x92, 0x52, 0x60, 0xf4, 0x5c, 0x20, 0xd0, - 0x29, 0x2f, 0x20, 0xa0, 0x40, 0x5f, 0xa1, 0xf7, 0x9e, 0x0a, 0xe4, 0x98, 0x63, 0x4f, 0x45, 0x61, - 0xbf, 0x43, 0xcf, 0x05, 0x77, 0x97, 0xfa, 0x71, 0x15, 0xa3, 0x28, 0xd0, 0x5b, 0x4f, 0xe2, 0x7c, - 0xf3, 0xcd, 0xcc, 0x72, 0xf6, 0x9b, 0x11, 0xe1, 0x81, 0x75, 0x6e, 0x34, 0x0c, 0xe2, 0xe2, 0x86, - 0x71, 0xa1, 0xdb, 0x36, 0x1e, 0x35, 0xa6, 0x7b, 0xe1, 0x63, 0xdd, 0x71, 0x89, 0x4f, 0xd0, 0x1d, - 0xeb, 0xdc, 0xa8, 0x07, 0x94, 0x7a, 0x88, 0x4f, 0xf7, 0xa4, 0xbb, 0x43, 0x32, 0x24, 0xd4, 0xdf,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 0x8f, 0xba, 0x6f, - 0xaf, 0xca, 0xc2, 0xbb, 0xab, 0xb2, 0xf0, 0xc7, 0x55, 0x59, 0x78, 0x73, 0x5d, 0x8e, 0xbc, 0xbb, - 0x2e, 0x47, 0x7e, 0xbb, 0x2e, 0x47, 0x5e, 0x1c, 0x0c, 0x2d, 0xff, 0x62, 0x72, 0x5e, 0x37, 0xc8, - 0xb8, 0x61, 0x10, 0x6f, 0x4c, 0xbc, 0x86, 0x75, 0x6e, 0x3c, 0x1a, 0x92, 0xc6, 0xf4, 0xa0, 0x31, - 0x26, 0xe6, 0x64, 0x84, 0x3d, 0xf6, 0x49, 0xfa, 0xf8, 0xf3, 0x47, 0xe1, 0x37, 0xae, 0x7f, 0xe9, - 0x60, 0xef, 0x3c, 0x49, 0xd7, 0xff, 0x67, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x60, 0xa0, 0x3e, - 0xf0, 0x04, 0x0b, 0x00, 0x00, + // 1143 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0xf3, 0x9d, 0x97, 0x2f, 0x77, 0x76, 0xd9, 0x8d, 0xbc, 0x25, 0xf1, 0x46, 0x20, 0xb2, + 0x45, 0x9b, 0x6c, 0x0b, 0x42, 0x14, 0x71, 0x69, 0x13, 0xef, 0xd6, 0x6c, 0x49, 0x2a, 0x27, 0xa9, + 0xc4, 0x5e, 0x22, 0xd7, 0x1e, 0x52, 0x6b, 0x13, 0x8f, 0xb1, 0x9d, 0xac, 0x2a, 0xce, 0x48, 0xab, + 0x9c, 0x38, 0x71, 0x8b, 0x84, 0xc4, 0xbf, 0xc0, 0xbf, 0x80, 0xb4, 0xc7, 0x15, 0x27, 0x4e, 0x08, + 0xb5, 0xff, 0x03, 0x67, 0xe4, 0x99, 0x71, 0x3e, 0x4a, 0x5a, 0x21, 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, 0x4b, 0x14, 0xa4, 0xfc, 0x6c, 0x2e, + 0x67, 0x16, 0x40, 0x70, 0x7d, 0xc6, 0x09, 0x19, 0xfc, 0xfa, 0x5c, 0xe4, 0x81, 0xfb, 0x00, 0xcb, + 0xcd, 0x8b, 0x1e, 0xc0, 0x7d, 0xf5, 0xb0, 0x39, 0x38, 0x55, 0xb4, 0xae, 0xda, 0x69, 0xaf, 0x87, + 0x47, 0x5b, 0x90, 0x5f, 0x55, 0xee, 0x8a, 0xc2, 0x75, 0x68, 0x4f, 0x8c, 0x32, 0xb7, 0x87, 0xdd, + 0x37, 0x97, 0x65, 0xe1, 0xed, 0x65, 0x59, 0xf8, 0xe3, 0xb2, 0x2c, 0x7c, 0x7f, 0x55, 0x8e, 0xbc, + 0xbd, 0x2a, 0x47, 0x7e, 0xbb, 0x2a, 0x47, 0x5e, 0xec, 0x0f, 0x2d, 0xff, 0x7c, 0x72, 0x56, 0x37, + 0xc8, 0xb8, 0x61, 0x10, 0x6f, 0x4c, 0xbc, 0x86, 0x75, 0x66, 0x3c, 0x1e, 0x92, 0xc6, 0x74, 0xbf, + 0x31, 0x26, 0xe6, 0x64, 0x84, 0x3d, 0xf6, 0x5f, 0xf5, 0xc9, 0xc7, 0x8f, 0xc3, 0x3f, 0xbf, 0xfe, + 0x85, 0x83, 0xbd, 0xb3, 0x24, 0xfd, 0x2e, 0x7c, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, + 0x0e, 0x9c, 0xc5, 0x1d, 0x0b, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -1345,12 +1345,10 @@ func (m *PacketV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.Timeout) > 0 { - i -= len(m.Timeout) - copy(dAtA[i:], m.Timeout) - i = encodeVarintChannel(dAtA, i, uint64(len(m.Timeout))) + if m.TimeoutTimestamp != 0 { + i = encodeVarintChannel(dAtA, i, uint64(m.TimeoutTimestamp)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } if len(m.DestinationId) > 0 { i -= len(m.DestinationId) @@ -1394,18 +1392,16 @@ func (m *PacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintChannel(dAtA, i, uint64(size)) + { + size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintChannel(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.DestinationPort) > 0 { i -= len(m.DestinationPort) copy(dAtA[i:], m.DestinationPort) @@ -1805,9 +1801,8 @@ func (m *PacketV2) Size() (n int) { if l > 0 { n += 1 + l + sovChannel(uint64(l)) } - l = len(m.Timeout) - if l > 0 { - n += 1 + l + sovChannel(uint64(l)) + if m.TimeoutTimestamp != 0 { + n += 1 + sovChannel(uint64(m.TimeoutTimestamp)) } if len(m.Data) > 0 { for _, e := range m.Data { @@ -1832,10 +1827,8 @@ func (m *PacketData) Size() (n int) { if l > 0 { n += 1 + l + sovChannel(uint64(l)) } - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovChannel(uint64(l)) - } + l = m.Payload.Size() + n += 1 + l + sovChannel(uint64(l)) return n } @@ -3258,10 +3251,10 @@ func (m *PacketV2) Unmarshal(dAtA []byte) error { m.DestinationId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) } - var stringLen uint64 + m.TimeoutTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChannel @@ -3271,24 +3264,11 @@ func (m *PacketV2) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.TimeoutTimestamp |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthChannel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timeout = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) @@ -3466,9 +3446,6 @@ func (m *PacketData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Payload == nil { - m.Payload = &Payload{} - } if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 434d33df692..7b4a5262313 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -107,8 +107,7 @@ func commitV2Packet(packet Packet) []byte { // NOTE: A fixed length preimage is ESSENTIAL to prevent relayers from being able // to malleate the packet fields and create a commitment hash that matches the original packet. func CommitPacketV2(packet PacketV2) []byte { - timeoutHash := sha256.Sum256([]byte(packet.Timeout)) - buf := timeoutHash[:] + buf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) destIDHash := sha256.Sum256([]byte(packet.DestinationId)) buf = append(buf, destIDHash[:]...) diff --git a/modules/core/packet-server/keeper/relay.go b/modules/core/packet-server/keeper/relay.go index 9cc41a23904..7836b9c98d3 100644 --- a/modules/core/packet-server/keeper/relay.go +++ b/modules/core/packet-server/keeper/relay.go @@ -107,6 +107,8 @@ func (k Keeper) RecvPacket( return "", channeltypes.ErrInvalidPacket } + // packetv2 := convert(packet) + // Lookup counterparty associated with our channel and ensure // that the packet was indeed sent by our counterparty. counterparty, ok := k.GetCounterparty(ctx, packet.DestinationChannel) diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index f70cb2bc6c5..969f18e6d97 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -184,8 +184,8 @@ message PacketV2 { string source_id = 2; // identifies the receiving chain. string destination_id = 3; - // timeout after which the packet times out - string timeout = 4; + // timeout timestamp after which the packet times out. + uint64 timeout_timestamp = 4; // a list of packet data, each one for a specific application. repeated PacketData data = 5 [(gogoproto.nullable) = false]; } @@ -197,7 +197,7 @@ message PacketData { // specifies the destination port of the packet. string destination_port = 2; // the payload to be sent to the application. - Payload payload = 3; + Payload payload = 3 [(gogoproto.nullable) = false]; } // Payload holds the version, encoding and raw bytes to be passed to an application From 87ccc6cddfc0a58e41567e4e07bce905fcf9e45f Mon Sep 17 00:00:00 2001 From: bznein Date: Thu, 12 Sep 2024 15:37:26 +0100 Subject: [PATCH 4/8] chore: add conversion function from PacketV1 to PacketV2 --- go.mod | 12 +- go.sum | 24 +-- modules/core/04-channel/types/channel.pb.go | 191 ++++++++++++-------- modules/core/04-channel/types/packet.go | 45 +++++ proto/ibc/core/channel/v1/channel.proto | 2 + 5 files changed, 183 insertions(+), 91 deletions(-) diff --git a/go.mod b/go.mod index 629fdd2616c..ef5351de673 100644 --- a/go.mod +++ b/go.mod @@ -177,14 +177,14 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/go.sum b/go.sum index 24afccc55ea..c307af1d3c1 100644 --- a/go.sum +++ b/go.sum @@ -1037,8 +1037,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1137,8 +1137,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1180,8 +1180,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1276,13 +1276,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1293,8 +1293,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 0b6d4306164..ab3af424662 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -317,6 +317,8 @@ type Packet struct { ProtocolVersion IBCVersion `protobuf:"varint,9,opt,name=protocol_version,json=protocolVersion,proto3,enum=ibc.core.channel.v1.IBCVersion" json:"protocol_version,omitempty"` // version which application should use to process the packet data AppVersion string `protobuf:"bytes,10,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` + // encoding to be used TODO clearer message + Encoding string `protobuf:"bytes,11,opt,name=encoding,proto3" json:"encoding,omitempty"` } func (m *Packet) Reset() { *m = Packet{} } @@ -876,79 +878,79 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd,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xe6, 0x64, 0x84, 0x3d, 0xf6, 0x5f, 0xf5, 0xc9, 0xc7, 0x8f, 0xc3, 0x3f, 0xbf, 0xfe, - 0x85, 0x83, 0xbd, 0xb3, 0x24, 0xfd, 0x2e, 0x7c, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, - 0x0e, 0x9c, 0xc5, 0x1d, 0x0b, 0x00, 0x00, + // 1149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x54, + 0x10, 0x8f, 0xf3, 0x3f, 0x93, 0x7f, 0xde, 0xd7, 0xd2, 0x46, 0x6e, 0x49, 0xdc, 0x08, 0x44, 0x5a, + 0xd4, 0xa4, 0xbb, 0x20, 0x44, 0x11, 0x97, 0x6e, 0xe2, 0x76, 0x4d, 0x97, 0x64, 0xe5, 0x24, 0x2b, + 0xd1, 0x4b, 0xe4, 0xb5, 0x1f, 0x59, 0xab, 0x89, 0x9f, 0xb1, 0x9d, 0x54, 0x2b, 0xce, 0x48, 0x55, + 0x4e, 0x9c, 0xb8, 0x45, 0x42, 0xe2, 0x2b, 0xf0, 0x21, 0x7a, 0xac, 0x38, 0x71, 0x42, 0xb0, 0xfb, + 0x1d, 0x38, 0x23, 0xbf, 0xf7, 0x9c, 0x38, 0x4b, 0x76, 0x85, 0x90, 0xb8, 0x71, 0x8a, 0xe7, 0x37, + 0xbf, 0x99, 0x79, 0x9e, 0xf9, 0xbd, 0x71, 0xe0, 0x9e, 0x75, 0x62, 0xb4, 0x0c, 0xe2, 0xe2, 0x96, + 0x71, 0xaa, 0xdb, 0x36, 0x9e, 0xb4, 0xe6, 0xbb, 0xe1, 0x63, 0xd3, 0x71, 0x89, 0x4f, 0xd0, 0x0d, + 0xeb, 0xc4, 0x68, 0x06, 0x94, 0x66, 0x88, 0xcf, 0x77, 0xa5, 0x9b, 0x63, 0x32, 0x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0xda, + 0x13, 0xe3, 0x2c, 0xed, 0x7e, 0xff, 0xcd, 0x79, 0x55, 0x78, 0x7b, 0x5e, 0x15, 0x7e, 0x3f, 0xaf, + 0x0a, 0xdf, 0x5f, 0x54, 0x63, 0x6f, 0x2f, 0xaa, 0xb1, 0x5f, 0x2f, 0xaa, 0xb1, 0x17, 0x8f, 0xc7, + 0x96, 0x7f, 0x3a, 0x3b, 0x69, 0x1a, 0x64, 0xda, 0x32, 0x88, 0x37, 0x25, 0x5e, 0xcb, 0x3a, 0x31, + 0x1e, 0x8e, 0x49, 0x6b, 0xfe, 0xb8, 0x35, 0x25, 0xe6, 0x6c, 0x82, 0x3d, 0xf6, 0x3f, 0xf6, 0xd1, + 0xc7, 0x0f, 0xc3, 0x3f, 0xc6, 0xfe, 0x99, 0x83, 0xbd, 0x93, 0x34, 0xfd, 0x66, 0x7c, 0xf4, 0x57, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x8e, 0x64, 0x83, 0x39, 0x0b, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -1150,6 +1152,13 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x5a + } if len(m.AppVersion) > 0 { i -= len(m.AppVersion) copy(dAtA[i:], m.AppVersion) @@ -1737,6 +1746,10 @@ func (m *Packet) Size() (n int) { if l > 0 { n += 1 + l + sovChannel(uint64(l)) } + l = len(m.Encoding) + if l > 0 { + n += 1 + l + sovChannel(uint64(l)) + } return n } @@ -2817,6 +2830,38 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } m.AppVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChannel + } + 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 ErrInvalidLengthChannel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChannel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipChannel(dAtA[iNdEx:]) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 7b4a5262313..7afbc7f6606 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -161,6 +161,30 @@ func NewPacket( TimeoutHeight: timeoutHeight, TimeoutTimestamp: timeoutTimestamp, ProtocolVersion: IBC_VERSION_1, + Encoding: "json", + } +} + +// TODO change NewPacket creates a new Packet instance. It panics if the provided +// packet data interface is not registered. +func NewPacketWithEncoding( + data []byte, + sequence uint64, sourcePort, sourceChannel, + destinationPort, destinationChannel string, + timeoutHeight clienttypes.Height, timeoutTimestamp uint64, + encoding string, +) Packet { + return Packet{ + Data: data, + Sequence: sequence, + SourcePort: sourcePort, + SourceChannel: sourceChannel, + DestinationPort: destinationPort, + DestinationChannel: destinationChannel, + TimeoutHeight: timeoutHeight, + TimeoutTimestamp: timeoutTimestamp, + ProtocolVersion: IBC_VERSION_1, + Encoding: encoding, } } @@ -263,3 +287,24 @@ func (p PacketId) Validate() error { func NewPacketID(portID, channelID string, seq uint64) PacketId { return PacketId{PortId: portID, ChannelId: channelID, Sequence: seq} } + +// ConvertPacketV1toV2 constructs a PacketV2 from a Packet. +func ConvertPacketV1toV2(packet Packet) PacketV2 { + return PacketV2{ + Sequence: packet.Sequence, + SourceId: packet.SourceChannel, + DestinationId: packet.DestinationChannel, + TimeoutTimestamp: packet.TimeoutTimestamp, + Data: []PacketData{ + { + SourcePort: packet.SourcePort, + DestinationPort: packet.DestinationPort, + Payload: Payload{ + Version: packet.AppVersion, + Encoding: packet.Encoding, + Value: packet.Data, + }, + }, + }, + } +} diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 969f18e6d97..5c10d0a2e6b 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -141,6 +141,8 @@ message Packet { IBCVersion protocol_version = 9; // version which application should use to process the packet data string app_version = 10; + // encoding to be used TODO clearer message + string encoding = 11; } // PacketState defines the generic type necessary to retrieve and store From 410f301f87c8506becebda6f75c04b93cdfd2cd1 Mon Sep 17 00:00:00 2001 From: bznein Date: Thu, 12 Sep 2024 15:40:36 +0100 Subject: [PATCH 5/8] chore: added check for protocol version --- modules/core/04-channel/types/packet.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 7afbc7f6606..634827c07c2 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -289,7 +289,10 @@ func NewPacketID(portID, channelID string, seq uint64) PacketId { } // ConvertPacketV1toV2 constructs a PacketV2 from a Packet. -func ConvertPacketV1toV2(packet Packet) PacketV2 { +func ConvertPacketV1toV2(packet Packet) (PacketV2, error) { + if packet.ProtocolVersion != IBC_VERSION_2 { + return PacketV2{}, errorsmod.Wrapf(ErrInvalidPacket, "expected protocol version %s, got %s instead", IBC_VERSION_2, packet.ProtocolVersion) + } return PacketV2{ Sequence: packet.Sequence, SourceId: packet.SourceChannel, @@ -306,5 +309,5 @@ func ConvertPacketV1toV2(packet Packet) PacketV2 { }, }, }, - } + }, nil } From 554e4847be5ebfb3a386f424588fb961e7d591c2 Mon Sep 17 00:00:00 2001 From: bznein Date: Thu, 12 Sep 2024 15:52:07 +0100 Subject: [PATCH 6/8] go mod tidy and remove function --- e2e/go.mod | 12 +++++----- e2e/go.sum | 24 ++++++++++---------- modules/apps/callbacks/go.mod | 12 +++++----- modules/apps/callbacks/go.sum | 24 ++++++++++---------- modules/core/04-channel/types/packet.go | 23 ------------------- modules/core/04-channel/types/packet_test.go | 4 ++-- modules/light-clients/08-wasm/go.mod | 12 +++++----- modules/light-clients/08-wasm/go.sum | 24 ++++++++++---------- simapp/go.mod | 12 +++++----- simapp/go.sum | 24 ++++++++++---------- 10 files changed, 74 insertions(+), 97 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index 50f7d32d120..63ce73e7f7f 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -236,13 +236,13 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/api v0.186.0 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 27883a64447..29683521456 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1163,8 +1163,8 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1265,8 +1265,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1308,8 +1308,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1405,13 +1405,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1422,8 +1422,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/modules/apps/callbacks/go.mod b/modules/apps/callbacks/go.mod index 94c37bf511d..665e6a69b76 100644 --- a/modules/apps/callbacks/go.mod +++ b/modules/apps/callbacks/go.mod @@ -184,14 +184,14 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/modules/apps/callbacks/go.sum b/modules/apps/callbacks/go.sum index b14e3de9111..631b8a8a8ef 100644 --- a/modules/apps/callbacks/go.sum +++ b/modules/apps/callbacks/go.sum @@ -1049,8 +1049,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1149,8 +1149,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1192,8 +1192,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1288,13 +1288,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1305,8 +1305,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 634827c07c2..eb9e36ae0e3 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -165,29 +165,6 @@ func NewPacket( } } -// TODO change NewPacket creates a new Packet instance. It panics if the provided -// packet data interface is not registered. -func NewPacketWithEncoding( - data []byte, - sequence uint64, sourcePort, sourceChannel, - destinationPort, destinationChannel string, - timeoutHeight clienttypes.Height, timeoutTimestamp uint64, - encoding string, -) Packet { - return Packet{ - Data: data, - Sequence: sequence, - SourcePort: sourcePort, - SourceChannel: sourceChannel, - DestinationPort: destinationPort, - DestinationChannel: destinationChannel, - TimeoutHeight: timeoutHeight, - TimeoutTimestamp: timeoutTimestamp, - ProtocolVersion: IBC_VERSION_1, - Encoding: encoding, - } -} - func NewPacketWithVersion( data []byte, sequence uint64, sourcePort, sourceChannel, diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index c688e44f29a..a030f813375 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -59,8 +59,8 @@ func TestPacketValidateBasic(t *testing.T) { {types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, disabledTimeout, timeoutTimestamp), true, "disabled timeout height, valid timeout timestamp"}, {types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, 0), true, "disabled timeout timestamp, valid timeout height"}, {types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp, "version"), true, "valid v2 packet"}, - {types.Packet{1, portid, chanid, cpportid, cpchanid, validPacketData, timeoutHeight, timeoutTimestamp, types.IBC_VERSION_1, "version"}, false, "invalid specifying of app version with protocol version 1"}, - {types.Packet{1, portid, chanid, cpportid, cpchanid, validPacketData, timeoutHeight, timeoutTimestamp, types.IBC_VERSION_UNSPECIFIED, "version"}, false, "invalid specifying of app version with unspecified protocol version"}, + {types.Packet{1, portid, chanid, cpportid, cpchanid, validPacketData, timeoutHeight, timeoutTimestamp, types.IBC_VERSION_1, "version", "json"}, false, "invalid specifying of app version with protocol version 1"}, + {types.Packet{1, portid, chanid, cpportid, cpchanid, validPacketData, timeoutHeight, timeoutTimestamp, types.IBC_VERSION_UNSPECIFIED, "version", "json"}, false, "invalid specifying of app version with unspecified protocol version"}, {types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp, ""), false, "app version must be specified when packet uses protocol version 2"}, {types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp, " "), false, "app version must be specified when packet uses protocol version 2"}, } diff --git a/modules/light-clients/08-wasm/go.mod b/modules/light-clients/08-wasm/go.mod index 828ab27d0ed..281eea13ded 100644 --- a/modules/light-clients/08-wasm/go.mod +++ b/modules/light-clients/08-wasm/go.mod @@ -188,14 +188,14 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/modules/light-clients/08-wasm/go.sum b/modules/light-clients/08-wasm/go.sum index 677c3713dcb..dc93577c717 100644 --- a/modules/light-clients/08-wasm/go.sum +++ b/modules/light-clients/08-wasm/go.sum @@ -1053,8 +1053,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1153,8 +1153,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1196,8 +1196,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1292,13 +1292,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1309,8 +1309,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/simapp/go.mod b/simapp/go.mod index 0e580f421c6..df4443c1e09 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -185,14 +185,14 @@ require ( go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 6283843c20b..440b60a2718 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -1047,8 +1047,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1147,8 +1147,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1190,8 +1190,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1286,13 +1286,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1303,8 +1303,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From be1e9bc4db92a4954f443dff10137be5a65c7414 Mon Sep 17 00:00:00 2001 From: bznein Date: Thu, 12 Sep 2024 15:54:26 +0100 Subject: [PATCH 7/8] chore: default to json encoding in conversion --- modules/core/04-channel/types/packet.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index eb9e36ae0e3..1cb89620f8e 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -270,6 +270,12 @@ func ConvertPacketV1toV2(packet Packet) (PacketV2, error) { if packet.ProtocolVersion != IBC_VERSION_2 { return PacketV2{}, errorsmod.Wrapf(ErrInvalidPacket, "expected protocol version %s, got %s instead", IBC_VERSION_2, packet.ProtocolVersion) } + + encoding := packet.Encoding + if encoding == "" { + encoding = "json" + } + return PacketV2{ Sequence: packet.Sequence, SourceId: packet.SourceChannel, @@ -281,7 +287,7 @@ func ConvertPacketV1toV2(packet Packet) (PacketV2, error) { DestinationPort: packet.DestinationPort, Payload: Payload{ Version: packet.AppVersion, - Encoding: packet.Encoding, + Encoding: encoding, Value: packet.Data, }, }, From fa4183f702f4e3d27eb99ab940794df2aa16d92b Mon Sep 17 00:00:00 2001 From: bznein Date: Thu, 12 Sep 2024 15:59:16 +0100 Subject: [PATCH 8/8] pr feedback --- modules/core/04-channel/types/packet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 1cb89620f8e..85bc7352a4e 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -271,7 +271,7 @@ func ConvertPacketV1toV2(packet Packet) (PacketV2, error) { return PacketV2{}, errorsmod.Wrapf(ErrInvalidPacket, "expected protocol version %s, got %s instead", IBC_VERSION_2, packet.ProtocolVersion) } - encoding := packet.Encoding + encoding := strings.TrimSpace(packet.Encoding) if encoding == "" { encoding = "json" }