Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cosmos/ibc-rs into chore/bu…
Browse files Browse the repository at this point in the history
…mp-borsh
  • Loading branch information
seanchen1991 committed May 30, 2024
2 parents 48365c0 + dcf8c36 commit 91e5ac9
Show file tree
Hide file tree
Showing 142 changed files with 1,127 additions and 677 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ics23] Auto-derive `serde::Serialize` for `CommitmentPrefix`.
([\#1229](https://github.com/cosmos/ibc-rs/issues/1229))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-core] Reject IBC packets without height and timestamp timeout.
([\#1198](https://github.com/cosmos/ibc-rs/issues/1198))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-core] Fix proof verification for `PacketTimeout` on a closed channel.
([\#1217](https://github.com/cosmos/ibc-rs/issues/1217))
3 changes: 3 additions & 0 deletions .changelog/v0.53.0/improvements/1109-revamp-ibc-testkit.md
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [ibc-core] Replace fixed `ClientError` associated type restriction with an
`Into<ClientError>` trait bound.
([\#1203](https://github.com/cosmos/ibc-rs/issues/1203))
22 changes: 22 additions & 0 deletions .changelog/v0.53.0/summary.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ updates:
- dependency-name: "ibc*"
- dependency-name: "cosmwasm*"
- dependency-name: "cw*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
4 changes: 4 additions & 0 deletions .github/typos.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[default.extend-words]
# for serde serialization
ser = "ser"

[default]
# random string
extend-ignore-re = [ "[0-9A-Za-z+/]{20,}" ]
4 changes: 2 additions & 2 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: bash ci/code-quality/whitespace-lints.sh

- name: Spell Check with Typos
uses: crate-ci/typos@v1.19.0 # NOTE: Newer versions detect false positives. Test locally before upgrading.
uses: crate-ci/typos@v1.21.0
with:
config: ./.github/typos.toml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand All @@ -53,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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown-link-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
md-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: markdown-link-check
uses: gaurav-nelson/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Check no_std panic conflict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand All @@ -42,7 +42,7 @@ jobs:
name: Check no_std substrate support
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-02-24
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
nightly_fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly # Since fmt uses unstable features for organizing imports
Expand All @@ -64,7 +64,7 @@ jobs:
clippy_all_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand All @@ -77,7 +77,7 @@ jobs:
clippy_no_default_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand All @@ -90,7 +90,7 @@ jobs:
doc_all_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand All @@ -102,7 +102,7 @@ jobs:
doc_no_default_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand All @@ -115,7 +115,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
]
runs-on: ${{ matrix.param.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Download cargo-msrv
uses: dsaltares/fetch-gh-release-asset@master
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# 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<ClientError>` 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*
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ test: ## Run tests with all features and without default features.
cargo test --all-targets --no-default-features

check-release: ## Check that the release build compiles.
cargo release --workspace --no-push --no-tag --no-publish --exclude ibc-derive --exclude ibc-client-tendermint-cw
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 --exclude ibc-derive --exclude ibc-client-tendermint-cw --allow-branch HEAD --execute
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"
Expand Down
87 changes: 54 additions & 33 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,53 +24,74 @@ Our release process is as follows:
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,
except `ibc-testkit`. 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
```
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 blue lines indicate dev dependencies; there should only be one blue line
referring to the `ibc-testkit` dependency. So the above example would result
in an unsuccessful release.
- 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. Run `cargo doc -p ibc --all-features --open` locally to double-check that all
![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.
6. Mark the PR as **Ready for Review** and incorporate feedback on the release.
7. 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
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.
9. If some crates have not been released, check the cause of the failure and
act accordingly:
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].
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.
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)`
[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.
- 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
Loading

0 comments on commit 91e5ac9

Please sign in to comment.