diff --git a/modules/core/02-client/types/keys.go b/modules/core/02-client/types/keys.go index 8619b7c3371..e0c23c96aaa 100644 --- a/modules/core/02-client/types/keys.go +++ b/modules/core/02-client/types/keys.go @@ -32,11 +32,6 @@ const ( // AllowAllClients is the value that if set in AllowedClients param // would allow any wired up light client modules to be allowed AllowAllClients = "*" - - // CounterpartyKey is the key used to store counterparty in the client store. - // the counterparty key is imported from types instead of host because - // the counterparty key is not a part of the ics-24 host specification - CounterpartyKey = "counterparty" ) // FormatClientIdentifier returns the client identifier with the sequence appended. diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index 0cb410a924c..b83af2a7c16 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -128,33 +128,25 @@ func emitChannelCloseConfirmEvent(ctx context.Context, portID string, channelID // emitSendPacketEvent emits an event with packet data along with other packet information for relayer // to pick up and relay to other chain -func EmitSendPacketEvent(ctx context.Context, packet types.Packet, channel *types.Channel, timeoutHeight exported.Height) { +func emitSendPacketEvent(ctx context.Context, packet types.Packet, channel types.Channel, timeoutHeight exported.Height) { sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - eventAttributes := []sdk.Attribute{ - sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, timeoutHeight.String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - } - if channel != nil { - eventAttributes = append(eventAttributes, + sdkCtx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeSendPacket, + sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), + sdk.NewAttribute(types.AttributeKeyTimeoutHeight, timeoutHeight.String()), + sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), + sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), + sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), // DEPRECATED sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ) - } - - sdkCtx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeSendPacket, - eventAttributes..., ), sdk.NewEvent( sdk.EventTypeMessage, @@ -163,35 +155,27 @@ func EmitSendPacketEvent(ctx context.Context, packet types.Packet, channel *type }) } -// EmitRecvPacketEvent emits a receive packet event. It will be emitted both the first time a packet +// emitRecvPacketEvent emits a receive packet event. It will be emitted both the first time a packet // is received for a certain sequence and for all duplicate receives. -func EmitRecvPacketEvent(ctx context.Context, packet types.Packet, channel *types.Channel) { +func emitRecvPacketEvent(ctx context.Context, packet types.Packet, channel types.Channel) { sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - eventAttributes := []sdk.Attribute{ - sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - } - if channel != nil { - eventAttributes = append(eventAttributes, + sdkCtx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeRecvPacket, + sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), + sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), + sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), + sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), + sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), // DEPRECATED sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ) - } - - sdkCtx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeRecvPacket, - eventAttributes..., ), sdk.NewEvent( sdk.EventTypeMessage, @@ -200,35 +184,27 @@ func EmitRecvPacketEvent(ctx context.Context, packet types.Packet, channel *type }) } -// EmitWriteAcknowledgementEvent emits an event that the relayer can query for -func EmitWriteAcknowledgementEvent(ctx context.Context, packet types.Packet, channel *types.Channel, acknowledgement []byte) { +// emitWriteAcknowledgementEvent emits an event that the relayer can query for +func emitWriteAcknowledgementEvent(ctx context.Context, packet types.Packet, channel types.Channel, acknowledgement []byte) { sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - eventAttributes := []sdk.Attribute{ - sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyAckHex, hex.EncodeToString(acknowledgement)), - } - if channel != nil { - eventAttributes = append(eventAttributes, + sdkCtx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeWriteAck, + sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), + sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), + sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), + sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), + sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), + sdk.NewAttribute(types.AttributeKeyAckHex, hex.EncodeToString(acknowledgement)), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), // DEPRECATED sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ) - } - - sdkCtx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeWriteAck, - eventAttributes..., ), sdk.NewEvent( sdk.EventTypeMessage, @@ -237,34 +213,26 @@ func EmitWriteAcknowledgementEvent(ctx context.Context, packet types.Packet, cha }) } -// EmitAcknowledgePacketEvent emits an acknowledge packet event. It will be emitted both the first time +// emitAcknowledgePacketEvent emits an acknowledge packet event. It will be emitted both the first time // a packet is acknowledged for a certain sequence and for all duplicate acknowledgements. -func EmitAcknowledgePacketEvent(ctx context.Context, packet types.Packet, channel *types.Channel) { +func emitAcknowledgePacketEvent(ctx context.Context, packet types.Packet, channel types.Channel) { sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/7223 - eventAttributes := []sdk.Attribute{ - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - } - if channel != nil { - eventAttributes = append(eventAttributes, + sdkCtx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeAcknowledgePacket, + sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), + sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), + sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), + sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), // DEPRECATED sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - ) - } - - sdkCtx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventTypeAcknowledgePacket, - eventAttributes..., ), sdk.NewEvent( sdk.EventTypeMessage, @@ -275,28 +243,24 @@ func EmitAcknowledgePacketEvent(ctx context.Context, packet types.Packet, channe // emitTimeoutPacketEvent emits a timeout packet event. It will be emitted both the first time a packet // is timed out for a certain sequence and for all duplicate timeouts. -func EmitTimeoutPacketEvent(ctx context.Context, packet types.Packet, channel *types.Channel) { +func emitTimeoutPacketEvent(ctx context.Context, packet types.Packet, channel types.Channel) { sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/7223 - eventAttributes := []sdk.Attribute{ - sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), - sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), - sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), - sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), - sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), - sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - } - if channel != nil { - eventAttributes = append(eventAttributes, - sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), - ) - } sdkCtx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeTimeoutPacket, - eventAttributes..., + sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), + sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.GetSequence())), + sdk.NewAttribute(types.AttributeKeySrcPort, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), + sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), + sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), + // we only support 1-hop packets now, and that is the most important hop for a relayer + // (is it going to a chain I am connected to) + sdk.NewAttribute(types.AttributeKeyConnection, channel.ConnectionHops[0]), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index bef9e7cad7c..89630094748 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -85,7 +85,7 @@ func (k *Keeper) SendPacket( k.SetNextSequenceSend(ctx, sourcePort, sourceChannel, sequence+1) k.SetPacketCommitment(ctx, sourcePort, sourceChannel, packet.GetSequence(), commitment) - EmitSendPacketEvent(sdkCtx, packet, &channel, timeoutHeight) + emitSendPacketEvent(sdkCtx, packet, channel, timeoutHeight) k.Logger(ctx).Info( "packet sent", @@ -190,7 +190,7 @@ func (k *Keeper) RecvPacket( ) // emit an event that the relayer can query for - EmitRecvPacketEvent(sdkCtx, packet, &channel) + emitRecvPacketEvent(sdkCtx, packet, channel) return channel.Version, nil } @@ -215,7 +215,7 @@ func (k *Keeper) applyReplayProtection(ctx context.Context, packet types.Packet, // by the increase of the recvStartSequence. _, found := k.GetPacketReceipt(ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) if found { - EmitRecvPacketEvent(sdkCtx, packet, &channel) + emitRecvPacketEvent(sdkCtx, packet, channel) // This error indicates that the packet has already been relayed. Core IBC will // treat this error as a no-op in order to prevent an entire relay transaction // from failing and consuming unnecessary fees. @@ -239,7 +239,7 @@ func (k *Keeper) applyReplayProtection(ctx context.Context, packet types.Packet, } if packet.GetSequence() < nextSequenceRecv { - EmitRecvPacketEvent(sdkCtx, packet, &channel) + emitRecvPacketEvent(sdkCtx, packet, channel) // This error indicates that the packet has already been relayed. Core IBC will // treat this error as a no-op in order to prevent an entire relay transaction // from failing and consuming unnecessary fees. @@ -335,7 +335,7 @@ func (k *Keeper) WriteAcknowledgement( ) sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/7223 - EmitWriteAcknowledgementEvent(sdkCtx, packet.(types.Packet), &channel, bz) + emitWriteAcknowledgementEvent(sdkCtx, packet.(types.Packet), channel, bz) return nil } @@ -392,7 +392,7 @@ func (k *Keeper) AcknowledgePacket( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) if len(commitment) == 0 { - EmitAcknowledgePacketEvent(ctx, packet, &channel) + emitAcknowledgePacketEvent(ctx, packet, channel) // This error indicates that the acknowledgement has already been relayed // or there is a misconfigured relayer attempting to prove an acknowledgement // for a packet never sent. Core IBC will treat this error as a no-op in order to @@ -454,7 +454,7 @@ func (k *Keeper) AcknowledgePacket( ) // emit an event marking that we have processed the acknowledgement - EmitAcknowledgePacketEvent(ctx, packet, &channel) + emitAcknowledgePacketEvent(ctx, packet, channel) // if an upgrade is in progress, handling packet flushing and update channel state appropriately if channel.State == types.FLUSHING { diff --git a/modules/core/04-channel/keeper/timeout.go b/modules/core/04-channel/keeper/timeout.go index 84db359eb10..0e2b9817e05 100644 --- a/modules/core/04-channel/keeper/timeout.go +++ b/modules/core/04-channel/keeper/timeout.go @@ -70,7 +70,7 @@ func (k *Keeper) TimeoutPacket( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) if len(commitment) == 0 { - EmitTimeoutPacketEvent(ctx, packet, &channel) + emitTimeoutPacketEvent(ctx, packet, channel) // This error indicates that the timeout has already been relayed // or there is a misconfigured relayer attempting to prove a timeout // for a packet never sent. Core IBC will treat this error as a no-op in order to @@ -167,7 +167,7 @@ func (k *Keeper) timeoutExecuted( ) // emit an event marking that we have processed the timeout - EmitTimeoutPacketEvent(ctx, packet, &channel) + emitTimeoutPacketEvent(ctx, packet, channel) return nil } @@ -211,7 +211,7 @@ func (k *Keeper) TimeoutOnClose( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) if len(commitment) == 0 { - EmitTimeoutPacketEvent(ctx, packet, &channel) + emitTimeoutPacketEvent(ctx, packet, channel) // This error indicates that the timeout has already been relayed // or there is a misconfigured relayer attempting to prove a timeout // for a packet never sent. Core IBC will treat this error as a no-op in order to diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 636f44c2bf1..2263ee69c4e 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -108,41 +108,6 @@ func (Order) EnumDescriptor() ([]byte, []int) { return fileDescriptor_c3a07336710636a0, []int{1} } -// IBCVersion defines the version that the IBC packet intends to use. -// This allows asynchronous upgrades over time as unsupported IBC Versions -// will simply be rejected by the receiver and timed out on sender. -type IBCVersion int32 - -const ( - // zero-value for IBC version. - // This will be treated as a classic packet - IBC_VERSION_UNSPECIFIED IBCVersion = 0 - // IBC version 1 implements the Classic protocol - IBC_VERSION_1 IBCVersion = 1 - // IBC version 2 implements the Eureka protocol - IBC_VERSION_2 IBCVersion = 2 -) - -var IBCVersion_name = map[int32]string{ - 0: "IBC_VERSION_UNSPECIFIED", - 1: "IBC_VERSION_1", - 2: "IBC_VERSION_2", -} - -var IBCVersion_value = map[string]int32{ - "IBC_VERSION_UNSPECIFIED": 0, - "IBC_VERSION_1": 1, - "IBC_VERSION_2": 2, -} - -func (x IBCVersion) String() string { - return proto.EnumName(IBCVersion_name, int32(x)) -} - -func (IBCVersion) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{2} -} - // Channel defines pipeline for exactly-once packet delivery between specific // modules on separate blockchains, which has at least one end capable of // sending packets and one end capable of receiving packets. @@ -313,12 +278,6 @@ type Packet struct { TimeoutHeight types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height"` // block timestamp (in nanoseconds) after which the packet times out TimeoutTimestamp uint64 `protobuf:"varint,8,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - // which IBC version to use to commit this packet - 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{} } @@ -647,7 +606,6 @@ func (m *Params) GetUpgradeTimeout() Timeout { func init() { proto.RegisterEnum("ibc.core.channel.v1.State", State_name, State_value) proto.RegisterEnum("ibc.core.channel.v1.Order", Order_name, Order_value) - proto.RegisterEnum("ibc.core.channel.v1.IBCVersion", IBCVersion_name, IBCVersion_value) proto.RegisterType((*Channel)(nil), "ibc.core.channel.v1.Channel") proto.RegisterType((*IdentifiedChannel)(nil), "ibc.core.channel.v1.IdentifiedChannel") proto.RegisterType((*Counterparty)(nil), "ibc.core.channel.v1.Counterparty") @@ -662,71 +620,66 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 1024 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, 0x4d, 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, 0x8f, 0xd8, 0xe3, 0x1e, 0x39, 0x21, 0x68, 0xff, - 0x03, 0x67, 0xe4, 0x99, 0x71, 0x3e, 0xaa, 0xaa, 0x42, 0x48, 0xdc, 0x38, 0x65, 0xde, 0xe7, 0x7d, - 0xde, 0x8f, 0x79, 0xe7, 0x99, 0x89, 0xe1, 0xbe, 0x7f, 0xee, 0xb6, 0x5c, 0x12, 0xe1, 0x96, 0x7b, - 0xe1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ytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xe2, 0xc6, + 0x1b, 0xc6, 0xc4, 0xfc, 0x7b, 0x93, 0x80, 0x33, 0xf9, 0xfd, 0x52, 0xcb, 0x4a, 0xc1, 0x8b, 0x5a, + 0x95, 0x4d, 0xb5, 0xb0, 0xd9, 0x56, 0x55, 0xb7, 0xb7, 0x04, 0xbc, 0x8b, 0xb5, 0x14, 0x90, 0x81, + 0x43, 0xf7, 0x82, 0x8c, 0x3d, 0x05, 0x6b, 0xc1, 0x43, 0xed, 0x81, 0xd5, 0xaa, 0xe7, 0x4a, 0x2b, + 0x4e, 0xfd, 0x02, 0x48, 0x95, 0xfa, 0x15, 0xfa, 0x21, 0xf6, 0xb8, 0xc7, 0x3d, 0x55, 0x55, 0xf2, + 0x1d, 0x7a, 0xae, 0x3c, 0x33, 0x0e, 0x10, 0x45, 0x51, 0x55, 0xa9, 0xb7, 0x9e, 0x98, 0xf7, 0x79, + 0x9f, 0xf7, 0x7d, 0xde, 0x3f, 0xc3, 0xc8, 0xf0, 0xc0, 0x1b, 0x39, 0x35, 0x87, 0x04, 0xb8, 0xe6, + 0x4c, 0x6c, 0xdf, 0xc7, 0xd3, 0xda, 0xf2, 0x3c, 0x3e, 0x56, 0xe7, 0x01, 0xa1, 0x04, 0x1d, 0x7b, + 0x23, 0xa7, 0x1a, 0x51, 0xaa, 0x31, 0xbe, 0x3c, 0xd7, 0xfe, 0x37, 0x26, 0x63, 0xc2, 0xfc, 0xb5, + 0xe8, 0xc4, 0xa9, 0x5a, 0x69, 0x93, 0x6d, 0xea, 0x61, 0x9f, 0xb2, 0x64, 0xec, 0xc4, 0x09, 0xe5, + 0xdf, 0x92, 0x90, 0xa9, 0xf3, 0x2c, 0xe8, 0x31, 0xa4, 0x42, 0x6a, 0x53, 0xac, 0x4a, 0xba, 0x54, + 0xc9, 0x3f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0x9f, 0x08, 0x8f, 0xbf, 0x7c, 0x14, 0x7f, + 0x73, 0xd0, 0x37, 0x73, 0x1c, 0x8e, 0xd2, 0xec, 0x1b, 0xe1, 0x8b, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x39, 0xda, 0x3d, 0x84, 0x94, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -928,25 +881,6 @@ 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) - i = encodeVarintChannel(dAtA, i, uint64(len(m.AppVersion))) - i-- - dAtA[i] = 0x52 - } - if m.ProtocolVersion != 0 { - i = encodeVarintChannel(dAtA, i, uint64(m.ProtocolVersion)) - i-- - dAtA[i] = 0x48 - } if m.TimeoutTimestamp != 0 { i = encodeVarintChannel(dAtA, i, uint64(m.TimeoutTimestamp)) i-- @@ -1363,17 +1297,6 @@ func (m *Packet) Size() (n int) { if m.TimeoutTimestamp != 0 { n += 1 + sovChannel(uint64(m.TimeoutTimestamp)) } - if m.ProtocolVersion != 0 { - n += 1 + sovChannel(uint64(m.ProtocolVersion)) - } - l = len(m.AppVersion) - if l > 0 { - n += 1 + l + sovChannel(uint64(l)) - } - l = len(m.Encoding) - if l > 0 { - n += 1 + l + sovChannel(uint64(l)) - } return n } @@ -2334,89 +2257,6 @@ func (m *Packet) Unmarshal(dAtA []byte) error { break } } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtocolVersion", wireType) - } - m.ProtocolVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProtocolVersion |= IBCVersion(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", 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.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/codec.go b/modules/core/04-channel/types/codec.go index dbe7ac6934f..1b4fbef1493 100644 --- a/modules/core/04-channel/types/codec.go +++ b/modules/core/04-channel/types/codec.go @@ -41,7 +41,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) - msgservice.RegisterMsgServiceDesc(registry, &_PacketMsg_serviceDesc) } // SubModuleCdc references the global x/ibc/core/04-channel module codec. Note, the codec should diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 173131d73df..e660cf39bd4 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -64,7 +64,6 @@ var ( disabledTimeout = clienttypes.ZeroHeight() validPacketData = []byte("testdata") unknownPacketData = []byte("unknown") - validVersion = "ics-20" packet = types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) invalidPacket = types.NewPacket(unknownPacketData, 0, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index 71ff5bd62e9..b585f093e50 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -2,8 +2,6 @@ package types import ( "crypto/sha256" - "slices" - "strings" errorsmod "cosmossdk.io/errors" @@ -14,32 +12,13 @@ import ( "github.com/cosmos/ibc-go/v9/modules/core/exported" ) -// CommitPacket returns the packet commitment bytes based on -// the ProtocolVersion specified in the Packet. The commitment -// must commit to all fields in the packet apart from the source port -// source channel and sequence (which will be committed to in the packet commitment key path) -// and the ProtocolVersion which is defining how to hash the packet fields. -// NOTE: The commitment MUST be a fixed length preimage to prevent relayers from being able -// to malleate the packet fields and create a commitment hash that matches the original packet. -func CommitPacket(packet Packet) []byte { - switch packet.ProtocolVersion { - 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") - } -} - -// commitV1Packet returns the V1 packet commitment bytes. The commitment consists of: +// CommitPacket returns the packet commitment bytes. The commitment consists of: // sha256_hash(timeout_timestamp + timeout_height.RevisionNumber + timeout_height.RevisionHeight + sha256_hash(data)) // 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. // NOTE: sdk.Uint64ToBigEndian sets the uint64 to a slice of length 8. -func commitV1Packet(packet Packet) []byte { +func CommitPacket(packet Packet) []byte { timeoutHeight := packet.GetTimeoutHeight() buf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) @@ -57,50 +36,6 @@ func commitV1Packet(packet Packet) []byte { return hash[:] } -// commitV2Packet returns the V2 packet commitment bytes. The commitment consists of: -// sha256_hash(timeout_timestamp + timeout_height.RevisionNumber + timeout_height.RevisionHeight) -// + sha256_hash(destPort) + sha256_hash(destChannel) + sha256_hash(version) + sha256_hash(data)) -// 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. -// NOTE: sdk.Uint64ToBigEndian sets the uint64 to a slice of length 8. -func commitV2Packet(packet Packet) []byte { - timeoutHeight := packet.GetTimeoutHeight() - - timeoutBuf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) - - // only hash the timeout height if it is non-zero. This will allow us to remove it entirely in the future - if !timeoutHeight.EQ(clienttypes.ZeroHeight()) { - revisionNumber := sdk.Uint64ToBigEndian(timeoutHeight.GetRevisionNumber()) - timeoutBuf = append(timeoutBuf, revisionNumber...) - - revisionHeight := sdk.Uint64ToBigEndian(timeoutHeight.GetRevisionHeight()) - timeoutBuf = append(timeoutBuf, revisionHeight...) - } - - // hash the timeout rather than using a fixed-size preimage directly - // this will allow more flexibility in the future with how timeouts are defined - timeoutHash := sha256.Sum256(timeoutBuf) - buf := timeoutHash[:] - - // hash the destination identifiers since we can no longer retrieve them from the channelEnd - portHash := sha256.Sum256([]byte(packet.GetDestPort())) - buf = append(buf, portHash[:]...) - destinationHash := sha256.Sum256([]byte(packet.GetDestChannel())) - buf = append(buf, destinationHash[:]...) - - // hash the app version. - versionHash := sha256.Sum256([]byte(packet.AppVersion)) - buf = append(buf, versionHash[:]...) - - // hash the data - dataHash := sha256.Sum256(packet.GetData()) - buf = append(buf, dataHash[:]...) - - hash := sha256.Sum256(buf) - return hash[:] -} - // CommitAcknowledgement returns the hash of commitment bytes func CommitAcknowledgement(data []byte) []byte { hash := sha256.Sum256(data) @@ -124,29 +59,6 @@ func NewPacket( DestinationChannel: destinationChannel, TimeoutHeight: timeoutHeight, TimeoutTimestamp: timeoutTimestamp, - ProtocolVersion: IBC_VERSION_1, - Encoding: "json", - } -} - -func NewPacketWithVersion( - data []byte, - sequence uint64, sourcePort, sourceChannel, - destinationPort, destinationChannel string, - timeoutHeight clienttypes.Height, timeoutTimestamp uint64, - appVersion string, -) Packet { - return Packet{ - Data: data, - Sequence: sequence, - SourcePort: sourcePort, - SourceChannel: sourceChannel, - DestinationPort: destinationPort, - DestinationChannel: destinationChannel, - TimeoutHeight: timeoutHeight, - TimeoutTimestamp: timeoutTimestamp, - ProtocolVersion: IBC_VERSION_2, - AppVersion: appVersion, } } @@ -197,12 +109,6 @@ func (p Packet) ValidateBasic() error { if len(p.Data) == 0 { return errorsmod.Wrap(ErrInvalidPacket, "packet data bytes cannot be empty") } - if p.AppVersion != "" && slices.Contains([]IBCVersion{IBC_VERSION_UNSPECIFIED, IBC_VERSION_1}, p.ProtocolVersion) { - return errorsmod.Wrapf(ErrInvalidPacket, "app version cannot be specified when packet does not use protocol %s", IBC_VERSION_2) - } - if strings.TrimSpace(p.AppVersion) == "" && p.ProtocolVersion == IBC_VERSION_2 { - return errorsmod.Wrapf(ErrInvalidPacket, "app version must be specified when packet uses protocol %s", IBC_VERSION_2) - } return nil } diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index a030f813375..296ebb6d8ed 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -5,41 +5,13 @@ import ( "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" ) func TestCommitPacket(t *testing.T) { - // V1 packet1 commitment - packet1 := types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) - commitment1 := types.CommitPacket(packet1) - require.NotNil(t, commitment1) - - // V2 packet commitment with empty app version - packet2 := types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp, "") - commitment2 := types.CommitPacket(packet2) - require.NotNil(t, commitment2) - - // even though app version is empty for both packet1 and packet2 - // the commitment is different because we use Eureka protocol for packet2 - require.NotEqual(t, commitment1, commitment2) - - // V2 packet commitment with non-empty app version - packet3 := types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp, validVersion) - commitment3 := types.CommitPacket(packet3) - require.NotNil(t, commitment3) - - require.NotEqual(t, commitment1, commitment3) - require.NotEqual(t, commitment2, commitment3) - - // V2 packet commitment with non-empty app version and zero timeout height - packet4 := types.NewPacketWithVersion(validPacketData, 1, portid, chanid, cpportid, cpchanid, clienttypes.ZeroHeight(), timeoutTimestamp, validVersion) - commitment4 := types.CommitPacket(packet4) - require.NotNil(t, commitment4) - - require.NotEqual(t, commitment1, commitment4) - require.NotEqual(t, commitment2, commitment4) - require.NotEqual(t, commitment3, commitment4) + packet := types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) + commitment := types.CommitPacket(packet) + require.NotNil(t, commitment) } func TestPacketValidateBasic(t *testing.T) { @@ -58,11 +30,6 @@ func TestPacketValidateBasic(t *testing.T) { {types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, disabledTimeout, 0), false, "disabled both timeout height and timestamp"}, {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", "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"}, } for i, tc := range testCases { diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index 87a92a47a61..a6d96fb510f 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -1675,131 +1675,131 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1983 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x37, 0xf5, 0x19, 0x3d, 0x27, 0x91, 0x43, 0x39, 0xb1, 0x4c, 0xdb, 0x92, 0xa2, 0x16, 0x8d, - 0xd7, 0x4d, 0xa4, 0xb5, 0x37, 0x5b, 0x20, 0xc1, 0x02, 0xad, 0xa3, 0x2a, 0x5d, 0x03, 0x71, 0x6c, - 0x50, 0x56, 0xd1, 0xee, 0x16, 0x15, 0x64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 0x5c, 0xa3, 0x3d, 0xc8, 0xfa, 0x5f, 0x25, 0x42, 0xdb, 0xfa, 0x80, 0xe1, 0xfb, 0x80, - 0x90, 0xdb, 0x7d, 0x4a, 0xda, 0xa3, 0xc6, 0xe7, 0xaf, 0x0a, 0xdc, 0x17, 0xaf, 0x0a, 0xdc, 0xbf, - 0x5f, 0x15, 0xb8, 0xdf, 0xbc, 0x2e, 0x2c, 0x7d, 0xf1, 0xba, 0xb0, 0xf4, 0xe5, 0xeb, 0xc2, 0xd2, - 0x7b, 0x0f, 0x64, 0xc5, 0xea, 0x0e, 0x4f, 0x2b, 0x92, 0x36, 0xa8, 0xd2, 0x3f, 0x4d, 0x29, 0xa7, - 0xd2, 0x3d, 0x59, 0xab, 0x8e, 0x1e, 0x54, 0x07, 0x5a, 0x67, 0xd8, 0x47, 0x26, 0xf9, 0xb3, 0xd3, - 0x9b, 0xf7, 0xef, 0x39, 0xff, 0x77, 0xb2, 0xce, 0x74, 0x64, 0x9e, 0xa6, 0xf0, 0x7f, 0x9d, 0xde, - 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xdf, 0x5a, 0xd6, 0xb6, 0x25, 0x00, 0x00, + // 1972 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcf, 0x6f, 0xdb, 0xc8, + 0x15, 0x36, 0xf5, 0x33, 0x7e, 0x4e, 0xd6, 0x0a, 0xe5, 0xc4, 0x32, 0x6d, 0x4b, 0x8a, 0x5a, 0x34, + 0x5e, 0x37, 0x91, 0xd6, 0xde, 0xa4, 0x40, 0x82, 0x05, 0x5a, 0x47, 0x55, 0xba, 0x06, 0xe2, 0xd8, + 0xa0, 0xac, 0xa2, 0xdd, 0x2d, 0x2a, 0xc8, 0xd4, 0x84, 0x22, 0x24, 0x91, 0x5c, 0x92, 0xd2, 0xae, + 0x0b, 0xb4, 0x58, 0xf4, 0x14, 0xe4, 0xb0, 0x68, 0x81, 0xbd, 0x06, 0x68, 0xd1, 0x7f, 0x60, 0xcf, + 0xfd, 0x71, 0xe8, 0x6d, 0x4f, 0xc5, 0x1e, 0x17, 0x05, 0xba, 0x28, 0x92, 0x43, 0x2e, 0xfd, 0x0b, + 0x0a, 0x14, 0x28, 0x38, 0x33, 0xa4, 0x28, 0x72, 0x28, 0x51, 0x96, 0x6a, 0xf4, 0x26, 0xce, 0x7c, + 0xf3, 0xde, 0xcc, 0xf7, 0xbd, 0x79, 0x9c, 0x37, 0x14, 0x6c, 0x29, 0x67, 0x52, 0x45, 0xd2, 0x0c, + 0x54, 0x91, 0x3a, 0x2d, 0x55, 0x45, 0xbd, 0xca, 0x70, 0xaf, 0x62, 0x7d, 0x52, 0xd6, 0x0d, 0xcd, + 0xd2, 0xf8, 0xac, 0x72, 0x26, 0x95, 0xed, 0xde, 0x32, 0xed, 0x2d, 0x0f, 0xf7, 0x84, 0x35, 0x59, + 0x93, 0x35, 0xdc, 0x5f, 0xb1, 0x7f, 0x11, 0xa8, 0xb0, 0x2e, 0x69, 0x66, 0x5f, 0x33, 0x2b, 0x7d, + 0x53, 0xb6, 0x4d, 0xf4, 0x4d, 0x99, 0x76, 0x14, 0x46, 0x1e, 0x7a, 0x0a, 0x52, 0x2d, 0xbb, 0x97, + 0xfc, 0xa2, 0x80, 0x5b, 0xac, 0x29, 0x38, 0xfe, 0x26, 0x40, 0x06, 0xba, 0x6c, 0xb4, 0xda, 0x88, + 0x40, 0x4a, 0x9f, 0x73, 0xc0, 0x1f, 0x99, 0x72, 0x95, 0xf4, 0x1f, 0xeb, 0x48, 0x3d, 0x54, 0x15, + 0x8b, 0x5f, 0x87, 0xb4, 0xae, 0x19, 0x56, 0x53, 0x69, 0xe7, 0xb8, 0x22, 0xb7, 0xb3, 0x2c, 0xa6, + 0xec, 0xc7, 0xc3, 0x36, 0xff, 0x1e, 0xa4, 0xa9, 0xad, 0x5c, 0xac, 0xc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 0xfb, 0xd0, 0x77, 0x52, 0xd3, 0x44, 0x1f, 0x0d, 0x90, 0x2a, + 0x21, 0x1c, 0xff, 0x09, 0x71, 0xd3, 0x0b, 0x6a, 0x10, 0x4c, 0x9d, 0x42, 0x82, 0x14, 0x16, 0x21, + 0xcf, 0xa6, 0xc8, 0x65, 0xf1, 0x35, 0x07, 0xd7, 0x8e, 0x4c, 0x59, 0x44, 0xd2, 0xf0, 0xa4, 0x25, + 0x75, 0x91, 0xc5, 0x3f, 0x80, 0x94, 0x8e, 0x7f, 0x61, 0xee, 0x56, 0xf6, 0x37, 0x99, 0x69, 0x9a, + 0x80, 0xe9, 0x02, 0xe9, 0x00, 0xfe, 0x6d, 0xc8, 0x10, 0x82, 0x24, 0xad, 0xdf, 0x57, 0xac, 0x3e, + 0x52, 0x2d, 0x4c, 0xf2, 0x55, 0x71, 0x15, 0xb7, 0x57, 0xdd, 0xe6, 0x00, 0x97, 0xf1, 0xf9, 0xb8, + 0x4c, 0x4c, 0x0e, 0xa5, 0x9f, 0xe3, 0xfd, 0x3b, 0x5a, 0xa4, 0x9b, 0x79, 0xbf, 0x0f, 0x29, 0x03, + 0x99, 0x83, 0x1e, 0x59, 0xec, 0x5b, 0xfb, 0xb7, 0x99, 0x8b, 0x75, 0xe0, 0x22, 0x86, 0x9e, 0x9e, + 0xeb, 0x48, 0xa4, 0xc3, 0x68, 0x06, 0xfe, 0x2c, 0x06, 0x70, 0x64, 0xca, 0xa7, 0x4a, 0x1f, 0x69, + 0x83, 0xc5, 0x50, 0x38, 0x50, 0x0d, 0x24, 0x21, 0x65, 0x88, 0xda, 0x63, 0x14, 0x36, 0xdc, 0xe6, + 0xc5, 0x50, 0x78, 0x07, 0x78, 0x15, 0x7d, 0x62, 0xb9, 0x61, 0xd6, 0x34, 0x90, 0x34, 0xc4, 0x74, + 0x26, 0xc4, 0x8c, 0xdd, 0xe3, 0x04, 0x97, 0x4d, 0x5e, 0xf4, 0xa4, 0xf2, 0x21, 0x3e, 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+ 0xf7, 0xd5, 0xab, 0x3c, 0xf7, 0xcf, 0x57, 0x79, 0xee, 0x37, 0xaf, 0xf3, 0x4b, 0x5f, 0xbd, 0xce, + 0x2f, 0x7d, 0xfd, 0x3a, 0xbf, 0xf4, 0xc1, 0x03, 0x59, 0xb1, 0x3a, 0x83, 0xb3, 0xb2, 0xa4, 0xf5, + 0x2b, 0xf4, 0xff, 0x51, 0xca, 0x99, 0x74, 0x57, 0xd6, 0x2a, 0xc3, 0x07, 0x95, 0xbe, 0xd6, 0x1e, + 0xf4, 0x90, 0x49, 0xfe, 0xd7, 0xf4, 0xce, 0xbd, 0xbb, 0xce, 0x5f, 0x9b, 0xac, 0x73, 0x1d, 0x99, + 0x67, 0x29, 0xfc, 0xb7, 0xa6, 0x77, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xad, 0xa2, 0x63, + 0xa1, 0x25, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1827,8 +1827,14 @@ type MsgClient interface { // ChannelCloseConfirm defines a rpc handler method for // MsgChannelCloseConfirm. ChannelCloseConfirm(ctx context.Context, in *MsgChannelCloseConfirm, opts ...grpc.CallOption) (*MsgChannelCloseConfirmResponse, error) + // RecvPacket defines a rpc handler method for MsgRecvPacket. + RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. TimeoutOnClose(ctx context.Context, in *MsgTimeoutOnClose, opts ...grpc.CallOption) (*MsgTimeoutOnCloseResponse, error) + // Timeout defines a rpc handler method for MsgTimeout. + Timeout(ctx context.Context, in *MsgTimeout, opts ...grpc.CallOption) (*MsgTimeoutResponse, error) + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) // ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. ChannelUpgradeInit(ctx context.Context, in *MsgChannelUpgradeInit, opts ...grpc.CallOption) (*MsgChannelUpgradeInitResponse, error) // ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. @@ -1911,6 +1917,15 @@ func (c *msgClient) ChannelCloseConfirm(ctx context.Context, in *MsgChannelClose return out, nil } +func (c *msgClient) RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) { + out := new(MsgRecvPacketResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Msg/RecvPacket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) TimeoutOnClose(ctx context.Context, in *MsgTimeoutOnClose, opts ...grpc.CallOption) (*MsgTimeoutOnCloseResponse, error) { out := new(MsgTimeoutOnCloseResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Msg/TimeoutOnClose", in, out, opts...) @@ -1920,6 +1935,24 @@ func (c *msgClient) TimeoutOnClose(ctx context.Context, in *MsgTimeoutOnClose, o return out, nil } +func (c *msgClient) Timeout(ctx context.Context, in *MsgTimeout, opts ...grpc.CallOption) (*MsgTimeoutResponse, error) { + out := new(MsgTimeoutResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Msg/Timeout", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) { + out := new(MsgAcknowledgementResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Msg/Acknowledgement", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) ChannelUpgradeInit(ctx context.Context, in *MsgChannelUpgradeInit, opts ...grpc.CallOption) (*MsgChannelUpgradeInitResponse, error) { out := new(MsgChannelUpgradeInitResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Msg/ChannelUpgradeInit", in, out, opts...) @@ -2016,8 +2049,14 @@ type MsgServer interface { // ChannelCloseConfirm defines a rpc handler method for // MsgChannelCloseConfirm. ChannelCloseConfirm(context.Context, *MsgChannelCloseConfirm) (*MsgChannelCloseConfirmResponse, error) + // RecvPacket defines a rpc handler method for MsgRecvPacket. + RecvPacket(context.Context, *MsgRecvPacket) (*MsgRecvPacketResponse, error) // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. TimeoutOnClose(context.Context, *MsgTimeoutOnClose) (*MsgTimeoutOnCloseResponse, error) + // Timeout defines a rpc handler method for MsgTimeout. + Timeout(context.Context, *MsgTimeout) (*MsgTimeoutResponse, error) + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + Acknowledgement(context.Context, *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) // ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. ChannelUpgradeInit(context.Context, *MsgChannelUpgradeInit) (*MsgChannelUpgradeInitResponse, error) // ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. @@ -2060,9 +2099,18 @@ func (*UnimplementedMsgServer) ChannelCloseInit(ctx context.Context, req *MsgCha func (*UnimplementedMsgServer) ChannelCloseConfirm(ctx context.Context, req *MsgChannelCloseConfirm) (*MsgChannelCloseConfirmResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChannelCloseConfirm not implemented") } +func (*UnimplementedMsgServer) RecvPacket(ctx context.Context, req *MsgRecvPacket) (*MsgRecvPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RecvPacket not implemented") +} func (*UnimplementedMsgServer) TimeoutOnClose(ctx context.Context, req *MsgTimeoutOnClose) (*MsgTimeoutOnCloseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TimeoutOnClose not implemented") } +func (*UnimplementedMsgServer) Timeout(ctx context.Context, req *MsgTimeout) (*MsgTimeoutResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Timeout not implemented") +} +func (*UnimplementedMsgServer) Acknowledgement(ctx context.Context, req *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Acknowledgement not implemented") +} func (*UnimplementedMsgServer) ChannelUpgradeInit(ctx context.Context, req *MsgChannelUpgradeInit) (*MsgChannelUpgradeInitResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChannelUpgradeInit not implemented") } @@ -2203,6 +2251,24 @@ func _Msg_ChannelCloseConfirm_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_RecvPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRecvPacket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RecvPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v1.Msg/RecvPacket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RecvPacket(ctx, req.(*MsgRecvPacket)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_TimeoutOnClose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgTimeoutOnClose) if err := dec(in); err != nil { @@ -2221,6 +2287,42 @@ func _Msg_TimeoutOnClose_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_Timeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTimeout) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Timeout(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v1.Msg/Timeout", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Timeout(ctx, req.(*MsgTimeout)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Acknowledgement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAcknowledgement) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Acknowledgement(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v1.Msg/Acknowledgement", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Acknowledgement(ctx, req.(*MsgAcknowledgement)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_ChannelUpgradeInit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgChannelUpgradeInit) if err := dec(in); err != nil { @@ -2411,10 +2513,22 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ChannelCloseConfirm", Handler: _Msg_ChannelCloseConfirm_Handler, }, + { + MethodName: "RecvPacket", + Handler: _Msg_RecvPacket_Handler, + }, { MethodName: "TimeoutOnClose", Handler: _Msg_TimeoutOnClose_Handler, }, + { + MethodName: "Timeout", + Handler: _Msg_Timeout_Handler, + }, + { + MethodName: "Acknowledgement", + Handler: _Msg_Acknowledgement_Handler, + }, { MethodName: "ChannelUpgradeInit", Handler: _Msg_ChannelUpgradeInit_Handler, @@ -2456,156 +2570,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "ibc/core/channel/v1/tx.proto", } -// PacketMsgClient is the client API for PacketMsg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PacketMsgClient interface { - // RecvPacket defines a rpc handler method for MsgRecvPacket. - RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) - // Timeout defines a rpc handler method for MsgTimeout. - Timeout(ctx context.Context, in *MsgTimeout, opts ...grpc.CallOption) (*MsgTimeoutResponse, error) - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) -} - -type packetMsgClient struct { - cc grpc1.ClientConn -} - -func NewPacketMsgClient(cc grpc1.ClientConn) PacketMsgClient { - return &packetMsgClient{cc} -} - -func (c *packetMsgClient) RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) { - out := new(MsgRecvPacketResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.PacketMsg/RecvPacket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *packetMsgClient) Timeout(ctx context.Context, in *MsgTimeout, opts ...grpc.CallOption) (*MsgTimeoutResponse, error) { - out := new(MsgTimeoutResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.PacketMsg/Timeout", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *packetMsgClient) Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) { - out := new(MsgAcknowledgementResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.PacketMsg/Acknowledgement", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PacketMsgServer is the server API for PacketMsg service. -type PacketMsgServer interface { - // RecvPacket defines a rpc handler method for MsgRecvPacket. - RecvPacket(context.Context, *MsgRecvPacket) (*MsgRecvPacketResponse, error) - // Timeout defines a rpc handler method for MsgTimeout. - Timeout(context.Context, *MsgTimeout) (*MsgTimeoutResponse, error) - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - Acknowledgement(context.Context, *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) -} - -// UnimplementedPacketMsgServer can be embedded to have forward compatible implementations. -type UnimplementedPacketMsgServer struct { -} - -func (*UnimplementedPacketMsgServer) RecvPacket(ctx context.Context, req *MsgRecvPacket) (*MsgRecvPacketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RecvPacket not implemented") -} -func (*UnimplementedPacketMsgServer) Timeout(ctx context.Context, req *MsgTimeout) (*MsgTimeoutResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Timeout not implemented") -} -func (*UnimplementedPacketMsgServer) Acknowledgement(ctx context.Context, req *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Acknowledgement not implemented") -} - -func RegisterPacketMsgServer(s grpc1.Server, srv PacketMsgServer) { - s.RegisterService(&_PacketMsg_serviceDesc, srv) -} - -func _PacketMsg_RecvPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRecvPacket) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PacketMsgServer).RecvPacket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.channel.v1.PacketMsg/RecvPacket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PacketMsgServer).RecvPacket(ctx, req.(*MsgRecvPacket)) - } - return interceptor(ctx, in, info, handler) -} - -func _PacketMsg_Timeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgTimeout) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PacketMsgServer).Timeout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.channel.v1.PacketMsg/Timeout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PacketMsgServer).Timeout(ctx, req.(*MsgTimeout)) - } - return interceptor(ctx, in, info, handler) -} - -func _PacketMsg_Acknowledgement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAcknowledgement) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PacketMsgServer).Acknowledgement(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.channel.v1.PacketMsg/Acknowledgement", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PacketMsgServer).Acknowledgement(ctx, req.(*MsgAcknowledgement)) - } - return interceptor(ctx, in, info, handler) -} - -var _PacketMsg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.core.channel.v1.PacketMsg", - HandlerType: (*PacketMsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RecvPacket", - Handler: _PacketMsg_RecvPacket_Handler, - }, - { - MethodName: "Timeout", - Handler: _PacketMsg_Timeout_Handler, - }, - { - MethodName: "Acknowledgement", - Handler: _PacketMsg_Acknowledgement_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/core/channel/v1/tx.proto", -} - func (m *MsgChannelOpenInit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/modules/core/04-channel/v2/client/cli/cli.go b/modules/core/04-channel/v2/client/cli/cli.go index 0b91ed0a1bd..8eff794ca3f 100644 --- a/modules/core/04-channel/v2/client/cli/cli.go +++ b/modules/core/04-channel/v2/client/cli/cli.go @@ -39,7 +39,7 @@ func NewTxCmd() *cobra.Command { txCmd.AddCommand( newCreateChannelTxCmd(), - newProvideCounterpartyTxCmd(), + newRegisterCounterpartyTxCmd(), ) return txCmd diff --git a/modules/core/04-channel/v2/client/cli/tx.go b/modules/core/04-channel/v2/client/cli/tx.go index 418f01815e7..6849a1476a9 100644 --- a/modules/core/04-channel/v2/client/cli/tx.go +++ b/modules/core/04-channel/v2/client/cli/tx.go @@ -47,14 +47,14 @@ func newCreateChannelTxCmd() *cobra.Command { return cmd } -// newProvideCounterpartyCmd defines the command to provide the counterparty channel identifier to an IBC channel. -func newProvideCounterpartyTxCmd() *cobra.Command { +// newRegisterCounterpartyCmd defines the command to provide the counterparty channel identifier to an IBC channel. +func newRegisterCounterpartyTxCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "provide-counterparty [channel-identifier] [counterparty-channel-identifier]", + Use: "register-counterparty [channel-identifier] [counterparty-channel-identifier]", Args: cobra.ExactArgs(2), - Short: "provide the counterparty channel id to an IBC channel", - Long: `Provide the counterparty channel id to an IBC channel specified by its channel ID.`, - Example: fmt.Sprintf("%s tx %s %s provide-counterparty channel-0 channel-1", version.AppName, exported.ModuleName, types.SubModuleName), + Short: "Register the counterparty channel identifier for an IBC channel", + Long: `Register the counterparty channel identifier for an IBC channel specified by its channel ID.`, + Example: fmt.Sprintf("%s tx %s %s register-counterparty channel-0 channel-1", version.AppName, exported.ModuleName, types.SubModuleName), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -64,7 +64,7 @@ func newProvideCounterpartyTxCmd() *cobra.Command { channelID := args[0] counterpartyChannelID := args[1] - msg := types.MsgProvideCounterparty{ + msg := types.MsgRegisterCounterparty{ ChannelId: channelID, CounterpartyChannelId: counterpartyChannelID, Signer: clientCtx.GetFromAddress().String(), diff --git a/modules/core/04-channel/v2/keeper/keeper.go b/modules/core/04-channel/v2/keeper/keeper.go index 9f7ebb9b8a8..b5e81ee7cee 100644 --- a/modules/core/04-channel/v2/keeper/keeper.go +++ b/modules/core/04-channel/v2/keeper/keeper.go @@ -56,7 +56,7 @@ func (Keeper) Logger(ctx context.Context) log.Logger { } func (k Keeper) ChannelStore(ctx context.Context, channelID string) storetypes.KVStore { - channelPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyChannelStorePrefix, channelID)) + channelPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyChannelPrefix, channelID)) return prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), channelPrefix) } @@ -87,8 +87,7 @@ func (k *Keeper) HasChannel(ctx context.Context, channelID string) bool { // GetCreator returns the creator of the channel. func (k *Keeper) GetCreator(ctx context.Context, channelID string) (string, bool) { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - bz := k.ChannelStore(sdkCtx, channelID).Get([]byte(types.CreatorKey)) + bz := k.ChannelStore(ctx, channelID).Get([]byte(types.CreatorKey)) if len(bz) == 0 { return "", false } @@ -98,14 +97,12 @@ func (k *Keeper) GetCreator(ctx context.Context, channelID string) (string, bool // SetCreator sets the creator of the channel. func (k *Keeper) SetCreator(ctx context.Context, channelID, creator string) { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - k.ChannelStore(sdkCtx, channelID).Set([]byte(types.CreatorKey), []byte(creator)) + k.ChannelStore(ctx, channelID).Set([]byte(types.CreatorKey), []byte(creator)) } // DeleteCreator deletes the creator associated with the channel. func (k *Keeper) DeleteCreator(ctx context.Context, channelID string) { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - k.ChannelStore(sdkCtx, channelID).Delete([]byte(types.CreatorKey)) + k.ChannelStore(ctx, channelID).Delete([]byte(types.CreatorKey)) } // GetPacketReceipt returns the packet receipt from the packet receipt path based on the channelID and sequence. diff --git a/modules/core/04-channel/v2/keeper/msg_server.go b/modules/core/04-channel/v2/keeper/msg_server.go index 0d06ba8e792..1acaf49e30c 100644 --- a/modules/core/04-channel/v2/keeper/msg_server.go +++ b/modules/core/04-channel/v2/keeper/msg_server.go @@ -17,7 +17,50 @@ import ( var _ channeltypesv2.MsgServer = &Keeper{} -// SendPacket implements the PacketMsgServer SendPacket method. +// CreateChannel defines a rpc handler method for MsgCreateChannel. +func (k *Keeper) CreateChannel(goCtx context.Context, msg *channeltypesv2.MsgCreateChannel) (*channeltypesv2.MsgCreateChannelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + channelID := k.channelKeeperV1.GenerateChannelIdentifier(ctx) + + // Initialize channel with empty counterparty channel identifier. + channel := channeltypesv2.NewChannel(msg.ClientId, "", msg.MerklePathPrefix) + k.SetChannel(ctx, channelID, channel) + k.SetCreator(ctx, channelID, msg.Signer) + k.SetNextSequenceSend(ctx, channelID, 1) + + k.EmitCreateChannelEvent(goCtx, channelID) + + return &channeltypesv2.MsgCreateChannelResponse{ChannelId: channelID}, nil +} + +// RegisterCounterparty defines a rpc handler method for MsgRegisterCounterparty. +func (k *Keeper) RegisterCounterparty(goCtx context.Context, msg *channeltypesv2.MsgRegisterCounterparty) (*channeltypesv2.MsgRegisterCounterpartyResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + creator, found := k.GetCreator(ctx, msg.ChannelId) + if !found { + return nil, errorsmod.Wrap(ibcerrors.ErrUnauthorized, "channel creator must be set") + } + + if creator != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "channel creator (%s) must match signer (%s)", creator, msg.Signer) + } + + channel, ok := k.GetChannel(ctx, msg.ChannelId) + if !ok { + return nil, errorsmod.Wrapf(channeltypesv2.ErrInvalidChannel, "channel must exist for channel id %s", msg.ChannelId) + } + + channel.CounterpartyChannelId = msg.CounterpartyChannelId + k.SetChannel(ctx, msg.ChannelId, channel) + // Delete client creator from state as it is not needed after this point. + k.DeleteCreator(ctx, msg.ChannelId) + + return &channeltypesv2.MsgRegisterCounterpartyResponse{}, nil +} + +// SendPacket defines a rpc handler method for MsgSendPacket. func (k *Keeper) SendPacket(ctx context.Context, msg *channeltypesv2.MsgSendPacket) (*channeltypesv2.MsgSendPacketResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) sequence, destChannel, err := k.sendPacket(ctx, msg.SourceChannel, msg.TimeoutTimestamp, msg.Payloads) @@ -43,46 +86,7 @@ func (k *Keeper) SendPacket(ctx context.Context, msg *channeltypesv2.MsgSendPack return &channeltypesv2.MsgSendPacketResponse{Sequence: sequence}, nil } -func (k *Keeper) Acknowledgement(ctx context.Context, msg *channeltypesv2.MsgAcknowledgement) (*channeltypesv2.MsgAcknowledgementResponse, error) { - sdkCtx := sdk.UnwrapSDKContext(ctx) - relayer, err := sdk.AccAddressFromBech32(msg.Signer) - if err != nil { - sdkCtx.Logger().Error("acknowledgement failed", "error", errorsmod.Wrap(err, "Invalid address for msg Signer")) - return nil, errorsmod.Wrap(err, "Invalid address for msg Signer") - } - - cacheCtx, writeFn := sdkCtx.CacheContext() - err = k.acknowledgePacket(cacheCtx, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight) - - switch err { - case nil: - writeFn() - case channeltypesv1.ErrNoOpMsg: - // no-ops do not need event emission as they will be ignored - sdkCtx.Logger().Debug("no-op on redundant relay", "source-channel", msg.Packet.SourceChannel) - return &channeltypesv2.MsgAcknowledgementResponse{Result: channeltypesv1.NOOP}, nil - default: - sdkCtx.Logger().Error("acknowledgement failed", "source-channel", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "acknowledge packet verification failed")) - return nil, errorsmod.Wrap(err, "acknowledge packet verification failed") - } - - recvResults := make(map[string]channeltypesv2.RecvPacketResult) - for _, r := range msg.Acknowledgement.AcknowledgementResults { - recvResults[r.AppName] = r.RecvPacketResult - } - - for _, pd := range msg.Packet.Payloads { - cbs := k.Router.Route(pd.SourcePort) - err := cbs.OnAcknowledgementPacket(ctx, msg.Packet.SourceChannel, msg.Packet.DestinationChannel, pd, recvResults[pd.DestinationPort].Acknowledgement, relayer) - if err != nil { - return nil, errorsmod.Wrapf(err, "failed OnAcknowledgementPacket for source port %s, source channel %s, destination channel %s", pd.SourcePort, msg.Packet.SourceChannel, msg.Packet.DestinationChannel) - } - } - - return &channeltypesv2.MsgAcknowledgementResponse{Result: channeltypesv1.SUCCESS}, nil -} - -// RecvPacket implements the PacketMsgServer RecvPacket method. +// RecvPacket defines a rpc handler method for MsgRecvPacket. func (k *Keeper) RecvPacket(ctx context.Context, msg *channeltypesv2.MsgRecvPacket) (*channeltypesv2.MsgRecvPacketResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -162,7 +166,47 @@ func (k *Keeper) RecvPacket(ctx context.Context, msg *channeltypesv2.MsgRecvPack return &channeltypesv2.MsgRecvPacketResponse{Result: channeltypesv1.SUCCESS}, nil } -// Timeout implements the PacketMsgServer Timeout method. +// Acknowledgement defines an rpc handler method for MsgAcknowledgement. +func (k *Keeper) Acknowledgement(ctx context.Context, msg *channeltypesv2.MsgAcknowledgement) (*channeltypesv2.MsgAcknowledgementResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + relayer, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + sdkCtx.Logger().Error("acknowledgement failed", "error", errorsmod.Wrap(err, "Invalid address for msg Signer")) + return nil, errorsmod.Wrap(err, "Invalid address for msg Signer") + } + + cacheCtx, writeFn := sdkCtx.CacheContext() + err = k.acknowledgePacket(cacheCtx, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight) + + switch err { + case nil: + writeFn() + case channeltypesv1.ErrNoOpMsg: + // no-ops do not need event emission as they will be ignored + sdkCtx.Logger().Debug("no-op on redundant relay", "source-channel", msg.Packet.SourceChannel) + return &channeltypesv2.MsgAcknowledgementResponse{Result: channeltypesv1.NOOP}, nil + default: + sdkCtx.Logger().Error("acknowledgement failed", "source-channel", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "acknowledge packet verification failed")) + return nil, errorsmod.Wrap(err, "acknowledge packet verification failed") + } + + recvResults := make(map[string]channeltypesv2.RecvPacketResult) + for _, r := range msg.Acknowledgement.AcknowledgementResults { + recvResults[r.AppName] = r.RecvPacketResult + } + + for _, pd := range msg.Packet.Payloads { + cbs := k.Router.Route(pd.SourcePort) + err := cbs.OnAcknowledgementPacket(ctx, msg.Packet.SourceChannel, msg.Packet.DestinationChannel, pd, recvResults[pd.DestinationPort].Acknowledgement, relayer) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed OnAcknowledgementPacket for source port %s, source channel %s, destination channel %s", pd.SourcePort, msg.Packet.SourceChannel, msg.Packet.DestinationChannel) + } + } + + return &channeltypesv2.MsgAcknowledgementResponse{Result: channeltypesv1.SUCCESS}, nil +} + +// Timeout defines a rpc handler method for MsgTimeout. func (k *Keeper) Timeout(ctx context.Context, timeout *channeltypesv2.MsgTimeout) (*channeltypesv2.MsgTimeoutResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -200,46 +244,3 @@ func (k *Keeper) Timeout(ctx context.Context, timeout *channeltypesv2.MsgTimeout return &channeltypesv2.MsgTimeoutResponse{Result: channeltypesv1.SUCCESS}, nil } - -// CreateChannel defines a rpc handler method for MsgCreateChannel -func (k *Keeper) CreateChannel(goCtx context.Context, msg *channeltypesv2.MsgCreateChannel) (*channeltypesv2.MsgCreateChannelResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - channelID := k.channelKeeperV1.GenerateChannelIdentifier(ctx) - - // Initialize channel with empty counterparty channel identifier. - channel := channeltypesv2.NewChannel(msg.ClientId, "", msg.MerklePathPrefix) - k.SetChannel(ctx, channelID, channel) - k.SetCreator(ctx, channelID, msg.Signer) - k.SetNextSequenceSend(ctx, channelID, 1) - - k.EmitCreateChannelEvent(goCtx, channelID) - - return &channeltypesv2.MsgCreateChannelResponse{ChannelId: channelID}, nil -} - -// ProvideCounterparty defines a rpc handler method for MsgProvideCounterparty. -func (k *Keeper) ProvideCounterparty(goCtx context.Context, msg *channeltypesv2.MsgProvideCounterparty) (*channeltypesv2.MsgProvideCounterpartyResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - creator, found := k.GetCreator(ctx, msg.ChannelId) - if !found { - return nil, errorsmod.Wrap(ibcerrors.ErrUnauthorized, "channel creator must be set") - } - - if creator != msg.Signer { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "channel creator (%s) must match signer (%s)", creator, msg.Signer) - } - - channel, ok := k.GetChannel(ctx, msg.ChannelId) - if !ok { - return nil, errorsmod.Wrapf(channeltypesv2.ErrInvalidChannel, "channel must exist for channel id %s", msg.ChannelId) - } - - channel.CounterpartyChannelId = msg.CounterpartyChannelId - k.SetChannel(ctx, msg.ChannelId, channel) - // Delete client creator from state as it is not needed after this point. - k.DeleteCreator(ctx, msg.ChannelId) - - return &channeltypesv2.MsgProvideCounterpartyResponse{}, nil -} diff --git a/modules/core/04-channel/v2/keeper/msg_server_test.go b/modules/core/04-channel/v2/keeper/msg_server_test.go index 028489c8315..fa690b8087e 100644 --- a/modules/core/04-channel/v2/keeper/msg_server_test.go +++ b/modules/core/04-channel/v2/keeper/msg_server_test.go @@ -17,6 +17,87 @@ import ( mockv2 "github.com/cosmos/ibc-go/v9/testing/mock/v2" ) +func (suite *KeeperTestSuite) TestRegisterCounterparty() { + var ( + path *ibctesting.Path + msg *channeltypesv2.MsgRegisterCounterparty + ) + cases := []struct { + name string + malleate func() + expError error + }{ + { + "success", + func() { + // set it before handler + suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.SetChannel(suite.chainA.GetContext(), msg.ChannelId, channeltypesv2.NewChannel(path.EndpointA.ClientID, "", ibctesting.MerklePath)) + }, + nil, + }, + { + "failure: creator not set", + func() { + suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.DeleteCreator(suite.chainA.GetContext(), path.EndpointA.ChannelID) + }, + ibcerrors.ErrUnauthorized, + }, + { + "failure: signer does not match creator", + func() { + suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.SetCreator(suite.chainA.GetContext(), path.EndpointA.ChannelID, ibctesting.TestAccAddress) + }, + ibcerrors.ErrUnauthorized, + }, + { + "failure: channel must already exist", + func() { + suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.ChannelStore(suite.chainA.GetContext(), path.EndpointA.ChannelID).Delete([]byte(channeltypesv2.ChannelKey)) + }, + channeltypesv2.ErrInvalidChannel, + }, + } + + for _, tc := range cases { + suite.Run(tc.name, func() { + suite.SetupTest() + + path = ibctesting.NewPath(suite.chainA, suite.chainB) + path.SetupClients() + + suite.Require().NoError(path.EndpointA.CreateChannel()) + suite.Require().NoError(path.EndpointB.CreateChannel()) + + signer := path.EndpointA.Chain.SenderAccount.GetAddress().String() + msg = channeltypesv2.NewMsgRegisterCounterparty(path.EndpointA.ChannelID, path.EndpointB.ChannelID, signer) + + tc.malleate() + + res, err := path.EndpointA.Chain.SendMsgs(msg) + + expPass := tc.expError == nil + if expPass { + suite.Require().NotNil(res) + suite.Require().Nil(err) + + // Assert counterparty channel id filled in and creator deleted + channel, found := suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelID) + suite.Require().True(found) + suite.Require().Equal(channel.CounterpartyChannelId, path.EndpointB.ChannelID) + + _, found = suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetCreator(suite.chainA.GetContext(), path.EndpointA.ChannelID) + suite.Require().False(found) + + seq, found := suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetNextSequenceSend(suite.chainA.GetContext(), path.EndpointA.ChannelID) + suite.Require().True(found) + suite.Require().Equal(seq, uint64(1)) + } else { + ibctesting.RequireErrorIsOrContains(suite.T(), err, tc.expError, "expected error %q, got %q instead", tc.expError, err) + } + }) + } +} + func (suite *KeeperTestSuite) TestMsgSendPacket() { var ( path *ibctesting.Path @@ -84,7 +165,7 @@ func (suite *KeeperTestSuite) TestMsgSendPacket() { path = ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupV2() - timeoutTimestamp = suite.chainA.GetTimeoutTimestamp() + timeoutTimestamp = suite.chainA.GetTimeoutTimestampSecs() payload = mockv2.NewMockPayload(mockv2.ModuleNameA, mockv2.ModuleNameB) expectedPacket = channeltypesv2.NewPacket(1, path.EndpointA.ChannelID, path.EndpointB.ChannelID, timeoutTimestamp, payload) @@ -201,7 +282,7 @@ func (suite *KeeperTestSuite) TestMsgRecvPacket() { path = ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupV2() - timeoutTimestamp := suite.chainA.GetTimeoutTimestamp() + timeoutTimestamp := suite.chainA.GetTimeoutTimestampSecs() var err error packet, err = path.EndpointA.MsgSendPacket(timeoutTimestamp, mockv2.NewMockPayload(mockv2.ModuleNameA, mockv2.ModuleNameB)) @@ -254,79 +335,6 @@ func (suite *KeeperTestSuite) TestMsgRecvPacket() { } } -func (suite *KeeperTestSuite) TestProvideCounterparty() { - var ( - path *ibctesting.Path - msg *channeltypesv2.MsgProvideCounterparty - ) - cases := []struct { - name string - malleate func() - expError error - }{ - { - "success", - func() { - // set it before handler - suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.SetChannel(suite.chainA.GetContext(), msg.ChannelId, channeltypesv2.NewChannel(path.EndpointA.ClientID, "", ibctesting.MerklePath)) - }, - nil, - }, - { - "failure: signer does not match creator", - func() { - msg.Signer = path.EndpointB.Chain.SenderAccount.GetAddress().String() - }, - ibcerrors.ErrUnauthorized, - }, - /* // Account sequence mismatch, expected 5, got 6. :thinking: - { - "failure: counterparty does not already exists", - func() { - suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.ChannelStore(suite.chainA.GetContext(), path.EndpointA.ChannelID).Delete([]byte(channeltypesv2.ChannelKey)) - }, - channeltypesv2.ErrInvalidChannel, - }, - */ - } - - for _, tc := range cases { - tc := tc - path = ibctesting.NewPath(suite.chainA, suite.chainB) - path.SetupClients() - - suite.Require().NoError(path.EndpointA.CreateChannel()) - suite.Require().NoError(path.EndpointB.CreateChannel()) - - signer := path.EndpointA.Chain.SenderAccount.GetAddress().String() - msg = channeltypesv2.NewMsgProvideCounterparty(path.EndpointA.ChannelID, path.EndpointB.ChannelID, signer) - - tc.malleate() - - res, err := path.EndpointA.Chain.SendMsgs(msg) - - expPass := tc.expError == nil - if expPass { - suite.Require().NotNil(res) - suite.Require().Nil(err) - - // Assert counterparty channel id filled in and creator deleted - channel, found := suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelID) - suite.Require().True(found) - suite.Require().Equal(channel.CounterpartyChannelId, path.EndpointB.ChannelID) - - _, found = suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetCreator(suite.chainA.GetContext(), path.EndpointA.ChannelID) - suite.Require().False(found) - - seq, found := suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetNextSequenceSend(suite.chainA.GetContext(), path.EndpointA.ChannelID) - suite.Require().True(found) - suite.Require().Equal(seq, uint64(1)) - } else { - suite.Require().Error(err) - } - } -} - func (suite *KeeperTestSuite) TestMsgAcknowledgement() { var ( path *ibctesting.Path @@ -393,7 +401,7 @@ func (suite *KeeperTestSuite) TestMsgAcknowledgement() { path = ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupV2() - timeoutTimestamp := suite.chainA.GetTimeoutTimestamp() + timeoutTimestamp := suite.chainA.GetTimeoutTimestampSecs() var err error // Send packet from A to B diff --git a/modules/core/04-channel/v2/keeper/packet.go b/modules/core/04-channel/v2/keeper/packet.go index 193fcadeb83..b4e0516307d 100644 --- a/modules/core/04-channel/v2/keeper/packet.go +++ b/modules/core/04-channel/v2/keeper/packet.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "strconv" - "time" errorsmod "cosmossdk.io/errors" @@ -68,12 +67,12 @@ func (k *Keeper) sendPacket( if err != nil { return 0, "", err } - // check if packet is timed out on the receiving chain - // convert packet timeout to nanoseconds for now to use existing helper function - // TODO: Remove this workaround with Issue #7414: https://github.com/cosmos/ibc-go/issues/7414 - timeout := channeltypes.NewTimeoutWithTimestamp(uint64(time.Unix(int64(packet.GetTimeoutTimestamp()), 0).UnixNano())) - if timeout.TimestampElapsed(latestTimestamp) { - return 0, "", errorsmod.Wrap(timeout.ErrTimeoutElapsed(latestHeight, latestTimestamp), "invalid packet timeout") + + // client timestamps are in nanoseconds while packet timeouts are in seconds + // thus to compare them, we convert the packet timeout to nanoseconds + timeoutTimestamp = types.TimeoutTimestampToNanos(packet.TimeoutTimestamp) + if latestTimestamp >= timeoutTimestamp { + return 0, "", errorsmod.Wrapf(channeltypes.ErrTimeoutElapsed, "latest timestamp: %d, timeout timestamp: %d", latestTimestamp, timeoutTimestamp) } commitment := types.CommitPacket(packet) @@ -102,9 +101,6 @@ func (k *Keeper) recvPacket( proof []byte, proofHeight exported.Height, ) error { - // Lookup channel associated with destination channel ID and ensure - // that the packet was indeed sent by our counterparty by verifying - // packet sender is our channel's counterparty channel id. channel, ok := k.GetChannel(ctx, packet.DestinationChannel) if !ok { // TODO: figure out how aliasing will work when more than one payload is sent. @@ -113,19 +109,18 @@ func (k *Keeper) recvPacket( return errorsmod.Wrap(types.ErrChannelNotFound, packet.DestinationChannel) } } + if channel.CounterpartyChannelId != packet.SourceChannel { return errorsmod.Wrapf(channeltypes.ErrInvalidChannelIdentifier, "counterparty channel id (%s) does not match packet source channel id (%s)", channel.CounterpartyChannelId, packet.SourceChannel) } + clientID := channel.ClientId // check if packet timed out by comparing it with the latest height of the chain sdkCtx := sdk.UnwrapSDKContext(ctx) - selfHeight, selfTimestamp := clienttypes.GetSelfHeight(ctx), uint64(sdkCtx.BlockTime().UnixNano()) - // convert packet timeout to nanoseconds for now to use existing helper function - // TODO: Remove this workaround with Issue #7414: https://github.com/cosmos/ibc-go/issues/7414 - timeout := channeltypes.NewTimeoutWithTimestamp(uint64(time.Unix(int64(packet.GetTimeoutTimestamp()), 0).UnixNano())) - if timeout.Elapsed(selfHeight, selfTimestamp) { - return errorsmod.Wrap(timeout.ErrTimeoutElapsed(selfHeight, selfTimestamp), "packet timeout elapsed") + currentTimestamp := uint64(sdkCtx.BlockTime().Unix()) + if currentTimestamp >= packet.TimeoutTimestamp { + return errorsmod.Wrapf(channeltypes.ErrTimeoutElapsed, "current timestamp: %d, timeout timestamp: %d", currentTimestamp, packet.TimeoutTimestamp) } // REPLAY PROTECTION: Packet receipts will indicate that a packet has already been received @@ -284,15 +279,15 @@ func (k *Keeper) timeoutPacket( proof []byte, proofHeight exported.Height, ) error { - // Lookup counterparty associated with our channel and ensure - // that the packet was indeed sent by our counterparty. channel, ok := k.GetChannel(ctx, packet.SourceChannel) if !ok { return errorsmod.Wrap(types.ErrChannelNotFound, packet.SourceChannel) } + if channel.CounterpartyChannelId != packet.DestinationChannel { return errorsmod.Wrapf(channeltypes.ErrInvalidChannelIdentifier, "counterparty channel id (%s) does not match packet destination channel id (%s)", channel.CounterpartyChannelId, packet.DestinationChannel) } + clientID := channel.ClientId // check that timeout height or timeout timestamp has passed on the other end @@ -301,11 +296,9 @@ func (k *Keeper) timeoutPacket( return err } - // convert packet timeout to nanoseconds for now to use existing helper function - // TODO: Remove this workaround with Issue #7414: https://github.com/cosmos/ibc-go/issues/7414 - timeout := channeltypes.NewTimeoutWithTimestamp(uint64(time.Unix(int64(packet.GetTimeoutTimestamp()), 0).UnixNano())) - if !timeout.Elapsed(clienttypes.ZeroHeight(), proofTimestamp) { - return errorsmod.Wrap(timeout.ErrTimeoutNotReached(proofHeight.(clienttypes.Height), proofTimestamp), "packet timeout not reached") + timeoutTimestamp := types.TimeoutTimestampToNanos(packet.TimeoutTimestamp) + if proofTimestamp < timeoutTimestamp { + return errorsmod.Wrapf(channeltypes.ErrTimeoutNotReached, "proof timestamp: %d, timeout timestamp: %d", proofTimestamp, timeoutTimestamp) } // check that the commitment has not been cleared and that it matches the packet sent by relayer diff --git a/modules/core/04-channel/v2/module.go b/modules/core/04-channel/v2/module.go index 9bc3ad94699..9f6fbf8f7d6 100644 --- a/modules/core/04-channel/v2/module.go +++ b/modules/core/04-channel/v2/module.go @@ -7,17 +7,17 @@ import ( "github.com/cosmos/ibc-go/v9/modules/core/04-channel/v2/types" ) -// Name returns the IBC client name +// Name returns the IBC channel/v2 name func Name() string { return types.SubModuleName } -// GetQueryCmd returns no root query command for the IBC client +// GetQueryCmd returns the root query command for IBC channels v2. func GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// GetTxCmd returns the root tx command for 02-client. +// GetTxCmd returns the root tx command for IBC channels v2. func GetTxCmd() *cobra.Command { return cli.NewTxCmd() } diff --git a/modules/core/04-channel/v2/types/channel_test.go b/modules/core/04-channel/v2/types/channel_test.go new file mode 100644 index 00000000000..c6c71d9a157 --- /dev/null +++ b/modules/core/04-channel/v2/types/channel_test.go @@ -0,0 +1,58 @@ +package types_test + +import ( + "github.com/cosmos/ibc-go/v9/modules/core/04-channel/v2/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v9/testing" +) + +func (s *TypesTestSuite) TestValidateChannel() { + var c types.Channel + testCases := []struct { + name string + malleate func() + expErr error + }{ + { + name: "success", + malleate: func() {}, + }, + { + name: "failure: invalid ClientID", + malleate: func() { + c.ClientId = "" + }, + expErr: host.ErrInvalidID, + }, + { + name: "failure: invalid counterparty channel id", + malleate: func() { + c.CounterpartyChannelId = "" + }, + expErr: host.ErrInvalidID, + }, + { + name: "failure: invalid Merkle Path Prefix", + malleate: func() { + c.MerklePathPrefix.KeyPath = [][]byte{} + }, + expErr: types.ErrInvalidChannel, + }, + } + for _, tc := range testCases { + s.Run(tc.name, func() { + c = types.NewChannel(ibctesting.FirstClientID, ibctesting.SecondClientID, ibctesting.MerklePath) + + tc.malleate() + + err := c.Validate() + + expPass := tc.expErr == nil + if expPass { + s.Require().NoError(err) + } else { + ibctesting.RequireErrorIsOrContains(s.T(), err, tc.expErr) + } + }) + } +} diff --git a/modules/core/04-channel/v2/types/codec.go b/modules/core/04-channel/v2/types/codec.go index 79941f59175..788cdb30732 100644 --- a/modules/core/04-channel/v2/types/codec.go +++ b/modules/core/04-channel/v2/types/codec.go @@ -10,11 +10,11 @@ import ( func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), + &MsgCreateChannel{}, + &MsgRegisterCounterparty{}, &MsgSendPacket{}, &MsgRecvPacket{}, &MsgTimeout{}, &MsgAcknowledgement{}, - &MsgCreateChannel{}, - &MsgProvideCounterparty{}, ) } diff --git a/modules/core/04-channel/v2/types/errors.go b/modules/core/04-channel/v2/types/errors.go index 5cd4c677fc0..7a1cabe9fc0 100644 --- a/modules/core/04-channel/v2/types/errors.go +++ b/modules/core/04-channel/v2/types/errors.go @@ -10,7 +10,7 @@ var ( ErrInvalidPacket = errorsmod.Register(SubModuleName, 4, "invalid packet") ErrInvalidPayload = errorsmod.Register(SubModuleName, 5, "invalid payload") ErrSequenceSendNotFound = errorsmod.Register(SubModuleName, 6, "sequence send not found") - ErrInvalidAcknowledgement = errorsmod.Register(SubModuleName, 8, "invalid acknowledgement") - ErrPacketCommitmentNotFound = errorsmod.Register(SubModuleName, 9, "packet commitment not found") - ErrAcknowledgementNotFound = errorsmod.Register(SubModuleName, 10, "packet acknowledgement not found") + ErrInvalidAcknowledgement = errorsmod.Register(SubModuleName, 7, "invalid acknowledgement") + ErrPacketCommitmentNotFound = errorsmod.Register(SubModuleName, 8, "packet commitment not found") + ErrAcknowledgementNotFound = errorsmod.Register(SubModuleName, 9, "packet acknowledgement not found") ) diff --git a/modules/core/04-channel/v2/types/keys.go b/modules/core/04-channel/v2/types/keys.go index af3f68c5449..f751a92b3f1 100644 --- a/modules/core/04-channel/v2/types/keys.go +++ b/modules/core/04-channel/v2/types/keys.go @@ -4,12 +4,12 @@ const ( // SubModuleName defines the channelv2 module name. SubModuleName = "channelv2" - // ChannelKey is the key used to store channel in the client store. + // ChannelKey is the key used to store channels in the channel store. // the channel key is imported from types instead of host because // the channel key is not a part of the ics-24 host specification ChannelKey = "channel" - // CreatorKey is the key used to store the client creator in the client store + // CreatorKey is the key used to store the channel creator in the channel store // the creator key is imported from types instead of host because // the creator key is not a part of the ics-24 host specification CreatorKey = "creator" diff --git a/modules/core/04-channel/v2/types/msgs.go b/modules/core/04-channel/v2/types/msgs.go index 45fdf38775e..9c6f724e40d 100644 --- a/modules/core/04-channel/v2/types/msgs.go +++ b/modules/core/04-channel/v2/types/msgs.go @@ -14,12 +14,12 @@ import ( ) var ( - _ sdk.Msg = (*MsgProvideCounterparty)(nil) - _ sdk.HasValidateBasic = (*MsgProvideCounterparty)(nil) - _ sdk.Msg = (*MsgCreateChannel)(nil) _ sdk.HasValidateBasic = (*MsgCreateChannel)(nil) + _ sdk.Msg = (*MsgRegisterCounterparty)(nil) + _ sdk.HasValidateBasic = (*MsgRegisterCounterparty)(nil) + _ sdk.Msg = (*MsgSendPacket)(nil) _ sdk.HasValidateBasic = (*MsgSendPacket)(nil) @@ -33,52 +33,52 @@ var ( _ sdk.HasValidateBasic = (*MsgAcknowledgement)(nil) ) -// NewMsgProvideCounterparty creates a new MsgProvideCounterparty instance -func NewMsgProvideCounterparty(channelID, counterpartyChannelID string, signer string) *MsgProvideCounterparty { - return &MsgProvideCounterparty{ - Signer: signer, - ChannelId: channelID, - CounterpartyChannelId: counterpartyChannelID, +// NewMsgCreateChannel creates a new MsgCreateChannel instance +func NewMsgCreateChannel(clientID string, merklePathPrefix commitmenttypesv2.MerklePath, signer string) *MsgCreateChannel { + return &MsgCreateChannel{ + Signer: signer, + ClientId: clientID, + MerklePathPrefix: merklePathPrefix, } } -// ValidateBasic performs basic checks on a MsgProvideCounterparty. -func (msg *MsgProvideCounterparty) ValidateBasic() error { +// ValidateBasic performs basic checks on a MsgCreateChannel. +func (msg *MsgCreateChannel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { + if err := host.ClientIdentifierValidator(msg.ClientId); err != nil { return err } - if err := host.ChannelIdentifierValidator(msg.CounterpartyChannelId); err != nil { + if err := msg.MerklePathPrefix.ValidateAsPrefix(); err != nil { return err } return nil } -// NewMsgCreateChannel creates a new MsgCreateChannel instance -func NewMsgCreateChannel(clientID string, merklePathPrefix commitmenttypesv2.MerklePath, signer string) *MsgCreateChannel { - return &MsgCreateChannel{ - Signer: signer, - ClientId: clientID, - MerklePathPrefix: merklePathPrefix, +// NewMsgRegisterCounterparty creates a new MsgRegisterCounterparty instance +func NewMsgRegisterCounterparty(channelID, counterpartyChannelID string, signer string) *MsgRegisterCounterparty { + return &MsgRegisterCounterparty{ + Signer: signer, + ChannelId: channelID, + CounterpartyChannelId: counterpartyChannelID, } } -// ValidateBasic performs basic checks on a MsgCreateChannel. -func (msg *MsgCreateChannel) ValidateBasic() error { +// ValidateBasic performs basic checks on a MsgRegisterCounterparty. +func (msg *MsgRegisterCounterparty) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - if err := host.ClientIdentifierValidator(msg.ClientId); err != nil { + if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { return err } - if err := msg.MerklePathPrefix.ValidateAsPrefix(); err != nil { + if err := host.ChannelIdentifierValidator(msg.CounterpartyChannelId); err != nil { return err } diff --git a/modules/core/04-channel/v2/types/msgs_test.go b/modules/core/04-channel/v2/types/msgs_test.go index da7779f0602..44e92c4e5a3 100644 --- a/modules/core/04-channel/v2/types/msgs_test.go +++ b/modules/core/04-channel/v2/types/msgs_test.go @@ -36,9 +36,8 @@ func TestTypesTestSuite(t *testing.T) { suite.Run(t, new(TypesTestSuite)) } -// TestMsgProvideCounterpartyValidateBasic tests ValidateBasic for MsgProvideCounterparty -func (s *TypesTestSuite) TestMsgProvideCounterpartyValidateBasic() { - var msg *types.MsgProvideCounterparty +func (s *TypesTestSuite) TestMsgRegisterCounterpartyValidateBasic() { + var msg *types.MsgRegisterCounterparty testCases := []struct { name string @@ -74,7 +73,7 @@ func (s *TypesTestSuite) TestMsgProvideCounterpartyValidateBasic() { } for _, tc := range testCases { - msg = types.NewMsgProvideCounterparty( + msg = types.NewMsgRegisterCounterparty( ibctesting.FirstChannelID, ibctesting.SecondChannelID, ibctesting.TestAccAddress, diff --git a/modules/core/04-channel/v2/types/packet.go b/modules/core/04-channel/v2/types/packet.go index 7be9e0b326a..1ba7722b925 100644 --- a/modules/core/04-channel/v2/types/packet.go +++ b/modules/core/04-channel/v2/types/packet.go @@ -2,6 +2,7 @@ package types import ( "strings" + "time" errorsmod "cosmossdk.io/errors" @@ -78,3 +79,8 @@ func (p Payload) ValidateBasic() error { } return nil } + +// TimeoutTimestampToNanos takes seconds as a uint64 and returns Unix nanoseconds as uint64. +func TimeoutTimestampToNanos(seconds uint64) uint64 { + return uint64(time.Unix(int64(seconds), 0).UnixNano()) +} diff --git a/modules/core/04-channel/v2/types/packet.pb.go b/modules/core/04-channel/v2/types/packet.pb.go index a264047c3d6..a41a9d8256e 100644 --- a/modules/core/04-channel/v2/types/packet.pb.go +++ b/modules/core/04-channel/v2/types/packet.pb.go @@ -69,7 +69,7 @@ type Packet struct { SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` // identifies the receiving chain. DestinationChannel string `protobuf:"bytes,3,opt,name=destination_channel,json=destinationChannel,proto3" json:"destination_channel,omitempty"` - // timeout timestamp after which the packet times out. + // timeout timestamp in seconds 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 payloads, each one for a specific application. Payloads []Payload `protobuf:"bytes,5,rep,name=payloads,proto3" json:"payloads"` diff --git a/modules/core/04-channel/v2/types/query.pb.go b/modules/core/04-channel/v2/types/query.pb.go index 25a41a0fb37..cf9501c53d3 100644 --- a/modules/core/04-channel/v2/types/query.pb.go +++ b/modules/core/04-channel/v2/types/query.pb.go @@ -378,43 +378,43 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v2/query.proto", fileDescriptor_a328cba4986edcab) } var fileDescriptor_a328cba4986edcab = []byte{ - // 574 bytes of a gzipped FileDescriptorProto + // 572 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x6b, 0x13, 0x41, - 0x18, 0xcd, 0xd4, 0xd4, 0xd8, 0x69, 0x40, 0x99, 0x46, 0x08, 0x4b, 0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41, 0x07, 0x05, 0x55, 0x33, 0x63, 0x94, 0x11, 0x69, 0x63, - 0xfb, 0x1a, 0x9d, 0x89, 0x5f, 0xab, 0xf6, 0xe1, 0xc7, 0xef, 0xcf, 0x4b, 0xf7, 0xd0, 0x36, 0x9e, - 0xf3, 0xaf, 0xc4, 0x27, 0x57, 0x5b, 0x3f, 0x45, 0xdf, 0x01, 0xbc, 0x33, 0x9d, 0x20, 0x54, 0x9b, - 0x4d, 0x39, 0x23, 0xc9, 0x46, 0x7d, 0x11, 0x88, 0x96, 0x7b, 0xa0, 0xe4, 0x3e, 0x47, 0xcd, 0x79, - 0x72, 0xc5, 0x84, 0x5e, 0x1c, 0xaa, 0x61, 0xad, 0xab, 0x18, 0x0b, 0x7c, 0x32, 0x8e, 0xc5, 0x29, - 0xba, 0x00, 0xf0, 0x6e, 0x66, 0x24, 0xd0, 0xc3, 0xbf, 0xe9, 0xcb, 0x0e, 0xa9, 0xf1, 0x68, 0x61, - 0x9c, 0x36, 0xf7, 0x42, 0x99, 0x6b, 0xa2, 0xa7, 0x0b, 0x98, 0x9b, 0x4a, 0x65, 0xda, 0xda, 0xfe, - 0xab, 0xb3, 0xa1, 0x09, 0xce, 0x87, 0x26, 0xf8, 0x35, 0x34, 0xc1, 0xc7, 0x91, 0x99, 0x3b, 0x1f, - 0x99, 0xb9, 0x8b, 0x91, 0x99, 0x7b, 0xb3, 0xe7, 0xf9, 0xb2, 0xdb, 0x6f, 0xdb, 0x84, 0x07, 0x98, - 0x70, 0x11, 0x70, 0x11, 0x53, 0xee, 0x78, 0x1c, 0x0f, 0x1e, 0xe3, 0x80, 0x77, 0xfa, 0x3d, 0x2a, - 0x12, 0x01, 0xf7, 0x77, 0x77, 0x52, 0x1a, 0xe4, 0x71, 0x48, 0x45, 0xfb, 0xa6, 0xfa, 0x9e, 0x3e, - 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x30, 0x0d, 0x16, 0xff, 0x05, 0x00, 0x00, + 0x18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 0xff, 0xff, 0x66, 0x70, 0x9b, 0xa5, 0x00, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/v2/types/query.pb.gw.go b/modules/core/04-channel/v2/types/query.pb.gw.go index 8dceff08ed6..03626cf677f 100644 --- a/modules/core/04-channel/v2/types/query.pb.gw.go +++ b/modules/core/04-channel/v2/types/query.pb.gw.go @@ -419,7 +419,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Channel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 2, 1, 0, 4, 1, 5, 4}, []string{"ibc", "core", "channel", "v2", "channel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Channel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "channel", "v2", "channels", "channel_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"ibc", "core", "channel", "v2", "channels", "channel_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(false))) diff --git a/modules/core/04-channel/v2/types/tx.pb.go b/modules/core/04-channel/v2/types/tx.pb.go index 2359841ca7a..b64d2c7be97 100644 --- a/modules/core/04-channel/v2/types/tx.pb.go +++ b/modules/core/04-channel/v2/types/tx.pb.go @@ -114,9 +114,9 @@ func (m *MsgCreateChannelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateChannelResponse proto.InternalMessageInfo -// MsgProvideCounterparty defines the message used to provide the counterparty channel +// MsgRegisterCounterparty defines the message used to provide the counterparty channel // identifier. -type MsgProvideCounterparty struct { +type MsgRegisterCounterparty struct { // unique identifier we will use to write all packet messages sent to counterparty ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // counterparty channel identifier @@ -125,18 +125,18 @@ type MsgProvideCounterparty struct { Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } -func (m *MsgProvideCounterparty) Reset() { *m = MsgProvideCounterparty{} } -func (m *MsgProvideCounterparty) String() string { return proto.CompactTextString(m) } -func (*MsgProvideCounterparty) ProtoMessage() {} -func (*MsgProvideCounterparty) Descriptor() ([]byte, []int) { +func (m *MsgRegisterCounterparty) Reset() { *m = MsgRegisterCounterparty{} } +func (m *MsgRegisterCounterparty) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterparty) ProtoMessage() {} +func (*MsgRegisterCounterparty) Descriptor() ([]byte, []int) { return fileDescriptor_d421c7119e969b99, []int{2} } -func (m *MsgProvideCounterparty) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterCounterparty) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgProvideCounterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterCounterparty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgProvideCounterparty.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterCounterparty.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -146,34 +146,34 @@ func (m *MsgProvideCounterparty) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgProvideCounterparty) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgProvideCounterparty.Merge(m, src) +func (m *MsgRegisterCounterparty) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterparty.Merge(m, src) } -func (m *MsgProvideCounterparty) XXX_Size() int { +func (m *MsgRegisterCounterparty) XXX_Size() int { return m.Size() } -func (m *MsgProvideCounterparty) XXX_DiscardUnknown() { - xxx_messageInfo_MsgProvideCounterparty.DiscardUnknown(m) +func (m *MsgRegisterCounterparty) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterparty.DiscardUnknown(m) } -var xxx_messageInfo_MsgProvideCounterparty proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterCounterparty proto.InternalMessageInfo -// MsgProvideCounterpartyResponse defines the Msg/ProvideCounterparty response type. -type MsgProvideCounterpartyResponse struct { +// MsgRegisterCounterpartyResponse defines the Msg/RegisterCounterparty response type. +type MsgRegisterCounterpartyResponse struct { } -func (m *MsgProvideCounterpartyResponse) Reset() { *m = MsgProvideCounterpartyResponse{} } -func (m *MsgProvideCounterpartyResponse) String() string { return proto.CompactTextString(m) } -func (*MsgProvideCounterpartyResponse) ProtoMessage() {} -func (*MsgProvideCounterpartyResponse) Descriptor() ([]byte, []int) { +func (m *MsgRegisterCounterpartyResponse) Reset() { *m = MsgRegisterCounterpartyResponse{} } +func (m *MsgRegisterCounterpartyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterpartyResponse) ProtoMessage() {} +func (*MsgRegisterCounterpartyResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d421c7119e969b99, []int{3} } -func (m *MsgProvideCounterpartyResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterCounterpartyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgProvideCounterpartyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterCounterpartyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgProvideCounterpartyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterCounterpartyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -183,17 +183,17 @@ func (m *MsgProvideCounterpartyResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *MsgProvideCounterpartyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgProvideCounterpartyResponse.Merge(m, src) +func (m *MsgRegisterCounterpartyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterpartyResponse.Merge(m, src) } -func (m *MsgProvideCounterpartyResponse) XXX_Size() int { +func (m *MsgRegisterCounterpartyResponse) XXX_Size() int { return m.Size() } -func (m *MsgProvideCounterpartyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgProvideCounterpartyResponse.DiscardUnknown(m) +func (m *MsgRegisterCounterpartyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterpartyResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgProvideCounterpartyResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterCounterpartyResponse proto.InternalMessageInfo // MsgSendPacket sends an outgoing IBC packet. type MsgSendPacket struct { @@ -515,8 +515,8 @@ var xxx_messageInfo_MsgAcknowledgementResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateChannel)(nil), "ibc.core.channel.v2.MsgCreateChannel") proto.RegisterType((*MsgCreateChannelResponse)(nil), "ibc.core.channel.v2.MsgCreateChannelResponse") - proto.RegisterType((*MsgProvideCounterparty)(nil), "ibc.core.channel.v2.MsgProvideCounterparty") - proto.RegisterType((*MsgProvideCounterpartyResponse)(nil), "ibc.core.channel.v2.MsgProvideCounterpartyResponse") + proto.RegisterType((*MsgRegisterCounterparty)(nil), "ibc.core.channel.v2.MsgRegisterCounterparty") + proto.RegisterType((*MsgRegisterCounterpartyResponse)(nil), "ibc.core.channel.v2.MsgRegisterCounterpartyResponse") proto.RegisterType((*MsgSendPacket)(nil), "ibc.core.channel.v2.MsgSendPacket") proto.RegisterType((*MsgSendPacketResponse)(nil), "ibc.core.channel.v2.MsgSendPacketResponse") proto.RegisterType((*MsgRecvPacket)(nil), "ibc.core.channel.v2.MsgRecvPacket") @@ -530,63 +530,63 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v2/tx.proto", fileDescriptor_d421c7119e969b99) } var fileDescriptor_d421c7119e969b99 = []byte{ - // 883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x31, 0x6f, 0xdb, 0x46, - 0x14, 0x16, 0x6d, 0xc5, 0xb5, 0x9f, 0xec, 0xd8, 0x65, 0x9a, 0x44, 0x60, 0x52, 0x49, 0x10, 0x1a, - 0xd8, 0x75, 0x60, 0xb2, 0x66, 0x8a, 0x02, 0x0e, 0x8a, 0x06, 0x89, 0x96, 0x66, 0x10, 0x20, 0x30, - 0x6e, 0x86, 0xb6, 0xa8, 0x40, 0x91, 0x2f, 0x14, 0x61, 0x91, 0xc7, 0xf2, 0x48, 0x26, 0xda, 0x8a, - 0x4e, 0x1d, 0x3b, 0x76, 0xec, 0x4f, 0xf0, 0xd0, 0x1f, 0x91, 0xa1, 0x43, 0xc6, 0x4e, 0x45, 0x60, - 0x0d, 0x01, 0xfa, 0x2b, 0x0a, 0xde, 0x9d, 0x48, 0x4a, 0xa1, 0x62, 0x15, 0x55, 0x26, 0x92, 0xef, - 0x7d, 0xef, 0x7b, 0xef, 0x7d, 0xef, 0x78, 0x77, 0x70, 0xdb, 0x1d, 0x58, 0x9a, 0x45, 0x42, 0xd4, - 0xac, 0xa1, 0xe9, 0xfb, 0x38, 0xd2, 0x12, 0x5d, 0x8b, 0x5e, 0xa8, 0x41, 0x48, 0x22, 0x22, 0x5f, - 0x73, 0x07, 0x96, 0x9a, 0x7a, 0x55, 0xe1, 0x55, 0x13, 0x5d, 0xf9, 0xc8, 0x21, 0x0e, 0x61, 0x7e, - 0x2d, 0x7d, 0xe3, 0x50, 0xe5, 0xa6, 0x45, 0xa8, 0x47, 0xa8, 0xe6, 0x51, 0x47, 0x4b, 0x8e, 0xd3, - 0x87, 0x70, 0xb4, 0xca, 0x32, 0x04, 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x72, 0xfe, 0x54, 0x51, 0x8e, 0x96, 0x82, 0x65, 0x55, - 0x3f, 0x87, 0x6b, 0x65, 0x67, 0xca, 0xdd, 0x45, 0x2c, 0x25, 0x60, 0xe5, 0xde, 0x7f, 0x00, 0x67, - 0x89, 0xbf, 0x07, 0x28, 0x9c, 0x07, 0xed, 0x45, 0x14, 0x39, 0x46, 0x39, 0xbc, 0x1c, 0x53, 0x64, - 0x2f, 0xec, 0xb1, 0x0b, 0xd9, 0x73, 0xcc, 0x62, 0xf6, 0x92, 0x6d, 0xec, 0x09, 0x7c, 0x30, 0xdd, - 0x7b, 0x9a, 0x8b, 0xc2, 0x04, 0x40, 0xd9, 0xbf, 0x04, 0x90, 0x91, 0x9e, 0xc1, 0xee, 0xfc, 0x0f, - 0xb9, 0x30, 0x76, 0x0e, 0xa8, 0x68, 0x4b, 0x02, 0xa7, 0xc9, 0x94, 0x2b, 0x3f, 0xbd, 0x39, 0x3f, - 0x94, 0x1e, 0x3d, 0x7d, 0x79, 0xd1, 0x90, 0x5e, 0x5d, 0x34, 0xa4, 0xd7, 0x17, 0x0d, 0xe9, 0xd7, - 0x49, 0xa3, 0xf2, 0x6a, 0xd2, 0xa8, 0xfc, 0x35, 0x69, 0x54, 0xbe, 0xfd, 0xd2, 0x71, 0xa3, 0x61, - 0x3c, 0x48, 0xaf, 0x44, 0x9a, 0xb8, 0x11, 0xba, 0x03, 0xeb, 0xc8, 0x21, 0x5a, 0x72, 0xa2, 0x79, - 0xc4, 0x8e, 0x47, 0x48, 0xf9, 0x65, 0xed, 0xb3, 0xcf, 0x8f, 0x8a, 0x57, 0xce, 0x71, 0x80, 0x74, - 0xb0, 0xc1, 0x2e, 0x6a, 0xf7, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x51, 0xcd, 0x7c, 0xd2, 0x96, - 0x0a, 0x00, 0x00, + // 886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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xf7, 0xb7, 0x00, 0xa5, 0x23, 0xa1, 0x57, 0xc7, 0x51, 0x60, 0xb4, 0xed, 0x8b, 0x31, + 0x65, 0xf6, 0xd2, 0x36, 0xdb, 0xab, 0xaf, 0x30, 0xc3, 0xd4, 0xb3, 0x57, 0xec, 0x64, 0x8f, 0xe1, + 0xad, 0x6c, 0xfb, 0xe9, 0xd6, 0x85, 0x49, 0x80, 0xb6, 0x79, 0x01, 0x20, 0x27, 0x3d, 0x84, 0xd5, + 0xd9, 0x7f, 0xb2, 0x36, 0x76, 0x06, 0xa8, 0x19, 0x97, 0x04, 0x66, 0xc9, 0xb4, 0x6b, 0x3f, 0xbd, + 0x3a, 0xde, 0x56, 0x1e, 0x3e, 0x79, 0x7e, 0xd2, 0x51, 0x5e, 0x9c, 0x74, 0x94, 0x97, 0x27, 0x1d, + 0xe5, 0xd7, 0xd3, 0x4e, 0xe3, 0xc5, 0x69, 0xa7, 0xf1, 0xd7, 0x69, 0xa7, 0xf1, 0xf5, 0xe7, 0x9e, + 0xcf, 0xc6, 0xd3, 0x51, 0x7a, 0x2f, 0x32, 0xe4, 0xb5, 0xd0, 0x1f, 0x39, 0x3b, 0x1e, 0x31, 0x92, + 0x3d, 0x23, 0x20, 0xee, 0x74, 0x82, 0x54, 0xdc, 0xd8, 0x3e, 0xb9, 0xbb, 0x53, 0xbe, 0x77, 0x1e, + 0x45, 0x48, 0x47, 0x0b, 0xfc, 0xb6, 0xf6, 0xe9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xce, + 0x42, 0x56, 0x9b, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -603,8 +603,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateChannel defines a rpc handler method for MsgCreateChannel CreateChannel(ctx context.Context, in *MsgCreateChannel, opts ...grpc.CallOption) (*MsgCreateChannelResponse, error) - // ProvideCounterparty defines a rpc handler method for MsgProvideCounterparty. - ProvideCounterparty(ctx context.Context, in *MsgProvideCounterparty, opts ...grpc.CallOption) (*MsgProvideCounterpartyResponse, error) + // RegisterCounterparty defines a rpc handler method for MsgRegisterCounterparty. + RegisterCounterparty(ctx context.Context, in *MsgRegisterCounterparty, opts ...grpc.CallOption) (*MsgRegisterCounterpartyResponse, error) // SendPacket defines a rpc handler method for MsgSendPacket. SendPacket(ctx context.Context, in *MsgSendPacket, opts ...grpc.CallOption) (*MsgSendPacketResponse, error) // RecvPacket defines a rpc handler method for MsgRecvPacket. @@ -632,9 +632,9 @@ func (c *msgClient) CreateChannel(ctx context.Context, in *MsgCreateChannel, opt return out, nil } -func (c *msgClient) ProvideCounterparty(ctx context.Context, in *MsgProvideCounterparty, opts ...grpc.CallOption) (*MsgProvideCounterpartyResponse, error) { - out := new(MsgProvideCounterpartyResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v2.Msg/ProvideCounterparty", in, out, opts...) +func (c *msgClient) RegisterCounterparty(ctx context.Context, in *MsgRegisterCounterparty, opts ...grpc.CallOption) (*MsgRegisterCounterpartyResponse, error) { + out := new(MsgRegisterCounterpartyResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v2.Msg/RegisterCounterparty", in, out, opts...) if err != nil { return nil, err } @@ -681,8 +681,8 @@ func (c *msgClient) Acknowledgement(ctx context.Context, in *MsgAcknowledgement, type MsgServer interface { // CreateChannel defines a rpc handler method for MsgCreateChannel CreateChannel(context.Context, *MsgCreateChannel) (*MsgCreateChannelResponse, error) - // ProvideCounterparty defines a rpc handler method for MsgProvideCounterparty. - ProvideCounterparty(context.Context, *MsgProvideCounterparty) (*MsgProvideCounterpartyResponse, error) + // RegisterCounterparty defines a rpc handler method for MsgRegisterCounterparty. + RegisterCounterparty(context.Context, *MsgRegisterCounterparty) (*MsgRegisterCounterpartyResponse, error) // SendPacket defines a rpc handler method for MsgSendPacket. SendPacket(context.Context, *MsgSendPacket) (*MsgSendPacketResponse, error) // RecvPacket defines a rpc handler method for MsgRecvPacket. @@ -700,8 +700,8 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateChannel(ctx context.Context, req *MsgCreateChannel) (*MsgCreateChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateChannel not implemented") } -func (*UnimplementedMsgServer) ProvideCounterparty(ctx context.Context, req *MsgProvideCounterparty) (*MsgProvideCounterpartyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProvideCounterparty not implemented") +func (*UnimplementedMsgServer) RegisterCounterparty(ctx context.Context, req *MsgRegisterCounterparty) (*MsgRegisterCounterpartyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterparty not implemented") } func (*UnimplementedMsgServer) SendPacket(ctx context.Context, req *MsgSendPacket) (*MsgSendPacketResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendPacket not implemented") @@ -738,20 +738,20 @@ func _Msg_CreateChannel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_ProvideCounterparty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgProvideCounterparty) +func _Msg_RegisterCounterparty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterCounterparty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ProvideCounterparty(ctx, in) + return srv.(MsgServer).RegisterCounterparty(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.core.channel.v2.Msg/ProvideCounterparty", + FullMethod: "/ibc.core.channel.v2.Msg/RegisterCounterparty", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ProvideCounterparty(ctx, req.(*MsgProvideCounterparty)) + return srv.(MsgServer).RegisterCounterparty(ctx, req.(*MsgRegisterCounterparty)) } return interceptor(ctx, in, info, handler) } @@ -837,8 +837,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CreateChannel_Handler, }, { - MethodName: "ProvideCounterparty", - Handler: _Msg_ProvideCounterparty_Handler, + MethodName: "RegisterCounterparty", + Handler: _Msg_RegisterCounterparty_Handler, }, { MethodName: "SendPacket", @@ -938,7 +938,7 @@ func (m *MsgCreateChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgProvideCounterparty) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterCounterparty) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -948,12 +948,12 @@ func (m *MsgProvideCounterparty) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgProvideCounterparty) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterparty) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgProvideCounterparty) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterparty) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -982,7 +982,7 @@ func (m *MsgProvideCounterparty) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgProvideCounterpartyResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterCounterpartyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -992,12 +992,12 @@ func (m *MsgProvideCounterpartyResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgProvideCounterpartyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgProvideCounterpartyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1397,7 +1397,7 @@ func (m *MsgCreateChannelResponse) Size() (n int) { return n } -func (m *MsgProvideCounterparty) Size() (n int) { +func (m *MsgRegisterCounterparty) Size() (n int) { if m == nil { return 0 } @@ -1418,7 +1418,7 @@ func (m *MsgProvideCounterparty) Size() (n int) { return n } -func (m *MsgProvideCounterpartyResponse) Size() (n int) { +func (m *MsgRegisterCounterpartyResponse) Size() (n int) { if m == nil { return 0 } @@ -1801,7 +1801,7 @@ func (m *MsgCreateChannelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgProvideCounterparty) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterCounterparty) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1824,10 +1824,10 @@ func (m *MsgProvideCounterparty) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgProvideCounterparty: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterCounterparty: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProvideCounterparty: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterCounterparty: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1947,7 +1947,7 @@ func (m *MsgProvideCounterparty) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgProvideCounterpartyResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterCounterpartyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1970,10 +1970,10 @@ func (m *MsgProvideCounterpartyResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgProvideCounterpartyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterCounterpartyResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProvideCounterpartyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterCounterpartyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/modules/core/24-host/channel_keys.go b/modules/core/24-host/channel_keys.go index 49eed183c25..b988601a870 100644 --- a/modules/core/24-host/channel_keys.go +++ b/modules/core/24-host/channel_keys.go @@ -2,8 +2,6 @@ package host import "fmt" -var KeyChannelStorePrefix = []byte("channels") - const ( KeyChannelEndPrefix = "channelEnds" KeyChannelPrefix = "channels" diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 2faf86fc01f..396f89b5e9b 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -19,10 +19,9 @@ import ( ) var ( - _ clienttypes.MsgServer = (*Keeper)(nil) - _ connectiontypes.MsgServer = (*Keeper)(nil) - _ channeltypes.MsgServer = (*Keeper)(nil) - _ channeltypes.PacketMsgServer = (*Keeper)(nil) + _ clienttypes.MsgServer = (*Keeper)(nil) + _ connectiontypes.MsgServer = (*Keeper)(nil) + _ channeltypes.MsgServer = (*Keeper)(nil) ) // CreateClient defines a rpc handler method for MsgCreateClient. diff --git a/modules/core/module.go b/modules/core/module.go index c312604d7f3..6edba9b02c3 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -135,7 +135,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { clienttypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) connectiontypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) channeltypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) - channeltypes.RegisterPacketMsgServer(cfg.MsgServer(), am.keeper) channeltypesv2.RegisterMsgServer(cfg.MsgServer(), am.keeper.ChannelKeeperV2) clienttypes.RegisterQueryServer(cfg.QueryServer(), clientkeeper.NewQueryServer(am.keeper.ClientKeeper)) diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 77b523c181f..78df62bdbb4 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -90,21 +90,6 @@ enum Order { ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; } -// IBCVersion defines the version that the IBC packet intends to use. -// This allows asynchronous upgrades over time as unsupported IBC Versions -// will simply be rejected by the receiver and timed out on sender. -enum IBCVersion { - option (gogoproto.goproto_enum_prefix) = false; - - // zero-value for IBC version. - // This will be treated as a classic packet - IBC_VERSION_UNSPECIFIED = 0; - // IBC version 1 implements the Classic protocol - IBC_VERSION_1 = 1; - // IBC version 2 implements the Eureka protocol - IBC_VERSION_2 = 2; -} - // Counterparty defines a channel end counterparty message Counterparty { option (gogoproto.goproto_getters) = false; @@ -137,12 +122,6 @@ message Packet { ibc.core.client.v1.Height timeout_height = 7 [(gogoproto.nullable) = false]; // block timestamp (in nanoseconds) after which the packet times out uint64 timeout_timestamp = 8; - // which IBC version to use to commit this 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 diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 729ffd09b28..611b4068088 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -33,9 +33,18 @@ service Msg { // MsgChannelCloseConfirm. rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); + // RecvPacket defines a rpc handler method for MsgRecvPacket. + rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); + // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. rpc TimeoutOnClose(MsgTimeoutOnClose) returns (MsgTimeoutOnCloseResponse); + // Timeout defines a rpc handler method for MsgTimeout. + rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); + + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); + // ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. rpc ChannelUpgradeInit(MsgChannelUpgradeInit) returns (MsgChannelUpgradeInitResponse); @@ -64,20 +73,6 @@ service Msg { rpc PruneAcknowledgements(MsgPruneAcknowledgements) returns (MsgPruneAcknowledgementsResponse); } -// PacketMsg defines the ibc/channel PacketMsg service. -service PacketMsg { - option (cosmos.msg.v1.service) = true; - - // RecvPacket defines a rpc handler method for MsgRecvPacket. - rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); - - // Timeout defines a rpc handler method for MsgTimeout. - rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); - - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); -} - // ResponseResultType defines the possible outcomes of the execution of a message enum ResponseResultType { option (gogoproto.goproto_enum_prefix) = false; diff --git a/proto/ibc/core/channel/v2/packet.proto b/proto/ibc/core/channel/v2/packet.proto index 98d581915f9..fef2c588e5a 100644 --- a/proto/ibc/core/channel/v2/packet.proto +++ b/proto/ibc/core/channel/v2/packet.proto @@ -17,7 +17,7 @@ message Packet { string source_channel = 2; // identifies the receiving chain. string destination_channel = 3; - // timeout timestamp after which the packet times out. + // timeout timestamp in seconds after which the packet times out. uint64 timeout_timestamp = 4; // a list of payloads, each one for a specific application. repeated Payload payloads = 5 [(gogoproto.nullable) = false]; diff --git a/proto/ibc/core/channel/v2/query.proto b/proto/ibc/core/channel/v2/query.proto index fff3b647c1c..051789b3330 100644 --- a/proto/ibc/core/channel/v2/query.proto +++ b/proto/ibc/core/channel/v2/query.proto @@ -13,7 +13,7 @@ import "gogoproto/gogo.proto"; service Query { // Channel queries the counterparty of an IBC client. rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v2/channel/{channel_id}"; + option (google.api.http).get = "/ibc/core/channel/v2/channels/{channel_id}"; } // PacketCommitment queries a stored packet commitment hash. diff --git a/proto/ibc/core/channel/v2/tx.proto b/proto/ibc/core/channel/v2/tx.proto index bd67ae3e12a..9276f8cdc67 100644 --- a/proto/ibc/core/channel/v2/tx.proto +++ b/proto/ibc/core/channel/v2/tx.proto @@ -18,8 +18,8 @@ service Msg { // CreateChannel defines a rpc handler method for MsgCreateChannel rpc CreateChannel(MsgCreateChannel) returns (MsgCreateChannelResponse); - // ProvideCounterparty defines a rpc handler method for MsgProvideCounterparty. - rpc ProvideCounterparty(MsgProvideCounterparty) returns (MsgProvideCounterpartyResponse); + // RegisterCounterparty defines a rpc handler method for MsgRegisterCounterparty. + rpc RegisterCounterparty(MsgRegisterCounterparty) returns (MsgRegisterCounterpartyResponse); // SendPacket defines a rpc handler method for MsgSendPacket. rpc SendPacket(MsgSendPacket) returns (MsgSendPacketResponse); @@ -56,9 +56,9 @@ message MsgCreateChannelResponse { string channel_id = 1; } -// MsgProvideCounterparty defines the message used to provide the counterparty channel +// MsgRegisterCounterparty defines the message used to provide the counterparty channel // identifier. -message MsgProvideCounterparty { +message MsgRegisterCounterparty { option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; @@ -71,8 +71,8 @@ message MsgProvideCounterparty { string signer = 3; } -// MsgProvideCounterpartyResponse defines the Msg/ProvideCounterparty response type. -message MsgProvideCounterpartyResponse {} +// MsgRegisterCounterpartyResponse defines the Msg/RegisterCounterparty response type. +message MsgRegisterCounterpartyResponse {} // MsgSendPacket sends an outgoing IBC packet. message MsgSendPacket { diff --git a/testing/chain.go b/testing/chain.go index a898b64fd3d..67ff41baf9e 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -557,6 +557,12 @@ func (chain *TestChain) GetTimeoutTimestamp() uint64 { return uint64(chain.GetContext().BlockTime().UnixNano()) + DefaultTimeoutTimestampDelta } +// GetTimeoutTimestampSecs is a convenience function which returns a IBC packet timeout timestamp in seconds +// to be used for testing. It returns the current block timestamp + default timestamp delta (1 hour). +func (chain *TestChain) GetTimeoutTimestampSecs() uint64 { + return uint64(chain.GetContext().BlockTime().Unix()) + uint64(time.Hour.Seconds()) +} + // DeleteKey deletes the specified key from the ibc store. func (chain *TestChain) DeleteKey(key []byte) { storeKey := chain.GetSimApp().GetKey(exported.StoreKey) diff --git a/testing/endpoint.go b/testing/endpoint.go index 1c69b35dc32..1fc0be299ed 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -16,7 +16,6 @@ import ( clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - channeltypesv2 "github.com/cosmos/ibc-go/v9/modules/core/04-channel/v2/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/cosmos/ibc-go/v9/modules/core/exported" @@ -176,33 +175,6 @@ func (endpoint *Endpoint) FreezeClient() { endpoint.Chain.App.GetIBCKeeper().ClientKeeper.SetClientState(endpoint.Chain.GetContext(), endpoint.ClientID, tmClientState) } -// ProvideCounterparty will construct and execute a MsgProvideCounterparty on the associated endpoint. -func (endpoint *Endpoint) ProvideCounterparty() (err error) { - msg := channeltypesv2.NewMsgProvideCounterparty(endpoint.ChannelID, endpoint.Counterparty.ChannelID, endpoint.Chain.SenderAccount.GetAddress().String()) - - // setup counterparty - _, err = endpoint.Chain.SendMsgs(msg) - - return err -} - -// CreateChannel will construct and execute a new MsgCreateChannel on the associated endpoint. -func (endpoint *Endpoint) CreateChannel() (err error) { - endpoint.IncrementNextChannelSequence() - msg := channeltypesv2.NewMsgCreateChannel(endpoint.ClientID, MerklePath, endpoint.Chain.SenderAccount.GetAddress().String()) - - // create channel - res, err := endpoint.Chain.SendMsgs(msg) - if err != nil { - return err - } - - endpoint.ChannelID, err = ParseChannelIDFromEvents(res.Events) - require.NoError(endpoint.Chain.TB, err) - - return nil -} - // UpgradeChain will upgrade a chain's chainID to the next revision number. // It will also update the counterparty client. // TODO: implement actual upgrade chain functionality via scheduling an upgrade diff --git a/testing/endpoint_v2.go b/testing/endpoint_v2.go index 57a9b98b2f5..b4efd98247b 100644 --- a/testing/endpoint_v2.go +++ b/testing/endpoint_v2.go @@ -9,6 +9,35 @@ import ( hostv2 "github.com/cosmos/ibc-go/v9/modules/core/24-host/v2" ) +// CreateChannel will construct and execute a new MsgCreateChannel on the associated endpoint. +func (endpoint *Endpoint) CreateChannel() (err error) { + endpoint.IncrementNextChannelSequence() + msg := channeltypesv2.NewMsgCreateChannel(endpoint.ClientID, MerklePath, endpoint.Chain.SenderAccount.GetAddress().String()) + + // create channel + res, err := endpoint.Chain.SendMsgs(msg) + if err != nil { + return err + } + + endpoint.ChannelID, err = ParseChannelIDFromEvents(res.Events) + if err != nil { + return err + } + + return nil +} + +// RegisterCounterparty will construct and execute a MsgRegisterCounterparty on the associated endpoint. +func (endpoint *Endpoint) RegisterCounterparty() (err error) { + msg := channeltypesv2.NewMsgRegisterCounterparty(endpoint.ChannelID, endpoint.Counterparty.ChannelID, endpoint.Chain.SenderAccount.GetAddress().String()) + + // setup counterparty + _, err = endpoint.Chain.SendMsgs(msg) + + return err +} + // MsgSendPacket sends a packet on the associated endpoint. The constructed packet is returned. func (endpoint *Endpoint) MsgSendPacket(timeoutTimestamp uint64, payload channeltypesv2.Payload) (channeltypesv2.Packet, error) { msgSendPacket := channeltypesv2.NewMsgSendPacket(endpoint.ChannelID, timeoutTimestamp, endpoint.Chain.SenderAccount.GetAddress().String(), payload) diff --git a/testing/path.go b/testing/path.go index 85c5eaa9d1b..b31dec57ed9 100644 --- a/testing/path.go +++ b/testing/path.go @@ -175,11 +175,11 @@ func (path *Path) SetupClients() { // SetupCounterparties is a helper function to set the counterparties supporting ibc-eureka on both // chains. It assumes the caller does not anticipate any errors. func (path *Path) SetupCounterparties() { - if err := path.EndpointB.ProvideCounterparty(); err != nil { + if err := path.EndpointB.RegisterCounterparty(); err != nil { panic(err) } - if err := path.EndpointA.ProvideCounterparty(); err != nil { + if err := path.EndpointA.RegisterCounterparty(); err != nil { panic(err) } }