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

polkadot-parachain: compile separate lib and bin #5288

Merged
merged 18 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
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
59 changes: 35 additions & 24 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ members = [
"cumulus/parachains/runtimes/testing/penpal",
"cumulus/parachains/runtimes/testing/rococo-parachain",
"cumulus/polkadot-parachain",
"cumulus/polkadot-parachain/polkadot-parachain-lib",
"cumulus/primitives/aura",
"cumulus/primitives/core",
"cumulus/primitives/parachain-inherent",
Expand Down Expand Up @@ -535,6 +536,7 @@ members = [
]

default-members = [
"cumulus/polkadot-parachain",
"polkadot",
"substrate/bin/node/cli",
]
Expand Down Expand Up @@ -1041,6 +1043,7 @@ polkadot-node-subsystem-test-helpers = { path = "polkadot/node/subsystem-test-he
polkadot-node-subsystem-types = { path = "polkadot/node/subsystem-types", default-features = false }
polkadot-node-subsystem-util = { path = "polkadot/node/subsystem-util", default-features = false }
polkadot-overseer = { path = "polkadot/node/overseer", default-features = false }
polkadot-parachain-lib = { path = "cumulus/polkadot-parachain/polkadot-parachain-lib", default-features = false }
polkadot-parachain-primitives = { path = "polkadot/parachain", default-features = false }
polkadot-primitives = { path = "polkadot/primitives", default-features = false }
polkadot-primitives-test-helpers = { path = "polkadot/primitives/test-helpers" }
Expand Down
97 changes: 14 additions & 83 deletions cumulus/polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "polkadot-parachain-bin"
version = "4.0.0"
authors.workspace = true
build = "build.rs"
edition.workspace = true
description = "Runs a polkadot parachain node which could be a collator."
build = "build.rs"
description = "Runs a polkadot parachain node"
license = "Apache-2.0"

[lints]
Expand All @@ -15,19 +15,14 @@ name = "polkadot-parachain"
path = "src/main.rs"

[dependencies]
async-trait = { workspace = true }
clap = { features = ["derive"], workspace = true }
codec = { workspace = true, default-features = true }
color-eyre = { workspace = true }
color-print = { workspace = true }
futures = { workspace = true }
hex-literal = { workspace = true, default-features = true }
log = { workspace = true, default-features = true }
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }
docify = { workspace = true }

# Local
polkadot-parachain-lib = { features = ["rococo-native", "westend-native"], workspace = true }
rococo-parachain-runtime = { workspace = true }
shell-runtime = { workspace = true }
glutton-westend-runtime = { workspace = true }
Expand All @@ -41,7 +36,6 @@ coretime-rococo-runtime = { workspace = true }
coretime-westend-runtime = { workspace = true }
bridge-hub-westend-runtime = { workspace = true, default-features = true }
penpal-runtime = { workspace = true }
jsonrpsee = { features = ["server"], workspace = true }
people-rococo-runtime = { workspace = true }
people-westend-runtime = { workspace = true }
parachains-common = { workspace = true, default-features = true }
Expand All @@ -51,83 +45,32 @@ testnet-parachains-constants = { features = [
], workspace = true }

# Substrate
frame-benchmarking = { workspace = true, default-features = true }
frame-benchmarking-cli = { workspace = true, default-features = true }
sp-runtime = { workspace = true }
sp-io = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
sp-session = { workspace = true, default-features = true }
frame-try-runtime = { optional = true, workspace = true, default-features = true }
sc-consensus = { workspace = true, default-features = true }
sp-tracing = { workspace = true, default-features = true }
frame-support = { workspace = true, default-features = true }
sc-cli = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
sc-executor = { workspace = true, default-features = true }
sc-service = { workspace = true, default-features = true }
sc-telemetry = { workspace = true, default-features = true }
sc-transaction-pool = { workspace = true, default-features = true }
sp-transaction-pool = { workspace = true, default-features = true }
sc-network = { workspace = true, default-features = true }
sc-network-sync = { workspace = true, default-features = true }
sc-basic-authorship = { workspace = true, default-features = true }
sp-timestamp = { workspace = true, default-features = true }
sp-blockchain = { workspace = true, default-features = true }
sp-genesis-builder = { workspace = true }
sp-block-builder = { workspace = true, default-features = true }
sp-keystore = { workspace = true, default-features = true }
sc-chain-spec = { workspace = true, default-features = true }
sc-rpc = { workspace = true, default-features = true }
sp-version = { workspace = true, default-features = true }
sc-tracing = { workspace = true, default-features = true }
sp-offchain = { workspace = true, default-features = true }
frame-system-rpc-runtime-api = { workspace = true, default-features = true }
pallet-transaction-payment = { workspace = true, default-features = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true }
sp-std = { workspace = true, default-features = true }
sp-inherents = { workspace = true, default-features = true }
sp-api = { workspace = true, default-features = true }
sp-consensus-aura = { workspace = true, default-features = true }
sc-sysinfo = { workspace = true, default-features = true }
prometheus-endpoint = { workspace = true, default-features = true }
sc-transaction-pool-api = { workspace = true, default-features = true }
substrate-frame-rpc-system = { workspace = true, default-features = true }
pallet-transaction-payment-rpc = { workspace = true, default-features = true }
substrate-state-trie-migration-rpc = { workspace = true, default-features = true }

# Polkadot
# Use rococo-native as this is currently the default "local" relay chain
polkadot-cli = { features = ["rococo-native", "westend-native"], workspace = true, default-features = true }
polkadot-primitives = { workspace = true, default-features = true }
polkadot-service = { workspace = true, default-features = true }
xcm = { workspace = true, default-features = true }

# Cumulus
cumulus-client-cli = { workspace = true, default-features = true }
cumulus-client-collator = { workspace = true, default-features = true }
cumulus-client-consensus-aura = { workspace = true, default-features = true }
cumulus-client-consensus-relay-chain = { workspace = true, default-features = true }
cumulus-client-consensus-common = { workspace = true, default-features = true }
cumulus-client-consensus-proposer = { workspace = true, default-features = true }
cumulus-client-parachain-inherent = { workspace = true, default-features = true }
cumulus-client-service = { workspace = true, default-features = true }
cumulus-primitives-aura = { workspace = true, default-features = true }
cumulus-primitives-core = { workspace = true, default-features = true }
cumulus-relay-chain-interface = { workspace = true, default-features = true }

[build-dependencies]
substrate-build-script-utils = { workspace = true, default-features = true }

[dev-dependencies]
assert_cmd = { workspace = true }
nix = { features = ["signal"], workspace = true }
tempfile = { workspace = true }
tokio = { version = "1.32.0", features = ["macros", "parking_lot", "time"] }
wait-timeout = { workspace = true }

[features]
default = []
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably can remove all those features. I don't really know why they exists at the first place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's related to runtime-benchmarks I answered on a different comment below

"parachains-common/runtime-benchmarks",
"polkadot-parachain-lib/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",

"asset-hub-rococo-runtime/runtime-benchmarks",
"asset-hub-westend-runtime/runtime-benchmarks",
"bridge-hub-rococo-runtime/runtime-benchmarks",
Expand All @@ -136,23 +79,17 @@ runtime-benchmarks = [
"contracts-rococo-runtime/runtime-benchmarks",
"coretime-rococo-runtime/runtime-benchmarks",
"coretime-westend-runtime/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"glutton-westend-runtime/runtime-benchmarks",
"parachains-common/runtime-benchmarks",
"penpal-runtime/runtime-benchmarks",
"people-rococo-runtime/runtime-benchmarks",
"people-westend-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"rococo-parachain-runtime/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"polkadot-parachain-lib/try-runtime",
"polkadot-service/try-runtime",
"sp-runtime/try-runtime",

"asset-hub-rococo-runtime/try-runtime",
"asset-hub-westend-runtime/try-runtime",
"bridge-hub-rococo-runtime/try-runtime",
Expand All @@ -161,17 +98,11 @@ try-runtime = [
"contracts-rococo-runtime/try-runtime",
"coretime-rococo-runtime/try-runtime",
"coretime-westend-runtime/try-runtime",
"frame-support/try-runtime",
"frame-try-runtime/try-runtime",
"glutton-westend-runtime/try-runtime",
"pallet-transaction-payment/try-runtime",
"penpal-runtime/try-runtime",
"people-rococo-runtime/try-runtime",
"people-westend-runtime/try-runtime",
"polkadot-cli/try-runtime",
"polkadot-service/try-runtime",
"shell-runtime/try-runtime",
"sp-runtime/try-runtime",
]
fast-runtime = [
"bridge-hub-rococo-runtime/fast-runtime",
Expand Down
Loading
Loading