Skip to content

Commit

Permalink
chore: remove AnySchema (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani authored Oct 19, 2023
1 parent adcb0f7 commit fa07561
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/929-remove-anyschema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove `AnySchema` as `JsonSchema` derive on `Any` now accessible through
`ibc-proto-rs` ([#929](https://github.com/cosmos/ibc-rs/issues/929))
4 changes: 2 additions & 2 deletions crates/ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ borsh = ["dep:borsh", "ibc-proto/borsh"]
serde = ["dep:serde", "dep:serde_derive", "serde_json", "ibc-proto/serde", "ics23/serde"]

# CosmWasm message API generator compatible, should not be inside on chain code
schema = ["dep:schemars", "serde", "std"]
schema = ["dep:schemars", "ibc-proto/json-schema", "serde", "std"]

# This feature grants access to development-time mocking libraries, such as `MockContext` or `MockHeader`.
# Depends on the `testgen` suite for generating Tendermint light blocks.
mocks = ["tendermint-testgen", "parking_lot", "typed-builder", "std"]

[dependencies]
# Proto definitions for all IBC-related interfaces, e.g., connections or channels.
ibc-proto = { version = "0.37.1", default-features = false, features = ["serde"] }
ibc-proto = { version = "0.37.1", default-features = false }
ics23 = { version = "0.11", default-features = false, features = ["host-functions"] }
time = { version = ">=0.3.0, <0.3.30", default-features = false }
serde_derive = { version = "1.0.104", default-features = false, optional = true }
Expand Down
2 changes: 0 additions & 2 deletions crates/ibc/src/core/ics02_client/msgs/create_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ pub(crate) const TYPE_URL: &str = "/ibc.core.client.v1.MsgCreateClient";
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct MsgCreateClient {
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub client_state: Any,
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub consensus_state: Any,
pub signer: Signer,
}
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/core/ics02_client/msgs/misbehaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub struct MsgSubmitMisbehaviour {
/// client unique identifier
pub client_id: ClientId,
/// misbehaviour used for freezing the light client
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub misbehaviour: ProtoAny,
/// signer address
pub signer: Signer,
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/core/ics02_client/msgs/update_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub(crate) const TYPE_URL: &str = "/ibc.core.client.v1.MsgUpdateClient";
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct MsgUpdateClient {
pub client_id: ClientId,
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub client_message: Any,
pub signer: Signer,
}
Expand Down
2 changes: 0 additions & 2 deletions crates/ibc/src/core/ics02_client/msgs/upgrade_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ pub struct MsgUpgradeClient {
// client unique identifier
pub client_id: ClientId,
// Upgraded client state
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub upgraded_client_state: Any,
// Upgraded consensus state, only contains enough information
// to serve as a basis of trust in update logic
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub upgraded_consensus_state: Any,
// proof that old chain committed to new client
pub proof_upgrade_client: CommitmentProofBytes,
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/core/ics03_connection/msgs/conn_open_ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct MsgConnectionOpenAck {
/// ConnectionId that chain B has chosen for it's ConnectionEnd
pub conn_id_on_b: ConnectionId,
/// ClientState of client tracking chain A on chain B
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub client_state_of_a_on_b: Any,
/// proof of ConnectionEnd stored on Chain B during ConnOpenTry
pub proof_conn_end_on_b: CommitmentProofBytes,
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/core/ics03_connection/msgs/conn_open_try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub struct MsgConnectionOpenTry {
/// ClientId on B that the connection is being opened for
pub client_id_on_b: ClientId,
/// ClientState of client tracking chain B on chain A
#[cfg_attr(feature = "schema", schemars(with = "crate::utils::schema::AnySchema"))]
pub client_state_of_b_on_a: Any,
/// ClientId, ConnectionId and prefix of chain A
pub counterparty: Counterparty,
Expand Down
1 change: 0 additions & 1 deletion crates/ibc/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

pub(crate) mod macros;
pub(crate) mod pretty;
pub mod schema;
9 changes: 0 additions & 9 deletions crates/ibc/src/utils/schema.rs

This file was deleted.

0 comments on commit fa07561

Please sign in to comment.