diff --git a/.changelog/unreleased/improvements/938-add-from.md b/.changelog/unreleased/improvements/938-add-from.md deleted file mode 100644 index 439e48b6c..000000000 --- a/.changelog/unreleased/improvements/938-add-from.md +++ /dev/null @@ -1,2 +0,0 @@ -- Add From implementation for ICS26 enum types to make it simpler - to construct the types. ([\#938](https://github.com/cosmos/ibc-rs/pull/938)) diff --git a/.changelog/unreleased/improvements/939-less-alloc.md b/.changelog/unreleased/improvements/939-less-alloc.md deleted file mode 100644 index b7ed133f9..000000000 --- a/.changelog/unreleased/improvements/939-less-alloc.md +++ /dev/null @@ -1,2 +0,0 @@ -- Reduce vector allocations in Commitment computation. - ([\#939](https://github.com/cosmos/ibc-rs/pull/939)) diff --git a/.changelog/unreleased/breaking-changes/716-move-transfer-app-and-tendermint-client-to-separate-crate.md b/.changelog/v0.48.0/breaking-changes/716-move-transfer-app-and-tendermint-client-to-separate-crate.md similarity index 100% rename from .changelog/unreleased/breaking-changes/716-move-transfer-app-and-tendermint-client-to-separate-crate.md rename to .changelog/v0.48.0/breaking-changes/716-move-transfer-app-and-tendermint-client-to-separate-crate.md diff --git a/.changelog/unreleased/breaking-changes/949-bump-ibc-proto-rs-to-v0380.md b/.changelog/v0.48.0/breaking-changes/949-bump-ibc-proto-rs-to-v0380.md similarity index 100% rename from .changelog/unreleased/breaking-changes/949-bump-ibc-proto-rs-to-v0380.md rename to .changelog/v0.48.0/breaking-changes/949-bump-ibc-proto-rs-to-v0380.md diff --git a/.changelog/unreleased/breaking-changes/956-bump-MSRV-to-1-64.md b/.changelog/v0.48.0/breaking-changes/956-bump-MSRV-to-1-64.md similarity index 100% rename from .changelog/unreleased/breaking-changes/956-bump-MSRV-to-1-64.md rename to .changelog/v0.48.0/breaking-changes/956-bump-MSRV-to-1-64.md diff --git a/.changelog/unreleased/breaking-changes/965-restructure-ibc.md b/.changelog/v0.48.0/breaking-changes/965-restructure-ibc.md similarity index 100% rename from .changelog/unreleased/breaking-changes/965-restructure-ibc.md rename to .changelog/v0.48.0/breaking-changes/965-restructure-ibc.md diff --git a/.changelog/unreleased/features/954-restructure-mock-module-into-crate.md b/.changelog/v0.48.0/features/954-restructure-mock-module-into-crate.md similarity index 100% rename from .changelog/unreleased/features/954-restructure-mock-module-into-crate.md rename to .changelog/v0.48.0/features/954-restructure-mock-module-into-crate.md diff --git a/.changelog/unreleased/features/974-id-into-string.md b/.changelog/v0.48.0/features/974-id-into-string.md similarity index 100% rename from .changelog/unreleased/features/974-id-into-string.md rename to .changelog/v0.48.0/features/974-id-into-string.md diff --git a/.changelog/unreleased/improvements/697-re-export-essential-proto-types.md b/.changelog/v0.48.0/improvements/697-re-export-essential-proto-types.md similarity index 100% rename from .changelog/unreleased/improvements/697-re-export-essential-proto-types.md rename to .changelog/v0.48.0/improvements/697-re-export-essential-proto-types.md diff --git a/.changelog/unreleased/improvements/771-use-mod-rs-places-having-submodules.md b/.changelog/v0.48.0/improvements/771-use-mod-rs-places-having-submodules.md similarity index 100% rename from .changelog/unreleased/improvements/771-use-mod-rs-places-having-submodules.md rename to .changelog/v0.48.0/improvements/771-use-mod-rs-places-having-submodules.md diff --git a/.changelog/v0.48.0/improvements/938-add-from.md b/.changelog/v0.48.0/improvements/938-add-from.md new file mode 100644 index 000000000..6c8b48a9c --- /dev/null +++ b/.changelog/v0.48.0/improvements/938-add-from.md @@ -0,0 +1,2 @@ +- Add From implementation for ICS26 enum types to make it simpler to construct + the types. ([\#938](https://github.com/cosmos/ibc-rs/pull/938)) diff --git a/.changelog/v0.48.0/improvements/939-less-alloc.md b/.changelog/v0.48.0/improvements/939-less-alloc.md new file mode 100644 index 000000000..f468106a7 --- /dev/null +++ b/.changelog/v0.48.0/improvements/939-less-alloc.md @@ -0,0 +1,2 @@ +- Reduce vector allocations in Commitment computation. + ([\#939](https://github.com/cosmos/ibc-rs/pull/939)) diff --git a/.changelog/unreleased/bug-fixes/940-chain-identifiers-without-revision-number-pattern.md b/.changelog/v0.48.0/improvements/940-chain-identifiers-without-revision-number-pattern.md similarity index 100% rename from .changelog/unreleased/bug-fixes/940-chain-identifiers-without-revision-number-pattern.md rename to .changelog/v0.48.0/improvements/940-chain-identifiers-without-revision-number-pattern.md diff --git a/.changelog/unreleased/bug-fixes/943-optimize-validate-prefix-length.md b/.changelog/v0.48.0/improvements/943-optimize-validate-prefix-length.md similarity index 100% rename from .changelog/unreleased/bug-fixes/943-optimize-validate-prefix-length.md rename to .changelog/v0.48.0/improvements/943-optimize-validate-prefix-length.md diff --git a/.changelog/unreleased/improvements/948-remove-redundant-test-log-deps.md b/.changelog/v0.48.0/improvements/948-remove-redundant-test-log-deps.md similarity index 100% rename from .changelog/unreleased/improvements/948-remove-redundant-test-log-deps.md rename to .changelog/v0.48.0/improvements/948-remove-redundant-test-log-deps.md diff --git a/.changelog/unreleased/improvements/951-remove-default-portid.md b/.changelog/v0.48.0/improvements/951-remove-default-portid.md similarity index 100% rename from .changelog/unreleased/improvements/951-remove-default-portid.md rename to .changelog/v0.48.0/improvements/951-remove-default-portid.md diff --git a/.changelog/unreleased/improvements/952-expose-channel-message-types.md b/.changelog/v0.48.0/improvements/952-expose-channel-message-types.md similarity index 100% rename from .changelog/unreleased/improvements/952-expose-channel-message-types.md rename to .changelog/v0.48.0/improvements/952-expose-channel-message-types.md diff --git a/.changelog/unreleased/improvements/955-use-workspace-dependencies.md b/.changelog/v0.48.0/improvements/955-use-workspace-dependencies.md similarity index 100% rename from .changelog/unreleased/improvements/955-use-workspace-dependencies.md rename to .changelog/v0.48.0/improvements/955-use-workspace-dependencies.md diff --git a/.changelog/unreleased/breaking-changes/961-refactor-identifier-validation.md b/.changelog/v0.48.0/improvements/961-refactor-identifier-validation.md similarity index 100% rename from .changelog/unreleased/breaking-changes/961-refactor-identifier-validation.md rename to .changelog/v0.48.0/improvements/961-refactor-identifier-validation.md diff --git a/.changelog/unreleased/improvements/970-reduce-heap-allocation.md b/.changelog/v0.48.0/improvements/970-reduce-heap-allocation.md similarity index 100% rename from .changelog/unreleased/improvements/970-reduce-heap-allocation.md rename to .changelog/v0.48.0/improvements/970-reduce-heap-allocation.md diff --git a/.changelog/unreleased/improvements/976-expose-different-types-for-public-access.md b/.changelog/v0.48.0/improvements/976-expose-different-types-for-public-access.md similarity index 100% rename from .changelog/unreleased/improvements/976-expose-different-types-for-public-access.md rename to .changelog/v0.48.0/improvements/976-expose-different-types-for-public-access.md diff --git a/.changelog/v0.48.0/summary.md b/.changelog/v0.48.0/summary.md new file mode 100644 index 000000000..86454e131 --- /dev/null +++ b/.changelog/v0.48.0/summary.md @@ -0,0 +1,20 @@ +In this release, we've undertaken a comprehensive overhaul of the **`ibc-rs`** +repository, resulting in a strategic reorganization of the codebase. This +restructuring dissects the implementation of each IBC specification, +categorizing and situating them within relevant libraries. The primary objective +is to elevate `ibc-rs` practicality and enhance user flexibility by providing a +more modular and composable experience. + +Users now have the flexibility to choose from a spectrum of dependencies. They +can opt to utilize the entire suite of meta-crates, such as `ibc`, `ibc-core`, +`ibc-clients`, or `ibc-apps`. Alternatively, they can exercise fine-grained +control by selectively importing specific crates. This can involve bringing in +an entire implemented IBC sub-module, like the `ibc-core-client` crate, or +importing only the associated data structures of a module, such as the +`ibc-core-client-types` crate. + +Furthermore, this release introduces optimizations centered around construction +and validation of ICS-24 host identifiers, aiming to curtail some heap +allocations, beneficial for resource-constrained hosts. + +There are no consensus-breaking changes. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b78e0da0..005143b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,88 @@ # CHANGELOG +## v0.48.0 + +*November 22, 2023* + +In this release, we've undertaken a comprehensive overhaul of the **`ibc-rs`** +repository, resulting in a strategic reorganization of the codebase. This +restructuring dissects the implementation of each IBC specification, +categorizing and situating them within relevant libraries. The primary objective +is to elevate `ibc-rs` practicality and enhance user flexibility by providing a +more modular and composable experience. + +Users now have the flexibility to choose from a spectrum of dependencies. They +can opt to utilize the entire suite of meta-crates, such as `ibc`, `ibc-core`, +`ibc-clients`, or `ibc-apps`. Alternatively, they can exercise fine-grained +control by selectively importing specific crates. This can involve bringing in +an entire implemented IBC sub-module, like the `ibc-core-client` crate, or +importing only the associated data structures of a module, such as the +`ibc-core-client-types` crate. + +Furthermore, this release introduces optimizations centered around construction +and validation of ICS-24 host identifiers, aiming to curtail some heap +allocations, beneficial for resource-constrained hosts. + +There are no consensus-breaking changes. + +### BREAKING CHANGES + +- Move ICS-20 and ICS-27 implementations to the respective part of `ibc-apps` + and `ibc-clients` crates, as part of the `ibc` crate restructuring effort. + ([\#716](https://github.com/cosmos/ibc-rs/issues/716)) +- Bump `ibc-proto-rs` to v0.38.0 + ([\#949](https://github.com/cosmos/ibc-rs/issues/949)) +- Bump minimum supported Rust version to 1.64 + ([\#956](https://github.com/cosmos/ibc-rs/issues/956)) +- Restructure `ibc-rs` codebase by organizing it into smaller self-contained, + modular libraries, enabling the selective import of specific domain types or + module implementations, either individually or in combination, providing + enhanced flexibility and ease of use. + ([\#965](https://github.com/cosmos/ibc-rs/issues/965)) + +### FEATURES + +- Restructure the mock module implementation and separate its codebase into a + new crate named `ibc-testkit` + ([\#954](https://github.com/cosmos/ibc-rs/issues/953)) +- Provide `Into` for all identifiers types. + ([\#974](https://github.com/cosmos/ibc-rs/pull/974)) + +### IMPROVEMENTS + +- Re-export essential proto types from the underlying `ibc-*-*-types` crates, + removing the necessity for a direct dependency on `ibc-proto` in projects + integrating `ibc-rs` ([\#697](https://github.com/cosmos/ibc-rs/issues/697)) +- Rename `{submodule}.rs` with corresponding `{submodule}` directory to + `{submodule}/mod.rs` ([\#771](https://github.com/cosmos/ibc-rs/issues/771)) +- Add From implementation for ICS26 enum types to make it simpler to construct + the types. ([\#938](https://github.com/cosmos/ibc-rs/pull/938)) +- Reduce vector allocations in Commitment computation. + ([\#939](https://github.com/cosmos/ibc-rs/pull/939)) +- Support chain identifiers without the `{chain_name}-{revision_number}` pattern + of Tendermint chains. ([\#940](https://github.com/cosmos/ibc-rs/issues/940)). +- Remove redundant `String` creation in `validate_prefix_length` + ([\#943](https://github.com/cosmos/ibc-rs/issues/943)). +- Remove redundant `#[test_log::test]` attributes in test modules + ([\#948](https://github.com/cosmos/ibc-rs/issues/948)) +- Remove the default value and implementation for `PortId` + ([\#951](https://github.com/cosmos/ibc-rs/issues/951)) +- Expose domain message types under the `ics04_channel` as public + ([\#952](https://github.com/cosmos/ibc-rs/issues/952)) +- Enhance dependency management with workspace inheritance + ([\#955](https://github.com/cosmos/ibc-rs/issues/955)) +- Simplify and refactor ICS-24 identifier validation logic. + ([\#961](https://github.com/cosmos/ibc-rs/issues/961)) +- Reduce heap allocation by using `str` instead of `String` places we convert + domain event attributes to the ABCI event attributes + ([\#970](https://github.com/cosmos/ibc-rs/issues/970)) +- Expose various fields, types and functions in `ibc-rs` as public including: + - `validate` and `execute` handler functions for all the IBC message types. + - `TYPE_URL` constants. + - Any private fields within the domain message types. + - Any private fields within the Tendermint `ClientState` and `ConsensusState` + ([\#976](https://github.com/cosmos/ibc-rs/issues/976)) + ## v0.47.0 *October 19, 2023* diff --git a/Cargo.toml b/Cargo.toml index b64e02926..4f3384533 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ exclude = [ ] [workspace.package] -version = "0.47.0" +version = "0.48.0" license = "Apache-2.0" edition = "2021" rust-version = "1.64" @@ -61,34 +61,34 @@ subtle-encoding = { version = "0.5", default-features = false } time = { version = ">=0.3.0, <0.3.31", default-features = false } # ibc dependencies -ibc = { version = "0.47.0", path = "./ibc", default-features = false } -ibc-core = { version = "0.47.0", path = "./ibc-core", default-features = false } -ibc-clients = { version = "0.47.0", path = "./ibc-clients", default-features = false } -ibc-apps = { version = "0.47.0", path = "./ibc-apps", default-features = false } -ibc-primitives = { version = "0.47.0", path = "./ibc-primitives", default-features = false } -ibc-testkit = { version = "0.47.0", path = "./ibc-testkit" } -ibc-derive = { version = "0.3.0", path = "./ibc-derive" } +ibc = { version = "0.48.0", path = "./ibc", default-features = false } +ibc-core = { version = "0.48.0", path = "./ibc-core", default-features = false } +ibc-clients = { version = "0.48.0", path = "./ibc-clients", default-features = false } +ibc-apps = { version = "0.48.0", path = "./ibc-apps", default-features = false } +ibc-primitives = { version = "0.48.0", path = "./ibc-primitives", default-features = false } +ibc-testkit = { version = "0.48.0", path = "./ibc-testkit" } +ibc-derive = { version = "0.4.0", path = "./ibc-derive" } -ibc-core-client = { version = "0.47.0", path = "./ibc-core/ics02-client", default-features = false } -ibc-core-connection = { version = "0.47.0", path = "./ibc-core/ics03-connection", default-features = false } -ibc-core-channel = { version = "0.47.0", path = "./ibc-core/ics04-channel", default-features = false } -ibc-core-host = { version = "0.47.0", path = "./ibc-core/ics24-host", default-features = false } -ibc-core-handler = { version = "0.47.0", path = "./ibc-core/ics25-handler", default-features = false } -ibc-core-router = { version = "0.47.0", path = "./ibc-core/ics26-routing", default-features = false } -ibc-client-tendermint = { version = "0.47.0", path = "./ibc-clients/ics07-tendermint", default-features = false } -ibc-app-transfer = { version = "0.47.0", path = "./ibc-apps/ics20-transfer", default-features = false } +ibc-core-client = { version = "0.48.0", path = "./ibc-core/ics02-client", default-features = false } +ibc-core-connection = { version = "0.48.0", path = "./ibc-core/ics03-connection", default-features = false } +ibc-core-channel = { version = "0.48.0", path = "./ibc-core/ics04-channel", default-features = false } +ibc-core-host = { version = "0.48.0", path = "./ibc-core/ics24-host", default-features = false } +ibc-core-handler = { version = "0.48.0", path = "./ibc-core/ics25-handler", default-features = false } +ibc-core-router = { version = "0.48.0", path = "./ibc-core/ics26-routing", default-features = false } +ibc-client-tendermint = { version = "0.48.0", path = "./ibc-clients/ics07-tendermint", default-features = false } +ibc-app-transfer = { version = "0.48.0", path = "./ibc-apps/ics20-transfer", default-features = false } -ibc-core-client-context = { version = "0.47.0", path = "./ibc-core/ics02-client/context", default-features = false } -ibc-core-client-types = { version = "0.47.0", path = "./ibc-core/ics02-client/types", default-features = false } -ibc-core-channel-types = { version = "0.47.0", path = "./ibc-core/ics04-channel/types", default-features = false } -ibc-core-connection-types = { version = "0.47.0", path = "./ibc-core/ics03-connection/types", default-features = false } -ibc-core-commitment-types = { version = "0.47.0", path = "./ibc-core/ics23-commitment/types", default-features = false } -ibc-core-host-cosmos = { version = "0.47.0", path = "./ibc-core/ics24-host/cosmos", default-features = false } -ibc-core-host-types = { version = "0.47.0", path = "./ibc-core/ics24-host/types", default-features = false } -ibc-core-handler-types = { version = "0.47.0", path = "./ibc-core/ics25-handler/types", default-features = false } -ibc-core-router-types = { version = "0.47.0", path = "./ibc-core/ics26-routing/types", default-features = false } -ibc-client-tendermint-types = { version = "0.47.0", path = "./ibc-clients/ics07-tendermint/types", default-features = false } -ibc-app-transfer-types = { version = "0.47.0", path = "./ibc-apps/ics20-transfer/types", default-features = false } +ibc-core-client-context = { version = "0.48.0", path = "./ibc-core/ics02-client/context", default-features = false } +ibc-core-client-types = { version = "0.48.0", path = "./ibc-core/ics02-client/types", default-features = false } +ibc-core-channel-types = { version = "0.48.0", path = "./ibc-core/ics04-channel/types", default-features = false } +ibc-core-connection-types = { version = "0.48.0", path = "./ibc-core/ics03-connection/types", default-features = false } +ibc-core-commitment-types = { version = "0.48.0", path = "./ibc-core/ics23-commitment/types", default-features = false } +ibc-core-host-cosmos = { version = "0.48.0", path = "./ibc-core/ics24-host/cosmos", default-features = false } +ibc-core-host-types = { version = "0.48.0", path = "./ibc-core/ics24-host/types", default-features = false } +ibc-core-handler-types = { version = "0.48.0", path = "./ibc-core/ics25-handler/types", default-features = false } +ibc-core-router-types = { version = "0.48.0", path = "./ibc-core/ics26-routing/types", default-features = false } +ibc-client-tendermint-types = { version = "0.48.0", path = "./ibc-clients/ics07-tendermint/types", default-features = false } +ibc-app-transfer-types = { version = "0.48.0", path = "./ibc-apps/ics20-transfer/types", default-features = false } ibc-proto = { version = "0.38.0", default-features = false } ics23 = { version = "0.11", default-features = false } diff --git a/ci/cw-check/Cargo.lock b/ci/cw-check/Cargo.lock index d2c236984..0f3cc0f4f 100644 --- a/ci/cw-check/Cargo.lock +++ b/ci/cw-check/Cargo.lock @@ -613,7 +613,7 @@ dependencies = [ [[package]] name = "ibc" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-apps", "ibc-clients", @@ -625,7 +625,7 @@ dependencies = [ [[package]] name = "ibc-app-transfer" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -649,14 +649,14 @@ dependencies = [ [[package]] name = "ibc-apps" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-app-transfer", ] [[package]] name = "ibc-client-tendermint" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-client-tendermint-types", "ibc-core-client", @@ -672,7 +672,7 @@ dependencies = [ [[package]] name = "ibc-client-tendermint-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "bytes", "displaydoc", @@ -694,14 +694,14 @@ dependencies = [ [[package]] name = "ibc-clients" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-client-tendermint", ] [[package]] name = "ibc-core" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -715,7 +715,7 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -730,7 +730,7 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -751,7 +751,7 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -764,7 +764,7 @@ dependencies = [ [[package]] name = "ibc-core-client-context" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -781,7 +781,7 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -799,7 +799,7 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -815,7 +815,7 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -827,7 +827,7 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -846,7 +846,7 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -860,7 +860,7 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -882,7 +882,7 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -900,7 +900,7 @@ dependencies = [ [[package]] name = "ibc-core-host-cosmos" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -925,7 +925,7 @@ dependencies = [ [[package]] name = "ibc-core-host-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "ibc-core-router" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -951,7 +951,7 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -969,7 +969,7 @@ dependencies = [ [[package]] name = "ibc-derive" -version = "0.3.0" +version = "0.4.0" dependencies = [ "darling", "proc-macro2", @@ -979,7 +979,7 @@ dependencies = [ [[package]] name = "ibc-primitives" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", diff --git a/ci/no-std-check/Cargo.lock b/ci/no-std-check/Cargo.lock index e902341ed..08ed7b9de 100644 --- a/ci/no-std-check/Cargo.lock +++ b/ci/no-std-check/Cargo.lock @@ -1213,41 +1213,28 @@ dependencies = [ [[package]] name = "ibc" -version = "0.47.0" +version = "0.48.0" dependencies = [ - "bytes", - "derive_more", - "displaydoc", "ibc-apps", "ibc-clients", "ibc-core", + "ibc-core-host-cosmos", "ibc-derive", "ibc-primitives", - "ibc-proto", - "prost", - "serde", - "serde-json-wasm", - "sha2 0.10.8", - "subtle-encoding", - "tendermint", - "tendermint-light-client-verifier", - "tendermint-proto", - "time", ] [[package]] name = "ibc-app-transfer" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-app-transfer-types", "ibc-core", "serde-json-wasm", - "sha2 0.10.8", ] [[package]] name = "ibc-app-transfer-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1260,14 +1247,14 @@ dependencies = [ [[package]] name = "ibc-apps" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-app-transfer", ] [[package]] name = "ibc-client-tendermint" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-client-tendermint-types", "ibc-core-client", @@ -1276,12 +1263,14 @@ dependencies = [ "ibc-core-host", "ibc-primitives", "prost", + "serde", + "tendermint", "tendermint-light-client-verifier", ] [[package]] name = "ibc-client-tendermint-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "bytes", "displaydoc", @@ -1293,6 +1282,7 @@ dependencies = [ "ibc-primitives", "ibc-proto", "prost", + "serde", "tendermint", "tendermint-light-client-verifier", "tendermint-proto", @@ -1300,14 +1290,14 @@ dependencies = [ [[package]] name = "ibc-clients" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-client-tendermint", ] [[package]] name = "ibc-core" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1321,7 +1311,7 @@ dependencies = [ [[package]] name = "ibc-core-channel" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -1336,7 +1326,7 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1355,21 +1345,20 @@ dependencies = [ [[package]] name = "ibc-core-client" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", "ibc-core-commitment-types", "ibc-core-handler-types", "ibc-core-host", - "ibc-derive", "ibc-primitives", "prost", ] [[package]] name = "ibc-core-client-context" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1386,7 +1375,7 @@ dependencies = [ [[package]] name = "ibc-core-client-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1402,7 +1391,7 @@ dependencies = [ [[package]] name = "ibc-core-commitment-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1416,7 +1405,7 @@ dependencies = [ [[package]] name = "ibc-core-connection" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -1428,7 +1417,7 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1445,7 +1434,7 @@ dependencies = [ [[package]] name = "ibc-core-handler" -version = "0.47.0" +version = "0.48.0" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -1459,7 +1448,7 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1479,7 +1468,7 @@ dependencies = [ [[package]] name = "ibc-core-host" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1495,9 +1484,32 @@ dependencies = [ "subtle-encoding", ] +[[package]] +name = "ibc-core-host-cosmos" +version = "0.48.0" +dependencies = [ + "derive_more", + "displaydoc", + "ibc-app-transfer-types", + "ibc-client-tendermint", + "ibc-core-client-context", + "ibc-core-client-types", + "ibc-core-commitment-types", + "ibc-core-connection-types", + "ibc-core-handler-types", + "ibc-core-host-types", + "ibc-primitives", + "ibc-proto", + "prost", + "serde", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", +] + [[package]] name = "ibc-core-host-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1507,7 +1519,7 @@ dependencies = [ [[package]] name = "ibc-core-router" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1521,7 +1533,7 @@ dependencies = [ [[package]] name = "ibc-core-router-types" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", @@ -1537,7 +1549,7 @@ dependencies = [ [[package]] name = "ibc-derive" -version = "0.3.0" +version = "0.4.0" dependencies = [ "darling", "proc-macro2", @@ -1547,7 +1559,7 @@ dependencies = [ [[package]] name = "ibc-primitives" -version = "0.47.0" +version = "0.48.0" dependencies = [ "derive_more", "displaydoc", diff --git a/ibc-clients/ics07-tendermint/Cargo.toml b/ibc-clients/ics07-tendermint/Cargo.toml index f59ee647b..22a46ae28 100644 --- a/ibc-clients/ics07-tendermint/Cargo.toml +++ b/ibc-clients/ics07-tendermint/Cargo.toml @@ -37,6 +37,7 @@ tendermint-light-client-verifier = { workspace = true, features = ["rust-crypto" default = ["std"] std = [ "prost/std", + "serde/std", "ibc-client-tendermint-types/std", "ibc-core-client/std", "ibc-core-commitment-types/std", @@ -60,6 +61,8 @@ schema = [ "ibc-core-host/schema", "ibc-core-handler-types/schema", "ibc-primitives/schema", + "serde", + "std" ] borsh = [ "ibc-client-tendermint-types/borsh", diff --git a/ibc-core/Cargo.toml b/ibc-core/Cargo.toml index f8853a76f..896c16987 100644 --- a/ibc-core/Cargo.toml +++ b/ibc-core/Cargo.toml @@ -63,6 +63,8 @@ schema = [ "ibc-core-host/schema", "ibc-core-router/schema", "ibc-core-handler/schema", + "serde", + "std" ] parity-scale-codec = [ "ibc-core-client/parity-scale-codec", diff --git a/ibc-core/ics02-client/context/Cargo.toml b/ibc-core/ics02-client/context/Cargo.toml index 06a23157b..5a5f1d467 100644 --- a/ibc-core/ics02-client/context/Cargo.toml +++ b/ibc-core/ics02-client/context/Cargo.toml @@ -7,7 +7,7 @@ rust-version = { workspace = true } license = { workspace = true } repository = { workspace = true } keywords = ["blockchain", "cosmos", "ibc"] -readme = "./../README.md" +readme = "./../../README.md" description = """ Maintaind by `ibc-rs`, contains essential APIs to interface with the host chain's store, enabling smooth client state transitions. Additionally, provides necessary traits for diff --git a/ibc-core/ics04-channel/Cargo.toml b/ibc-core/ics04-channel/Cargo.toml index f49c7175b..ba955ef67 100644 --- a/ibc-core/ics04-channel/Cargo.toml +++ b/ibc-core/ics04-channel/Cargo.toml @@ -33,6 +33,7 @@ ibc-primitives = { workspace = true } [features] default = ["std"] std = [ + "prost/std", "ibc-core-client/std", "ibc-core-connection/std", "ibc-core-channel-types/std", @@ -61,6 +62,8 @@ schema = [ "ibc-core-handler-types/schema", "ibc-core-router/schema", "ibc-primitives/schema", + "serde", + "std" ] borsh = [ "ibc-core-client/borsh", diff --git a/ibc-core/ics04-channel/types/Cargo.toml b/ibc-core/ics04-channel/types/Cargo.toml index b19aa13df..ab06daea0 100644 --- a/ibc-core/ics04-channel/types/Cargo.toml +++ b/ibc-core/ics04-channel/types/Cargo.toml @@ -79,6 +79,8 @@ schema = [ "ibc-core-commitment-types/schema", "ibc-primitives/schema", "ibc-proto/json-schema", + "serde", + "std" ] borsh = [ "dep:borsh", diff --git a/ibc-core/ics24-host/Cargo.toml b/ibc-core/ics24-host/Cargo.toml index dc28e951f..664d3da23 100644 --- a/ibc-core/ics24-host/Cargo.toml +++ b/ibc-core/ics24-host/Cargo.toml @@ -40,6 +40,9 @@ rstest = { workspace = true } [features] default = ["std"] std = [ + "displaydoc/std", + "prost/std", + "subtle-encoding/std", "ibc-core-client-types/std", "ibc-core-client-context/std", "ibc-core-connection-types/std", diff --git a/ibc-core/ics24-host/cosmos/Cargo.toml b/ibc-core/ics24-host/cosmos/Cargo.toml index 51a9ef519..ee57aab62 100644 --- a/ibc-core/ics24-host/cosmos/Cargo.toml +++ b/ibc-core/ics24-host/cosmos/Cargo.toml @@ -7,7 +7,7 @@ rust-version = { workspace = true } license = { workspace = true } repository = { workspace = true } keywords = ["blockchain", "cosmos", "ibc", "tendermint"] -readme = "./../README.md" +readme = "./../../README.md" description = """ Maintained by `ibc-rs`, contains Cosmos-specific helper traits and implementations to facilitate IBC integration, ensuring proper interaction with modules/components @@ -56,6 +56,7 @@ std = [ "displaydoc/std", "prost/std", "serde/std", + "sha2/std", "subtle-encoding/std", "ibc-core-client-types/std", "ibc-core-client-context/std", @@ -88,6 +89,8 @@ schema = [ "ibc-core-handler-types/schema", "ibc-primitives/schema", "ibc-proto/json-schema", + "serde", + "std" ] borsh = [ "dep:borsh", diff --git a/ibc-core/ics24-host/cosmos/src/utils.rs b/ibc-core/ics24-host/cosmos/src/utils.rs index 7ecf41975..613a48f36 100644 --- a/ibc-core/ics24-host/cosmos/src/utils.rs +++ b/ibc-core/ics24-host/cosmos/src/utils.rs @@ -1,6 +1,6 @@ use ibc_app_transfer_types::VERSION; use ibc_core_host_types::identifiers::{ChannelId, PortId}; -pub use ibc_primitives::prelude::*; +use ibc_primitives::prelude::*; use sha2::{Digest, Sha256}; /// Helper function to generate an escrow address for a given port and channel diff --git a/ibc-core/ics25-handler/Cargo.toml b/ibc-core/ics25-handler/Cargo.toml index ea8b1aea8..1e158e402 100644 --- a/ibc-core/ics25-handler/Cargo.toml +++ b/ibc-core/ics25-handler/Cargo.toml @@ -64,6 +64,8 @@ schema = [ "ibc-core-host/schema", "ibc-core-router/schema", "ibc-core-handler-types/schema", + "serde", + "std" ] parity-scale-codec = [ "ibc-core-client/parity-scale-codec", diff --git a/ibc-core/ics25-handler/src/lib.rs b/ibc-core/ics25-handler/src/lib.rs index a9505d9aa..203c98c2f 100644 --- a/ibc-core/ics25-handler/src/lib.rs +++ b/ibc-core/ics25-handler/src/lib.rs @@ -2,6 +2,13 @@ //! entry points are responsible for processing incoming IBC messages, //! performing validation, and execution logics by invoking the appropriate //! module handler. +//! +//! When processing a given message `M`, if any method in this library returns +//! an error, the runtime is expected to rollback all state modifications made +//! to the context (e.g. [`ExecutionContext`](ibc_core_host::ExecutionContext)) +//! while processing `M`. If the transaction containing `M` consists of multiple +//! messages, then typically the state modifications from all messages is +//! expected to be rolled back as well. #![no_std] #![forbid(unsafe_code)] #![cfg_attr(not(test), deny(clippy::unwrap_used))] diff --git a/ibc-core/ics26-routing/Cargo.toml b/ibc-core/ics26-routing/Cargo.toml index 6fedc2fc9..91e75f476 100644 --- a/ibc-core/ics26-routing/Cargo.toml +++ b/ibc-core/ics26-routing/Cargo.toml @@ -57,6 +57,8 @@ schema = [ "ibc-core-host-types/schema", "ibc-core-router-types/schema", "ibc-primitives/schema", + "serde", + "std" ] parity-scale-codec = [ "ibc-core-channel-types/parity-scale-codec", diff --git a/ibc-data-types/README.md b/ibc-data-types/README.md index 0beb79852..90671b8cb 100644 --- a/ibc-data-types/README.md +++ b/ibc-data-types/README.md @@ -19,25 +19,25 @@ providing a clear and modular path for easy navigation and usage: ### Core |
Specification
| Crate | -| ------------------------------------------- | ------ | -| ICS-02: Client Semantics | [ibc-core-client-types](./../ibc-core/ics02-client/types) | -| ICS-03: Connection Semantics | [ibc-core-connection-types](./../ibc-core/ics03-connection/types) | -| ICS-04: Channel and Packet Semantics | [ibc-core-channel-types](./../ibc-core/ics04-channel/types) | -| ICS-24: Host Requirements | [ibc-core-host-types](./../ibc-core/ics24-host/types) | -| ICS-25: Handler Interface | [ibc-core-handler-types](./../ibc-core/ics25-handler/types) | -| ICS-26: Routing Module | [ibc-core-routing-types](./../ibc-core/ics26-routing/types) | +| -------------------------------------------- | ------ | +| ICS-02: Client Semantics | [ibc-core-client-types](./../ibc-core/ics02-client/types) | +| ICS-03: Connection Semantics | [ibc-core-connection-types](./../ibc-core/ics03-connection/types) | +| ICS-04: Channel and Packet Semantics | [ibc-core-channel-types](./../ibc-core/ics04-channel/types) | +| ICS-24: Host Requirements | [ibc-core-host-types](./../ibc-core/ics24-host/types) | +| ICS-25: Handler Interface | [ibc-core-handler-types](./../ibc-core/ics25-handler/types) | +| ICS-26: Routing Module | [ibc-core-routing-types](./../ibc-core/ics26-routing/types) | ### Clients |
Specification
| Crate | -| ------------------------------------------- | ------ | -| ICS-07: Tendermint Client | [ibc-client-tendermint-types](./../ibc-clients/ics07-tendermint/types) | +| -------------------------------------------- | ------ | +| ICS-07: Tendermint Client | [ibc-client-tendermint-types](./../ibc-clients/ics07-tendermint/types) | ### Apps |
Specification
| Crate | -| ------------------------------------------- | ------ | -| ICS-20: Fungible Token Transfer | [ibc-app-transfer-types](./../ibc-apps/ics20-transfer/types) | +| -------------------------------------------- | ------ | +| ICS-20: Fungible Token Transfer | [ibc-app-transfer-types](./../ibc-apps/ics20-transfer/types) | ## Contributing diff --git a/ibc-derive/Cargo.toml b/ibc-derive/Cargo.toml index 532f6f783..8d1355c08 100644 --- a/ibc-derive/Cargo.toml +++ b/ibc-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-derive" -version = "0.3.0" +version = "0.4.0" license = { workspace = true } repository = { workspace = true } edition = { workspace = true } diff --git a/ibc-primitives/README.md b/ibc-primitives/README.md index 3b4cc4ec8..db295a8fd 100644 --- a/ibc-primitives/README.md +++ b/ibc-primitives/README.md @@ -1,4 +1,4 @@ -# `ibc-primitives` +# IBC Primitives This library furnishes essential types, traits, and utilities universally utilized in the implementation of diverse IBC modules, encompassing core functionalities, diff --git a/ibc/src/lib.rs b/ibc/src/lib.rs index 1e9eaab80..02887a4e6 100644 --- a/ibc/src/lib.rs +++ b/ibc/src/lib.rs @@ -30,14 +30,6 @@ //! This is the part of the protocol that abstracts away the core protocol and //! focuses solely on business logic. //! -//! When processing a given message `M`, if any method in this library returns -//! an error, the runtime is expected to rollback all state modifications made -//! to the context (e.g. -//! [`ExecutionContext`](crate::core::host::ExecutionContext)) while processing -//! `M`. If a transaction on your blockchain contains multiple messages, then -//! typically the state modifications from all messages is expected to be rolled -//! back as well. -//! //! [ibc-standard]: https://github.com/cosmos/ibc //! [ibc-rs]: https://github.com/cosmos/ibc-rs