diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 50d98d9d37e3..752791564381 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -150,12 +150,12 @@ check-web-wasm: &test
script:
# WASM support is in progress. As more and more crates support WASM, we
# should add entries here. See https://github.com/paritytech/polkadot/issues/625
- - time cargo build --locked --target=wasm32-unknown-unknown --manifest-path executor/Cargo.toml
+ - time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/polkadot/Cargo.toml
+ - time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/kusama/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path erasure-coding/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path parachain/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path primitives/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path rpc/Cargo.toml
- - time cargo build --locked --target=wasm32-unknown-unknown --manifest-path runtime/Cargo.toml
- time cargo build --locked --target=wasm32-unknown-unknown --manifest-path statement-table/Cargo.toml
- sccache -s
diff --git a/Cargo.lock b/Cargo.lock
index 00da17b2d2a5..2154ce17237e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2029,6 +2029,72 @@ dependencies = [
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "kusama-runtime"
+version = "0.7.11"
+dependencies = [
+ "bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "frame-executive 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "frame-support 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "frame-system 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "frame-system-rpc-runtime-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pallet-authority-discovery 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-authorship 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-babe 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-balances 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-collective 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-democracy 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-elections-phragmen 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-finality-tracker 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-grandpa 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-identity 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-im-online 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-indices 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-membership 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-nicks 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-offences 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-randomness-collective-flip 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-session 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-staking-reward-curve 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-timestamp 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-transaction-payment 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-transaction-payment-rpc-runtime-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-treasury 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-utility 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "polkadot-parachain 0.7.11",
+ "polkadot-primitives 0.7.11",
+ "polkadot-runtime-common 0.7.10",
+ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sp-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-authority-discovery 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-block-builder 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-consensus-babe 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-inherents 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-io 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-keyring 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-offchain 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-session 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-transaction-pool 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-trie 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-version 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "substrate-wasm-builder-runner 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "kv-log-macro"
version = "1.0.4"
@@ -3604,7 +3670,6 @@ dependencies = [
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-erasure-coding 0.7.11",
"polkadot-primitives 0.7.11",
- "polkadot-runtime 0.7.11",
"sc-client 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-keystore 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
@@ -3651,16 +3716,16 @@ dependencies = [
"polkadot-cli 0.7.11",
"polkadot-network 0.7.11",
"polkadot-primitives 0.7.11",
- "polkadot-runtime 0.7.11",
"polkadot-service 0.7.11",
"polkadot-validation 0.7.11",
"sc-client 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-network 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-blockchain 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-keyring 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
- "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -3675,14 +3740,6 @@ dependencies = [
"sp-trie 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
-[[package]]
-name = "polkadot-executor"
-version = "0.7.11"
-dependencies = [
- "polkadot-runtime 0.7.11",
- "sc-executor 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
-]
-
[[package]]
name = "polkadot-network"
version = "0.7.11"
@@ -3739,6 +3796,7 @@ dependencies = [
"sp-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-application-crypto 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-inherents 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-serializer 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-std 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
@@ -3752,8 +3810,8 @@ version = "0.7.11"
dependencies = [
"jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-transaction-payment-rpc 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-primitives 0.7.11",
- "polkadot-runtime 0.7.11",
"sc-client 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-rpc 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
@@ -3796,10 +3854,10 @@ dependencies = [
"pallet-transaction-payment 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-transaction-payment-rpc-runtime-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-treasury 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
- "pallet-utility 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-parachain 0.7.11",
"polkadot-primitives 0.7.11",
+ "polkadot-runtime-common 0.7.10",
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3811,11 +3869,9 @@ dependencies = [
"sp-consensus-babe 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-inherents 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
- "sp-io 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-keyring 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-offchain 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
- "sp-serializer 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-session 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-std 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
@@ -3827,21 +3883,63 @@ dependencies = [
"trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "polkadot-runtime-common"
+version = "0.7.10"
+dependencies = [
+ "bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "frame-support 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "frame-system 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pallet-authorship 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-babe 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-balances 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-randomness-collective-flip 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-session 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-staking-reward-curve 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-timestamp 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-treasury 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "polkadot-parachain 0.7.11",
+ "polkadot-primitives 0.7.11",
+ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sp-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-inherents 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-io 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-keyring 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-std 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-trie 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "polkadot-service"
version = "0.7.11"
dependencies = [
+ "frame-system-rpc-runtime-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "kusama-runtime 0.7.11",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pallet-babe 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-im-online 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"pallet-staking 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "pallet-transaction-payment-rpc-runtime-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-availability-store 0.7.11",
- "polkadot-executor 0.7.11",
"polkadot-network 0.7.11",
"polkadot-primitives 0.7.11",
"polkadot-rpc 0.7.11",
@@ -3862,13 +3960,17 @@ dependencies = [
"slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sp-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-authority-discovery 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-block-builder 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-blockchain 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-consensus-babe 0.8.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-core 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-finality-grandpa 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-inherents 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-io 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-offchain 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-runtime 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
+ "sp-session 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sp-transaction-pool 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
]
@@ -3898,7 +4000,6 @@ dependencies = [
"polkadot-erasure-coding 0.7.11",
"polkadot-parachain 0.7.11",
"polkadot-primitives 0.7.11",
- "polkadot-runtime 0.7.11",
"polkadot-statement-table 0.7.11",
"sc-block-builder 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"sc-client-api 2.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
diff --git a/Cargo.toml b/Cargo.toml
index 9506c09a1d5a..f02f707e8e10 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,10 +24,11 @@ members = [
"cli",
"collator",
"erasure-coding",
- "executor",
"network",
"primitives",
- "runtime",
+ "runtime/common",
+ "runtime/polkadot",
+ "runtime/kusama",
"service",
"statement-table",
"service",
@@ -37,7 +38,8 @@ members = [
"test-parachains/adder/collator",
]
exclude = [
- "runtime/wasm",
+ "runtime/polkadot/wasm",
+ "runtime/kusama/wasm",
"test-parachains/adder/wasm",
]
diff --git a/availability-store/Cargo.toml b/availability-store/Cargo.toml
index 0175ed54d644..5752ccaf9c04 100644
--- a/availability-store/Cargo.toml
+++ b/availability-store/Cargo.toml
@@ -8,7 +8,6 @@ edition = "2018"
[dependencies]
polkadot-primitives = { path = "../primitives" }
polkadot-erasure-coding = { path = "../erasure-coding" }
-polkadot-runtime = { path = "../runtime" }
parking_lot = "0.9.0"
derive_more = "0.99"
log = "0.4.8"
diff --git a/availability-store/src/lib.rs b/availability-store/src/lib.rs
index 730b10052f6a..17438e2a1ca2 100644
--- a/availability-store/src/lib.rs
+++ b/availability-store/src/lib.rs
@@ -198,7 +198,7 @@ impl Store {
client: Arc
,
thread_pool: TaskExecutor,
keystore: KeyStorePtr,
- ) -> ClientResult<(AvailabilityBlockImport)>
+ ) -> ClientResult>
where
P: ProvideRuntimeApi + BlockchainEvents + BlockBody + Send + Sync + 'static,
P::Api: ParachainHost,
diff --git a/cli/src/chain_spec.rs b/cli/src/chain_spec.rs
index 8afb7daa26aa..837e818d8ae0 100644
--- a/cli/src/chain_spec.rs
+++ b/cli/src/chain_spec.rs
@@ -41,12 +41,19 @@ impl Default for ChainSpec {
/// Get a chain config from a spec setting.
impl ChainSpec {
pub(crate) fn load(self) -> Result {
- Ok(match self {
- ChainSpec::Kusama => service::chain_spec::kusama_config()?,
- ChainSpec::Development => service::chain_spec::development_config(),
- ChainSpec::LocalTestnet => service::chain_spec::local_testnet_config(),
- ChainSpec::StagingTestnet => service::chain_spec::staging_testnet_config(),
- })
+ match self {
+ ChainSpec::Development => Ok(service::chain_spec::development_config()),
+ ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
+ ChainSpec::StagingTestnet => Ok(service::chain_spec::staging_testnet_config()),
+ ChainSpec::Kusama => service::chain_spec::kusama_config(),
+ }
+ }
+
+ pub(crate) fn is_kusama(&self) -> bool {
+ match self {
+ ChainSpec::Development | ChainSpec::LocalTestnet | ChainSpec::StagingTestnet => false,
+ ChainSpec::Kusama => true,
+ }
}
pub(crate) fn from(s: &str) -> Option {
diff --git a/cli/src/lib.rs b/cli/src/lib.rs
index c2c1a0255dc8..0ae963e5d1e1 100644
--- a/cli/src/lib.rs
+++ b/cli/src/lib.rs
@@ -26,53 +26,27 @@ mod browser;
use chain_spec::ChainSpec;
use futures::{
Future, FutureExt, TryFutureExt, future::select, channel::oneshot, compat::Future01CompatExt,
- task::Spawn
};
use tokio::runtime::Runtime;
-use log::{info, error};
+use log::info;
use structopt::StructOpt;
pub use service::{
- AbstractService, CustomConfiguration,
- ProvideRuntimeApi, CoreApi, ParachainHost,
+ AbstractService, CustomConfiguration, ProvideRuntimeApi, CoreApi, ParachainHost, IsKusama, self,
WrappedExecutor
};
-pub use cli::{VersionInfo, IntoExit, NoCustom};
+pub use cli::{VersionInfo, IntoExit, NoCustom, SharedParams};
pub use cli::{display_role, error};
-fn load_spec(id: &str) -> Result