Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Do not depend on native runtimes for RuntimeApi (#7451)
Browse files Browse the repository at this point in the history
* Implement runtime apis for fake runtime

These runtime api implementations are only used to make the compiler
think that we have implemented all required runtime apis. They will not
be called as we switch the executor to `WasmExecutor`. In the near
future we will not require these fake implementations anymore after
Substrate has shifted away from this compile time requirement.

This brings us the advantage that the `polkadot-service` doesn't need to
depend on the runtimes for getting the `RuntimeApi` type.

It also removes around 1min of build time on my machine ;)

* Fix warning

* FMT

* ".git/.scripts/commands/fmt/fmt.sh"

* Use more descriptive id

* Fix warnings

* Adapt path

* Fix 🙈

---------

Co-authored-by: command-bot <>
  • Loading branch information
bkchr authored Jul 4, 2023
1 parent f963646 commit 39b35b4
Show file tree
Hide file tree
Showing 19 changed files with 1,155 additions and 1,507 deletions.
158 changes: 101 additions & 57 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ color-eyre = { version = "0.6.1", default-features = false }
tikv-jemallocator = "0.5.0"

# Crates in our workspace, defined as dependencies so we can pass them feature flags.
polkadot-cli = { path = "cli", features = [ "kusama-native", "westend-native", "rococo-native" ] }
polkadot-cli = { path = "cli", features = [ "polkadot-native", "kusama-native", "westend-native", "rococo-native" ] }
polkadot-node-core-pvf-prepare-worker = { path = "node/core/pvf/prepare-worker" }
polkadot-overseer = { path = "node/overseer" }

Expand Down Expand Up @@ -68,7 +68,6 @@ members = [
"xcm/pallet-xcm",
"xcm/pallet-xcm-benchmarks",
"xcm/procedural",
"node/client",
"node/collation-generation",
"node/core/approval-voting",
"node/core/av-store",
Expand Down
4 changes: 1 addition & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pyro = { package = "pyroscope", version = "0.5.3", optional = true }
pyroscope_pprofrs = { version = "0.2", optional = true }

service = { package = "polkadot-service", path = "../node/service", default-features = false, optional = true }
polkadot-client = { path = "../node/client", optional = true }
polkadot-node-core-pvf-execute-worker = { path = "../node/core/pvf/execute-worker", optional = true }
polkadot-node-core-pvf-prepare-worker = { path = "../node/core/pvf/prepare-worker", optional = true }
polkadot-performance-test = { path = "../node/test/performance-test", optional = true }
Expand All @@ -45,7 +44,7 @@ sc-storage-monitor = { git = "https://github.com/paritytech/substrate", branch =
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }

[features]
default = ["db", "cli", "full-node", "polkadot-native"]
default = ["db", "cli", "full-node"]
db = ["service/db"]
cli = [
"clap",
Expand All @@ -54,7 +53,6 @@ cli = [
"sc-tracing",
"frame-benchmarking-cli",
"try-runtime-cli",
"polkadot-client",
"polkadot-node-core-pvf-execute-worker",
"polkadot-node-core-pvf-prepare-worker",
"service",
Expand Down
Loading

0 comments on commit 39b35b4

Please sign in to comment.