diff --git a/modules/core/04-channel/v2/keeper/grpc_query_test.go b/modules/core/04-channel/v2/keeper/grpc_query_test.go index b7ab81c9fda..827420a905a 100644 --- a/modules/core/04-channel/v2/keeper/grpc_query_test.go +++ b/modules/core/04-channel/v2/keeper/grpc_query_test.go @@ -16,7 +16,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { var ( req *types.QueryChannelRequest expCreator string - expChannel types.Channel + expChannel types.ChannelEnd ) testCases := []struct { @@ -53,7 +53,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { { "success: no channel", func() { - expChannel = types.Channel{} + expChannel = types.ChannelEnd{} suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.SetCreator(suite.chainA.GetContext(), ibctesting.FirstChannelID, expCreator) @@ -96,7 +96,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { expCreator = ibctesting.TestAccAddress merklePathPrefix := commitmenttypes.NewMerklePath([]byte("prefix")) - expChannel = types.Channel{ClientId: ibctesting.SecondClientID, CounterpartyChannelId: ibctesting.SecondChannelID, MerklePathPrefix: merklePathPrefix} + expChannel = types.ChannelEnd{ClientId: ibctesting.SecondClientID, CounterpartyChannelId: ibctesting.SecondChannelID, MerklePathPrefix: merklePathPrefix} tc.malleate() diff --git a/modules/core/04-channel/v2/keeper/keeper.go b/modules/core/04-channel/v2/keeper/keeper.go index b5e81ee7cee..d7da98e6575 100644 --- a/modules/core/04-channel/v2/keeper/keeper.go +++ b/modules/core/04-channel/v2/keeper/keeper.go @@ -61,20 +61,20 @@ func (k Keeper) ChannelStore(ctx context.Context, channelID string) storetypes.K } // SetChannel sets the Channel for a given channel identifier. -func (k *Keeper) SetChannel(ctx context.Context, channelID string, channel types.Channel) { +func (k *Keeper) SetChannel(ctx context.Context, channelID string, channel types.ChannelEnd) { bz := k.cdc.MustMarshal(&channel) k.ChannelStore(ctx, channelID).Set([]byte(types.ChannelKey), bz) } // GetChannel gets the Channel for a given channel identifier. -func (k *Keeper) GetChannel(ctx context.Context, channelID string) (types.Channel, bool) { +func (k *Keeper) GetChannel(ctx context.Context, channelID string) (types.ChannelEnd, bool) { store := k.ChannelStore(ctx, channelID) bz := store.Get([]byte(types.ChannelKey)) if len(bz) == 0 { - return types.Channel{}, false + return types.ChannelEnd{}, false } - var channel types.Channel + var channel types.ChannelEnd k.cdc.MustUnmarshal(bz, &channel) return channel, true } @@ -215,23 +215,23 @@ func (k *Keeper) SetNextSequenceSend(ctx context.Context, channelID string, sequ // AliasV1Channel returns a version 2 channel for the given port and channel ID // by converting the channel into a version 2 channel. -func (k *Keeper) AliasV1Channel(ctx context.Context, portID, channelID string) (types.Channel, bool) { +func (k *Keeper) AliasV1Channel(ctx context.Context, portID, channelID string) (types.ChannelEnd, bool) { channel, ok := k.channelKeeperV1.GetChannel(ctx, portID, channelID) if !ok { - return types.Channel{}, false + return types.ChannelEnd{}, false } // Do not allow channel to be converted into a version 2 channel // if the channel is not OPEN or if it is ORDERED if channel.State != channeltypesv1.OPEN || channel.Ordering == channeltypesv1.ORDERED { - return types.Channel{}, false + return types.ChannelEnd{}, false } connection, ok := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !ok { - return types.Channel{}, false + return types.ChannelEnd{}, false } merklePathPrefix := commitmentv2types.NewMerklePath(connection.Counterparty.Prefix.KeyPrefix, []byte("")) - channelv2 := types.Channel{ + channelv2 := types.ChannelEnd{ CounterpartyChannelId: channel.Counterparty.ChannelId, ClientId: connection.ClientId, MerklePathPrefix: merklePathPrefix, @@ -241,12 +241,12 @@ func (k *Keeper) AliasV1Channel(ctx context.Context, portID, channelID string) ( // convertV1Channel attempts to retrieve a v1 channel from the channel keeper if it exists, then converts it // to a v2 counterparty and stores it in the v2 channel keeper for future use -func (k *Keeper) convertV1Channel(ctx context.Context, port, id string) (types.Channel, bool) { +func (k *Keeper) convertV1Channel(ctx context.Context, port, id string) (types.ChannelEnd, bool) { if channel, ok := k.AliasV1Channel(ctx, port, id); ok { // we can key on just the channel here since channel ids are globally unique k.SetChannel(ctx, id, channel) return channel, true } - return types.Channel{}, false + return types.ChannelEnd{}, false } diff --git a/modules/core/04-channel/v2/keeper/keeper_test.go b/modules/core/04-channel/v2/keeper/keeper_test.go index 3521e3c789f..49750203bb8 100644 --- a/modules/core/04-channel/v2/keeper/keeper_test.go +++ b/modules/core/04-channel/v2/keeper/keeper_test.go @@ -103,7 +103,7 @@ func (suite *KeeperTestSuite) TestAliasV1Channel() { suite.Require().Equal(channel, expChannel) } else { suite.Require().False(found) - suite.Require().Equal(channel, channeltypes2.Channel{}) + suite.Require().Equal(channel, channeltypes2.ChannelEnd{}) } }) } @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) TestAliasV1Channel() { func (suite *KeeperTestSuite) TestSetChannel() { merklePathPrefix := commitmenttypes.NewMerklePath([]byte("ibc"), []byte("")) - channel := channeltypes2.Channel{ + channel := channeltypes2.ChannelEnd{ ClientId: ibctesting.FirstClientID, MerklePathPrefix: merklePathPrefix, } @@ -124,7 +124,7 @@ func (suite *KeeperTestSuite) TestSetChannel() { // No channel stored under other channel identifier. retrievedChannel, found = suite.chainA.App.GetIBCKeeper().ChannelKeeperV2.GetChannel(suite.chainA.GetContext(), ibctesting.SecondChannelID) suite.Require().False(found, "GetChannel unexpectedly returned a channel") - suite.Require().Equal(channeltypes2.Channel{}, retrievedChannel, "Channel retrieved not empty") + suite.Require().Equal(channeltypes2.ChannelEnd{}, retrievedChannel, "Channel retrieved not empty") } func (suite *KeeperTestSuite) TestSetCreator() { diff --git a/modules/core/04-channel/v2/types/channel.go b/modules/core/04-channel/v2/types/channel.go index 3a45be384fb..d44f9e6f62e 100644 --- a/modules/core/04-channel/v2/types/channel.go +++ b/modules/core/04-channel/v2/types/channel.go @@ -7,17 +7,17 @@ import ( host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) -// NewChannel creates a new Channel instance -func NewChannel(clientID, counterpartyChannelID string, merklePathPrefix commitmenttypes.MerklePath) Channel { - return Channel{ +// NewChannel creates a new ChannelEnd instance +func NewChannel(clientID, counterpartyChannelID string, merklePathPrefix commitmenttypes.MerklePath) ChannelEnd { + return ChannelEnd{ ClientId: clientID, CounterpartyChannelId: counterpartyChannelID, MerklePathPrefix: merklePathPrefix, } } -// Validate validates the Channel -func (c Channel) Validate() error { +// Validate validates the ChannelEnd +func (c ChannelEnd) Validate() error { if err := host.ClientIdentifierValidator(c.ClientId); err != nil { return err } diff --git a/modules/core/04-channel/v2/types/channel.pb.go b/modules/core/04-channel/v2/types/channel.pb.go index 8666e2f8517..f835fd07e23 100644 --- a/modules/core/04-channel/v2/types/channel.pb.go +++ b/modules/core/04-channel/v2/types/channel.pb.go @@ -24,14 +24,14 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Channel defines the channel end on a chain that is implementing the version 2 IBC protocol +// ChannelEnd defines the channel end on a chain that is implementing the version 2 IBC protocol // Each side will maintain its own Channel to create an IBC channel // The channel will be referenced by a channelID which will be used to send packets // to the counterparty // The channel will contain the client identifier that will provide proof verification for the channel // and the counterparty channel identifier that the other channel end will be using // to send packets to our channel end. -type Channel struct { +type ChannelEnd struct { // the client identifier of the light client representing the counterparty chain ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // the counterparty identifier that must be used by packets sent by counterparty @@ -43,18 +43,18 @@ type Channel struct { MerklePathPrefix v2.MerklePath `protobuf:"bytes,3,opt,name=merkle_path_prefix,json=merklePathPrefix,proto3" json:"merkle_path_prefix"` } -func (m *Channel) Reset() { *m = Channel{} } -func (m *Channel) String() string { return proto.CompactTextString(m) } -func (*Channel) ProtoMessage() {} -func (*Channel) Descriptor() ([]byte, []int) { +func (m *ChannelEnd) Reset() { *m = ChannelEnd{} } +func (m *ChannelEnd) String() string { return proto.CompactTextString(m) } +func (*ChannelEnd) ProtoMessage() {} +func (*ChannelEnd) Descriptor() ([]byte, []int) { return fileDescriptor_7e9b57d8f218397d, []int{0} } -func (m *Channel) XXX_Unmarshal(b []byte) error { +func (m *ChannelEnd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ChannelEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Channel.Marshal(b, m, deterministic) + return xxx_messageInfo_ChannelEnd.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -64,33 +64,33 @@ func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Channel) XXX_Merge(src proto.Message) { - xxx_messageInfo_Channel.Merge(m, src) +func (m *ChannelEnd) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChannelEnd.Merge(m, src) } -func (m *Channel) XXX_Size() int { +func (m *ChannelEnd) XXX_Size() int { return m.Size() } -func (m *Channel) XXX_DiscardUnknown() { - xxx_messageInfo_Channel.DiscardUnknown(m) +func (m *ChannelEnd) XXX_DiscardUnknown() { + xxx_messageInfo_ChannelEnd.DiscardUnknown(m) } -var xxx_messageInfo_Channel proto.InternalMessageInfo +var xxx_messageInfo_ChannelEnd proto.InternalMessageInfo -func (m *Channel) GetClientId() string { +func (m *ChannelEnd) GetClientId() string { if m != nil { return m.ClientId } return "" } -func (m *Channel) GetCounterpartyChannelId() string { +func (m *ChannelEnd) GetCounterpartyChannelId() string { if m != nil { return m.CounterpartyChannelId } return "" } -func (m *Channel) GetMerklePathPrefix() v2.MerklePath { +func (m *ChannelEnd) GetMerklePathPrefix() v2.MerklePath { if m != nil { return m.MerklePathPrefix } @@ -98,35 +98,36 @@ func (m *Channel) GetMerklePathPrefix() v2.MerklePath { } func init() { - proto.RegisterType((*Channel)(nil), "ibc.core.channel.v2.Channel") + proto.RegisterType((*ChannelEnd)(nil), "ibc.core.channel.v2.ChannelEnd") } func init() { proto.RegisterFile("ibc/core/channel/v2/channel.proto", fileDescriptor_7e9b57d8f218397d) } var fileDescriptor_7e9b57d8f218397d = []byte{ - // 302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xb1, 0x4e, 0x83, 0x40, - 0x18, 0xc7, 0x39, 0x35, 0x6a, 0x71, 0x31, 0xa8, 0xb1, 0xa9, 0xc9, 0x59, 0xbb, 0xd8, 0xa5, 0x9c, - 0x41, 0x63, 0x62, 0xe2, 0x54, 0xa7, 0x0e, 0x26, 0x4d, 0x87, 0x0e, 0x2e, 0x04, 0x8e, 0x13, 0x2e, - 0x72, 0x7c, 0xe4, 0x38, 0x88, 0x7d, 0x0b, 0x9f, 0xc6, 0x67, 0xe8, 0xd8, 0xd1, 0xc9, 0x18, 0x78, - 0x11, 0xc3, 0xd1, 0x96, 0x6e, 0x1f, 0xff, 0xef, 0xc7, 0x2f, 0xdf, 0xfd, 0xcd, 0x1b, 0xee, 0x53, - 0x42, 0x41, 0x32, 0x42, 0x23, 0x2f, 0x49, 0x58, 0x4c, 0x0a, 0x67, 0x33, 0xda, 0xa9, 0x04, 0x05, - 0xd6, 0x19, 0xf7, 0xa9, 0x5d, 0x23, 0xf6, 0x26, 0x2f, 0x9c, 0xde, 0x79, 0x08, 0x21, 0xe8, 0x3d, - 0xa9, 0xa7, 0x06, 0xed, 0xdd, 0xb6, 0x36, 0x10, 0x82, 0x2b, 0xc1, 0x12, 0xa5, 0x85, 0xdb, 0xaf, - 0x06, 0x1c, 0x7c, 0x23, 0xf3, 0xe8, 0xa5, 0xb1, 0x59, 0x57, 0x66, 0x87, 0xc6, 0x9c, 0x25, 0xca, - 0xe5, 0x41, 0x17, 0xf5, 0xd1, 0xb0, 0x33, 0x3b, 0x6e, 0x82, 0x49, 0x60, 0x3d, 0x9a, 0x97, 0x14, - 0xf2, 0x44, 0x31, 0x99, 0x7a, 0x52, 0x2d, 0xdc, 0xf5, 0x09, 0x35, 0xba, 0xa7, 0xd1, 0x8b, 0xdd, - 0xf5, 0x5a, 0x39, 0x09, 0xac, 0xb9, 0x69, 0x09, 0x26, 0x3f, 0x62, 0xe6, 0xa6, 0x9e, 0x8a, 0xdc, - 0x54, 0xb2, 0x77, 0xfe, 0xd9, 0xdd, 0xef, 0xa3, 0xe1, 0x89, 0x33, 0xb0, 0xdb, 0x17, 0xb5, 0x87, - 0x15, 0x8e, 0xfd, 0xaa, 0xff, 0x98, 0x7a, 0x2a, 0x1a, 0x1f, 0x2c, 0x7f, 0xaf, 0x8d, 0xd9, 0xa9, - 0xd8, 0x26, 0x53, 0x6d, 0x18, 0xcf, 0x97, 0x25, 0x46, 0xab, 0x12, 0xa3, 0xbf, 0x12, 0xa3, 0xaf, - 0x0a, 0x1b, 0xab, 0x0a, 0x1b, 0x3f, 0x15, 0x36, 0xde, 0x9e, 0x43, 0xae, 0xa2, 0xdc, 0xaf, 0x95, - 0x84, 0x42, 0x26, 0x20, 0x23, 0xdc, 0xa7, 0xa3, 0x10, 0x48, 0xf1, 0x44, 0x04, 0x04, 0x79, 0xcc, - 0xb2, 0xa6, 0x9b, 0xbb, 0x87, 0xd1, 0x4e, 0xd9, 0x6a, 0x91, 0xb2, 0xcc, 0x3f, 0xd4, 0xbd, 0xdc, - 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xdc, 0xac, 0x74, 0x90, 0x01, 0x00, 0x00, + // 305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x18, 0xc7, 0x1b, 0x15, 0x71, 0xf1, 0x22, 0x55, 0x71, 0x4c, 0x88, 0x73, 0x17, 0x77, 0x59, 0x23, + 0x55, 0x04, 0xc1, 0xd3, 0xc4, 0xc3, 0x0e, 0xc2, 0xd8, 0x61, 0x07, 0x2f, 0xa5, 0x4d, 0x63, 0x1b, + 0x6c, 0x92, 0x92, 0x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0x9e, 0x2f, 0x4b, 0x04, 0x56, 0x25, 0x02, 0x7f, 0x25, + 0x02, 0x5f, 0x15, 0xb2, 0x56, 0x15, 0xb2, 0x7e, 0x2a, 0x64, 0xbd, 0x3d, 0x45, 0x4c, 0xc7, 0x79, + 0x50, 0x2b, 0x31, 0x91, 0x19, 0x97, 0x19, 0x66, 0x01, 0x19, 0x45, 0x12, 0x17, 0x8f, 0x98, 0xcb, + 0x30, 0x4f, 0x68, 0xd6, 0xd4, 0x73, 0x7b, 0x3f, 0xda, 0xe9, 0x5b, 0x2f, 0x52, 0x9a, 0x05, 0x87, + 0xa6, 0x9a, 0xbb, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0x6d, 0xb2, 0x17, 0x93, 0x01, 0x00, + 0x00, } -func (m *Channel) Marshal() (dAtA []byte, err error) { +func (m *ChannelEnd) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -136,12 +137,12 @@ func (m *Channel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Channel) MarshalTo(dAtA []byte) (int, error) { +func (m *ChannelEnd) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Channel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ChannelEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -184,7 +185,7 @@ func encodeVarintChannel(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Channel) Size() (n int) { +func (m *ChannelEnd) Size() (n int) { if m == nil { return 0 } @@ -209,7 +210,7 @@ func sovChannel(x uint64) (n int) { func sozChannel(x uint64) (n int) { return sovChannel(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Channel) Unmarshal(dAtA []byte) error { +func (m *ChannelEnd) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -232,10 +233,10 @@ func (m *Channel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Channel: wiretype end group for non-group") + return fmt.Errorf("proto: ChannelEnd: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Channel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ChannelEnd: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/modules/core/04-channel/v2/types/channel_test.go b/modules/core/04-channel/v2/types/channel_test.go index c6c71d9a157..3f68ea86d7b 100644 --- a/modules/core/04-channel/v2/types/channel_test.go +++ b/modules/core/04-channel/v2/types/channel_test.go @@ -7,7 +7,7 @@ import ( ) func (s *TypesTestSuite) TestValidateChannel() { - var c types.Channel + var c types.ChannelEnd testCases := []struct { name string malleate func() diff --git a/modules/core/04-channel/v2/types/query.go b/modules/core/04-channel/v2/types/query.go index 561ef0cbe55..c9f8f118cc2 100644 --- a/modules/core/04-channel/v2/types/query.go +++ b/modules/core/04-channel/v2/types/query.go @@ -10,7 +10,7 @@ func NewQueryChannelRequest(channelID string) *QueryChannelRequest { } // NewQueryChannelResponse creates and returns a new channel query response. -func NewQueryChannelResponse(creator string, channel Channel) *QueryChannelResponse { +func NewQueryChannelResponse(creator string, channel ChannelEnd) *QueryChannelResponse { return &QueryChannelResponse{ Creator: creator, Channel: channel, diff --git a/modules/core/04-channel/v2/types/query.pb.go b/modules/core/04-channel/v2/types/query.pb.go index cf9501c53d3..1cfabd7503f 100644 --- a/modules/core/04-channel/v2/types/query.pb.go +++ b/modules/core/04-channel/v2/types/query.pb.go @@ -77,8 +77,8 @@ func (m *QueryChannelRequest) GetChannelId() string { // QueryChannelRequest is the response type for the Query/Channel RPC method type QueryChannelResponse struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Channel Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Channel ChannelEnd `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel"` } func (m *QueryChannelResponse) Reset() { *m = QueryChannelResponse{} } @@ -121,11 +121,11 @@ func (m *QueryChannelResponse) GetCreator() string { return "" } -func (m *QueryChannelResponse) GetChannel() Channel { +func (m *QueryChannelResponse) GetChannel() ChannelEnd { if m != nil { return m.Channel } - return Channel{} + return ChannelEnd{} } // QueryPacketCommitmentRequest is the request type for the Query/PacketCommitment RPC method. @@ -378,43 +378,44 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v2/query.proto", fileDescriptor_a328cba4986edcab) } var fileDescriptor_a328cba4986edcab = []byte{ - // 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, 0xd6, 0xd8, 0x69, 0x40, 0x99, 0x46, 0x08, 0x4b, 0xba, 0x6d, 0xf7, 0x14, 0xc5, - 0xee, 0x98, 0xb5, 0x28, 0x42, 0x2f, 0x36, 0x20, 0xd1, 0x83, 0xd4, 0x3d, 0x08, 0x7a, 0x30, 0x6c, - 0x26, 0xe3, 0x66, 0x69, 0x76, 0x66, 0xbb, 0x33, 0x89, 0x94, 0xd2, 0x8b, 0xbf, 0x40, 0xf4, 0xe6, - 0x3f, 0xf0, 0x87, 0x08, 0x05, 0x2f, 0x05, 0x2f, 0x3d, 0x89, 0x24, 0xfe, 0x10, 0xd9, 0xd9, 0x49, - 0xbb, 0x0d, 0x9b, 0x9a, 0x80, 0xde, 0x66, 0xbe, 0xf9, 0xde, 0xf7, 0xde, 0xfb, 0xf2, 0xb2, 0x70, - 0x3d, 0x68, 0x13, 0x4c, 0x78, 0x4c, 0x31, 0xe9, 0x7a, 0x8c, 0xd1, 0x1e, 0x1e, 0x38,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xf2, 0x53, 0x6a, 0x3c, 0x9a, 0x1b, 0xa7, 0xcd, - 0xbd, 0x50, 0xe6, 0x9a, 0xe8, 0xe9, 0x1c, 0xe6, 0x26, 0x62, 0x99, 0xb5, 0xb6, 0xfb, 0xea, 0x64, - 0x68, 0x82, 0xd3, 0xa1, 0x09, 0x7e, 0x0d, 0x4d, 0xf0, 0x71, 0x64, 0x16, 0x4e, 0x47, 0x66, 0xe1, - 0x6c, 0x64, 0x16, 0xde, 0xec, 0xf8, 0x81, 0xec, 0xf6, 0xdb, 0x36, 0xe1, 0x21, 0x26, 0x5c, 0x84, - 0x5c, 0x24, 0x94, 0x5b, 0x3e, 0xc7, 0x83, 0xc7, 0x38, 0xe4, 0x9d, 0x7e, 0x8f, 0x8a, 0x54, 0xc0, - 0xfd, 0xed, 0xad, 0x8c, 0x06, 0x79, 0x18, 0x51, 0xd1, 0xbe, 0xae, 0x3e, 0xa8, 0x0f, 0xfe, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x66, 0x70, 0x9b, 0xa5, 0x00, 0x06, 0x00, 0x00, + // 577 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x6b, 0x13, 0x4f, + 0x14, 0xcf, 0xf4, 0x9f, 0xfe, 0x63, 0xa7, 0x01, 0x65, 0x1a, 0x21, 0x2c, 0xed, 0xa6, 0xdd, 0x53, + 0x14, 0xbb, 0x63, 0xd6, 0xa2, 0x08, 0x82, 0xd8, 0xa0, 0x44, 0x0f, 0x52, 0xf7, 0x20, 0xe8, 0xc1, + 0xb0, 0x99, 0x8c, 0x9b, 0xa5, 0xd9, 0x99, 0xcd, 0xce, 0x24, 0x52, 0x4a, 0x2f, 0x7e, 0x02, 0xd1, + 0x9b, 0xdf, 0xc0, 0x0f, 0x22, 0x14, 0xbc, 0x14, 0xbc, 0xf4, 0x24, 0x92, 0xf8, 0x41, 0x24, 0xb3, + 0x93, 0x76, 0x1b, 0x36, 0x35, 0x01, 0xbd, 0xbd, 0x79, 0xef, 0xfd, 0xde, 0xfb, 0xfd, 0x5e, 0x7e, + 0x59, 0x58, 0x09, 0x5a, 0x04, 0x13, 0x1e, 0x53, 0x4c, 0x3a, 0x1e, 0x63, 0xb4, 0x8b, 0x07, 0x0e, + 0xee, 0xf5, 0x69, 0x7c, 0x60, 0x47, 0x31, 0x97, 0x1c, 0xad, 0x05, 0x2d, 0x62, 0x8f, 0x1b, 0x6c, + 0xdd, 0x60, 0x0f, 0x1c, 0x63, 0x2b, 0x0b, 0x35, 0xa9, 0x2b, 0x9c, 0x91, 0x1a, 0xdc, 0x0d, 0x28, + 0x93, 0x78, 0x50, 0xd3, 0x91, 0x6e, 0x58, 0xf7, 0x39, 0xf7, 0xbb, 0x14, 0x7b, 0x51, 0x80, 0x3d, + 0xc6, 0xb8, 0xf4, 0x64, 0xc0, 0x99, 0xd0, 0xd5, 0x92, 0xcf, 0x7d, 0xae, 0x42, 0x3c, 0x8e, 0x92, + 0xac, 0xb5, 0x03, 0xd7, 0x5e, 0x8c, 0xb9, 0xd5, 0x93, 0x55, 0x2e, 0xed, 0xf5, 0xa9, 0x90, 0x68, + 0x03, 0x42, 0xbd, 0xbc, 0x19, 0xb4, 0xcb, 0x60, 0x13, 0x54, 0x57, 0xdc, 0x15, 0x9d, 0x79, 0xda, + 0xb6, 0x7a, 0xb0, 0x74, 0x11, 0x25, 0x22, 0xce, 0x04, 0x45, 0x65, 0x58, 0x20, 0x31, 0xf5, 0x24, + 0x8f, 0x35, 0x66, 0xf2, 0x44, 0x0f, 0x61, 0x41, 0xc3, 0xcb, 0x4b, 0x9b, 0xa0, 0xba, 0xea, 0x54, + 0xec, 0x8c, 0x33, 0xd8, 0x7a, 0xe0, 0x63, 0xd6, 0xde, 0xcd, 0x1f, 0xff, 0xa8, 0xe4, 0xdc, 0x09, + 0xca, 0x7a, 0x05, 0xd7, 0xd5, 0xca, 0x3d, 0x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 0x77, 0x4f, + 0xf1, 0x7d, 0x86, 0x1a, 0xf3, 0xf3, 0xc5, 0x91, 0x1a, 0xd6, 0x3c, 0xf7, 0xb1, 0xc0, 0x87, 0x13, + 0x5f, 0x1c, 0xa1, 0x53, 0x00, 0xaf, 0x67, 0x7a, 0x02, 0xdd, 0xfd, 0x13, 0xbf, 0x6c, 0x97, 0x1a, + 0xf7, 0x16, 0xc6, 0x69, 0x71, 0xcf, 0x95, 0xb8, 0x06, 0x7a, 0xb2, 0x80, 0xb8, 0x29, 0x5b, 0xa6, + 0xa5, 0xed, 0xbe, 0x3c, 0x1e, 0x9a, 0xe0, 0x64, 0x68, 0x82, 0x9f, 0x43, 0x13, 0x7c, 0x18, 0x99, + 0xb9, 0x93, 0x91, 0x99, 0x3b, 0x1d, 0x99, 0xb9, 0xd7, 0x0f, 0xfc, 0x40, 0x76, 0xfa, 0x2d, 0x9b, + 0xf0, 0x10, 0x13, 0x2e, 0x42, 0x2e, 0xc6, 0x2b, 0xb7, 0x7d, 0x8e, 0x07, 0xf7, 0x71, 0xc8, 0xdb, + 0xfd, 0x2e, 0x15, 0x09, 0x81, 0xdb, 0x3b, 0xdb, 0x29, 0x0e, 0xf2, 0x20, 0xa2, 0xa2, 0xf5, 0xbf, + 0xfa, 0xa6, 0xde, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x74, 0xef, 0xea, 0x4f, 0x03, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/ibc/core/channel/v2/channel.proto b/proto/ibc/core/channel/v2/channel.proto index 67a5a1871be..d383f27b8f6 100644 --- a/proto/ibc/core/channel/v2/channel.proto +++ b/proto/ibc/core/channel/v2/channel.proto @@ -7,14 +7,14 @@ option go_package = "github.com/cosmos/ibc-go/v9/modules/core/04-channel/v2/type import "gogoproto/gogo.proto"; import "ibc/core/commitment/v2/commitment.proto"; -// Channel defines the channel end on a chain that is implementing the version 2 IBC protocol +// ChannelEnd defines the channel end on a chain that is implementing the version 2 IBC protocol // Each side will maintain its own Channel to create an IBC channel // The channel will be referenced by a channelID which will be used to send packets // to the counterparty // The channel will contain the client identifier that will provide proof verification for the channel // and the counterparty channel identifier that the other channel end will be using // to send packets to our channel end. -message Channel { +message ChannelEnd { // the client identifier of the light client representing the counterparty chain string client_id = 1; // the counterparty identifier that must be used by packets sent by counterparty diff --git a/proto/ibc/core/channel/v2/query.proto b/proto/ibc/core/channel/v2/query.proto index 051789b3330..babd14d5405 100644 --- a/proto/ibc/core/channel/v2/query.proto +++ b/proto/ibc/core/channel/v2/query.proto @@ -34,8 +34,8 @@ message QueryChannelRequest { // QueryChannelRequest is the response type for the Query/Channel RPC method message QueryChannelResponse { - string creator = 1; - Channel channel = 2 [(gogoproto.nullable) = false]; + string creator = 1; + ChannelEnd channel = 2 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentRequest is the request type for the Query/PacketCommitment RPC method.