difftreelog
fix build node with benchmarks
in: master
7 files changed
Cargo.lockdiffbeforeafterboth6536 "sp-runtime",6536 "sp-runtime",6537 "sp-session",6537 "sp-session",6538 "sp-std",6538 "sp-std",6539 "sp-storage",6539 "sp-transaction-pool",6540 "sp-transaction-pool",6540 "sp-version",6541 "sp-version",6541 "staging-xcm",6542 "staging-xcm",Cargo.tomldiffbeforeafterboth170sp-staking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }170sp-staking = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }171sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }171sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }172sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }172sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }173sp-storage = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }173sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }174sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }174sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }175sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }175sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }176sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }node/cli/src/command.rsdiffbeforeafterboth354 }354 }355 #[cfg(feature = "runtime-benchmarks")]355 #[cfg(feature = "runtime-benchmarks")]356 Some(Subcommand::Benchmark(cmd)) => {356 Some(Subcommand::Benchmark(cmd)) => {357 use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};357 use polkadot_cli::Block;358 use polkadot_cli::Block;358 use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};359 use sp_io::SubstrateHostFunctions;360359 let runner = cli.create_runner(cmd)?;361 let runner = cli.create_runner(cmd)?;360 // Switch on the concrete benchmark sub-command-362 // Switch on the concrete benchmark sub-command-361 match cmd {363 match cmd {362 BenchmarkCmd::Pallet(cmd) => {364 BenchmarkCmd::Pallet(cmd) => {363 runner.sync_run(|config| cmd.run::<Block, DefaultRuntimeExecutor>(config))365 runner.sync_run(|config| cmd.run::<Block, SubstrateHostFunctions>(config))364 }366 }365 BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {367 BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {366 let partials = new_partial::<368 let partials = new_partial::<367 _,369 opal_runtime::Runtime,368 default_runtime::RuntimeApi,370 opal_runtime::RuntimeApi,369 DefaultRuntimeExecutor,371 OpalRuntimeExecutor,370 _,372 _,371 >(&config, crate::service::parachain_build_import_queue)?;373 >(374 &config,375 crate::service::parachain_build_import_queue::<opal_runtime::Runtime, _, _>,376 )?;372 cmd.run(partials.client)377 cmd.run(partials.client)373 }),378 }),374 BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {379 BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {375 let partials = new_partial::<380 let partials = new_partial::<376 _,381 opal_runtime::Runtime,377 default_runtime::RuntimeApi,382 opal_runtime::RuntimeApi,378 DefaultRuntimeExecutor,383 OpalRuntimeExecutor,379 _,384 _,380 >(&config, crate::service::parachain_build_import_queue)?;385 >(386 &config,387 crate::service::parachain_build_import_queue::<opal_runtime::Runtime, _, _>,388 )?;381 let db = partials.backend.expose_db();389 let db = partials.backend.expose_db();382 let storage = partials.backend.expose_storage();390 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.rsdiffbeforeafterboth24 erc::CrossAccountId,24 erc::CrossAccountId,25 Config as CommonConfig,25 Config as CommonConfig,26};26};27use sp_std::vec;27use sp_runtime::DispatchError;28use sp_runtime::DispatchError;28use sp_std::vec;29use up_data_structs::{29use up_data_structs::{30 CollectionId, CollectionLimits, CollectionMode, MAX_COLLECTION_DESCRIPTION_LENGTH,30 CollectionId, CollectionLimits, CollectionMode, MAX_COLLECTION_DESCRIPTION_LENGTH,31 MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,31 MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,runtime/common/runtime_apis.rsdiffbeforeafterboth569 fn dispatch_benchmark(569 fn dispatch_benchmark(570 config: frame_benchmarking::BenchmarkConfig570 config: frame_benchmarking::BenchmarkConfig571 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {571 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {572 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};572 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark};573 use sp_storage::TrackedStorageKey;573574574 let allowlist: Vec<TrackedStorageKey> = vec![575 let allowlist: Vec<TrackedStorageKey> = vec![575 // Total Issuance576 // Total Issuanceruntime/opal/Cargo.tomldiffbeforeafterboth136 'sp-runtime/std',136 'sp-runtime/std',137 'sp-session/std',137 'sp-session/std',138 'sp-std/std',138 'sp-std/std',139 'sp-storage/std',139 'sp-transaction-pool/std',140 'sp-transaction-pool/std',140 'sp-version/std',141 'sp-version/std',141 'staging-xcm-builder/std',142 'staging-xcm-builder/std',279sp-runtime = { workspace = true }280sp-runtime = { workspace = true }280sp-session = { workspace = true }281sp-session = { workspace = true }281sp-std = { workspace = true }282sp-std = { workspace = true }283sp-storage = { workspace = true }282sp-transaction-pool = { workspace = true }284sp-transaction-pool = { workspace = true }283sp-version = { workspace = true }285sp-version = { workspace = true }284staging-xcm = { workspace = true }286staging-xcm = { workspace = true }