-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: refactor ICQ module documentation [NTRN-349] #646
Changes from 1 commit
03dcf24
6208f8f
cf37896
a5ac098
f591f09
2264e95
0464849
c5b2703
d57db4a
eb2ec60
95ce534
3f69fac
51627be
a1e6904
2e29375
dd24540
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,21 +6,18 @@ import "gogoproto/gogo.proto"; | |
|
||
option go_package = "github.com/neutron-org/neutron/v4/x/interchainqueries/types"; | ||
|
||
// Params defines the parameters for the module. | ||
// The parameters for the module. | ||
message Params { | ||
option (gogoproto.goproto_stringer) = false; | ||
// Defines amount of blocks required before query becomes available for | ||
// removal by anybody | ||
// The amount of blocks required to pass since an Interchain Query registration/update for the | ||
// query to become available for removal by anybody. | ||
uint64 query_submit_timeout = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this param related to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will rephrase, too |
||
|
||
// Amount of coins deposited for the query. | ||
// Amount of coins required to be provided as deposit on Interchain Query registration. | ||
repeated cosmos.base.v1beta1.Coin query_deposit = 2 [ | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", | ||
(gogoproto.nullable) = false | ||
]; | ||
|
||
// Amount of tx hashes to be removed during a single EndBlock. Can vary to | ||
// balance between network cleaning speed and EndBlock duration. A zero value | ||
// means no limit. | ||
// Amount of tx hashes to be removed during a single EndBlock. Can vary to balance between | ||
// network cleaning speed and EndBlock duration. A zero value means no limit. | ||
uint64 tx_query_removal_limit = 3; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,78 +10,99 @@ import "neutron/interchainqueries/tx.proto"; | |
|
||
option go_package = "github.com/neutron-org/neutron/v4/x/interchainqueries/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
// Defines the Query interface of the module. | ||
service Query { | ||
// Parameters queries the parameters of the module. | ||
// Queries the current parameters of the module. | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/neutron/interchainqueries/params"; | ||
} | ||
|
||
// Queries all the registered Interchain Queries in the module with filtration by owner and/or | ||
// connection ID. | ||
rpc RegisteredQueries(QueryRegisteredQueriesRequest) returns (QueryRegisteredQueriesResponse) { | ||
option (google.api.http).get = "/neutron/interchainqueries/registered_queries"; | ||
} | ||
|
||
// Queries a registered Interchain Query by ID. | ||
rpc RegisteredQuery(QueryRegisteredQueryRequest) returns (QueryRegisteredQueryResponse) { | ||
option (google.api.http).get = "/neutron/interchainqueries/registered_query"; | ||
} | ||
|
||
rpc QueryResult(QueryRegisteredQueryResultRequest) returns (QueryRegisteredQueryResultResponse) { | ||
// Queries the last successfully submitted result of an Interchain Query. | ||
rpc QueryResult(QueryQueryResultRequest) returns (QueryQueryResultResponse) { | ||
option (google.api.http).get = "/neutron/interchainqueries/query_result"; | ||
} | ||
|
||
rpc LastRemoteHeight(QueryLastRemoteHeight) returns (QueryLastRemoteHeightResponse) { | ||
// Queries the last height of a remote chain known to the IBC client behind a given connection ID. | ||
rpc LastRemoteHeight(QueryLastRemoteHeightRequest) returns (QueryLastRemoteHeightResponse) { | ||
option (google.api.http).get = "/neutron/interchainqueries/remote_height"; | ||
} | ||
} | ||
|
||
// QueryParamsRequest is request type for the Query/Params RPC method. | ||
// Request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is response type for the Query/Params RPC method. | ||
// Response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
// params holds all the parameters of this module. | ||
// Stores all parameters of the module. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the |
||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// Request type for the Query/RegisteredQueries RPC method. | ||
message QueryRegisteredQueriesRequest { | ||
// A list of owners of Interchain Queries. Query response will contain only Interchain Queries | ||
// that are owned by one of the owners in the list. If none, Interchain Queries are not filtered | ||
// out by the owner field. | ||
repeated string owners = 1; | ||
// IBC connection ID. Query response will contain only Interchain Queries that have the same IBC | ||
// connection ID parameter. If none, Interchain Queries are not filtered out by the connection ID | ||
// field. | ||
string connection_id = 2; | ||
// Pagination parameters for the request. Use values from previous response in the next request | ||
// in consecutive requests with paginated responses. | ||
cosmos.base.query.v1beta1.PageRequest pagination = 3; | ||
} | ||
|
||
// Response type for the Query/RegisteredQueries RPC method. | ||
message QueryRegisteredQueriesResponse { | ||
// A list of registered Interchain Queries. | ||
repeated RegisteredQuery registered_queries = 1 [(gogoproto.nullable) = false]; | ||
|
||
// pagination defines the pagination in the response. | ||
// Current page information. Use values from previous response in the next request in consecutive | ||
// requests with paginated responses. | ||
sotnikov-s marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// Request type for the Query/RegisteredQuery RPC method. | ||
message QueryRegisteredQueryRequest { | ||
// ID of an Interchain Query. | ||
uint64 query_id = 1; | ||
} | ||
|
||
// Response type for the Query/RegisteredQuery RPC method. | ||
message QueryRegisteredQueryResponse { | ||
// A registered Interchain Query. | ||
RegisteredQuery registered_query = 1; | ||
} | ||
|
||
message QueryRegisteredQueryResultRequest { | ||
// Request type for the Query/QueryResult RPC method. | ||
message QueryQueryResultRequest { | ||
// ID of an Interchain Query. | ||
uint64 query_id = 1; | ||
} | ||
|
||
message QueryRegisteredQueryResultResponse { | ||
// Response type for the Query/QueryResult RPC method. | ||
message QueryQueryResultResponse { | ||
// The last successfully submitted result of an Interchain Query. | ||
QueryResult result = 1; | ||
} | ||
|
||
message Transaction { | ||
uint64 id = 1; | ||
uint64 height = 2; | ||
bytes data = 3; | ||
} | ||
|
||
message QueryLastRemoteHeight { | ||
// Request type for the Query/LastRemoteHeight RPC method. | ||
message QueryLastRemoteHeightRequest { | ||
// Connection ID of an IBC connection to a remote chain. Determines the IBC client used in query | ||
// handling. | ||
string connection_id = 1; | ||
} | ||
|
||
// Response type for the Query/LastRemoteHeight RPC method. | ||
message QueryLastRemoteHeightResponse { | ||
// The height of the chain that the IBC client is currently on. | ||
uint64 height = 1; | ||
// The revision of the chain that the IBC client is currently on. | ||
uint64 revision = 2; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the 'update' word means here. How to keep query alive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's a good catch. especially given the ambiguity behind the 'update' term which in the API means the query parameters update. will fix