rename MsgPacket to MsgRecvPacket (#6813)

This commit is contained in:
colin axner 2020-07-22 12:01:57 +02:00 committed by GitHub
parent 5d71020270
commit 35a59b1573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 144 additions and 145 deletions

View File

@ -65,8 +65,8 @@ message MsgChannelCloseConfirm {
bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
}
// MsgPacket receives incoming IBC packet
message MsgPacket {
// MsgRecvPacket receives incoming IBC packet
message MsgRecvPacket {
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
uint64 proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\""];

View File

@ -365,7 +365,7 @@ func recvPacketHandlerFn(clientCtx client.Context) http.HandlerFunc {
}
// create the message
msg := types.NewMsgPacket(
msg := types.NewMsgRecvPacket(
req.Packet,
req.Proofs,
req.Height,

View File

@ -566,26 +566,26 @@ func (m *MsgChannelCloseConfirm) GetSigner() github_com_cosmos_cosmos_sdk_types.
return nil
}
// MsgPacket receives incoming IBC packet
type MsgPacket struct {
// MsgRecvPacket receives incoming IBC packet
type MsgRecvPacket struct {
Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"`
Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
ProofHeight uint64 `protobuf:"varint,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}
func (m *MsgPacket) Reset() { *m = MsgPacket{} }
func (m *MsgPacket) String() string { return proto.CompactTextString(m) }
func (*MsgPacket) ProtoMessage() {}
func (*MsgPacket) Descriptor() ([]byte, []int) {
func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} }
func (m *MsgRecvPacket) String() string { return proto.CompactTextString(m) }
func (*MsgRecvPacket) ProtoMessage() {}
func (*MsgRecvPacket) Descriptor() ([]byte, []int) {
return fileDescriptor_9277922ccfb7f043, []int{6}
}
func (m *MsgPacket) XXX_Unmarshal(b []byte) error {
func (m *MsgRecvPacket) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *MsgRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgPacket.Marshal(b, m, deterministic)
return xxx_messageInfo_MsgRecvPacket.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@ -595,40 +595,40 @@ func (m *MsgPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return b[:n], nil
}
}
func (m *MsgPacket) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgPacket.Merge(m, src)
func (m *MsgRecvPacket) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgRecvPacket.Merge(m, src)
}
func (m *MsgPacket) XXX_Size() int {
func (m *MsgRecvPacket) XXX_Size() int {
return m.Size()
}
func (m *MsgPacket) XXX_DiscardUnknown() {
xxx_messageInfo_MsgPacket.DiscardUnknown(m)
func (m *MsgRecvPacket) XXX_DiscardUnknown() {
xxx_messageInfo_MsgRecvPacket.DiscardUnknown(m)
}
var xxx_messageInfo_MsgPacket proto.InternalMessageInfo
var xxx_messageInfo_MsgRecvPacket proto.InternalMessageInfo
func (m *MsgPacket) GetPacket() Packet {
func (m *MsgRecvPacket) GetPacket() Packet {
if m != nil {
return m.Packet
}
return Packet{}
}
func (m *MsgPacket) GetProof() []byte {
func (m *MsgRecvPacket) GetProof() []byte {
if m != nil {
return m.Proof
}
return nil
}
func (m *MsgPacket) GetProofHeight() uint64 {
func (m *MsgRecvPacket) GetProofHeight() uint64 {
if m != nil {
return m.ProofHeight
}
return 0
}
func (m *MsgPacket) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress {
func (m *MsgRecvPacket) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress {
if m != nil {
return m.Signer
}
@ -1043,7 +1043,7 @@ func init() {
proto.RegisterType((*MsgChannelOpenConfirm)(nil), "ibc.channel.MsgChannelOpenConfirm")
proto.RegisterType((*MsgChannelCloseInit)(nil), "ibc.channel.MsgChannelCloseInit")
proto.RegisterType((*MsgChannelCloseConfirm)(nil), "ibc.channel.MsgChannelCloseConfirm")
proto.RegisterType((*MsgPacket)(nil), "ibc.channel.MsgPacket")
proto.RegisterType((*MsgRecvPacket)(nil), "ibc.channel.MsgRecvPacket")
proto.RegisterType((*MsgTimeout)(nil), "ibc.channel.MsgTimeout")
proto.RegisterType((*MsgAcknowledgement)(nil), "ibc.channel.MsgAcknowledgement")
proto.RegisterType((*Channel)(nil), "ibc.channel.Channel")
@ -1056,88 +1056,88 @@ func init() {
func init() { proto.RegisterFile("ibc/channel/channel.proto", fileDescriptor_9277922ccfb7f043) }
var fileDescriptor_9277922ccfb7f043 = []byte{
// 1281 bytes of a gzipped FileDescriptorProto
// 1284 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xf7, 0xfa, 0x6f, 0xfc, 0xf2, 0xcf, 0x99, 0xa4, 0xa9, 0xe3, 0x16, 0xaf, 0xb5, 0x70, 0xb0,
0x2a, 0xea, 0xd0, 0x3f, 0x80, 0xd4, 0x13, 0xb6, 0xe3, 0xaa, 0x2b, 0x1a, 0x3b, 0x9a, 0xb8, 0x48,
0xf4, 0x62, 0x6d, 0x76, 0xa7, 0xf6, 0xca, 0xf1, 0x8e, 0xd9, 0xdd, 0xb4, 0xcd, 0x37, 0xa8, 0x22,
0x51, 0xb8, 0xa3, 0x48, 0x48, 0x9c, 0xf8, 0x04, 0x7c, 0x02, 0xa4, 0x4a, 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, 0xf1, 0x49, 0x39, 0x3b, 0x51, 0xf8, 0x0e, 0x73, 0x4c, 0x80, 0x10, 0x0e, 0x0b,
0x91, 0x5f, 0x5c, 0xdf, 0x79, 0x71, 0x5a, 0x92, 0x5e, 0x9e, 0x96, 0xa4, 0xdf, 0x4f, 0x4b, 0xd2,
0xd7, 0xaf, 0x4b, 0xb1, 0x97, 0xaf, 0x4b, 0xb1, 0x5f, 0x5f, 0x97, 0x62, 0x0f, 0x6f, 0xbd, 0x75,
0x76, 0x3e, 0xdd, 0x32, 0xf7, 0xf5, 0xad, 0x0f, 0x6e, 0x5f, 0x0f, 0x7e, 0x87, 0x62, 0xc3, 0x74,
0x3f, 0xcd, 0x7e, 0x63, 0xba, 0xf5, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xbb, 0x3c, 0x45,
0xa3, 0x12, 0x00, 0x00,
}
func (m *MsgChannelOpenInit) Marshal() (dAtA []byte, err error) {
@ -1486,7 +1486,7 @@ func (m *MsgChannelCloseConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error)
return len(dAtA) - i, nil
}
func (m *MsgPacket) Marshal() (dAtA []byte, err error) {
func (m *MsgRecvPacket) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -1496,12 +1496,12 @@ func (m *MsgPacket) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *MsgPacket) MarshalTo(dAtA []byte) (int, error) {
func (m *MsgRecvPacket) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *MsgRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@ -2122,7 +2122,7 @@ func (m *MsgChannelCloseConfirm) Size() (n int) {
return n
}
func (m *MsgPacket) Size() (n int) {
func (m *MsgRecvPacket) Size() (n int) {
if m == nil {
return 0
}
@ -3590,7 +3590,7 @@ func (m *MsgChannelCloseConfirm) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *MsgPacket) Unmarshal(dAtA []byte) error {
func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -3613,10 +3613,10 @@ func (m *MsgPacket) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgPacket: wiretype end group for non-group")
return fmt.Errorf("proto: MsgRecvPacket: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgPacket: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: MsgRecvPacket: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:

View File

@ -20,7 +20,6 @@ func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(&MsgChannelOpenConfirm{}, "ibc/channel/MsgChannelOpenConfirm", nil)
cdc.RegisterConcrete(&MsgChannelCloseInit{}, "ibc/channel/MsgChannelCloseInit", nil)
cdc.RegisterConcrete(&MsgChannelCloseConfirm{}, "ibc/channel/MsgChannelCloseConfirm", nil)
cdc.RegisterConcrete(&MsgPacket{}, "ibc/channel/MsgPacket", nil)
cdc.RegisterConcrete(&MsgAcknowledgement{}, "ibc/channel/MsgAcknowledgement", nil)
cdc.RegisterConcrete(&MsgTimeout{}, "ibc/channel/MsgTimeout", nil)
}
@ -36,7 +35,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
&MsgChannelOpenConfirm{},
&MsgChannelCloseInit{},
&MsgChannelCloseConfirm{},
&MsgPacket{},
&MsgRecvPacket{},
&MsgAcknowledgement{},
&MsgTimeout{},
)

View File

@ -332,14 +332,14 @@ func (msg MsgChannelCloseConfirm) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{msg.Signer}
}
var _ sdk.Msg = &MsgPacket{}
var _ sdk.Msg = &MsgRecvPacket{}
// NewMsgPacket constructs new MsgPacket
func NewMsgPacket(
// NewMsgRecvPacket constructs new MsgRecvPacket
func NewMsgRecvPacket(
packet Packet, proof []byte, proofHeight uint64,
signer sdk.AccAddress,
) *MsgPacket {
return &MsgPacket{
) *MsgRecvPacket {
return &MsgRecvPacket{
Packet: packet,
Proof: proof,
ProofHeight: proofHeight,
@ -348,12 +348,12 @@ func NewMsgPacket(
}
// Route implements sdk.Msg
func (msg MsgPacket) Route() string {
func (msg MsgRecvPacket) Route() string {
return host.RouterKey
}
// ValidateBasic implements sdk.Msg
func (msg MsgPacket) ValidateBasic() error {
func (msg MsgRecvPacket) ValidateBasic() error {
if len(msg.Proof) == 0 {
return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof")
}
@ -368,24 +368,24 @@ func (msg MsgPacket) ValidateBasic() error {
}
// GetSignBytes implements sdk.Msg
func (msg MsgPacket) GetSignBytes() []byte {
func (msg MsgRecvPacket) GetSignBytes() []byte {
return sdk.MustSortJSON(SubModuleCdc.MustMarshalJSON(msg))
}
// GetDataSignBytes returns the base64-encoded bytes used for the
// data field when signing the packet.
func (msg MsgPacket) GetDataSignBytes() []byte {
func (msg MsgRecvPacket) GetDataSignBytes() []byte {
s := "\"" + base64.StdEncoding.EncodeToString(msg.Packet.Data) + "\""
return []byte(s)
}
// GetSigners implements sdk.Msg
func (msg MsgPacket) GetSigners() []sdk.AccAddress {
func (msg MsgRecvPacket) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{msg.Signer}
}
// Type implements sdk.Msg
func (msg MsgPacket) Type() string {
func (msg MsgRecvPacket) Type() string {
return "recv_packet"
}

View File

@ -371,25 +371,25 @@ func (suite *MsgTestSuite) TestMsgChannelCloseConfirm() {
}
}
// TestMsgPacketType tests Type for MsgPacket.
func (suite *MsgTestSuite) TestMsgPacketType() {
msg := types.NewMsgPacket(packet, suite.proof, 1, addr1)
// TestMsgRecvPacketType tests Type for MsgRecvPacket.
func (suite *MsgTestSuite) TestMsgRecvPacketType() {
msg := types.NewMsgRecvPacket(packet, suite.proof, 1, addr1)
suite.Equal("recv_packet", msg.Type())
}
// TestMsgPacketValidation tests ValidateBasic for MsgPacket
func (suite *MsgTestSuite) TestMsgPacketValidation() {
testMsgs := []*types.MsgPacket{
types.NewMsgPacket(packet, suite.proof, 1, addr1), // valid msg
types.NewMsgPacket(packet, suite.proof, 0, addr1), // proof height is zero
types.NewMsgPacket(packet, emptyProof, 1, addr1), // empty proof
types.NewMsgPacket(packet, suite.proof, 1, emptyAddr), // missing signer address
types.NewMsgPacket(unknownPacket, suite.proof, 1, addr1), // unknown packet
// TestMsgRecvPacketValidation tests ValidateBasic for MsgRecvPacket
func (suite *MsgTestSuite) TestMsgRecvPacketValidation() {
testMsgs := []*types.MsgRecvPacket{
types.NewMsgRecvPacket(packet, suite.proof, 1, addr1), // valid msg
types.NewMsgRecvPacket(packet, suite.proof, 0, addr1), // proof height is zero
types.NewMsgRecvPacket(packet, emptyProof, 1, addr1), // empty proof
types.NewMsgRecvPacket(packet, suite.proof, 1, emptyAddr), // missing signer address
types.NewMsgRecvPacket(unknownPacket, suite.proof, 1, addr1), // unknown packet
}
testCases := []struct {
msg *types.MsgPacket
msg *types.MsgRecvPacket
expPass bool
errMsg string
}{
@ -410,21 +410,21 @@ func (suite *MsgTestSuite) TestMsgPacketValidation() {
}
}
// TestMsgPacketGetSignBytes tests GetSignBytes for MsgPacket
func (suite *MsgTestSuite) TestMsgPacketGetSignBytes() {
msg := types.NewMsgPacket(packet, suite.proof, 1, addr1)
// TestMsgRecvPacketGetSignBytes tests GetSignBytes for MsgRecvPacket
func (suite *MsgTestSuite) TestMsgRecvPacketGetSignBytes() {
msg := types.NewMsgRecvPacket(packet, suite.proof, 1, addr1)
res := msg.GetSignBytes()
expected := fmt.Sprintf(
`{"type":"ibc/channel/MsgPacket","value":{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":"100","timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":"1","signer":"cosmos1w3jhxarpv3j8yvg4ufs4x"}}`,
`{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":"100","timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":"1","signer":"cosmos1w3jhxarpv3j8yvg4ufs4x"}`,
string(msg.GetDataSignBytes()),
)
suite.Equal(expected, string(res))
}
// TestMsgPacketGetSigners tests GetSigners for MsgPacket
func (suite *MsgTestSuite) TestMsgPacketGetSigners() {
msg := types.NewMsgPacket(packet, suite.proof, 1, addr1)
// TestMsgRecvPacketGetSigners tests GetSigners for MsgRecvPacket
func (suite *MsgTestSuite) TestMsgRecvPacketGetSigners() {
msg := types.NewMsgRecvPacket(packet, suite.proof, 1, addr1)
res := msg.GetSigners()
expected := "[746573746164647231]"

View File

@ -167,7 +167,7 @@ func NewHandler(k keeper.Keeper) sdk.Handler {
return channel.HandleMsgChannelCloseConfirm(ctx, k.ChannelKeeper, cap, msg)
// IBC packet msgs get routed to the appropriate module callback
case *channeltypes.MsgPacket:
case *channeltypes.MsgRecvPacket:
// Lookup module by channel capability
module, cap, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.Packet.DestinationPort, msg.Packet.DestinationChannel)
if err != nil {

View File

@ -137,7 +137,7 @@ func (suite *HandlerTestSuite) TestHandleRecvPacket() {
packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence())
proof, proofHeight := suite.chainA.QueryProof(packetKey)
msg := channeltypes.NewMsgPacket(packet, proof, proofHeight, suite.chainB.SenderAccount.GetAddress())
msg := channeltypes.NewMsgRecvPacket(packet, proof, proofHeight, suite.chainB.SenderAccount.GetAddress())
// ante-handle RecvPacket
_, err := handler(suite.chainB.GetContext(), msg)