diff --git a/Cargo.lock b/Cargo.lock index 95ec92ba66..cc573b18cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4475,7 +4475,6 @@ dependencies = [ "jsonrpc-core", "log", "mashnet-node-runtime", - "node-executor", "pallet-conviction-voting", "pallet-referenda", "pallet-transaction-payment-rpc", diff --git a/nodes/standalone/Cargo.toml b/nodes/standalone/Cargo.toml index 6ec3e07377..d9ee15439f 100644 --- a/nodes/standalone/Cargo.toml +++ b/nodes/standalone/Cargo.toml @@ -20,7 +20,7 @@ mashnet-node-runtime = {path = "../../runtimes/standalone"} runtime-common = {path = "../../runtimes/common"} # External dependencies -clap = { version = "3.1", features = ["derive"] } +clap = {version = "3.1", features = ["derive"]} futures = "0.3" hex-literal = "0.3.4" log = "0.4" @@ -65,9 +65,8 @@ frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17"} # Runtime tests -node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} -pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} -pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} +pallet-conviction-voting = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} +pallet-referenda = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true} [features] @@ -76,9 +75,9 @@ runtime-benchmarks = [ "mashnet-node-runtime/runtime-benchmarks", "pallet-conviction-voting/runtime-benchmarks", "pallet-referenda/runtime-benchmarks", + "runtime-common/runtime-benchmarks" ] try-runtime = [ "mashnet-node-runtime/try-runtime", - "node-executor", "try-runtime-cli", ] diff --git a/nodes/standalone/src/command.rs b/nodes/standalone/src/command.rs index 7f3cfc249d..c1e24968f5 100644 --- a/nodes/standalone/src/command.rs +++ b/nodes/standalone/src/command.rs @@ -25,9 +25,6 @@ use mashnet_node_runtime::opaque::Block; use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; use sc_service::PartialComponents; -#[cfg(feature = "try-runtime")] -use node_executor::ExecutorDispatch; - impl SubstrateCli for Cli { fn impl_name() -> String { "KILT Node".to_string() @@ -155,7 +152,7 @@ pub fn run() -> sc_cli::Result<()> { let task_manager = sc_service::TaskManager::new(config.tokio_handle.clone(), registry) .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - Ok((cmd.run::(config), task_manager)) + Ok((cmd.run::(config), task_manager)) }) } #[cfg(not(feature = "try-runtime"))] diff --git a/pallets/delegation/Cargo.toml b/pallets/delegation/Cargo.toml index 4b32b49f98..f00b345461 100644 --- a/pallets/delegation/Cargo.toml +++ b/pallets/delegation/Cargo.toml @@ -69,6 +69,7 @@ runtime-benchmarks = [ "sp-io", ] std = [ + "attestation/std", "codec/std", "ctype/std", "frame-support/std", diff --git a/pallets/pallet-did-lookup/Cargo.toml b/pallets/pallet-did-lookup/Cargo.toml index d1d9114c60..6b73ae2e1b 100644 --- a/pallets/pallet-did-lookup/Cargo.toml +++ b/pallets/pallet-did-lookup/Cargo.toml @@ -13,9 +13,9 @@ targets = ["x86_64-unknown-linux-gnu"] kilt-support = {features = ["mock"], path = "../../support"} pallet-balances = {branch = "polkadot-v0.9.17", default-features = false, git = "https://github.com/paritytech/substrate"} +sp-core = {branch = "polkadot-v0.9.17", default-features = false, git = "https://github.com/paritytech/substrate"} sp-io = {branch = "polkadot-v0.9.17", default-features = false, git = "https://github.com/paritytech/substrate"} sp-keystore = {branch = "polkadot-v0.9.17", default-features = false, git = "https://github.com/paritytech/substrate"} -sp-core = {branch = "polkadot-v0.9.17", default-features = false, git = "https://github.com/paritytech/substrate"} [dependencies] codec = {default-features = false, features = ["derive"], package = "parity-scale-codec", version = "2.3.1"} @@ -42,6 +42,7 @@ runtime-benchmarks = [ "frame-benchmarking", "sp-io", "kilt-support/runtime-benchmarks", + "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", ] diff --git a/pallets/pallet-inflation/Cargo.toml b/pallets/pallet-inflation/Cargo.toml index 5708740284..830ee4e441 100644 --- a/pallets/pallet-inflation/Cargo.toml +++ b/pallets/pallet-inflation/Cargo.toml @@ -35,6 +35,8 @@ default = ["std"] runtime-benchmarks = [ "frame-benchmarking", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", ] std = [ diff --git a/pallets/pallet-web3-names/Cargo.toml b/pallets/pallet-web3-names/Cargo.toml index 8b8a6ec99e..733ad00242 100644 --- a/pallets/pallet-web3-names/Cargo.toml +++ b/pallets/pallet-web3-names/Cargo.toml @@ -41,6 +41,7 @@ runtime-benchmarks = [ "frame-benchmarking", "sp-io", "kilt-support/runtime-benchmarks", + "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", ] @@ -54,5 +55,7 @@ std = [ "sp-std/std", ] - -try-runtime = [] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", +] diff --git a/runtimes/common/Cargo.toml b/runtimes/common/Cargo.toml index 989ca45c15..ea8cc529e7 100644 --- a/runtimes/common/Cargo.toml +++ b/runtimes/common/Cargo.toml @@ -30,6 +30,9 @@ sp-std = {git = "https://github.com/paritytech/substrate", default-features = fa default = ["std"] fast-gov = [] runtime-benchmarks = [ + "attestation/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "parachain-staking/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] std = [ diff --git a/runtimes/standalone/Cargo.toml b/runtimes/standalone/Cargo.toml index c42535180b..2b040b3617 100644 --- a/runtimes/standalone/Cargo.toml +++ b/runtimes/standalone/Cargo.toml @@ -161,7 +161,7 @@ try-runtime = [ "pallet-session/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", - "pallet-web3-names/runtime-benchmarks", + "pallet-web3-names/try-runtime", "pallet-utility/try-runtime", "pallet-transaction-payment/try-runtime", "pallet-vesting/try-runtime", diff --git a/scripts/all.fish b/scripts/all.fish new file mode 100644 index 0000000000..57693e947d --- /dev/null +++ b/scripts/all.fish @@ -0,0 +1,15 @@ +#!/bin/env fish +# Check a few feature combinations for all crates. +# Requires `cargo-workspaces` to be installed. + +for features in "--features default" "--all-features" "--features runtime-benchmarks" "--features try-runtime" + for package in (cargo workspaces list) + cargo build -p $package (echo $features | string split " ") > /dev/null ^ /dev/null + if [ "$status" = "0" ] + echo -n "[ok] " + else + echo -n "[fail] " + end + echo cargo build -p $package (echo $features | string split " ") + end +end