Skip to content

Commit 3cc9753

Browse files
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]>
1 parent 55038aa commit 3cc9753

File tree

287 files changed

+7005
-4125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+7005
-4125
lines changed

Cargo.toml

Lines changed: 81 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,36 @@
22
resolver = "2"
33
members = [
44
"crates/ibc",
5+
"crates/ibc-data-types",
6+
"crates/ibc-primitives",
7+
"crates/ibc-core",
8+
"crates/ibc-clients",
59
"crates/ibc-apps",
10+
"crates/ibc-derive",
11+
"crates/ibc-testkit",
12+
"crates/ibc-query",
13+
"crates/ibc-core/ics02-client",
14+
"crates/ibc-core/ics02-client/types",
15+
"crates/ibc-core/ics03-connection",
16+
"crates/ibc-core/ics03-connection/types",
17+
"crates/ibc-core/ics04-channel",
18+
"crates/ibc-core/ics04-channel/types",
19+
"crates/ibc-core/ics23-commitment/types",
20+
"crates/ibc-core/ics24-host",
21+
"crates/ibc-core/ics24-host/types",
22+
"crates/ibc-core/ics24-host/tendermint",
23+
"crates/ibc-core/ics25-handler",
24+
"crates/ibc-core/ics25-handler/types",
25+
"crates/ibc-core/ics26-routing",
26+
"crates/ibc-core/ics26-routing/types",
627
"crates/ibc-apps/ics20-transfer",
728
"crates/ibc-apps/ics20-transfer/types",
29+
"crates/ibc-clients/ics07-tendermint",
30+
"crates/ibc-clients/ics07-tendermint/types",
831
"crates/ibc-derive",
932
"crates/ibc-testkit",
1033
"crates/ibc-query",
34+
"crates/ibc-clients",
1135
]
1236
exclude = [
1337
"ci/cw-check",
@@ -25,45 +49,69 @@ authors = ["Informal Systems <[email protected]>"]
2549

2650
[workspace.dependencies]
2751
# external dependencies
28-
borsh = {version = "0.10", default-features = false }
29-
bytes = { version = "1.5.0", default-features = false }
30-
displaydoc = { version = "0.2", default-features = false }
31-
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display", "try_into"] }
32-
env_logger = "0.10.0"
33-
num-traits = { version = "0.2.17", default-features = false }
34-
parking_lot = { version = "0.12.1", default-features = false }
35-
primitive-types = { version = "0.12.2", default-features = false, features = ["serde_no_std"] }
36-
prost = { version = "0.12", default-features = false }
37-
rstest = "0.18.2"
38-
schemars = { version = "0.8.15"}
39-
sha2 = { version = "0.10.8", default-features = false }
40-
serde = { version = "1.0", default-features = false }
41-
serde_derive = { version = "1.0", default-features = false }
42-
serde_json = { package = "serde-json-wasm", version = "1.0.0" , default-features = false }
43-
subtle-encoding = { version = "0.5", default-features = false }
44-
test-log = { version = "0.2.13", features = ["trace"] }
45-
time = { version = ">=0.3.0, <0.3.31", default-features = false }
46-
tracing = { version = "0.1.40", default-features = false }
47-
tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter", "json"] }
48-
typed-builder = { version = "0.18.0"}
52+
borsh = {version = "0.10", default-features = false }
53+
bytes = { version = "1.5.0", default-features = false }
54+
displaydoc = { version = "0.2", default-features = false }
55+
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display", "try_into"] }
56+
env_logger = "0.10.0"
57+
num-traits = { version = "0.2.17", default-features = false }
58+
parking_lot = { version = "0.12.1", default-features = false }
59+
primitive-types = { version = "0.12.2", default-features = false, features = ["serde_no_std"] }
60+
prost = { version = "0.12", default-features = false }
61+
rstest = "0.18.2"
62+
schemars = { version = "0.8.15" }
63+
sha2 = { version = "0.10.8", default-features = false }
64+
serde = { version = "1.0", default-features = false }
65+
serde_derive = { version = "1.0", default-features = false }
66+
serde_json = { package = "serde-json-wasm", version = "1.0.0" , default-features = false }
67+
subtle-encoding = { version = "0.5", default-features = false }
68+
test-log = { version = "0.2.13", features = ["trace"] }
69+
time = { version = ">=0.3.0, <0.3.31", default-features = false }
70+
tracing = { version = "0.1.40", default-features = false }
71+
tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter", "json"] }
72+
typed-builder = { version = "0.18.0" }
4973

5074
# ibc dependencies
51-
ibc = { version = "0.47.0", path = "./crates/ibc", default-features = false }
52-
ibc-testkit = { version = "0.47.0", path = "./crates/ibc-testkit", default-features = false}
53-
ibc-app-transfer = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer", default-features = false }
54-
ibc-app-transfer-types = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer/types", default-features = false }
55-
ibc-derive = { version = "0.3.0", path = "./crates/ibc-derive" }
75+
ibc = { version = "0.47.0", path = "./crates/ibc", default-features = false }
76+
ibc-core = { version = "0.47.0", path = "./crates//ibc-core", default-features = false }
77+
ibc-clients = { version = "0.47.0", path = "./crates/ibc-clients", default-features = false }
78+
ibc-apps = { version = "0.47.0", path = "./crates/ibc-apps", default-features = false }
79+
ibc-primitives = { version = "0.47.0", path = "./crates/ibc-primitives", default-features = false }
80+
ibc-testkit = { version = "0.47.0", path = "./crates/ibc-testkit" }
81+
ibc-derive = { version = "0.3.0", path = "./crates/ibc-derive" }
82+
83+
ibc-core-client = { version = "0.47.0", path = "./crates/ibc-core/ics02-client", default-features = false }
84+
ibc-core-connection = { version = "0.47.0", path = "./crates/ibc-core/ics03-connection", default-features = false }
85+
ibc-core-channel = { version = "0.47.0", path = "./crates/ibc-core/ics04-channel", default-features = false }
86+
ibc-core-host = { version = "0.47.0", path = "./crates/ibc-core/ics24-host", default-features = false }
87+
ibc-core-handler = { version = "0.47.0", path = "./crates/ibc-core/ics25-handler", default-features = false }
88+
ibc-core-router = { version = "0.47.0", path = "./crates/ibc-core/ics26-routing", default-features = false }
89+
ibc-client-tendermint = { version = "0.47.0", path = "./crates/ibc-clients/ics07-tendermint", default-features = false }
90+
ibc-app-transfer = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer", default-features = false }
91+
92+
ibc-core-client-context = { version = "0.47.0", path = "./crates/ibc-core/ics02-client/context", default-features = false }
93+
ibc-core-client-types = { version = "0.47.0", path = "./crates/ibc-core/ics02-client/types", default-features = false }
94+
ibc-core-channel-types = { version = "0.47.0", path = "./crates/ibc-core/ics04-channel/types", default-features = false }
95+
ibc-core-connection-types = { version = "0.47.0", path = "./crates/ibc-core/ics03-connection/types", default-features = false }
96+
ibc-core-commitment-types = { version = "0.47.0", path = "./crates/ibc-core/ics23-commitment/types", default-features = false }
97+
ibc-core-host-tendermint = { version = "0.47.0", path = "./crates/ibc-core/ics24-host/tendermint", default-features = false }
98+
ibc-core-host-types = { version = "0.47.0", path = "./crates/ibc-core/ics24-host/types", default-features = false }
99+
ibc-core-handler-types = { version = "0.47.0", path = "./crates/ibc-core/ics25-handler/types", default-features = false }
100+
ibc-core-router-types = { version = "0.47.0", path = "./crates/ibc-core/ics26-routing/types", default-features = false }
101+
ibc-client-tendermint-types = { version = "0.47.0", path = "./crates/ibc-clients/ics07-tendermint/types", default-features = false }
102+
ibc-app-transfer-types = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer/types", default-features = false }
103+
56104
ibc-proto = { version = "0.38.0", default-features = false }
57-
ics23 = { version = "0.11", default-features = false }
105+
ics23 = { version = "0.11", default-features = false }
58106

59107
# cosmos dependencies
60-
tendermint = { version = "0.34.0", default-features = false }
61-
tendermint-light-client = { version = "0.34.0", default-features = false }
108+
tendermint = { version = "0.34.0", default-features = false }
109+
tendermint-light-client = { version = "0.34.0", default-features = false }
62110
tendermint-light-client-verifier = { version = "0.34.0", default-features = false }
63-
tendermint-proto = { version = "0.34.0", default-features = false }
64-
tendermint-rpc = { version = "0.34.0", default-features = false }
65-
tendermint-testgen = { version = "0.34.0", default-features = false }
111+
tendermint-proto = { version = "0.34.0", default-features = false }
112+
tendermint-rpc = { version = "0.34.0", default-features = false }
113+
tendermint-testgen = { version = "0.34.0", default-features = false }
66114

67115
# parity dependencies
68116
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["full"] }
69-
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
117+
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }

README.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,32 @@
2323
</div>
2424
</div>
2525

26-
Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts
27-
the `ibc` rust crate which defines the main data structures and on-chain logic for the IBC protocol.
28-
29-
## Libraries
30-
31-
- [ibc](crates/ibc/README.md) - Data structures and on-chain logic for the IBC protocol.
32-
- [ibc-apps](crates/ibc-apps/README.md) - Contains implementations of various IBC applications.
33-
- [ibc-derive](crates/ibc-derive/README.md) - Derive macros for `ClientState`
34-
and `ConsensusState` traits, reducing boilerplate.
35-
- [ibc-testkit](crates/ibc-testkit/README.md) - Testing toolkit to aid `ibc-rs` and host chains in writing integration tests.
36-
- [ibc-query](crates/ibc-query/README.md) - Utility traits and implementations for querying the
37-
state of an `ibc-rs` enabled chain.
26+
Rust implementation of the Inter-Blockchain Communication (IBC) protocol that
27+
hosts all the data structures and on-chain logic implementations of various IBC
28+
core, clients and applications. This repository organized as a collection of
29+
sub-crates that can be used independently or together.
30+
31+
## Project Structure
32+
33+
| <div style="width:100px">Crate</div> | Description |
34+
| ---------------------------------------- | ----------- |
35+
|[ibc](crates/ibc) | Re-exports all the data structures and on-chain logic of various IBC core, clients and applications. |
36+
|[ibc-data-types](crates/ibc-data-types) | Re-exports all the IBC data types that are shared across different IBC implementations. |
37+
|[ibc-core](crate/ibc) | Contains data structures and implementations of all the IBC core specifications. |
38+
|[ibc-client](crates/ibc-client) | Contains data structures and implementations of various IBC light clients. |
39+
|[ibc-apps](crates/ibc-apps) | Contains data structures and implementations of various IBC applications. |
40+
|[ibc-testkit](crates/ibc-testkit) | Provides testing toolkit to aid `ibc-rs` and host chains in writing integration tests. |
41+
|[ibc-query](crates/ibc-query) | Contains utility traits and implementations for querying states of an integrated IBC module. |
42+
|[ibc-derive](crates/ibc-derive) | Derive macros for `ClientState` and `ConsensusState` traits, reducing boilerplate. |
3843

3944
## Contributing
4045

41-
IBC is specified in English in the [cosmos/ibc repo][ibc]. Any
42-
protocol changes or clarifications should be contributed there.
43-
44-
This repo contains the Rust implementation for the IBC modules. If you're interested in
45-
contributing, please comment on an issue or open a new one!
46+
IBC is specified in English in the [cosmos/ibc repo][ibc]. Any protocol changes
47+
or clarifications should be contributed there.
4648

47-
See also [CONTRIBUTING.md](./CONTRIBUTING.md).
49+
If you're interested in contributing, please take a look at the
50+
[CONTRIBUTING](./CONTRIBUTING.md) guidelines. We welcome and appreciate
51+
community contributions!
4852

4953
## Community calls
5054

@@ -58,26 +62,30 @@ receive a calendar invitation for the monthly meeting.
5862

5963
## Versioning
6064

61-
We follow [Semantic Versioning][semver], though APIs are still
62-
under active development.
65+
We follow [Semantic Versioning][semver], though APIs are still under active
66+
development.
6367

6468
## Resources
6569

6670
- [IBC Website][ibc-homepage]
6771
- [IBC Specification][ibc]
6872
- [IBC Go implementation][ibc-go]
73+
- [Protobuf definitions in Rust][ibc-proto-rs]
6974

7075
## License
7176

7277
Copyright © 2022 Informal Systems Inc. and ibc-rs authors.
7378

74-
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
79+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
80+
the files in this repository except in compliance with the License. You may
7581
obtain a copy of the License at
7682

7783
https://www.apache.org/licenses/LICENSE-2.0
7884

79-
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
80-
CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
85+
Unless required by applicable law or agreed to in writing, software distributed
86+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
87+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
88+
specific language governing permissions and limitations under the License.
8189

8290
[//]: # (badges)
8391
[docs-image]: https://docs.rs/ibc/badge.svg
@@ -95,6 +103,7 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the speci
95103
[//]: # (general links)
96104
[ibc]: https://github.com/cosmos/ibc
97105
[ibc-go]: https://github.com/cosmos/ibc-go
106+
[ibc-proto-rs]: https://github.com/cosmos/ibc-proto-rs
98107
[ibc-homepage]: https://cosmos.network/ibc
99108
[cosmos-link]: https://cosmos.network
100109
[semver]: https://semver.org/

0 commit comments

Comments
 (0)