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.tomldiffbeforeafterboth--- a/pallets/collator-selection/Cargo.toml
+++ b/pallets/collator-selection/Cargo.toml
@@ -14,7 +14,7 @@
[dependencies]
log = { workspace = true }
parity-scale-codec = { workspace = true }
-rand = { version = "0.8.5", default-features = false }
+rand = { version = "0.8.5", default-features = false, features = ["std_rng"] }
scale-info = { workspace = true }
serde = { workspace = true }
pallets/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.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = [22 'app-promotion',23 'collator-selection',24 'foreign-assets',25 'governance',26 'pallet-test-utils',27 'preimage',28 'refungible',29]30pov-estimate = []31runtime-benchmarks = [32 "pallet-preimage/runtime-benchmarks",33 'cumulus-pallet-parachain-system/runtime-benchmarks',34 'frame-benchmarking',35 'frame-support/runtime-benchmarks',36 'frame-system-benchmarking',37 'frame-system/runtime-benchmarks',38 'pallet-app-promotion/runtime-benchmarks',39 'pallet-balances/runtime-benchmarks',40 'pallet-collator-selection/runtime-benchmarks',41 'pallet-collective/runtime-benchmarks',42 'pallet-common/runtime-benchmarks',43 'pallet-configuration/runtime-benchmarks',44 'pallet-democracy/runtime-benchmarks',45 'pallet-ethereum/runtime-benchmarks',46 'pallet-evm-coder-substrate/runtime-benchmarks',47 'pallet-evm-migration/runtime-benchmarks',48 'pallet-foreign-assets/runtime-benchmarks',49 'pallet-fungible/runtime-benchmarks',50 'pallet-identity/runtime-benchmarks',51 'pallet-inflation/runtime-benchmarks',52 'pallet-maintenance/runtime-benchmarks',53 'pallet-membership/runtime-benchmarks',54 'pallet-nonfungible/runtime-benchmarks',55 'pallet-ranked-collective/runtime-benchmarks',56 'pallet-referenda/runtime-benchmarks',57 'pallet-refungible/runtime-benchmarks',58 'pallet-scheduler/runtime-benchmarks',59 'pallet-structure/runtime-benchmarks',60 'pallet-timestamp/runtime-benchmarks',61 'pallet-unique/runtime-benchmarks',62 'pallet-utility/runtime-benchmarks',63 'pallet-xcm/runtime-benchmarks',64 'sp-runtime/runtime-benchmarks',65 'staging-xcm-builder/runtime-benchmarks',66]67std = [68 'cumulus-pallet-aura-ext/std',69 'cumulus-pallet-parachain-system/std',70 'cumulus-pallet-xcm/std',71 'cumulus-pallet-xcmp-queue/std',72 'cumulus-primitives-core/std',73 'cumulus-primitives-utility/std',74 'frame-executive/std',75 'frame-support/std',76 'frame-system-rpc-runtime-api/std',77 'frame-system/std',78 'frame-try-runtime/std',79 'pallet-aura/std',80 'pallet-balances/std',81 'pallet-collective/std',82 'pallet-democracy/std',83 'pallet-gov-origins/std',84 'pallet-membership/std',85 'pallet-ranked-collective/std',86 'pallet-referenda/std',87 'pallet-scheduler/std',88 'parity-scale-codec/std',89 # 'pallet-contracts/std',90 # 'pallet-contracts-primitives/std',91 # 'pallet-contracts-rpc-runtime-api/std',92 # 'pallet-contract-helpers/std',93 "pallet-authorship/std",94 "pallet-preimage/std",95 "pallet-session/std",96 "pallet-state-trie-migration/std",97 "sp-consensus-aura/std",98 'app-promotion-rpc/std',99 'evm-coder/std',100 'fp-rpc/std',101 'fp-self-contained/std',102 'pallet-app-promotion/std',103 'pallet-balances-adapter/std',104 'pallet-base-fee/std',105 'pallet-charge-transaction/std',106 'pallet-collator-selection/std',107 'pallet-common/std',108 'pallet-configuration/std',109 'pallet-ethereum/std',110 'pallet-evm-coder-substrate/std',111 'pallet-evm-contract-helpers/std',112 'pallet-evm-migration/std',113 'pallet-evm-transaction-payment/std',114 'pallet-evm/std',115 'pallet-fungible/std',116 'pallet-identity/std',117 'pallet-inflation/std',118 'pallet-nonfungible/std',119 'pallet-refungible/std',120 'pallet-structure/std',121 'pallet-sudo/std',122 'pallet-timestamp/std',123 'pallet-transaction-payment-rpc-runtime-api/std',124 'pallet-transaction-payment/std',125 'pallet-treasury/std',126 'pallet-unique/std',127 'pallet-utility/std',128 'parachain-info/std',129 'serde',130 'sp-api/std',131 'sp-block-builder/std',132 'sp-core/std',133 'sp-inherents/std',134 'sp-io/std',135 'sp-offchain/std',136 'sp-runtime/std',137 'sp-session/std',138 'sp-std/std',139 'sp-storage/std',140 'sp-transaction-pool/std',141 'sp-version/std',142 'staging-xcm-builder/std',143 'staging-xcm-executor/std',144 'staging-xcm/std',145 'up-common/std',146 'up-data-structs/std',147 'up-pov-estimate-rpc/std',148 'up-rpc/std',149 'up-sponsorship/std',150151 "orml-tokens/std",152 "orml-traits/std",153 "orml-vesting/std",154 "orml-xcm-support/std",155 "orml-xtokens/std",156 "pallet-foreign-assets/std",157158 'pallet-maintenance/std',159 'pallet-test-utils?/std',160]161try-runtime = [162 "pallet-authorship/try-runtime",163 "pallet-collator-selection/try-runtime",164 "pallet-identity/try-runtime",165 "pallet-preimage/try-runtime",166 "pallet-session/try-runtime",167 "pallet-state-trie-migration/try-runtime",168 'cumulus-pallet-aura-ext/try-runtime',169 'cumulus-pallet-dmp-queue/try-runtime',170 'cumulus-pallet-parachain-system/try-runtime',171 'cumulus-pallet-xcm/try-runtime',172 'cumulus-pallet-xcmp-queue/try-runtime',173 'fp-self-contained/try-runtime',174 'frame-executive/try-runtime',175 'frame-support/try-runtime',176 'frame-system/try-runtime',177 'frame-try-runtime',178 'frame-try-runtime?/try-runtime',179 'orml-tokens/try-runtime',180 'orml-vesting/try-runtime',181 'orml-xtokens/try-runtime',182 'pallet-app-promotion/try-runtime',183 'pallet-aura/try-runtime',184 'pallet-balances-adapter/try-runtime',185 'pallet-balances/try-runtime',186 'pallet-base-fee/try-runtime',187 'pallet-charge-transaction/try-runtime',188 'pallet-collective/try-runtime',189 'pallet-collective/try-runtime',190 'pallet-common/try-runtime',191 'pallet-configuration/try-runtime',192 'pallet-democracy/try-runtime',193 'pallet-democracy/try-runtime',194 'pallet-ethereum/try-runtime',195 'pallet-evm-coder-substrate/try-runtime',196 'pallet-evm-contract-helpers/try-runtime',197 'pallet-evm-migration/try-runtime',198 'pallet-evm-transaction-payment/try-runtime',199 'pallet-evm/try-runtime',200 'pallet-foreign-assets/try-runtime',201 'pallet-fungible/try-runtime',202 'pallet-gov-origins/try-runtime',203 'pallet-inflation/try-runtime',204 'pallet-maintenance/try-runtime',205 'pallet-membership/try-runtime',206 'pallet-membership/try-runtime',207 'pallet-nonfungible/try-runtime',208 'pallet-ranked-collective/try-runtime',209 'pallet-referenda/try-runtime',210 'pallet-refungible/try-runtime',211 'pallet-scheduler/try-runtime',212 'pallet-scheduler/try-runtime',213 'pallet-structure/try-runtime',214 'pallet-sudo/try-runtime',215 'pallet-test-utils?/try-runtime',216 'pallet-timestamp/try-runtime',217 'pallet-transaction-payment/try-runtime',218 'pallet-treasury/try-runtime',219 'pallet-unique/try-runtime',220 'pallet-utility/try-runtime',221 'pallet-xcm/try-runtime',222 'parachain-info/try-runtime',223]224225app-promotion = []226collator-selection = []227foreign-assets = []228gov-test-timings = []229governance = []230preimage = []231refungible = []232session-test-timings = []233234################################################################################235# local dependencies236237[dependencies]238cumulus-pallet-aura-ext = { workspace = true }239cumulus-pallet-dmp-queue = { workspace = true }240cumulus-pallet-parachain-system = { workspace = true }241cumulus-pallet-xcm = { workspace = true }242cumulus-pallet-xcmp-queue = { workspace = true }243cumulus-primitives-core = { workspace = true }244cumulus-primitives-timestamp = { workspace = true }245cumulus-primitives-utility = { workspace = true }246frame-executive = { workspace = true }247frame-support = { workspace = true }248frame-system = { workspace = true }249frame-system-rpc-runtime-api = { workspace = true }250orml-tokens = { workspace = true }251orml-traits = { workspace = true }252orml-vesting = { workspace = true }253orml-xcm-support = { workspace = true }254orml-xtokens = { workspace = true }255pallet-aura = { workspace = true }256pallet-authorship = { workspace = true }257pallet-balances = { features = ["insecure_zero_ed"], workspace = true }258pallet-preimage = { workspace = true }259pallet-session = { workspace = true }260pallet-state-trie-migration = { workspace = true }261pallet-sudo = { workspace = true }262pallet-timestamp = { workspace = true }263pallet-transaction-payment = { workspace = true }264pallet-transaction-payment-rpc-runtime-api = { workspace = true }265pallet-treasury = { workspace = true }266pallet-utility = { workspace = true }267pallet-xcm = { workspace = true }268parachain-info = { workspace = true }269parity-scale-codec = { workspace = true }270polkadot-parachain-primitives = { workspace = true }271smallvec = { workspace = true }272sp-api = { workspace = true }273sp-arithmetic = { workspace = true }274sp-block-builder = { workspace = true }275sp-consensus-aura = { workspace = true }276sp-core = { workspace = true }277sp-inherents = { workspace = true }278sp-io = { workspace = true }279sp-offchain = { workspace = true }280sp-runtime = { workspace = true }281sp-session = { workspace = true }282sp-std = { workspace = true }283sp-storage = { workspace = true }284sp-transaction-pool = { workspace = true }285sp-version = { workspace = true }286staging-xcm = { workspace = true }287staging-xcm-builder = { workspace = true }288staging-xcm-executor = { workspace = true }289290app-promotion-rpc = { workspace = true }291derivative = { workspace = true }292evm-coder = { workspace = true }293fp-evm = { workspace = true }294fp-rpc = { workspace = true }295fp-self-contained = { workspace = true }296log = { workspace = true }297num_enum = { workspace = true }298pallet-app-promotion = { workspace = true }299pallet-balances-adapter = { workspace = true }300pallet-base-fee = { workspace = true }301pallet-charge-transaction = { workspace = true }302pallet-collator-selection = { workspace = true }303pallet-collective = { workspace = true }304pallet-common = { workspace = true }305pallet-configuration = { workspace = true }306pallet-democracy = { workspace = true }307pallet-ethereum = { workspace = true }308pallet-evm = { workspace = true }309pallet-evm-coder-substrate = { workspace = true }310pallet-evm-contract-helpers = { workspace = true }311pallet-evm-migration = { workspace = true }312pallet-evm-precompile-simple = { workspace = true }313pallet-evm-transaction-payment = { workspace = true }314pallet-foreign-assets = { workspace = true }315pallet-fungible = { workspace = true }316pallet-gov-origins = { workspace = true }317pallet-identity = { workspace = true }318pallet-inflation = { workspace = true }319pallet-maintenance = { workspace = true }320pallet-membership = { workspace = true }321pallet-nonfungible = { workspace = true }322pallet-ranked-collective = { workspace = true }323pallet-referenda = { workspace = true }324pallet-refungible = { workspace = true }325pallet-scheduler = { workspace = true }326pallet-structure = { workspace = true }327pallet-unique = { workspace = true }328precompile-utils-macro = { workspace = true }329scale-info = { workspace = true }330up-common = { workspace = true }331up-data-structs = { workspace = true }332up-pov-estimate-rpc = { workspace = true }333up-rpc = { workspace = true }334up-sponsorship = { workspace = true }335336################################################################################337# Optional dependencies338339frame-benchmarking = { workspace = true, optional = true }340frame-system-benchmarking = { workspace = true, optional = true }341frame-try-runtime = { workspace = true, optional = true }342serde = { workspace = true, optional = true }343344################################################################################345# Test dependencies346347pallet-test-utils = { workspace = true, optional = true }348349################################################################################350# Other Dependencies351352hex-literal = { workspace = true }353impl-trait-for-tuples = { workspace = true }354355[build-dependencies]356substrate-wasm-builder = { workspace = true }