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

chore: remove unused deps and add missing feats for all tomls #1223

Merged
merged 14 commits into from
Mar 3, 2023
20 changes: 11 additions & 9 deletions Cargo.lock

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

81 changes: 80 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,52 @@ tempfile = "3.1.0"
[features]
default = ["std", "cli"]
std = [
"serde/std",
"sc-service/rocksdb",
"substrate-build-script-utils",
"sp-consensus-babe/std",
"altair-runtime/std",
"centrifuge-runtime/std",
"cfg-primitives/std",
"cfg-types/std",
"clap/std",
"cumulus-primitives-core/std",
"cumulus-primitives-parachain-inherent/std",
"development-runtime/std",
"frame-benchmarking/std",
"futures/std",
"log/std",
"node-primitives/std",
"pallet-anchors/std",
"pallet-im-online/std",
"pallet-loans/std",
"pallet-pool-system/std",
"codec/std",
"polkadot-parachain/std",
"polkadot-primitives/std",
"runtime-common/std",
"sc-executor/std",
"serde/std",
"serde_json/std",
"sp-api/std",
"sp-authority-discovery/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"grandpa-primitives/std",
"sp-inherents/std",
"sp-io/std",
"sp-keystore/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-runtime-interface/std",
"sp-session/std",
"sp-std/std",
"sp-timestamp/std",
"sp-transaction-pool/std",
"sp-trie/std",
"tracing-core/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
Expand All @@ -198,18 +241,43 @@ runtime-benchmarks = [
"development-runtime/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"cfg-primitives/runtime-benchmarks",
"cfg-types/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"pallet-anchors/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-loans/runtime-benchmarks",
"pallet-pool-system/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"runtime-integration-tests/runtime-benchmarks",
"sc-client-db/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
test-benchmarks = [
"runtime-benchmarks",
"runtime-integration-tests/runtime-benchmarks",
]
cli = [
'try-runtime-cli',
"try-runtime-cli",
]
try-runtime = [
"cfg-primitives/try-runtime",
"centrifuge-runtime/try-runtime",
"altair-runtime/try-runtime",
"development-runtime/try-runtime",
"try-runtime-cli",
"cfg-types/try-runtime",
"pallet-anchors/try-runtime",
"pallet-im-online/try-runtime",
"pallet-loans/try-runtime",
"pallet-pool-system/try-runtime",
"polkadot-cli/try-runtime",
"polkadot-service/try-runtime",
"runtime-common/try-runtime",
]

fast-runtime = [
Expand Down Expand Up @@ -649,3 +717,14 @@ orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-li
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.32" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.32" }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.32" }

# Cargo patch rules for all the PureStake/frontier crates
[patch."https://github.com/PureStake/frontier"]
fp-consensus = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
fp-ethereum = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
fp-evm = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
fp-rpc = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
fp-self-contained = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
fp-storage = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
pallet-ethereum = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
pallet-evm = { git = "https://github.com/PureStake//frontier", rev = "68ee8a260c0f2014dfd63fd2554fa9e1a32c22f0" }
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
};

# This is a hash of all the Cargo dependencies, for reproducibility.
cargoSha256 = "sha256-FgnJKi1LfSw+JX/2dx7uXClb3hkdCwoWTefZ83x6Tf4=";
cargoSha256 = "sha256-exomenGuueIAObslhTW6NdP1zQJ8Xnl11P9PoeGl/kc=";

nativeBuildInputs = with pkgs; [ clang git-mock pkg-config ];
buildInputs = with pkgs; [ openssl ] ++ (
Expand Down
47 changes: 29 additions & 18 deletions libs/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
authors = ["Centrifuge <admin@centrifuge.io>"]
description = 'Primitive types for Centrifuge'
edition = '2021'
description = "Primitive types for Centrifuge"
edition = "2021"
license = "LGPL-3.0"
name = 'cfg-primitives'
name = "cfg-primitives"
repository = "https://github.com/centrifuge/centrifuge-chain"
version = '2.0.0'
version = "2.0.0"

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['derive'], default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
scale-info = { version = "2.3.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.119" }

Expand All @@ -30,17 +30,28 @@ pallet-collective = { git = "https://github.com/paritytech/substrate", default-f
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.32" }

[features]
default = ['std']
runtime-benchmarks = []
default = ["std"]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
std = [
'codec/std',
'sp-std/std',
'scale-info/std',
'sp-core/std',
'frame-support/std',
'sp-runtime/std',
'frame-system/std',
'pallet-collective/std',
'sp-consensus-aura/std',
'cumulus-primitives-core/std',
"serde/std",
"codec/std",
"sp-std/std",
"scale-info/std",
"sp-core/std",
"frame-support/std",
"sp-runtime/std",
"frame-system/std",
"pallet-collective/std",
"sp-consensus-aura/std",
"cumulus-primitives-core/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-collective/try-runtime",
]
17 changes: 9 additions & 8 deletions libs/proofs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
[package]
authors = ["Centrifuge <admin@centrifuge.io>"]
description = 'Proofs'
edition = '2021'
description = "Proofs"
edition = "2021"
license = "LGPL-3.0"
name = 'proofs'
name = "proofs"
repository = "https://github.com/centrifuge/centrifuge-chain"
version = '2.0.0'
version = "2.0.0"

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['derive'], default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
scale-info = { version = "2.3.0", default-features = false, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.32" }

[features]
default = ['std']
default = ["std"]
std = [
'codec/std',
"codec/std",
"sp-std/std",
"scale-info/std",
]
43 changes: 23 additions & 20 deletions libs/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
name = "cfg-test-utils"
version = "0.1.0"
edition = "2021"
authors = ['Centrifuge']
homepage = 'https://centrifuge.io'
authors = ["Centrifuge"]
homepage = "https://centrifuge.io"
license = "LGPL-3.0"
repository = 'https://github.com/centrifuge/centrifuge-chain'
repository = "https://github.com/centrifuge/centrifuge-chain"

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
cfg-primitives = { path = '../primitives', default-features = false }
cfg-traits = { path = '../traits', default-features = false }
cfg-types = { path = '../types', default-features = false }
cfg-primitives = { path = "../primitives", default-features = false }
cfg-traits = { path = "../traits", default-features = false }
cfg-types = { path = "../types", default-features = false }

codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['derive'], default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
scale-info = { version = "2.3.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.119", default-features = false }

Expand All @@ -28,20 +28,23 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.32" }

[features]
default = ['std']
default = ["std"]
std = [
'cfg-traits/std',
'cfg-types/std',
'cfg-primitives/std',
'serde/std',
'codec/std',
'scale-info/std',
'frame-support/std',
'frame-system/std',
'sp-runtime/std',
'sp-std/std',
"cfg-traits/std",
"cfg-types/std",
"cfg-primitives/std",
"serde/std",
"codec/std",
"scale-info/std",
"frame-support/std",
"frame-system/std",
"sp-runtime/std",
"sp-std/std",
"frame-benchmarking/std",
]
runtime-benchmarks = [
"cfg-primitives/try-runtime",
"cfg-traits/try-runtime",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
Expand All @@ -50,4 +53,4 @@ runtime-benchmarks = [
"cfg-traits/runtime-benchmarks",
"cfg-types/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime", "frame-system/try-runtime"]
try-runtime = ["frame-support/try-runtime", "frame-system/try-runtime", "cfg-types/try-runtime"]
Loading