diff --git a/.changelog/epilogue.md b/.changelog/epilogue.md index ac475d976..3df319cee 100644 --- a/.changelog/epilogue.md +++ b/.changelog/epilogue.md @@ -193,7 +193,7 @@ - Delete packet commitment instead of acknowledgement in acknowledgePacket [#1573](https://github.com/informalsystems/ibc-rs/issues/1573) -- Set the `counterparty_channel_id` correctly to fix ICS04 [`chanOpenAck` handler verification](https://github.com/cosmos/ibc-rs/blob/main/crates/ibc/src/core/ics04_channel/handler/chan_open_ack.rs) +- Set the `counterparty_channel_id` correctly to fix ICS04 [`chanOpenAck` handler verification](https://github.com/cosmos/ibc-rs/blob/v0.10.0/modules/src/core/ics04_channel/handler/chan_open_ack.rs) ([#1649](https://github.com/informalsystems/ibc-rs/issues/1649)) - Add missing assertion for non-zero trust-level in Tendermint client initialization. ([#1697](https://github.com/informalsystems/ibc-rs/issues/1697)) @@ -220,7 +220,7 @@ - Set the connection counterparty in the ICS 003 [`connOpenAck` handler][conn-open-ack-handler] ([#1532](https://github.com/informalsystems/ibc-rs/issues/1532)) -[conn-open-ack-handler]: https://github.com/cosmos/ibc-rs/blob/main/crates/ibc/src/core/ics03_connection/handler/conn_open_ack.rs +[conn-open-ack-handler]: https://github.com/cosmos/ibc-rs/blob/v0.9.0/modules/src/core/ics03_connection/handler/conn_open_ack.rs ### IMPROVEMENTS diff --git a/.changelog/unreleased/breaking-changes/1229-auto-derive-ser-commitment-prefix.md b/.changelog/unreleased/breaking-changes/1229-auto-derive-ser-commitment-prefix.md new file mode 100644 index 000000000..4b022abf2 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/1229-auto-derive-ser-commitment-prefix.md @@ -0,0 +1,2 @@ +- [ics23] Auto-derive `serde::Serialize` for `CommitmentPrefix`. + ([\#1229](https://github.com/cosmos/ibc-rs/issues/1229)) diff --git a/.changelog/v0.20.0/feature/161-add-getter-function-of-prefixeddenom.md b/.changelog/v0.20.0/feature/161-add-getter-function-of-prefixeddenom.md index 428eaf8ce..3f6376122 100644 --- a/.changelog/v0.20.0/feature/161-add-getter-function-of-prefixeddenom.md +++ b/.changelog/v0.20.0/feature/161-add-getter-function-of-prefixeddenom.md @@ -1,2 +1,2 @@ -- Public PrefixedDenom inner type and add as_str func for BaseDenom ([#161](https://github.com/cosmos/ibc- - rs/issues/161)) \ No newline at end of file +- Public PrefixedDenom inner type and add as_str func for BaseDenom + ([#161](https://github.com/cosmos/ibc-rs/issues/161)) diff --git a/.changelog/v0.22.0/breaking-changes/166-channel-proof-verification.md b/.changelog/v0.22.0/breaking-changes/166-channel-proof-verification.md index 77f5ef3a8..da9fa2779 100644 --- a/.changelog/v0.22.0/breaking-changes/166-channel-proof-verification.md +++ b/.changelog/v0.22.0/breaking-changes/166-channel-proof-verification.md @@ -1,3 +1,3 @@ - Refactor channel handlers. Proof calls were inlined, and our handshake - variable naming convention was applied ([#166](https://github.com/cosmos/ibc- - rs/issues/166)) \ No newline at end of file + variable naming convention was applied + ([#166](https://github.com/cosmos/ibc-rs/issues/166)) diff --git a/.changelog/v0.28.0/feature/393-finish-validation-execution-context.md b/.changelog/v0.28.0/feature/393-finish-validation-execution-context.md index a9981e46b..464a9df92 100644 --- a/.changelog/v0.28.0/feature/393-finish-validation-execution-context.md +++ b/.changelog/v0.28.0/feature/393-finish-validation-execution-context.md @@ -1,3 +1,3 @@ - Finish implementing ValidationContext::validate() and - ExecutionContext::execute() ([#393](https://github.com/cosmos/ibc- - rs/issues/393)) \ No newline at end of file + ExecutionContext::execute() + ([#393](https://github.com/cosmos/ibc-rs/issues/393)) diff --git a/.changelog/v0.29.0/breaking-changes/279-remove-legacy-api.md b/.changelog/v0.29.0/breaking-changes/279-remove-legacy-api.md index 74e43597b..5fe71954e 100644 --- a/.changelog/v0.29.0/breaking-changes/279-remove-legacy-api.md +++ b/.changelog/v0.29.0/breaking-changes/279-remove-legacy-api.md @@ -1,2 +1,2 @@ -- Remove Reader and Keeper API ([#279](https://github.com/cosmos/ibc- - rs/issues/279)) \ No newline at end of file +- Remove Reader and Keeper API + ([#279](https://github.com/cosmos/ibc-rs/issues/279)) diff --git a/.changelog/v0.33.0/improvement/547-error-strings.md b/.changelog/v0.33.0/improvement/547-error-strings.md index d019bc189..661201f75 100644 --- a/.changelog/v0.33.0/improvement/547-error-strings.md +++ b/.changelog/v0.33.0/improvement/547-error-strings.md @@ -1,2 +1,2 @@ -- Fix ContextError Display output ([#547](https://github.com/cosmos/ibc- - rs/issues/547)) \ No newline at end of file +- Fix ContextError Display output + ([#547](https://github.com/cosmos/ibc-rs/issues/547)) diff --git a/.changelog/v0.34.0/bug/550-fix-conn-proof-verify.md b/.changelog/v0.34.0/bug/550-fix-conn-proof-verify.md index a92bc24fb..0368dd262 100644 --- a/.changelog/v0.34.0/bug/550-fix-conn-proof-verify.md +++ b/.changelog/v0.34.0/bug/550-fix-conn-proof-verify.md @@ -1,2 +1,2 @@ -- Fix client IDs for the proof verifications in `ConnectionOpenTry` and `ConnectionOpenAck` ([#550](https://github.com/cosmos/ibc- - rs/issues/550)) +- Fix client IDs for the proof verifications in `ConnectionOpenTry` and + `ConnectionOpenAck` ([#550](https://github.com/cosmos/ibc-rs/issues/550)) diff --git a/.changelog/unreleased/breaking-changes/717-organize-ack-types-under-ics04.md b/.changelog/v0.43.0/breaking-changes/717-organize-ack-types-under-ics04.md similarity index 100% rename from .changelog/unreleased/breaking-changes/717-organize-ack-types-under-ics04.md rename to .changelog/v0.43.0/breaking-changes/717-organize-ack-types-under-ics04.md diff --git a/.changelog/unreleased/breaking-changes/750-sync-ics04-events-namings-with-convention.md b/.changelog/v0.43.0/breaking-changes/750-sync-ics04-events-namings-with-convention.md similarity index 100% rename from .changelog/unreleased/breaking-changes/750-sync-ics04-events-namings-with-convention.md rename to .changelog/v0.43.0/breaking-changes/750-sync-ics04-events-namings-with-convention.md diff --git a/.changelog/unreleased/breaking-changes/754-fix-issue-747.md b/.changelog/v0.43.0/breaking-changes/754-fix-issue-747.md similarity index 100% rename from .changelog/unreleased/breaking-changes/754-fix-issue-747.md rename to .changelog/v0.43.0/breaking-changes/754-fix-issue-747.md diff --git a/.changelog/v0.43.0/breaking-changes/761-chain-id-enhancements-and-fixes.md b/.changelog/v0.43.0/breaking-changes/761-chain-id-enhancements-and-fixes.md new file mode 100644 index 000000000..0cb98cbb2 --- /dev/null +++ b/.changelog/v0.43.0/breaking-changes/761-chain-id-enhancements-and-fixes.md @@ -0,0 +1,3 @@ +- Enhancements and fixes to `ChainId` impls and validation. + ([#761](https://github.com/cosmos/ibc-rs/issues/761)) + diff --git a/.changelog/v0.43.0/breaking-changes/764-use-vec-for-header-attribute.md b/.changelog/v0.43.0/breaking-changes/764-use-vec-for-header-attribute.md new file mode 100644 index 000000000..dcedb279d --- /dev/null +++ b/.changelog/v0.43.0/breaking-changes/764-use-vec-for-header-attribute.md @@ -0,0 +1,2 @@ +- Use Vec for HeaderAttribute instead of Any + ([#764](https://github.com/cosmos/ibc-rs/issues/764)) diff --git a/.changelog/v0.43.0/breaking-changes/772-json-schema-for-channels-and-coin.md b/.changelog/v0.43.0/breaking-changes/772-json-schema-for-channels-and-coin.md new file mode 100644 index 000000000..e7603beb7 --- /dev/null +++ b/.changelog/v0.43.0/breaking-changes/772-json-schema-for-channels-and-coin.md @@ -0,0 +1,2 @@ +- Serde: Schema for Coin/Transfer, Amount is string + ([#772](https://github.com/cosmos/ibc-rs/issues/772)) \ No newline at end of file diff --git a/.changelog/unreleased/bug/747-fix-747-Protobuf-out-of-memory.md b/.changelog/v0.43.0/bug/747-fix-747-Protobuf-out-of-memory.md similarity index 100% rename from .changelog/unreleased/bug/747-fix-747-Protobuf-out-of-memory.md rename to .changelog/v0.43.0/bug/747-fix-747-Protobuf-out-of-memory.md diff --git a/.changelog/unreleased/bug/752-fix-752.md b/.changelog/v0.43.0/bug/752-fix-752.md similarity index 100% rename from .changelog/unreleased/bug/752-fix-752.md rename to .changelog/v0.43.0/bug/752-fix-752.md diff --git a/.changelog/v0.43.0/bug/794-add-ser-der-for-packet-receipt.md b/.changelog/v0.43.0/bug/794-add-ser-der-for-packet-receipt.md new file mode 100644 index 000000000..615c392eb --- /dev/null +++ b/.changelog/v0.43.0/bug/794-add-ser-der-for-packet-receipt.md @@ -0,0 +1,2 @@ +- Add serde serialization and deserialization to Packet Receipt + ([#794](https://github.com/cosmos/ibc-rs/pull/794)) \ No newline at end of file diff --git a/.changelog/unreleased/improvement/745-scale-encoding-for-transfer-packet.md b/.changelog/v0.43.0/improvements/745-scale-encoding-for-transfer-packet.md similarity index 100% rename from .changelog/unreleased/improvement/745-scale-encoding-for-transfer-packet.md rename to .changelog/v0.43.0/improvements/745-scale-encoding-for-transfer-packet.md diff --git a/.changelog/v0.43.0/improvements/763-include-PacketData-JSON-encoding-test.md b/.changelog/v0.43.0/improvements/763-include-PacketData-JSON-encoding-test.md new file mode 100644 index 000000000..1088b2467 --- /dev/null +++ b/.changelog/v0.43.0/improvements/763-include-PacketData-JSON-encoding-test.md @@ -0,0 +1,2 @@ +- Add test to ensure `PacketData`` keeps proper JSON encoding + ([#763](https://github.com/cosmos/ibc-rs/issues/763)) diff --git a/.changelog/v0.43.0/summary.md b/.changelog/v0.43.0/summary.md new file mode 100644 index 000000000..836724110 --- /dev/null +++ b/.changelog/v0.43.0/summary.md @@ -0,0 +1,7 @@ +This release bumps ibc-proto to v0.32.1, resolving issue with token transfer +deserialization for cases with no memo field provided. It also includes various +enhancements and bug fixes, such as reorganized acknowledgement types, enhanced +`ChainId` validation, improved `from_str` height creation, synchronized channel +event namings for consistency. + +There are consensus-breaking changes. diff --git a/.changelog/v0.44.0/breaking-changes/536-clientstate-status.md b/.changelog/v0.44.0/breaking-changes/536-clientstate-status.md new file mode 100644 index 000000000..dc414758f --- /dev/null +++ b/.changelog/v0.44.0/breaking-changes/536-clientstate-status.md @@ -0,0 +1,2 @@ +- [ibc-derive] Replace `ClientState::{confirm_not_frozen, expired}()` with `ClientState::status()` + ([#536](https://github.com/cosmos/ibc-rs/issues/536)) diff --git a/.changelog/v0.44.0/breaking-changes/786-decouple-token-sendpacket.md b/.changelog/v0.44.0/breaking-changes/786-decouple-token-sendpacket.md new file mode 100644 index 000000000..9441d8582 --- /dev/null +++ b/.changelog/v0.44.0/breaking-changes/786-decouple-token-sendpacket.md @@ -0,0 +1,2 @@ +- Decouple TokenTransfer{Validation,Execution} from SendPacket{Validation,Execution} + ([#786](https://github.com/cosmos/ibc-rs/issues/786)) diff --git a/.changelog/v0.44.0/breaking-changes/788-decouple-router.md b/.changelog/v0.44.0/breaking-changes/788-decouple-router.md new file mode 100644 index 000000000..15e21c2e5 --- /dev/null +++ b/.changelog/v0.44.0/breaking-changes/788-decouple-router.md @@ -0,0 +1,2 @@ +- Decouple `Router` from `ValidationContext` + ([#788](https://github.com/cosmos/ibc-rs/pull/788)) diff --git a/.changelog/v0.44.0/breaking-changes/802-simplify-module-lookup.md b/.changelog/v0.44.0/breaking-changes/802-simplify-module-lookup.md new file mode 100644 index 000000000..68dc850cc --- /dev/null +++ b/.changelog/v0.44.0/breaking-changes/802-simplify-module-lookup.md @@ -0,0 +1,2 @@ +- Simplify Module lookup in the `Router` trait + ([#802](https://github.com/cosmos/ibc-rs/issues/802)) diff --git a/.changelog/v0.44.0/summary.md b/.changelog/v0.44.0/summary.md new file mode 100644 index 000000000..87b8f04ba --- /dev/null +++ b/.changelog/v0.44.0/summary.md @@ -0,0 +1,3 @@ +The goal with this release was to replace `ClientState::{confirm_not_frozen, expired}()` with `ClientState::status()` ([#536](https://github.com/cosmos/ibc-rs/issues/536)). Updating basecoin-rs with the new changes exposed the shortcomings of having `SendPacket*Context` be supertraits of `TokenTransfer*Context`, which in turned exposed the shortcomings of having `Router` be a supertrait of `ValidationContext`. Hence, we decoupled everything! + +There are consensus-breaking changes. diff --git a/.changelog/v0.44.1/bug-fixes/819-remove-mocks-no-std-traces.md b/.changelog/v0.44.1/bug-fixes/819-remove-mocks-no-std-traces.md new file mode 100644 index 000000000..4aadca5b1 --- /dev/null +++ b/.changelog/v0.44.1/bug-fixes/819-remove-mocks-no-std-traces.md @@ -0,0 +1,2 @@ +- Remove traces of deprecated `mocks-no-std` feature + ([#819](https://github.com/cosmos/ibc-rs/issues/821)) diff --git a/.changelog/v0.44.1/bug-fixes/821-fix-header-decoding-from-update-client-event.md b/.changelog/v0.44.1/bug-fixes/821-fix-header-decoding-from-update-client-event.md new file mode 100644 index 000000000..e54aa1ea9 --- /dev/null +++ b/.changelog/v0.44.1/bug-fixes/821-fix-header-decoding-from-update-client-event.md @@ -0,0 +1,3 @@ +- Utilize encoded bytes from `Any` for the `header` field of `UpdateClient` + event + ([#821](https://github.com/cosmos/ibc-rs/issues/821)) diff --git a/.changelog/v0.44.1/summary.md b/.changelog/v0.44.1/summary.md new file mode 100644 index 000000000..51b5400fe --- /dev/null +++ b/.changelog/v0.44.1/summary.md @@ -0,0 +1,3 @@ +This release fixes a bug with the `UpdateClient` event where the `header` field was not properly encoded. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.44.2/bug-fixes/911-fix-header-validation-during-tmclient-update.md b/.changelog/v0.44.2/bug-fixes/911-fix-header-validation-during-tmclient-update.md new file mode 100644 index 000000000..ba6cdb634 --- /dev/null +++ b/.changelog/v0.44.2/bug-fixes/911-fix-header-validation-during-tmclient-update.md @@ -0,0 +1,2 @@ +- Remove an incorrect validation during tendermint client update + ([\#911](https://github.com/cosmos/ibc-rs/issues/911)) diff --git a/.changelog/v0.44.2/summary.md b/.changelog/v0.44.2/summary.md new file mode 100644 index 000000000..c80a7d4f3 --- /dev/null +++ b/.changelog/v0.44.2/summary.md @@ -0,0 +1,4 @@ +This release is a critical patch release that introduces a vital fix by removing +an incorrect validation during a Tendermint client update. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.45.0/breaking-changes/785-bump-tendermint-to-v0.33.0.md b/.changelog/v0.45.0/breaking-changes/785-bump-tendermint-to-v0.33.0.md new file mode 100644 index 000000000..09e838b68 --- /dev/null +++ b/.changelog/v0.45.0/breaking-changes/785-bump-tendermint-to-v0.33.0.md @@ -0,0 +1,2 @@ +- Bump tendermint-rs to v0.33.0 + ([#785](https://github.com/cosmos/ibc-rs/issues/785)) diff --git a/.changelog/v0.45.0/breaking-changes/790-bump-ibc-proto-rs-to-v0.34.0.md b/.changelog/v0.45.0/breaking-changes/790-bump-ibc-proto-rs-to-v0.34.0.md new file mode 100644 index 000000000..5f41eb65a --- /dev/null +++ b/.changelog/v0.45.0/breaking-changes/790-bump-ibc-proto-rs-to-v0.34.0.md @@ -0,0 +1,2 @@ +- Bump ibc-proto-rs to v0.34.0 + ([#790](https://github.com/cosmos/ibc-rs/issues/790)) diff --git a/.changelog/v0.45.0/breaking-changes/857-use-result-for-safe-counters-increment.md b/.changelog/v0.45.0/breaking-changes/857-use-result-for-safe-counters-increment.md new file mode 100644 index 000000000..f0f87285e --- /dev/null +++ b/.changelog/v0.45.0/breaking-changes/857-use-result-for-safe-counters-increment.md @@ -0,0 +1,3 @@ +- Allow hosts to handle overflow cases in `increase_*_counter` methods by + returning `Result<(),ContextError>` type. + ([#857](https://github.com/cosmos/ibc-rs/issues/857)) diff --git a/.changelog/v0.45.0/breaking-changes/859-return-result-in-logger-event-emitter-methods.md b/.changelog/v0.45.0/breaking-changes/859-return-result-in-logger-event-emitter-methods.md new file mode 100644 index 000000000..9c25b1ba3 --- /dev/null +++ b/.changelog/v0.45.0/breaking-changes/859-return-result-in-logger-event-emitter-methods.md @@ -0,0 +1,2 @@ +- logger and event emitter methods return `Result<(), ContextError>` type. + ([#859](https://github.com/cosmos/ibc-rs/issues/859)) diff --git a/.changelog/v0.45.0/breaking-changes/873-bump-ibc-proto-rs.md b/.changelog/v0.45.0/breaking-changes/873-bump-ibc-proto-rs.md new file mode 100644 index 000000000..f421724c4 --- /dev/null +++ b/.changelog/v0.45.0/breaking-changes/873-bump-ibc-proto-rs.md @@ -0,0 +1,2 @@ +- Bump `ibc-proto-rs` to v0.35.0 along with some other minor dependency updates + ([#873](https://github.com/cosmos/ibc-rs/issues/873)) diff --git a/.changelog/v0.45.0/bug-fixes/741-restore-no-std-support.md b/.changelog/v0.45.0/bug-fixes/741-restore-no-std-support.md new file mode 100644 index 000000000..41cfaa7ff --- /dev/null +++ b/.changelog/v0.45.0/bug-fixes/741-restore-no-std-support.md @@ -0,0 +1,2 @@ +- Fix compilation error of v0.41.0 by restoring no_std support for serde + feature ([#741](https://github.com/cosmos/ibc-rs/issues/741)) diff --git a/.changelog/v0.45.0/bug-fixes/863-immut-ref-in-validate.md b/.changelog/v0.45.0/bug-fixes/863-immut-ref-in-validate.md new file mode 100644 index 000000000..91cbda02b --- /dev/null +++ b/.changelog/v0.45.0/bug-fixes/863-immut-ref-in-validate.md @@ -0,0 +1,2 @@ +- Replace mutable ref with immutable ref in validate handler + ([\#863](https://github.com/cosmos/ibc-rs/issues/863)) \ No newline at end of file diff --git a/.changelog/v0.45.0/features/842-impl-grpc-services.md b/.changelog/v0.45.0/features/842-impl-grpc-services.md new file mode 100644 index 000000000..081992300 --- /dev/null +++ b/.changelog/v0.45.0/features/842-impl-grpc-services.md @@ -0,0 +1,2 @@ +- Blanket implementation of core gRPC services + ([\#686](https://github.com/cosmos/ibc-rs/issues/686)) \ No newline at end of file diff --git a/.changelog/v0.45.0/improvements/838-switch-to-tm-event-for-upgrade-client-proposal-handler.md b/.changelog/v0.45.0/improvements/838-switch-to-tm-event-for-upgrade-client-proposal-handler.md new file mode 100644 index 000000000..69247e866 --- /dev/null +++ b/.changelog/v0.45.0/improvements/838-switch-to-tm-event-for-upgrade-client-proposal-handler.md @@ -0,0 +1,3 @@ +- Switch to domain Tendermint event type instead of proto for the + `upgrade_client_proposal_handler` return + ([#838](https://github.com/cosmos/ibc-rs/issues/838)) diff --git a/.changelog/v0.45.0/improvements/844-bump-borsh.md b/.changelog/v0.45.0/improvements/844-bump-borsh.md new file mode 100644 index 000000000..de58be506 --- /dev/null +++ b/.changelog/v0.45.0/improvements/844-bump-borsh.md @@ -0,0 +1,2 @@ +- Bump ibc-proto to v0.34.1 and borsh to v0.10 + ([#844](https://github.com/cosmos/ibc-rs/issues/844)) diff --git a/.changelog/v0.45.0/improvements/845-borsh-derive-msgtransfer.md b/.changelog/v0.45.0/improvements/845-borsh-derive-msgtransfer.md new file mode 100644 index 000000000..1bbcc3ed8 --- /dev/null +++ b/.changelog/v0.45.0/improvements/845-borsh-derive-msgtransfer.md @@ -0,0 +1,2 @@ +- Add borsh derive for `MsgTransfer` + ([#845](https://github.com/cosmos/ibc-rs/pull/845)) diff --git a/.changelog/v0.45.0/improvements/846-borsh-derive-msgenvelope.md b/.changelog/v0.45.0/improvements/846-borsh-derive-msgenvelope.md new file mode 100644 index 000000000..cc5ccad7d --- /dev/null +++ b/.changelog/v0.45.0/improvements/846-borsh-derive-msgenvelope.md @@ -0,0 +1,2 @@ +- Add borsh derive for `MsgEnvelope` + ([#846](https://github.com/cosmos/ibc-rs/pull/846)) diff --git a/.changelog/v0.45.0/improvements/847-derive-msgenvelope-eq.md b/.changelog/v0.45.0/improvements/847-derive-msgenvelope-eq.md new file mode 100644 index 000000000..e7580e0a7 --- /dev/null +++ b/.changelog/v0.45.0/improvements/847-derive-msgenvelope-eq.md @@ -0,0 +1,2 @@ +- Derive `PartialEq`, `Eq` for `MsgEnvelope` + ([#847](https://github.com/cosmos/ibc-rs/pull/847)) diff --git a/.changelog/v0.45.0/improvements/848-configure-cargo-fmt.md b/.changelog/v0.45.0/improvements/848-configure-cargo-fmt.md new file mode 100644 index 000000000..51ad15851 --- /dev/null +++ b/.changelog/v0.45.0/improvements/848-configure-cargo-fmt.md @@ -0,0 +1,2 @@ +- Organize imports grouping and granularity using `rustfmt.toml` + ([#848](https://github.com/cosmos/ibc-rs/issues/848)) diff --git a/.changelog/v0.45.0/improvements/856-jsonschema-derive-msgenvelope.md b/.changelog/v0.45.0/improvements/856-jsonschema-derive-msgenvelope.md new file mode 100644 index 000000000..5eac84360 --- /dev/null +++ b/.changelog/v0.45.0/improvements/856-jsonschema-derive-msgenvelope.md @@ -0,0 +1,2 @@ +- Add `JsonSchema` derive for `MsgEnvelope` + ([#856](https://github.com/cosmos/ibc-rs/pull/856)) diff --git a/.changelog/v0.45.0/improvements/869-codebase-cleanup.md b/.changelog/v0.45.0/improvements/869-codebase-cleanup.md new file mode 100644 index 000000000..55d9edca9 --- /dev/null +++ b/.changelog/v0.45.0/improvements/869-codebase-cleanup.md @@ -0,0 +1,2 @@ +- Remove unused code snippets and move serializer roundtrip test to `serializers.rs` + ([#869](https://github.com/cosmos/ibc-rs/issues/869)) diff --git a/.changelog/v0.45.0/summary.md b/.changelog/v0.45.0/summary.md new file mode 100644 index 000000000..43ecf0d8e --- /dev/null +++ b/.changelog/v0.45.0/summary.md @@ -0,0 +1 @@ +This release introduces a new API under the `grpc` feature flag, which has ibc-rs expose grpc endpoints that the hermes relayer needs. There are other miscellaneous changes. diff --git a/.changelog/v0.46.0/breaking-changes/914-replace-host-update-time-and-height-under-client-contexts.md b/.changelog/v0.46.0/breaking-changes/914-replace-host-update-time-and-height-under-client-contexts.md new file mode 100644 index 000000000..9df36a1e6 --- /dev/null +++ b/.changelog/v0.46.0/breaking-changes/914-replace-host-update-time-and-height-under-client-contexts.md @@ -0,0 +1,3 @@ +- Relocate `*_update_time` and `*_update_height` to the client contexts' traits + for improved access by light clients + ([#914](https://github.com/cosmos/ibc-rs/issues/914)) diff --git a/.changelog/v0.46.0/bug-fixes/911-fix-header-validation-during-tmclient-update.md b/.changelog/v0.46.0/bug-fixes/911-fix-header-validation-during-tmclient-update.md new file mode 100644 index 000000000..ba6cdb634 --- /dev/null +++ b/.changelog/v0.46.0/bug-fixes/911-fix-header-validation-during-tmclient-update.md @@ -0,0 +1,2 @@ +- Remove an incorrect validation during tendermint client update + ([\#911](https://github.com/cosmos/ibc-rs/issues/911)) diff --git a/.changelog/v0.46.0/bug-fixes/913-add-update-cons-metadata-on-client-upgrade.md b/.changelog/v0.46.0/bug-fixes/913-add-update-cons-metadata-on-client-upgrade.md new file mode 100644 index 000000000..80ae700a4 --- /dev/null +++ b/.changelog/v0.46.0/bug-fixes/913-add-update-cons-metadata-on-client-upgrade.md @@ -0,0 +1,3 @@ +- Add missing update in the state, which should include the host's height and + timestamp when a successful client upgrade take place. + ([\#913](https://github.com/cosmos/ibc-rs/issues/913)) diff --git a/.changelog/v0.46.0/improvements/875-remove-regex-dep.md b/.changelog/v0.46.0/improvements/875-remove-regex-dep.md new file mode 100644 index 000000000..4bb26a232 --- /dev/null +++ b/.changelog/v0.46.0/improvements/875-remove-regex-dep.md @@ -0,0 +1,2 @@ +- Remove `safe-regex` dependency + ([\#875](https://github.com/cosmos/ibc-rs/issues/875)) diff --git a/.changelog/v0.46.0/improvements/896-enhance-ibc-query-methods-usability.md b/.changelog/v0.46.0/improvements/896-enhance-ibc-query-methods-usability.md new file mode 100644 index 000000000..0f785755d --- /dev/null +++ b/.changelog/v0.46.0/improvements/896-enhance-ibc-query-methods-usability.md @@ -0,0 +1,4 @@ +- Enhance IBC query methods usability and code organization + - The implementation of query methods is now publicly accessible as standalone functions. + - `grpc` feature now lives as a separate crate called as `ibc-query` + ([#896](https://github.com/cosmos/ibc-rs/issues/896)) diff --git a/.changelog/v0.46.0/improvements/898-re-export-ibc-proto-types.md b/.changelog/v0.46.0/improvements/898-re-export-ibc-proto-types.md new file mode 100644 index 000000000..bbe181575 --- /dev/null +++ b/.changelog/v0.46.0/improvements/898-re-export-ibc-proto-types.md @@ -0,0 +1,2 @@ +- Re-export ibc proto types from `ibc-proto-rs`` for dependency convenience + ([/#898](https://github.com/cosmos/ibc-rs/issues/898)) diff --git a/.changelog/v0.46.0/summary.md b/.changelog/v0.46.0/summary.md new file mode 100644 index 000000000..2a00c61cb --- /dev/null +++ b/.changelog/v0.46.0/summary.md @@ -0,0 +1,10 @@ +This release introduces vital bug fixes, including removal of an incorrect +validation during a Tendermint client update and the addition of a missing state +update during a successful client upgrade ensuring the inclusion of the host's +height and timestamp in the store. + +Additionally, it eliminates the `safe-regex` dependency, and restructures IBC +query implementations under the previous `grpc` feature flag and moves it to a +separate crate called as `ibc-query`. + +There are consensus-breaking changes. diff --git a/.changelog/v0.47.0/features/600-tendermint-pruning.md b/.changelog/v0.47.0/features/600-tendermint-pruning.md new file mode 100644 index 000000000..58ced3ddb --- /dev/null +++ b/.changelog/v0.47.0/features/600-tendermint-pruning.md @@ -0,0 +1 @@ +- Implement consensus state pruning for Tendermint light clients ([#600](https://github.com/cosmos/ibc-rs/issues/600)) diff --git a/.changelog/v0.47.0/improvements/538-test-for-client-expiry.md b/.changelog/v0.47.0/improvements/538-test-for-client-expiry.md new file mode 100644 index 000000000..701905ada --- /dev/null +++ b/.changelog/v0.47.0/improvements/538-test-for-client-expiry.md @@ -0,0 +1,2 @@ +- Add test for expired client status. + ([\#538](https://github.com/cosmos/ibc-rs/issues/538)) diff --git a/.changelog/v0.47.0/improvements/850-fix-wasm-compilation-error-with-floats.md b/.changelog/v0.47.0/improvements/850-fix-wasm-compilation-error-with-floats.md new file mode 100644 index 000000000..bb17a129e --- /dev/null +++ b/.changelog/v0.47.0/improvements/850-fix-wasm-compilation-error-with-floats.md @@ -0,0 +1,4 @@ +- Fix compilation issue with Wasm envs because of floats + - Use `serde-json-wasm` dependency instead of `serde-json` for no-floats support + - Add CI test to include CosmWasm compilation check +([\#850](https://github.com/cosmos/ibc-rs/issues/850)) diff --git a/.changelog/v0.47.0/improvements/926_mocks_implies_std.md b/.changelog/v0.47.0/improvements/926_mocks_implies_std.md new file mode 100644 index 000000000..b7d46ac6f --- /dev/null +++ b/.changelog/v0.47.0/improvements/926_mocks_implies_std.md @@ -0,0 +1,3 @@ +- Change `mocks` feature to imply `std` since it requires + Timestamp::now to work. + ([\#926](https://github.com/cosmos/ibc-rs/pull/926)) diff --git a/.changelog/v0.47.0/improvements/927-refactor-packet-commitments-and-packet-acknowledgements.md b/.changelog/v0.47.0/improvements/927-refactor-packet-commitments-and-packet-acknowledgements.md new file mode 100644 index 000000000..ad3827615 --- /dev/null +++ b/.changelog/v0.47.0/improvements/927-refactor-packet-commitments-and-packet-acknowledgements.md @@ -0,0 +1,2 @@ +- Return PacketStates instead of paths from packet_commitments and + packet_acknowledgements ([\#927](https://github.com/cosmos/ibc-rs/issues/927)) diff --git a/.changelog/v0.47.0/improvements/929-remove-anyschema.md b/.changelog/v0.47.0/improvements/929-remove-anyschema.md new file mode 100644 index 000000000..5e3e904d2 --- /dev/null +++ b/.changelog/v0.47.0/improvements/929-remove-anyschema.md @@ -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)) diff --git a/.changelog/v0.47.0/summary.md b/.changelog/v0.47.0/summary.md new file mode 100644 index 000000000..2a621c86a --- /dev/null +++ b/.changelog/v0.47.0/summary.md @@ -0,0 +1,8 @@ +This release adds necessary APIs for featuring consensus state pruning and +implements pertaining logic for Tendermint light clients. This prevents +unlimited store growth. Additionally, we've enhanced ibc-rs compatibility with +no-float environments making Wasm compilation smoother and updated main +dependencies including `prost` to v0.12, `ibc-proto-rs` to v0.37, and +`tendermint-rs` to v0.34, ensuring the latest advancements. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.48.0/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 new file mode 100644 index 000000000..600725b77 --- /dev/null +++ b/.changelog/v0.48.0/breaking-changes/716-move-transfer-app-and-tendermint-client-to-separate-crate.md @@ -0,0 +1,3 @@ +- 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)) diff --git a/.changelog/v0.48.0/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 new file mode 100644 index 000000000..de2d127b7 --- /dev/null +++ b/.changelog/v0.48.0/breaking-changes/949-bump-ibc-proto-rs-to-v0380.md @@ -0,0 +1,2 @@ +- Bump `ibc-proto-rs` to v0.38.0 + ([\#949](https://github.com/cosmos/ibc-rs/issues/949)) diff --git a/.changelog/v0.48.0/breaking-changes/956-bump-MSRV-to-1-64.md b/.changelog/v0.48.0/breaking-changes/956-bump-MSRV-to-1-64.md new file mode 100644 index 000000000..37056378e --- /dev/null +++ b/.changelog/v0.48.0/breaking-changes/956-bump-MSRV-to-1-64.md @@ -0,0 +1,2 @@ +- Bump minimum supported Rust version to 1.64 + ([\#956](https://github.com/cosmos/ibc-rs/issues/956)) diff --git a/.changelog/v0.48.0/breaking-changes/965-restructure-ibc.md b/.changelog/v0.48.0/breaking-changes/965-restructure-ibc.md new file mode 100644 index 000000000..46df0936a --- /dev/null +++ b/.changelog/v0.48.0/breaking-changes/965-restructure-ibc.md @@ -0,0 +1,5 @@ +- 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)) diff --git a/.changelog/v0.48.0/features/954-restructure-mock-module-into-crate.md b/.changelog/v0.48.0/features/954-restructure-mock-module-into-crate.md new file mode 100644 index 000000000..266600f91 --- /dev/null +++ b/.changelog/v0.48.0/features/954-restructure-mock-module-into-crate.md @@ -0,0 +1,3 @@ +- 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)) diff --git a/.changelog/v0.48.0/features/974-id-into-string.md b/.changelog/v0.48.0/features/974-id-into-string.md new file mode 100644 index 000000000..fb2d5bb3a --- /dev/null +++ b/.changelog/v0.48.0/features/974-id-into-string.md @@ -0,0 +1,2 @@ +- Provide `Into` for all identifiers types. + ([\#974](https://github.com/cosmos/ibc-rs/pull/974)) diff --git a/.changelog/v0.48.0/improvements/697-re-export-essential-proto-types.md b/.changelog/v0.48.0/improvements/697-re-export-essential-proto-types.md new file mode 100644 index 000000000..0ff69eb56 --- /dev/null +++ b/.changelog/v0.48.0/improvements/697-re-export-essential-proto-types.md @@ -0,0 +1,3 @@ +- 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)) diff --git a/.changelog/v0.48.0/improvements/771-use-mod-rs-places-having-submodules.md b/.changelog/v0.48.0/improvements/771-use-mod-rs-places-having-submodules.md new file mode 100644 index 000000000..3f605655b --- /dev/null +++ b/.changelog/v0.48.0/improvements/771-use-mod-rs-places-having-submodules.md @@ -0,0 +1,2 @@ +- Rename `{submodule}.rs` with corresponding `{submodule}` directory to + `{submodule}/mod.rs` ([\#771](https://github.com/cosmos/ibc-rs/issues/771)) 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/v0.48.0/improvements/940-chain-identifiers-without-revision-number-pattern.md b/.changelog/v0.48.0/improvements/940-chain-identifiers-without-revision-number-pattern.md new file mode 100644 index 000000000..c127a0c66 --- /dev/null +++ b/.changelog/v0.48.0/improvements/940-chain-identifiers-without-revision-number-pattern.md @@ -0,0 +1,2 @@ +- Support chain identifiers without the `{chain_name}-{revision_number}` pattern + of Tendermint chains. ([\#940](https://github.com/cosmos/ibc-rs/issues/940)). diff --git a/.changelog/v0.48.0/improvements/943-optimize-validate-prefix-length.md b/.changelog/v0.48.0/improvements/943-optimize-validate-prefix-length.md new file mode 100644 index 000000000..0e2c11c19 --- /dev/null +++ b/.changelog/v0.48.0/improvements/943-optimize-validate-prefix-length.md @@ -0,0 +1,2 @@ +- Remove redundant `String` creation in `validate_prefix_length` + ([\#943](https://github.com/cosmos/ibc-rs/issues/943)). diff --git a/.changelog/v0.48.0/improvements/948-remove-redundant-test-log-deps.md b/.changelog/v0.48.0/improvements/948-remove-redundant-test-log-deps.md new file mode 100644 index 000000000..704cf5c48 --- /dev/null +++ b/.changelog/v0.48.0/improvements/948-remove-redundant-test-log-deps.md @@ -0,0 +1,2 @@ +- Remove redundant `#[test_log::test]` attributes in test modules + ([\#948](https://github.com/cosmos/ibc-rs/issues/948)) diff --git a/.changelog/v0.48.0/improvements/951-remove-default-portid.md b/.changelog/v0.48.0/improvements/951-remove-default-portid.md new file mode 100644 index 000000000..f9f586add --- /dev/null +++ b/.changelog/v0.48.0/improvements/951-remove-default-portid.md @@ -0,0 +1,2 @@ +- Remove the default value and implementation for `PortId` + ([\#951](https://github.com/cosmos/ibc-rs/issues/951)) diff --git a/.changelog/v0.48.0/improvements/952-expose-channel-message-types.md b/.changelog/v0.48.0/improvements/952-expose-channel-message-types.md new file mode 100644 index 000000000..e0a0ccbf2 --- /dev/null +++ b/.changelog/v0.48.0/improvements/952-expose-channel-message-types.md @@ -0,0 +1,2 @@ +- Expose domain message types under the `ics04_channel` as public + ([\#952](https://github.com/cosmos/ibc-rs/issues/952)) diff --git a/.changelog/v0.48.0/improvements/955-use-workspace-dependencies.md b/.changelog/v0.48.0/improvements/955-use-workspace-dependencies.md new file mode 100644 index 000000000..51846aba0 --- /dev/null +++ b/.changelog/v0.48.0/improvements/955-use-workspace-dependencies.md @@ -0,0 +1,2 @@ +- Enhance dependency management with workspace inheritance + ([\#955](https://github.com/cosmos/ibc-rs/issues/955)) diff --git a/.changelog/v0.48.0/improvements/961-refactor-identifier-validation.md b/.changelog/v0.48.0/improvements/961-refactor-identifier-validation.md new file mode 100644 index 000000000..ca8ca1d0e --- /dev/null +++ b/.changelog/v0.48.0/improvements/961-refactor-identifier-validation.md @@ -0,0 +1,2 @@ +- Simplify and refactor ICS-24 identifier validation logic. + ([\#961](https://github.com/cosmos/ibc-rs/issues/961)) diff --git a/.changelog/v0.48.0/improvements/970-reduce-heap-allocation.md b/.changelog/v0.48.0/improvements/970-reduce-heap-allocation.md new file mode 100644 index 000000000..9854416b2 --- /dev/null +++ b/.changelog/v0.48.0/improvements/970-reduce-heap-allocation.md @@ -0,0 +1,3 @@ +- 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)) diff --git a/.changelog/v0.48.0/improvements/976-expose-different-types-for-public-access.md b/.changelog/v0.48.0/improvements/976-expose-different-types-for-public-access.md new file mode 100644 index 000000000..e329e6744 --- /dev/null +++ b/.changelog/v0.48.0/improvements/976-expose-different-types-for-public-access.md @@ -0,0 +1,6 @@ +- 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)) 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/v0.48.1/bug-fixes/770-fix-cargo-test-no-default-features.md b/.changelog/v0.48.1/bug-fixes/770-fix-cargo-test-no-default-features.md new file mode 100644 index 000000000..ab687989d --- /dev/null +++ b/.changelog/v0.48.1/bug-fixes/770-fix-cargo-test-no-default-features.md @@ -0,0 +1,2 @@ +- Fix Cargo test failure with `--no-default-features` flag. + ([\#770](https://github.com/cosmos/ibc-rs/issues/770)) diff --git a/.changelog/v0.48.1/bug-fixes/987-serde-json-feature.md b/.changelog/v0.48.1/bug-fixes/987-serde-json-feature.md new file mode 100644 index 000000000..03b70b888 --- /dev/null +++ b/.changelog/v0.48.1/bug-fixes/987-serde-json-feature.md @@ -0,0 +1,3 @@ +- Fix dependency resolution by removing the `dep:` syntax in `serde` feature of + `ibc-app-transfer` crate. + ([\#987](https://github.com/cosmos/ibc-rs/issues/987)) diff --git a/.changelog/v0.48.1/summary.md b/.changelog/v0.48.1/summary.md new file mode 100644 index 000000000..72df2fc53 --- /dev/null +++ b/.changelog/v0.48.1/summary.md @@ -0,0 +1,4 @@ +This patch release eliminates the `dep:` syntax from the `serde` feature, +addressing potential dependency resolution issue stemming from Rust v1.70. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.48.2/bug-fixes/1004-fix-packet-sequence-encoding.md b/.changelog/v0.48.2/bug-fixes/1004-fix-packet-sequence-encoding.md new file mode 100644 index 000000000..cc43e371d --- /dev/null +++ b/.changelog/v0.48.2/bug-fixes/1004-fix-packet-sequence-encoding.md @@ -0,0 +1,2 @@ +- `[ibc-core-host-types]` Encode packet sequence into a big endian bytes. + ([\#1004](https://github.com/cosmos/ibc-rs/pull/1004)) diff --git a/.changelog/v0.48.2/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md b/.changelog/v0.48.2/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md new file mode 100644 index 000000000..c1c9209e5 --- /dev/null +++ b/.changelog/v0.48.2/bug-fixes/1010-fix-recursive-call-in-conn-state-converstion-to-i32.md @@ -0,0 +1,2 @@ +- `[ibc-core-connection-types]` Fix recursive call in connection `State` + conversion to `i32` ([\#1010](https://github.com/cosmos/ibc-rs/issues/1010)) diff --git a/.changelog/v0.48.2/summary.md b/.changelog/v0.48.2/summary.md new file mode 100644 index 000000000..119af0fdf --- /dev/null +++ b/.changelog/v0.48.2/summary.md @@ -0,0 +1,6 @@ +This patch release resolves two issues. It corrects the packet sequence number +encoding within Timeout message handlers to align with the big-endian format and +addresses a recursive call error during the conversion from connection `State` +to `i32`. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.49.1/breaking-changes/1014-better-client-id-new.md b/.changelog/v0.49.1/breaking-changes/1014-better-client-id-new.md new file mode 100644 index 000000000..2c7ad406e --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/1014-better-client-id-new.md @@ -0,0 +1,4 @@ +- `[ibc-core-host-types]` Introduce `ClientType::build_client_id` which avoids unnecessary validaiton. + ([#1014](https://github.com/cosmos/ibc-rs/issues/1014)) +- `[ibc-core-host-types]` Optimise `ClientId::new` to avoid unnecessary validaiton and temporary + string allocation. ([#1014](https://github.com/cosmos/ibc-rs/issues/1014)) diff --git a/.changelog/v0.49.1/breaking-changes/837-split-sent-coins-method copy.md b/.changelog/v0.49.1/breaking-changes/837-split-sent-coins-method copy.md new file mode 100644 index 000000000..f3877cdbb --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/837-split-sent-coins-method copy.md @@ -0,0 +1,5 @@ +- `[ibc-app-transfer]` Refactor `send-coins-*()` methods by breaking them down + into distinct escrow and unescrow methods, enhancing both clarity and + specificity in functionality. + ([\#837](https://github.com/cosmos/ibc-rs/issues/837)) + \ No newline at end of file diff --git a/.changelog/v0.49.1/breaking-changes/839-add-memo-field-for-token-escrow.md b/.changelog/v0.49.1/breaking-changes/839-add-memo-field-for-token-escrow.md new file mode 100644 index 000000000..f506d8809 --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/839-add-memo-field-for-token-escrow.md @@ -0,0 +1,5 @@ +- `[ibc-app-transfer]` Add `memo` field to `escrow-coins-*()` and + `burn-coins-*()` methods, allowing implementors to pass in arbitrary data + necessary for their use case. + ([\#839](https://github.com/cosmos/ibc-rs/issues/837)) + \ No newline at end of file diff --git a/.changelog/v0.49.1/breaking-changes/978-identifier-error.md b/.changelog/v0.49.1/breaking-changes/978-identifier-error.md new file mode 100644 index 000000000..51bc5be68 --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/978-identifier-error.md @@ -0,0 +1,2 @@ +- `[ibc-core-host-type]` Optimize `IdentifierError` variants and make them + mutually exclusive. ([\#978](https://github.com/cosmos/ibc-rs/issues/978)) diff --git a/.changelog/v0.49.1/breaking-changes/993-bump-ibc-proto-rs.md b/.changelog/v0.49.1/breaking-changes/993-bump-ibc-proto-rs.md new file mode 100644 index 000000000..07c4e5024 --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/993-bump-ibc-proto-rs.md @@ -0,0 +1,2 @@ +- `[ibc-data-types]` Bump ibc-proto-rs dependency to v0.39.1. + ([\#993](https://github.com/cosmos/ibc-rs/issues/993)) diff --git a/.changelog/v0.49.1/breaking-changes/997-minimize-prost-dependency.md b/.changelog/v0.49.1/breaking-changes/997-minimize-prost-dependency.md new file mode 100644 index 000000000..558b56b31 --- /dev/null +++ b/.changelog/v0.49.1/breaking-changes/997-minimize-prost-dependency.md @@ -0,0 +1,5 @@ +- `[ibc]` Minimize `prost` dependency by introducing `ToVec` trait + - Now `prost` is only imported in `ibc-primitives` crate + - Remove error variants originating from `prost` (Breaking change) + - Eliminate the need for the `bytes` dependency + ([\#997](https://github.com/cosmos/ibc-rs/issues/997)) diff --git a/.changelog/v0.49.1/features/1008-commitment-proof-bytes-as-ref.md b/.changelog/v0.49.1/features/1008-commitment-proof-bytes-as-ref.md new file mode 100644 index 000000000..aaedebef0 --- /dev/null +++ b/.changelog/v0.49.1/features/1008-commitment-proof-bytes-as-ref.md @@ -0,0 +1,4 @@ +- `[ibc-core-commitment-types`] implement `AsRef>` and + `AsRef<[u8]>` for `CommitmentProofBytes` so it’s possible to gain + access to the proof byte slice without having to own the object. + ([#1008](https://github.com/cosmos/ibc-rs/pull/1008)) diff --git a/.changelog/v0.49.1/improvements/1005-status-verify-active.md b/.changelog/v0.49.1/improvements/1005-status-verify-active.md new file mode 100644 index 000000000..8aef96bb5 --- /dev/null +++ b/.changelog/v0.49.1/improvements/1005-status-verify-active.md @@ -0,0 +1,2 @@ +- `[ibc-core-client-types]` Add a convenient `Status::verify_is_active` method. + ([#1005](https://github.com/cosmos/ibc-rs/pull/1005)) diff --git a/.changelog/v0.49.1/improvements/1011-status-verify-active.md b/.changelog/v0.49.1/improvements/1011-status-verify-active.md new file mode 100644 index 000000000..65b3e911a --- /dev/null +++ b/.changelog/v0.49.1/improvements/1011-status-verify-active.md @@ -0,0 +1,2 @@ +- `[ibc-primitives]` Derive `Hash` on `Timestamp` instead of explicit + implementation ([#1011](https://github.com/cosmos/ibc-rs/pull/1005)) diff --git a/.changelog/v0.49.1/improvements/1017-use-global-paths-in-generated-code.md b/.changelog/v0.49.1/improvements/1017-use-global-paths-in-generated-code.md new file mode 100644 index 000000000..89282ec02 --- /dev/null +++ b/.changelog/v0.49.1/improvements/1017-use-global-paths-in-generated-code.md @@ -0,0 +1,3 @@ +- `[ibc-derive]` Use global paths in generated code by macros to prevent + namespace conflicts with local modules + ([#1017](https://github.com/cosmos/ibc-rs/pull/1017)) diff --git a/.changelog/v0.49.1/improvements/992-more-rigorous-cosmwasm-check.md b/.changelog/v0.49.1/improvements/992-more-rigorous-cosmwasm-check.md new file mode 100644 index 000000000..a4c91b322 --- /dev/null +++ b/.changelog/v0.49.1/improvements/992-more-rigorous-cosmwasm-check.md @@ -0,0 +1,3 @@ +- `[cw-check]` More rigorous CosmWasm check by upgrading dependencies and + including `std` and `schema` features for `ibc-core`. + ([\#992](https://github.com/cosmos/ibc-rs/pull/992)) diff --git a/.changelog/v0.49.1/improvements/993-streamline-msg-trait.md b/.changelog/v0.49.1/improvements/993-streamline-msg-trait.md new file mode 100644 index 000000000..439644449 --- /dev/null +++ b/.changelog/v0.49.1/improvements/993-streamline-msg-trait.md @@ -0,0 +1,2 @@ +- `[ibc-primitives]` streamline `Msg` trait and rename to `ToProto` + ([#993](https://github.com/cosmos/ibc-rs/issues/993)) diff --git a/.changelog/v0.49.1/improvements/996-custom-chain-id-deserialization.md b/.changelog/v0.49.1/improvements/996-custom-chain-id-deserialization.md new file mode 100644 index 000000000..c77fda22d --- /dev/null +++ b/.changelog/v0.49.1/improvements/996-custom-chain-id-deserialization.md @@ -0,0 +1 @@ +- `[ibc-core-host-types]` Implement custom JSON and Borsh deserialization for `ChainId` ([#996](https://github.com/cosmos/ibc-rs/pull/1013)) \ No newline at end of file diff --git a/.changelog/v0.49.1/summary.md b/.changelog/v0.49.1/summary.md new file mode 100644 index 000000000..672de2863 --- /dev/null +++ b/.changelog/v0.49.1/summary.md @@ -0,0 +1,13 @@ +This release continues the trend of further decoupling dependencies between the different `ibc-rs` +sub-crates and modules. + +In particular, the `prost` dependency is now only imported in the `ibc-primitives` +crate; note that error variants originating from `prost` have largely been removed, which is a breaking +change. The `bytes` dependency was also removed. Additionally, `CommitmentProofBytes` can now be +accessed without explicit ownership of the object which the proof is being queried for. + +Some other notable improvements include making the CosmWasm check more rigorous, streamlining the +`Msg` trait and renaming it to `ToProto`, as well as implementing custom JSON and Borsh `ChainId` +deserialization. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.50.0/breaking-changes/1036-bump-ibc-proto-to-v0-41-0.md b/.changelog/v0.50.0/breaking-changes/1036-bump-ibc-proto-to-v0-41-0.md new file mode 100644 index 000000000..30572655f --- /dev/null +++ b/.changelog/v0.50.0/breaking-changes/1036-bump-ibc-proto-to-v0-41-0.md @@ -0,0 +1,2 @@ +- [ibc] Bump `ibc-proto-rs` to v0.41.0 + ([\#1036](https://github.com/cosmos/ibc-rs/pull/1036)). diff --git a/.changelog/v0.50.0/bug-fixes/910-refactor-client-state-derive-to-handle-context-with-generics.md b/.changelog/v0.50.0/bug-fixes/910-refactor-client-state-derive-to-handle-context-with-generics.md new file mode 100644 index 000000000..90abb1fe1 --- /dev/null +++ b/.changelog/v0.50.0/bug-fixes/910-refactor-client-state-derive-to-handle-context-with-generics.md @@ -0,0 +1,2 @@ +- [ibc-derive] Refactor `ClientState` macro derivation to handle contexts with + generic types. ([\#910](https://github.com/cosmos/ibc-rs/issues/910)) diff --git a/.changelog/v0.50.0/bug-fixes/999-make-ibc-derive-work-with-ibc-core.md b/.changelog/v0.50.0/bug-fixes/999-make-ibc-derive-work-with-ibc-core.md new file mode 100644 index 000000000..587f8b3da --- /dev/null +++ b/.changelog/v0.50.0/bug-fixes/999-make-ibc-derive-work-with-ibc-core.md @@ -0,0 +1,2 @@ +- [ibc-derive] Adapt macro derivations to integrate with projects dependent on + `ibc-core` ([\#999](https://github.com/cosmos/ibc-rs/issues/999)). diff --git a/.changelog/v0.50.0/features/1030-implement-08-wasm-client-types.md b/.changelog/v0.50.0/features/1030-implement-08-wasm-client-types.md new file mode 100644 index 000000000..ed229a895 --- /dev/null +++ b/.changelog/v0.50.0/features/1030-implement-08-wasm-client-types.md @@ -0,0 +1,2 @@ +- [ibc-client-wasm-types] Implement ICS-08 Wasm light client domain types + ([\#1030](https://github.com/cosmos/ibc-rs/issues/1030)). diff --git a/.changelog/v0.50.0/features/1128-derive-schemars-on-some-ibc-core-structs.md b/.changelog/v0.50.0/features/1128-derive-schemars-on-some-ibc-core-structs.md new file mode 100644 index 000000000..9c1693c4e --- /dev/null +++ b/.changelog/v0.50.0/features/1128-derive-schemars-on-some-ibc-core-structs.md @@ -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)) diff --git a/.changelog/v0.50.0/features/1128-domain-request-response-query-types.md b/.changelog/v0.50.0/features/1128-domain-request-response-query-types.md new file mode 100644 index 000000000..ca903f850 --- /dev/null +++ b/.changelog/v0.50.0/features/1128-domain-request-response-query-types.md @@ -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)) diff --git a/.changelog/v0.50.0/features/346-implement-ics721-nft-transfer.md b/.changelog/v0.50.0/features/346-implement-ics721-nft-transfer.md new file mode 100644 index 000000000..0a68909ff --- /dev/null +++ b/.changelog/v0.50.0/features/346-implement-ics721-nft-transfer.md @@ -0,0 +1,2 @@ +- [ibc-app-nft-transfer] Implement ICS-721 NFT transfer application + ([\#346](https://github.com/cosmos/ibc-rs/issues/346)) diff --git a/.changelog/v0.50.0/improvements/1041-re-export-missing-types.md b/.changelog/v0.50.0/improvements/1041-re-export-missing-types.md new file mode 100644 index 000000000..eff7dec39 --- /dev/null +++ b/.changelog/v0.50.0/improvements/1041-re-export-missing-types.md @@ -0,0 +1,2 @@ +- [ibc-data-types] Re-export clients' domain type from `ibc-data-types` + ([\#1041](https://github.com/cosmos/ibc-rs/pull/1041)). diff --git a/.changelog/v0.50.0/improvements/1042-deprecate-mockcontext-new-methods.md b/.changelog/v0.50.0/improvements/1042-deprecate-mockcontext-new-methods.md new file mode 100644 index 000000000..7acac9522 --- /dev/null +++ b/.changelog/v0.50.0/improvements/1042-deprecate-mockcontext-new-methods.md @@ -0,0 +1,2 @@ +- [ibc-testkit] Deprecate `MockContext::new*` in favor of `MockContextConfig`. + ([\#1042](https://github.com/cosmos/ibc-rs/issues/1042)) diff --git a/.changelog/v0.50.0/improvements/1043-remove-field-access-of-mockcontext.md b/.changelog/v0.50.0/improvements/1043-remove-field-access-of-mockcontext.md new file mode 100644 index 000000000..8b0470932 --- /dev/null +++ b/.changelog/v0.50.0/improvements/1043-remove-field-access-of-mockcontext.md @@ -0,0 +1,2 @@ +- [ibc-testkit] Remove field access of `MockContext`. + ([\#1043](https://github.com/cosmos/ibc-rs/issues/1043)) diff --git a/.changelog/v0.50.0/improvements/1049-deprecate-mockcontext-withclient-methods.md b/.changelog/v0.50.0/improvements/1049-deprecate-mockcontext-withclient-methods.md new file mode 100644 index 000000000..900bc46eb --- /dev/null +++ b/.changelog/v0.50.0/improvements/1049-deprecate-mockcontext-withclient-methods.md @@ -0,0 +1,3 @@ +- [ibc-testkit] Deprecate `MockContext::with_client*` in favor of + `MockContext::with_client_config`. + ([\#1049](https://github.com/cosmos/ibc-rs/issues/1049)) diff --git a/.changelog/v0.50.0/improvements/1054-re-export-all-google-proto-types.md b/.changelog/v0.50.0/improvements/1054-re-export-all-google-proto-types.md new file mode 100644 index 000000000..ba220b316 --- /dev/null +++ b/.changelog/v0.50.0/improvements/1054-re-export-all-google-proto-types.md @@ -0,0 +1,3 @@ +- [ibc-primitives] Re-export additional google proto types, like `Timestamp` + and `Duration` for added convenience when developing IBC light clients or + applications. ([\#1054](https://github.com/cosmos/ibc-rs/pull/1054)) diff --git a/.changelog/v0.50.0/improvements/1055-move-serializers-into-ibc-primitives.md b/.changelog/v0.50.0/improvements/1055-move-serializers-into-ibc-primitives.md new file mode 100644 index 000000000..495624bc2 --- /dev/null +++ b/.changelog/v0.50.0/improvements/1055-move-serializers-into-ibc-primitives.md @@ -0,0 +1,3 @@ +- [ibc-primitives] Relocate `serializers.rs` module to reside within the + `ibc-primitives` crate extending its utility for a broader range of IBC + applications. ([\#1055](https://github.com/cosmos/ibc-rs/issues/1055)) diff --git a/.changelog/v0.50.0/summary.md b/.changelog/v0.50.0/summary.md new file mode 100644 index 000000000..0e8fd1cee --- /dev/null +++ b/.changelog/v0.50.0/summary.md @@ -0,0 +1,15 @@ +This release introduces several noteworthy libraries. A standout addition is the +implementation of the ICS-721 NFT transfer application, enabling the transfer of +NFT packets across chains that support this capability. + +In addition, It incorporates the ICS-08 Wasm light client data structure and +types. This empowers light client developers to create CosmWasm contracts for +deployment on Cosmos chains compatible with the version of `ibc-go` supporting +ICS-08 Wasm client. + +Moreover, it exposes additional convenient types and serializers through +`ibc-primitives` and includes a more flexible constructor for `MockContext` +types within the `ibc-testkit` crate, allows for testing with diverse parameter +combinations. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.51.0/breaking-changes/1114-refactor-client-relevant-apis.md b/.changelog/v0.51.0/breaking-changes/1114-refactor-client-relevant-apis.md new file mode 100644 index 000000000..42bf3fa7e --- /dev/null +++ b/.changelog/v0.51.0/breaking-changes/1114-refactor-client-relevant-apis.md @@ -0,0 +1,3 @@ +- [ibc] Refactor client relevant APIs for improved modularity and allow + standalone ICS-02 integration + ([\#1114](https://github.com/cosmos/ibc-rs/issues/1114)) diff --git a/.changelog/v0.51.0/breaking-changes/1118-bump-msrv.md b/.changelog/v0.51.0/breaking-changes/1118-bump-msrv.md new file mode 100644 index 000000000..631b644d3 --- /dev/null +++ b/.changelog/v0.51.0/breaking-changes/1118-bump-msrv.md @@ -0,0 +1,2 @@ +- [ibc] Increase minimum supported Rust version to 1.71.1 + ([\#1118](https://github.com/cosmos/ibc-rs/issues/1118)) diff --git a/.changelog/v0.51.0/breaking-changes/1125-upgrade-ibc-proto-to-v042.md b/.changelog/v0.51.0/breaking-changes/1125-upgrade-ibc-proto-to-v042.md new file mode 100644 index 000000000..8df9dec51 --- /dev/null +++ b/.changelog/v0.51.0/breaking-changes/1125-upgrade-ibc-proto-to-v042.md @@ -0,0 +1,2 @@ +- [ibc] Upgrade `ibc-proto-rs` to `v0.42.2` + ([\#1125](https://github.com/cosmos/ibc-rs/pull/1125)) diff --git a/.changelog/v0.51.0/breaking-changes/835-msg-update-client-handler-accept-misbehaviour.md b/.changelog/v0.51.0/breaking-changes/835-msg-update-client-handler-accept-misbehaviour.md new file mode 100644 index 000000000..6e6b8488e --- /dev/null +++ b/.changelog/v0.51.0/breaking-changes/835-msg-update-client-handler-accept-misbehaviour.md @@ -0,0 +1,3 @@ +- [ibc-core] Update `MsgUpdateClient` handler to accept misbehaviour reports via + its `client_message` field + ([\#835](https://github.com/cosmos/ibc-rs/issues/835)) diff --git a/.changelog/v0.51.0/breaking-changes/973-update-meta.md b/.changelog/v0.51.0/breaking-changes/973-update-meta.md new file mode 100644 index 000000000..97702e220 --- /dev/null +++ b/.changelog/v0.51.0/breaking-changes/973-update-meta.md @@ -0,0 +1,6 @@ +- [ibc-core-client] Merge client update time and height modification method + pairs into one, that is replace + a) client_update_{time,height} by update_meta, + b) store_update_{time,height} by store_update_meta and + c) delete_update_{time,height} by delete_update_meta. + ([\#973](https://github.com/cosmos/ibc-rs/issues/973)) diff --git a/.changelog/v0.51.0/bug-fixes/1059-add-missing-deps-for-feature-flags.md b/.changelog/v0.51.0/bug-fixes/1059-add-missing-deps-for-feature-flags.md new file mode 100644 index 000000000..42592cb58 --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1059-add-missing-deps-for-feature-flags.md @@ -0,0 +1,2 @@ +- [ibc] Add missing dependencies for some feature flags across multiple crates + ([\#1059](https://github.com/cosmos/ibc-rs/issues/1059)) diff --git a/.changelog/v0.51.0/bug-fixes/1061-ease-frozen-height-check-ics07-try-from.md b/.changelog/v0.51.0/bug-fixes/1061-ease-frozen-height-check-ics07-try-from.md new file mode 100644 index 000000000..d3aa5cacc --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1061-ease-frozen-height-check-ics07-try-from.md @@ -0,0 +1,5 @@ +- [ibc-client-tendermint-types] Ease frozen Height check in the tendermint + `ClientState` protobuf deserialization, and consequently include frozen client + check for client creation path. + ([\#1061](https://github.com/cosmos/ibc-rs/issues/1061)), + ([\#1063](https://github.com/cosmos/ibc-rs/pull/1063)) diff --git a/.changelog/v0.51.0/bug-fixes/1080-use-header-height-for-tm-consensus-state-storage.md b/.changelog/v0.51.0/bug-fixes/1080-use-header-height-for-tm-consensus-state-storage.md new file mode 100644 index 000000000..a9a3124ac --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1080-use-header-height-for-tm-consensus-state-storage.md @@ -0,0 +1,2 @@ +- [ibc-client-tendermint] Use header height for Tendermint consensus state storage + ([\#1080](https://github.com/cosmos/ibc-rs/issues/1080)) diff --git a/.changelog/v0.51.0/bug-fixes/1083-bump-serde-json.md b/.changelog/v0.51.0/bug-fixes/1083-bump-serde-json.md new file mode 100644 index 000000000..e3ffff7b4 --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1083-bump-serde-json.md @@ -0,0 +1,3 @@ +- [ibc] Upgrade `serde_json` to "1.0.1" to address an stack overflow issue + within the `serde-json-wasm` crate + ([\#1083](https://github.com/cosmos/ibc-rs/pull/1083)) diff --git a/.changelog/v0.51.0/bug-fixes/1084-fix-potential-base64-resolution-issue.md b/.changelog/v0.51.0/bug-fixes/1084-fix-potential-base64-resolution-issue.md new file mode 100644 index 000000000..17ab5aca2 --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1084-fix-potential-base64-resolution-issue.md @@ -0,0 +1,3 @@ +- [ibc] Resolve potential `base64` dependency resolution issue by bringing it to + the workspace `Cargo.toml` + ([\#1084](https://github.com/cosmos/ibc-rs/issues/1084)) diff --git a/.changelog/v0.51.0/bug-fixes/1100-fix-tendermint-empty-proof-specs-check.md b/.changelog/v0.51.0/bug-fixes/1100-fix-tendermint-empty-proof-specs-check.md new file mode 100644 index 000000000..b4a3aa542 --- /dev/null +++ b/.changelog/v0.51.0/bug-fixes/1100-fix-tendermint-empty-proof-specs-check.md @@ -0,0 +1,2 @@ +- [ibc-client-tendermint-types] Check ics23 proof specs for empty depth range. + ([\#1100](https://github.com/cosmos/ibc-rs/issues/1100)) diff --git a/.changelog/v0.51.0/feature/1065-add-new-storage-paths.md b/.changelog/v0.51.0/feature/1065-add-new-storage-paths.md new file mode 100644 index 000000000..8efd486b7 --- /dev/null +++ b/.changelog/v0.51.0/feature/1065-add-new-storage-paths.md @@ -0,0 +1,2 @@ +- [ibc-core-host] Add remaining storage paths. + ([\#1065](https://github.com/cosmos/ibc-rs/issues/1065)) diff --git a/.changelog/v0.51.0/feature/1090-add-iterate-consensus-states-key.md b/.changelog/v0.51.0/feature/1090-add-iterate-consensus-states-key.md new file mode 100644 index 000000000..9fef7afd9 --- /dev/null +++ b/.changelog/v0.51.0/feature/1090-add-iterate-consensus-states-key.md @@ -0,0 +1,3 @@ +- [ibc-core-host] Add iteration key for cross-compatibility with `ibc-go` used + for iterating over consensus states + ([\#1090](https://github.com/cosmos/ibc-rs/issues/1090)) diff --git a/.changelog/v0.51.0/feature/1147-allow-custom-HostFunctionsProvider.md b/.changelog/v0.51.0/feature/1147-allow-custom-HostFunctionsProvider.md new file mode 100644 index 000000000..dd792f66b --- /dev/null +++ b/.changelog/v0.51.0/feature/1147-allow-custom-HostFunctionsProvider.md @@ -0,0 +1,4 @@ +- [ibc] Enable the use of custom hashing functions by making `MerkleProof` + validation methods generic over `HostFunctionsProvider` and using + `hash_with()` instead of `hash()` wherever validators' hash is computed. + ([\#1147](https://github.com/cosmos/ibc-rs/issues/1147)) diff --git a/.changelog/v0.51.0/improvements/1060-ease-serde-derive-on-ics20-721-types.md b/.changelog/v0.51.0/improvements/1060-ease-serde-derive-on-ics20-721-types.md new file mode 100644 index 000000000..7d6fd9306 --- /dev/null +++ b/.changelog/v0.51.0/improvements/1060-ease-serde-derive-on-ics20-721-types.md @@ -0,0 +1,2 @@ +- [ibc-apps] Ease `serde` derive on `ICS-20` and `ICS-721` types + ([\#1060](https://github.com/cosmos/ibc-rs/pull/1060)) diff --git a/.changelog/v0.51.0/improvements/1074-refactor-default-implemetation.md b/.changelog/v0.51.0/improvements/1074-refactor-default-implemetation.md new file mode 100644 index 000000000..908463b41 --- /dev/null +++ b/.changelog/v0.51.0/improvements/1074-refactor-default-implemetation.md @@ -0,0 +1,2 @@ +- [ibc-data-types] Refactor `Default` implementations with concrete names + ([\#1074](https://github.com/cosmos/ibc-rs/issues/1074)) diff --git a/.changelog/v0.51.0/improvements/1077-deprecate-msgsubmitmisbehaviour.md b/.changelog/v0.51.0/improvements/1077-deprecate-msgsubmitmisbehaviour.md new file mode 100644 index 000000000..e92dc29d2 --- /dev/null +++ b/.changelog/v0.51.0/improvements/1077-deprecate-msgsubmitmisbehaviour.md @@ -0,0 +1,3 @@ +- [ibc-core] Deprecate `MsgSubmitMisbehaviour` in favor of `MsgUpdateClient` for + submitting misbehaviour reports + ([\#1077](https://github.com/cosmos/ibc-rs/issues/1077)) diff --git a/.changelog/v0.51.0/improvements/1089-implement-convenient-path-methods.md b/.changelog/v0.51.0/improvements/1089-implement-convenient-path-methods.md new file mode 100644 index 000000000..b93a64caf --- /dev/null +++ b/.changelog/v0.51.0/improvements/1089-implement-convenient-path-methods.md @@ -0,0 +1,3 @@ +- [ibc-core-host] Improve path segment access by exposing path prefixes and + implementing some convenient parent/leaf methods + ([\#1089](https://github.com/cosmos/ibc-rs/issues/1089)) diff --git a/.changelog/v0.51.0/improvements/1097-detach-client-state-verifier.md b/.changelog/v0.51.0/improvements/1097-detach-client-state-verifier.md new file mode 100644 index 000000000..35203b08c --- /dev/null +++ b/.changelog/v0.51.0/improvements/1097-detach-client-state-verifier.md @@ -0,0 +1,3 @@ +- [ibc-client-tendermint] Detach client state verifier such that users have a + way to utilize custom verifiers + ([\#1097](https://github.com/cosmos/ibc-rs/pull/1097)) diff --git a/.changelog/v0.51.0/improvements/1101-use-let-else-over-downcast.md b/.changelog/v0.51.0/improvements/1101-use-let-else-over-downcast.md new file mode 100644 index 000000000..876e19c91 --- /dev/null +++ b/.changelog/v0.51.0/improvements/1101-use-let-else-over-downcast.md @@ -0,0 +1,2 @@ +- [ibc-primitives] Use `let-else` over `downcast!()` and remove `utils/macros` + module as a result ([\#1118](https://github.com/cosmos/ibc-rs/issues/1118)) diff --git a/.changelog/v0.51.0/improvements/1120-rm-redundant-shadowing.md b/.changelog/v0.51.0/improvements/1120-rm-redundant-shadowing.md new file mode 100644 index 000000000..80eb17307 --- /dev/null +++ b/.changelog/v0.51.0/improvements/1120-rm-redundant-shadowing.md @@ -0,0 +1,2 @@ +- [ibc-core] Remove unnecessary shadowing with same value + ([\#1120](https://github.com/cosmos/ibc-rs/issues/1120)) diff --git a/.changelog/v0.51.0/improvements/1123-remove-check-for-unitialized-connection-end-state.md b/.changelog/v0.51.0/improvements/1123-remove-check-for-unitialized-connection-end-state.md new file mode 100644 index 000000000..cf37686ec --- /dev/null +++ b/.changelog/v0.51.0/improvements/1123-remove-check-for-unitialized-connection-end-state.md @@ -0,0 +1,3 @@ +- [ibc-core-connection] Remove `State::Uninitialized` check while parsing + `ConnectionEnd` from Protobuf + ([\#1123](https://github.com/cosmos/ibc-rs/issues/1123)) diff --git a/.changelog/v0.51.0/improvements/394-remove-order-match.md b/.changelog/v0.51.0/improvements/394-remove-order-match.md new file mode 100644 index 000000000..1997e6026 --- /dev/null +++ b/.changelog/v0.51.0/improvements/394-remove-order-match.md @@ -0,0 +1,2 @@ +- [ibc-core] Deprecate `ChannelEnd::order_matches` method + ([\#394](https://github.com/cosmos/ibc-rs/issues/394)) diff --git a/.changelog/v0.51.0/summary.md b/.changelog/v0.51.0/summary.md new file mode 100644 index 000000000..98bae05bc --- /dev/null +++ b/.changelog/v0.51.0/summary.md @@ -0,0 +1,11 @@ +This release introduces a few changes for better customizability. The main one is modularizing ICS-24, ICS-02, and ICS-07 trait implementations. This change empowers developers to write Rust light clients succinctly in a smart-contract context like CosmWasm. Also, the default Tendermint client state verifier is now detached to support custom verifiers, if required. + +In addition, this version fixes a bug where the consensus state is incorrectly stored when a header with an older height is submitted. + +Furthermore, a set of new host keys is added. This makes `ibc-rs` more consistent with the storage access of `ibc-go`. Also, access to client update information is merged into a single method; instead of individual details. + +This release updates the `ibc-proto-rs` dependency to `v0.42.2`. This takes account of the updated `MsgUpdateClient` and deprecates `MsgSubmitMisbehaviour`. Also, `ibc-derive` dependency is updated to `v0.6.1`. + +Finally, the minimum supported Rust version is corrected and updated to `1.71.1`. + +There are no consensus-breaking changes. diff --git a/.changelog/v0.52.0/breaking-changes/1163-make-ics07-custom-context-traits-portable.md b/.changelog/v0.52.0/breaking-changes/1163-make-ics07-custom-context-traits-portable.md new file mode 100644 index 000000000..726da305b --- /dev/null +++ b/.changelog/v0.52.0/breaking-changes/1163-make-ics07-custom-context-traits-portable.md @@ -0,0 +1,5 @@ +- [ibc] Enhance portability of custom `Validation/ExecutionContext` traits under + ICS-07. They are relocated, along with the rest of the + client-relevant context APIs, under ICS-02, with the traits renamed to + `ExtClientValidationContext` and `ExtClientExecutionContext` for improved + self-description ([\#1163](https://github.com/cosmos/ibc-rs/issues/1163)) diff --git a/.changelog/v0.52.0/breaking-changes/1168-discard-TmVerifier.md b/.changelog/v0.52.0/breaking-changes/1168-discard-TmVerifier.md new file mode 100644 index 000000000..3c84200a6 --- /dev/null +++ b/.changelog/v0.52.0/breaking-changes/1168-discard-TmVerifier.md @@ -0,0 +1,4 @@ +- [ibc-client-tendermint] Simplify custom verifiers usage for Tendermint + clients by directly binding with `tendermint_light_client_verifier::Verifier` + and removing the unused `TmVerifier` trait. + ([\#1168](https://github.com/cosmos/ibc-rs/pull/1168)) diff --git a/.changelog/v0.52.0/breaking-changes/1193-bump-msrv.md b/.changelog/v0.52.0/breaking-changes/1193-bump-msrv.md new file mode 100644 index 000000000..11e82593f --- /dev/null +++ b/.changelog/v0.52.0/breaking-changes/1193-bump-msrv.md @@ -0,0 +1,2 @@ +- [ibc] Update minimum supported Rust version to 1.72. + ([\#1193](https://github.com/cosmos/ibc-rs/issues/1193)) diff --git a/.changelog/v0.52.0/bug-fixes/1154-use-query-height-in-query-helper-functions.md b/.changelog/v0.52.0/bug-fixes/1154-use-query-height-in-query-helper-functions.md new file mode 100644 index 000000000..cf1e2bde2 --- /dev/null +++ b/.changelog/v0.52.0/bug-fixes/1154-use-query-height-in-query-helper-functions.md @@ -0,0 +1,2 @@ +- [ibc-query] Update standalone query functions to use the specified query + height ([\#1154](https://github.com/cosmos/ibc-rs/issues/1154)) diff --git a/.changelog/v0.52.0/bug-fixes/1177-fix-prefixed-denom-parsing.md b/.changelog/v0.52.0/bug-fixes/1177-fix-prefixed-denom-parsing.md new file mode 100644 index 000000000..cf89e9a52 --- /dev/null +++ b/.changelog/v0.52.0/bug-fixes/1177-fix-prefixed-denom-parsing.md @@ -0,0 +1,5 @@ +- [ibc-app-transfer] Bring `PrefixedDenom` parsing up to parity with `ibc-go`. + ([\#1177](https://github.com/cosmos/ibc-rs/issues/1177)) +- [ibc-app-nft-transfer] Reuse `TracePrefix` and `TracePath` from + `ibc-app-transfer-types` when parsing `PrefixedClassId`. + ([\#1178](https://github.com/cosmos/ibc-rs/pull/1178)) diff --git a/.changelog/v0.52.0/bug-fixes/1179-fix-packet-attribute-name.md b/.changelog/v0.52.0/bug-fixes/1179-fix-packet-attribute-name.md new file mode 100644 index 000000000..3040ade5d --- /dev/null +++ b/.changelog/v0.52.0/bug-fixes/1179-fix-packet-attribute-name.md @@ -0,0 +1,2 @@ +- [ibc-core-channel-types] Make receive packet event type identifier consistent + with `ibc-go`. ([\#1180](https://github.com/cosmos/ibc-rs/issues/1180)) diff --git a/.changelog/v0.52.0/features/1164-implement-cosmwasm-integrator-library.md b/.changelog/v0.52.0/features/1164-implement-cosmwasm-integrator-library.md new file mode 100644 index 000000000..3effca115 --- /dev/null +++ b/.changelog/v0.52.0/features/1164-implement-cosmwasm-integrator-library.md @@ -0,0 +1,3 @@ +- [ibc-clients] Introduce CosmWasm context library as `ibc-client-cw` crate to + facilitate CosmWasm contract creation for light clients built using `ibc-rs` + ([\#1164](https://github.com/cosmos/ibc-rs/issues/1164)) diff --git a/.changelog/v0.52.0/features/1165-implement-cosmwasm-contract-for-tendermint-clients.md b/.changelog/v0.52.0/features/1165-implement-cosmwasm-contract-for-tendermint-clients.md new file mode 100644 index 000000000..6f3d68acb --- /dev/null +++ b/.changelog/v0.52.0/features/1165-implement-cosmwasm-contract-for-tendermint-clients.md @@ -0,0 +1,3 @@ +- [ibc-client-tendermint] Introduce `ibc-client-tendermint-cw` crate + implementing CosmWasm contract for ICS-07 Tendermint light client. + ([\#1165](https://github.com/cosmos/ibc-rs/issues/1165)) diff --git a/.changelog/v0.52.0/features/738-client-recovery.md b/.changelog/v0.52.0/features/738-client-recovery.md new file mode 100644 index 000000000..a1d7c717f --- /dev/null +++ b/.changelog/v0.52.0/features/738-client-recovery.md @@ -0,0 +1,4 @@ +- [ibc-core-client] Implement [client recovery][client-recovery] feature. +([\#738](https://github.com/cosmos/ibc-rs/issues/738)) + +[client-recovery]: https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md diff --git a/.changelog/v0.52.0/improvements/1108-fallible-conversion-of-ics23-types.md b/.changelog/v0.52.0/improvements/1108-fallible-conversion-of-ics23-types.md new file mode 100644 index 000000000..3c9b5762a --- /dev/null +++ b/.changelog/v0.52.0/improvements/1108-fallible-conversion-of-ics23-types.md @@ -0,0 +1,2 @@ +- [ibc-core-commitment-types] Fallible conversion for `ProofSpec`, `LeafOp` and + `InnerSpec`. ([\#1108](https://github.com/cosmos/ibc-rs/issues/1108)) diff --git a/.changelog/v0.52.0/improvements/1145-tendermint-boxed-header.md b/.changelog/v0.52.0/improvements/1145-tendermint-boxed-header.md new file mode 100644 index 000000000..65f090962 --- /dev/null +++ b/.changelog/v0.52.0/improvements/1145-tendermint-boxed-header.md @@ -0,0 +1,4 @@ +- [ibc-client-tendermint-types] Box header fields inside of Misbehaviour type so + that the type is smaller (i.e. trade size of the type for heap memory). This + prevents stack overflows on systems with small stack (e.g. Solana). + ([\#1145](https://github.com/cosmos/ibc-rs/pull/1145)) diff --git a/.changelog/v0.52.0/improvements/1149-flatten-client-message-verification-methods.md b/.changelog/v0.52.0/improvements/1149-flatten-client-message-verification-methods.md new file mode 100644 index 000000000..75bb28043 --- /dev/null +++ b/.changelog/v0.52.0/improvements/1149-flatten-client-message-verification-methods.md @@ -0,0 +1,4 @@ +- [ibc-client-tendermint] Decouple the arguments of ICS07 Header/Misbehavior + verification functions from the Tendermint client type by flattening and + passing only the required fields. + ([\#1149](https://github.com/cosmos/ibc-rs/issues/1149)) diff --git a/.changelog/v0.52.0/improvements/1152-add-query-height-and-proof-for-client-upgrade-queries.md b/.changelog/v0.52.0/improvements/1152-add-query-height-and-proof-for-client-upgrade-queries.md new file mode 100644 index 000000000..4b7bee3d2 --- /dev/null +++ b/.changelog/v0.52.0/improvements/1152-add-query-height-and-proof-for-client-upgrade-queries.md @@ -0,0 +1,3 @@ +- [ibc-query] Add support for querying `upgraded_client/consensus_state` at a + given height along with returning their proof of existence in the response. + ([\#1152](https://github.com/cosmos/ibc-rs/issues/1152)) diff --git a/.changelog/v0.52.0/improvements/1156-add-into-inner-for-ics07-consensus-state.md b/.changelog/v0.52.0/improvements/1156-add-into-inner-for-ics07-consensus-state.md new file mode 100644 index 000000000..08c42925b --- /dev/null +++ b/.changelog/v0.52.0/improvements/1156-add-into-inner-for-ics07-consensus-state.md @@ -0,0 +1,2 @@ +- [ibc-client-tendermint] Add `into_inner()` method to ICS07 `ConsensusState` + ([\#1156](https://github.com/cosmos/ibc-rs/pull/1156)) diff --git a/.changelog/v0.52.0/improvements/1171-update-ibc-proto-and-tendermint-deps.md b/.changelog/v0.52.0/improvements/1171-update-ibc-proto-and-tendermint-deps.md new file mode 100644 index 000000000..0b48c06b4 --- /dev/null +++ b/.changelog/v0.52.0/improvements/1171-update-ibc-proto-and-tendermint-deps.md @@ -0,0 +1,2 @@ +- Update `ibc-proto` to v0.43.0 and `tendermint` dependencies to v0.35.0. + ([\#1171](https://github.com/cosmos/ibc-rs/issues/1171)) diff --git a/.changelog/v0.52.0/summary.md b/.changelog/v0.52.0/summary.md new file mode 100644 index 000000000..eeb7f51bb --- /dev/null +++ b/.changelog/v0.52.0/summary.md @@ -0,0 +1,18 @@ +This release adds some exciting changes, improvements, and new features to ibc-rs. +First and foremost, support for the IBC protocol's [client recovery][client-recovery] +mechanism has been implemented, which provides a route for frozen and expired IBC clients +to be re-instated following a successful governance vote. In addition, a new crate, +`ibc-client-cw`, facilitates CosmWasm contract creation for light clients built using +`ibc-rs`. Lastly, the ics07 tendermint light client has also been packaged and included +as a CosmWasm contract. + +This release also includes a myriad of other bug-fixes and improvements, +such as enhancing the portability of ibc-rs's Validation and Execution Context traits, +as well as fixing an incompatibility with how ibc-rs parses `PrefixDenom`s compared +to ibc-go, among many others. + +The minimum-supported Rust version has been updated to `1.72`. `ibc-proto` has been +bumped to `0.43`. `tendermint` has been bumped to `0.35`. `ibc-derive` has been +bumped to `0.7`. + +There are no consensus-breaking changes as part of this release. diff --git a/.changelog/v0.53.0/bug-fixes/1198-reject-packets-without-timeouts.md b/.changelog/v0.53.0/bug-fixes/1198-reject-packets-without-timeouts.md new file mode 100644 index 000000000..969081559 --- /dev/null +++ b/.changelog/v0.53.0/bug-fixes/1198-reject-packets-without-timeouts.md @@ -0,0 +1,2 @@ +- [ibc-core] Reject IBC packets without height and timestamp timeout. + ([\#1198](https://github.com/cosmos/ibc-rs/issues/1198)) diff --git a/.changelog/v0.53.0/bug-fixes/1217-fix-packet-timeout-on-closed-channel.md b/.changelog/v0.53.0/bug-fixes/1217-fix-packet-timeout-on-closed-channel.md new file mode 100644 index 000000000..e98541b39 --- /dev/null +++ b/.changelog/v0.53.0/bug-fixes/1217-fix-packet-timeout-on-closed-channel.md @@ -0,0 +1,2 @@ +- [ibc-core] Fix proof verification for `PacketTimeout` on a closed channel. + ([\#1217](https://github.com/cosmos/ibc-rs/issues/1217)) diff --git a/.changelog/v0.53.0/improvements/1044-introduce-host-trait.md b/.changelog/v0.53.0/improvements/1044-introduce-host-trait.md new file mode 100644 index 000000000..d8b95983e --- /dev/null +++ b/.changelog/v0.53.0/improvements/1044-introduce-host-trait.md @@ -0,0 +1,3 @@ +- [ibc-testkit] Replace `HostBlock` and `HostType` enums with a `Host` trait to + eliminate manual delegations by utilizing monomorphization. + ([\#1044](https://github.com/cosmos/ibc-rs/issues/1044)) diff --git a/.changelog/v0.53.0/improvements/1109-revamp-ibc-testkit.md b/.changelog/v0.53.0/improvements/1109-revamp-ibc-testkit.md new file mode 100644 index 000000000..58dd859e8 --- /dev/null +++ b/.changelog/v0.53.0/improvements/1109-revamp-ibc-testkit.md @@ -0,0 +1,3 @@ +- [ibc-testkit] Major refactor of the `ibc-testkit` via + [ADR-09](https://github.com/cosmos/ibc-rs/blob/main/docs/architecture/adr-009-revamp-testkit.md). + ([\#1109](https://github.com/cosmos/ibc-rs/issues/1109)) diff --git a/.changelog/v0.53.0/improvements/1203-rm-error-type-restriction.md b/.changelog/v0.53.0/improvements/1203-rm-error-type-restriction.md new file mode 100644 index 000000000..1e95230f6 --- /dev/null +++ b/.changelog/v0.53.0/improvements/1203-rm-error-type-restriction.md @@ -0,0 +1,3 @@ +- [ibc-core] Replace fixed `ClientError` associated type restriction with an + `Into` trait bound. + ([\#1203](https://github.com/cosmos/ibc-rs/issues/1203)) diff --git a/.changelog/v0.53.0/improvements/1212-update-ibc-proto-and-tendermint-deps.md b/.changelog/v0.53.0/improvements/1212-update-ibc-proto-and-tendermint-deps.md new file mode 100644 index 000000000..849ca0ac6 --- /dev/null +++ b/.changelog/v0.53.0/improvements/1212-update-ibc-proto-and-tendermint-deps.md @@ -0,0 +1,4 @@ +- Update `ibc-proto` to v0.44.0 and `tendermint` dependencies to v0.36.0. + ([\#1212](https://github.com/cosmos/ibc-rs/issues/1212)) +- Revert Rust minimum supported version to `1.71.1`. + ([\#1206](https://github.com/cosmos/ibc-rs/pull/1206)) diff --git a/.changelog/v0.53.0/summary.md b/.changelog/v0.53.0/summary.md new file mode 100644 index 000000000..03a7d24eb --- /dev/null +++ b/.changelog/v0.53.0/summary.md @@ -0,0 +1,22 @@ +This release overhauls the `ibc-testkit` crate such that it is now able to: + +- simulate more realistic IBC workflows by utilizing real IBC and relayer + interfaces (as opposed to mocked versions) +- validate code paths that were not easily testable beforehand, such as Merkle + proof generation +- compose tests in a much more succinct and readable fashion + +Note that the drastic changes made to `ibc-testkit`'s structs and types are +breaking changes. + +For more information and background context on the changes to `ibc-testkit` and +the rationale behind the overhaul, please refer to [ADR 009][adr-009]. + +This release also includes two fixes. One is to reject packets without height +and timestamp timeout. The other is to correct the proof verification logic for +a `PacketTimeout` due to a closed channel, which was verifying an incorrect +field. It also bumps the minimum-supported version of `ibc-proto` to 0.44, and +the version of `tendermint` to 0.36. Note that the minimum-supported Rust +version was reverted back to 1.71.1. + +[adr-009]: https://github.com/cosmos/ibc-rs/blob/main/docs/architecture/adr-009-revamp-testkit.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index f825fd0f1..33b15fa70 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,13 +1,13 @@ --- -name: Bug Report +name: Bug Report about: Create a report to help us squash bugs! --- - ## Bug Summary diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 8bd708247..7b50c781b 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -4,11 +4,11 @@ about: Create a proposal to request a feature! --- - ## Feature Summary diff --git a/.github/ISSUE_TEMPLATE/process-improvement.md b/.github/ISSUE_TEMPLATE/process-improvement.md index 05a7073cf..1cf320562 100644 --- a/.github/ISSUE_TEMPLATE/process-improvement.md +++ b/.github/ISSUE_TEMPLATE/process-improvement.md @@ -5,17 +5,17 @@ about: Create a proposal to suggest an improvement for `ibc-rs` operations! --- ## Improvement Summary - + ## Proposal - + diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fb75b4861..0e2e3b557 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,11 +4,33 @@ version: 2 updates: - package-ecosystem: "cargo" - directory: "crates/ibc" + directory: "/" schedule: interval: "weekly" - + ignore: + - dependency-name: "tendermint*" + - dependency-name: "ibc*" + - dependency-name: "cosmwasm*" + - dependency-name: "cw*" - package-ecosystem: "cargo" directory: "ci/no-std-check" schedule: interval: "weekly" + ignore: + - dependency-name: "tendermint*" + - dependency-name: "ibc*" + - dependency-name: "cosmwasm*" + - dependency-name: "cw*" + - package-ecosystem: "cargo" + directory: "ci/cw-check" + schedule: + interval: "weekly" + ignore: + - dependency-name: "tendermint*" + - dependency-name: "ibc*" + - dependency-name: "cosmwasm*" + - dependency-name: "cw*" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/typos.toml b/.github/typos.toml new file mode 100644 index 000000000..800f45933 --- /dev/null +++ b/.github/typos.toml @@ -0,0 +1,7 @@ +[default.extend-words] +# for serde serialization +ser = "ser" + +[default] +# random string +extend-ignore-re = [ "[0-9A-Za-z+/]{20,}" ] diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 4ca65ae9f..b4f1f3118 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -1,16 +1,16 @@ name: Security Audit on: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" jobs: security_audit: name: Security Audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache cargo bin - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cargo/bin key: ${{ runner.os }}-cargo-audit-v0.11.2 diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml new file mode 100644 index 000000000..0254773d2 --- /dev/null +++ b/.github/workflows/code-quality.yaml @@ -0,0 +1,27 @@ +name: Code Quality Checks +on: + pull_request: + +jobs: + code-quality: + runs-on: ubuntu-latest + env: + RIPGREP_VERSION: 14.1.0 + FD_VERSION: 9.0.0 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Whitestapace lints + run: bash ci/code-quality/whitespace-lints.sh + + - name: Spell Check with Typos + uses: crate-ci/typos@v1.21.0 + with: + config: ./.github/typos.toml + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: baptiste0928/cargo-install@v3 + with: + crate: taplo-cli + - run: taplo fmt --check diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yaml similarity index 67% rename from .github/workflows/coverage.yml rename to .github/workflows/coverage.yaml index 1f9c332ba..60346fe1f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yaml @@ -2,12 +2,20 @@ name: Coverage on: pull_request: paths: - - .codecov.yml - - .github/workflows/rust.yml - - .github/workflows/coverage.yml + - .codecov.yaml + - .github/workflows/rust.yaml + - .github/workflows/coverage.yaml - Cargo.toml - ci/** - - crates/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-query/** + - ibc-testkit/** + - ibc-derive/** push: branches: - main @@ -16,7 +24,7 @@ permissions: contents: read concurrency: - group: rust-ci-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: @@ -33,12 +41,11 @@ jobs: name: Code Coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Install cargo-nextest @@ -46,7 +53,7 @@ jobs: - name: Generate code coverage run: cargo llvm-cov nextest --all-features --lcov --output-path lcov.info - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/cw-check.yaml b/.github/workflows/cw-check.yaml new file mode 100644 index 000000000..b0a66d4e4 --- /dev/null +++ b/.github/workflows/cw-check.yaml @@ -0,0 +1,62 @@ +name: CosmWasm Compilation Check +on: + pull_request: + paths: + - .github/workflows/cw-check.yaml + - Cargo.toml + - Cargo.lock + - ci/cw-check/** + - ci/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-derive/** + push: + tags: + - v[0-9]+.* + branches: + - "release/*" + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} + +jobs: + cw-check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + + # only for caching cargo build artifacts from `cosmwasm/optimizer` + - uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Create mount directories + run: mkdir -p "${HOME}/.cargo/registry" "$(pwd)"/target + + - name: Compile `cw-check` + run: | + docker run \ + -v "$(pwd)":/code \ + -v "$(pwd)"/target:/target \ + -v "${HOME}/.cargo/registry":/usr/local/cargo/registry \ + cosmwasm/optimizer:0.15.1 ./ci/cw-check + + - name: Fix permissions + run: | + sudo chown -R $(id -u):$(id -g) "$(pwd)"/target + sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo/registry" + + - name: Install `cosmwasm-check` from crates.io + uses: baptiste0928/cargo-install@v3 + with: + crate: cosmwasm-check + + - name: Check compiled CosmWasm contract + working-directory: artifacts + run: | + sha256sum -c checksums.txt + cosmwasm-check cw_check.wasm diff --git a/.github/workflows/markdown-link-check.yaml b/.github/workflows/markdown-link-check.yaml new file mode 100644 index 000000000..b95f1c746 --- /dev/null +++ b/.github/workflows/markdown-link-check.yaml @@ -0,0 +1,18 @@ +name: Check Markdown links + +on: + schedule: + - cron: "0 0 * * *" # At 00:00 + pull_request: + +jobs: + md-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: markdown-link-check + uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 + with: + config-file: ".github/markdown-link-check.json" + use-quiet-mode: "yes" + folder-path: ${{ github.event_name == 'pull_request' && 'docs' || '.' }} diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml deleted file mode 100644 index c699a8551..000000000 --- a/.github/workflows/markdown-link-check.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Check Markdown links - -on: - schedule: - - cron: '0 0 * * *' - - workflow_dispatch: - -jobs: - md-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: markdown-link-check - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 - with: - config-file: '.github/markdown-link-check.json' - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' diff --git a/.github/workflows/no-std.yaml b/.github/workflows/no-std.yaml index f2e0c3407..03919ddda 100644 --- a/.github/workflows/no-std.yaml +++ b/.github/workflows/no-std.yaml @@ -2,44 +2,51 @@ name: no_std check on: pull_request: paths: - - .github/workflows/no-std.yml + - .github/workflows/no-std.yaml - Cargo.toml - Cargo.lock + - ci/no-std-check/** - ci/** - - crates/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-derive/** push: - branches: main - paths: - - .github/workflows/no-std.yml - - Cargo.toml - - Cargo.lock - - ci/** - - crates/** + tags: + - v[0-9]+.* + branches: + - "release/*" + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} jobs: check-no-std-panic-conflict: name: Check no_std panic conflict runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - run: | cd ci/no-std-check - make check-panic-conflict + make check-no-std check-substrate: name: Check no_std substrate support runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: nightly + toolchain: nightly-2024-02-24 target: wasm32-unknown-unknown - override: true - run: | cd ci/no-std-check make check-substrate diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..786d1c68f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,72 @@ +# Attempts to perform a release when a particular tag is pushed. This job uses +# the `cargo release` command and assumes that the `CRATES_TOKEN`secret has +# been set and contains an API token with which we can publish our crates to +# crates.io. +# +# The `ibc-derive` publishing process is managed manually since it's not +# consistently published with every release. +# +# If release operation fails partway through due to a temporary error (e.g. the +# crate being published depends on the crate published just prior, but the prior +# crate isn't yet available via crates.io), one can simply rerun this workflow. +name: Release + +on: + push: + branches: + - "release/*" + tags: + - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v0.26.0, v1.0.0 + - "v[0-9]+.[0-9]+.[0-9]+-pre.[0-9]+" # e.g. v0.26.0-pre.1 + +jobs: + publish-check: + if: github.ref_type != 'tag' + name: Check publish to crates.io (dry run) + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - name: Install `cargo-release` from crates.io + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-release + - name: Publish crates (dry run) + run: make check-release + + publish: + if: github.ref_type == 'tag' + name: Publish to crates.io + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - name: Install `cargo-release` from crates.io + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-release + - name: Publish crates + run: yes | make release + env: + # https://doc.rust-lang.org/cargo/commands/cargo-publish.html#options + # argument for `--token` is specified with this environment variable + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + gh-release: + if: github.ref_type == 'tag' + needs: publish + name: Create GitHub release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml new file mode 100644 index 000000000..e1053e897 --- /dev/null +++ b/.github/workflows/rust.yaml @@ -0,0 +1,176 @@ +name: Rust +on: + pull_request: + paths: + - .github/workflows/rust.yaml + - Cargo.toml + - ci/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-query/** + - ibc-testkit/** + - ibc-derive/** + push: + tags: + - v[0-9]+.* + branches: + - "release/*" + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} + +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 1 + CARGO_PROFILE_RELEASE_DEBUG: 1 + RUST_BACKTRACE: short + CARGO_NET_RETRY: 10 + RUSTUP_MAX_RETRIES: 10 + +jobs: + check-features: + name: Check features + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - name: Run cargo hack + run: make check-features + + nightly_fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: nightly # Since fmt uses unstable features for organizing imports + components: rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy_all_features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + components: clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features --all-targets + + clippy_no_default_features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + components: clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --no-default-features --lib + + doc_all_features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: doc + args: --all-features --release + + doc_no_default_features: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-default-features --release + + test-stable: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --no-fail-fast --no-run + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --no-fail-fast --workspace -- --nocapture + - uses: actions-rs/cargo@v1 + with: + command: test + args: --no-default-features --no-fail-fast --no-run + + test-msrv: + timeout-minutes: 30 + env: + CARGO_MSRV_VERSION: 0.16.0-beta.20 + MSRV: 1.71.1 + strategy: + matrix: + param: + [ + { os: ubuntu-latest, system: unknown-linux-gnu }, + { os: macos-latest, system: apple-darwin }, + ] + runs-on: ${{ matrix.param.os }} + steps: + - uses: actions/checkout@v4 + + - name: Download cargo-msrv + uses: dsaltares/fetch-gh-release-asset@master + with: + repo: foresterre/cargo-msrv + version: "tags/v${{ env.CARGO_MSRV_VERSION }}" + file: "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}.tgz" + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: ${{ env.MSRV }} + + - name: Install cargo-msrv + run: | + tar -xzf "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}.tgz" + mv "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}/cargo-msrv" ~/.cargo/bin + cargo msrv --version + + - name: Calculate MSRV + run: cargo msrv --output-format minimal --min 1.64.0 + + - name: Build with MSRV + uses: actions-rs/cargo@v1 + with: + toolchain: ${{ env.MSRV }} + command: build + args: --all-features diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 740d384c1..000000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Rust -on: - pull_request: - paths: - - .github/workflows/rust.yml - - Cargo.toml - - ci/** - - crates/** - push: - branches: main - paths: - - .github/workflows/rust.yml - - Cargo.toml - - ci/** - - crates/** - -env: - CARGO_INCREMENTAL: 0 - CARGO_PROFILE_DEV_DEBUG: 1 - CARGO_PROFILE_RELEASE_DEBUG: 1 - RUST_BACKTRACE: short - CARGO_NET_RETRY: 10 - RUSTUP_MAX_RETRIES: 10 - -jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - doc_all_features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: doc - args: --all-features --release - - doc_no_default_features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: doc - args: --no-default-features --release - - clippy_all_features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features --all-targets - - clippy_no_default_features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --no-default-features --lib - - test-stable: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --no-fail-fast --no-run - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --no-fail-fast --workspace -- --nocapture diff --git a/.github/workflows/upload-cw-clients.yaml b/.github/workflows/upload-cw-clients.yaml new file mode 100644 index 000000000..6ee12e7e4 --- /dev/null +++ b/.github/workflows/upload-cw-clients.yaml @@ -0,0 +1,94 @@ +name: Upload precompiled CosmWasm clients +on: + pull_request: + paths: + - .github/workflows/upload-cw-clients.yaml + - Cargo.toml + - ci/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-query/** + - ibc-testkit/** + - ibc-derive/** + push: + branches: main + paths: + - .github/workflows/upload-cw-clients.yaml + - Cargo.toml + - ci/** + - ibc/** + - ibc-core/** + - ibc-apps/** + - ibc-data-types/** + - ibc-clients/** + - ibc-primitives/** + - ibc-query/** + - ibc-testkit/** + - ibc-derive/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + upload-tendermint-cw-client: + name: Upload precompiled Tendermint CosmWasm client + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + + # `cosmwasm/optimizer` requires `Cargo.lock`. but currently, + # `Cargo.lock` is not committed, because `ibc-rs` is treated as library. + - name: Produce `Cargo.lock` file + run: cargo update -p ibc-client-tendermint-cw + + - name: Create mount directories + run: mkdir -p "${HOME}/.cargo/registry" "$(pwd)"/target + + - name: Compile cosmwasm blob for tendermint light client + run: | + docker run \ + -v "$(pwd)":/code \ + -v "$(pwd)"/target:/target \ + -v "${HOME}/.cargo/registry":/usr/local/cargo/registry \ + cosmwasm/optimizer:0.15.1 ./ibc-clients/ics07-tendermint/cw-contract + + - name: Fix permissions + run: | + sudo chown -R $(id -u):$(id -g) "$(pwd)"/target + sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo/registry" + + - name: Install `cosmwasm-check` from crates.io + uses: baptiste0928/cargo-install@v3 + with: + crate: cosmwasm-check + + - name: Check compiled CosmWasm contract + working-directory: artifacts + run: | + sha256sum -c checksums.txt + cosmwasm-check ibc_client_tendermint_cw.wasm + + - name: Upload compiled CosmWasm contract + uses: actions/upload-artifact@v4 + with: + name: tendermint-cw-client + path: artifacts/ibc_client_tendermint_cw.wasm + # Retain the artifact for 1 week for PRs and 3 months for `main` branch + retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }} + overwrite: true + + # # An example workflow to download the artifact: + # - uses: actions/download-artifact@v4 + # with: + # name: tendermint-cw-client + # repository: cosmos/ibc-rs + # run-id: ${{ env.UPLOAD_WASM_RUN_ID }} + # github-token: ${{ secrets.GITHUB_TOKEN }} + # - run: ls ibc_client_tendermint_cw.wasm diff --git a/.gitignore b/.gitignore index fad389dbc..42f1212d9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,6 @@ target/ # Ignore VisualStudio .vscode -# Ignore chain's data -data - # Ignore Python artifacts .mypy_cache/ __pycache__/ @@ -32,5 +29,8 @@ mc.log # Specifically, we want the ci/no-std-check/Cargo.lock to be committed # to ensure a reproducible CI build for that crate. # This will make it easier to spot bugs such as [this one](https://github.com/cosmos/ibc-rs/pull/560) -# caused by a dependency updated to a faulty version. +# caused by a dependency updated to a faulty version. /Cargo.lock + +# Ignore CosmWasm artifacts +/cw-contracts diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 000000000..b8be2d434 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,8 @@ +{ + "default": true, + "MD013": false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013---line-length + "MD024": false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md024---multiple-headings-with-the-same-content + "MD033": false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033---inline-html + "MD036": false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md036---emphasis-used-instead-of-a-heading + "MD041": false // https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md041---first-line-in-a-file-should-be-a-top-level-heading +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 33ab163dd..2d5326ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,680 @@ # CHANGELOG +## v0.53.0 + +*May 13, 2024* + +This release overhauls the `ibc-testkit` crate such that it is now able to: + +- simulate more realistic IBC workflows by utilizing real IBC and relayer + interfaces (as opposed to mocked versions) +- validate code paths that were not easily testable beforehand, such as Merkle + proof generation +- compose tests in a much more succinct and readable fashion + +Note that the drastic changes made to `ibc-testkit`'s structs and types are +breaking changes. + +For more information and background context on the changes to `ibc-testkit` and +the rationale behind the overhaul, please refer to [ADR 009][adr-009]. + +This release also includes two fixes. One is to reject packets without height +and timestamp timeout. The other is to correct the proof verification logic for +a `PacketTimeout` due to a closed channel, which was verifying an incorrect +field. It also bumps the minimum-supported version of `ibc-proto` to 0.44, and +the version of `tendermint` to 0.36. Note that the minimum-supported Rust +version was reverted back to 1.71.1. + +[adr-009]: https://github.com/cosmos/ibc-rs/blob/main/docs/architecture/adr-009-revamp-testkit.md + +### BUG FIXES + +- [ibc-core] Reject IBC packets without height and timestamp timeout. + ([\#1198](https://github.com/cosmos/ibc-rs/issues/1198)) +- [ibc-core] Fix proof verification for `PacketTimeout` on a closed channel. + ([\#1217](https://github.com/cosmos/ibc-rs/issues/1217)) + +### IMPROVEMENTS + +- [ibc-testkit] Replace `HostBlock` and `HostType` enums with a `Host` trait to + eliminate manual delegations by utilizing monomorphization. + ([\#1044](https://github.com/cosmos/ibc-rs/issues/1044)) +- [ibc-testkit] Major refactor of the `ibc-testkit` via + [ADR-09](https://github.com/cosmos/ibc-rs/blob/main/docs/architecture/adr-009-revamp-testkit.md). + ([\#1109](https://github.com/cosmos/ibc-rs/issues/1109)) +- [ibc-core] Replace fixed `ClientError` associated type restriction with an + `Into` trait bound. + ([\#1203](https://github.com/cosmos/ibc-rs/issues/1203)) +- Update `ibc-proto` to v0.44.0 and `tendermint` dependencies to v0.36.0. + ([\#1212](https://github.com/cosmos/ibc-rs/issues/1212)) +- Revert Rust minimum supported version to `1.71.1`. + ([\#1206](https://github.com/cosmos/ibc-rs/pull/1206)) + +## v0.52.0 + +*April 26, 2024* + +This release adds some exciting changes, improvements, and new features to ibc-rs. +First and foremost, support for the IBC protocol's [client recovery][client-recovery] +mechanism has been implemented, which provides a route for frozen and expired IBC clients +to be re-instated following a successful governance vote. In addition, a new crate, +`ibc-client-cw`, facilitates CosmWasm contract creation for light clients built using +`ibc-rs`. Lastly, the ics07 tendermint light client has also been packaged and included +as a CosmWasm contract. + +This release also includes a myriad of other bug-fixes and improvements, +such as enhancing the portability of ibc-rs's Validation and Execution Context traits, +as well as fixing an incompatibility with how ibc-rs parses `PrefixDenom`s compared +to ibc-go, among many others. + +The minimum-supported Rust version has been updated to `1.72`. `ibc-proto` has been +bumped to `0.43`. `tendermint` has been bumped to `0.35`. `ibc-derive` has been +bumped to `0.7`. + +There are no consensus-breaking changes as part of this release. + +### BREAKING CHANGES + +- [ibc] Enhance portability of custom `Validation/ExecutionContext` traits under + ICS-07. They are relocated, along with the rest of the + client-relevant context APIs, under ICS-02, with the traits renamed to + `ExtClientValidationContext` and `ExtClientExecutionContext` for improved + self-description ([\#1163](https://github.com/cosmos/ibc-rs/issues/1163)) +- [ibc-client-tendermint] Simplify custom verifiers usage for Tendermint + clients by directly binding with `tendermint_light_client_verifier::Verifier` + and removing the unused `TmVerifier` trait. + ([\#1168](https://github.com/cosmos/ibc-rs/pull/1168)) +- [ibc] Update minimum supported Rust version to 1.72. + ([\#1193](https://github.com/cosmos/ibc-rs/issues/1193)) + +### BUG FIXES + +- [ibc-query] Update standalone query functions to use the specified query + height ([\#1154](https://github.com/cosmos/ibc-rs/issues/1154)) +- [ibc-app-transfer] Bring `PrefixedDenom` parsing up to parity with `ibc-go`. + ([\#1177](https://github.com/cosmos/ibc-rs/issues/1177)) +- [ibc-app-nft-transfer] Reuse `TracePrefix` and `TracePath` from + `ibc-app-transfer-types` when parsing `PrefixedClassId`. + ([\#1178](https://github.com/cosmos/ibc-rs/pull/1178)) +- [ibc-core-channel-types] Make receive packet event type identifier consistent + with `ibc-go`. ([\#1180](https://github.com/cosmos/ibc-rs/issues/1180)) + +### FEATURES + +- [ibc-core-client] Implement [client recovery][client-recovery] feature. + ([\#738](https://github.com/cosmos/ibc-rs/issues/738)) +- [ibc-clients] Introduce CosmWasm context library as `ibc-client-cw` crate to + facilitate CosmWasm contract creation for light clients built using `ibc-rs` + ([\#1164](https://github.com/cosmos/ibc-rs/issues/1164)) +- [ibc-client-tendermint] Introduce `ibc-client-tendermint-cw` crate + implementing CosmWasm contract for ICS-07 Tendermint light client. + ([\#1165](https://github.com/cosmos/ibc-rs/issues/1165)) + +[client-recovery]: https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md + +### IMPROVEMENTS + +- [ibc-core-commitment-types] Fallible conversion for `ProofSpec`, `LeafOp` and + `InnerSpec`. ([\#1108](https://github.com/cosmos/ibc-rs/issues/1108)) +- [ibc-client-tendermint-types] Box header fields inside of Misbehaviour type so + that the type is smaller (i.e. trade size of the type for heap memory). This + prevents stack overflows on systems with small stack (e.g. Solana). + ([\#1145](https://github.com/cosmos/ibc-rs/pull/1145)) +- [ibc-client-tendermint] Decouple the arguments of ICS07 Header/Misbehavior + verification functions from the Tendermint client type by flattening and + passing only the required fields. + ([\#1149](https://github.com/cosmos/ibc-rs/issues/1149)) +- [ibc-query] Add support for querying `upgraded_client/consensus_state` at a + given height along with returning their proof of existence in the response. + ([\#1152](https://github.com/cosmos/ibc-rs/issues/1152)) +- [ibc-client-tendermint] Add `into_inner()` method to ICS07 `ConsensusState` + ([\#1156](https://github.com/cosmos/ibc-rs/pull/1156)) +- Update `ibc-proto` to v0.43.0 and `tendermint` dependencies to v0.35.0. + ([\#1171](https://github.com/cosmos/ibc-rs/issues/1171)) + +## v0.51.0 + +*March 26, 2024* + +This release introduces a few changes for better customizability. The main one is modularizing ICS-24, ICS-02, and ICS-07 trait implementations. This change empowers developers to write Rust light clients succinctly in a smart-contract context like CosmWasm. Also, the default Tendermint client state verifier is now detached to support custom verifiers, if required. + +In addition, this version fixes a bug where the consensus state is incorrectly stored when a header with an older height is submitted. + +Furthermore, a set of new host keys is added. This makes `ibc-rs` more consistent with the storage access of `ibc-go`. Also, access to client update information is merged into a single method; instead of individual details. + +This release updates the `ibc-proto-rs` dependency to `v0.42.2`. This takes account of the updated `MsgUpdateClient` and deprecates `MsgSubmitMisbehaviour`. Also, `ibc-derive` dependency is updated to `v0.6.1`. +Finally, the minimum supported Rust version is corrected and updated to `1.71.1`. + +There are no consensus-breaking changes. + +### BREAKING CHANGES + +- [ibc-core] Update `MsgUpdateClient` handler to accept misbehaviour reports via + its `client_message` field + ([\#835](https://github.com/cosmos/ibc-rs/issues/835)) +- [ibc-core-client] Merge client update time and height modification method + pairs into one, that is replace + a) client_update_{time,height} by update_meta, + b) store_update_{time,height} by store_update_meta and + c) delete_update_{time,height} by delete_update_meta. + ([\#973](https://github.com/cosmos/ibc-rs/issues/973)) +- [ibc] Refactor client relevant APIs for improved modularity and allow + standalone ICS-02 integration + ([\#1114](https://github.com/cosmos/ibc-rs/issues/1114)) +- [ibc] Increase minimum supported Rust version to 1.71.1 + ([\#1118](https://github.com/cosmos/ibc-rs/issues/1118)) +- [ibc] Upgrade `ibc-proto-rs` to `v0.42.2` + ([\#1125](https://github.com/cosmos/ibc-rs/pull/1125)) + +### BUG FIXES + +- [ibc] Add missing dependencies for some feature flags across multiple crates + ([\#1059](https://github.com/cosmos/ibc-rs/issues/1059)) +- [ibc-client-tendermint-types] Ease frozen Height check in the tendermint + `ClientState` protobuf deserialization, and consequently include frozen client + check for client creation path. + ([\#1061](https://github.com/cosmos/ibc-rs/issues/1061)), + ([\#1063](https://github.com/cosmos/ibc-rs/pull/1063)) +- [ibc-client-tendermint] Use header height for Tendermint consensus state storage + ([\#1080](https://github.com/cosmos/ibc-rs/issues/1080)) +- [ibc] Upgrade `serde_json` to "1.0.1" to address an stack overflow issue + within the `serde-json-wasm` crate + ([\#1083](https://github.com/cosmos/ibc-rs/pull/1083)) +- [ibc] Resolve potential `base64` dependency resolution issue by bringing it to + the workspace `Cargo.toml` + ([\#1084](https://github.com/cosmos/ibc-rs/issues/1084)) +- [ibc-client-tendermint-types] Check ics23 proof specs for empty depth range. + ([\#1100](https://github.com/cosmos/ibc-rs/issues/1100)) + +### FEATURE + +- [ibc-core-host] Add remaining storage paths. + ([\#1065](https://github.com/cosmos/ibc-rs/issues/1065)) +- [ibc-core-host] Add iteration key for cross-compatibility with `ibc-go` used + for iterating over consensus states + ([\#1090](https://github.com/cosmos/ibc-rs/issues/1090)) + +### IMPROVEMENTS + +- [ibc-core] Deprecate `ChannelEnd::order_matches` method + ([\#394](https://github.com/cosmos/ibc-rs/issues/394)) +- [ibc-apps] Ease `serde` derive on `ICS-20` and `ICS-721` types + ([\#1060](https://github.com/cosmos/ibc-rs/pull/1060)) +- [ibc-data-types] Refactor `Default` implementations with concrete names + ([\#1074](https://github.com/cosmos/ibc-rs/issues/1074)) +- [ibc-core] Deprecate `MsgSubmitMisbehaviour` in favor of `MsgUpdateClient` for + submitting misbehaviour reports + ([\#1077](https://github.com/cosmos/ibc-rs/issues/1077)) +- [ibc-core-host] Improve path segment access by exposing path prefixes and + implementing some convenient parent/leaf methods + ([\#1089](https://github.com/cosmos/ibc-rs/issues/1089)) +- [ibc-client-tendermint] Detach client state verifier such that users have a + way to utilize custom verifiers + ([\#1097](https://github.com/cosmos/ibc-rs/pull/1097)) +- [ibc-primitives] Use `let-else` over `downcast!()` and remove `utils/macros` + module as a result ([\#1118](https://github.com/cosmos/ibc-rs/issues/1118)) +- [ibc-core] Remove unnecessary shadowing with same value + ([\#1120](https://github.com/cosmos/ibc-rs/issues/1120)) +- [ibc-core-connection] Remove `State::Uninitialized` check while parsing + `ConnectionEnd` from Protobuf + ([\#1123](https://github.com/cosmos/ibc-rs/issues/1123)) + +## v0.50.0 + +*January 24, 2024* + +This release introduces several noteworthy libraries. A standout addition is the +implementation of the ICS-721 NFT transfer application, enabling the transfer of +NFT packets across chains that support this capability. + +In addition, It incorporates the ICS-08 Wasm light client data structure and +types. This empowers light client developers to create CosmWasm contracts for +deployment on Cosmos chains compatible with the version of `ibc-go` supporting +ICS-08 Wasm client. + +Furthermore, this release addresses the issue with the macro derivation of the +`ClientState` when contexts include generic types, exposes additional convenient +types and serializers through `ibc-primitives` and includes a more flexible +constructor for `MockContext` types within the `ibc-testkit` crate, allowing to +write tests with diverse parameter combinations. + +There are no consensus-breaking changes. + +### BREAKING CHANGES + +- [ibc] Bump `ibc-proto-rs` to v0.41.0 + ([\#1036](https://github.com/cosmos/ibc-rs/pull/1036)). + +### BUG FIXES + +- [ibc-derive] Refactor `ClientState` macro derivation to handle contexts with + generic types. ([\#910](https://github.com/cosmos/ibc-rs/issues/910)) +- [ibc-derive] Adapt macro derivations to integrate with projects dependent on + `ibc-core` ([\#999](https://github.com/cosmos/ibc-rs/issues/999)). + +### FEATURES + +- [ibc-app-nft-transfer] Implement ICS-721 NFT transfer application + ([\#346](https://github.com/cosmos/ibc-rs/issues/346)) +- [ibc-client-wasm-types] Implement ICS-08 Wasm light client domain types + ([\#1030](https://github.com/cosmos/ibc-rs/issues/1030)). + +### IMPROVEMENTS + +- [ibc-data-types] Re-export clients' domain type from `ibc-data-types` + ([\#1041](https://github.com/cosmos/ibc-rs/pull/1041)). +- [ibc-testkit] Deprecate `MockContext::new*` in favor of `MockContextConfig`. + ([\#1042](https://github.com/cosmos/ibc-rs/issues/1042)) +- [ibc-testkit] Remove field access of `MockContext`. + ([\#1043](https://github.com/cosmos/ibc-rs/issues/1043)) +- [ibc-testkit] Deprecate `MockContext::with_client*` in favor of + `MockContext::with_client_config`. + ([\#1049](https://github.com/cosmos/ibc-rs/issues/1049)) +- [ibc-primitives] Re-export additional google proto types, like `Timestamp` + and `Duration` for added convenience when developing IBC light clients or + applications. ([\#1054](https://github.com/cosmos/ibc-rs/pull/1054)) +- [ibc-primitives] Relocate `serializers.rs` module to reside within the + `ibc-primitives` crate extending its utility for a broader range of IBC + applications. ([\#1055](https://github.com/cosmos/ibc-rs/issues/1055)) + +## v0.49.1 + +*January 3, 2024* + +This release continues the trend of further decoupling dependencies between the +different ibc-rs sub-crates and modules. + +In particular, the `prost` dependency is now only imported in the +`ibc-primitives` crate; note that error variants originating from `prost` have +largely been removed, which is a breaking change. The `bytes` dependency was +also removed. Additionally, `CommitmentProofBytes` can now be accessed without +explicit ownership of the object for which the proof is being queried for. + +Some other improvements of note include making the CosmWasm check more rigorous, +streamlining the `Msg` trait and renaming it to `ToProto`, as well as +implementing custom JSON and Borsh `ChainId` deserialization. + +There are no consensus-breaking changes. + +### BREAKING CHANGES + +- `[ibc-app-transfer]` Refactor `send-coins-*()` methods by breaking them down + into distinct escrow and unescrow methods, enhancing both clarity and + specificity in functionality. + ([\#837](https://github.com/cosmos/ibc-rs/issues/837)) +- `[ibc-app-transfer]` Add `memo` field to `escrow-coins-*()` and + `burn-coins-*()` methods, allowing implementors to pass in arbitrary data + necessary for their use case. + ([\#839](https://github.com/cosmos/ibc-rs/issues/837)) +- `[ibc-core-host-type]` Optimize `IdentifierError` variants and make them + mutually exclusive. ([\#978](https://github.com/cosmos/ibc-rs/issues/978)) +- `[ibc-data-types]` Bump ibc-proto-rs dependency to v0.39.1. + ([\#993](https://github.com/cosmos/ibc-rs/issues/993)) +- `[ibc]` Minimize `prost` dependency by introducing `ToVec` trait + - Now `prost` is only imported in `ibc-primitives` crate + - Remove error variants originating from `prost` (Breaking change) + - Eliminate the need for the `bytes` dependency + ([\#997](https://github.com/cosmos/ibc-rs/issues/997)) +- `[ibc-core-host-types]` Introduce `ClientType::build_client_id` which avoids unnecessary validation. + ([#1014](https://github.com/cosmos/ibc-rs/issues/1014)) +- `[ibc-core-host-types]` Optimise `ClientId::new` to avoid unnecessary validation and temporary + string allocation. ([#1014](https://github.com/cosmos/ibc-rs/issues/1014)) + +### FEATURES + +- `[ibc-core-commitment-types]` implement `AsRef>` and + `AsRef<[u8]>` for `CommitmentProofBytes` so it’s possible to gain + access to the proof byte slice without having to own the object. + ([#1008](https://github.com/cosmos/ibc-rs/pull/1008)) + +### IMPROVEMENTS + +- `[cw-check]` More rigorous CosmWasm check by upgrading dependencies and + including `std` and `schema` features for `ibc-core`. + ([\#992](https://github.com/cosmos/ibc-rs/pull/992)) +- `[ibc-primitives]` streamline `Msg` trait and rename to `ToProto` + ([#993](https://github.com/cosmos/ibc-rs/issues/993)) +- `[ibc-core-host-types]` Implement custom JSON and Borsh deserialization for `ChainId` ([#996](https://github.com/cosmos/ibc-rs/pull/1013)) +- `[ibc-core-client-types]` Add a convenient `Status::verify_is_active` method. + ([#1005](https://github.com/cosmos/ibc-rs/pull/1005)) +- `[ibc-primitives]` Derive `Hash` on `Timestamp` instead of explicit + implementation ([#1011](https://github.com/cosmos/ibc-rs/pull/1005)) +- `[ibc-derive]` Use global paths in generated code by macros to prevent + namespace conflicts with local modules + ([#1017](https://github.com/cosmos/ibc-rs/pull/1017)) + +## v0.48.2 + +*December 22, 2023* + +This patch release resolves two issues. It corrects the packet sequence number +encoding within Timeout message handlers to align with the big-endian format and +addresses a recursive call error during the conversion from connection `State` +to `i32`. + +There are no consensus-breaking changes. + +### BUG FIXES + +- `[ibc-core-host-types]` Encode packet sequence into a big endian bytes. + ([\#1004](https://github.com/cosmos/ibc-rs/pull/1004)) +- `[ibc-core-connection-types]` Fix recursive call in connection `State` + conversion to `i32` ([\#1010](https://github.com/cosmos/ibc-rs/issues/1010)) + +## v0.48.1 + +*November 27, 2023* + +This patch release eliminates the `dep:` syntax from the `serde` feature, +addressing potential dependency resolution issue stemming from Rust v1.70. + +There are no consensus-breaking changes. + +### BUG FIXES + +- Fix Cargo test failure with `--no-default-features` flag. + ([\#770](https://github.com/cosmos/ibc-rs/issues/770)) +- Fix dependency resolution by removing the `dep:` syntax in `serde` feature of + `ibc-app-transfer` crate. + ([\#987](https://github.com/cosmos/ibc-rs/issues/987)) + +## 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* + +This release adds necessary APIs for featuring consensus state pruning and +implements pertaining logic for Tendermint light clients. This prevents +unlimited store growth. Additionally, we've enhanced ibc-rs compatibility with +no-float environments making Wasm compilation smoother and updated main +dependencies including `prost` to v0.12, `ibc-proto-rs` to v0.37, and +`tendermint-rs` to v0.34, ensuring the latest advancements. + +There are no consensus-breaking changes. + +### FEATURES + +- Implement consensus state pruning for Tendermint light clients. ([\#600](https://github.com/cosmos/ibc-rs/issues/600)) + +### IMPROVEMENTS + +- Add test for expired client status. + ([\#538](https://github.com/cosmos/ibc-rs/issues/538)) + +- Fix compilation issue with Wasm envs because of floats. ([\#850](https://github.com/cosmos/ibc-rs/issues/850)) + - Use `serde-json-wasm` dependency instead of `serde-json` for no-floats support + - Add CI test to include CosmWasm compilation check + +- Change `mocks` feature to imply `std` since it requires + Timestamp::now to work. + ([\#926](https://github.com/cosmos/ibc-rs/pull/926)) +- Return PacketStates instead of paths from packet_commitments and + packet_acknowledgements. ([\#927](https://github.com/cosmos/ibc-rs/issues/927)) +- Remove `AnySchema` as `JsonSchema` derive on `Any` now accessible through + `ibc-proto-rs`. ([#929](https://github.com/cosmos/ibc-rs/issues/929)) + +## v0.46.0 + +*October 12, 2023* + +This release introduces vital bug fixes, including removal of an incorrect +validation during a Tendermint client update and the addition of a missing state +update during a successful client upgrade ensuring the inclusion of the host's +height and timestamp in the store. + +Additionally, it eliminates the `safe-regex` dependency, and restructures IBC +query implementations under the previous `grpc` feature flag and moves it to a +separate crate called as `ibc-query`. + +There are consensus-breaking changes. + +### BREAKING CHANGES + +- Relocate `*_update_time` and `*_update_height` to the client contexts' traits + for improved access by light clients + ([#914](https://github.com/cosmos/ibc-rs/issues/914)) + +### BUG FIXES + +- Remove an incorrect validation during tendermint client update + ([\#911](https://github.com/cosmos/ibc-rs/issues/911)) +- Add missing update in the state, which should include the host's height and + timestamp when a successful client upgrade take place. + ([\#913](https://github.com/cosmos/ibc-rs/issues/913)) + +### IMPROVEMENTS + +- Remove `safe-regex` dependency + ([\#875](https://github.com/cosmos/ibc-rs/issues/875)) +- Enhance IBC query methods usability and code organization + - The implementation of query methods is now publicly accessible as standalone functions. + - `grpc` feature now lives as a separate crate called as `ibc-query` + ([#896](https://github.com/cosmos/ibc-rs/issues/896)) +- Re-export ibc proto types from `ibc-proto-rs`` for dep + +## v0.45.0 + +*September 20, 2023* + +This release introduces a new API under the `grpc` feature flag, which has ibc-rs expose grpc endpoints that the hermes relayer needs. Furthermore, `no_std` support for the `serde` feature has been restored, accompanied by other miscellaneous changes. +There are no consensus-breaking changes. + +### BREAKING CHANGES + +- Bump tendermint-rs to v0.33.0 + ([#785](https://github.com/cosmos/ibc-rs/issues/785)) +- Bump ibc-proto-rs to v0.34.0 + ([#790](https://github.com/cosmos/ibc-rs/issues/790)) +- Allow hosts to handle overflow cases in `increase_*_counter` methods by + returning `Result<(),ContextError>` type. + ([#857](https://github.com/cosmos/ibc-rs/issues/857)) +- logger and event emitter methods return `Result<(), ContextError>` type. + ([#859](https://github.com/cosmos/ibc-rs/issues/859)) +- Bump `ibc-proto-rs` to v0.35.0 along with some other minor dependency updates + ([#873](https://github.com/cosmos/ibc-rs/issues/873)) + +### BUG FIXES + +- Fix compilation error of v0.41.0 by restoring no_std support for serde + feature ([#741](https://github.com/cosmos/ibc-rs/issues/741)) +- Replace mutable ref with immutable ref in validate handler + ([\#863](https://github.com/cosmos/ibc-rs/issues/863)) + +### FEATURES + +- Blanket implementation of core gRPC services + ([\#686](https://github.com/cosmos/ibc-rs/issues/686)) + +### IMPROVEMENTS + +- Switch to domain Tendermint event type instead of proto for the + `upgrade_client_proposal_handler` return + ([#838](https://github.com/cosmos/ibc-rs/issues/838)) +- Bump ibc-proto to v0.34.1 and borsh to v0.10 + ([#844](https://github.com/cosmos/ibc-rs/issues/844)) +- Add borsh derive for `MsgTransfer` + ([#845](https://github.com/cosmos/ibc-rs/pull/845)) +- Add borsh derive for `MsgEnvelope` + ([#846](https://github.com/cosmos/ibc-rs/pull/846)) +- Derive `PartialEq`, `Eq` for `MsgEnvelope` + ([#847](https://github.com/cosmos/ibc-rs/pull/847)) +- Organize imports grouping and granularity using `rustfmt.toml` + ([#848](https://github.com/cosmos/ibc-rs/issues/848)) +- Add `JsonSchema` derive for `MsgEnvelope` + ([#856](https://github.com/cosmos/ibc-rs/pull/856)) +- Remove unused code snippets and move serializer roundtrip test to `serializers.rs` + ([#869](https://github.com/cosmos/ibc-rs/issues/869)) + +## v0.44.2 + +*October 12, 2023* + +This release is a critical patch release that introduces a vital fix by removing +an incorrect validation during a Tendermint client update. + +There are no consensus-breaking changes. + +## v0.44.1 + +*August 4, 2023* + +This release fixes a bug with the `UpdateClient` event where the `header` field was not properly encoded. + +There are no consensus-breaking changes. + +### BUG FIXES + +- Remove traces of deprecated `mocks-no-std` feature + ([#819](https://github.com/cosmos/ibc-rs/issues/821)) +- Utilize encoded bytes from `Any` for the `header` field of `UpdateClient` + event + ([#821](https://github.com/cosmos/ibc-rs/issues/821)) + +## v0.44.0 + +*August 4, 2023* + +The goal with this release was to replace `ClientState::{confirm_not_frozen, expired}()` with `ClientState::status()` ([#536](https://github.com/cosmos/ibc-rs/issues/536)). Updating basecoin-rs with the new changes exposed the shortcomings of having `SendPacket*Context` be supertraits of `TokenTransfer*Context`, which in turned exposed the shortcomings of having `Router` be a supertrait of `ValidationContext`. Hence, we decoupled everything! + +There are consensus-breaking changes. + +### BREAKING CHANGES + +- [ibc-derive] Replace `ClientState::{confirm_not_frozen, expired}()` with `ClientState::status()` + ([#536](https://github.com/cosmos/ibc-rs/issues/536)) +- Decouple `TokenTransfer{Validation,Execution}` from `SendPacket{Validation,Execution}` + ([#786](https://github.com/cosmos/ibc-rs/issues/786)) +- Decouple `Router` from `ValidationContext` + ([#788](https://github.com/cosmos/ibc-rs/pull/788)) +- Simplify Module lookup in the `Router` trait + ([#802](https://github.com/cosmos/ibc-rs/issues/802)) + +## v0.43.1 + +*July 31, 2023* + +This release bumps ibc-proto to v0.32.1, resolving issue with token transfer +deserialization for cases with no memo field provided. It also includes various +enhancements and bug fixes, such as reorganized acknowledgement types, enhanced +`ChainId` validation, improved `from_str` height creation, synchronized channel +event namings for consistency. + +There are consensus-breaking changes. + +### BREAKING CHANGES + +- Organize acknowledgement types under the `ics04_channel` module to get + accessible by any applications. + ([#717](https://github.com/cosmos/ibc-rs/issues/717)) +- Sync field and method namings of ics04 events with the convention + ([#750](https://github.com/cosmos/ibc-rs/issues/750)) +- use ibc_proto::protobuf::Protobuf to replace tendermint_proto::Protobuf + ([#754](https://github.com/cosmos/ibc-rs/pull/754)) +- Enhancements and fixes to `ChainId` impls and validation. + ([#761](https://github.com/cosmos/ibc-rs/issues/761)) +- Use `Vec` for HeaderAttribute instead of `Any` + ([#764](https://github.com/cosmos/ibc-rs/issues/764)) +- Serde: Schema for Coin/Transfer, Amount is string + ([#772](https://github.com/cosmos/ibc-rs/issues/772)) + +### BUG-FIXES + +- Tendermint ConsensusState -> Any can crash if out of memory + ([#747](https://github.com/cosmos/ibc-rs/issues/747)) +- `Height::from_str` accepts invalid heights + ([#752](https://github.com/cosmos/ibc-rs/issues/752)) +- Add serde serialization and deserialization to Packet Receipt + ([#794](https://github.com/cosmos/ibc-rs/pull/794)) + +### IMPROVEMENTS + +- Scale encoding for ICS-20 transfer message + ([#745](https://github.com/cosmos/ibc-rs/issues/745)) +- Add test to ensure `PacketData` keeps proper JSON encoding + ([#763](https://github.com/cosmos/ibc-rs/issues/763)) + ## v0.42.0 *July 5, 2023* @@ -10,7 +685,7 @@ There are no consensus-breaking changes. ### BREAKING CHANGES -- Implement ADR 7, where `ClientState` objects are now statically dispatched instead +- Implement ADR 7, where `ClientState` objects are now statically dispatched instead of dynamically dispatched. ([#296](https://github.com/cosmos/ibc-rs/issues/296)) - Revise the `verify_upgrade_client` method to utilize the domain-specific @@ -884,7 +1559,7 @@ This is a major release, which implemented [ADR 4](https://github.com/cosmos/ibc - Delete packet commitment instead of acknowledgement in acknowledgePacket [#1573](https://github.com/informalsystems/ibc-rs/issues/1573) -- Set the `counterparty_channel_id` correctly to fix ICS04 [`chanOpenAck` handler verification](https://github.com/informalsystems/ibc-rs/blob/master/modules/src/core/ics04_channel/handler/chan_open_ack.rs) +- Set the `counterparty_channel_id` correctly to fix ICS04 [`chanOpenAck` handler verification](https://github.com/informalsystems/ibc-rs/blob/v0.10.0/modules/src/core/ics04_channel/handler/chan_open_ack.rs) ([#1649](https://github.com/informalsystems/ibc-rs/issues/1649)) - Add missing assertion for non-zero trust-level in Tendermint client initialization. ([#1697](https://github.com/informalsystems/ibc-rs/issues/1697)) @@ -911,7 +1586,7 @@ This is a major release, which implemented [ADR 4](https://github.com/cosmos/ibc - Set the connection counterparty in the ICS 003 [`connOpenAck` handler][conn-open-ack-handler] ([#1532](https://github.com/informalsystems/ibc-rs/issues/1532)) -[conn-open-ack-handler]: https://github.com/informalsystems/ibc-rs/blob/master/modules/src/core/ics03_connection/handler/conn_open_ack.rs +[conn-open-ack-handler]: https://github.com/informalsystems/ibc-rs/blob/v0.9.0/modules/src/core/ics03_connection/handler/conn_open_ack.rs ### IMPROVEMENTS diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33afc0de7..5b15898ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,6 @@ # Contributing -Thank you for your interest in contributing! The goal -of ibc-rs is to provide a high quality, formally verified implementation of -the IBC protocol. - -All work on the code base should be motivated by a Github -issue. Before opening a new issue, first do a search of open and closed issues -to make sure that yours will not be a duplicate. -If you would like to work on an issue which already exists, please indicate so -by leaving a comment. If what you'd like to work on hasn't already been covered -by an issue, then open a new one to get the process going. +Thank you for your interest in contributing to ibc-rs!🎉 The rest of this document outlines the best practices for contributing to this repository: @@ -19,38 +10,37 @@ repository: - [Pull Requests](#pull-requests) - what makes a good pull request - [Forking](#forking) - fork the repo to make pull requests - [Changelog](#changelog) - changes must be recorded in the changelog -- [Releases](#releases) - how to release new version of the crates ## Decision Making -When contributing to the project, the following process leads to the best chance of -landing the changes in `main`. +The following process leads to the best chance of landing the changes in `main`. -All new contributions should start with a Github issue which captures the +All new contributions should **start with a GitHub issue** which captures the problem you're trying to solve. Starting off with an issue allows for early -feedback. Once the issue is created, maintainers may request that more detailed +feedback. See the [Issues](#issues) section for more details. + +Once the issue is created, maintainers may request that more detailed documentation be written in the form of a Request for Comment (RFC) or an Architectural Decision Record ([ADR](https://github.com/cosmos/ibc-rs/blob/main/docs/architecture/README.md)). -Discussion at the RFC stage will build collective understanding of the dimensions -of the problem and help structure conversations around trade-offs. - -When the problem is well understood but the solution leads to large -structural changes to the code base, these changes should be proposed in -the form of an [Architectural Decision Record -(ADR)](./docs/architecture/). The ADR will help build consensus on an -overall strategy to ensure that the code base maintains coherence -in the larger context. If you are not comfortable with writing an ADR, -you can open a regular issue and the maintainers will help you -turn it into an ADR. - -When the problem and the proposed solution are well understood, -changes should start with a [draft -pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) -against `main`. The draft status signals that work is underway. When the work -is ready for feedback, hitting "Ready for Review" will signal to the -maintainers to take a look. +Discussion at the RFC stage will build collective understanding of the +dimensions of the problem and help structure conversations around trade-offs. + +When the problem is well understood but the solution leads to large structural +changes to the code base, these changes should be proposed in the form of an +[Architectural Decision Record (ADR)](./docs/architecture/). The ADR will help +build consensus on an overall strategy to ensure that the code base maintains +coherence in the larger context. If you are not comfortable with writing an ADR, +you can open a regular issue and the maintainers will help you turn it into an +ADR. + +When the problem and the proposed solution are well understood, changes should +start with a [draft pull +request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) +against `main`. The draft status signals that work is underway. When the work is +ready for feedback, hitting "Ready for Review" will signal to the maintainers to +take a look. Implementation trajectories should aim to proceed where possible as a series of smaller incremental changes, in the form of small PRs that can be merged @@ -59,68 +49,93 @@ that PRs will sit open for long periods of time. ![Contributing flow](https://github.com/tendermint/tendermint/blob/v0.33.6/docs/imgs/contributing.png?raw=true) -Each stage of the process is aimed at creating feedback cycles which align -contributors and maintainers in order to ensure that: +## Issues -- Contributors don’t waste their time implementing/proposing features which won’t land in `main` -- Maintainers have the necessary context in order to support and review contributions +We appreciate bug reports, feature requests, and contributions to our project. +If you're new to contributing, a great starting point is to explore [A: +good-first-issues](https://github.com/cosmos/ibc-rs/labels/A%3A%20good-first-issue) +on our GitHub repository. These are well-defined tasks ideal for developers who +are new to ibc-rs. When opening an issue, kindly adhere to the following +guidelines: -## Issues +1. **Search existing issues**: Before opening a new issue, please search + existing issues to ensure that is not a duplicates. If you would like to work + on an issue which already exists please indicate so by leaving a comment. If + what you'd like to work on hasn't already been covered by an issue, then open + a new one to get the process going. -We welcome bug reports, feature requests, and other contributions to our project. To open an issue, please follow these guidelines: +2. **Provide a clear and descriptive title**: This helps others understand the + nature of the issue at a glance. -1. **Search existing issues**: Before opening a new issue, please search existing issues to ensure that is not a duplicates. +3. **Provide detailed information**: In the issue description, clearly state the + purpose of the issue and follow the guidelines of the issue template -2. **Provide a clear and descriptive title**: This helps others understand the nature of the issue at a glance. +Note: A maintainer will take care of assigning the appropriate labels to your +issue with the following convention: -3. **Provide detailed information**: In the issue description, clearly state the purpose of the issue and follow the guidelines of the issue template +- Objective-level (WHY): conveys the overarching purpose or objective of the + issue by labels starting with "O" like `O: security`, `O: new-feature`, etc. -4. A maintainer will take care of assigning the appropriate labels to your issue. +- Scope-level (WHICH): specifies the part of the system that the issue pertains + to and labels starting with "S" like `S: non-cosmos`, `S: no-std`, etc. -We use the following convention for issue label names: - - (WHY) The purpose or objective of this issue with Objective-level "O" labels like `O: security`, `O: new-feature`, etc. - - (WHICH) The part of the system this issue relates to using: - - External-level "E" labels if the issue fall outside the current scope of the system and is related to external dependencies or projects like `E: non-cosmos`, `E: no-std` etc. - - or "Internal-level "I" labels for anything related to the current scope of the product like `I: errors`, `I: documentation`, etc. - - (HOW) If any administrative considerations should be taken into account use Administrative-level "A" labels like `A: help-wanted`, `A: critical`, etc. +- Admin-level (HOW) includes relevant administrative considerations on how best + handling the issue and labels starting with "A" like `A: help-wanted`, `A: + critical`, etc. + +If the issue was tagged `A: low-priority`, we'll do our best to review it in a +timely manner, but please expect longer wait times for a review in general. If a +low priority issue is important to you, please leave a comment explaining why, +and we will re-prioritize it! ## Pull Requests -If you have write access to the ibc-rs repo, you can directly branch off of `main`. -This makes it easier for project maintainers to directly make changes to your -branch should the need arise. Otherwise, check [Forking](#forking) section for instructions. +Before making any changes, please create a new issue or refer to an existing one +to initiate a discussion with us. This allows for collaborative discussions on +the design and proposed implementation of your changes. This way, we ensure that +your efforts align with our objectives and increase the likelihood of your +contribution being accepted. -Branch names should be prefixed with the author's name followed by a short description -of the feature, eg. `name/feature-x`. +Pull requests should aim to be small and self-contained to facilitate quick +review and merging. Larger change sets should be broken up across multiple PRs. +Commits should be concise but informative, and moderately clean. Please follow +these guidelines when opening a pull request: -Pull requests are made against `main` and are squash-merged into main. +- If you have write access to the ibc-rs repo, directly branch off from `HEAD` + of `main`. Otherwise, check [Forking](#forking) section for instructions. -**PRs must:** +- Branch names should be prefixed with the convention + `{moniker}/{issue#}-branch-name`. -- make reference to an issue outlining the context -- update any relevant documentation and include tests -- add a corresponding entry in the `.changelog` directory using `unclog`, - see the [Changelog](#changelog) section for more details. +- Ensure PR titles adhere to the format of `{type}: {description}`. The {type} + should be selected from the following list: + - feat: for feature work. + - fix: for bug fixes. + - imp: for refactors and improvements. + - docs: for documentation changes. + - test: for addition or improvements of unit, integration and e2e tests. + - deps: for changes to dependencies. + - chore: for any miscellaneous changes that don't fit into another category. + - If any change is breaking, follow the format below: type + (api)! for api + breaking changes, e.g. fix(api)!: api breaking fix type + (statemachine)! + for state machine breaking changes, e.g. fix(statemachine)!: state machine + breaking fix api breaking changes take precedence over statemachine breaking + changes. -Pull requests should aim to be small and self-contained to facilitate quick -review and merging. Larger change sets should be broken up across multiple PRs. -Commits should be concise but informative, and moderately clean. Commits will be squashed into a -single commit for the PR with all the commit messages. +- Commit messages should follow the [Conventional Commits + specification](https://www.conventionalcommits.org). -If the issue you worked on was tagged `A: low-priority`, we'll do our best to -review it in a timely manner, but please expect longer wait times for a review -in general. If a low priority issue is important to you, please leave a comment -explaining why, and we will reprioritize it! +- Make reference to the relevant issue by including `Closes: #` in + the PR’s description to auto-close the related issue once the PR is merged. -## Responsibilities of a PR Reviewer +- Update any relevant documentation and include tests. -If you're tagged as the reviewer of a PR, you are responsible for shepherding it -through to completion. This includes fixing issues with the PR and taking the -lead on decisions that need to be resolved in order to get the PR merged. +- Add a corresponding entry in the `.changelog` directory using `unclog`. See + the [Changelog](#changelog) section for more details. -If you're tagged as a reviewer on a PR that affects a part of the code base that -you are unfamiliar with, you can hand it off to someone (with their -consent) who is more appropriate to shepherd the PR through to completion. +- If possible, tick the `Allow edits from maintainers` box when opening your PR + from your fork of ibc-rs. This allows us to directly make minor edits / + refactors and speeds up the merging process. ## Forking @@ -148,9 +163,10 @@ To pull in updates from the origin repo, run `git fetch upstream` followed by Every non-trivial PR must update the [CHANGELOG](CHANGELOG.md). This is accomplished indirectly by adding entries to the `.changelog` folder in -[`unclog`](https://github.com/informalsystems/unclog) format using the `unclog` CLI tool. -`CHANGELOG.md` will be built by whomever is responsible for performing a release just -prior to release - this is to avoid changelog conflicts prior to releases. +[`unclog`](https://github.com/informalsystems/unclog) format using the `unclog` +CLI tool. `CHANGELOG.md` will be built by whomever is responsible for performing +a release just prior to release - this is to avoid changelog conflicts prior to +releases. ### Install `unclog` @@ -179,33 +195,33 @@ unclog add -c ibc -s features --id a-new-feature --issue-no 1235 -m "msg about t unclog build -u ``` -The Changelog is *not* a record of what Pull Requests were merged; -the commit history already shows that. The Changelog is a notice to users -about how their expectations of the software should be modified. -It is part of the UX of a release and is a *critical* user facing integration point. -The Changelog must be clean, inviting, and readable, with concise, meaningful entries. -Entries must be semantically meaningful to users. If a change takes multiple -Pull Requests to complete, it should likely have only a single entry in the -Changelog describing the net effect to the user. Instead of linking PRs directly, we -instead prefer to log issues, which tend to be higher-level, hence more relevant for users. +The Changelog is *not* a record of what Pull Requests were merged; the commit +history already shows that. The Changelog is a notice to users about how their +expectations of the software should be modified. It is part of the UX of a +release and is a *critical* user facing integration point. The Changelog must be +clean, inviting, and readable, with concise, meaningful entries. Entries must be +semantically meaningful to users. If a change takes multiple Pull Requests to +complete, it should likely have only a single entry in the Changelog describing +the net effect to the user. Instead of linking PRs directly, we instead prefer +to log issues, which tend to be higher-level, hence more relevant for users. When writing Changelog entries, ensure they are targeting users of the software, not fellow developers. Developers have much more context and care about more things than users do. Changelogs are for users. -Changelog structure is modeled after -[Tendermint Core](https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md) -and [Hashicorp Consul](http://github.com/hashicorp/consul/tree/master/CHANGELOG.md). +Changelog structure is modeled after [Tendermint +Core](https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md) and +[Hashicorp Consul](http://github.com/hashicorp/consul/tree/main/CHANGELOG.md). See those changelogs for examples. -We currently split changes for a given release between these four sections: Breaking -Changes, Features, Improvements, Bug Fixes. +We currently split changes for a given release between these four sections: +Breaking Changes, Features, Improvements, Bug Fixes. -Entries in the changelog should initially be logged in the __Unreleased__ section, which -represents a "staging area" for accumulating all the changes throughout a -release (see [Pull Requests](#pull-requests) below). With each release, -the entries then move from this section into their permanent place under a -specific release number in Changelog. +Entries in the changelog should initially be logged in the **Unreleased** +section, which represents a "staging area" for accumulating all the changes +throughout a release (see [Pull Requests](#pull-requests) above). With each +release, the entries then move from this section into their permanent place +under a specific release number in Changelog. Changelog entries should be formatted as follows: @@ -213,17 +229,16 @@ Changelog entries should be formatted as follows: - [pkg] Some description about the change ([#xxx](https://github.com/cosmos/ibc-rs/issues/xxx)) (optional @contributor) ``` -Here, `pkg` is the part of the code that changed (typically a -top-level crate, but could be `/`), `xxx` is the issue number, and `contributor` +Here, `pkg` is the part of the code that changed (typically a top-level crate, +but could be `/`), `xxx` is the issue number, and `contributor` is the author/s of the change. It's also acceptable for `xxx` to refer to the relevant pull request, but issue -numbers are preferred. -Note this means issues (or pull-requests) should be opened first so the changelog can then -be updated with the corresponding number. +numbers are preferred. Note this means issues (or pull-requests) should be +opened first so the changelog can then be updated with the corresponding number. -Changelog entries should be ordered alphabetically according to the -`pkg`, and numerically according to their issue/PR number. +Changelog entries should be ordered alphabetically according to the `pkg`, and +numerically according to their issue/PR number. Changes with multiple classifications should be doubly included (eg. a bug fix that is also a breaking change should be recorded under both). @@ -231,45 +246,5 @@ that is also a breaking change should be recorded under both). Breaking changes are further subdivided according to the APIs/users they impact. Any change that effects multiple APIs/users should be recorded multiply - for instance, a change to some core protocol data structure might need to be -reflected both as breaking the core protocol but also breaking any APIs where core data structures are -exposed. - -## Releases - -Our release process is as follows: - -1. In a new branch `release/vX.Y.Z`, update the [changelog](#changelog) to reflect and summarize all changes in - the release. This involves: - 1. Running `unclog build -u` and copy pasting the output at the top - of the `CHANGELOG.md` file, making sure to update the header with - the new version. - 2. Running `unclog release --editor vX.Y.Z` to create a summary of all of the changes - in this release. - 1. Your text editor will open. Write the release summary, and close the editor. - 1. Make sure to include a comment on whether or not the release contains consensus-breaking changes. - 2. Add this same summary to `CHANGELOG.md` as well. - 3. Committing the updated `CHANGELOG.md` file and `.changelog` directory to the repo. -2. Push this to a branch `release/vX.Y.Z` according to the version number of - the anticipated release (e.g. `release/v0.18.0`) and open a **draft PR**. -3. If there were changes in the `ibc-derive` crate, we need to publish a new version of that crate. - 1. bump the version in `crates/ibc-derive/Cargo.toml` - 2. Publish `ibc-derive` with `cargo publish -p ibc-derive` -4. Bump all relevant versions in `crates/ibc/Cargo.toml` to the new version and - push these changes to the release PR. - + If you released a new version of `ibc-derive` in step 3, make sure to update that dependency. -5. Run `cargo doc -p ibc --all-features --open` locally to double-check that all the - documentation compiles and seems up-to-date and coherent. Fix any potential - issues here and push them to the release PR. -6. Run `cargo publish -p ibc --dry-run` to double-check that publishing will work. Fix - any potential issues here and push them to the release PR. -7. Mark the PR as **Ready for Review** and incorporate feedback on the release. -8. Once approved, merge the PR, and pull the `main` branch. -9. Run `cargo publish -p ibc` -9. Create a signed tag and push it to GitHub: `git tag -s -a vX.Y.Z`. In the tag - message, write the version and the link to the corresponding section of the - changelog. - + Push the tag with `git push --tags` -10. Once the tag is pushed, create a GitHub release and append - `[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)` - to the release description. -11. All done! 🎉 +reflected both as breaking the core protocol but also breaking any APIs where +core data structures are exposed. diff --git a/Cargo.toml b/Cargo.toml index 9e05bd35d..b6fd6364a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,132 @@ [workspace] - resolver = "2" - +# members sorted by publishing order to `crates.io` members = [ - "crates/ibc", - "crates/ibc-derive", -] + "ibc-derive", + "ibc-primitives", + "ibc-core/ics24-host/types", + "ibc-core/ics26-routing/types", + "ibc-core/ics23-commitment/types", + "ibc-core/ics02-client/types", + "ibc-core/ics03-connection/types", + "ibc-core/ics04-channel/types", + "ibc-core/ics25-handler/types", + "ibc-core/ics02-client/context", + "ibc-core/ics24-host", + "ibc-core/ics26-routing", + "ibc-core/ics02-client", + "ibc-core/ics03-connection", + "ibc-core/ics04-channel", + "ibc-core/ics25-handler", + "ibc-core", + "ibc-clients/ics07-tendermint/types", + "ibc-clients/ics07-tendermint", + "ibc-clients/ics08-wasm/types", + "ibc-clients/cw-context", + "ibc-clients/ics07-tendermint/cw-contract", + "ibc-clients", + "ibc-apps/ics20-transfer/types", + "ibc-apps/ics20-transfer", + "ibc-apps/ics721-nft-transfer/types", + "ibc-apps/ics721-nft-transfer", + "ibc-apps/ics27-interchain-accounts", + "ibc-apps", + "ibc-core/ics24-host/cosmos", + "ibc-data-types", + "ibc", + "ibc-query", + "ibc-testkit", + # internal crates that are not published + "tests-integration", +] exclude = [ - "ci/no-std-check", + "ci/cw-check", + "ci/no-std-check", ] + +[workspace.package] +version = "0.53.0" +license = "Apache-2.0" +edition = "2021" +rust-version = "1.71.1" +readme = "README.md" +repository = "https://github.com/cosmos/ibc-rs" +authors = [ "Informal Systems " ] + +[workspace.dependencies] +# external dependencies +base64 = { version = "0.21", default-features = false } +borsh = { version = "0.10", default-features = false } +displaydoc = { version = "0.2", default-features = false } +prost = { version = "0.12", default-features = false } +derive_more = { version = "0.99.17", default-features = false, features = [ "from", "into", "display", "try_into" ] } +rstest = { version = "0.19" } +schemars = { version = "0.8.15" } +sha2 = { version = "0.10.8", default-features = false } +serde = { version = "1.0", default-features = false } +serde_json = { package = "serde-json-wasm", version = "1.0.1", default-features = false } +subtle-encoding = { version = "0.5", default-features = false } + +# ibc dependencies +ibc = { version = "0.53.0", path = "./ibc", default-features = false } +ibc-core = { version = "0.53.0", path = "./ibc-core", default-features = false } +ibc-clients = { version = "0.53.0", path = "./ibc-clients", default-features = false } +ibc-apps = { version = "0.53.0", path = "./ibc-apps", default-features = false } +ibc-primitives = { version = "0.53.0", path = "./ibc-primitives", default-features = false } +ibc-testkit = { version = "0.53.0", path = "./ibc-testkit", default-features = false } + +ibc-derive = { version = "0.7.0", path = "./ibc-derive" } + +ibc-core-client = { version = "0.53.0", path = "./ibc-core/ics02-client", default-features = false } +ibc-core-connection = { version = "0.53.0", path = "./ibc-core/ics03-connection", default-features = false } +ibc-core-channel = { version = "0.53.0", path = "./ibc-core/ics04-channel", default-features = false } +ibc-core-host = { version = "0.53.0", path = "./ibc-core/ics24-host", default-features = false } +ibc-core-handler = { version = "0.53.0", path = "./ibc-core/ics25-handler", default-features = false } +ibc-core-router = { version = "0.53.0", path = "./ibc-core/ics26-routing", default-features = false } +ibc-query = { version = "0.53.0", path = "./ibc-query", default-features = false } + +ibc-client-cw = { version = "0.53.0", path = "./ibc-clients/cw-context", default-features = false } +ibc-client-tendermint = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint", default-features = false } +ibc-client-tendermint-cw = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint/cw-contract", default-features = false } + +ibc-app-transfer = { version = "0.53.0", path = "./ibc-apps/ics20-transfer", default-features = false } +ibc-app-nft-transfer = { version = "0.53.0", path = "./ibc-apps/ics721-nft-transfer", default-features = false } +ibc-app-interchain-accounts = { version = "0.53.0", path = "./ibc-apps/ics27-interchain-accounts", default-features = false } + +ibc-core-client-context = { version = "0.53.0", path = "./ibc-core/ics02-client/context", default-features = false } +ibc-core-client-types = { version = "0.53.0", path = "./ibc-core/ics02-client/types", default-features = false } +ibc-core-channel-types = { version = "0.53.0", path = "./ibc-core/ics04-channel/types", default-features = false } +ibc-core-connection-types = { version = "0.53.0", path = "./ibc-core/ics03-connection/types", default-features = false } +ibc-core-commitment-types = { version = "0.53.0", path = "./ibc-core/ics23-commitment/types", default-features = false } +ibc-core-host-cosmos = { version = "0.53.0", path = "./ibc-core/ics24-host/cosmos", default-features = false } +ibc-core-host-types = { version = "0.53.0", path = "./ibc-core/ics24-host/types", default-features = false } +ibc-core-handler-types = { version = "0.53.0", path = "./ibc-core/ics25-handler/types", default-features = false } +ibc-core-router-types = { version = "0.53.0", path = "./ibc-core/ics26-routing/types", default-features = false } +ibc-client-tendermint-types = { version = "0.53.0", path = "./ibc-clients/ics07-tendermint/types", default-features = false } +ibc-client-wasm-types = { version = "0.53.0", path = "./ibc-clients/ics08-wasm/types", default-features = false } +ibc-app-transfer-types = { version = "0.53.0", path = "./ibc-apps/ics20-transfer/types", default-features = false } +ibc-app-nft-transfer-types = { version = "0.53.0", path = "./ibc-apps/ics721-nft-transfer/types", default-features = false } + +ibc-proto = { version = "0.44.0", default-features = false } + +# cosmos dependencies +tendermint = { version = "0.36.0", default-features = false } +tendermint-light-client = { version = "0.36.0", default-features = false } +tendermint-light-client-verifier = { version = "0.36.0", default-features = false } +tendermint-proto = { version = "0.36.0", default-features = false } +tendermint-rpc = { version = "0.36.0", default-features = false } +tendermint-testgen = { version = "0.36.0", default-features = false } + +# cosmwasm dependencies +### Note: Kept at the following version to match the CosmWasm module version +### used by chains supporting the wasm-enabled version of ibc-go v7.3 +### (This is the min version of `ibc-go` that supports `08-wasm` light clients) +cosmwasm-schema = { version = "1.5.4" } +cosmwasm-std = { version = "1.5.4" } +cosmwasm-vm = { version = "1.5.4" } +cw-storage-plus = { version = "1.2.0" } + +# parity dependencies +parity-scale-codec = { version = "3.6.5", default-features = false, features = [ "derive" ] } +scale-info = { version = "2.10.0", default-features = false } diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..fd1f04070 --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +.PHONY: help + +help: ## Display help message. + @echo "Usage: make " + @awk 'BEGIN {FS = ":.*?## "}/^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +install-tools: ## Install development tools including nightly rustfmt, cargo-hack and cargo-release. + rustup component add rustfmt --toolchain nightly + cargo install cargo-hack + cargo install cargo-release + cargo install typos-cli taplo-cli + +lint: ## Lint the code using rustfmt, clippy and whitespace lints. + cargo +nightly fmt --all --check + cargo clippy --all-targets --all-features + cargo clippy --all-targets --no-default-features + typos --config $(CURDIR)/.github/typos.toml + bash ./ci/code-quality/whitespace-lints.sh + taplo fmt --check + +check-features: ## Check that project compiles with all combinations of features. + cargo hack check --workspace --feature-powerset --exclude-features default + +check-docs: ## Build documentation with all features and without default features. + cargo doc --all --all-features --release + cargo doc --all --no-default-features --release + +check-no-std: ## Check that libraries compile with `no_std` feature. + $(MAKE) -C ./ci/no-std-check $@ + +check-cw: ## Check that the CosmWasm smart contract compiles. + cd ./ci/cw-check \ + && cargo build --target wasm32-unknown-unknown --no-default-features --release + +test: ## Run tests with all features and without default features. + cargo test --all-targets --all-features + cargo test --all-targets --no-default-features + +check-release: ## Check that the release build compiles. + cargo release --workspace --no-push --no-tag \ + --exclude ibc-derive \ + --exclude ibc-primitives \ + --exclude ibc-client-tendermint-cw + +release: ## Perform an actual release and publishes to crates.io. + cargo release --workspace --no-push --no-tag --allow-branch HEAD --execute \ + --exclude ibc-derive \ + --exclude ibc-primitives \ + --exclude ibc-client-tendermint-cw + +build-tendermint-cw: ## Build the WASM file for the ICS-07 Tendermint light client. + @echo "Building the WASM file for the ICS-07 Tendermint light client" + RUSTFLAGS='-C link-arg=-s' cargo build -p ibc-client-tendermint-cw --target wasm32-unknown-unknown --release --lib --locked + mkdir -p cw-contracts + cp target/wasm32-unknown-unknown/release/ibc_client_tendermint_cw.wasm cw-contracts/ diff --git a/README.md b/README.md index 63aa65592..e6412b710 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,92 @@ -# ibc-rs +
+

ibc-rs

+
+ +![banner](docs/static/img/ibc-rs-cover.svg) + +
+
[![Cosmos ecosystem][cosmos-shield]][cosmos-link] +
+
+ [![Docs][docs-image]][docs-link] [![Build Status][build-image]][build-link] [![Code Coverage][codecov-image]][codecov-link] [![Apache 2.0 Licensed][license-image]][license-link] -![Rust Stable][rustc-image] -![Rust 1.60+][rustc-version] - -Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts -the `ibc` rust crate which defines the main data structures and on-chain logic for the IBC protocol. - -See the [ibc](crates/ibc) crate's README.md for more detailed information on the `ibc` crate. +![Version][crates-io-version] +![Downloads][crates-io-downloads] +![Rust Stable][msrv-image] + +
+
+ +Rust implementation of the Inter-Blockchain Communication (IBC) protocol that +hosts all the data structures and on-chain logic implementations of various IBC +core, clients and applications. This repository organized as a collection of +sub-crates that can be used independently or together. + +## Project Structure + +|
Crate
| Description | +| ------------------------------------- | ----------- | +|[ibc](ibc) | Re-exports all the data structures and on-chain logic of various IBC core, clients and applications. | +|[ibc-data-types](ibc-data-types) | Re-exports all the IBC data types that are shared across different IBC implementations. | +|[ibc-core](ibc-core) | Contains data structures and implementations of all the IBC core specifications. | +|[ibc-clients](ibc-clients) | Contains data structures and implementations of various IBC light clients. | +|[ibc-apps](ibc-apps) | Contains data structures and implementations of various IBC applications. | +|[ibc-testkit](ibc-testkit) | Provides testing toolkit to aid `ibc-rs` and host chains in writing integration tests. | +|[ibc-query](ibc-query) | Contains utility traits and implementations for querying states of an integrated IBC module. | +|[ibc-derive](ibc-derive) | Derive macros for `ClientState` and `ConsensusState` traits, reducing boilerplate. | ## Contributing -IBC is specified in English in the [cosmos/ibc repo][ibc]. Any -protocol changes or clarifications should be contributed there. - -This repo contains the Rust implementation for the IBC modules. If you're interested in -contributing, please comment on an issue or open a new one! +IBC is specified in English in the [cosmos/ibc repo][ibc]. Any protocol changes +or clarifications should be contributed there. -See also [CONTRIBUTING.md](./CONTRIBUTING.md). +If you're interested in contributing, please take a look at the +[CONTRIBUTING](./CONTRIBUTING.md) guidelines. We welcome and appreciate +community contributions! ## Community calls -We run monthly community calls to update the community with current our direction and gather feedback on what to work on next. The community calls are also a platform for you to update everyone else with what you're working on, and find opportunities to collaborate. +The IBC-rs community calls are now part of the IBC Core community calls. During +these calls, we update the community on our current direction and gather +feedback on what to work on next. The community calls are also a platform for +you to update everyone else on what you're working on and find opportunities to +collaborate. -Please join the [Google group](https://groups.google.com/g/ibc-rs-community) to receive a calendar invitation for the monthly meeting. +Please join the [Google group](https://groups.google.com/g/ibc-community) to +receive a calendar invitation to the monthly meetings. ## Versioning -We follow [Semantic Versioning][semver], though APIs are still -under active development. +We follow [Semantic Versioning][semver], though APIs are still under active +development. ## Resources - [IBC Website][ibc-homepage] - [IBC Specification][ibc] - [IBC Go implementation][ibc-go] +- [Protobuf definitions in Rust][ibc-proto-rs] ## License Copyright © 2022 Informal Systems Inc. and ibc-rs authors. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use the files in this repository except in compliance with the License. You may +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +the files in this repository except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. [//]: # (badges) [docs-image]: https://docs.rs/ibc/badge.svg @@ -60,15 +95,16 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the speci [build-link]: https://github.com/cosmos/ibc-rs/actions?query=workflow%3ARust [codecov-image]: https://codecov.io/gh/cosmos/ibc-rs/branch/main/graph/badge.svg?token=wUm2aLCOu [codecov-link]: https://codecov.io/gh/cosmos/ibc-rs -[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg +[license-image]: https://img.shields.io/crates/l/ibc [license-link]: https://github.com/cosmos/ibc-rs/blob/main/LICENSE -[rustc-image]: https://img.shields.io/badge/rustc-stable-blue.svg -[rustc-version]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[crates-io-version]: https://img.shields.io/crates/v/ibc.svg +[crates-io-downloads]: https://img.shields.io/crates/d/ibc.svg +[msrv-image]: https://img.shields.io/crates/msrv/ibc [//]: # (general links) -[ibc-rs]: https://github.com/cosmos/ibc-rs [ibc]: https://github.com/cosmos/ibc [ibc-go]: https://github.com/cosmos/ibc-go +[ibc-proto-rs]: https://github.com/cosmos/ibc-proto-rs [ibc-homepage]: https://cosmos.network/ibc [cosmos-link]: https://cosmos.network [semver]: https://semver.org/ diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 000000000..9e260ab10 --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,97 @@ +## Releases + +Our release process is as follows: + +1. In a new branch `release/vX.Y.Z`, update the [changelog](./CHANGELOG.md) to + reflect and summarize all changes in the release. This involves: + 1. Running `unclog build -u` and copy pasting the output at the top of the + `CHANGELOG.md` file, making sure to update the header with the new + version. + 2. Running `unclog release --editor vX.Y.Z` to create a summary of + all of the changes in this release. + 1. Your text editor will open. Write the release summary, and close the + editor. Make sure to include a comment on whether or not the release + contains consensus-breaking changes. + 2. Add this same summary to `CHANGELOG.md` as well. + 3. Committing the updated `CHANGELOG.md` file and `.changelog` directory to + the repo. +2. Push this to a branch `release/vX.Y.Z` according to the version number of the + anticipated release (e.g. `release/v0.18.0`) and open a **draft PR**. +3. If there were changes in the `ibc-derive` crate, we need to publish a new + version of that crate. + 1. bump the version in `crates/ibc-derive/Cargo.toml` + 2. Publish `ibc-derive` with `cargo publish -p ibc-derive` +4. Bump the versions of all crates to the new version in their Cargo.toml and in + the root `Cargo.toml` as well, and push these changes to the release PR. + - If you released a new version of `ibc-derive` in step 3, make sure to + update that dependency. + - Verify that there is no dev-dependency among the workspace crates. This is + important, as `cargo-release` ignores dev-dependency edges. You may use + `cargo-depgraph`: + ```sh + cargo depgraph --all-features --workspace-only --dev-deps | dot -Tpng > graph.png + ``` + The command will generate a graph similar to this: + ![alt test](docs/dev-deps-graph.png) The dev dependencies are colored with + blue arrows. Currently, there are no blue arrows, i.e. there is no dev + dependency among the IBC crates. It is advised to avoid any dev dependency + because of release order complicacy (except maybe inside `ibc-testkit`, as + it is the top crate that depends on `ibc` crate and no other crate depends + on it). + - In order to resolve such a situation, the dev dependencies other than + `ibc-testkit` can be manually released to crates.io first so that the + subsequent crates that depend on them can then be released via the release + process. For instructions on how to release a crate on crates.io, refer + [here](https://doc.rust-lang.org/cargo/reference/publishing.html). +5. Beware of [crates-io rate limit][cargo-release-rate-limit]. It is 5 for + publishing new crates and 30 for publishing existing crates. But the number + of our crates has reached 31. So we publish a leaf crate, `ibc-primitives` + manually and release the rest of the 30 crates via CI. + - Release `ibc-primitives` by running: + ```sh + cargo release -p ibc-primitives --no-push --no-tag --allow-branch main --execute + ``` + - Validate the number of crates that need to be released via CI, it can not + be more than 30. + - There should be a 10 minutes delay between the release of `ibc-primitives` + and the release of the rest of the crates on CI. + - If new crates are added, we need to recompute the set of crates that we + want to release via CI. The rest must be released manually. +6. Run `cargo doc -p ibc --all-features --open` locally to double-check that all + the documentation compiles and seems up-to-date and coherent. Fix any + potential issues here and push them to the release PR. +7. Mark the PR as **Ready for Review** and incorporate feedback on the release. + Once approved, merge the PR. +8. Checkout the `main` and pull it with + `git checkout main && git pull origin main`. +9. Create a signed tag `git tag -s -a vX.Y.Z`. In the tag message, write the + version and the link to the corresponding section of the changelog. Then push + the tag to GitHub with `git push origin vX.Y.Z`. + - The [release workflow][release.yaml] will run the `cargo release --execute` + command in a CI worker. +10. If some crates have not been released, check the cause of the failure and + act accordingly: + 1. In case of intermittent problems with the registry, try `cargo release` + locally to publish any missing crates from this release. This step + requires the appropriate privileges to push crates to [crates.io]. + 2. If there is any new crate published locally, add + [ibcbot](https://crates.io/users/ibcbot) to its owners list. + 3. In case problems arise from the source files, fix them, bump a new patch + version (e.g. `v0.48.1`) and repeat the process with its corresponding + new tag. +11. Once the tag is pushed, wait for the CI bot to create a GitHub release, then + update the release description and append: + `[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)` + +### Communications (non-technical) release pipeline + +- Notify the communications team about the pending release and prepare an + announcement. +- Coordinate with other organizations that are active in IBC development (e.g., + Interchain) and keep them in the loop. + +All done! 🎉 + +[crates.io]: https://crates.io +[release.yaml]: https://github.com/cosmos/ibc-rs/blob/main/.github/workflows/release.yaml +[cargo-release-rate-limit]: https://github.com/crate-ci/cargo-release/blob/4b09269/src/steps/mod.rs#L214-L268 diff --git a/ci/code-quality/whitespace-lints.sh b/ci/code-quality/whitespace-lints.sh new file mode 100755 index 000000000..ebf181c6c --- /dev/null +++ b/ci/code-quality/whitespace-lints.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -euo pipefail + +# use ggrep for macOS, and grep for Linux +case "$OSTYPE" in + darwin*) GREP="ggrep" ;; + linux-gnu*) GREP="grep" ;; + *) echo "Unknown OS: $OSTYPE" && exit 1 ;; +esac + +check_binary() { + # exactly one argument is passed + if [ $# -ne 1 ] || [ "$1" = "" ]; then + echo "Usage: check_binary " + exit 1 + fi + + if ! (type "$1" >/dev/null 2>&1); then + echo "$1 is not present" + exit 1 + fi +} + +check_binary "$GREP" +check_binary find + +check_code_quality() { + # exactly three arguments are passed + if [ $# -ne 3 ] || [ "$1" = "" ] || [ "$2" = "" ] || [ "$3" = "" ]; then + echo "Usage: check_code_quality