diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index fae32a106..785936d88 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -16,7 +16,7 @@ v Please also ensure that this is not a duplicate issue :) ## Version - + ## Steps to Reproduce diff --git a/.github/ISSUE_TEMPLATE/release-template.md b/.github/ISSUE_TEMPLATE/release-template.md index e1f3734d0..5fe55f8f4 100644 --- a/.github/ISSUE_TEMPLATE/release-template.md +++ b/.github/ISSUE_TEMPLATE/release-template.md @@ -19,4 +19,3 @@ v without deliberation - If doing a release candidate (`rc`) version, then skip the `unclog release` step. - [ ] Bump all crate versions to the new version. - [ ] Reassign unfinished issues of previous milestone to the next milestone. -- [ ] Update Cargo.lock file (if re-publishing `ibc-relayer-cli`) diff --git a/.github/ISSUE_TEMPLATE/rust-update.md b/.github/ISSUE_TEMPLATE/rust-update.md index 2763d111e..3eaae89a7 100644 --- a/.github/ISSUE_TEMPLATE/rust-update.md +++ b/.github/ISSUE_TEMPLATE/rust-update.md @@ -20,9 +20,6 @@ Rust version: - [ ] Update the `rust-version` fields in all `Cargo.toml` files. - [ ] Update the `msrv` field in `clippy.toml` and fix all lints reported by `cargo clippy --all-features`. -- [ ] Update the MSRV shields in README files: - - `README.md` - - `relayer-rest/README.md` -- [ ] Update the MSRV in the guide: `guide/src/pre_requisites.md` +- [ ] Update the MSRV shields in `README.md` file. - [ ] Add a `.changelog` entry to the `breaking-changes` section, announcing the new MSRV. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 416c40459..3f13d68f3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,7 +17,7 @@ ______ ### PR author checklist: - [ ] Added changelog entry, using [`unclog`](https://github.com/informalsystems/unclog). -- [ ] Added tests: integration (for Hermes) or unit/mock tests (for modules). +- [ ] Added tests. - [ ] Linked to GitHub issue. - [ ] Updated code comments and documentation (e.g., `docs/`). - [ ] Tagged *one* reviewer who will be the one responsible for shepherding this PR. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 483f1b00b..fb75b4861 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,41 +3,8 @@ version: 2 updates: - # Enable version updates for npm - package-ecosystem: "cargo" - # Look for Cargo `.toml` and `.lock` files in the `root` directory - directory: "/" - # Check the cargo registry for updates every day (weekdays) - schedule: - interval: "weekly" - - - package-ecosystem: "cargo" - directory: "modules" - schedule: - interval: "weekly" - - - package-ecosystem: "cargo" - directory: "proto" - schedule: - interval: "weekly" - -## Disable dependabot for `proto-compiler`. -## Rationale: we maintain the dependencies for proto-compiler -## manually, so that we update the proto-compiler binary -## (and the Cargo.lock file) only when we regenerate -## Rust types from the .proto files. -# - package-ecosystem: "cargo" -# directory: "proto-compiler" -# schedule: -# interval: "weekly" - - - package-ecosystem: "cargo" - directory: "relayer" - schedule: - interval: "weekly" - - - package-ecosystem: "cargo" - directory: "relayer-cli" + directory: "crates/ibc" schedule: interval: "weekly" diff --git a/.github/workflows/no-std.yaml b/.github/workflows/no-std.yaml index d9020d1de..f2e0c3407 100644 --- a/.github/workflows/no-std.yaml +++ b/.github/workflows/no-std.yaml @@ -6,17 +6,15 @@ on: - Cargo.toml - Cargo.lock - ci/** - - proto/** - - modules/** + - crates/** push: - branches: master + branches: main paths: - .github/workflows/no-std.yml - Cargo.toml - Cargo.lock - ci/** - - proto/** - - modules/** + - crates/** jobs: check-no-std-panic-conflict: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d6506276d..d7c0cb6da 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,31 +4,15 @@ on: paths: - .github/workflows/rust.yml - Cargo.toml - - Cargo.lock - ci/** - - e2e/** - - proto/** - - modules/** - - relayer/** - - relayer-cli/** - - relayer-rest/** - - telemetry/** - - tools/** + - crates/** push: - branches: master + branches: main paths: - .github/workflows/rust.yml - Cargo.toml - - Cargo.lock - ci/** - - e2e/** - - proto/** - - modules/** - - relayer/** - - relayer-cli/** - - relayer-rest/** - - telemetry/** - - tools/** + - crates/** env: CARGO_INCREMENTAL: 0 @@ -45,7 +29,7 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" fmt: runs-on: ubuntu-latest @@ -88,7 +72,7 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --no-default-features --all-targets + args: --no-default-features test-stable: runs-on: ubuntu-latest @@ -107,7 +91,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: --all-features --no-fail-fast --workspace --exclude ibc-integration-test -- --nocapture + args: --all-features --no-fail-fast --workspace -- --nocapture # test-coverage: # runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 2e9b0e881..9e29b6487 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ mc.log # Ignore OSX .DS_Store file .DS_Store + +Cargo.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..263dc36e5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,258 @@ +# 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. + +The rest of this document outlines the best practices for contributing to this +repository: + +- [Decision Making](#decision-making) - process for agreeing to changes +- [Forking](#forking) - fork the repo to make pull requests +- [Changelog](#changelog) - changes must be recorded in the changelog +- [Pull Requests](#pull-requests) - what makes a good pull request +- [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`. + +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 +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. + +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 +quickly. This helps manage the load for reviewers and reduces the likelihood +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: +- 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 + +## Forking + +If you do not have write access to the repository, your contribution should be +made through a fork on Github. Fork the repository, contribute to your fork +(either in the `main` branch of the fork or in a separate branch), and then +make a pull request back upstream. + +When forking, add your fork's URL as a new git remote in your local copy of the +repo. For instance, to create a fork and work on a branch of it: +- Create the fork on GitHub, using the fork button. +- `cd` to the original clone of the repo on your machine +- `git remote rename origin upstream` +- `git remote add origin git@github.com: + +Now `origin` refers to your fork and `upstream` refers to the original version. +Now `git push -u origin main` to update the fork, and make pull requests +against the original repo. + +To pull in updates from the origin repo, run `git fetch upstream` followed by +`git rebase upstream/main` (or whatever branch you're working in). + +## Changelog + +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. + +### Install `unclog` + +```bash +cargo install unclog +``` + +### Examples + +Add a `.changelog` entry to signal that a bug was fixed, without mentioning any +component. + +```bash +$ unclog add -i update-unclog-instructions -s bug -n 1634 -m "Update CONTRIBUTING.md for latest version of unclog" --editor vim +``` + +Add a .changelog entry for the `ibc` crate. + +```bash +$ unclog add -c ibc -s features --id a-new-feature --issue-no 1235 -m "msg about this new-feature" --editor vim +``` + +### Preview unreleased changes + +```bash +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. + +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). +See those changelogs for examples. + +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. + +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` +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. + +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). + +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. + +## 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. + +Branch names should be prefixed with the author's name followed by a short description +of the feature, eg. `name/feature-x`. + +Pull requests are made against `main` and are squash-merged into main. + +PRs must: +- 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 section above for more details. + +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. + +In order to help facilitate the PR review process, tag *one* person as the +reviewer of the PR. If you are unsure of who to tag, your point of contact on +the ibc-rs team is always a natural candidate; they'll make sure that the PR gets +reviewed by whomever is most appropriate to review it. It also helps to notify +the person whom you tagged as reviewer through direct means, such as through +Slack or Discord, as it is easy for GitHub notifications to get lost or buried. + +## Responsibilities of a PR Reviewer + +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. + +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. + +## Releases + +Our release process is as follows: + +1. 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. + 1. Running `unclog release vX.Y.Z` to create a summary of all of the changes + in this release. + 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. Bump all relevant versions in the codebase to the new version and push these + changes to the release PR. This includes: + 1. All `Cargo.toml` files (making sure dependencies' versions are updated + too). + 2. All crates' `lib.rs` files documentation references' `html_root_url` + parameters must point to the new version. + +4. Run `cargo doc --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. +5. Mark the PR as **Ready for Review** and incorporate feedback on the release. +6. Once approved, merge the PR. +7. Pull `main` and run the [`release.sh`](./scripts/release.sh) script. + If any problem arises, submit a new PR, get it merged to `main` and try again. + The reason for not releasing straight from the release branch, and therefore losing the + ability to fix publishing problems as they arise, is that we would like the embedded + metadata of the published crates, namely the Git commit at which the release was done, + to match the Git commit on the `main` branch which will be tagged. + [See this article][crates.io-security] for a more in-depth explanation. + **Note:** This step requires the appropriate privileges to push crates to [crates.io]. +8. Once all crates have been successfully released, 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. +9. Once the tag is pushed, wait for the CI bot to create a GitHub release, and update + the release description to `[📖 CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)`. +10. All done! 🎉 + +[crates.io]: https://crates.io +[crates.io-security]: https://codeandbitters.com/published-crate-analysis/ diff --git a/Cargo.toml b/Cargo.toml index 214c6a3f8..a2c155cb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,27 +3,12 @@ resolver = "2" members = [ - "crates/ibc-chain-registry", - "crates/modules", - "crates/relayer", - "crates/relayer-cli", - "crates/relayer-rest", - "crates/telemetry", - "crates/proto", - "tools/integration-test", - "tools/test-framework", - "tools/check-guide", + "crates/ibc", ] exclude = [ "ci/no-std-check", - "tools/proto-compiler" ] -# [patch.crates-io] -# tendermint = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-rpc = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-light-client = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-testgen = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } +[patch.crates-io] +ibc-proto = { git = "https://github.com/cosmos/ibc-proto-rs" } diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..58b61ab0f --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Informal Systems + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://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. diff --git a/README.md b/README.md new file mode 100644 index 000000000..439e5d955 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# ibc-rs + +[![Cosmos ecosystem][cosmos-shield]][cosmos-link] + +[![Docs][docs-image]][docs-link] +[![Build Status][build-image]][build-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. + +## 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! + +See also [CONTRIBUTING.md](./CONTRIBUTING.md). + +## Versioning + +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] + +## 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 +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. + +[//]: # (badges) +[docs-image]: https://docs.rs/ibc/badge.svg +[docs-link]: https://docs.rs/ibc/ +[build-image]: https://github.com/cosmos/ibc-rs/workflows/Rust/badge.svg +[build-link]: https://github.com/cosmos/ibc-rs/actions?query=workflow%3ARust +[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg +[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 + +[//]: # (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-homepage]: https://cosmos.network/ibc +[cosmos-link]: https://cosmos.network +[semver]: https://semver.org/ +[cosmos-shield]: https://img.shields.io/static/v1?label=&labelColor=1B1E36&color=1B1E36&message=cosmos%20ecosystem&style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAyNTAwIDI1MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI1MDAgMjUwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2RjczOTA7fQoJLnN0MXtmaWxsOiNCN0I5Qzg7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTI1Mi42LDE1OS41Yy0xMzQuOSwwLTI0NC4zLDQ4OS40LTI0NC4zLDEwOTMuMXMxMDkuNCwxMDkzLjEsMjQ0LjMsMTA5My4xczI0NC4zLTQ4OS40LDI0NC4zLTEwOTMuMQoJUzEzODcuNSwxNTkuNSwxMjUyLjYsMTU5LjV6IE0xMjY5LjQsMjI4NGMtMTUuNCwyMC42LTMwLjksNS4xLTMwLjksNS4xYy02Mi4xLTcyLTkzLjItMjA1LjgtOTMuMi0yMDUuOAoJYy0xMDguNy0zNDkuOC04Mi44LTExMDAuOC04Mi44LTExMDAuOGM1MS4xLTU5Ni4yLDE0NC03MzcuMSwxNzUuNi03NjguNGM2LjctNi42LDE3LjEtNy40LDI0LjctMmM0NS45LDMyLjUsODQuNCwxNjguNSw4NC40LDE2OC41CgljMTEzLjYsNDIxLjgsMTAzLjMsODE3LjksMTAzLjMsODE3LjljMTAuMywzNDQuNy01Ni45LDczMC41LTU2LjksNzMwLjVDMTM0MS45LDIyMjIuMiwxMjY5LjQsMjI4NCwxMjY5LjQsMjI4NHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyMDAuNyw3MDguNmMtNjcuMi0xMTcuMS01NDYuMSwzMS42LTEwNzAsMzMycy04OTMuNSw2MzguOS04MjYuMyw3NTUuOXM1NDYuMS0zMS42LDEwNzAtMzMyCglTMjI2Ny44LDgyNS42LDIyMDAuNyw3MDguNkwyMjAwLjcsNzA4LjZ6IE0zNjYuNCwxNzgwLjRjLTI1LjctMy4yLTE5LjktMjQuNC0xOS45LTI0LjRjMzEuNi04OS43LDEzMi0xODMuMiwxMzItMTgzLjIKCWMyNDkuNC0yNjguNCw5MTMuOC02MTkuNyw5MTMuOC02MTkuN2M1NDIuNS0yNTIuNCw3MTEuMS0yNDEuOCw3NTMuOC0yMzBjOS4xLDIuNSwxNSwxMS4yLDE0LDIwLjZjLTUuMSw1Ni0xMDQuMiwxNTctMTA0LjIsMTU3CgljLTMwOS4xLDMwOC42LTY1Ny44LDQ5Ni44LTY1Ny44LDQ5Ni44Yy0yOTMuOCwxODAuNS02NjEuOSwzMTQuMS02NjEuOSwzMTQuMUM0NTYsMTgxMi42LDM2Ni40LDE3ODAuNCwzNjYuNCwxNzgwLjRMMzY2LjQsMTc4MC40CglMMzY2LjQsMTc4MC40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjE5OC40LDE4MDAuNGM2Ny43LTExNi44LTMwMC45LTQ1Ni44LTgyMy03NTkuNVMzNzQuNCw1ODcuOCwzMDYuOCw3MDQuN3MzMDAuOSw0NTYuOCw4MjMuMyw3NTkuNQoJUzIxMzAuNywxOTE3LjQsMjE5OC40LDE4MDAuNHogTTM1MS42LDc0OS44Yy0xMC0yMy43LDExLjEtMjkuNCwxMS4xLTI5LjRjOTMuNS0xNy42LDIyNC43LDIyLjYsMjI0LjcsMjIuNgoJYzM1Ny4yLDgxLjMsOTk0LDQ4MC4yLDk5NCw0ODAuMmM0OTAuMywzNDMuMSw1NjUuNSw0OTQuMiw1NzYuOCw1MzcuMWMyLjQsOS4xLTIuMiwxOC42LTEwLjcsMjIuNGMtNTEuMSwyMy40LTE4OC4xLTExLjUtMTg4LjEtMTEuNQoJYy00MjIuMS0xMTMuMi03NTkuNi0zMjAuNS03NTkuNi0zMjAuNWMtMzAzLjMtMTYzLjYtNjAzLjItNDE1LjMtNjAzLjItNDE1LjNjLTIyNy45LTE5MS45LTI0NS0yODUuNC0yNDUtMjg1LjRMMzUxLjYsNzQ5Ljh6Ii8+CjxjaXJjbGUgY2xhc3M9InN0MSIgY3g9IjEyNTAiIGN5PSIxMjUwIiByPSIxMjguNiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iMTc3Ny4zIiBjeT0iNzU2LjIiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iNTUzIiBjeT0iMTAxOC41IiByeD0iNzQuNiIgcnk9Ijc3LjIiLz4KPGVsbGlwc2UgY2xhc3M9InN0MSIgY3g9IjEwOTguMiIgY3k9IjE5NjUiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8L3N2Zz4K diff --git a/ci/no-std-check/Cargo.lock b/ci/no-std-check/Cargo.lock index a8c7c9d6d..44984a0bc 100644 --- a/ci/no-std-check/Cargo.lock +++ b/ci/no-std-check/Cargo.lock @@ -40,18 +40,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] [[package]] name = "android_system_properties" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.62" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" +checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" [[package]] name = "arrayref" @@ -193,9 +193,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array 0.14.6", ] @@ -277,9 +277,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpufeatures" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1079fb8528d9f9c888b1e8aa651e6e079ade467323d58f75faf1d30b1808f540" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -381,7 +381,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.3", "crypto-common", ] @@ -455,9 +455,9 @@ checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] name = "erased-serde" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003000e712ad0f95857bd4d2ef8d1890069e06554101697d12050668b2f6f020" +checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" dependencies = [ "serde", ] @@ -506,9 +506,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] name = "futures" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa" +checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" dependencies = [ "futures-channel", "futures-core", @@ -521,9 +521,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" dependencies = [ "futures-core", "futures-sink", @@ -531,15 +531,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] name = "futures-executor" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d11aa21b5b587a64682c0094c2bdd4df0076c5324961a40cc3abd7f37930528" +checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" dependencies = [ "futures-core", "futures-task", @@ -549,15 +549,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5" +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" [[package]] name = "futures-macro" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db9cce532b0eae2ccf2766ab246f114b56b9cf6d445e00c2549fbc100ca045d" +checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ "proc-macro2", "quote", @@ -566,21 +566,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] name = "futures-task" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] name = "futures-util" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ "futures-channel", "futures-core", @@ -724,9 +724,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.46" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2bfd338099682614d3ee3fe0cd72e0b6a41ca6a87f6a74a3bd593c91650501" +checksum = "fd911b35d940d2bd0bea0f9100068e5b97b51a1cbe13d13382f132e0365257a0" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -766,6 +766,7 @@ dependencies = [ [[package]] name = "ibc-proto" version = "0.20.1" +source = "git+https://github.com/cosmos/ibc-proto-rs#7238ae61a9aa4581a543f74f368ab0ede4613076" dependencies = [ "base64", "bytes", @@ -849,9 +850,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -870,9 +871,9 @@ checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -891,9 +892,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" [[package]] name = "libsecp256k1" @@ -945,9 +946,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -1008,9 +1009,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] @@ -1129,9 +1130,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] name = "opaque-debug" @@ -1230,9 +1231,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" [[package]] name = "pbkdf2" @@ -1307,9 +1308,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ "unicode-ident", ] @@ -1384,7 +1385,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1404,7 +1405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1418,9 +1419,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom 0.2.7", ] @@ -1500,9 +1501,9 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "ripemd" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ "digest 0.10.5", ] @@ -1638,9 +1639,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.143" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] @@ -1656,9 +1657,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -1667,9 +1668,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ "itoa 1.0.3", "ryu", @@ -1725,9 +1726,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.2" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" +checksum = "e2904bea16a1ae962b483322a1c7b81d976029203aea1f461e51cd7705db7ba9" dependencies = [ "digest 0.10.5", "keccak", @@ -1744,9 +1745,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.0" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ea32af43239f0d353a7dd75a22d94c329c8cdaafdcb4c1c1335aa10c298a4a" +checksum = "deb766570a2825fa972bceff0d195727876a9cdf2460ab2e52d455dc2de47fd9" [[package]] name = "slab" @@ -2074,9 +2075,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.25.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a039906277e0d8db996cd9d1ef19278c10209d994ecfc1025ced16342873a17c" +checksum = "5e4f0cb475a8e58d9ed8a963010108768d79e397f7aff79f9a3972ef490f97de" dependencies = [ "Inflector", "num-format", @@ -2123,9 +2124,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" dependencies = [ "proc-macro2", "quote", @@ -2212,18 +2213,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -2425,9 +2426,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "a45526d29728d135c2900b0d30573fe3ee79fceb12ef534c7bb30e810a91b601" dependencies = [ "byteorder", "crunchy", @@ -2437,24 +2438,24 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" [[package]] name = "unicode-normalization" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "valuable" @@ -2482,9 +2483,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2492,9 +2493,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -2507,9 +2508,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2517,9 +2518,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2530,9 +2531,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasmi" diff --git a/ci/no-std-check/Cargo.toml b/ci/no-std-check/Cargo.toml index 0d93978dd..1bd30f48b 100644 --- a/ci/no-std-check/Cargo.toml +++ b/ci/no-std-check/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" resolver = "2" [dependencies] -ibc = { path = "../../crates/modules", default-features = false } -ibc-proto = { path = "../../crates/proto", default-features = false } +ibc = { path = "../../crates/ibc", default-features = false } +ibc-proto = { version = "0.20.1", default-features = false } tendermint = { version = "0.25.0", default-features = false } tendermint-proto = { version = "0.25.0", default-features = false } tendermint-light-client-verifier = { version = "0.25.0", default-features = false } @@ -31,7 +31,5 @@ substrate-std = [ "sp-std/std", ] -# [patch.crates-io] -# tendermint = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } -# tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs", branch = "v0.23.x" } +[patch.crates-io] +ibc-proto = { git = "https://github.com/cosmos/ibc-proto-rs" } diff --git a/crates/ibc/Cargo.toml b/crates/ibc/Cargo.toml index 210922ab7..02ae894c6 100644 --- a/crates/ibc/Cargo.toml +++ b/crates/ibc/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" readme = "README.md" keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] -repository = "https://github.com/informalsystems/ibc-rs" +repository = "https://github.com/cosmos/ibc-rs" authors = ["Informal Systems "] rust-version = "1.60" description = """ @@ -27,7 +27,7 @@ mocks = ["tendermint-testgen", "clock", "std"] [dependencies] # Proto definitions for all IBC-related interfaces, e.g., connections or channels. -ibc-proto = { version = "0.20.1", path = "../proto", default-features = false } +ibc-proto = { version = "0.20.1", default-features = false } ics23 = { version = "=0.8.1", default-features = false, features = ["host-functions"] } time = { version = ">=0.3.0, <0.3.12", default-features = false } serde_derive = { version = "1.0.104", default-features = false } diff --git a/crates/ibc/README.md b/crates/ibc/README.md index 00a29c55d..1177689e4 100644 --- a/crates/ibc/README.md +++ b/crates/ibc/README.md @@ -1,4 +1,4 @@ -# IBC module +# IBC in Rust [![Crate][crate-image]][crate-link] [![Docs][docs-image]][docs-link] @@ -6,13 +6,10 @@ [![End to End testing][e2e-image]][e2e-link] [![Apache 2.0 Licensed][license-image]][license-link] ![Rust Stable][rustc-image] -![Rust 1.51+][rustc-version] +![Rust 1.60+][rustc-version] -See the [ibc-rs] repo root for more detailed information on how this crate can be used. - - -Implementation of the Inter-Blockchain Communication Protocol ([IBC]) module. +Implementation of the Inter-Blockchain Communication Protocol ([IBC]) in Rust. ## Documentation @@ -60,17 +57,17 @@ Unless required by applicable law or agreed to in writing, software distributed [docs-image]: https://docs.rs/ibc/badge.svg [docs-link]: https://docs.rs/ibc/ -[build-image]: https://github.com/informalsystems/ibc-rs/workflows/Rust/badge.svg -[build-link]: https://github.com/informalsystems/ibc-rs/actions?query=workflow%3ARust -[e2e-image]: https://github.com/informalsystems/ibc-rs/workflows/End%20to%20End%20testing/badge.svg -[e2e-link]: https://github.com/informalsystems/ibc-rs/actions?query=workflow%3A%22End+to+End+testing%22 +[build-image]: https://github.com/cosmos/ibc-rs/workflows/Rust/badge.svg +[build-link]: https://github.com/cosmos/ibc-rs/actions?query=workflow%3ARust +[e2e-image]: https://github.com/cosmos/ibc-rs/workflows/End%20to%20End%20testing/badge.svg +[e2e-link]: https://github.com/cosmos/ibc-rs/actions?query=workflow%3A%22End+to+End+testing%22 [license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg -[license-link]: https://github.com/informalsystems/ibc-rs/blob/master/LICENSE +[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.51+-blue.svg +[rustc-version]: https://img.shields.io/badge/rustc-1.60+-blue.svg [//]: # (general links) -[ibc-rs]: https://github.com/informalsystems/ibc-rs +[ibc-rs]: https://github.com/cosmos/ibc-rs [IBC]: https://github.com/cosmos/ibc diff --git a/crates/ibc/src/lib.rs b/crates/ibc/src/lib.rs index b3a4eec68..dfc0eb82c 100644 --- a/crates/ibc/src/lib.rs +++ b/crates/ibc/src/lib.rs @@ -37,12 +37,12 @@ //! `Relayer` contains utilities for testing the `ibc` crate against the [Hermes IBC relayer][relayer-repo]. It acts //! as scaffolding for gluing the `ibc` crate with Hermes for testing purposes. //! -//! [core]: https://github.com/informalsystems/ibc-rs/tree/master/modules/src/core -//! [clients]: https://github.com/informalsystems/ibc-rs/tree/master/modules/src/clients -//! [applications]: https://github.com/informalsystems/ibc-rs/tree/master/modules/src/applications +//! [core]: https://github.com/cosmos/ibc-rs/tree/main/crates/ibc/src/core +//! [clients]: https://github.com/cosmos/ibc-rs/tree/main/crates/ibc/src/clients +//! [applications]: https://github.com/cosmos/ibc-rs/tree/main/crates/ibc/src/applications //! [ics-standards]: https://github.com/cosmos/ibc#interchain-standards -//! [relayer]: https://github.com/informalsystems/ibc-rs/tree/master/modules/src/relayer -//! [relayer-repo]: https://github.com/informalsystems/ibc-rs/tree/master/relayer +//! [relayer]: https://github.com/cosmos/ibc-rs/tree/main/crates/ibc/src/relayer +//! [relayer-repo]: https://github.com/informalsystems/ibc-rs/tree/main/relayer extern crate alloc; diff --git a/crates/ibc/src/relayer/mod.rs b/crates/ibc/src/relayer/mod.rs index e88996bcd..336ae1831 100644 --- a/crates/ibc/src/relayer/mod.rs +++ b/crates/ibc/src/relayer/mod.rs @@ -1,5 +1,5 @@ //! Utilities for testing the `ibc` crate against the [Hermes IBC relayer][relayer-repo]. //! -//! [relayer-repo]: https://github.com/informalsystems/ibc-rs/tree/master/relayer +//! [relayer-repo]: https://github.com/informalsystems/ibc-rs/tree/main/relayer pub mod ics18_relayer; diff --git a/docs/architecture/README.md b/docs/architecture/README.md new file mode 100644 index 000000000..48af14dfe --- /dev/null +++ b/docs/architecture/README.md @@ -0,0 +1,30 @@ +# Architecture Decision Records (ADR) + +This is a location to record all high-level architecture decisions in the IBC-RS project. + +You can read more about the ADR concept in this [blog post](https://product.reverb.com/documenting-architecture-decisions-the-reverb-way-a3563bb24bd0#.78xhdix6t). + +An ADR should provide: + +- Context on the relevant goals and the current state +- Proposed changes to achieve the goals +- Summary of pros and cons +- References +- Changelog + +Note the distinction between an ADR and a spec. The ADR provides the context, intuition, reasoning, and +justification for a change in architecture, or for the architecture of something +new. The spec is much more compressed and streamlined summary of everything as +it is or should be. + +If recorded decisions turned out to be lacking, convene a discussion, record the new decisions here, and then modify the code to match. + +Note the context/background should be written in the present tense. + +To suggest an ADR, please make use of the [ADR template](./adr-template.md) provided. + +## Table of Contents + +| ADR \# | Description | Status | +|-----------------------------------------------------------|-------------------------------------------------------|----------| + diff --git a/docs/architecture/adr-template.md b/docs/architecture/adr-template.md new file mode 100644 index 000000000..28a5ecfbb --- /dev/null +++ b/docs/architecture/adr-template.md @@ -0,0 +1,36 @@ +# ADR {ADR-NUMBER}: {TITLE} + +## Changelog +* {date}: {changelog} + +## Context + +> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution. +## Decision + +> This section explains all of the details of the proposed solution, including implementation details. +It should also describe affects / corollary items that may need to be changed as a part of this. +If the proposed change will be large, please also indicate a way to do the change to maximize ease of review. +(e.g. the optimal split of things to do between separate PR's) + +## Status + +> A decision may be "proposed" if it hasn't been agreed upon yet, or "accepted" once it is agreed upon. If a later ADR changes or reverses a decision, it may be marked as "deprecated" or "superseded" with a reference to its replacement. + +{Deprecated|Proposed|Accepted} + +## Consequences + +> This section describes the consequences, after applying the decision. All consequences should be summarized here, not just the "positive" ones. + +### Positive + +### Negative + +### Neutral + +## References + +> Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here! + +* {reference link}