difftreelog
fix build node with benchmarks
in: master
7 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6536,6 +6536,7 @@
"sp-runtime",
"sp-session",
"sp-std",
+ "sp-storage",
"sp-transaction-pool",
"sp-version",
"staging-xcm",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -170,6 +170,7 @@
sp-staking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
+sp-storage = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -354,30 +354,38 @@
}
#[cfg(feature = "runtime-benchmarks")]
Some(Subcommand::Benchmark(cmd)) => {
+ use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use polkadot_cli::Block;
- use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
+ use sp_io::SubstrateHostFunctions;
+
let runner = cli.create_runner(cmd)?;
// Switch on the concrete benchmark sub-command-
match cmd {
BenchmarkCmd::Pallet(cmd) => {
- runner.sync_run(|config| cmd.run::<Block, DefaultRuntimeExecutor>(config))
+ runner.sync_run(|config| cmd.run::<Block, SubstrateHostFunctions>(config))
}
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
let partials = new_partial::<
+ opal_runtime::Runtime,
+ opal_runtime::RuntimeApi,
+ OpalRuntimeExecutor,
_,
- default_runtime::RuntimeApi,
- DefaultRuntimeExecutor,
- _,
- >(&config, crate::service::parachain_build_import_queue)?;
+ >(
+ &config,
+ crate::service::parachain_build_import_queue::<opal_runtime::Runtime, _, _>,
+ )?;
cmd.run(partials.client)
}),
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
let partials = new_partial::<
+ opal_runtime::Runtime,
+ opal_runtime::RuntimeApi,
+ OpalRuntimeExecutor,
_,
- default_runtime::RuntimeApi,
- DefaultRuntimeExecutor,
- _,
- >(&config, crate::service::parachain_build_import_queue)?;
+ >(
+ &config,
+ crate::service::parachain_build_import_queue::<opal_runtime::Runtime, _, _>,
+ )?;
let db = partials.backend.expose_db();
let storage = partials.backend.expose_storage();
pallets/collator-selection/Cargo.tomldiffbeforeafterboth14[dependencies]14[dependencies]15log = { workspace = true }15log = { workspace = true }16parity-scale-codec = { workspace = true }16parity-scale-codec = { workspace = true }17rand = { version = "0.8.5", default-features = false }17rand = { version = "0.8.5", default-features = false, features = ["std_rng"] }18scale-info = { workspace = true }18scale-info = { workspace = true }19serde = { workspace = true }19serde = { workspace = true }2020pallets/unique/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -24,8 +24,8 @@
erc::CrossAccountId,
Config as CommonConfig,
};
+use sp_runtime::DispatchError;
use sp_std::vec;
-use sp_runtime::DispatchError;
use up_data_structs::{
CollectionId, CollectionLimits, CollectionMode, MAX_COLLECTION_DESCRIPTION_LENGTH,
MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -569,7 +569,8 @@
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
- use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
+ use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark};
+ use sp_storage::TrackedStorageKey;
let allowlist: Vec<TrackedStorageKey> = vec![
// Total Issuance
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -136,6 +136,7 @@
'sp-runtime/std',
'sp-session/std',
'sp-std/std',
+ 'sp-storage/std',
'sp-transaction-pool/std',
'sp-version/std',
'staging-xcm-builder/std',
@@ -279,6 +280,7 @@
sp-runtime = { workspace = true }
sp-session = { workspace = true }
sp-std = { workspace = true }
+sp-storage = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
staging-xcm = { workspace = true }