Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Crates reorganization (#184)
Browse files Browse the repository at this point in the history
* Reorganize crates directories

* Remove unused dependencies

* Fix Nix build

* Fix formatting of .toml files
  • Loading branch information
soareschen authored Jun 21, 2024
1 parent 200e831 commit 83b5c91
Show file tree
Hide file tree
Showing 118 changed files with 47 additions and 36 deletions.
13 changes: 8 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[patch.crates-io]

sov-ibc = { path = "modules/sov-ibc" }
sov-ibc-transfer = { path = "modules/sov-ibc-transfer" }
sov-consensus-state-tracker = { path = "modules/sov-consensus-state-tracker" }
sov-celestia-client = { path = "clients/sov-celestia" }
sov-ibc-proto = { path = "crates/proto/sov-ibc-proto" }
sov-client-types = { path = "crates/clients/sov-client-types" }
sov-celestia-client = { path = "crates/clients/sov-celestia-client" }
sov-celestia-client-types = { path = "crates/clients/sov-celestia-client-types" }
sov-ibc = { path = "crates/modules/sov-ibc" }
sov-ibc-transfer = { path = "crates/modules/sov-ibc-transfer" }
sov-consensus-state-tracker = { path = "crates/modules/sov-consensus-state-tracker" }

ibc = { git = "https://github.com/cosmos/ibc-rs.git", branch = "rano/downgrade-borsh" }
ibc-core = { git = "https://github.com/cosmos/ibc-rs.git", branch = "rano/downgrade-borsh" }
Expand All @@ -17,7 +20,7 @@ ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git", branch =
ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", branch = "rano/downgrade-borsh" }
ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", branch = "rano/downgrade-borsh" }

cosmrs = { git = "https://github.com/cosmos/cosmos-rust.git", rev = "ced74a7" }
cosmrs = { git = "https://github.com/cosmos/cosmos-rust.git", rev = "4b1332e" }
basecoin = { git = "https://github.com/informalsystems/basecoin-rs.git", branch = "rano/sov-support" }
basecoin-store = { git = "https://github.com/informalsystems/basecoin-rs.git", branch = "rano/sov-support" }
jmt = { git = "https://github.com/penumbra-zone/jmt.git", rev = "1d007e11cb68aa5ca13e9a5af4a12e6439d5f7b6" }
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 21 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[workspace]
resolver = "2"
members = [
"proto",
"proto/compiler",
"clients/sov-types",
"clients/sov-celestia/types",
"clients/sov-celestia",
"clients/sov-celestia/cw-contract",
"modules/sov-ibc-transfer",
"modules/sov-ibc",
"modules/sov-consensus-state-tracker",
"mocks",
"crates/proto/sov-ibc-proto",
"crates/proto/sov-ibc-proto-compiler",
"crates/clients/sov-client-types",
"crates/clients/sov-celestia-client",
"crates/clients/sov-celestia-client-types",
"crates/clients/sov-celestia-client-cw",
"crates/modules/sov-ibc",
"crates/modules/sov-ibc-transfer",
"crates/modules/sov-consensus-state-tracker",
"crates/test/sov-ibc-mocks",
]

exclude = [
Expand Down Expand Up @@ -46,6 +46,15 @@ semicolon_if_nothing_returned = "deny"
uninlined_format_args = "deny"

[workspace.dependencies]

sov-ibc-proto = { version = "0.1.0" }
sov-client-types = { version = "0.1.0" }
sov-celestia-client = { version = "0.1.0", default-features = false }
sov-celestia-client-types = { version = "0.1.0", default-features = false }
sov-ibc = { version = "0.1.0" }
sov-ibc-transfer = { version = "0.1.0" }
sov-consensus-state-tracker = { version = "0.1.0" }

# external dependencies
anyhow = "1.0.68"
base64 = { version = "0.21", default-features = false }
Expand Down Expand Up @@ -105,3 +114,5 @@ sov-kernels = { version = "0.3.0" }
sov-mock-zkvm = { version = "0.3.0" }
sov-prover-storage-manager = { version = "0.3.0" }
const-rollup-config = { version = "0.3.0" }

# Note: the `[patch.crates-io]` section is placed at `./cargo/config.toml`
6 changes: 3 additions & 3 deletions ci/risc0-check/methods/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[workspace]

[dependencies]
sov-ibc = { path = "../../../../modules/sov-ibc" }
sov-ibc-transfer = { path = "../../../../modules/sov-ibc-transfer" }
sov-celestia-client = { path = "../../../../clients/sov-celestia" }
sov-ibc = { path = "../../../../crates/modules/sov-ibc" }
sov-ibc-transfer = { path = "../../../../crates/modules/sov-ibc-transfer" }
sov-celestia-client = { path = "../../../../crates/clients/sov-celestia-client" }
risc0-zkvm = { version = "0.20.1", default-features = false, features = [ "std" ] }
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ crate-type = [ "cdylib", "rlib" ]
# ibc dependencies
ibc-core = { workspace = true }
ibc-client-cw = { workspace = true }
sov-celestia-client = { path = "./../", default-features = false, features = [ "serde" ] }
sov-celestia-client = { workspace = true, default-features = false, features = [ "serde" ] }

# cosmwasm dependencies
### Note: Kept at the following version to match the CosmWasm module version
Expand All @@ -32,7 +32,7 @@ cosmwasm-std = "2.0.4"
[dev-dependencies]
cosmwasm-vm = "2.0.4"
ibc-client-tendermint = { workspace = true }
sov-celestia-client = { path = "./../", default-features = false, features = [ "test-util" ] }
sov-celestia-client = { workspace = true, default-features = false, features = [ "test-util" ] }
tendermint-testgen = { workspace = true }

[features]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ typed-builder = { version = "0.18.0", optional = true }
ibc-core = { workspace = true }
ibc-client-tendermint = { workspace = true }
ibc-client-wasm-types = { workspace = true, features = [ "cosmwasm" ], optional = true }
sov-client-types = { path = "./../../sov-types" }
sov-ibc-proto = { path = "./../../../proto" }
sov-client-types = { workspace = true }
sov-ibc-proto = { workspace = true }

# DA layer dependencies
tendermint = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = { workspace = true }
rust-version = { workspace = true }
version = { workspace = true }
keywords = [ "rollup", "sovereign", "ibc", "light-client" ]
readme = "./../README.md"
readme = "../../README.md"

description = """
Contains the implementation of `sov-celestia` light client, and re-exports
Expand All @@ -31,7 +31,7 @@ typed-builder = { version = "0.18.0", optional = true }
# ibc dependencies
ibc-core = { workspace = true }
ibc-client-tendermint = { workspace = true }
sov-celestia-client-types = { path = "./types", default-features = false }
sov-celestia-client-types = { workspace = true, default-features = false }

# DA layer dependencies
tendermint = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typed-builder = { version = "0.18.0", optional = true }

# ibc dependencies
ibc-core = { workspace = true }
sov-ibc-proto = { path = "./../../proto" }
sov-ibc-proto = { workspace = true }

[features]
default = [ "std" ]
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ sov-celestia-adapter = { workspace = true, features = [ "native" ], optional = t
sov-modules-api = { workspace = true }
sov-state = { workspace = true }
sov-rollup-interface = { workspace = true }
sov-ibc = { path = "../sov-ibc" }
sov-celestia-client = { path = "../../clients/sov-celestia" }
sov-ibc = { workspace = true }
sov-celestia-client = { workspace = true }

[features]
default = [ "mock-da" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ thiserror = { workspace = true }
tracing = { workspace = true }

# internal dependencies
sov-ibc-transfer = { path = "../sov-ibc-transfer" }
sov-ibc-transfer = { workspace = true }

# ibc dependencies
ibc-core = { workspace = true }
ibc-app-transfer = { workspace = true }
ibc-client-tendermint = { workspace = true }
ibc-query = { workspace = true, optional = true }
sov-celestia-client = { path = "../../clients/sov-celestia" }
sov-celestia-client = { workspace = true }

# enforce version so that Risc0 compiles
ahash = "=0.8.6"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions nix/sov-celestia-cw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ let
installPhase = ''
mkdir -p $out $out/vendor
cp -r ${../clients} $out/clients
cp -r ${../modules} $out/modules
cp -r ${../mocks} $out/mocks
cp -r ${../proto} $out/proto
cp -r ${../crates} $out/crates
cp -r ${sovereign-sdk-src} $out/vendor/sovereign-sdk
Expand All @@ -75,7 +72,7 @@ let
"risc0-cycle-utils-0.3.0" = "sha256-5dA62v1eqfyZBny4s3YlC2Tty7Yfd/OAVGfTlLBgypk=";
"rockbound-1.0.0" = "sha256-aDrNegRfsSwiNw4XLsE4rpUYDZn2N59UJbGZ6mpY180=";
"tendermint-0.32.0" = "sha256-FtY7a+hBvQryATrs3mykCWFRe8ABTT6cuf5oh9IBElQ=";
"cosmos-sdk-proto-0.22.0-pre" = "sha256-r7zoHmk12iTdsyJ/4rRgD5HDeDSiNcs/HlS7eGi+NbE=";
"cosmos-sdk-proto-0.22.0-pre" = "sha256-nRfcAbjFcvAqool+6heYK8joiU5YaSWITnO6S5MRM1E=";
};
};

Expand Down

0 comments on commit 83b5c91

Please sign in to comment.