forked from cosmos/ibc-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ibc-query): define request/response domain types (cosmos#1129)
* feat: Add domain definitions for request/response query types in ibc-query * chore: add unclog * feat: define serde & schema features * fix: derive missing schemars * docs: add remarks to README + additional unclog * chore: some clean-ups * chore: organize orders * feat: add TryFrom for response types * use invalid_argument error code * rm redudant lint relaxing * use proof_not_found method * consistent QueryError enum structure * Update ibc-query/README.md Signed-off-by: Rano | Ranadeep <[email protected]> * clippy::match_bool * clippy::use_self * clippy::or_fun_call * use if-let-some over match * clippy::redundant_closure_for_method_calls * Into::into over T::from * clippy::uninlined_format_args * clippy::cast_lossless * clippy::impl_trait_in_params * clippy::shadow_reuse * clippy::pattern_type_mismatch * safe use of u64::MAX * then over then_some * rename IntoProto to IntoResponse --------- Signed-off-by: Rano | Ranadeep <[email protected]> Co-authored-by: Ranadeep Biswas <[email protected]> Co-authored-by: Rano | Ranadeep <[email protected]>
- Loading branch information
1 parent
bef3683
commit d773a23
Showing
30 changed files
with
2,965 additions
and
455 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.changelog/v0.50.0/features/1128-derive-schemars-on-some-ibc-core-structs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- [ibc-core] Add `schemars` derivation on some more IBC core structs like | ||
`Status`, `ConnectionEnd` and `ChannelEnd` | ||
([\#1129](https://github.com/cosmos/ibc-rs/pull/1129)) |
3 changes: 3 additions & 0 deletions
3
.changelog/v0.50.0/features/1128-domain-request-response-query-types.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- [ibc-query] Add domain definitions for request/response query types and their | ||
corresponding conversions to/from protos | ||
([\#1128](https://github.com/cosmos/ibc-rs/issues/1128)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
# IBC Query | ||
|
||
This crate provides a set of utility traits and implementations for querying the | ||
state of an [`ibc-rs`](https://github.com/cosmos/ibc-rs) enabled chain. | ||
## Overview | ||
|
||
Implementations contain essential IBC query methods and gRPC query services for | ||
each of the IBC core client, connection, and channel layers. | ||
This crate offers a comprehensive set of utility types, traits, and functions | ||
designed for integrating either a gRPC query server or implementing RPC methods | ||
in hosts. It specifically facilitates querying the state of the IBC core client, | ||
connection, and channel layers of a chain enabled with `ibc-rs`. | ||
|
||
## Features | ||
|
||
- Provides essential utility request/response domain types and their conversions | ||
to the proto types for efficient integration. | ||
- Provides convenient query objects with pre-implemented gRPC query services. | ||
- Offers convenient objects on which query service has been implemented and | ||
- Includes convenient `QueryContext` and `ProvableContext` traits that extend | ||
the capabilities of an implemented IBC module, enabling the retrieval of state | ||
from the chain. | ||
- Derives `serde` and `schema` for all the domain types enabling easy | ||
(de)serialization. This feature is particularly beneficial for JSON RPC | ||
implementations. | ||
|
||
## Remarks | ||
|
||
- At present, the Protobuf representation of request types does not include | ||
support for querying at a specific height. Consequently, the current state of | ||
`ibc-query` allows conversion from protos as a compatible direction but does | ||
not support conversion into protos due to the absence of the `query_height` | ||
fields. | ||
|
||
- Currently `ibc-query` does not support pagination. If pagination is a | ||
requirement for your project, please open an issue and provide details about | ||
your usage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
mod query; | ||
mod service; | ||
mod types; | ||
|
||
pub use query::*; | ||
pub use service::*; | ||
pub use types::*; |
Oops, something went wrong.