Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: restructure ibc crate #975

Merged
merged 13 commits into from
Nov 22, 2023
Merged

feat: restructure ibc crate #975

merged 13 commits into from
Nov 22, 2023

Conversation

Farhad-Shabani
Copy link
Member

@Farhad-Shabani Farhad-Shabani commented Nov 21, 2023

Closes: #976
Closes: #965
Closes: #948
Closes: #771
Closes: #716
Closes: #697

Integration tests: informalsystems/basecoin-rs#144


PR author checklist:

  • Added changelog entry, using unclog.
  • 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.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

Farhad-Shabani and others added 4 commits November 17, 2023 07:26
…pps` (#967)

* feat: restructure and split off applications codebase into ibc-apps dir

* imp: rename transfer dir to ics20_transfer

* feat: add ibc-apps crate

* fix: remove redundant dep + fix cargo doc

* docs: add README and descriptions

* docs: update main README page

* nit: docstrings

* nit: docstrings

* imp: rename folder to ics20-transfer

* chore: move serializers into ics20-transfer/types

* fix: apply reviewer comments

* imp: add docstring for cosmos_adr028_escrow_address

* fix: add missing features + use workspace deps for ibc crates

* imp: place re-exports under mod

* nit: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* fix: cargo fmt

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>
* docs: write ADR for ibc crate restructure

* fix: mistaken adr007 file naming

* chore: markdown adjustment

* fix: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* docs: explanation for *-types interaction with ibc-proto

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>
…` crates (#969)

* feat: migrate `core` module under the `ibc` crate into `ibc-core`

feat: migrate `core` module under the `ibc` crate into `ibc-core`

feat: migrate `applications` module under the `ibc` crate into `ibc-apps` (#967)

* feat: restructure and split off applications codebase into ibc-apps dir

* imp: rename transfer dir to ics20_transfer

* feat: add ibc-apps crate

* fix: remove redundant dep + fix cargo doc

* docs: add README and descriptions

* docs: update main README page

* nit: docstrings

* nit: docstrings

* imp: rename folder to ics20-transfer

* chore: move serializers into ics20-transfer/types

* fix: apply reviewer comments

* imp: add docstring for cosmos_adr028_escrow_address

* fix: add missing features + use workspace deps for ibc crates

* imp: place re-exports under mod

* nit: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* fix: cargo fmt

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>

feat: restructure and split off applications codebase into ibc-apps dir

refactor: nits from nightly clippy (#962)

* use enum tuple variants directly

* use first() over get(0)

* use infallible conversion

* rm redundant export

* cargo fmt

ci: spell check on GitHub workflows (#964)

* typos github action

* cutom config for typos

* fix spelling to counterparty

* fix spelling to transfer

imp: rename transfer dir to ics20_transfer

feat: add ibc-apps crate

fix: remove redundant dep + fix cargo doc

docs: add README and descriptions

docs: update main README page

nit: docstrings

nit: docstrings

imp: rename folder to ics20-transfer

chore: move serializers into ics20-transfer/types

fix: apply reviewer comments

imp: add docstring for cosmos_adr028_escrow_address

fix: add missing features + use workspace deps for ibc crates

imp: place re-exports under mod

feat: ibc core codebase overhaul (part-1)

feat: ibc core codebase overhaul (part-2)

chore: comment out ibc-query & ibc-testkit

fix: add missing features

nit

* fix: re-export ibc_apps in the ibc crate

* chore: adjust features + add description for crates

* fix: CI catches

* fix: no_std

* imp: define ics25-handler + move tendermint-specific impls into ibc-core-host-tendermint

* fix: cargo doc

* docs: add and edit READMEs

* fix: cargo hack catches

* fix: cargo udeps catches

* chore: ajdust README tables

* docs: further README adjustments

* fix: typo

* chore: another review of comments & READMEs

* imp: move Any and Protobuf to ibc-primitives

* fix: missing std features

* Split out ibc-clients crate (#971)

* Migrate crates/ibc-clients

* Fix dependencies in types directory

* Fix dependencies in ibc-clients crate

* Delete ibc/ics07_tendermint directory

* Resolve dependencies in ibc crate

* Resolve dependencies in ibc-clients crate

* Wrap ClientState type in a newtype wrapper

* Address all compilation errors

* Migrate crates/ibc-clients

* Fix dependencies in types directory

* Fix dependencies in ibc-clients crate

* Delete ibc/ics07_tendermint directory

* Resolve dependencies in ibc crate

* Resolve dependencies in ibc-clients crate

* Wrap ClientState type in a newtype wrapper

* Address all compilation errors

* Add default feature `std` for ibc-clients crate

* Change cfg derivation

* Fixing import paths

* Fix import paths for ibc-client-tendermint crate

* Fix merge conflicts

* Fix merge conflicts

* Fix merge conflicts

* Fix remaining compilation errors in ics07-tendermint crate

* chore: adjust import paths, features and READMEs

* fix: CI catches

* fix: add serde dep for ibc-client-tendermint

* fix: serde_tests

* imp: rename ClientState to ClientStateWrapper

---------

Co-authored-by: Farhad Shabani <[email protected]>

* docs: improve crates descriptions

* fix: apply reviewer comments

* Delete some unused modules and add some documentation

* Add TODO to use u64::dev_ceil

* Formatting of ibc-primitives README

* fix: ibc-primitives serde feature

---------

Co-authored-by: Sean Chen <[email protected]>
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 558 lines in your changes are missing coverage. Please review.

Comparison is base (bf77378) 66.30% compared to head (a8e22b7) 70.24%.

Files Patch % Lines
ibc-clients/ics07-tendermint/src/client_state.rs 59.53% 155 Missing ⚠️
ibc-core/ics25-handler/types/src/msgs.rs 0.69% 142 Missing ⚠️
ibc-core/ics26-routing/types/src/event.rs 21.42% 22 Missing ⚠️
...core/ics24-host/cosmos/src/validate_self_client.rs 0.00% 20 Missing ⚠️
...c-core/ics24-host/types/src/identifiers/port_id.rs 41.93% 18 Missing ⚠️
ibc-core/ics26-routing/types/src/module.rs 37.03% 17 Missing ⚠️
...bc-clients/ics07-tendermint/src/consensus_state.rs 57.89% 16 Missing ⚠️
...ore/ics24-host/types/src/identifiers/channel_id.rs 57.14% 15 Missing ⚠️
...-core/ics24-host/types/src/identifiers/sequence.rs 60.60% 13 Missing ⚠️
...core/ics24-host/types/src/identifiers/client_id.rs 64.51% 11 Missing ⚠️
... and 41 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
+ Coverage   66.30%   70.24%   +3.94%     
==========================================
  Files         161      177      +16     
  Lines       15752    17730    +1978     
==========================================
+ Hits        10444    12455    +2011     
+ Misses       5308     5275      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Farhad-Shabani Farhad-Shabani marked this pull request as ready for review November 21, 2023 19:40
@Farhad-Shabani Farhad-Shabani added this to the v0.48.0 milestone Nov 21, 2023
Comment on lines +8 to +16
- ibc/**
- ibc-core/**
- ibc-apps/**
- ibc-data-types/**
- ibc-clients/**
- ibc-primitives/**
- ibc-query/**
- ibc-testkit/**
- ibc-derive/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do ibc*/**, unless you want to be selective.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, still being able to selectively comment out each crates works better for the development and debugging purposes imo.

ibc-core/README.md Outdated Show resolved Hide resolved
ibc-core/README.md Outdated Show resolved Hide resolved
ibc-derive/README.md Outdated Show resolved Hide resolved
ibc-apps/README.md Outdated Show resolved Hide resolved
ibc-clients/README.md Outdated Show resolved Hide resolved
@Farhad-Shabani Farhad-Shabani merged commit 4421b0d into main Nov 22, 2023
14 checks passed
@Farhad-Shabani Farhad-Shabani deleted the feat/restructure-ibc branch November 22, 2023 16:24
Farhad-Shabani added a commit that referenced this pull request Sep 9, 2024
* feat: migrate `applications` module under the `ibc` crate into `ibc-apps` (#967)

* feat: restructure and split off applications codebase into ibc-apps dir

* imp: rename transfer dir to ics20_transfer

* feat: add ibc-apps crate

* fix: remove redundant dep + fix cargo doc

* docs: add README and descriptions

* docs: update main README page

* nit: docstrings

* nit: docstrings

* imp: rename folder to ics20-transfer

* chore: move serializers into ics20-transfer/types

* fix: apply reviewer comments

* imp: add docstring for cosmos_adr028_escrow_address

* fix: add missing features + use workspace deps for ibc crates

* imp: place re-exports under mod

* nit: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* fix: cargo fmt

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>

* docs: ADR-008 to restructure the `ibc` crate (#966)

* docs: write ADR for ibc crate restructure

* fix: mistaken adr007 file naming

* chore: markdown adjustment

* fix: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* docs: explanation for *-types interaction with ibc-proto

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>

* feat: migrate `core`, `clients` modules into `ibc-core`, `ibc-clients` crates (#969)

* feat: migrate `core` module under the `ibc` crate into `ibc-core`

feat: migrate `core` module under the `ibc` crate into `ibc-core`

feat: migrate `applications` module under the `ibc` crate into `ibc-apps` (#967)

* feat: restructure and split off applications codebase into ibc-apps dir

* imp: rename transfer dir to ics20_transfer

* feat: add ibc-apps crate

* fix: remove redundant dep + fix cargo doc

* docs: add README and descriptions

* docs: update main README page

* nit: docstrings

* nit: docstrings

* imp: rename folder to ics20-transfer

* chore: move serializers into ics20-transfer/types

* fix: apply reviewer comments

* imp: add docstring for cosmos_adr028_escrow_address

* fix: add missing features + use workspace deps for ibc crates

* imp: place re-exports under mod

* nit: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* fix: cargo fmt

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>

feat: restructure and split off applications codebase into ibc-apps dir

refactor: nits from nightly clippy (#962)

* use enum tuple variants directly

* use first() over get(0)

* use infallible conversion

* rm redundant export

* cargo fmt

ci: spell check on GitHub workflows (#964)

* typos github action

* cutom config for typos

* fix spelling to counterparty

* fix spelling to transfer

imp: rename transfer dir to ics20_transfer

feat: add ibc-apps crate

fix: remove redundant dep + fix cargo doc

docs: add README and descriptions

docs: update main README page

nit: docstrings

nit: docstrings

imp: rename folder to ics20-transfer

chore: move serializers into ics20-transfer/types

fix: apply reviewer comments

imp: add docstring for cosmos_adr028_escrow_address

fix: add missing features + use workspace deps for ibc crates

imp: place re-exports under mod

feat: ibc core codebase overhaul (part-1)

feat: ibc core codebase overhaul (part-2)

chore: comment out ibc-query & ibc-testkit

fix: add missing features

nit

* fix: re-export ibc_apps in the ibc crate

* chore: adjust features + add description for crates

* fix: CI catches

* fix: no_std

* imp: define ics25-handler + move tendermint-specific impls into ibc-core-host-tendermint

* fix: cargo doc

* docs: add and edit READMEs

* fix: cargo hack catches

* fix: cargo udeps catches

* chore: ajdust README tables

* docs: further README adjustments

* fix: typo

* chore: another review of comments & READMEs

* imp: move Any and Protobuf to ibc-primitives

* fix: missing std features

* Split out ibc-clients crate (#971)

* Migrate crates/ibc-clients

* Fix dependencies in types directory

* Fix dependencies in ibc-clients crate

* Delete ibc/ics07_tendermint directory

* Resolve dependencies in ibc crate

* Resolve dependencies in ibc-clients crate

* Wrap ClientState type in a newtype wrapper

* Address all compilation errors

* Migrate crates/ibc-clients

* Fix dependencies in types directory

* Fix dependencies in ibc-clients crate

* Delete ibc/ics07_tendermint directory

* Resolve dependencies in ibc crate

* Resolve dependencies in ibc-clients crate

* Wrap ClientState type in a newtype wrapper

* Address all compilation errors

* Add default feature `std` for ibc-clients crate

* Change cfg derivation

* Fixing import paths

* Fix import paths for ibc-client-tendermint crate

* Fix merge conflicts

* Fix merge conflicts

* Fix merge conflicts

* Fix remaining compilation errors in ics07-tendermint crate

* chore: adjust import paths, features and READMEs

* fix: CI catches

* fix: add serde dep for ibc-client-tendermint

* fix: serde_tests

* imp: rename ClientState to ClientStateWrapper

---------

Co-authored-by: Farhad Shabani <[email protected]>

* docs: improve crates descriptions

* fix: apply reviewer comments

* Delete some unused modules and add some documentation

* Add TODO to use u64::dev_ceil

* Formatting of ibc-primitives README

* fix: ibc-primitives serde feature

---------

Co-authored-by: Sean Chen <[email protected]>

* imp: move crates into the root directory

* chore: add unclogs + fix broken links

* fix: additional deps and features adjustment

* fix: cargo fmt, clippy

* imp: review ibc-core-host-cosmos crate

* fix: move consensus_state API implementation into ibc-client-tendermint

* Delete empty ics07-tendermint/types README

* fix: apply suggestions from code review

Co-authored-by: Sean Chen <[email protected]>
Signed-off-by: Farhad Shabani <[email protected]>

* fix: adjust comments, markdowns

* nit: further touchups

---------

Signed-off-by: Farhad Shabani <[email protected]>
Co-authored-by: Sean Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment