difftreelog
fix benchmark rmrk-core with opal-runtime
in: master
10 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8558,11 +8558,14 @@
"fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
+ "frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
+ "frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
+ "hex-literal",
"log",
"orml-vesting",
"pallet-aura",
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@
.PHONY: _bench
_bench:
- cargo run --release --features runtime-benchmarks,unique-runtime -- \
+ cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \
benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \
--wasm-execution compiled --extrinsic '*' \
--template .maintain/frame-weight-template.hbs --steps=50 --repeat=80 --heap-pages=4096 \
node/cli/Cargo.tomldiffbeforeafterboth1################################################################################2# Build Dependencies34[build-dependencies.substrate-build-script-utils]5git = "https://github.com/paritytech/substrate"6branch = "polkadot-v0.9.22"78################################################################################9# Substrate Dependecies1011[dependencies.codec]12default-features = false13features = ['derive']14package = 'parity-scale-codec'15version = '3.1.2'1617[dependencies.frame-benchmarking]18git = "https://github.com/paritytech/substrate"19branch = "polkadot-v0.9.22"2021[dependencies.frame-benchmarking-cli]22git = "https://github.com/paritytech/substrate"23branch = "polkadot-v0.9.22"2425[dependencies.try-runtime-cli]26git = 'https://github.com/paritytech/substrate'27branch = 'polkadot-v0.9.22'2829[dependencies.pallet-transaction-payment-rpc]30git = "https://github.com/paritytech/substrate"31branch = "polkadot-v0.9.22"3233[dependencies.substrate-prometheus-endpoint]34git = "https://github.com/paritytech/substrate"35branch = "polkadot-v0.9.22"3637[dependencies.sc-basic-authorship]38git = "https://github.com/paritytech/substrate"39branch = "polkadot-v0.9.22"4041[dependencies.sc-chain-spec]42git = "https://github.com/paritytech/substrate"43branch = "polkadot-v0.9.22"4445[dependencies.sc-cli]46features = ['wasmtime']47git = "https://github.com/paritytech/substrate"48branch = "polkadot-v0.9.22"4950[dependencies.sc-client-api]51git = "https://github.com/paritytech/substrate"52branch = "polkadot-v0.9.22"5354[dependencies.sc-consensus]55git = "https://github.com/paritytech/substrate"56branch = "polkadot-v0.9.22"5758[dependencies.sc-consensus-aura]59git = "https://github.com/paritytech/substrate"60branch = "polkadot-v0.9.22"6162[dependencies.sc-executor]63features = ['wasmtime']64git = "https://github.com/paritytech/substrate"65branch = "polkadot-v0.9.22"6667[dependencies.sc-finality-grandpa]68git = "https://github.com/paritytech/substrate"69branch = "polkadot-v0.9.22"7071[dependencies.sc-keystore]72git = "https://github.com/paritytech/substrate"73branch = "polkadot-v0.9.22"7475[dependencies.sc-rpc]76git = "https://github.com/paritytech/substrate"77branch = "polkadot-v0.9.22"7879[dependencies.sc-rpc-api]80git = "https://github.com/paritytech/substrate"81branch = "polkadot-v0.9.22"8283[dependencies.sc-service]84features = ['wasmtime']85git = "https://github.com/paritytech/substrate"86branch = "polkadot-v0.9.22"8788[dependencies.sc-telemetry]89git = "https://github.com/paritytech/substrate"90branch = "polkadot-v0.9.22"9192[dependencies.sc-transaction-pool]93git = "https://github.com/paritytech/substrate"94branch = "polkadot-v0.9.22"9596[dependencies.sc-tracing]97git = "https://github.com/paritytech/substrate"98branch = "polkadot-v0.9.22"99100[dependencies.sc-sysinfo]101git = "https://github.com/paritytech/substrate"102branch = "polkadot-v0.9.22"103104[dependencies.sp-block-builder]105git = "https://github.com/paritytech/substrate"106branch = "polkadot-v0.9.22"107108[dependencies.sp-api]109git = "https://github.com/paritytech/substrate"110branch = "polkadot-v0.9.22"111112[dependencies.sp-blockchain]113git = "https://github.com/paritytech/substrate"114branch = "polkadot-v0.9.22"115116[dependencies.sp-consensus]117git = "https://github.com/paritytech/substrate"118branch = "polkadot-v0.9.22"119120[dependencies.sp-consensus-aura]121git = "https://github.com/paritytech/substrate"122branch = "polkadot-v0.9.22"123124[dependencies.sp-core]125git = "https://github.com/paritytech/substrate"126branch = "polkadot-v0.9.22"127128[dependencies.sp-finality-grandpa]129git = "https://github.com/paritytech/substrate"130branch = "polkadot-v0.9.22"131132[dependencies.sp-inherents]133git = "https://github.com/paritytech/substrate"134branch = "polkadot-v0.9.22"135136[dependencies.sp-keystore]137git = "https://github.com/paritytech/substrate"138branch = "polkadot-v0.9.22"139140[dependencies.sp-offchain]141git = "https://github.com/paritytech/substrate"142branch = "polkadot-v0.9.22"143144[dependencies.sp-runtime]145git = "https://github.com/paritytech/substrate"146branch = "polkadot-v0.9.22"147148[dependencies.sp-session]149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.22"151152[dependencies.sp-timestamp]153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.22"155156[dependencies.sp-transaction-pool]157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.22"159160[dependencies.sp-trie]161git = "https://github.com/paritytech/substrate"162branch = "polkadot-v0.9.22"163164[dependencies.substrate-frame-rpc-system]165git = "https://github.com/paritytech/substrate"166branch = "polkadot-v0.9.22"167168[dependencies.sc-network]169git = "https://github.com/paritytech/substrate"170branch = "polkadot-v0.9.22"171172[dependencies.serde]173features = ['derive']174version = '1.0.130'175176[dependencies.serde_json]177version = '1.0.68'178179[dependencies.sc-consensus-manual-seal]180git = "https://github.com/paritytech/substrate"181branch = "polkadot-v0.9.22"182183################################################################################184# Cumulus dependencies185186[dependencies.cumulus-client-consensus-aura]187git = "https://github.com/paritytech/cumulus"188branch = "polkadot-v0.9.22"189190[dependencies.cumulus-client-consensus-common]191git = "https://github.com/paritytech/cumulus"192branch = "polkadot-v0.9.22"193194[dependencies.cumulus-client-collator]195git = "https://github.com/paritytech/cumulus"196branch = "polkadot-v0.9.22"197198[dependencies.cumulus-client-cli]199git = "https://github.com/paritytech/cumulus"200branch = "polkadot-v0.9.22"201202[dependencies.cumulus-client-network]203git = "https://github.com/paritytech/cumulus"204branch = "polkadot-v0.9.22"205206[dependencies.cumulus-primitives-core]207git = "https://github.com/paritytech/cumulus"208branch = "polkadot-v0.9.22"209210[dependencies.cumulus-primitives-parachain-inherent]211git = "https://github.com/paritytech/cumulus"212branch = "polkadot-v0.9.22"213214[dependencies.cumulus-client-service]215git = "https://github.com/paritytech/cumulus"216branch = "polkadot-v0.9.22"217218[dependencies.cumulus-relay-chain-interface]219git = "https://github.com/paritytech/cumulus"220branch = "polkadot-v0.9.22"221222[dependencies.cumulus-relay-chain-inprocess-interface]223git = "https://github.com/paritytech/cumulus"224branch = "polkadot-v0.9.22"225226[dependencies.cumulus-relay-chain-rpc-interface]227git = "https://github.com/paritytech/cumulus"228branch = "polkadot-v0.9.22"229230################################################################################231# Polkadot dependencies232[dependencies.polkadot-primitives]233git = "https://github.com/paritytech/polkadot"234branch = "release-v0.9.22"235236[dependencies.polkadot-service]237git = "https://github.com/paritytech/polkadot"238branch = "release-v0.9.22"239240[dependencies.polkadot-cli]241git = "https://github.com/paritytech/polkadot"242branch = "release-v0.9.22"243244[dependencies.polkadot-test-service]245git = "https://github.com/paritytech/polkadot"246branch = "release-v0.9.22"247248[dependencies.polkadot-parachain]249git = "https://github.com/paritytech/polkadot"250branch = "release-v0.9.22"251252253################################################################################254# Local dependencies255256[dependencies.unique-runtime-common]257default-features = false258path = "../../runtime/common"259260[dependencies.unique-runtime]261path = '../../runtime/unique'262optional = true263264[dependencies.quartz-runtime]265path = '../../runtime/quartz'266optional = true267268[dependencies.opal-runtime]269path = '../../runtime/opal'270271[dependencies.up-data-structs]272path = "../../primitives/data-structs"273default-features = false274275[dependencies.up-rpc]276path = "../../primitives/rpc"277278[dependencies.pallet-transaction-payment-rpc-runtime-api]279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.22"281282################################################################################283# Package284285[package]286authors = ['Unique Network <support@uniquenetwork.io>']287build = 'build.rs'288description = 'Unique Node'289edition = '2021'290homepage = 'https://unique.network'291license = 'GPLv3'292name = 'unique-node'293repository = 'https://github.com/UniqueNetwork/unique-chain'294version = '0.9.22'295296[[bin]]297name = 'unique-collator'298path = "src/main.rs"299300[package.metadata.docs.rs]301targets = ['x86_64-unknown-linux-gnu']302303[dependencies]304futures = '0.3.17'305log = '0.4.14'306flexi_logger = "0.15.7"307parking_lot = '0.11.2'308clap = "3.1.2"309jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }310tokio = { version = "1.17.0", features = ["time"] }311312fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }313fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }314fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }315fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }316fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }317fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }318pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }319320unique-rpc = { default-features = false, path = "../rpc" }321rmrk-rpc = { path = "../../primitives/rmrk-rpc" }322323[features]324default = []325runtime-benchmarks = [326 'unique-runtime/runtime-benchmarks',327 'polkadot-service/runtime-benchmarks',328]329try-runtime = []1################################################################################2# Build Dependencies34[build-dependencies.substrate-build-script-utils]5git = "https://github.com/paritytech/substrate"6branch = "polkadot-v0.9.22"78################################################################################9# Substrate Dependecies1011[dependencies.codec]12default-features = false13features = ['derive']14package = 'parity-scale-codec'15version = '3.1.2'1617[dependencies.frame-benchmarking]18git = "https://github.com/paritytech/substrate"19branch = "polkadot-v0.9.22"2021[dependencies.frame-benchmarking-cli]22git = "https://github.com/paritytech/substrate"23branch = "polkadot-v0.9.22"2425[dependencies.try-runtime-cli]26git = 'https://github.com/paritytech/substrate'27branch = 'polkadot-v0.9.22'2829[dependencies.pallet-transaction-payment-rpc]30git = "https://github.com/paritytech/substrate"31branch = "polkadot-v0.9.22"3233[dependencies.substrate-prometheus-endpoint]34git = "https://github.com/paritytech/substrate"35branch = "polkadot-v0.9.22"3637[dependencies.sc-basic-authorship]38git = "https://github.com/paritytech/substrate"39branch = "polkadot-v0.9.22"4041[dependencies.sc-chain-spec]42git = "https://github.com/paritytech/substrate"43branch = "polkadot-v0.9.22"4445[dependencies.sc-cli]46features = ['wasmtime']47git = "https://github.com/paritytech/substrate"48branch = "polkadot-v0.9.22"4950[dependencies.sc-client-api]51git = "https://github.com/paritytech/substrate"52branch = "polkadot-v0.9.22"5354[dependencies.sc-consensus]55git = "https://github.com/paritytech/substrate"56branch = "polkadot-v0.9.22"5758[dependencies.sc-consensus-aura]59git = "https://github.com/paritytech/substrate"60branch = "polkadot-v0.9.22"6162[dependencies.sc-executor]63features = ['wasmtime']64git = "https://github.com/paritytech/substrate"65branch = "polkadot-v0.9.22"6667[dependencies.sc-finality-grandpa]68git = "https://github.com/paritytech/substrate"69branch = "polkadot-v0.9.22"7071[dependencies.sc-keystore]72git = "https://github.com/paritytech/substrate"73branch = "polkadot-v0.9.22"7475[dependencies.sc-rpc]76git = "https://github.com/paritytech/substrate"77branch = "polkadot-v0.9.22"7879[dependencies.sc-rpc-api]80git = "https://github.com/paritytech/substrate"81branch = "polkadot-v0.9.22"8283[dependencies.sc-service]84features = ['wasmtime']85git = "https://github.com/paritytech/substrate"86branch = "polkadot-v0.9.22"8788[dependencies.sc-telemetry]89git = "https://github.com/paritytech/substrate"90branch = "polkadot-v0.9.22"9192[dependencies.sc-transaction-pool]93git = "https://github.com/paritytech/substrate"94branch = "polkadot-v0.9.22"9596[dependencies.sc-tracing]97git = "https://github.com/paritytech/substrate"98branch = "polkadot-v0.9.22"99100[dependencies.sc-sysinfo]101git = "https://github.com/paritytech/substrate"102branch = "polkadot-v0.9.22"103104[dependencies.sp-block-builder]105git = "https://github.com/paritytech/substrate"106branch = "polkadot-v0.9.22"107108[dependencies.sp-api]109git = "https://github.com/paritytech/substrate"110branch = "polkadot-v0.9.22"111112[dependencies.sp-blockchain]113git = "https://github.com/paritytech/substrate"114branch = "polkadot-v0.9.22"115116[dependencies.sp-consensus]117git = "https://github.com/paritytech/substrate"118branch = "polkadot-v0.9.22"119120[dependencies.sp-consensus-aura]121git = "https://github.com/paritytech/substrate"122branch = "polkadot-v0.9.22"123124[dependencies.sp-core]125git = "https://github.com/paritytech/substrate"126branch = "polkadot-v0.9.22"127128[dependencies.sp-finality-grandpa]129git = "https://github.com/paritytech/substrate"130branch = "polkadot-v0.9.22"131132[dependencies.sp-inherents]133git = "https://github.com/paritytech/substrate"134branch = "polkadot-v0.9.22"135136[dependencies.sp-keystore]137git = "https://github.com/paritytech/substrate"138branch = "polkadot-v0.9.22"139140[dependencies.sp-offchain]141git = "https://github.com/paritytech/substrate"142branch = "polkadot-v0.9.22"143144[dependencies.sp-runtime]145git = "https://github.com/paritytech/substrate"146branch = "polkadot-v0.9.22"147148[dependencies.sp-session]149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.22"151152[dependencies.sp-timestamp]153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.22"155156[dependencies.sp-transaction-pool]157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.22"159160[dependencies.sp-trie]161git = "https://github.com/paritytech/substrate"162branch = "polkadot-v0.9.22"163164[dependencies.substrate-frame-rpc-system]165git = "https://github.com/paritytech/substrate"166branch = "polkadot-v0.9.22"167168[dependencies.sc-network]169git = "https://github.com/paritytech/substrate"170branch = "polkadot-v0.9.22"171172[dependencies.serde]173features = ['derive']174version = '1.0.130'175176[dependencies.serde_json]177version = '1.0.68'178179[dependencies.sc-consensus-manual-seal]180git = "https://github.com/paritytech/substrate"181branch = "polkadot-v0.9.22"182183################################################################################184# Cumulus dependencies185186[dependencies.cumulus-client-consensus-aura]187git = "https://github.com/paritytech/cumulus"188branch = "polkadot-v0.9.22"189190[dependencies.cumulus-client-consensus-common]191git = "https://github.com/paritytech/cumulus"192branch = "polkadot-v0.9.22"193194[dependencies.cumulus-client-collator]195git = "https://github.com/paritytech/cumulus"196branch = "polkadot-v0.9.22"197198[dependencies.cumulus-client-cli]199git = "https://github.com/paritytech/cumulus"200branch = "polkadot-v0.9.22"201202[dependencies.cumulus-client-network]203git = "https://github.com/paritytech/cumulus"204branch = "polkadot-v0.9.22"205206[dependencies.cumulus-primitives-core]207git = "https://github.com/paritytech/cumulus"208branch = "polkadot-v0.9.22"209210[dependencies.cumulus-primitives-parachain-inherent]211git = "https://github.com/paritytech/cumulus"212branch = "polkadot-v0.9.22"213214[dependencies.cumulus-client-service]215git = "https://github.com/paritytech/cumulus"216branch = "polkadot-v0.9.22"217218[dependencies.cumulus-relay-chain-interface]219git = "https://github.com/paritytech/cumulus"220branch = "polkadot-v0.9.22"221222[dependencies.cumulus-relay-chain-inprocess-interface]223git = "https://github.com/paritytech/cumulus"224branch = "polkadot-v0.9.22"225226[dependencies.cumulus-relay-chain-rpc-interface]227git = "https://github.com/paritytech/cumulus"228branch = "polkadot-v0.9.22"229230################################################################################231# Polkadot dependencies232[dependencies.polkadot-primitives]233git = "https://github.com/paritytech/polkadot"234branch = "release-v0.9.22"235236[dependencies.polkadot-service]237git = "https://github.com/paritytech/polkadot"238branch = "release-v0.9.22"239240[dependencies.polkadot-cli]241git = "https://github.com/paritytech/polkadot"242branch = "release-v0.9.22"243244[dependencies.polkadot-test-service]245git = "https://github.com/paritytech/polkadot"246branch = "release-v0.9.22"247248[dependencies.polkadot-parachain]249git = "https://github.com/paritytech/polkadot"250branch = "release-v0.9.22"251252253################################################################################254# Local dependencies255256[dependencies.unique-runtime-common]257default-features = false258path = "../../runtime/common"259260[dependencies.unique-runtime]261path = '../../runtime/unique'262optional = true263264[dependencies.quartz-runtime]265path = '../../runtime/quartz'266optional = true267268[dependencies.opal-runtime]269path = '../../runtime/opal'270271[dependencies.up-data-structs]272path = "../../primitives/data-structs"273default-features = false274275[dependencies.up-rpc]276path = "../../primitives/rpc"277278[dependencies.pallet-transaction-payment-rpc-runtime-api]279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.22"281282################################################################################283# Package284285[package]286authors = ['Unique Network <support@uniquenetwork.io>']287build = 'build.rs'288description = 'Unique Node'289edition = '2021'290homepage = 'https://unique.network'291license = 'GPLv3'292name = 'unique-node'293repository = 'https://github.com/UniqueNetwork/unique-chain'294version = '0.9.22'295296[[bin]]297name = 'unique-collator'298path = "src/main.rs"299300[package.metadata.docs.rs]301targets = ['x86_64-unknown-linux-gnu']302303[dependencies]304futures = '0.3.17'305log = '0.4.14'306flexi_logger = "0.15.7"307parking_lot = '0.11.2'308clap = "3.1.2"309jsonrpsee = { version = "0.13.0", features = ["server", "macros"] }310tokio = { version = "1.17.0", features = ["time"] }311312fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }313fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }314fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }315fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }316fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }317fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }318pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }319320unique-rpc = { default-features = false, path = "../rpc" }321rmrk-rpc = { path = "../../primitives/rmrk-rpc" }322323[features]324default = []325runtime-benchmarks = [326 'unique-runtime?/runtime-benchmarks',327 'quartz-runtime?/runtime-benchmarks',328 'opal-runtime/runtime-benchmarks',329 'polkadot-service/runtime-benchmarks',330]331try-runtime = []node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -26,13 +26,13 @@
use unique_runtime_common::types::*;
#[cfg(feature = "unique-runtime")]
-use unique_runtime as default_runtime;
+pub use unique_runtime as default_runtime;
#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
-use quartz_runtime as default_runtime;
+pub use quartz_runtime as default_runtime;
#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
-use opal_runtime as default_runtime;
+pub use opal_runtime as default_runtime;
/// The `ChainSpec` parameterized for the unique runtime.
#[cfg(feature = "unique-runtime")]
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -33,7 +33,7 @@
// limitations under the License.
use crate::{
- chain_spec::{self, RuntimeId, RuntimeIdentification, ServiceId, ServiceIdentification},
+ chain_spec::{self, RuntimeId, RuntimeIdentification, ServiceId, ServiceIdentification, default_runtime},
cli::{Cli, RelayChainCli, Subcommand},
service::{new_partial, start_node, start_dev_node},
};
@@ -44,7 +44,7 @@
#[cfg(feature = "quartz-runtime")]
use crate::service::QuartzRuntimeExecutor;
-use crate::service::OpalRuntimeExecutor;
+use crate::service::{OpalRuntimeExecutor, DefaultRuntimeExecutor};
use codec::Encode;
use cumulus_primitives_core::ParaId;
@@ -372,7 +372,6 @@
Ok(())
}
- #[cfg(feature = "unique-runtime")]
Some(Subcommand::Benchmark(cmd)) => {
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
let runner = cli.create_runner(cmd)?;
@@ -380,7 +379,7 @@
match cmd {
BenchmarkCmd::Pallet(cmd) => {
if cfg!(feature = "runtime-benchmarks") {
- runner.sync_run(|config| cmd.run::<Block, UniqueRuntimeExecutor>(config))
+ runner.sync_run(|config| cmd.run::<Block, DefaultRuntimeExecutor>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
@@ -389,16 +388,16 @@
}
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
let partials = new_partial::<
- unique_runtime::RuntimeApi,
- UniqueRuntimeExecutor,
+ default_runtime::RuntimeApi,
+ DefaultRuntimeExecutor,
_,
>(&config, crate::service::parachain_build_import_queue)?;
cmd.run(partials.client)
}),
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
let partials = new_partial::<
- unique_runtime::RuntimeApi,
- UniqueRuntimeExecutor,
+ default_runtime::RuntimeApi,
+ DefaultRuntimeExecutor,
_,
>(&config, crate::service::parachain_build_import_queue)?;
let db = partials.backend.expose_db();
@@ -411,10 +410,6 @@
}
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
}
- }
- #[cfg(not(feature = "unique-runtime"))]
- Some(Subcommand::Benchmark(..)) => {
- Err("benchmarking is only available with unique runtime enabled".into())
}
Some(Subcommand::TryRuntime(cmd)) => {
if cfg!(feature = "try-runtime") {
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -77,13 +77,21 @@
#[cfg(feature = "quartz-runtime")]
/// Quartz native executor instance.
-
pub struct QuartzRuntimeExecutor;
/// Opal native executor instance.
pub struct OpalRuntimeExecutor;
#[cfg(feature = "unique-runtime")]
+pub type DefaultRuntimeExecutor = UniqueRuntimeExecutor;
+
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+pub type DefaultRuntimeExecutor = QuartzRuntimeExecutor;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+pub type DefaultRuntimeExecutor = OpalRuntimeExecutor;
+
+#[cfg(feature = "unique-runtime")]
impl NativeExecutionDispatch for UniqueRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
pallets/proxy-rmrk-core/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/benchmarking.rs
+++ b/pallets/proxy-rmrk-core/src/benchmarking.rs
@@ -220,7 +220,6 @@
let b in 0..100;
let caller: T::AccountId = account("caller", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
create_max_collection::<T>(&caller)?;
let collection_id = 0;
@@ -381,7 +380,6 @@
add_basic_resource {
let caller: T::AccountId = account("caller", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
create_max_collection::<T>(&caller)?;
let collection_id = 0;
@@ -398,7 +396,6 @@
add_composable_resource {
let caller: T::AccountId = account("caller", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
create_max_collection::<T>(&caller)?;
let collection_id = 0;
@@ -415,7 +412,6 @@
add_slot_resource {
let caller: T::AccountId = account("caller", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
create_max_collection::<T>(&caller)?;
let collection_id = 0;
@@ -432,7 +428,6 @@
remove_resource {
let caller: T::AccountId = account("caller", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
create_max_collection::<T>(&caller)?;
let collection_id = 0;
@@ -448,7 +443,7 @@
resource
)?;
- let resource_id = 1;
+ let resource_id = 0;
}: _(
RawOrigin::Signed(caller),
collection_id,
@@ -460,8 +455,6 @@
let caller: T::AccountId = account("caller", 0, SEED);
let admin: T::AccountId = account("admin", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&admin, T::CollectionCreationPrice::get());
-
create_max_collection::<T>(&admin)?;
let collection_id = 0;
@@ -486,7 +479,7 @@
resource
)?;
- let resource_id = 1;
+ let resource_id = 0;
}: _(
RawOrigin::Signed(caller),
collection_id,
@@ -498,8 +491,6 @@
let caller: T::AccountId = account("caller", 0, SEED);
let admin: T::AccountId = account("admin", 0, SEED);
- <T as pallet_common::Config>::Currency::deposit_creating(&admin, T::CollectionCreationPrice::get());
-
create_max_collection::<T>(&admin)?;
let collection_id = 0;
@@ -515,7 +506,7 @@
resource
)?;
- let resource_id = 1;
+ let resource_id = 0;
let new_owner = <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::AccountId(caller.clone());
pallets/proxy-rmrk-core/src/weights.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/weights.rs
+++ b/pallets/proxy-rmrk-core/src/weights.rs
@@ -3,7 +3,7 @@
//! Autogenerated weights for pallet_proxy_rmrk_core
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2022-06-14, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2022-06-16, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
@@ -19,7 +19,7 @@
// --template
// .maintain/frame-weight-template.hbs
// --steps=50
-// --repeat=200
+// --repeat=80
// --heap-pages=4096
// --output=./pallets/proxy-rmrk-core/src/weights.rs
@@ -64,7 +64,7 @@
// Storage: Common CollectionById (r:0 w:1)
// Storage: RmrkCore UniqueCollectionId (r:0 w:1)
fn create_collection() -> Weight {
- (41_277_000 as Weight)
+ (41_768_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
@@ -77,7 +77,7 @@
// Storage: Nonfungible TokensBurnt (r:0 w:1)
// Storage: Common AdminAmount (r:0 w:1)
fn destroy_collection() -> Weight {
- (43_371_000 as Weight)
+ (43_402_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -85,7 +85,7 @@
// Storage: Common CollectionById (r:1 w:1)
// Storage: Common CollectionProperties (r:1 w:0)
fn change_collection_issuer() -> Weight {
- (21_891_000 as Weight)
+ (21_711_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -95,7 +95,7 @@
// Storage: Nonfungible TokensMinted (r:1 w:0)
// Storage: Nonfungible TokensBurnt (r:1 w:0)
fn lock_collection() -> Weight {
- (23_144_000 as Weight)
+ (23_204_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -107,18 +107,15 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:2 w:2)
fn mint_nft(b: u32, ) -> Weight {
- (68_329_000 as Weight)
- // Standard Error: 3_000
- .saturating_add((21_470_000 as Weight).saturating_mul(b as Weight))
- .saturating_add(T::DbWeight::get().reads(12 as Weight))
+ (44_655_000 as Weight)
+ // Standard Error: 2_000
+ .saturating_add((10_953_000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
- .saturating_add(T::DbWeight::get().writes(12 as Weight))
- .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))
+ .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
@@ -132,8 +129,8 @@
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_nft(b: u32, ) -> Weight {
(0 as Weight)
- // Standard Error: 959_000
- .saturating_add((305_872_000 as Weight).saturating_mul(b as Weight))
+ // Standard Error: 3_677_000
+ .saturating_add((357_082_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
@@ -149,7 +146,7 @@
// Storage: Nonfungible TokenChildren (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:2)
fn send() -> Weight {
- (71_405_000 as Weight)
+ (73_968_000 as Weight)
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -163,22 +160,22 @@
// Storage: Nonfungible TokenChildren (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:2)
fn accept_nft() -> Weight {
- (79_159_000 as Weight)
+ (81_954_000 as Weight)
.saturating_add(T::DbWeight::get().reads(15 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
// Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:5)
// Storage: Nonfungible TokenProperties (r:1 w:5)
- // Storage: Nonfungible TokenData (r:5 w:5)
// Storage: Nonfungible TokenChildren (r:9 w:4)
// Storage: Nonfungible TokensBurnt (r:1 w:1)
// Storage: Nonfungible AccountBalance (r:5 w:5)
// Storage: Nonfungible Allowance (r:5 w:0)
// Storage: Nonfungible Owned (r:0 w:5)
fn reject_nft() -> Weight {
- (238_179_000 as Weight)
+ (250_041_000 as Weight)
.saturating_add(T::DbWeight::get().reads(29 as Weight))
.saturating_add(T::DbWeight::get().writes(25 as Weight))
}
@@ -188,7 +185,7 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:5 w:0)
fn set_property() -> Weight {
- (47_770_000 as Weight)
+ (48_631_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -198,100 +195,72 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:5 w:0)
fn set_priority() -> Weight {
- (46_679_000 as Weight)
+ (47_830_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_basic_resource() -> Weight {
- (100_770_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(16 as Weight))
- .saturating_add(T::DbWeight::get().writes(12 as Weight))
+ (54_773_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(10 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_composable_resource() -> Weight {
- (101_791_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(16 as Weight))
- .saturating_add(T::DbWeight::get().writes(12 as Weight))
+ (55_214_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(10 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_slot_resource() -> Weight {
- (101_610_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(16 as Weight))
- .saturating_add(T::DbWeight::get().writes(12 as Weight))
+ (54_863_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(10 as Weight))
+ .saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:2 w:0)
- // Storage: Common CollectionById (r:2 w:0)
- // Storage: Nonfungible TokenProperties (r:1 w:1)
- // Storage: Nonfungible TokenData (r:6 w:1)
- // Storage: Nonfungible TokenChildren (r:1 w:0)
- // Storage: Nonfungible TokensBurnt (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Allowance (r:1 w:0)
- // Storage: Nonfungible Owned (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
+ // Storage: Nonfungible TokenData (r:5 w:0)
fn remove_resource() -> Weight {
- (80_571_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(16 as Weight))
- .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ (46_848_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(9 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
// Storage: Common CollectionById (r:1 w:0)
// Storage: Nonfungible TokenData (r:5 w:0)
- // Storage: Nonfungible TokenProperties (r:2 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn accept_resource() -> Weight {
- (54_733_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(10 as Weight))
+ (45_635_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:2 w:0)
- // Storage: Common CollectionById (r:2 w:0)
- // Storage: Nonfungible TokenData (r:6 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:1)
- // Storage: Nonfungible TokenChildren (r:1 w:0)
- // Storage: Nonfungible TokensBurnt (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Allowance (r:1 w:0)
- // Storage: Nonfungible Owned (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn accept_resource_removal() -> Weight {
- (84_138_000 as Weight)
- .saturating_add(T::DbWeight::get().reads(17 as Weight))
- .saturating_add(T::DbWeight::get().writes(5 as Weight))
+ (45_535_000 as Weight)
+ .saturating_add(T::DbWeight::get().reads(9 as Weight))
+ .saturating_add(T::DbWeight::get().writes(1 as Weight))
}
}
@@ -306,7 +275,7 @@
// Storage: Common CollectionById (r:0 w:1)
// Storage: RmrkCore UniqueCollectionId (r:0 w:1)
fn create_collection() -> Weight {
- (41_277_000 as Weight)
+ (41_768_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
}
@@ -319,7 +288,7 @@
// Storage: Nonfungible TokensBurnt (r:0 w:1)
// Storage: Common AdminAmount (r:0 w:1)
fn destroy_collection() -> Weight {
- (43_371_000 as Weight)
+ (43_402_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
@@ -327,7 +296,7 @@
// Storage: Common CollectionById (r:1 w:1)
// Storage: Common CollectionProperties (r:1 w:0)
fn change_collection_issuer() -> Weight {
- (21_891_000 as Weight)
+ (21_711_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -337,7 +306,7 @@
// Storage: Nonfungible TokensMinted (r:1 w:0)
// Storage: Nonfungible TokensBurnt (r:1 w:0)
fn lock_collection() -> Weight {
- (23_144_000 as Weight)
+ (23_204_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -349,18 +318,15 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:2 w:2)
fn mint_nft(b: u32, ) -> Weight {
- (68_329_000 as Weight)
- // Standard Error: 3_000
- .saturating_add((21_470_000 as Weight).saturating_mul(b as Weight))
- .saturating_add(RocksDbWeight::get().reads(12 as Weight))
+ (44_655_000 as Weight)
+ // Standard Error: 2_000
+ .saturating_add((10_953_000 as Weight).saturating_mul(b as Weight))
+ .saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
- .saturating_add(RocksDbWeight::get().writes(12 as Weight))
- .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))
+ .saturating_add(RocksDbWeight::get().writes(5 as Weight))
+ .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
@@ -374,8 +340,8 @@
// Storage: Nonfungible TokenProperties (r:0 w:1)
fn burn_nft(b: u32, ) -> Weight {
(0 as Weight)
- // Standard Error: 959_000
- .saturating_add((305_872_000 as Weight).saturating_mul(b as Weight))
+ // Standard Error: 3_677_000
+ .saturating_add((357_082_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().reads(9 as Weight))
.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
@@ -391,7 +357,7 @@
// Storage: Nonfungible TokenChildren (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:2)
fn send() -> Weight {
- (71_405_000 as Weight)
+ (73_968_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(12 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
@@ -405,22 +371,22 @@
// Storage: Nonfungible TokenChildren (r:0 w:1)
// Storage: Nonfungible Owned (r:0 w:2)
fn accept_nft() -> Weight {
- (79_159_000 as Weight)
+ (81_954_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(15 as Weight))
.saturating_add(RocksDbWeight::get().writes(7 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
// Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:5)
// Storage: Nonfungible TokenProperties (r:1 w:5)
- // Storage: Nonfungible TokenData (r:5 w:5)
// Storage: Nonfungible TokenChildren (r:9 w:4)
// Storage: Nonfungible TokensBurnt (r:1 w:1)
// Storage: Nonfungible AccountBalance (r:5 w:5)
// Storage: Nonfungible Allowance (r:5 w:0)
// Storage: Nonfungible Owned (r:0 w:5)
fn reject_nft() -> Weight {
- (238_179_000 as Weight)
+ (250_041_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(29 as Weight))
.saturating_add(RocksDbWeight::get().writes(25 as Weight))
}
@@ -430,7 +396,7 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:5 w:0)
fn set_property() -> Weight {
- (47_770_000 as Weight)
+ (48_631_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(9 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -440,99 +406,71 @@
// Storage: Nonfungible TokenProperties (r:1 w:1)
// Storage: Nonfungible TokenData (r:5 w:0)
fn set_priority() -> Weight {
- (46_679_000 as Weight)
+ (47_830_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(9 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_basic_resource() -> Weight {
- (100_770_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(16 as Weight))
- .saturating_add(RocksDbWeight::get().writes(12 as Weight))
+ (54_773_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(10 as Weight))
+ .saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_composable_resource() -> Weight {
- (101_791_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(16 as Weight))
- .saturating_add(RocksDbWeight::get().writes(12 as Weight))
+ (55_214_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(10 as Weight))
+ .saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:1 w:1)
- // Storage: Common CollectionById (r:1 w:1)
- // Storage: Nonfungible TokenData (r:5 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:2)
- // Storage: Common CreatedCollectionCount (r:1 w:1)
- // Storage: Common DestroyedCollectionCount (r:1 w:0)
- // Storage: System Account (r:2 w:2)
- // Storage: Nonfungible TokensMinted (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Owned (r:0 w:1)
- // Storage: Common CollectionPropertyPermissions (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenProperties (r:1 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn add_slot_resource() -> Weight {
- (101_610_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(16 as Weight))
- .saturating_add(RocksDbWeight::get().writes(12 as Weight))
+ (54_863_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(10 as Weight))
+ .saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:2 w:0)
- // Storage: Common CollectionById (r:2 w:0)
- // Storage: Nonfungible TokenProperties (r:1 w:1)
- // Storage: Nonfungible TokenData (r:6 w:1)
- // Storage: Nonfungible TokenChildren (r:1 w:0)
- // Storage: Nonfungible TokensBurnt (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Allowance (r:1 w:0)
- // Storage: Nonfungible Owned (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
+ // Storage: Nonfungible TokenData (r:5 w:0)
fn remove_resource() -> Weight {
- (80_571_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(16 as Weight))
- .saturating_add(RocksDbWeight::get().writes(5 as Weight))
+ (46_848_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(9 as Weight))
+ .saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
// Storage: Common CollectionProperties (r:1 w:0)
// Storage: Common CollectionById (r:1 w:0)
// Storage: Nonfungible TokenData (r:5 w:0)
- // Storage: Nonfungible TokenProperties (r:2 w:1)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn accept_resource() -> Weight {
- (54_733_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(10 as Weight))
+ (45_635_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(9 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: RmrkCore UniqueCollectionId (r:1 w:0)
- // Storage: Common CollectionProperties (r:2 w:0)
- // Storage: Common CollectionById (r:2 w:0)
- // Storage: Nonfungible TokenData (r:6 w:1)
- // Storage: Nonfungible TokenProperties (r:2 w:1)
- // Storage: Nonfungible TokenChildren (r:1 w:0)
- // Storage: Nonfungible TokensBurnt (r:1 w:1)
- // Storage: Nonfungible AccountBalance (r:1 w:1)
- // Storage: Nonfungible Allowance (r:1 w:0)
- // Storage: Nonfungible Owned (r:0 w:1)
+ // Storage: Common CollectionProperties (r:1 w:0)
+ // Storage: Common CollectionById (r:1 w:0)
+ // Storage: Nonfungible TokenData (r:5 w:0)
+ // Storage: Nonfungible TokenSysProperties (r:1 w:1)
fn accept_resource_removal() -> Weight {
- (84_138_000 as Weight)
- .saturating_add(RocksDbWeight::get().reads(17 as Weight))
- .saturating_add(RocksDbWeight::get().writes(5 as Weight))
+ (45_535_000 as Weight)
+ .saturating_add(RocksDbWeight::get().reads(9 as Weight))
+ .saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
}
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -454,6 +454,10 @@
list_benchmark!(list, extra, pallet_refungible, Refungible);
list_benchmark!(list, extra, pallet_nonfungible, Nonfungible);
list_benchmark!(list, extra, pallet_unique_scheduler, Scheduler);
+
+ #[cfg(not(feature = "unique-runtime"))]
+ list_benchmark!(list, extra, pallet_proxy_rmrk_core, RmrkCore);
+
// list_benchmark!(list, extra, pallet_evm_coder_substrate, EvmCoderSubstrate);
let storage_info = AllPalletsReversedWithSystemFirst::storage_info();
@@ -498,6 +502,10 @@
add_benchmark!(params, batches, pallet_refungible, Refungible);
add_benchmark!(params, batches, pallet_nonfungible, Nonfungible);
add_benchmark!(params, batches, pallet_unique_scheduler, Scheduler);
+
+ #[cfg(not(feature = "unique-runtime"))]
+ add_benchmark!(params, batches, pallet_proxy_rmrk_core, RmrkCore);
+
// add_benchmark!(params, batches, pallet_evm_coder_substrate, EvmCoderSubstrate);
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -16,7 +16,7 @@
targets = ['x86_64-unknown-linux-gnu']
[features]
-default = ['std']
+default = ['std', 'unique-runtime']
runtime-benchmarks = [
'hex-literal',
'frame-benchmarking',
@@ -119,6 +119,7 @@
"orml-vesting/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
+unique-runtime = []
################################################################################
# Substrate Dependencies