Skip to content

Commit

Permalink
chore: remove unused deps and add missing feats for all tomls (#1223)
Browse files Browse the repository at this point in the history
* fix: add missing try-runtime feat to all tomls

* fix: add missing std, bench feats to all tomls

* fix: patch PureStake/Frontier

* chore: bump nix

* refactor: normalize apostrophes in toml

* fmt: taplo

* fix: typo

* revert: frontier patch

* refactor: remove unused deps

* fix: investment toml boilerplate

* refactor: fix uncaught stuff by taplo

* chore: bump nix after merge
  • Loading branch information
wischli authored Mar 3, 2023
1 parent d1f436e commit c291287
Show file tree
Hide file tree
Showing 37 changed files with 1,195 additions and 1,091 deletions.
457 changes: 123 additions & 334 deletions Cargo.lock

Large diffs are not rendered by default.

104 changes: 57 additions & 47 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,84 +64,54 @@ members = [
# third-party dependencies
clap = { version = "4.0.9", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0", default-features = false }
futures = { version = "0.3.21", features = ["compat"] }
hex-literal = "0.2.1"
jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
log = "0.4.8"
serde = { version = "1.0.119", features = ["derive"] }
serde_json = "1.0"
tracing-core = "0.1.29"
url = "2.2.2"

# primitives
grandpa-primitives = { package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }
sp-keystore = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }

# client dependencies
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-client-db = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-service = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-keystore = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.32" }
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

# Cli specific
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
node-inspect = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.32" }

# Local dependencies
cfg-types = { path = "./libs/types" }
pallet-anchors = { path = "./pallets/anchors" }
pallet-loans = { path = "./pallets/loans" }
pallet-pool-system = { path = "./pallets/pool-system" }

# frame dependencies
pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }

# Cumulus dependencies
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.32" }
Expand All @@ -151,7 +121,6 @@ cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus",

# Polkadot dependencies
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32" }

Expand All @@ -160,7 +129,6 @@ altair-runtime = { path = "runtime/altair" }
centrifuge-runtime = { path = "runtime/centrifuge" }
cfg-primitives = { path = "libs/primitives" }
development-runtime = { path = "runtime/development" }
node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
runtime-common = { path = "runtime/common" }

# benchmarking
Expand All @@ -186,9 +154,37 @@ 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",
"log/std",
"pallet-anchors/std",
"pallet-pool-system/std",
"codec/std",
"polkadot-primitives/std",
"runtime-common/std",
"sc-executor/std",
"serde/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-keystore/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-timestamp/std",
"sp-transaction-pool/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
Expand All @@ -198,18 +194,37 @@ 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-pool-system/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"runtime-integration-tests/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-pool-system/try-runtime",
"polkadot-cli/try-runtime",
"polkadot-service/try-runtime",
"runtime-common/try-runtime",
]

fast-runtime = [
Expand All @@ -236,7 +251,6 @@ frame-system = { git = "https://github.com/paritytech//substrate", rev = "5ea6d9
frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
frame-try-runtime = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-asset-tx-payment = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-aura = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
Expand Down Expand Up @@ -375,7 +389,6 @@ substrate-test-client = { git = "https://github.com/paritytech//substrate", rev
try-runtime-cli = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
substrate-test-runtime = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
substrate-test-runtime-client = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
node-inspect = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
node-primitives = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
Expand Down Expand Up @@ -414,7 +427,6 @@ xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "c71e872
cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
Expand Down Expand Up @@ -455,7 +467,6 @@ frame-system = { git = "https://github.com/paritytech//substrate", rev = "5ea6d9
frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
frame-try-runtime = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-asset-tx-payment = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-aura = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" }
Expand Down Expand Up @@ -625,7 +636,6 @@ xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "c71e872
cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-network = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-client-service = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", rev = "6abd385ce49f7feb882218646410feb063404b77" }
Expand Down
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-qFvobNDYPRfjHTyfF0KsqBCp+vhls0d8d6BcqKlhiek=";
cargoSha256 = "sha256-2+BxyO+CR3O4qjIcNj0ckEOZMxYjR2s3HNJqutMlSxw=";

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",
]
Loading

0 comments on commit c291287

Please sign in to comment.