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

add height field to gRPC requests #7303

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
478 changes: 396 additions & 82 deletions modules/core/02-client/types/query.pb.go

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions modules/core/02-client/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

225 changes: 165 additions & 60 deletions modules/core/03-connection/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions modules/core/03-connection/types/query.pb.gw.go
829 changes: 674 additions & 155 deletions modules/core/04-channel/types/query.pb.go

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions modules/core/04-channel/types/query.pb.gw.go
22 changes: 21 additions & 1 deletion proto/ibc/core/channel/v1/query.proto
Original file line number Diff line number Diff line change
@@ -130,6 +130,10 @@ message QueryChannelRequest {
string port_id = 1;
// channel unique identifier
string channel_id = 2;
// the height at which to query
ibc.core.client.v1.Height height = 3;
// latest_height overrides the height field and queries the latest height
bool latest_height = 4;
}

// QueryChannelResponse is the response type for the Query/Channel RPC method.
@@ -235,6 +239,10 @@ message QueryPacketCommitmentRequest {
string channel_id = 2;
// packet sequence
uint64 sequence = 3;
// the height at which to query
ibc.core.client.v1.Height height = 4;
// latest_height overrides the height field and queries the latest height
bool latest_height = 5;
}

// QueryPacketCommitmentResponse defines the client query response for a packet
@@ -279,6 +287,10 @@ message QueryPacketReceiptRequest {
string channel_id = 2;
// packet sequence
uint64 sequence = 3;
// the height at which to query
ibc.core.client.v1.Height height = 4;
// latest_height overrides the height field and queries the latest height
bool latest_height = 5;
}

// QueryPacketReceiptResponse defines the client query response for a packet
@@ -302,6 +314,10 @@ message QueryPacketAcknowledgementRequest {
string channel_id = 2;
// packet sequence
uint64 sequence = 3;
// the height at which to query
ibc.core.client.v1.Height height = 4;
// latest_height overrides the height field and queries the latest height
bool latest_height = 5;
}

// QueryPacketAcknowledgementResponse defines the client query response for a
@@ -386,6 +402,10 @@ message QueryNextSequenceReceiveRequest {
string port_id = 1;
// channel unique identifier
string channel_id = 2;
// the height at which to query
ibc.core.client.v1.Height height = 3;
// latest_height overrides the height field and queries the latest height
bool latest_height = 4;
}

// QuerySequenceResponse is the response type for the
@@ -456,4 +476,4 @@ message QueryChannelParamsRequest {}
message QueryChannelParamsResponse {
// params defines the parameters of the module.
Params params = 1;
}
}
27 changes: 22 additions & 5 deletions proto/ibc/core/client/v1/query.proto
Original file line number Diff line number Diff line change
@@ -78,6 +78,11 @@ service Query {
message QueryClientStateRequest {
// client state unique identifier
string client_id = 1;
// the height at which to query
ibc.core.client.v1.Height height = 2;
// latest_height overrides the height field and queries the latest stored
// ClientState
bool latest_height = 3;
}

// QueryClientStateResponse is the response type for the Query/ClientState RPC
@@ -110,8 +115,7 @@ message QueryClientStatesResponse {
}

// QueryConsensusStateRequest is the request type for the Query/ConsensusState
// RPC method. Besides the consensus state, it includes a proof and the height
// from which the proof was retrieved.
// RPC method.
message QueryConsensusStateRequest {
// client identifier
string client_id = 1;
@@ -125,7 +129,8 @@ message QueryConsensusStateRequest {
}

// QueryConsensusStateResponse is the response type for the Query/ConsensusState
// RPC method
// RPC method. Besides the consensus state, it includes a proof and the height
// from which the proof was retrieved.
message QueryConsensusStateResponse {
// consensus state associated with the client identifier at the given height
google.protobuf.Any consensus_state = 1;
@@ -197,7 +202,13 @@ message QueryClientParamsResponse {

// QueryUpgradedClientStateRequest is the request type for the
// Query/UpgradedClientState RPC method
message QueryUpgradedClientStateRequest {}
message QueryUpgradedClientStateRequest {
// the height at which to query
ibc.core.client.v1.Height height = 1;
// latest_height overrides the height field and queries the latest stored
// UpgradedClientState
bool latest_height = 2;
}

// QueryUpgradedClientStateResponse is the response type for the
// Query/UpgradedClientState RPC method.
@@ -208,7 +219,13 @@ message QueryUpgradedClientStateResponse {

// QueryUpgradedConsensusStateRequest is the request type for the
// Query/UpgradedConsensusState RPC method
message QueryUpgradedConsensusStateRequest {}
message QueryUpgradedConsensusStateRequest {
// the height at which to query
ibc.core.client.v1.Height height = 1;
// latest_height overrides the height field and queries the latest stored
// UpgradedClientState
bool latest_height = 2;
}

// QueryUpgradedConsensusStateResponse is the response type for the
// Query/UpgradedConsensusState RPC method.
6 changes: 5 additions & 1 deletion proto/ibc/core/connection/v1/query.proto
Original file line number Diff line number Diff line change
@@ -53,6 +53,10 @@ service Query {
message QueryConnectionRequest {
// connection unique identifier
string connection_id = 1;
// the height at which to query
ibc.core.client.v1.Height height = 2;
// latest_height overrides the height field and queries the latest height
bool latest_height = 3;
}

// QueryConnectionResponse is the response type for the Query/Connection RPC
@@ -149,4 +153,4 @@ message QueryConnectionParamsRequest {}
message QueryConnectionParamsResponse {
// params defines the parameters of the module.
Params params = 1;
}
}