Skip to content

Commit

Permalink
Update third_party protos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Taztingo committed Jun 20, 2024
1 parent b28687e commit bd3fa55
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ message Params {
// allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain.
repeated string allow_messages = 2;
}

// QueryRequest defines the parameters for a particular query request
// by an interchain account.
message QueryRequest {
// path defines the path of the query request as defined by ADR-021.
// https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-021-protobuf-query-encoding.md#custom-query-registration-and-routing
string path = 1;
// data defines the payload of the query request as defined by ADR-021.
// https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-021-protobuf-query-encoding.md#custom-query-registration-and-routing
bytes data = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ service Msg {

// UpdateParams defines a rpc handler for MsgUpdateParams.
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);

// ModuleQuerySafe defines a rpc handler for MsgModuleQuerySafe.
rpc ModuleQuerySafe(MsgModuleQuerySafe) returns (MsgModuleQuerySafeResponse);
}

// MsgUpdateParams defines the payload for Msg/UpdateParams
Expand All @@ -33,3 +36,25 @@ message MsgUpdateParams {

// MsgUpdateParamsResponse defines the response for Msg/UpdateParams
message MsgUpdateParamsResponse {}

// MsgModuleQuerySafe defines the payload for Msg/ModuleQuerySafe
message MsgModuleQuerySafe {
option (cosmos.msg.v1.signer) = "signer";

option (gogoproto.goproto_getters) = false;

// signer address
string signer = 1;

// requests defines the module safe queries to execute.
repeated QueryRequest requests = 2;
}

// MsgModuleQuerySafeResponse defines the response for Msg/ModuleQuerySafe
message MsgModuleQuerySafeResponse {
// height at which the responses were queried
uint64 height = 1;

// protobuf encoded responses for each query
repeated bytes responses = 2;
}
4 changes: 2 additions & 2 deletions third_party/proto/ibc/applications/transfer/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ message Allocation {
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
// allow list of receivers, an empty allow list permits any receiver address
repeated string allow_list = 4;
// allow list of packet data keys, an empty list prohibits all packet data keys;
// a list only with "*" permits any packet data key
// allow list of memo strings, an empty list prohibits all memo strings;
// a list only with "*" permits any memo string
repeated string allowed_packet_data = 5;
}

Expand Down
35 changes: 35 additions & 0 deletions third_party/proto/ibc/core/client/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ package ibc.core.client.v1;
option go_package = "github.com/cosmos/ibc-go/v8/modules/core/02-client/types";

import "cosmos/base/query/v1beta1/pagination.proto";
import "cosmos/query/v1/query.proto";
import "ibc/core/client/v1/client.proto";
import "ibc/core/commitment/v1/commitment.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
Expand Down Expand Up @@ -60,6 +62,15 @@ service Query {
rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) {
option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states";
}

// VerifyMembership queries an IBC light client for proof verification of a value at a given key path.
rpc VerifyMembership(QueryVerifyMembershipRequest) returns (QueryVerifyMembershipResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http) = {
post: "/ibc/core/client/v1/verify_membership"
body: "*"
};
}
}

// QueryClientStateRequest is the request type for the Query/ClientState RPC
Expand Down Expand Up @@ -205,3 +216,27 @@ message QueryUpgradedConsensusStateResponse {
// Consensus state associated with the request identifier
google.protobuf.Any upgraded_consensus_state = 1;
}

// QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership RPC method
message QueryVerifyMembershipRequest {
// client unique identifier.
string client_id = 1;
// the proof to be verified by the client.
bytes proof = 2;
// the height of the commitment root at which the proof is verified.
ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false];
// the commitment key path.
ibc.core.commitment.v1.MerklePath merkle_path = 4 [(gogoproto.nullable) = false];
// the value which is proven.
bytes value = 5;
// optional time delay
uint64 time_delay = 6;
// optional block delay
uint64 block_delay = 7;
}

// QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership RPC method
message QueryVerifyMembershipResponse {
// boolean indicating success or failure of proof verification.
bool success = 1;
}

0 comments on commit bd3fa55

Please sign in to comment.