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

Co #11976: Enable rust features #5983

Merged
merged 7 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
401 changes: 211 additions & 190 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,15 @@ pub fn run() -> Result<()> {
let chain_spec = &runner.config().chain_spec;

match cmd {
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) =>
return Err(sc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
)
.into()),
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => runner.sync_run(|mut config| {
let (client, backend, _, _) = service::new_chain_ops(&mut config, None)?;
let db = backend.expose_db();
Expand Down
4 changes: 3 additions & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ runtime-benchmarks = [
"polkadot-runtime?/runtime-benchmarks",
"kusama-runtime?/runtime-benchmarks",
"westend-runtime?/runtime-benchmarks",
"rococo-runtime?/runtime-benchmarks"
"rococo-runtime?/runtime-benchmarks",

"service/runtime-benchmarks",
]
try-runtime = [
"polkadot-runtime?/try-runtime",
Expand Down
1 change: 1 addition & 0 deletions runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
]
try-runtime = [
"runtime-parachains/try-runtime",
Expand Down
10 changes: 5 additions & 5 deletions runtime/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ runtime-benchmarks = [
"pallet-membership/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand All @@ -226,16 +226,16 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"pallet-xcm-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
]
try-runtime = [
"frame-executive/try-runtime",
Expand Down
8 changes: 4 additions & 4 deletions runtime/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ runtime-benchmarks = [
"pallet-membership/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand All @@ -214,9 +214,9 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"frame-system-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
Expand Down
5 changes: 3 additions & 2 deletions runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ std = [
]
runtime-benchmarks = [
"runtime-common/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
Expand Down Expand Up @@ -205,11 +206,11 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"pallet-xcm-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
]
try-runtime = [
"frame-executive/try-runtime",
Expand Down
10 changes: 5 additions & 5 deletions runtime/westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ runtime-benchmarks = [
"pallet-im-online/runtime-benchmarks",
"pallet-indices/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nomination-pools-benchmarking",
"pallet-nomination-pools-benchmarking/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-recovery/runtime-benchmarks",
Expand All @@ -212,13 +212,13 @@ runtime-benchmarks = [
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"pallet-offences-benchmarking/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system-benchmarking/runtime-benchmarks",
"hex-literal",
"xcm-builder/runtime-benchmarks",
"pallet-xcm-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
Expand Down
5 changes: 5 additions & 0 deletions xcm/pallet-xcm-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ std = [
"sp-runtime/std",
"sp-std/std"
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]