Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add MsgRecvPacket skeleton #7379

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/core/04-channel/v2/types/codec.go
Original file line number Diff line number Diff line change
@@ -11,5 +11,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterImplementations(
(*sdk.Msg)(nil),
&MsgSendPacket{},
&MsgRecvPacket{},
)
}
552 changes: 526 additions & 26 deletions modules/core/04-channel/v2/types/tx.pb.go
24 changes: 24 additions & 0 deletions proto/ibc/core/channel/v2/tx.proto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add rpc for it in message server?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought based on #7354 that we wanted to do this in separate PRs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I just saw the RPC for SendPacket there too. If you add it we shouldn't have compile errors since no interface enforcement is done yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking of it might be nice to do here to not get proto generated diffs in other PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I TOTALLY misread!

yeah I actually forgot the RPC in the proto, going to push that now

Original file line number Diff line number Diff line change
@@ -7,13 +7,18 @@ option go_package = "github.com/cosmos/ibc-go/v9/modules/core/04-channel/v2/type
import "gogoproto/gogo.proto";
import "cosmos/msg/v1/msg.proto";
import "ibc/core/channel/v2/channel.proto";
import "ibc/core/channel/v1/tx.proto";
import "ibc/core/client/v1/client.proto";

// PacketMsg defines the ibc/channel PacketMsg service.
service PacketMsg {
option (cosmos.msg.v1.service) = true;

// SendPacket defines a rpc handler method for MsgSendPacket.
rpc SendPacket(MsgSendPacket) returns (MsgSendPacketResponse);

// RecvPacket defines a rpc handler method for MsgRecvPacket.
rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse);
}

// MsgSendPacket sends an outgoing IBC packet.
@@ -33,3 +38,22 @@ message MsgSendPacketResponse {

uint64 sequence = 1;
}

// MsgRecvPacket receives an incoming IBC packet.
message MsgRecvPacket {
option (cosmos.msg.v1.signer) = "signer";

option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_commitment = 2;
ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false];
string signer = 4;
}

// MsgRecvPacketResponse defines the Msg/RecvPacket response type.
message MsgRecvPacketResponse {
option (gogoproto.goproto_getters) = false;

ibc.core.channel.v1.ResponseResultType result = 1;
}