Skip to content

Commit

Permalink
Release v0.49.0 (#1021)
Browse files Browse the repository at this point in the history
* Add v0.49 changelog

* Update cargo.toml dependency versions

* Use infallible conversion method where appropriate

* Bump ibc-derive version

* Update ibc-derive deps version

* Update RELEASES.md doc

* Update release workflow to use `cargo release`

* Remove release.sh script in favor of `cargo release` command

* CI: add job for release-check

* fix: revise if conditions

* fix: release.yaml if condition

* rewrite release.yaml + apply linter on CHANGELOG.md

* Incorporate some PR feedback

---------

Co-authored-by: Farhad Shabani <[email protected]>
  • Loading branch information
seanchen1991 and Farhad-Shabani authored Jan 3, 2024
1 parent 2be0344 commit 211d1fe
Show file tree
Hide file tree
Showing 21 changed files with 165 additions and 157 deletions.
13 changes: 13 additions & 0 deletions .changelog/v0.49.0/summary.md
Original file line number Diff line number Diff line change
@@ -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.
56 changes: 47 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,65 @@
# Attempts to perform a release when a particular tag is pushed. This uses the
# `./scripts/release.sh`, 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.
# 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.
# The release.sh script aims to be an idempotent operation, skipping the
# publishing of crates that have already been published.
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:
release:
publish-check:
if: github.ref_type != 'tag'
name: Check publish to crates.io (dry run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Checkout code
uses: actions/checkout@v4
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-release
run: cargo install cargo-release
- name: Publish crates (dry run)
run: cargo release --workspace --no-push --no-tag --no-publish --exclude ibc-derive
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

publish:
if: github.ref_type == 'tag'
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-release
run: cargo install cargo-release
- name: Publish crates
run: ./scripts/release.sh
run: cargo release --workspace --no-push --no-tag --exclude ibc-derive --execute
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

gh-release:
if: github.ref_type == 'tag'
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 }}
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
# CHANGELOG

## v0.49.0

*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<Vec<u8>>` 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*
Expand Down
52 changes: 26 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exclude = [
]

[workspace.package]
version = "0.48.2"
version = "0.49.0"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.64"
Expand All @@ -58,33 +58,33 @@ serde_json = { package = "serde-json-wasm", version = "1.0.0" , default
subtle-encoding = { version = "0.5", default-features = false }

# ibc dependencies
ibc = { version = "0.48.2", path = "./ibc", default-features = false }
ibc-core = { version = "0.48.2", path = "./ibc-core", default-features = false }
ibc-clients = { version = "0.48.2", path = "./ibc-clients", default-features = false }
ibc-apps = { version = "0.48.2", path = "./ibc-apps", default-features = false }
ibc-primitives = { version = "0.48.2", path = "./ibc-primitives", default-features = false }
ibc-derive = { version = "0.4.0", path = "./ibc-derive" }
ibc = { version = "0.49.0", path = "./ibc", default-features = false }
ibc-core = { version = "0.49.0", path = "./ibc-core", default-features = false }
ibc-clients = { version = "0.49.0", path = "./ibc-clients", default-features = false }
ibc-apps = { version = "0.49.0", path = "./ibc-apps", default-features = false }
ibc-primitives = { version = "0.49.0", path = "./ibc-primitives", default-features = false }
ibc-derive = { version = "0.5.0", path = "./ibc-derive" }

ibc-core-client = { version = "0.48.2", path = "./ibc-core/ics02-client", default-features = false }
ibc-core-connection = { version = "0.48.2", path = "./ibc-core/ics03-connection", default-features = false }
ibc-core-channel = { version = "0.48.2", path = "./ibc-core/ics04-channel", default-features = false }
ibc-core-host = { version = "0.48.2", path = "./ibc-core/ics24-host", default-features = false }
ibc-core-handler = { version = "0.48.2", path = "./ibc-core/ics25-handler", default-features = false }
ibc-core-router = { version = "0.48.2", path = "./ibc-core/ics26-routing", default-features = false }
ibc-client-tendermint = { version = "0.48.2", path = "./ibc-clients/ics07-tendermint", default-features = false }
ibc-app-transfer = { version = "0.48.2", path = "./ibc-apps/ics20-transfer", default-features = false }
ibc-core-client = { version = "0.49.0", path = "./ibc-core/ics02-client", default-features = false }
ibc-core-connection = { version = "0.49.0", path = "./ibc-core/ics03-connection", default-features = false }
ibc-core-channel = { version = "0.49.0", path = "./ibc-core/ics04-channel", default-features = false }
ibc-core-host = { version = "0.49.0", path = "./ibc-core/ics24-host", default-features = false }
ibc-core-handler = { version = "0.49.0", path = "./ibc-core/ics25-handler", default-features = false }
ibc-core-router = { version = "0.49.0", path = "./ibc-core/ics26-routing", default-features = false }
ibc-client-tendermint = { version = "0.49.0", path = "./ibc-clients/ics07-tendermint", default-features = false }
ibc-app-transfer = { version = "0.49.0", path = "./ibc-apps/ics20-transfer", default-features = false }

ibc-core-client-context = { version = "0.48.2", path = "./ibc-core/ics02-client/context", default-features = false }
ibc-core-client-types = { version = "0.48.2", path = "./ibc-core/ics02-client/types", default-features = false }
ibc-core-channel-types = { version = "0.48.2", path = "./ibc-core/ics04-channel/types", default-features = false }
ibc-core-connection-types = { version = "0.48.2", path = "./ibc-core/ics03-connection/types", default-features = false }
ibc-core-commitment-types = { version = "0.48.2", path = "./ibc-core/ics23-commitment/types", default-features = false }
ibc-core-host-cosmos = { version = "0.48.2", path = "./ibc-core/ics24-host/cosmos", default-features = false }
ibc-core-host-types = { version = "0.48.2", path = "./ibc-core/ics24-host/types", default-features = false }
ibc-core-handler-types = { version = "0.48.2", path = "./ibc-core/ics25-handler/types", default-features = false }
ibc-core-router-types = { version = "0.48.2", path = "./ibc-core/ics26-routing/types", default-features = false }
ibc-client-tendermint-types = { version = "0.48.2", path = "./ibc-clients/ics07-tendermint/types", default-features = false }
ibc-app-transfer-types = { version = "0.48.2", path = "./ibc-apps/ics20-transfer/types", default-features = false }
ibc-core-client-context = { version = "0.49.0", path = "./ibc-core/ics02-client/context", default-features = false }
ibc-core-client-types = { version = "0.49.0", path = "./ibc-core/ics02-client/types", default-features = false }
ibc-core-channel-types = { version = "0.49.0", path = "./ibc-core/ics04-channel/types", default-features = false }
ibc-core-connection-types = { version = "0.49.0", path = "./ibc-core/ics03-connection/types", default-features = false }
ibc-core-commitment-types = { version = "0.49.0", path = "./ibc-core/ics23-commitment/types", default-features = false }
ibc-core-host-cosmos = { version = "0.49.0", path = "./ibc-core/ics24-host/cosmos", default-features = false }
ibc-core-host-types = { version = "0.49.0", path = "./ibc-core/ics24-host/types", default-features = false }
ibc-core-handler-types = { version = "0.49.0", path = "./ibc-core/ics25-handler/types", default-features = false }
ibc-core-router-types = { version = "0.49.0", path = "./ibc-core/ics26-routing/types", default-features = false }
ibc-client-tendermint-types = { version = "0.49.0", path = "./ibc-clients/ics07-tendermint/types", default-features = false }
ibc-app-transfer-types = { version = "0.49.0", path = "./ibc-apps/ics20-transfer/types", default-features = false }

ibc-proto = { version = "0.39.1", default-features = false }

Expand Down
24 changes: 11 additions & 13 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,27 @@ Our release process is as follows:
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. Create a signed tag `git tag -s -a vX.Y.Z`. In the tag message, write the
6. Mark the PR as **Ready for Review** and incorporate feedback on the release.
Once approved, merge the PR.
7. Checkout the `main` and pull it with `git checkout main && git pull origin main`.
8. 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 --tags`.
- The [release workflow][release.yml] will run the [`release.sh`] script in a
CI worker.
10. If some crates have not been released, check the cause of the failure and
the tag to GitHub with `git push origin vX.Y.Z`.
- The [release workflow][release.yml] will run the `cargo release --execute`
command in a CI worker.
9. 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, rerun the script
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. In case the 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, create a GitHub release and append
10. 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)`
to the release description.

All done! 🎉

[crates.io]: https://crates.io
[`release.sh`]: https://github.com/cosmos/ibc-rs/blob/main/scripts/release.sh
[release.yml]: https://github.com/cosmos/ibc-rs/blob/main/.github/workflows/release.yml
2 changes: 1 addition & 1 deletion ibc-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibc-derive"
version = "0.4.0"
version = "0.5.0"
license = { workspace = true }
repository = { workspace = true }
edition = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion ibc-testkit/tests/core/ics02_client/create_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn test_tm_create_client_ok() {

let msg = MsgCreateClient::new(
tm_client_state,
TmConsensusState::try_from(tm_header).unwrap().into(),
TmConsensusState::from(tm_header).into(),
signer,
);

Expand Down
107 changes: 0 additions & 107 deletions scripts/release.sh

This file was deleted.

0 comments on commit 211d1fe

Please sign in to comment.