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

ibc: protobuf v1 #7432

Merged
merged 3 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions proto/ibc/applications/transfer/v1/transfer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/ty

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "ibc/client/client.proto";
import "ibc/core/client/v1/client.proto";

// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
// ICS20 enabled chains. See ICS Spec here:
Expand All @@ -26,7 +26,8 @@ message MsgTransfer {
string receiver = 5;
// Timeout height relative to the current block height.
// The timeout is disabled when set to 0.
ibc.client.Height timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
ibc.core.client.v1.Height timeout_height = 6
[(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
// Timeout timestamp (in nanoseconds) relative to the current block timestamp.
// The timeout is disabled when set to 0.
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";
package ibc.channel;
package ibc.core.channel.v1;

option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types";

import "gogoproto/gogo.proto";
import "ibc/client/client.proto";
import "ibc/core/client/v1/client.proto";

// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It
// is called by a relayer on Chain A.
Expand All @@ -24,13 +24,14 @@ message MsgChannelOpenTry {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
Channel channel = 3 [(gogoproto.nullable) = false];
string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 7;
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
Channel channel = 3 [(gogoproto.nullable) = false];
string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.core.client.v1.Height proof_height = 6
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 7;
}

// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge
Expand All @@ -39,12 +40,13 @@ message MsgChannelOpenAck {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""];
ibc.client.Height proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 6;
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""];
ibc.core.client.v1.Height proof_height = 5
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 6;
}

// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to
Expand All @@ -53,11 +55,12 @@ message MsgChannelOpenConfirm {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
}

// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A
Expand All @@ -77,59 +80,64 @@ message MsgChannelCloseConfirm {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
}

// MsgRecvPacket receives incoming IBC packet
message MsgRecvPacket {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 4;
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
ibc.core.client.v1.Height proof_height = 3
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 4;
}

// MsgTimeout receives timed-out packet
message MsgTimeout {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 5;
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
ibc.core.client.v1.Height proof_height = 3
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 5;
}

// MsgTimeoutOnClose timed-out packet upon counterparty channel closure.
message MsgTimeoutOnClose {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 6;
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2;
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 6;
}

// MsgAcknowledgement receives incoming IBC acknowledgement
message MsgAcknowledgement {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes acknowledgement = 2;
bytes proof = 3;
ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
Packet packet = 1 [(gogoproto.nullable) = false];
bytes acknowledgement = 2;
bytes proof = 3;
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
}

// Channel defines pipeline for exactly-once packet delivery between specific
Expand Down Expand Up @@ -234,7 +242,8 @@ message Packet {
// actual opaque bytes transferred directly to the application module
bytes data = 6;
// block height after which the packet times out
ibc.client.Height timeout_height = 7 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
ibc.core.client.v1.Height timeout_height = 7
[(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
// block timestamp (in nanoseconds) after which the packet times out
uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
syntax = "proto3";
package ibc.channel;
package ibc.core.channel.v1;

option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types";

import "gogoproto/gogo.proto";
import "ibc/channel/channel.proto";
import "ibc/core/channel/v1/channel.proto";

// GenesisState defines the ibc channel submodule's genesis state.
message GenesisState {
repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false];
repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false];
repeated PacketAckCommitment acknowledgements = 2
[(gogoproto.casttype) = "PacketAckCommitment", (gogoproto.nullable) = false];
repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false];
repeated PacketSequence send_sequences = 4
repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false];
repeated PacketSequence send_sequences = 4
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""];
repeated PacketSequence recv_sequences = 5
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package ibc.channel;
package ibc.core.channel.v1;

import "ibc/client/client.proto";
import "ibc/core/client/v1/client.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "ibc/channel/channel.proto";
import "ibc/core/channel/v1/channel.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "gogoproto/gogo.proto";
Expand Down Expand Up @@ -91,13 +91,13 @@ message QueryChannelRequest {
// proof was retrieved.
message QueryChannelResponse {
// channel associated with the request identifiers
ibc.channel.Channel channel = 1;
ibc.core.channel.v1.Channel channel = 1;
// merkle proof of existence
bytes proof = 2;
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
}

// QueryChannelsRequest is the request type for the Query/Channels RPC method
Expand All @@ -109,11 +109,11 @@ message QueryChannelsRequest {
// QueryChannelsResponse is the response type for the Query/Channels RPC method.
message QueryChannelsResponse {
// list of stored channels of the chain.
repeated ibc.channel.IdentifiedChannel channels = 1;
repeated ibc.core.channel.v1.IdentifiedChannel channels = 1;
// pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false];
}

// QueryConnectionChannelsRequest is the request type for the
Expand All @@ -129,11 +129,11 @@ message QueryConnectionChannelsRequest {
// Query/QueryConnectionChannels RPC method
message QueryConnectionChannelsResponse {
// list of channels associated with a connection.
repeated ibc.channel.IdentifiedChannel channels = 1;
repeated ibc.core.channel.v1.IdentifiedChannel channels = 1;
// pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false];
}

// QueryChannelClientStateRequest is the request type for the Query/ClientState
Expand All @@ -149,13 +149,13 @@ message QueryChannelClientStateRequest {
// Query/QueryChannelClientState RPC method
message QueryChannelClientStateResponse {
// client state associated with the channel
ibc.client.IdentifiedClientState identified_client_state = 1;
ibc.core.client.v1.IdentifiedClientState identified_client_state = 1;
// merkle proof of existence
bytes proof = 2;
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
}

// QueryChannelConsensusStateRequest is the request type for the
Expand Down Expand Up @@ -183,7 +183,7 @@ message QueryChannelConsensusStateResponse {
// merkle proof path
string proof_path = 4;
// height at which the proof was retrieved
ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 5 [(gogoproto.nullable) = false];
}

// QueryPacketCommitmentRequest is the request type for the
Expand All @@ -208,7 +208,7 @@ message QueryPacketCommitmentResponse {
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
}

// QueryPacketCommitmentsRequest is the request type for the
Expand All @@ -225,11 +225,11 @@ message QueryPacketCommitmentsRequest {
// QueryPacketCommitmentsResponse is the request type for the
// Query/QueryPacketCommitments RPC method
message QueryPacketCommitmentsResponse {
repeated ibc.channel.PacketAckCommitment commitments = 1;
repeated ibc.core.channel.v1.PacketAckCommitment commitments = 1;
// pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height
ibc.client.Height height = 3 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false];
}

// QueryPacketAcknowledgementRequest is the request type for the
Expand All @@ -254,7 +254,7 @@ message QueryPacketAcknowledgementResponse {
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
}

// QueryUnreceivedPacketsRequest is the request type for the
Expand All @@ -274,7 +274,7 @@ message QueryUnreceivedPacketsResponse {
// list of unreceived packet sequences
repeated uint64 sequences = 1;
// query block height
ibc.client.Height height = 2 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false];
}

// QueryUnrelayedAcksRequest is the request type for the
Expand All @@ -294,7 +294,7 @@ message QueryUnrelayedAcksResponse {
// list of unrelayed acknowledgement sequences
repeated uint64 sequences = 1;
// query block height
ibc.client.Height height = 2 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false];
}

// QueryNextSequenceReceiveRequest is the request type for the
Expand All @@ -316,5 +316,5 @@ message QueryNextSequenceReceiveResponse {
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package ibc.client;
package ibc.core.client.v1;

option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package ibc.client;
package ibc.core.client.v1;

option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types";

import "ibc/client/client.proto";
import "ibc/core/client/v1/client.proto";
import "gogoproto/gogo.proto";

// GenesisState defines the ibc client submodule's genesis state.
Expand Down
Loading