Skip to content

feat: migrate core, clients modules into ibc-core, ibc-clients crates #969

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

Merged
merged 23 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
10c316d
feat: migrate `core` module under the `ibc` crate into `ibc-core`
Farhad-Shabani Nov 17, 2023
a576426
fix: re-export ibc_apps in the ibc crate
Farhad-Shabani Nov 17, 2023
b0464d4
chore: adjust features + add description for crates
Farhad-Shabani Nov 17, 2023
3439019
fix: CI catches
Farhad-Shabani Nov 17, 2023
c212436
fix: no_std
Farhad-Shabani Nov 17, 2023
5436c99
imp: define ics25-handler + move tendermint-specific impls into ibc-c…
Farhad-Shabani Nov 19, 2023
283cf01
fix: cargo doc
Farhad-Shabani Nov 19, 2023
8f28546
docs: add and edit READMEs
Farhad-Shabani Nov 19, 2023
0b34ceb
fix: cargo hack catches
Farhad-Shabani Nov 19, 2023
e7975e7
fix: cargo udeps catches
Farhad-Shabani Nov 19, 2023
c0be9f0
chore: ajdust README tables
Farhad-Shabani Nov 19, 2023
8e768b9
docs: further README adjustments
Farhad-Shabani Nov 19, 2023
d9defcf
fix: typo
Farhad-Shabani Nov 19, 2023
5d808c7
chore: another review of comments & READMEs
Farhad-Shabani Nov 20, 2023
0bf5bb8
imp: move Any and Protobuf to ibc-primitives
Farhad-Shabani Nov 20, 2023
60fd38d
fix: missing std features
Farhad-Shabani Nov 20, 2023
49a5ffa
Split out ibc-clients crate (#971)
seanchen1991 Nov 21, 2023
ec18401
docs: improve crates descriptions
Farhad-Shabani Nov 21, 2023
4a2b85e
fix: apply reviewer comments
Farhad-Shabani Nov 21, 2023
9a74b4b
Delete some unused modules and add some documentation
seanchen1991 Nov 21, 2023
9eebafc
Add TODO to use u64::dev_ceil
seanchen1991 Nov 21, 2023
950927b
Formatting of ibc-primitives README
seanchen1991 Nov 21, 2023
cdac411
fix: ibc-primitives serde feature
Farhad-Shabani Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 81 additions & 33 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,36 @@
resolver = "2"
members = [
"crates/ibc",
"crates/ibc-data-types",
"crates/ibc-primitives",
"crates/ibc-core",
"crates/ibc-clients",
"crates/ibc-apps",
"crates/ibc-derive",
"crates/ibc-testkit",
"crates/ibc-query",
"crates/ibc-core/ics02-client",
"crates/ibc-core/ics02-client/types",
"crates/ibc-core/ics03-connection",
"crates/ibc-core/ics03-connection/types",
"crates/ibc-core/ics04-channel",
"crates/ibc-core/ics04-channel/types",
"crates/ibc-core/ics23-commitment/types",
"crates/ibc-core/ics24-host",
"crates/ibc-core/ics24-host/types",
"crates/ibc-core/ics24-host/tendermint",
"crates/ibc-core/ics25-handler",
"crates/ibc-core/ics25-handler/types",
"crates/ibc-core/ics26-routing",
"crates/ibc-core/ics26-routing/types",
"crates/ibc-apps/ics20-transfer",
"crates/ibc-apps/ics20-transfer/types",
"crates/ibc-clients/ics07-tendermint",
"crates/ibc-clients/ics07-tendermint/types",
"crates/ibc-derive",
"crates/ibc-testkit",
"crates/ibc-query",
"crates/ibc-clients",
]
exclude = [
"ci/cw-check",
Expand All @@ -25,45 +49,69 @@ authors = ["Informal Systems <[email protected]>"]

[workspace.dependencies]
# external dependencies
borsh = {version = "0.10", default-features = false }
bytes = { version = "1.5.0", default-features = false }
displaydoc = { version = "0.2", default-features = false }
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display", "try_into"] }
env_logger = "0.10.0"
num-traits = { version = "0.2.17", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
primitive-types = { version = "0.12.2", default-features = false, features = ["serde_no_std"] }
prost = { version = "0.12", default-features = false }
rstest = "0.18.2"
schemars = { version = "0.8.15"}
sha2 = { version = "0.10.8", default-features = false }
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", default-features = false }
serde_json = { package = "serde-json-wasm", version = "1.0.0" , default-features = false }
subtle-encoding = { version = "0.5", default-features = false }
test-log = { version = "0.2.13", features = ["trace"] }
time = { version = ">=0.3.0, <0.3.31", default-features = false }
tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter", "json"] }
typed-builder = { version = "0.18.0"}
borsh = {version = "0.10", default-features = false }
bytes = { version = "1.5.0", default-features = false }
displaydoc = { version = "0.2", default-features = false }
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display", "try_into"] }
env_logger = "0.10.0"
num-traits = { version = "0.2.17", default-features = false }
parking_lot = { version = "0.12.1", default-features = false }
primitive-types = { version = "0.12.2", default-features = false, features = ["serde_no_std"] }
prost = { version = "0.12", default-features = false }
rstest = "0.18.2"
schemars = { version = "0.8.15" }
sha2 = { version = "0.10.8", default-features = false }
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", default-features = false }
serde_json = { package = "serde-json-wasm", version = "1.0.0" , default-features = false }
subtle-encoding = { version = "0.5", default-features = false }
test-log = { version = "0.2.13", features = ["trace"] }
time = { version = ">=0.3.0, <0.3.31", default-features = false }
tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.17", features = ["fmt", "env-filter", "json"] }
typed-builder = { version = "0.18.0" }

# ibc dependencies
ibc = { version = "0.47.0", path = "./crates/ibc", default-features = false }
ibc-testkit = { version = "0.47.0", path = "./crates/ibc-testkit", default-features = false}
ibc-app-transfer = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer", default-features = false }
ibc-app-transfer-types = { version = "0.47.0", path = "./crates/ibc-apps/ics20-transfer/types", default-features = false }
ibc-derive = { version = "0.3.0", path = "./crates/ibc-derive" }
ibc = { version = "0.47.0", path = "./crates/ibc", default-features = false }
ibc-core = { version = "0.47.0", path = "./crates//ibc-core", default-features = false }
ibc-clients = { version = "0.47.0", path = "./crates/ibc-clients", default-features = false }
ibc-apps = { version = "0.47.0", path = "./crates/ibc-apps", default-features = false }
ibc-primitives = { version = "0.47.0", path = "./crates/ibc-primitives", default-features = false }
ibc-testkit = { version = "0.47.0", path = "./crates/ibc-testkit" }
ibc-derive = { version = "0.3.0", path = "./crates/ibc-derive" }

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

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

ibc-proto = { version = "0.38.0", default-features = false }
ics23 = { version = "0.11", default-features = false }
ics23 = { version = "0.11", default-features = false }

# cosmos dependencies
tendermint = { version = "0.34.0", default-features = false }
tendermint-light-client = { version = "0.34.0", default-features = false }
tendermint = { version = "0.34.0", default-features = false }
tendermint-light-client = { version = "0.34.0", default-features = false }
tendermint-light-client-verifier = { version = "0.34.0", default-features = false }
tendermint-proto = { version = "0.34.0", default-features = false }
tendermint-rpc = { version = "0.34.0", default-features = false }
tendermint-testgen = { version = "0.34.0", default-features = false }
tendermint-proto = { version = "0.34.0", default-features = false }
tendermint-rpc = { version = "0.34.0", default-features = false }
tendermint-testgen = { version = "0.34.0", default-features = false }

# parity dependencies
parity-scale-codec = { version = "3.6.5", default-features = false, features = ["full"] }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
55 changes: 32 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,32 @@
</div>
</div>

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.

## Libraries

- [ibc](crates/ibc/README.md) - Data structures and on-chain logic for the IBC protocol.
- [ibc-apps](crates/ibc-apps/README.md) - Contains implementations of various IBC applications.
- [ibc-derive](crates/ibc-derive/README.md) - Derive macros for `ClientState`
and `ConsensusState` traits, reducing boilerplate.
- [ibc-testkit](crates/ibc-testkit/README.md) - Testing toolkit to aid `ibc-rs` and host chains in writing integration tests.
- [ibc-query](crates/ibc-query/README.md) - Utility traits and implementations for querying the
state of an `ibc-rs` enabled chain.
Rust implementation of the Inter-Blockchain Communication (IBC) protocol that
hosts all the data structures and on-chain logic implementations of various IBC
core, clients and applications. This repository organized as a collection of
sub-crates that can be used independently or together.

## Project Structure

| <div style="width:100px">Crate</div> | Description |
| ---------------------------------------- | ----------- |
|[ibc](crates/ibc) | Re-exports all the data structures and on-chain logic of various IBC core, clients and applications. |
|[ibc-data-types](crates/ibc-data-types) | Re-exports all the IBC data types that are shared across different IBC implementations. |
|[ibc-core](crate/ibc) | Contains data structures and implementations of all the IBC core specifications. |
|[ibc-client](crates/ibc-client) | Contains data structures and implementations of various IBC light clients. |
|[ibc-apps](crates/ibc-apps) | Contains data structures and implementations of various IBC applications. |
|[ibc-testkit](crates/ibc-testkit) | Provides testing toolkit to aid `ibc-rs` and host chains in writing integration tests. |
|[ibc-query](crates/ibc-query) | Contains utility traits and implementations for querying states of an integrated IBC module. |
|[ibc-derive](crates/ibc-derive) | Derive macros for `ClientState` and `ConsensusState` traits, reducing boilerplate. |

## 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!
IBC is specified in English in the [cosmos/ibc repo][ibc]. Any protocol changes
or clarifications should be contributed there.

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

## Community calls

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

## Versioning

We follow [Semantic Versioning][semver], though APIs are still
under active development.
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]
- [Protobuf definitions in Rust][ibc-proto-rs]

## 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
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.
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
Expand All @@ -95,6 +103,7 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for the speci
[//]: # (general links)
[ibc]: https://github.com/cosmos/ibc
[ibc-go]: https://github.com/cosmos/ibc-go
[ibc-proto-rs]: https://github.com/cosmos/ibc-proto-rs
[ibc-homepage]: https://cosmos.network/ibc
[cosmos-link]: https://cosmos.network
[semver]: https://semver.org/
Expand Down
Loading