From e9127cdfbc8552ccd194f14bf1e8e41560b68b83 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 9 May 2023 12:27:53 +1200 Subject: [PATCH 001/101] feat: add nodle uniques which is going to extend on substrate uniques by allowing dynamic intrinsic value for NFTs We aim to cover all the main substrate uniques calls wrapped in our own Nodle uniques while keeping the name Uniques for this new module to minimize api change from client's point of view. --- Cargo.lock | 16 +++++ pallets/uniques/Cargo.toml | 32 ++++++++++ pallets/uniques/src/lib.rs | 99 +++++++++++++++++++++++++++++++ runtimes/eden/Cargo.toml | 3 + runtimes/eden/src/lib.rs | 7 ++- runtimes/eden/src/pallets_util.rs | 8 ++- 6 files changed, 161 insertions(+), 4 deletions(-) create mode 100644 pallets/uniques/Cargo.toml create mode 100644 pallets/uniques/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index e5aeb8775f5..f04deb00905 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6004,6 +6004,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-nodle-uniques" +version = "2.1.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-nomination-pools" version = "1.0.0" @@ -8813,6 +8828,7 @@ dependencies = [ "pallet-mandate", "pallet-membership", "pallet-multisig", + "pallet-nodle-uniques", "pallet-offences", "pallet-preimage", "pallet-reserve", diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml new file mode 100644 index 00000000000..5f51fcf8372 --- /dev/null +++ b/pallets/uniques/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "pallet-nodle-uniques" +version = "2.1.0" +authors = ["Eliott Teissonniere "] +edition = "2021" + +[features] +default = ["std"] +std = [ + "codec/std", + "serde", + "scale-info/std", + "frame-support/std", + "frame-system/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] +try-runtime = ["frame-support/try-runtime"] + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.152", optional = true, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = [ + "derive", +] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.40" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs new file mode 100644 index 00000000000..bdb23347fea --- /dev/null +++ b/pallets/uniques/src/lib.rs @@ -0,0 +1,99 @@ +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#![cfg_attr(not(feature = "std"), no_std)] + +//! Handle the ability to notify other pallets that they should stop all +//! operations, or resume them + +use frame_support::traits::nonfungibles::Inspect; +pub use pallet::*; +use sp_runtime::traits::StaticLookup; + +type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; +type CollectionIdOf = + <::NonFungible as Inspect<::AccountId>>::CollectionId; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use frame_support::{ + pallet_prelude::*, + traits::{ + tokens::nonfungibles::{Create, Destroy, InspectEnumerable, Mutate, Transfer}, + EnsureOriginWithArg, + }, + Parameter, + }; + use frame_system::pallet_prelude::*; + use sp_runtime::DispatchResult; + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Standard collection creation is only allowed if the origin attempting it and the + /// collection are in this set. + type CreateOrigin: EnsureOriginWithArg, Success = Self::AccountId>; + + type NonFungible: Mutate + + Transfer + + Create + + Destroy + + InspectEnumerable; + } + + #[pallet::pallet] + pub struct Pallet(PhantomData); + + #[pallet::hooks] + impl Hooks> for Pallet {} + + #[pallet::call] + impl Pallet + where + CollectionIdOf: Member + Parameter + MaxEncodedLen + Copy, + { + /// Issue a new collection of non-fungible items from a public origin. + /// + /// This new collection has no items initially and its owner is the origin. + /// + /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + /// + /// `ItemDeposit` funds of sender are reserved. + /// + /// Parameters: + /// - `collection`: The identifier of the new collection. This must not be currently in use. + /// - `admin`: The admin of this collection. The admin is the initial address of each + /// member of the collection's admin team. + /// + /// Emits `Created` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(0)] + #[pallet::weight(0)] + pub fn create( + origin: OriginFor, + collection: CollectionIdOf, + admin: AccountIdLookupOf, + ) -> DispatchResult { + let owner = T::CreateOrigin::ensure_origin(origin, &collection)?; + let admin = T::Lookup::lookup(admin)?; + + >::create_collection(&collection, &owner, &admin) + } + } +} diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index b339344573b..fd05c26e1ad 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -24,6 +24,7 @@ std = [ "pallet-mandate/std", "pallet-membership/std", "pallet-multisig/std", + "pallet-nodle-uniques/std", "pallet-offences/std", "pallet-insecure-randomness-collective-flip/std", "pallet-reserve/std", @@ -118,6 +119,7 @@ try-runtime = [ "pallet-mandate/try-runtime", "pallet-membership/try-runtime", "pallet-multisig/try-runtime", + "pallet-nodle-uniques/try-runtime", "pallet-offences/try-runtime", "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-reserve/try-runtime", @@ -222,6 +224,7 @@ pallet-allocations = { default-features = false, path = "../../pallets/allocatio pallet-reserve = { default-features = false, path = "../../pallets/reserve" } pallet-grants = { default-features = false, path = "../../pallets/grants" } pallet-mandate = { default-features = false, path = "../../pallets/mandate" } +pallet-nodle-uniques = { default-features = false, path = "../../pallets/uniques" } orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.40", default-features = false } orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.40", default-features = false } [build-dependencies] diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 74112a2ab0d..67a4d1ffc78 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -110,8 +110,9 @@ construct_runtime! { // Neat things Utility: pallet_utility = 40, Multisig: pallet_multisig = 41, - Uniques: pallet_uniques = 42, + SubstrateUniques: pallet_uniques::{Pallet, Storage, Event} = 42, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 43, + Uniques: pallet_nodle_uniques = 44, // Nodle Stack // EmergencyShutdown: pallet_emergency_shutdown = 50, @@ -359,7 +360,7 @@ sp_api::impl_runtime_apis! { list_benchmark!(list, extra, pallet_multisig, Multisig); list_benchmark!(list, extra, pallet_reserve, CompanyReserve); list_benchmark!(list, extra, pallet_grants, Vesting); - list_benchmark!(list, extra, pallet_uniques, Uniques); + list_benchmark!(list, extra, pallet_uniques, SubstrateUniques); list_benchmark!(list, extra, pallet_utility, Utility); list_benchmark!(list, extra, pallet_allocations, Allocations); list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection); @@ -400,7 +401,7 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, pallet_multisig, Multisig); add_benchmark!(params, batches, pallet_reserve, CompanyReserve); add_benchmark!(params, batches, pallet_grants, Vesting); - add_benchmark!(params, batches, pallet_uniques, Uniques); + add_benchmark!(params, batches, pallet_uniques, SubstrateUniques); add_benchmark!(params, batches, pallet_utility, Utility); add_benchmark!(params, batches, pallet_allocations, Allocations); add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection); diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 056362b1678..30580ca4226 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -19,7 +19,8 @@ use crate::{ constants, implementations::RelayChainBlockNumberProvider, pallets_governance::MoreThanHalfOfTechComm, Balances, - OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Timestamp, + OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + SubstrateUniques, Timestamp, }; use frame_support::{ parameter_types, @@ -137,6 +138,11 @@ impl pallet_uniques::Config for Runtime { type Locker = (); } +impl pallet_nodle_uniques::Config for Runtime { + type CreateOrigin = ::CreateOrigin; + type NonFungible = SubstrateUniques; +} + parameter_types! { pub const DepositPerItem: Balance = constants::deposit(1, 0); pub const DepositPerByte: Balance = constants::deposit(0, 1); From 6b04886a50a44a32a844edbf4ff99af97bb34f12 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 10 May 2023 14:42:36 +1200 Subject: [PATCH 002/101] feat: couple nodle uniques with substrate uniques (intentionally) so we can easily implement light wraps of all the calls while extending that pallet --- Cargo.lock | 1 + pallets/uniques/Cargo.toml | 7 +++++- pallets/uniques/src/lib.rs | 36 +++++-------------------------- runtimes/eden/src/pallets_util.rs | 5 +---- 4 files changed, 13 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f04deb00905..844abb982a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6011,6 +6011,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "pallet-uniques", "parity-scale-codec", "scale-info", "serde", diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 5f51fcf8372..11d7b1fc02c 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -15,8 +15,12 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-std/std", + "pallet-uniques/std", +] +try-runtime = [ + "frame-support/try-runtime", + "pallet-uniques/try-runtime" ] -try-runtime = ["frame-support/try-runtime"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -30,3 +34,4 @@ frame-system = { git = "https://github.com/paritytech/substrate", default-featur sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index bdb23347fea..eaea8176b1c 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -21,40 +21,20 @@ //! Handle the ability to notify other pallets that they should stop all //! operations, or resume them -use frame_support::traits::nonfungibles::Inspect; pub use pallet::*; use sp_runtime::traits::StaticLookup; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; -type CollectionIdOf = - <::NonFungible as Inspect<::AccountId>>::CollectionId; #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::{ - pallet_prelude::*, - traits::{ - tokens::nonfungibles::{Create, Destroy, InspectEnumerable, Mutate, Transfer}, - EnsureOriginWithArg, - }, - Parameter, - }; + use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use sp_runtime::DispatchResult; #[pallet::config] - pub trait Config: frame_system::Config { - /// Standard collection creation is only allowed if the origin attempting it and the - /// collection are in this set. - type CreateOrigin: EnsureOriginWithArg, Success = Self::AccountId>; - - type NonFungible: Mutate - + Transfer - + Create - + Destroy - + InspectEnumerable; - } + pub trait Config: frame_system::Config + pallet_uniques::Config {} #[pallet::pallet] pub struct Pallet(PhantomData); @@ -63,10 +43,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::call] - impl Pallet - where - CollectionIdOf: Member + Parameter + MaxEncodedLen + Copy, - { + impl Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -87,13 +64,10 @@ pub mod pallet { #[pallet::weight(0)] pub fn create( origin: OriginFor, - collection: CollectionIdOf, + collection: T::CollectionId, admin: AccountIdLookupOf, ) -> DispatchResult { - let owner = T::CreateOrigin::ensure_origin(origin, &collection)?; - let admin = T::Lookup::lookup(admin)?; - - >::create_collection(&collection, &owner, &admin) + pallet_uniques::Pallet::::create(origin, collection, admin) } } } diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 30580ca4226..9d3bc4ea8c1 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -138,10 +138,7 @@ impl pallet_uniques::Config for Runtime { type Locker = (); } -impl pallet_nodle_uniques::Config for Runtime { - type CreateOrigin = ::CreateOrigin; - type NonFungible = SubstrateUniques; -} +impl pallet_nodle_uniques::Config for Runtime {} parameter_types! { pub const DepositPerItem: Balance = constants::deposit(1, 0); From 24381ebfbfc8102a26f93eaa630c3abad7faaa31 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 10 May 2023 15:03:21 +1200 Subject: [PATCH 003/101] fix: remove unused SubstrateUniques --- runtimes/eden/src/pallets_util.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 9d3bc4ea8c1..2aca450ea90 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -19,8 +19,7 @@ use crate::{ constants, implementations::RelayChainBlockNumberProvider, pallets_governance::MoreThanHalfOfTechComm, Balances, - OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - SubstrateUniques, Timestamp, + OriginCaller, Preimage, RandomnessCollectiveFlip, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, Timestamp, }; use frame_support::{ parameter_types, From 02e52f041260404c245c5820d0de95226b511847 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 22 May 2023 15:26:56 +0900 Subject: [PATCH 004/101] Update --- Cargo.lock | 1472 +++++++++++++++++++++++++++++----------------------- 1 file changed, 813 insertions(+), 659 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 844abb982a2..8f1a8fed279 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -51,18 +51,18 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", ] [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -115,11 +115,11 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ - "aead 0.5.1", + "aead 0.5.2", "aes 0.8.2", "cipher 0.4.4", "ctr 0.9.2", @@ -153,7 +153,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -165,7 +165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -179,11 +179,20 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + [[package]] name = "always-assert" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11" +checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" [[package]] name = "android_system_properties" @@ -203,11 +212,60 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "approx" @@ -232,15 +290,15 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "array-bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f72e9d6fac4bc80778ea470b20197b88d28c292bb7d60c3fb099280003cd19" +checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -267,7 +325,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -283,7 +341,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -323,9 +381,9 @@ dependencies = [ [[package]] name = "asn1_der" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" [[package]] name = "assert_matches" @@ -346,22 +404,22 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.19", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] @@ -375,13 +433,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.66" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -399,9 +457,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atty" @@ -430,7 +488,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.6.2", "object 0.30.3", "rustc-demangle", ] @@ -461,9 +519,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" [[package]] name = "base64ct" @@ -483,7 +541,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -542,7 +600,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -578,7 +636,7 @@ dependencies = [ "cc", "cfg-if", "constant_time_eq", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -599,7 +657,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -608,7 +666,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -638,9 +696,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bounded-collections" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" +checksum = "07fbd1d11282a1eb134d3c3b7cf8ce213b5161c6e5f73fb1b98618482c606b64" dependencies = [ "log", "parity-scale-codec", @@ -665,9 +723,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "serde", @@ -684,9 +742,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" [[package]] name = "byte-slice-cast" @@ -870,7 +928,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -879,7 +937,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -903,9 +961,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -914,40 +972,45 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "coarsetime" @@ -971,6 +1034,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "comfy-table" version = "6.1.4" @@ -984,9 +1053,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] @@ -1021,9 +1090,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core2" @@ -1055,27 +1124,27 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a" +checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b" +checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" dependencies = [ "arrayvec 0.7.2", "bumpalo", @@ -1094,33 +1163,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239" +checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d" +checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" [[package]] name = "cranelift-entity" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705" +checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b66bf9e916f57fbbd0f7703ec6286f4624866bf45000111627c70d272c8dda1" +checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" dependencies = [ "cranelift-codegen", "log", @@ -1130,15 +1199,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358" +checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" [[package]] name = "cranelift-native" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937e021e089c51f9749d09e7ad1c4f255c2f8686cb8c3df63a34b3ec9921bc41" +checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" dependencies = [ "cranelift-codegen", "libc", @@ -1147,9 +1216,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.1" +version = "0.93.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d850cf6775477747c9dfda9ae23355dd70512ffebc70cf82b85a5b111ae668b5" +checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1187,9 +1256,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1250,7 +1319,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1262,7 +1331,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "typenum", ] @@ -1273,7 +1342,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1283,7 +1352,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1706,7 +1775,7 @@ name = "cumulus-relay-chain-minimal-node" version = "0.1.0" source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.40#e05c8d7f71734ed71188337c6cb0d30715f6320f" dependencies = [ - "array-bytes 6.0.0", + "array-bytes 6.1.0", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1820,9 +1889,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -1832,9 +1901,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -1842,24 +1911,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] name = "cxxbridge-flags" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -1899,15 +1968,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "data-encoding-macro" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -1915,9 +1984,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" dependencies = [ "data-encoding", "syn 1.0.109", @@ -2049,14 +2118,14 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -2106,13 +2175,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -2224,9 +2293,9 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.6", + "digest 0.10.7", "ff", - "generic-array 0.14.6", + "generic-array 0.14.7", "group", "hkdf", "pem-rfc7468", @@ -2266,18 +2335,18 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.16", ] [[package]] name = "enumn" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1940ea32e14d489b401074558be4567f35ca9507c4628b4b3fd6fe6eb2ca7b88" +checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -2301,13 +2370,13 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2440,9 +2509,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ace6ec7cc19c8ed33a32eaa9ea692d7faea05006b5356b9e2b668ec4bc3955" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" [[package]] name = "file-per-thread-logger" @@ -2456,21 +2525,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] name = "finality-grandpa" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24e6c429951433ccb7c87fd528c60084834dcd14763182c1f83291bcde24c34" +checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", "futures", @@ -2502,13 +2571,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] @@ -2529,7 +2598,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", ] @@ -2552,7 +2621,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-support-procedural", @@ -2577,7 +2646,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -2624,7 +2693,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2635,7 +2704,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2652,7 +2721,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -2668,9 +2737,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", "parity-scale-codec", @@ -2681,7 +2750,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "log", @@ -2697,7 +2766,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags", "environmental", @@ -2730,7 +2799,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "cfg-expr", @@ -2745,7 +2814,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2757,7 +2826,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -2767,7 +2836,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "log", @@ -2785,7 +2854,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -2800,7 +2869,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -2809,7 +2878,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "parity-scale-codec", @@ -2836,13 +2905,12 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" +checksum = "a7f5b6908aecca5812a4569056285e58c666588c9573ee59765bf1d3692699e2" dependencies = [ - "libc", - "rustix 0.35.13", - "winapi", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -2853,9 +2921,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -2868,9 +2936,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -2878,15 +2946,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -2896,15 +2964,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -2917,13 +2985,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -2939,15 +3007,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -2957,9 +3025,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -2993,9 +3061,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -3024,9 +3092,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "js-sys", @@ -3084,7 +3152,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "bstr", "fnv", "log", @@ -3123,9 +3191,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.6" +version = "4.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035ef95d03713f2c347a72547b7cd38cbc9af7cd51e6099fb62d586d4a6dee3a" +checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" dependencies = [ "log", "pest", @@ -3245,7 +3313,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -3255,7 +3323,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3318,9 +3386,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -3357,26 +3425,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.48.0", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -3418,9 +3485,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7abdbb86e485125dad06c2691e1e393bf3b08c7b743b43aa162a00fd39062e" +checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" dependencies = [ "async-io", "core-foundation", @@ -3432,7 +3499,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.34.0", ] [[package]] @@ -3466,9 +3533,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3487,7 +3554,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3535,18 +3602,13 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - -[[package]] -name = "io-lifetimes" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3569,20 +3631,20 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.6", - "rustix 0.36.9", - "windows-sys 0.45.0", + "io-lifetimes", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -3611,9 +3673,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" dependencies = [ "wasm-bindgen", ] @@ -3756,9 +3818,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -3925,9 +3987,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "libloading" @@ -3947,9 +4009,9 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "libm" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libp2p" @@ -3960,7 +4022,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.8", + "getrandom 0.2.9", "instant", "libp2p-core 0.38.0", "libp2p-dns", @@ -4021,9 +4083,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", @@ -4032,7 +4094,7 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr 0.17.0", + "multiaddr 0.17.1", "multihash 0.17.0", "multistream-select", "once_cell", @@ -4084,19 +4146,18 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6c9cb71e2333d31f18e7556b9a5f1d0a2e013effc9325e36f436be65fe7bd2" +checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" dependencies = [ "bs58", "ed25519-dalek", "log", - "multiaddr 0.17.0", + "multiaddr 0.17.1", "multihash 0.17.0", - "prost", - "prost-build", "quick-protobuf", "rand 0.8.5", + "sha2 0.10.6", "thiserror", "zeroize", ] @@ -4316,7 +4377,7 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.1", + "libp2p-core 0.39.2", "libp2p-identity", "rcgen 0.10.0", "ring", @@ -4470,9 +4531,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" dependencies = [ "cc", "pkg-config", @@ -4514,15 +4575,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.0.46" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "lock_api" @@ -4622,10 +4683,11 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" dependencies = [ + "autocfg", "rawpointer", ] @@ -4635,7 +4697,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -4646,11 +4708,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.36.9", + "rustix 0.37.19", ] [[package]] @@ -4733,6 +4795,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" version = "0.8.6" @@ -4748,7 +4819,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "log", @@ -4767,7 +4838,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "anyhow", "jsonrpsee", @@ -4782,9 +4853,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if", "downcast", @@ -4797,9 +4868,9 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if", "proc-macro2", @@ -4827,13 +4898,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", "byteorder", "data-encoding", + "log", "multibase", "multihash 0.17.0", "percent-encoding", @@ -4864,7 +4936,7 @@ dependencies = [ "blake2s_simd", "blake3", "core2", - "digest 0.10.6", + "digest 0.10.7", "multihash-derive", "sha2 0.10.6", "sha3", @@ -4878,9 +4950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "core2", - "digest 0.10.6", "multihash-derive", - "sha2 0.10.6", "unsigned-varint", ] @@ -5372,12 +5442,6 @@ dependencies = [ "xcm-executor", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "p256" version = "0.11.1" @@ -5436,7 +5500,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5452,7 +5516,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5468,7 +5532,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5482,7 +5546,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5506,7 +5570,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5526,7 +5590,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5541,7 +5605,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5560,7 +5624,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -5584,7 +5648,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5602,7 +5666,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5640,7 +5704,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5657,7 +5721,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags", "environmental", @@ -5687,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bitflags", "parity-scale-codec", @@ -5700,7 +5764,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -5710,7 +5774,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5727,7 +5791,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5745,7 +5809,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5768,7 +5832,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5781,7 +5845,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5799,7 +5863,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5817,7 +5881,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5859,7 +5923,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5875,7 +5939,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5895,7 +5959,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5912,7 +5976,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -5941,7 +6005,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5958,7 +6022,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5975,7 +6039,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -5991,7 +6055,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6023,7 +6087,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6040,7 +6104,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6060,7 +6124,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6071,7 +6135,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6088,7 +6152,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6112,7 +6176,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6129,7 +6193,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6144,7 +6208,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6162,7 +6226,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6177,7 +6241,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6214,7 +6278,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6231,7 +6295,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6252,7 +6316,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6268,7 +6332,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6282,7 +6346,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6305,7 +6369,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6316,7 +6380,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sp-arithmetic", @@ -6325,7 +6389,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -6334,7 +6398,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6351,7 +6415,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6365,7 +6429,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6383,7 +6447,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6402,7 +6466,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-support", "frame-system", @@ -6418,7 +6482,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6434,7 +6498,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6446,7 +6510,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6463,7 +6527,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6478,7 +6542,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6494,7 +6558,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6509,7 +6573,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6575,9 +6639,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.4" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df89dd8311063c54ae4e03d9aeb597b04212a57e82c339344130a9cad9b3e2d9" +checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" dependencies = [ "blake2", "crc32fast", @@ -6595,9 +6659,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" +checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -6634,9 +6698,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "parking_lot" @@ -6668,7 +6732,7 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] @@ -6681,7 +6745,7 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] @@ -6707,7 +6771,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -6742,9 +6806,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" dependencies = [ "thiserror", "ucd-trie", @@ -6752,9 +6816,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" dependencies = [ "pest", "pest_generator", @@ -6762,22 +6826,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] name = "pest_meta" -version = "2.5.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" dependencies = [ "once_cell", "pest", @@ -6796,22 +6860,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -6844,9 +6908,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" @@ -7987,9 +8051,9 @@ dependencies = [ [[package]] name = "polling" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags", @@ -7998,7 +8062,7 @@ dependencies = [ "libc", "log", "pin-project-lite 0.2.9", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -8033,7 +8097,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.0", + "universal-hash 0.5.1", ] [[package]] @@ -8167,9 +8231,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] @@ -8213,9 +8277,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", "prost-derive", @@ -8223,9 +8287,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c828f93f5ca4826f97fedcbd3f9a536c16b12cff3dbbb4a007f932bbad95b12" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", @@ -8258,9 +8322,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", @@ -8271,9 +8335,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ "prost", ] @@ -8315,9 +8379,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", "rand 0.8.5", @@ -8333,9 +8397,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -8405,7 +8469,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -8462,7 +8526,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.20", + "time 0.3.21", "x509-parser 0.13.2", "yasna", ] @@ -8475,7 +8539,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.20", + "time 0.3.21", "yasna", ] @@ -8488,14 +8552,23 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall", + "getrandom 0.2.9", + "redox_syscall 0.2.16", "thiserror", ] @@ -8514,22 +8587,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9af2cf09ef80e610097515e80095b7f76660a92743c4185aff5406cd5ce3dd5" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c501201393982e275433bc55de7d6ae6f00e7699cd5572c5b57581cd69c881b" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -8546,13 +8619,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", - "regex-syntax", + "regex-syntax 0.7.1", ] [[package]] @@ -8561,14 +8634,20 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "region" @@ -8808,7 +8887,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "getrandom 0.2.8", + "getrandom 0.2.9", "hex-literal", "lazy_static", "log", @@ -8877,9 +8956,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -8922,30 +9001,30 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.13" +version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" +checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.7.5", + "io-lifetimes", "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] name = "rustix" -version = "0.36.9" +version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ "bitflags", "errno", - "io-lifetimes 1.0.6", + "io-lifetimes", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", ] [[package]] @@ -8991,7 +9070,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.0", + "base64 0.21.1", ] [[package]] @@ -9047,7 +9126,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sp-core", @@ -9058,7 +9137,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -9086,7 +9165,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "futures-timer", @@ -9109,7 +9188,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9124,7 +9203,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9143,7 +9222,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9154,7 +9233,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -9194,7 +9273,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fnv", "futures", @@ -9220,7 +9299,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "kvdb", @@ -9246,7 +9325,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -9271,7 +9350,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -9300,7 +9379,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "fork-tree", @@ -9339,7 +9418,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "jsonrpsee", @@ -9361,7 +9440,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9396,7 +9475,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "jsonrpsee", @@ -9415,7 +9494,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9428,7 +9507,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -9468,7 +9547,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "finality-grandpa", "futures", @@ -9488,7 +9567,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -9511,7 +9590,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -9535,7 +9614,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9548,7 +9627,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "sc-allocator", @@ -9561,14 +9640,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix 0.36.9", + "rustix 0.36.14", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9579,7 +9658,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "futures", @@ -9595,7 +9674,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9610,7 +9689,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -9654,7 +9733,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "cid", "futures", @@ -9674,7 +9753,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9702,7 +9781,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.3", "futures", @@ -9721,7 +9800,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "futures", @@ -9743,7 +9822,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9777,7 +9856,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "futures", @@ -9797,7 +9876,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -9828,7 +9907,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "libp2p", @@ -9841,7 +9920,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9850,7 +9929,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "jsonrpsee", @@ -9880,7 +9959,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9899,7 +9978,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "http", "jsonrpsee", @@ -9914,7 +9993,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "futures", @@ -9940,7 +10019,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "directories", @@ -10006,7 +10085,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "log", "parity-scale-codec", @@ -10017,7 +10096,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "clap", "fs4", @@ -10033,7 +10112,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10052,7 +10131,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "libc", @@ -10071,7 +10150,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "chrono", "futures", @@ -10090,7 +10169,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "atty", @@ -10121,7 +10200,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10132,7 +10211,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -10159,7 +10238,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -10173,7 +10252,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-channel", "futures", @@ -10187,9 +10266,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.3.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" +checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" dependencies = [ "bitvec", "cfg-if", @@ -10201,9 +10280,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.3.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" +checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10301,7 +10380,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct", "der", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8", "subtle", "zeroize", @@ -10336,9 +10415,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ "bitflags", "core-foundation", @@ -10349,9 +10428,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -10392,29 +10471,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.156" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.156" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -10442,7 +10521,7 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -10478,16 +10557,16 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] @@ -10521,7 +10600,7 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -10555,9 +10634,9 @@ dependencies = [ [[package]] name = "slice-group-by" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" @@ -10639,7 +10718,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -10657,7 +10736,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "blake2", @@ -10671,7 +10750,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10684,7 +10763,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "integer-sqrt", "num-traits", @@ -10698,7 +10777,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10711,7 +10790,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-api", @@ -10723,7 +10802,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "futures", "log", @@ -10741,7 +10820,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -10756,7 +10835,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "parity-scale-codec", @@ -10774,7 +10853,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "merlin", @@ -10797,7 +10876,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10816,7 +10895,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "finality-grandpa", "log", @@ -10834,7 +10913,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10846,7 +10925,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -10859,7 +10938,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "array-bytes 4.2.0", "base58", @@ -10902,11 +10981,11 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "blake2b_simd", "byteorder", - "digest 0.10.6", + "digest 0.10.7", "sha2 0.10.6", "sha3", "sp-std", @@ -10916,7 +10995,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -10927,7 +11006,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10936,7 +11015,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "proc-macro2", "quote", @@ -10946,7 +11025,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "environmental", "parity-scale-codec", @@ -10957,7 +11036,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10972,7 +11051,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", "ed25519", @@ -10997,7 +11076,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "lazy_static", "sp-core", @@ -11008,7 +11087,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures", @@ -11025,7 +11104,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "thiserror", "zstd", @@ -11034,7 +11113,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11052,7 +11131,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -11066,7 +11145,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-core", @@ -11076,7 +11155,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "backtrace", "lazy_static", @@ -11086,7 +11165,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "rustc-hash", "serde", @@ -11096,7 +11175,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "either", "hash256-std-hasher", @@ -11118,7 +11197,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11136,7 +11215,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "Inflector", "proc-macro-crate", @@ -11148,7 +11227,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -11162,7 +11241,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -11174,7 +11253,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hash-db", "log", @@ -11194,12 +11273,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11212,7 +11291,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "futures-timer", @@ -11227,7 +11306,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "sp-std", @@ -11239,7 +11318,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "sp-api", "sp-runtime", @@ -11248,7 +11327,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "log", @@ -11264,7 +11343,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.3", "hash-db", @@ -11287,7 +11366,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11304,7 +11383,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11315,7 +11394,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11329,7 +11408,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", "scale-info", @@ -11349,9 +11428,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" @@ -11365,9 +11444,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" +checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" dependencies = [ "Inflector", "num-format", @@ -11506,7 +11585,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "platforms 2.0.0", ] @@ -11514,7 +11593,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11533,7 +11612,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "hyper", "log", @@ -11545,7 +11624,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "jsonrpsee", @@ -11558,7 +11637,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "jsonrpsee", "log", @@ -11577,7 +11656,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ansi_term", "build-helper", @@ -11623,9 +11702,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" dependencies = [ "proc-macro2", "quote", @@ -11646,9 +11725,9 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75182f12f490e953596550b65ee31bda7c8e043d9386174b353bda50838c3fd" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags", "core-foundation", @@ -11673,21 +11752,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", - "rustix 0.36.9", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.19", + "windows-sys 0.45.0", ] [[package]] @@ -11707,22 +11786,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -11797,9 +11876,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" dependencies = [ "itoa", "serde", @@ -11809,15 +11888,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -11868,14 +11947,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -11883,18 +11961,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -11910,9 +11988,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite 0.2.9", @@ -11922,9 +12000,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -11946,15 +12024,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" [[package]] name = "toml_edit" -version = "0.19.7" +version = "0.19.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" +checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" dependencies = [ "indexmap", "toml_datetime", @@ -12017,20 +12095,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -12190,7 +12268,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#76fed9b9082daade5392663f25ed8968f8e8c11c" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "async-trait", "clap", @@ -12256,7 +12334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "digest 0.10.6", + "digest 0.10.7", "rand 0.8.5", "static_assertions", ] @@ -12287,9 +12365,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -12324,15 +12402,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle", @@ -12367,13 +12445,19 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" -version = "1.3.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -12417,12 +12501,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -12456,9 +12539,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -12466,24 +12549,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" dependencies = [ "cfg-if", "js-sys", @@ -12493,9 +12576,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12503,22 +12586,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-instrument" @@ -12611,7 +12694,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01bf50edb2ea9d922aa75a7bf3c15e26a6c9e2d18c56e862b49737a582901729" dependencies = [ - "spin 0.9.6", + "spin 0.9.8", "wasmi_arena", "wasmi_core 0.5.0", "wasmparser-nostd", @@ -12639,7 +12722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", - "libm 0.2.6", + "libm 0.2.7", "memory_units", "num-rational", "num-traits", @@ -12653,7 +12736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5bf998ab792be85e20e771fe14182b4295571ad1d4f89d3da521c1bef5f597a" dependencies = [ "downcast-rs", - "libm 0.2.6", + "libm 0.2.7", "num-traits", ] @@ -12678,9 +12761,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632" +checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" dependencies = [ "anyhow", "bincode", @@ -12706,18 +12789,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a" +checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b389ae9b678b9c3851091a4804f4182d688d27aff7abc9aa37fa7be37d8ecffa" +checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" dependencies = [ "anyhow", "base64 0.13.1", @@ -12725,7 +12808,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.9", + "rustix 0.36.14", "serde", "sha2 0.10.6", "toml", @@ -12735,9 +12818,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b2c92a08c0db6efffd88fdc97d7aa9c7c63b03edb0971dbca745469f820e8c" +checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" dependencies = [ "anyhow", "cranelift-codegen", @@ -12756,9 +12839,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883" +checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" dependencies = [ "anyhow", "cranelift-entity", @@ -12775,9 +12858,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6" +checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -12799,20 +12882,20 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" +checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.9", + "rustix 0.36.14", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064" +checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" dependencies = [ "cfg-if", "libc", @@ -12821,9 +12904,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" dependencies = [ "anyhow", "cc", @@ -12836,7 +12919,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.9", + "rustix 0.36.14", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -12845,9 +12928,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "6.0.1" +version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2" +checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" dependencies = [ "cranelift-entity", "serde", @@ -12857,9 +12940,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" dependencies = [ "js-sys", "wasm-bindgen", @@ -12920,7 +13003,7 @@ dependencies = [ "sha2 0.10.6", "stun", "thiserror", - "time 0.3.20", + "time 0.3.21", "tokio", "turn", "url", @@ -12957,7 +13040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" dependencies = [ "aes 0.6.0", - "aes-gcm 0.10.1", + "aes-gcm 0.10.2", "async-trait", "bincode", "block-modes", @@ -13030,18 +13113,15 @@ dependencies = [ [[package]] name = "webrtc-media" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a3c157a040324e5049bcbd644ffc9079e6738fa2cfab2bcff64e5cc4c00d7" +checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" dependencies = [ "byteorder", "bytes", - "derive_builder", - "displaydoc", "rand 0.8.5", "rtp", "thiserror", - "webrtc-util", ] [[package]] @@ -13225,9 +13305,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223" +checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65" dependencies = [ "bytemuck", "safe_arch", @@ -13283,18 +13363,27 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] @@ -13304,7 +13393,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -13313,21 +13411,42 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -13340,6 +13459,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -13352,6 +13477,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -13364,6 +13495,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -13376,12 +13513,24 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -13394,11 +13543,17 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winnow" -version = "0.3.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ "memchr", ] @@ -13459,7 +13614,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -13477,7 +13632,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -13564,32 +13719,31 @@ dependencies = [ [[package]] name = "yasna" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.20", + "time 0.3.21", ] [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.16", ] [[package]] @@ -13613,9 +13767,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", From 5a5d711d0e5b6cd9f1792d8e6b7b550ae92cf70f Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 24 May 2023 13:27:42 +0900 Subject: [PATCH 005/101] Wrap (almost) all items from uniques --- Cargo.lock | 18 +- pallets/uniques/src/lib.rs | 588 ++++++++++++++++++++++++++++++++++++- 2 files changed, 595 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f1a8fed279..4d86b5a5972 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -742,9 +742,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-slice-cast" @@ -8619,13 +8619,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" dependencies = [ "aho-corasick 1.0.1", "memchr", - "regex-syntax 0.7.1", + "regex-syntax 0.7.2", ] [[package]] @@ -8645,9 +8645,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "region" @@ -12030,9 +12030,9 @@ checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" [[package]] name = "toml_edit" -version = "0.19.9" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap", "toml_datetime", diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index eaea8176b1c..fe1d55ffe08 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -19,10 +19,15 @@ #![cfg_attr(not(feature = "std"), no_std)] //! Handle the ability to notify other pallets that they should stop all -//! operations, or resume them + + pub use pallet::*; -use sp_runtime::traits::StaticLookup; +use pallet_uniques::DestroyWitness; +use sp_runtime::{ + traits::{StaticLookup}, +}; +use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; @@ -69,5 +74,584 @@ pub mod pallet { ) -> DispatchResult { pallet_uniques::Pallet::::create(origin, collection, admin) } + /// Issue a new collection of non-fungible items from a privileged origin. + /// + /// This new collection has no items initially. + /// + /// The origin must conform to `ForceOrigin`. + /// + /// Unlike `create`, no funds are reserved. + /// + /// - `collection`: The identifier of the new item. This must not be currently in use. + /// - `owner`: The owner of this collection of items. The owner has full superuser + /// permissions + /// over this item, but may later change and configure the permissions using + /// `transfer_ownership` and `set_team`. + /// + /// Emits `ForceCreated` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(1)] + #[pallet::weight(0)] + pub fn force_create( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + free_holding: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) + } + + /// Destroy a collection of fungible items. + /// + /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the + /// owner of the `collection`. + /// + /// - `collection`: The identifier of the collection to be destroyed. + /// - `witness`: Information on the items minted in the collection. This must be + /// correct. + /// + /// Emits `Destroyed` event when successful. + /// + /// Weight: `O(n + m)` where: + /// - `n = witness.items` + /// - `m = witness.item_metadatas` + /// - `a = witness.attributes` + #[pallet::call_index(2)] + #[pallet::weight(0)] + pub fn destroy( + origin: OriginFor, + collection: T::CollectionId, + witness: DestroyWitness, + ) -> DispatchResultWithPostInfo { + pallet_uniques::Pallet::::destroy(origin, collection, witness) + } + + /// Mint an item of a particular collection. + /// + /// The origin must be Signed and the sender must be the Issuer of the `collection`. + /// + /// - `collection`: The collection of the item to be minted. + /// - `item`: The item value of the item to be minted. + /// - `beneficiary`: The initial owner of the minted item. + /// + /// Emits `Issued` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(3)] + #[pallet::weight(0)] + pub fn mint( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + owner: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::mint(origin, collection, item, owner) + } + + /// Destroy a single item. + /// + /// Origin must be Signed and the signing account must be either: + /// - the Admin of the `collection`; + /// - the Owner of the `item`; + /// + /// - `collection`: The collection of the item to be burned. + /// - `item`: The item of the item to be burned. + /// - `check_owner`: If `Some` then the operation will fail with `WrongOwner` unless the + /// item is owned by this value. + /// + /// Emits `Burned` with the actual amount burned. + /// + /// Weight: `O(1)` + /// Modes: `check_owner.is_some()`. + #[pallet::call_index(4)] + #[pallet::weight(0)] + pub fn burn( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + check_owner: Option>, + ) -> DispatchResult { + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner) + } + + /// Move an item from the sender account to another. + /// + /// This resets the approved account of the item. + /// + /// Origin must be Signed and the signing account must be either: + /// - the Admin of the `collection`; + /// - the Owner of the `item`; + /// - the approved delegate for the `item` (in this case, the approval is reset). + /// + /// Arguments: + /// - `collection`: The collection of the item to be transferred. + /// - `item`: The item of the item to be transferred. + /// - `dest`: The account to receive ownership of the item. + /// + /// Emits `Transferred`. + /// + /// Weight: `O(1)` + #[pallet::call_index(5)] + #[pallet::weight(0)] + pub fn transfer( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + dest: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::transfer(origin, collection, item, dest) + } + + /// Reevaluate the deposits on some items. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection to be frozen. + /// - `items`: The items of the collection whose deposits will be reevaluated. + /// + /// NOTE: This exists as a best-effort function. Any items which are unknown or + /// in the case that the owner account does not have reservable funds to pay for a + /// deposit increase are ignored. Generally the owner isn't going to call this on items + /// whose existing deposit is less than the refreshed deposit as it would only cost them, + /// so it's of little consequence. + /// + /// It will still return an error in the case that the collection is unknown of the signer + /// is not permitted to call it. + /// + /// Weight: `O(items.len())` + #[pallet::call_index(6)] + #[pallet::weight(0)] + pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { + pallet_uniques::Pallet::::redeposit(origin, collection, items) + } + + /// Disallow further unprivileged transfer of an item. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection of the item to be frozen. + /// - `item`: The item of the item to be frozen. + /// + /// Emits `Frozen`. + /// + /// Weight: `O(1)` + #[pallet::call_index(7)] + #[pallet::weight(0)] + pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::freeze(origin, collection, item) + } + + /// Re-allow unprivileged transfer of an item. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection of the item to be thawed. + /// - `item`: The item of the item to be thawed. + /// + /// Emits `Thawed`. + /// + /// Weight: `O(1)` + #[pallet::call_index(8)] + #[pallet::weight(0)] + pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::thaw(origin, collection, item) + } + + /// Disallow further unprivileged transfers for a whole collection. + /// + /// Origin must be Signed and the sender should be the Freezer of the `collection`. + /// + /// - `collection`: The collection to be frozen. + /// + /// Emits `CollectionFrozen`. + /// + /// Weight: `O(1)` + #[pallet::call_index(9)] + #[pallet::weight(0)] + pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::freeze_collection(origin, collection) + } + + /// Re-allow unprivileged transfers for a whole collection. + /// + /// Origin must be Signed and the sender should be the Admin of the `collection`. + /// + /// - `collection`: The collection to be thawed. + /// + /// Emits `CollectionThawed`. + /// + /// Weight: `O(1)` + #[pallet::call_index(10)] + #[pallet::weight(0)] + pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::thaw_collection(origin, collection) + } + + /// Change the Owner of a collection. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection whose owner should be changed. + /// - `owner`: The new Owner of this collection. They must have called + /// `set_accept_ownership` with `collection` in order for this operation to succeed. + /// + /// Emits `OwnerChanged`. + /// + /// Weight: `O(1)` + #[pallet::call_index(11)] + #[pallet::weight(0)] + pub fn transfer_ownership( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::transfer_ownership(origin, collection, owner) + } + + /// Change the Issuer, Admin and Freezer of a collection. + /// + /// Origin must be Signed and the sender should be the Owner of the `collection`. + /// + /// - `collection`: The collection whose team should be changed. + /// - `issuer`: The new Issuer of this collection. + /// - `admin`: The new Admin of this collection. + /// - `freezer`: The new Freezer of this collection. + /// + /// Emits `TeamChanged`. + /// + /// Weight: `O(1)` + #[pallet::call_index(12)] + #[pallet::weight(0)] + pub fn set_team( + origin: OriginFor, + collection: T::CollectionId, + issuer: AccountIdLookupOf, + admin: AccountIdLookupOf, + freezer: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) + } + + /// Approve an item to be transferred by a delegated third-party account. + /// + /// The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be + /// either the owner of the `item` or the admin of the collection. + /// + /// - `collection`: The collection of the item to be approved for delegated transfer. + /// - `item`: The item of the item to be approved for delegated transfer. + /// - `delegate`: The account to delegate permission to transfer the item. + /// + /// Important NOTE: The `approved` account gets reset after each transfer. + /// + /// Emits `ApprovedTransfer` on success. + /// + /// Weight: `O(1)` + #[pallet::call_index(13)] + #[pallet::weight(0)] + pub fn approve_transfer( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + delegate: AccountIdLookupOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::approve_transfer(origin, collection, item, delegate) + } + + /// Cancel the prior approval for the transfer of an item by a delegate. + /// + /// Origin must be either: + /// - the `Force` origin; + /// - `Signed` with the signer being the Admin of the `collection`; + /// - `Signed` with the signer being the Owner of the `item`; + /// + /// Arguments: + /// - `collection`: The collection of the item of whose approval will be cancelled. + /// - `item`: The item of the item of whose approval will be cancelled. + /// - `maybe_check_delegate`: If `Some` will ensure that the given account is the one to + /// which permission of transfer is delegated. + /// + /// Emits `ApprovalCancelled` on success. + /// + /// Weight: `O(1)` + #[pallet::call_index(14)] + #[pallet::weight(0)] + pub fn cancel_approval( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + maybe_check_delegate: Option>, + ) -> DispatchResult { + pallet_uniques::Pallet::::cancel_approval(origin, collection, item, maybe_check_delegate) + } + + /// Alter the attributes of a given item. + /// + /// Origin must be `ForceOrigin`. + /// + /// - `collection`: The identifier of the item. + /// - `owner`: The new Owner of this item. + /// - `issuer`: The new Issuer of this item. + /// - `admin`: The new Admin of this item. + /// - `freezer`: The new Freezer of this item. + /// - `free_holding`: Whether a deposit is taken for holding an item of this collection. + /// - `is_frozen`: Whether this collection is frozen except for permissioned/admin + /// instructions. + /// + /// Emits `ItemStatusChanged` with the identity of the item. + /// + /// Weight: `O(1)` + #[pallet::call_index(15)] + #[pallet::weight(0)] + pub fn force_item_status( + origin: OriginFor, + collection: T::CollectionId, + owner: AccountIdLookupOf, + issuer: AccountIdLookupOf, + admin: AccountIdLookupOf, + freezer: AccountIdLookupOf, + free_holding: bool, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::force_item_status( + origin, + collection, + owner, + issuer, + admin, + freezer, + free_holding, + is_frozen, + ) + } + + /// Set an attribute for a collection or item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// If the origin is Signed, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the collection whose item's metadata to set. + /// - `maybe_item`: The identifier of the item whose metadata to set. + /// - `key`: The key of the attribute. + /// - `value`: The value to which to set the attribute. + /// + /// Emits `AttributeSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(16)] + #[pallet::weight(0)] + pub fn set_attribute( + origin: OriginFor, + collection: T::CollectionId, + maybe_item: Option, + key: BoundedVec, + value: BoundedVec, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_attribute(origin, collection, maybe_item, key, value) + } + + /// Clear an attribute for a collection or item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose item's metadata to clear. + /// - `maybe_item`: The identifier of the item whose metadata to clear. + /// - `key`: The key of the attribute. + /// + /// Emits `AttributeCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(17)] + #[pallet::weight(0)] + pub fn clear_attribute( + origin: OriginFor, + collection: T::CollectionId, + maybe_item: Option, + key: BoundedVec, + ) -> DispatchResult { + pallet_uniques::Pallet::::clear_attribute(origin, collection, maybe_item, key) + } + + /// Set the metadata for an item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `collection`. + /// + /// If the origin is Signed, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * data.len` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the collection whose item's metadata to set. + /// - `item`: The identifier of the item whose metadata to set. + /// - `data`: The general information of this item. Limited in length by `StringLimit`. + /// - `is_frozen`: Whether the metadata should be frozen against further changes. + /// + /// Emits `MetadataSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(18)] + #[pallet::weight(0)] + pub fn set_metadata( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + data: BoundedVec, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) + } + + /// Clear the metadata for an item. + /// + /// Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the + /// `item`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose item's metadata to clear. + /// - `item`: The identifier of the item whose metadata to clear. + /// + /// Emits `MetadataCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(19)] + #[pallet::weight(0)] + pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { + pallet_uniques::Pallet::::clear_metadata(origin, collection, item) + } + + /// Set the metadata for a collection. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// If the origin is `Signed`, then funds of signer are reserved according to the formula: + /// `MetadataDepositBase + DepositPerByte * data.len` taking into + /// account any already reserved funds. + /// + /// - `collection`: The identifier of the item whose metadata to update. + /// - `data`: The general information of this item. Limited in length by `StringLimit`. + /// - `is_frozen`: Whether the metadata should be frozen against further changes. + /// + /// Emits `CollectionMetadataSet`. + /// + /// Weight: `O(1)` + #[pallet::call_index(20)] + #[pallet::weight(0)] + pub fn set_collection_metadata( + origin: OriginFor, + collection: T::CollectionId, + data: BoundedVec, + is_frozen: bool, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_collection_metadata(origin, collection, data, is_frozen) + } + + /// Clear the metadata for a collection. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// Any deposit is freed for the collection's owner. + /// + /// - `collection`: The identifier of the collection whose metadata to clear. + /// + /// Emits `CollectionMetadataCleared`. + /// + /// Weight: `O(1)` + #[pallet::call_index(21)] + #[pallet::weight(0)] + pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { + pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) + } + + /// Set (or reset) the acceptance of ownership for a particular account. + /// + /// Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a + /// provider reference. + /// + /// - `maybe_collection`: The identifier of the collection whose ownership the signer is + /// willing to accept, or if `None`, an indication that the signer is willing to accept no + /// ownership transferal. + /// + /// Emits `OwnershipAcceptanceChanged`. + #[pallet::call_index(22)] + #[pallet::weight(0)] + pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { + pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) + } + + /// Set the maximum amount of items a collection could have. + /// + /// Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of + /// the `collection`. + /// + /// Note: This function can only succeed once per collection. + /// + /// - `collection`: The identifier of the collection to change. + /// - `max_supply`: The maximum amount of items a collection could have. + /// + /// Emits `CollectionMaxSupplySet` event when successful. + #[pallet::call_index(23)] + #[pallet::weight(0)] + pub fn set_collection_max_supply( + origin: OriginFor, + collection: T::CollectionId, + max_supply: u32, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_collection_max_supply(origin, collection, max_supply) + } + + // /// Set (or reset) the price for an item. + // /// + // /// Origin must be Signed and must be the owner of the asset `item`. + // /// + // /// - `collection`: The collection of the item. + // /// - `item`: The item to set the price for. + // /// - `price`: The price for the item. Pass `None`, to reset the price. + // /// - `buyer`: Restricts the buy operation to a specific account. + // /// + // /// Emits `ItemPriceSet` on success if the price is not `None`. + // /// Emits `ItemPriceRemoved` on success if the price is `None`. + // #[pallet::call_index(24)] + // #[pallet::weight(0)] + // pub fn set_price( + // origin: OriginFor, + // collection: T::CollectionId, + // item: T::ItemId, + // price: Option>, + // whitelisted_buyer: Option>, + // ) -> DispatchResult { + // pallet_uniques::Pallet::::set_price(origin,collection,item,price,whitelisted_buyer) + + // } + + // /// Allows to buy an item if it's up for sale. + // /// + // /// Origin must be Signed and must not be the owner of the `item`. + // /// + // /// - `collection`: The collection of the item. + // /// - `item`: The item the sender wants to buy. + // /// - `bid_price`: The price the sender is willing to pay. + // /// + // /// Emits `ItemBought` on success. + // #[pallet::call_index(25)] + // #[pallet::weight(0)] + // #[transactional] + // pub fn buy_item( + // origin: OriginFor, + // collection: T::CollectionId, + // item: T::ItemId, + // bid_price: ItemPrice, + // ) -> DispatchResult { + // pallet_uniques::Pallet::::buy_item(origin,collection,item,bid_price) + // } } } From e6d894c93647917418d57841e02589a14911ad43 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Wed, 31 May 2023 07:21:14 +0900 Subject: [PATCH 006/101] fmt --- pallets/uniques/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index fe1d55ffe08..0377f389d1a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,13 +20,9 @@ //! Handle the ability to notify other pallets that they should stop all - - pub use pallet::*; use pallet_uniques::DestroyWitness; -use sp_runtime::{ - traits::{StaticLookup}, -}; +use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; From af06fcb5e0a2788810d4f27522e72b354b930b0c Mon Sep 17 00:00:00 2001 From: Hounsette Date: Fri, 9 Jun 2023 17:15:55 +0900 Subject: [PATCH 007/101] feat: add call mint_with_extra_deposit --- pallets/uniques/src/lib.rs | 127 +++++++++++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 25 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 0377f389d1a..c4a96165c1a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -17,10 +17,10 @@ */ #![cfg_attr(not(feature = "std"), no_std)] - +#![feature(more_qualified_paths)] //! Handle the ability to notify other pallets that they should stop all -pub use pallet::*; +pub use pallet_uniques::pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; @@ -30,9 +30,8 @@ type AccountIdLookupOf = <::Lookup as StaticLookup #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::pallet_prelude::*; + use frame_support::pallet_prelude::{DispatchResult, *}; use frame_system::pallet_prelude::*; - use sp_runtime::DispatchResult; #[pallet::config] pub trait Config: frame_system::Config + pallet_uniques::Config {} @@ -44,7 +43,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::call] - impl Pallet { + impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -145,6 +144,84 @@ pub mod pallet { pallet_uniques::Pallet::::mint(origin, collection, item, owner) } + /// Mint an item of a particular collection with an extra value . + /// + /// The origin must be Signed and the sender must be the Issuer of the `collection`. + /// + /// - `collection`: The collection of the item to be minted. + /// - `item`: The item value of the item to be minted. + /// - `extra_deposit`: The extra deposit to be added to the fixed ItemDeposit if enabled, + /// - `beneficiary`: The initial owner of the minted item. + /// + /// Emits `Issued` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(4)] + #[pallet::weight(0)] + pub fn mint_with_extra_deposit( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + extra_deposit: T::Balance, + owner: AccountIdLookupOf, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + let owner = T::Lookup::lookup(owner)?; + + ensure!( + !>::Item::::contains_key(collection.clone(), item), + >::Error::::AlreadyExists + ); + + >::Collection::::try_mutate( + &collection, + |maybe_collection_details| -> DispatchResult { + let collection_details = maybe_collection_details + .as_mut() + .ok_or(>::Error::::UnknownCollection)?; + + with_details(collection_details)?; + + if let Ok(max_supply) = + >::CollectionMaxSupply::::try_get(&collection) + { + ensure!(collection_details.items < max_supply, ,pallet_uniques::Pallet::>::Error::::MaxSupplyReached); + } + + let items = collection_details + .items + .checked_add(1) + .ok_or(>::ArithmeticError::Overflow)?; + collection_details.items = items; + + let deposit = match collection_details.free_holding { + true => Zero::zero(), + false => T::ItemDeposit::get() + extra_deposit, + }; + T::Currency::reserve(&collection_details.owner, deposit)?; + collection_details.total_deposit += deposit; + + let owner = owner.clone(); + >::Account::::insert((&owner, &collection, &item), ()); + let details = ItemDetails { + owner, + approved: None, + is_frozen: false, + deposit, + }; + >::Item::::insert(&collection, &item, details); + Ok(()) + }, + )?; + + Self::deposit_event(>::Event::Issued { + collection, + item, + owner, + }); + Ok(()) + } + /// Destroy a single item. /// /// Origin must be Signed and the signing account must be either: @@ -160,7 +237,7 @@ pub mod pallet { /// /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. - #[pallet::call_index(4)] + #[pallet::call_index(5)] #[pallet::weight(0)] pub fn burn( origin: OriginFor, @@ -188,7 +265,7 @@ pub mod pallet { /// Emits `Transferred`. /// /// Weight: `O(1)` - #[pallet::call_index(5)] + #[pallet::call_index(6)] #[pallet::weight(0)] pub fn transfer( origin: OriginFor, @@ -216,7 +293,7 @@ pub mod pallet { /// is not permitted to call it. /// /// Weight: `O(items.len())` - #[pallet::call_index(6)] + #[pallet::call_index(7)] #[pallet::weight(0)] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { pallet_uniques::Pallet::::redeposit(origin, collection, items) @@ -232,7 +309,7 @@ pub mod pallet { /// Emits `Frozen`. /// /// Weight: `O(1)` - #[pallet::call_index(7)] + #[pallet::call_index(8)] #[pallet::weight(0)] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::freeze(origin, collection, item) @@ -248,7 +325,7 @@ pub mod pallet { /// Emits `Thawed`. /// /// Weight: `O(1)` - #[pallet::call_index(8)] + #[pallet::call_index(9)] #[pallet::weight(0)] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::thaw(origin, collection, item) @@ -263,7 +340,7 @@ pub mod pallet { /// Emits `CollectionFrozen`. /// /// Weight: `O(1)` - #[pallet::call_index(9)] + #[pallet::call_index(10)] #[pallet::weight(0)] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::freeze_collection(origin, collection) @@ -278,7 +355,7 @@ pub mod pallet { /// Emits `CollectionThawed`. /// /// Weight: `O(1)` - #[pallet::call_index(10)] + #[pallet::call_index(11)] #[pallet::weight(0)] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::thaw_collection(origin, collection) @@ -295,7 +372,7 @@ pub mod pallet { /// Emits `OwnerChanged`. /// /// Weight: `O(1)` - #[pallet::call_index(11)] + #[pallet::call_index(12)] #[pallet::weight(0)] pub fn transfer_ownership( origin: OriginFor, @@ -317,7 +394,7 @@ pub mod pallet { /// Emits `TeamChanged`. /// /// Weight: `O(1)` - #[pallet::call_index(12)] + #[pallet::call_index(13)] #[pallet::weight(0)] pub fn set_team( origin: OriginFor, @@ -343,7 +420,7 @@ pub mod pallet { /// Emits `ApprovedTransfer` on success. /// /// Weight: `O(1)` - #[pallet::call_index(13)] + #[pallet::call_index(14)] #[pallet::weight(0)] pub fn approve_transfer( origin: OriginFor, @@ -370,7 +447,7 @@ pub mod pallet { /// Emits `ApprovalCancelled` on success. /// /// Weight: `O(1)` - #[pallet::call_index(14)] + #[pallet::call_index(15)] #[pallet::weight(0)] pub fn cancel_approval( origin: OriginFor, @@ -397,7 +474,7 @@ pub mod pallet { /// Emits `ItemStatusChanged` with the identity of the item. /// /// Weight: `O(1)` - #[pallet::call_index(15)] + #[pallet::call_index(16)] #[pallet::weight(0)] pub fn force_item_status( origin: OriginFor, @@ -438,7 +515,7 @@ pub mod pallet { /// Emits `AttributeSet`. /// /// Weight: `O(1)` - #[pallet::call_index(16)] + #[pallet::call_index(17)] #[pallet::weight(0)] pub fn set_attribute( origin: OriginFor, @@ -464,7 +541,7 @@ pub mod pallet { /// Emits `AttributeCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(17)] + #[pallet::call_index(18)] #[pallet::weight(0)] pub fn clear_attribute( origin: OriginFor, @@ -492,7 +569,7 @@ pub mod pallet { /// Emits `MetadataSet`. /// /// Weight: `O(1)` - #[pallet::call_index(18)] + #[pallet::call_index(19)] #[pallet::weight(0)] pub fn set_metadata( origin: OriginFor, @@ -517,7 +594,7 @@ pub mod pallet { /// Emits `MetadataCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(19)] + #[pallet::call_index(20)] #[pallet::weight(0)] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::clear_metadata(origin, collection, item) @@ -539,7 +616,7 @@ pub mod pallet { /// Emits `CollectionMetadataSet`. /// /// Weight: `O(1)` - #[pallet::call_index(20)] + #[pallet::call_index(21)] #[pallet::weight(0)] pub fn set_collection_metadata( origin: OriginFor, @@ -562,7 +639,7 @@ pub mod pallet { /// Emits `CollectionMetadataCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(21)] + #[pallet::call_index(22)] #[pallet::weight(0)] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) @@ -578,7 +655,7 @@ pub mod pallet { /// ownership transferal. /// /// Emits `OwnershipAcceptanceChanged`. - #[pallet::call_index(22)] + #[pallet::call_index(23)] #[pallet::weight(0)] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) @@ -595,7 +672,7 @@ pub mod pallet { /// - `max_supply`: The maximum amount of items a collection could have. /// /// Emits `CollectionMaxSupplySet` event when successful. - #[pallet::call_index(23)] + #[pallet::call_index(24)] #[pallet::weight(0)] pub fn set_collection_max_supply( origin: OriginFor, From 207e955d8d48e34897bb528f152744aedb5ccfb5 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 13 Jun 2023 10:05:26 +0900 Subject: [PATCH 008/101] feat* mint with extra deposit --- pallets/uniques/src/lib.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index c4a96165c1a..f448df86696 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -21,8 +21,8 @@ //! Handle the ability to notify other pallets that they should stop all pub use pallet_uniques::pallet::*; -use pallet_uniques::DestroyWitness; -use sp_runtime::traits::StaticLookup; +use pallet_uniques::{DestroyWitness, pallet::Error, ItemDetails}; +use sp_runtime::traits::{StaticLookup, Zero}; use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; @@ -43,7 +43,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::call] - impl, I: 'static> Pallet { + impl Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -164,28 +164,29 @@ pub mod pallet { item: T::ItemId, extra_deposit: T::Balance, owner: AccountIdLookupOf, + with_details: impl FnOnce(&CollectionDetailsFor) -> DispatchResult, ) -> DispatchResult { let origin = ensure_signed(origin)?; let owner = T::Lookup::lookup(owner)?; ensure!( - !>::Item::::contains_key(collection.clone(), item), - >::Error::::AlreadyExists + !>::Item::::contains_key(collection.clone(), item), + >::Error::::AlreadyExists ); - >::Collection::::try_mutate( + >::Collection::::try_mutate( &collection, |maybe_collection_details| -> DispatchResult { let collection_details = maybe_collection_details .as_mut() - .ok_or(>::Error::::UnknownCollection)?; + .ok_or(>::Error::::UnknownCollection)?; with_details(collection_details)?; if let Ok(max_supply) = - >::CollectionMaxSupply::::try_get(&collection) + >::CollectionMaxSupply::::try_get(&collection) { - ensure!(collection_details.items < max_supply, ,pallet_uniques::Pallet::>::Error::::MaxSupplyReached); + ensure!(collection_details.items < max_supply, pallet_uniques::Pallet::>::Error::::MaxSupplyReached); } let items = collection_details @@ -202,14 +203,14 @@ pub mod pallet { collection_details.total_deposit += deposit; let owner = owner.clone(); - >::Account::::insert((&owner, &collection, &item), ()); + >::Account::::insert((&owner, &collection, &item), ()); let details = ItemDetails { owner, approved: None, is_frozen: false, deposit, }; - >::Item::::insert(&collection, &item, details); + >::Item::::insert(&collection, &item, details); Ok(()) }, )?; From fb1064d4eb79dc4f384e063290b5686f464af4af Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 14 Jun 2023 12:00:33 +1200 Subject: [PATCH 009/101] Revert "feat* mint with extra deposit" This reverts commit 207e955d8d48e34897bb528f152744aedb5ccfb5. --- pallets/uniques/src/lib.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index f448df86696..c4a96165c1a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -21,8 +21,8 @@ //! Handle the ability to notify other pallets that they should stop all pub use pallet_uniques::pallet::*; -use pallet_uniques::{DestroyWitness, pallet::Error, ItemDetails}; -use sp_runtime::traits::{StaticLookup, Zero}; +use pallet_uniques::DestroyWitness; +use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; @@ -43,7 +43,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::call] - impl Pallet { + impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -164,29 +164,28 @@ pub mod pallet { item: T::ItemId, extra_deposit: T::Balance, owner: AccountIdLookupOf, - with_details: impl FnOnce(&CollectionDetailsFor) -> DispatchResult, ) -> DispatchResult { let origin = ensure_signed(origin)?; let owner = T::Lookup::lookup(owner)?; ensure!( - !>::Item::::contains_key(collection.clone(), item), - >::Error::::AlreadyExists + !>::Item::::contains_key(collection.clone(), item), + >::Error::::AlreadyExists ); - >::Collection::::try_mutate( + >::Collection::::try_mutate( &collection, |maybe_collection_details| -> DispatchResult { let collection_details = maybe_collection_details .as_mut() - .ok_or(>::Error::::UnknownCollection)?; + .ok_or(>::Error::::UnknownCollection)?; with_details(collection_details)?; if let Ok(max_supply) = - >::CollectionMaxSupply::::try_get(&collection) + >::CollectionMaxSupply::::try_get(&collection) { - ensure!(collection_details.items < max_supply, pallet_uniques::Pallet::>::Error::::MaxSupplyReached); + ensure!(collection_details.items < max_supply, ,pallet_uniques::Pallet::>::Error::::MaxSupplyReached); } let items = collection_details @@ -203,14 +202,14 @@ pub mod pallet { collection_details.total_deposit += deposit; let owner = owner.clone(); - >::Account::::insert((&owner, &collection, &item), ()); + >::Account::::insert((&owner, &collection, &item), ()); let details = ItemDetails { owner, approved: None, is_frozen: false, deposit, }; - >::Item::::insert(&collection, &item, details); + >::Item::::insert(&collection, &item, details); Ok(()) }, )?; From 641e94c2dfd8d1844f73010ea5cc0878f7838695 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 14 Jun 2023 12:00:41 +1200 Subject: [PATCH 010/101] Revert "feat: add call mint_with_extra_deposit" This reverts commit af06fcb5e0a2788810d4f27522e72b354b930b0c. --- pallets/uniques/src/lib.rs | 127 ++++++++----------------------------- 1 file changed, 25 insertions(+), 102 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index c4a96165c1a..0377f389d1a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -17,10 +17,10 @@ */ #![cfg_attr(not(feature = "std"), no_std)] -#![feature(more_qualified_paths)] + //! Handle the ability to notify other pallets that they should stop all -pub use pallet_uniques::pallet::*; +pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; @@ -30,8 +30,9 @@ type AccountIdLookupOf = <::Lookup as StaticLookup #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::pallet_prelude::{DispatchResult, *}; + use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use sp_runtime::DispatchResult; #[pallet::config] pub trait Config: frame_system::Config + pallet_uniques::Config {} @@ -43,7 +44,7 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::call] - impl, I: 'static> Pallet { + impl Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -144,84 +145,6 @@ pub mod pallet { pallet_uniques::Pallet::::mint(origin, collection, item, owner) } - /// Mint an item of a particular collection with an extra value . - /// - /// The origin must be Signed and the sender must be the Issuer of the `collection`. - /// - /// - `collection`: The collection of the item to be minted. - /// - `item`: The item value of the item to be minted. - /// - `extra_deposit`: The extra deposit to be added to the fixed ItemDeposit if enabled, - /// - `beneficiary`: The initial owner of the minted item. - /// - /// Emits `Issued` event when successful. - /// - /// Weight: `O(1)` - #[pallet::call_index(4)] - #[pallet::weight(0)] - pub fn mint_with_extra_deposit( - origin: OriginFor, - collection: T::CollectionId, - item: T::ItemId, - extra_deposit: T::Balance, - owner: AccountIdLookupOf, - ) -> DispatchResult { - let origin = ensure_signed(origin)?; - let owner = T::Lookup::lookup(owner)?; - - ensure!( - !>::Item::::contains_key(collection.clone(), item), - >::Error::::AlreadyExists - ); - - >::Collection::::try_mutate( - &collection, - |maybe_collection_details| -> DispatchResult { - let collection_details = maybe_collection_details - .as_mut() - .ok_or(>::Error::::UnknownCollection)?; - - with_details(collection_details)?; - - if let Ok(max_supply) = - >::CollectionMaxSupply::::try_get(&collection) - { - ensure!(collection_details.items < max_supply, ,pallet_uniques::Pallet::>::Error::::MaxSupplyReached); - } - - let items = collection_details - .items - .checked_add(1) - .ok_or(>::ArithmeticError::Overflow)?; - collection_details.items = items; - - let deposit = match collection_details.free_holding { - true => Zero::zero(), - false => T::ItemDeposit::get() + extra_deposit, - }; - T::Currency::reserve(&collection_details.owner, deposit)?; - collection_details.total_deposit += deposit; - - let owner = owner.clone(); - >::Account::::insert((&owner, &collection, &item), ()); - let details = ItemDetails { - owner, - approved: None, - is_frozen: false, - deposit, - }; - >::Item::::insert(&collection, &item, details); - Ok(()) - }, - )?; - - Self::deposit_event(>::Event::Issued { - collection, - item, - owner, - }); - Ok(()) - } - /// Destroy a single item. /// /// Origin must be Signed and the signing account must be either: @@ -237,7 +160,7 @@ pub mod pallet { /// /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. - #[pallet::call_index(5)] + #[pallet::call_index(4)] #[pallet::weight(0)] pub fn burn( origin: OriginFor, @@ -265,7 +188,7 @@ pub mod pallet { /// Emits `Transferred`. /// /// Weight: `O(1)` - #[pallet::call_index(6)] + #[pallet::call_index(5)] #[pallet::weight(0)] pub fn transfer( origin: OriginFor, @@ -293,7 +216,7 @@ pub mod pallet { /// is not permitted to call it. /// /// Weight: `O(items.len())` - #[pallet::call_index(7)] + #[pallet::call_index(6)] #[pallet::weight(0)] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { pallet_uniques::Pallet::::redeposit(origin, collection, items) @@ -309,7 +232,7 @@ pub mod pallet { /// Emits `Frozen`. /// /// Weight: `O(1)` - #[pallet::call_index(8)] + #[pallet::call_index(7)] #[pallet::weight(0)] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::freeze(origin, collection, item) @@ -325,7 +248,7 @@ pub mod pallet { /// Emits `Thawed`. /// /// Weight: `O(1)` - #[pallet::call_index(9)] + #[pallet::call_index(8)] #[pallet::weight(0)] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::thaw(origin, collection, item) @@ -340,7 +263,7 @@ pub mod pallet { /// Emits `CollectionFrozen`. /// /// Weight: `O(1)` - #[pallet::call_index(10)] + #[pallet::call_index(9)] #[pallet::weight(0)] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::freeze_collection(origin, collection) @@ -355,7 +278,7 @@ pub mod pallet { /// Emits `CollectionThawed`. /// /// Weight: `O(1)` - #[pallet::call_index(11)] + #[pallet::call_index(10)] #[pallet::weight(0)] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::thaw_collection(origin, collection) @@ -372,7 +295,7 @@ pub mod pallet { /// Emits `OwnerChanged`. /// /// Weight: `O(1)` - #[pallet::call_index(12)] + #[pallet::call_index(11)] #[pallet::weight(0)] pub fn transfer_ownership( origin: OriginFor, @@ -394,7 +317,7 @@ pub mod pallet { /// Emits `TeamChanged`. /// /// Weight: `O(1)` - #[pallet::call_index(13)] + #[pallet::call_index(12)] #[pallet::weight(0)] pub fn set_team( origin: OriginFor, @@ -420,7 +343,7 @@ pub mod pallet { /// Emits `ApprovedTransfer` on success. /// /// Weight: `O(1)` - #[pallet::call_index(14)] + #[pallet::call_index(13)] #[pallet::weight(0)] pub fn approve_transfer( origin: OriginFor, @@ -447,7 +370,7 @@ pub mod pallet { /// Emits `ApprovalCancelled` on success. /// /// Weight: `O(1)` - #[pallet::call_index(15)] + #[pallet::call_index(14)] #[pallet::weight(0)] pub fn cancel_approval( origin: OriginFor, @@ -474,7 +397,7 @@ pub mod pallet { /// Emits `ItemStatusChanged` with the identity of the item. /// /// Weight: `O(1)` - #[pallet::call_index(16)] + #[pallet::call_index(15)] #[pallet::weight(0)] pub fn force_item_status( origin: OriginFor, @@ -515,7 +438,7 @@ pub mod pallet { /// Emits `AttributeSet`. /// /// Weight: `O(1)` - #[pallet::call_index(17)] + #[pallet::call_index(16)] #[pallet::weight(0)] pub fn set_attribute( origin: OriginFor, @@ -541,7 +464,7 @@ pub mod pallet { /// Emits `AttributeCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(18)] + #[pallet::call_index(17)] #[pallet::weight(0)] pub fn clear_attribute( origin: OriginFor, @@ -569,7 +492,7 @@ pub mod pallet { /// Emits `MetadataSet`. /// /// Weight: `O(1)` - #[pallet::call_index(19)] + #[pallet::call_index(18)] #[pallet::weight(0)] pub fn set_metadata( origin: OriginFor, @@ -594,7 +517,7 @@ pub mod pallet { /// Emits `MetadataCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(20)] + #[pallet::call_index(19)] #[pallet::weight(0)] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::clear_metadata(origin, collection, item) @@ -616,7 +539,7 @@ pub mod pallet { /// Emits `CollectionMetadataSet`. /// /// Weight: `O(1)` - #[pallet::call_index(21)] + #[pallet::call_index(20)] #[pallet::weight(0)] pub fn set_collection_metadata( origin: OriginFor, @@ -639,7 +562,7 @@ pub mod pallet { /// Emits `CollectionMetadataCleared`. /// /// Weight: `O(1)` - #[pallet::call_index(22)] + #[pallet::call_index(21)] #[pallet::weight(0)] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) @@ -655,7 +578,7 @@ pub mod pallet { /// ownership transferal. /// /// Emits `OwnershipAcceptanceChanged`. - #[pallet::call_index(23)] + #[pallet::call_index(22)] #[pallet::weight(0)] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) @@ -672,7 +595,7 @@ pub mod pallet { /// - `max_supply`: The maximum amount of items a collection could have. /// /// Emits `CollectionMaxSupplySet` event when successful. - #[pallet::call_index(24)] + #[pallet::call_index(23)] #[pallet::weight(0)] pub fn set_collection_max_supply( origin: OriginFor, From fc5dea765d45975f3d013fad1183ae26889d0fe7 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 14 Jun 2023 12:22:33 +1200 Subject: [PATCH 011/101] feat(pallet-nodle-uniques): wrap all substrate uniques extrinsics --- pallets/uniques/src/lib.rs | 148 +++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 0377f389d1a..b126001dee2 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,31 +20,34 @@ //! Handle the ability to notify other pallets that they should stop all +use frame_support::traits::Currency; pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; +pub type ItemPrice = + <>::Currency as Currency<::AccountId>>::Balance; #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::pallet_prelude::*; + use frame_support::{pallet_prelude::*, transactional}; use frame_system::pallet_prelude::*; use sp_runtime::DispatchResult; #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config {} + pub trait Config: frame_system::Config + pallet_uniques::Config {} #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(PhantomData<(T, I)>); #[pallet::hooks] - impl Hooks> for Pallet {} + impl, I: 'static> Hooks> for Pallet {} #[pallet::call] - impl Pallet { + impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. /// /// This new collection has no items initially and its owner is the origin. @@ -68,7 +71,7 @@ pub mod pallet { collection: T::CollectionId, admin: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::create(origin, collection, admin) + pallet_uniques::Pallet::::create(origin, collection, admin) } /// Issue a new collection of non-fungible items from a privileged origin. /// @@ -95,7 +98,7 @@ pub mod pallet { owner: AccountIdLookupOf, free_holding: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) + pallet_uniques::Pallet::::force_create(origin, collection, owner, free_holding) } /// Destroy a collection of fungible items. @@ -120,7 +123,7 @@ pub mod pallet { collection: T::CollectionId, witness: DestroyWitness, ) -> DispatchResultWithPostInfo { - pallet_uniques::Pallet::::destroy(origin, collection, witness) + pallet_uniques::Pallet::::destroy(origin, collection, witness) } /// Mint an item of a particular collection. @@ -142,7 +145,7 @@ pub mod pallet { item: T::ItemId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner) + pallet_uniques::Pallet::::mint(origin, collection, item, owner) } /// Destroy a single item. @@ -168,7 +171,7 @@ pub mod pallet { item: T::ItemId, check_owner: Option>, ) -> DispatchResult { - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner) + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner) } /// Move an item from the sender account to another. @@ -196,7 +199,7 @@ pub mod pallet { item: T::ItemId, dest: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer(origin, collection, item, dest) + pallet_uniques::Pallet::::transfer(origin, collection, item, dest) } /// Reevaluate the deposits on some items. @@ -219,7 +222,7 @@ pub mod pallet { #[pallet::call_index(6)] #[pallet::weight(0)] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { - pallet_uniques::Pallet::::redeposit(origin, collection, items) + pallet_uniques::Pallet::::redeposit(origin, collection, items) } /// Disallow further unprivileged transfer of an item. @@ -235,7 +238,7 @@ pub mod pallet { #[pallet::call_index(7)] #[pallet::weight(0)] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::freeze(origin, collection, item) + pallet_uniques::Pallet::::freeze(origin, collection, item) } /// Re-allow unprivileged transfer of an item. @@ -251,7 +254,7 @@ pub mod pallet { #[pallet::call_index(8)] #[pallet::weight(0)] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::thaw(origin, collection, item) + pallet_uniques::Pallet::::thaw(origin, collection, item) } /// Disallow further unprivileged transfers for a whole collection. @@ -266,7 +269,7 @@ pub mod pallet { #[pallet::call_index(9)] #[pallet::weight(0)] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::freeze_collection(origin, collection) + pallet_uniques::Pallet::::freeze_collection(origin, collection) } /// Re-allow unprivileged transfers for a whole collection. @@ -281,7 +284,7 @@ pub mod pallet { #[pallet::call_index(10)] #[pallet::weight(0)] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::thaw_collection(origin, collection) + pallet_uniques::Pallet::::thaw_collection(origin, collection) } /// Change the Owner of a collection. @@ -302,7 +305,7 @@ pub mod pallet { collection: T::CollectionId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer_ownership(origin, collection, owner) + pallet_uniques::Pallet::::transfer_ownership(origin, collection, owner) } /// Change the Issuer, Admin and Freezer of a collection. @@ -326,7 +329,7 @@ pub mod pallet { admin: AccountIdLookupOf, freezer: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) + pallet_uniques::Pallet::::set_team(origin, collection, issuer, admin, freezer) } /// Approve an item to be transferred by a delegated third-party account. @@ -351,7 +354,7 @@ pub mod pallet { item: T::ItemId, delegate: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::approve_transfer(origin, collection, item, delegate) + pallet_uniques::Pallet::::approve_transfer(origin, collection, item, delegate) } /// Cancel the prior approval for the transfer of an item by a delegate. @@ -378,7 +381,7 @@ pub mod pallet { item: T::ItemId, maybe_check_delegate: Option>, ) -> DispatchResult { - pallet_uniques::Pallet::::cancel_approval(origin, collection, item, maybe_check_delegate) + pallet_uniques::Pallet::::cancel_approval(origin, collection, item, maybe_check_delegate) } /// Alter the attributes of a given item. @@ -409,7 +412,7 @@ pub mod pallet { free_holding: bool, is_frozen: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::force_item_status( + pallet_uniques::Pallet::::force_item_status( origin, collection, owner, @@ -447,7 +450,7 @@ pub mod pallet { key: BoundedVec, value: BoundedVec, ) -> DispatchResult { - pallet_uniques::Pallet::::set_attribute(origin, collection, maybe_item, key, value) + pallet_uniques::Pallet::::set_attribute(origin, collection, maybe_item, key, value) } /// Clear an attribute for a collection or item. @@ -472,7 +475,7 @@ pub mod pallet { maybe_item: Option, key: BoundedVec, ) -> DispatchResult { - pallet_uniques::Pallet::::clear_attribute(origin, collection, maybe_item, key) + pallet_uniques::Pallet::::clear_attribute(origin, collection, maybe_item, key) } /// Set the metadata for an item. @@ -501,7 +504,7 @@ pub mod pallet { data: BoundedVec, is_frozen: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) + pallet_uniques::Pallet::::set_metadata(origin, collection, item, data, is_frozen) } /// Clear the metadata for an item. @@ -520,7 +523,7 @@ pub mod pallet { #[pallet::call_index(19)] #[pallet::weight(0)] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { - pallet_uniques::Pallet::::clear_metadata(origin, collection, item) + pallet_uniques::Pallet::::clear_metadata(origin, collection, item) } /// Set the metadata for a collection. @@ -547,7 +550,7 @@ pub mod pallet { data: BoundedVec, is_frozen: bool, ) -> DispatchResult { - pallet_uniques::Pallet::::set_collection_metadata(origin, collection, data, is_frozen) + pallet_uniques::Pallet::::set_collection_metadata(origin, collection, data, is_frozen) } /// Clear the metadata for a collection. @@ -565,7 +568,7 @@ pub mod pallet { #[pallet::call_index(21)] #[pallet::weight(0)] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { - pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) + pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) } /// Set (or reset) the acceptance of ownership for a particular account. @@ -581,7 +584,7 @@ pub mod pallet { #[pallet::call_index(22)] #[pallet::weight(0)] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { - pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) + pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) } /// Set the maximum amount of items a collection could have. @@ -602,52 +605,51 @@ pub mod pallet { collection: T::CollectionId, max_supply: u32, ) -> DispatchResult { - pallet_uniques::Pallet::::set_collection_max_supply(origin, collection, max_supply) + pallet_uniques::Pallet::::set_collection_max_supply(origin, collection, max_supply) } - // /// Set (or reset) the price for an item. - // /// - // /// Origin must be Signed and must be the owner of the asset `item`. - // /// - // /// - `collection`: The collection of the item. - // /// - `item`: The item to set the price for. - // /// - `price`: The price for the item. Pass `None`, to reset the price. - // /// - `buyer`: Restricts the buy operation to a specific account. - // /// - // /// Emits `ItemPriceSet` on success if the price is not `None`. - // /// Emits `ItemPriceRemoved` on success if the price is `None`. - // #[pallet::call_index(24)] - // #[pallet::weight(0)] - // pub fn set_price( - // origin: OriginFor, - // collection: T::CollectionId, - // item: T::ItemId, - // price: Option>, - // whitelisted_buyer: Option>, - // ) -> DispatchResult { - // pallet_uniques::Pallet::::set_price(origin,collection,item,price,whitelisted_buyer) - - // } - - // /// Allows to buy an item if it's up for sale. - // /// - // /// Origin must be Signed and must not be the owner of the `item`. - // /// - // /// - `collection`: The collection of the item. - // /// - `item`: The item the sender wants to buy. - // /// - `bid_price`: The price the sender is willing to pay. - // /// - // /// Emits `ItemBought` on success. - // #[pallet::call_index(25)] - // #[pallet::weight(0)] - // #[transactional] - // pub fn buy_item( - // origin: OriginFor, - // collection: T::CollectionId, - // item: T::ItemId, - // bid_price: ItemPrice, - // ) -> DispatchResult { - // pallet_uniques::Pallet::::buy_item(origin,collection,item,bid_price) - // } + /// Set (or reset) the price for an item. + /// + /// Origin must be Signed and must be the owner of the asset `item`. + /// + /// - `collection`: The collection of the item. + /// - `item`: The item to set the price for. + /// - `price`: The price for the item. Pass `None`, to reset the price. + /// - `buyer`: Restricts the buy operation to a specific account. + /// + /// Emits `ItemPriceSet` on success if the price is not `None`. + /// Emits `ItemPriceRemoved` on success if the price is `None`. + #[pallet::call_index(24)] + #[pallet::weight(0)] + pub fn set_price( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + price: Option>, + whitelisted_buyer: Option>, + ) -> DispatchResult { + pallet_uniques::Pallet::::set_price(origin, collection, item, price, whitelisted_buyer) + } + + /// Allows to buy an item if it's up for sale. + /// + /// Origin must be Signed and must not be the owner of the `item`. + /// + /// - `collection`: The collection of the item. + /// - `item`: The item the sender wants to buy. + /// - `bid_price`: The price the sender is willing to pay. + /// + /// Emits `ItemBought` on success. + #[pallet::call_index(25)] + #[pallet::weight(0)] + #[transactional] + pub fn buy_item( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + bid_price: ItemPrice, + ) -> DispatchResult { + pallet_uniques::Pallet::::buy_item(origin, collection, item, bid_price) + } } } From c6810dbea378d99883fa0ba82c952f712f58a1cb Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Wed, 14 Jun 2023 12:58:43 +1200 Subject: [PATCH 012/101] feat(pallet-nodle-uniques): add mint_with_extra_deposit --- pallets/uniques/src/lib.rs | 50 +++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index b126001dee2..4e5274a877a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,14 +20,14 @@ //! Handle the ability to notify other pallets that they should stop all -use frame_support::traits::Currency; +use frame_support::traits::{Currency, ReservableCurrency}; pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; -pub type ItemPrice = +pub type BalanceOf = <>::Currency as Currency<::AccountId>>::Balance; #[frame_support::pallet] @@ -46,6 +46,19 @@ pub mod pallet { #[pallet::hooks] impl, I: 'static> Hooks> for Pallet {} + #[pallet::storage] + #[pallet::storage_prefix = "Asset"] + /// The extra deposits in existence. + pub(super) type ExtraDeposit, I: 'static = ()> = StorageDoubleMap< + _, + Blake2_128Concat, + T::CollectionId, + Blake2_128Concat, + T::ItemId, + BalanceOf, + OptionQuery, + >; + #[pallet::call] impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. @@ -625,7 +638,7 @@ pub mod pallet { origin: OriginFor, collection: T::CollectionId, item: T::ItemId, - price: Option>, + price: Option>, whitelisted_buyer: Option>, ) -> DispatchResult { pallet_uniques::Pallet::::set_price(origin, collection, item, price, whitelisted_buyer) @@ -647,9 +660,38 @@ pub mod pallet { origin: OriginFor, collection: T::CollectionId, item: T::ItemId, - bid_price: ItemPrice, + bid_price: BalanceOf, ) -> DispatchResult { pallet_uniques::Pallet::::buy_item(origin, collection, item, bid_price) } + + /// Mint an item of a particular collection with extra deposit. + /// + /// The origin must be Signed and the sender must be the Issuer of the `collection`. + /// + /// - `collection`: The collection of the item to be minted. + /// - `item`: The item value of the item to be minted. + /// - `owner`: The initial owner of the minted item. + /// + /// Emits `Issued` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(26)] + #[pallet::weight(0)] + #[transactional] + pub fn mint_with_extra_deposit( + origin: OriginFor, + collection: T::CollectionId, + item: T::ItemId, + owner: AccountIdLookupOf, + deposit: BalanceOf, + ) -> DispatchResult { + pallet_uniques::Pallet::::mint(origin, collection, item, owner.clone()).and_then(|_| { + let owner = T::Lookup::lookup(owner)?; + >::Currency::reserve(&owner, deposit)?; + ExtraDeposit::::insert(&collection, &item, deposit); + Ok(()) + }) + } } } From 84f1ee31b3f799180db865e979375873188a6104 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 15 Jun 2023 14:36:52 +1200 Subject: [PATCH 013/101] fix(pallet-nodle-uniques): the extra deposit should be reserved from the collection owner --- pallets/uniques/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 4e5274a877a..3869cca8219 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -686,9 +686,10 @@ pub mod pallet { owner: AccountIdLookupOf, deposit: BalanceOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner.clone()).and_then(|_| { - let owner = T::Lookup::lookup(owner)?; - >::Currency::reserve(&owner, deposit)?; + pallet_uniques::Pallet::::mint(origin, collection, item, owner).and_then(|_| { + let collection_owner = + pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; + >::Currency::reserve(&collection_owner, deposit)?; ExtraDeposit::::insert(&collection, &item, deposit); Ok(()) }) From fdebb632f96099826afd8aa2063e1929471e9cd6 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 15 Jun 2023 14:46:33 +0900 Subject: [PATCH 014/101] feat:(pallet_uniques) burn extra deposit --- pallets/uniques/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 3869cca8219..ab535f2f191 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -184,7 +184,14 @@ pub mod pallet { item: T::ItemId, check_owner: Option>, ) -> DispatchResult { - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner) + let collection_owner = + pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; + + if let Some(extra_deposit) = ExtraDeposit::::take(&collection, &item) { + >::Currency::unreserve(&collection_owner, extra_deposit); + } + Ok(()) } /// Move an item from the sender account to another. From 68aa2f6caa55013801b003f9bdf1e09e8d744d34 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Fri, 16 Jun 2023 12:26:51 +0900 Subject: [PATCH 015/101] feat(pallet-uniques): destroy collection --- pallets/uniques/src/lib.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index ab535f2f191..72fe7bd44b7 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,7 +20,7 @@ //! Handle the ability to notify other pallets that they should stop all -use frame_support::traits::{Currency, ReservableCurrency}; +use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; @@ -136,6 +136,19 @@ pub mod pallet { collection: T::CollectionId, witness: DestroyWitness, ) -> DispatchResultWithPostInfo { + let collection_owner = + pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; + for (item, deposit) in ExtraDeposit::::iter_prefix(collection).drain() { + if let Some(item_owner) = pallet_uniques::Pallet::::owner(collection, item) { + >::Currency::unreserve(&collection_owner, deposit); + >::Currency::transfer( + &item_owner, + &collection_owner, + deposit, + ExistenceRequirement::AllowDeath, + )?; + } + } pallet_uniques::Pallet::::destroy(origin, collection, witness) } From 34b50f392fdfadc7ec656d53bc753d4df497f05f Mon Sep 17 00:00:00 2001 From: Hounsette Date: Fri, 16 Jun 2023 20:14:39 +0900 Subject: [PATCH 016/101] test(pallet-uniques): add test externalities --- pallets/uniques/Cargo.toml | 5 +++++ pallets/uniques/src/lib.rs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 11d7b1fc02c..20429d20143 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -16,6 +16,7 @@ std = [ "sp-runtime/std", "sp-std/std", "pallet-uniques/std", + "pallet-balances/std", ] try-runtime = [ "frame-support/try-runtime", @@ -31,7 +32,11 @@ scale-info = { version = "2.0.1", default-features = false, features = [ frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.40" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } + +[dev-dependencies] +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } \ No newline at end of file diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 72fe7bd44b7..3b6d66ad36a 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -25,6 +25,8 @@ pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::prelude::*; +#[cfg(test)] +mod tests; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; pub type BalanceOf = @@ -38,7 +40,9 @@ pub mod pallet { use sp_runtime::DispatchResult; #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config {} + pub trait Config: frame_system::Config + pallet_uniques::Config { + + } #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); From eba51690b4db044b8ffb29fca270969184ede41a Mon Sep 17 00:00:00 2001 From: Hounsette Date: Sun, 18 Jun 2023 23:19:20 +0900 Subject: [PATCH 017/101] test(pallet_uniques): test mint with extra deposit and mint and burn --- Cargo.lock | 2 ++ pallets/uniques/src/lib.rs | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d86b5a5972..2eed78f9946 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6075,10 +6075,12 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "pallet-balances", "pallet-uniques", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 3b6d66ad36a..095817e8f03 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -40,9 +40,7 @@ pub mod pallet { use sp_runtime::DispatchResult; #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config { - - } + pub trait Config: frame_system::Config + pallet_uniques::Config {} #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); From 318dc1b7c93d192e5c4128682a8ee87d4d779766 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Sun, 18 Jun 2023 23:55:25 +0900 Subject: [PATCH 018/101] feat(pallet_uniques): add transfer item deposit to item owner when item is burnt --- pallets/uniques/src/lib.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 095817e8f03..feb33b7ba51 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -201,11 +201,19 @@ pub mod pallet { ) -> DispatchResult { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - if let Some(extra_deposit) = ExtraDeposit::::take(&collection, &item) { - >::Currency::unreserve(&collection_owner, extra_deposit); + if let Some(item_owner) = pallet_uniques::Pallet::::owner(collection, item) { + >::Currency::unreserve(&collection_owner, extra_deposit); + >::Currency::transfer( + &collection_owner, + &item_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + )?; + } } + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; + Ok(()) } From 7cda674b48a209bd0bf5cab17a95ed42d3aded9c Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 19 Jun 2023 00:23:00 +0900 Subject: [PATCH 019/101] pallet_uniques: add test files --- pallets/uniques/src/tests.rs | 220 +++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 pallets/uniques/src/tests.rs diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs new file mode 100644 index 00000000000..cd10c6a98bd --- /dev/null +++ b/pallets/uniques/src/tests.rs @@ -0,0 +1,220 @@ +use super::*; +use crate as pallet_nodle_uniques; + +use frame_support::{ + assert_ok, construct_runtime, parameter_types, + traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, +}; +use sp_core::H256; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; + +type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; +type Block = frame_system::mocking::MockBlock; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + Uniques: pallet_nodle_uniques::{Call, Storage}, + Uniques2: pallet_uniques::{Pallet, Call, Storage, Event}, + } +); + +impl frame_system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Index = u64; + type BlockNumber = u64; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type DbWeight = (); + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type Balance = u64; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type MaxLocks = (); + type ExistentialDeposit = (); + type AccountStore = frame_system::Pallet; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type WeightInfo = (); +} +parameter_types! { + pub TestCollectionDeposit: u64 = 2; + pub TestItemDeposit: u64 = 1; +} +impl pallet_uniques::Config for Test { + type RuntimeEvent = RuntimeEvent; + type CollectionId = u32; + type ItemId = u32; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = frame_system::EnsureRoot; + type Locker = (); + type CollectionDeposit = TestCollectionDeposit; + type ItemDeposit = TestItemDeposit; + type MetadataDepositBase = ConstU64<1>; + type AttributeDepositBase = ConstU64<1>; + type DepositPerByte = ConstU64<1>; + type StringLimit = ConstU32<50>; + type KeyLimit = ConstU32<50>; + type ValueLimit = ConstU32<50>; + type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); +} +impl Config for Test {} + +macro_rules! bvec { + ($( $x:tt )*) => { + vec![$( $x )*].try_into().unwrap() + } +} +pub(crate) fn new_test_ext() -> sp_io::TestExternalities { + let t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} +#[cfg(test)] +mod tests { + + use super::*; + #[test] + fn test_mint_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let item_id2 = 12; + let collection_owner_id = 1; + let item_owner = 42; + Balances::make_free_balance_be(&collection_owner_id, 100); + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id2, + item_owner, + extra_deposit + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + 2 * TestItemDeposit::get() + 2 * extra_deposit + 3 + ); + }) + } + + #[test] + fn test_mint_and_burn_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let item_id2 = 12; + let collection_owner_id = 1; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_ok!(Uniques::burn(RuntimeOrigin::signed(1), collection_id, item_id, None)); + + // check if extra deposit is freed as well as the item deposit + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + 3 + ); + // check that the owner of the collection does not recover the reserved amount of the burnt item + assert_eq!( + Balances::free_balance(&collection_owner_id), + init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) + ); + // extra deposit transferred to the item owner free balance + assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + }) + } +} From e41b6a5d7871966cd0fdaabec1107d363e27df08 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 19 Jun 2023 00:23:32 +0900 Subject: [PATCH 020/101] fmt --- pallets/uniques/src/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index cd10c6a98bd..9e8a2f1efcc 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -214,7 +214,7 @@ mod tests { init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) ); // extra deposit transferred to the item owner free balance - assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); }) } } From 9d13a1ed379f15b637150cc75002f53fa3603c0d Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 19 Jun 2023 01:17:28 +0900 Subject: [PATCH 021/101] =?UTF-8?q?bench(pallet=5Funiques):=20bring=20impl?= =?UTF-8?q?ementation=20of=20benchmarkhelper=20for=20ru=E2=80=A6=20?= =?UTF-8?q?=E2=80=A6ntime-benchmark,=20necessary=20only=20for=20visibility?= =?UTF-8?q?=20for=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pallets/uniques/src/tests.rs | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 9e8a2f1efcc..95fa8cc1acb 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -69,6 +69,20 @@ parameter_types! { pub TestCollectionDeposit: u64 = 2; pub TestItemDeposit: u64 = 1; } +#[cfg(feature = "runtime-benchmarks")] +pub trait BenchmarkHelper { + fn collection(i: u16) -> CollectionId; + fn item(i: u16) -> ItemId; +} +#[cfg(feature = "runtime-benchmarks")] +impl, ItemId: From> BenchmarkHelper for () { + fn collection(i: u16) -> CollectionId { + i.into() + } + fn item(i: u16) -> ItemId { + i.into() + } +} impl pallet_uniques::Config for Test { type RuntimeEvent = RuntimeEvent; type CollectionId = u32; @@ -217,4 +231,62 @@ mod tests { assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); }) } + + #[test] + fn test_destroy_collection() { + new_test_ext().execute_with(|| { + // let extra_deposit = 20; + // let collection_id = 0; + // let item_id = 10; + // let item_id2 = 12; + // let collection_owner_id = 1; + // let item_owner = 42; + // let init_balance = 100; + // Balances::make_free_balance_be(&collection_owner_id, init_balance); + // Balances::make_free_balance_be(&item_owner, init_balance); + // assert_ok!(Uniques::create( + // RuntimeOrigin::signed(collection_owner_id), + // collection_id, + // collection_owner_id + // )); + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + // ); + // assert_ok!(Uniques::set_collection_metadata( + // RuntimeOrigin::signed(1), + // 0, + // bvec![0, 0], + // false + // )); + + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id, + // item_owner, + // extra_deposit + // )); + + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + // ); + + // assert_ok!(Uniques::destr(RuntimeOrigin::signed(1), collection_id, item_id, None)); + + // // check if extra deposit is freed as well as the item deposit + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + 3 + // ); + // // check that the owner of the collection does not recover the reserved amount of the + // burnt item assert_eq!( + // Balances::free_balance(&collection_owner_id), + // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) + // ); + // // extra deposit transferred to the item owner free balance + // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + }) + } } From a8d9a0447b8dc7d767b36cf58684291749d42c51 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 20 Jun 2023 09:06:50 +0900 Subject: [PATCH 022/101] fix(pallet-uniques): on destroy event the items owners in the pallet-uniques storage are recovered before being cleared --- pallets/uniques/src/lib.rs | 39 +++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index feb33b7ba51..8bd2616e383 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -24,7 +24,7 @@ use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; -use sp_std::prelude::*; +use sp_std::{prelude::*, vec::Vec}; #[cfg(test)] mod tests; @@ -140,18 +140,31 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - for (item, deposit) in ExtraDeposit::::iter_prefix(collection).drain() { + let mut item_owners: Vec<(T::AccountId, BalanceOf)> = Vec::new(); + + // Recover the item owners for each item in the ExtraDeposit Storage + for (item, extra_deposit) in ExtraDeposit::::iter_prefix(collection) { if let Some(item_owner) = pallet_uniques::Pallet::::owner(collection, item) { - >::Currency::unreserve(&collection_owner, deposit); - >::Currency::transfer( - &item_owner, - &collection_owner, - deposit, - ExistenceRequirement::AllowDeath, - )?; + item_owners.push((item_owner, extra_deposit)); } } - pallet_uniques::Pallet::::destroy(origin, collection, witness) + + let ret = pallet_uniques::Pallet::::destroy(origin, collection, witness)?; + + // Unreserve and transfer extra reserved deposit to the item owners + for (item_owner, extra_deposit) in item_owners { + >::Currency::unreserve(&collection_owner, extra_deposit); + >::Currency::transfer( + &item_owner, + &collection_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + )?; + } + + // Clear the extra storage map + let _ = ExtraDeposit::::clear_prefix(collection, witness.items, None); + Ok(ret) } /// Mint an item of a particular collection. @@ -201,8 +214,10 @@ pub mod pallet { ) -> DispatchResult { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; + let item_owner = pallet_uniques::Pallet::::owner(collection, item); + pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; if let Some(extra_deposit) = ExtraDeposit::::take(&collection, &item) { - if let Some(item_owner) = pallet_uniques::Pallet::::owner(collection, item) { + if let Some(item_owner) = item_owner { >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( &collection_owner, @@ -212,8 +227,6 @@ pub mod pallet { )?; } } - pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - Ok(()) } From a15ff2cd181a355fa03a956f4208f409001196b5 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 20 Jun 2023 09:18:54 +0900 Subject: [PATCH 023/101] test(pallet-uniques): add test_mint_and_burn_wrong_origin_with_extra_deposit --- pallets/uniques/src/tests.rs | 73 +++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 95fa8cc1acb..acd72c6c148 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -141,14 +141,14 @@ mod tests { TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), 0, bvec![0, 0], false )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id1), collection_id, item_id, item_owner, @@ -161,7 +161,7 @@ mod tests { ); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id2, item_owner, @@ -196,14 +196,14 @@ mod tests { TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), 0, bvec![0, 0], false )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id, item_owner, @@ -215,7 +215,12 @@ mod tests { TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); - assert_ok!(Uniques::burn(RuntimeOrigin::signed(1), collection_id, item_id, None)); + assert_ok!(Uniques::burn( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + None + )); // check if extra deposit is freed as well as the item deposit assert_eq!( @@ -231,6 +236,62 @@ mod tests { assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); }) } + #[test] + fn test_mint_and_burn_wrong_origin_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let item_id2 = 12; + let collection_owner_id = 1; + let not_collection_owner_id = 255; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_err!(Uniques::burn( + RuntimeOrigin::signed(not_collection_owner_id), + collection_id, + item_id, + None + )); + + // reserved balance should not have changed + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + }) + } #[test] fn test_destroy_collection() { From b25d22ed36a644a579d38bf71b911e66e8d5f470 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 03:30:12 +0900 Subject: [PATCH 024/101] pallet-uniques: add benchmarks --- pallets/uniques/Cargo.toml | 8 +- pallets/uniques/src/benchmarking.rs | 157 ++++++++++++++++++++++++++++ pallets/uniques/src/lib.rs | 22 +++- 3 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 pallets/uniques/src/benchmarking.rs diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 20429d20143..67580ee331a 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -11,6 +11,7 @@ std = [ "serde", "scale-info/std", "frame-support/std", + "frame-benchmarking?/std", "frame-system/std", "sp-io/std", "sp-runtime/std", @@ -22,6 +23,11 @@ try-runtime = [ "frame-support/try-runtime", "pallet-uniques/try-runtime" ] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -37,6 +43,6 @@ sp-io = { git = "https://github.com/paritytech/substrate", default-features = fa sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } - +support = { path = "../../support" } [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } \ No newline at end of file diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs new file mode 100644 index 00000000000..d830d19b4b1 --- /dev/null +++ b/pallets/uniques/src/benchmarking.rs @@ -0,0 +1,157 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Uniques pallet benchmarking. + +#![cfg(feature = "runtime-benchmarks")] + +use super::*; +use frame_benchmarking::v1::{ + account, benchmarks, benchmarks_instance_pallet, whitelist_account, whitelisted_caller, BenchmarkError, +}; +use frame_support::{ + dispatch::UnfilteredDispatchable, + traits::{EnsureOrigin, Get}, + BoundedVec, +}; +use frame_system::RawOrigin as SystemOrigin; +use sp_runtime::traits::Bounded; +use sp_std::prelude::*; + +use crate::Pallet as Uniques; +const SEED: u32 = 0; + +fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let collection_owner: T::AccountId = account("colletction_owner", 0, SEED); + let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); + let collection_id = T::Helper::collection(0); + (collection_id, collection_owner, collection_owner_lookup) +} +fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); + assert!(Uniques::::force_create( + SystemOrigin::Root.into(), + collection_id.clone(), + collection_owner_lookup.clone(), + false, + ) + .is_ok()); + (collection_id, collection_owner, collection_owner_lookup) +} +fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_collection_metadata( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_metadata( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + item, + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_attribute, I: 'static>( + item: T::ItemId, +) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + let caller_lookup = T::Lookup::unlookup(caller.clone()); + let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); + assert!(Uniques::::set_attribute( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + Some(item), + key.clone(), + vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), + ) + .is_ok()); + (key, caller, caller_lookup) +} +fn mint_item_with_extra_deposit, I: 'static>( + index: u16, +) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let item = T::Helper::item(index); + assert!(Uniques::::mint_with_extra_deposit( + SystemOrigin::Signed(collection_owner.clone()).into(), + collection_id, + item, + collection_owner_lookup.clone(), + index.into(), + ) + .is_ok()); + (item, collection_owner, collection_owner_lookup) +} + +benchmarks_instance_pallet! { + + // destroy { + // let n in 0 .. 1_000; + // let m in 0 .. 1_000; + // let a in 0 .. 1_000; + + // let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + // add_collection_metadata::(); + // for i in 0..n { + // mint_item_with_extra_deposit::(i as u16); + // } + // for i in 0..m { + // add_item_metadata::(T::Helper::item(i as u16)); + // } + // for i in 0..a { + // add_item_attribute::(T::Helper::item(i as u16)); + // } + // let witness = Uniques2::Collection::::get(collection.clone()).unwrap().destroy_witness(); + // }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) + + mint_with_extra_deposit { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let item = T::Helper::item(0); + let deposit = BalanceOf::::max_value(); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, collection_owner_lookup, deposit) + + + burn { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let (item, ..) = mint_item_with_extra_deposit::(0); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, Some(collection_owner_lookup)) + + + + + impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); +} diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 8bd2616e383..d9de74711e1 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -25,6 +25,8 @@ pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::{prelude::*, vec::Vec}; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; #[cfg(test)] mod tests; @@ -39,8 +41,26 @@ pub mod pallet { use frame_system::pallet_prelude::*; use sp_runtime::DispatchResult; + #[cfg(feature = "runtime-benchmarks")] + pub trait BenchmarkHelper { + fn collection(i: u16) -> CollectionId; + fn item(i: u16) -> ItemId; + } + #[cfg(feature = "runtime-benchmarks")] + impl, ItemId: From> BenchmarkHelper for () { + fn collection(i: u16) -> CollectionId { + i.into() + } + fn item(i: u16) -> ItemId { + i.into() + } + } #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config {} + pub trait Config: frame_system::Config + pallet_uniques::Config { + #[cfg(feature = "runtime-benchmarks")] + /// A set of helper functions for benchmarking. + type Helper: BenchmarkHelper; + } #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); From 6038b8e0ed21e56f0717af4a109f0b44e89585f9 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 03:30:37 +0900 Subject: [PATCH 025/101] fix test --- pallets/uniques/src/tests.rs | 162 +++++++++++++++++++---------------- 1 file changed, 86 insertions(+), 76 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index acd72c6c148..a4e75e0356a 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -2,7 +2,7 @@ use super::*; use crate as pallet_nodle_uniques; use frame_support::{ - assert_ok, construct_runtime, parameter_types, + assert_noop, assert_ok, construct_runtime, parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, }; use sp_core::H256; @@ -69,20 +69,7 @@ parameter_types! { pub TestCollectionDeposit: u64 = 2; pub TestItemDeposit: u64 = 1; } -#[cfg(feature = "runtime-benchmarks")] -pub trait BenchmarkHelper { - fn collection(i: u16) -> CollectionId; - fn item(i: u16) -> ItemId; -} -#[cfg(feature = "runtime-benchmarks")] -impl, ItemId: From> BenchmarkHelper for () { - fn collection(i: u16) -> CollectionId { - i.into() - } - fn item(i: u16) -> ItemId { - i.into() - } -} + impl pallet_uniques::Config for Test { type RuntimeEvent = RuntimeEvent; type CollectionId = u32; @@ -103,7 +90,10 @@ impl pallet_uniques::Config for Test { #[cfg(feature = "runtime-benchmarks")] type Helper = (); } -impl Config for Test {} +impl Config for Test { + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); +} macro_rules! bvec { ($( $x:tt )*) => { @@ -148,7 +138,7 @@ mod tests { )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id, item_owner, @@ -278,12 +268,15 @@ mod tests { TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); - assert_err!(Uniques::burn( - RuntimeOrigin::signed(not_collection_owner_id), - collection_id, - item_id, - None - )); + assert_noop!( + Uniques::burn( + RuntimeOrigin::signed(not_collection_owner_id), + collection_id, + item_id, + None + ), + pallet_uniques::Error::::NoPermission + ); // reserved balance should not have changed assert_eq!( @@ -293,61 +286,78 @@ mod tests { }) } - #[test] - fn test_destroy_collection() { - new_test_ext().execute_with(|| { - // let extra_deposit = 20; - // let collection_id = 0; - // let item_id = 10; - // let item_id2 = 12; - // let collection_owner_id = 1; - // let item_owner = 42; - // let init_balance = 100; - // Balances::make_free_balance_be(&collection_owner_id, init_balance); - // Balances::make_free_balance_be(&item_owner, init_balance); - // assert_ok!(Uniques::create( - // RuntimeOrigin::signed(collection_owner_id), - // collection_id, - // collection_owner_id - // )); - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() - // ); - // assert_ok!(Uniques::set_collection_metadata( - // RuntimeOrigin::signed(1), - // 0, - // bvec![0, 0], - // false - // )); + // #[test] + // fn test_destroy_collection() { + // new_test_ext().execute_with(|| { + // let extra_deposit = 20; + // let collection_id = 0; + // let item_id1 = 10; + // let item_id2 = 12; + // let item_id3 = 14; + // let collection_owner_id = 1; + // let item_owner = 42; + // let init_balance = 100; + // Balances::make_free_balance_be(&collection_owner_id, init_balance); + // Balances::make_free_balance_be(&item_owner, init_balance); + // assert_ok!(Uniques::create( + // RuntimeOrigin::signed(collection_owner_id), + // collection_id, + // collection_owner_id + // )); + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + // ); + // assert_ok!(Uniques::set_collection_metadata( + // RuntimeOrigin::signed(1), + // 0, + // bvec![0, 0], + // false + // )); - // assert_ok!(Uniques::mint_with_extra_deposit( - // RuntimeOrigin::signed(1), - // collection_id, - // item_id, - // item_owner, - // extra_deposit - // )); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id1, + // item_owner, + // extra_deposit + // )); - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - // ); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id2, + // item_owner, + // extra_deposit + // )); - // assert_ok!(Uniques::destr(RuntimeOrigin::signed(1), collection_id, item_id, None)); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id3, + // item_owner, + // extra_deposit + // )); - // // check if extra deposit is freed as well as the item deposit - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + 3 - // ); - // // check that the owner of the collection does not recover the reserved amount of the - // burnt item assert_eq!( - // Balances::free_balance(&collection_owner_id), - // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) - // ); - // // extra deposit transferred to the item owner free balance - // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); - }) - } + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + 3*TestItemDeposit::get() + 3*extra_deposit + 3 + // ); + + // assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, None)); + + // // check if extra deposit is freed as well as the item deposit + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + 3 + // ); + // // check that the owner of the collection does not recover the reserved amount of the + // burnt item assert_eq!( + // Balances::free_balance(&collection_owner_id), + // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) + // ); + // // extra deposit transferred to the item owner free balance + // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + // }) + // } } From c5e5768ae664326cf8792b5b1e6ae7d708b0517d Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 16 Jun 2023 12:39:11 +0900 Subject: [PATCH 026/101] Update bootnodes to static DNS (#752) --- node/res/eden.json | 6 +++--- node/res/eden.spec.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/node/res/eden.json b/node/res/eden.json index 5a1c2cc837d..c3504b60e1f 100644 --- a/node/res/eden.json +++ b/node/res/eden.json @@ -3,9 +3,9 @@ "id": "para_eden", "chainType": "Live", "bootNodes": [ - "/dns4/node-7028208459127902208-0.p2p.onfinality.io/tcp/20522/ws/p2p/12D3KooWMv1jzb45EMGZVGjqgoAjmqPrsYchHCQ13McFKL1r75b5", - "/dns4/node-6975196240558477312-0.p2p.onfinality.io/tcp/25394/ws/p2p/12D3KooW9tfcevBR9DjD1JznXY7TenxVoDvtuVKndjgWNizjGUCs", - "/dns4/node-7041161923479699456-0.p2p.onfinality.io/tcp/29357/ws/p2p/12D3KooWNq4J7wySh7uCGg81UMV7ziZVoASucFWH1wXuAUatukpX" + "/dns4/nodle-bootnode-0.p2p.onfinality.io/tcp/20522/ws/p2p/12D3KooWMv1jzb45EMGZVGjqgoAjmqPrsYchHCQ13McFKL1r75b5", + "/dns4/nodle-bootnode-1.p2p.onfinality.io/tcp/25394/ws/p2p/12D3KooW9tfcevBR9DjD1JznXY7TenxVoDvtuVKndjgWNizjGUCs", + "/dns4/nodle-bootnode-2.p2p.onfinality.io/tcp/29357/ws/p2p/12D3KooWNq4J7wySh7uCGg81UMV7ziZVoASucFWH1wXuAUatukpX" ], "telemetryEndpoints": [ [ diff --git a/node/res/eden.spec.json b/node/res/eden.spec.json index 0e3b4d50946..45d75dd5a81 100644 --- a/node/res/eden.spec.json +++ b/node/res/eden.spec.json @@ -3,9 +3,9 @@ "id": "para_eden", "chainType": "Live", "bootNodes": [ - "/dns4/node-7028208459127902208-0.p2p.onfinality.io/tcp/20522/ws/p2p/12D3KooWMv1jzb45EMGZVGjqgoAjmqPrsYchHCQ13McFKL1r75b5", - "/dns4/node-6975196240558477312-0.p2p.onfinality.io/tcp/25394/ws/p2p/12D3KooW9tfcevBR9DjD1JznXY7TenxVoDvtuVKndjgWNizjGUCs", - "/dns4/node-7041161923479699456-0.p2p.onfinality.io/tcp/29357/ws/p2p/12D3KooWNq4J7wySh7uCGg81UMV7ziZVoASucFWH1wXuAUatukpX" + "/dns4/nodle-bootnode-0.p2p.onfinality.io/tcp/20522/ws/p2p/12D3KooWMv1jzb45EMGZVGjqgoAjmqPrsYchHCQ13McFKL1r75b5", + "/dns4/nodle-bootnode-1.p2p.onfinality.io/tcp/25394/ws/p2p/12D3KooW9tfcevBR9DjD1JznXY7TenxVoDvtuVKndjgWNizjGUCs", + "/dns4/nodle-bootnode-2.p2p.onfinality.io/tcp/29357/ws/p2p/12D3KooWNq4J7wySh7uCGg81UMV7ziZVoASucFWH1wXuAUatukpX" ], "telemetryEndpoints": [ [ From 08037bf118ad8c0770203cce04e5f46ca78fa5e4 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 20 Jun 2023 09:18:54 +0900 Subject: [PATCH 027/101] test(pallet-uniques): add test_mint_and_burn_wrong_origin_with_extra_deposit --- pallets/uniques/src/tests.rs | 73 +++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 95fa8cc1acb..acd72c6c148 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -141,14 +141,14 @@ mod tests { TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), 0, bvec![0, 0], false )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id1), collection_id, item_id, item_owner, @@ -161,7 +161,7 @@ mod tests { ); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id2, item_owner, @@ -196,14 +196,14 @@ mod tests { TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), 0, bvec![0, 0], false )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id, item_owner, @@ -215,7 +215,12 @@ mod tests { TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); - assert_ok!(Uniques::burn(RuntimeOrigin::signed(1), collection_id, item_id, None)); + assert_ok!(Uniques::burn( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + None + )); // check if extra deposit is freed as well as the item deposit assert_eq!( @@ -231,6 +236,62 @@ mod tests { assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); }) } + #[test] + fn test_mint_and_burn_wrong_origin_with_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let item_id2 = 12; + let collection_owner_id = 1; + let not_collection_owner_id = 255; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + + assert_err!(Uniques::burn( + RuntimeOrigin::signed(not_collection_owner_id), + collection_id, + item_id, + None + )); + + // reserved balance should not have changed + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 + ); + }) + } #[test] fn test_destroy_collection() { From 2c873bd84cfc9cc44bd53b3b708e9c614da3a0e0 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 03:30:12 +0900 Subject: [PATCH 028/101] pallet-uniques: add benchmarks --- pallets/uniques/Cargo.toml | 8 +- pallets/uniques/src/benchmarking.rs | 157 ++++++++++++++++++++++++++++ pallets/uniques/src/lib.rs | 22 +++- 3 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 pallets/uniques/src/benchmarking.rs diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 20429d20143..67580ee331a 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -11,6 +11,7 @@ std = [ "serde", "scale-info/std", "frame-support/std", + "frame-benchmarking?/std", "frame-system/std", "sp-io/std", "sp-runtime/std", @@ -22,6 +23,11 @@ try-runtime = [ "frame-support/try-runtime", "pallet-uniques/try-runtime" ] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } @@ -37,6 +43,6 @@ sp-io = { git = "https://github.com/paritytech/substrate", default-features = fa sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } - +support = { path = "../../support" } [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } \ No newline at end of file diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs new file mode 100644 index 00000000000..d830d19b4b1 --- /dev/null +++ b/pallets/uniques/src/benchmarking.rs @@ -0,0 +1,157 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Uniques pallet benchmarking. + +#![cfg(feature = "runtime-benchmarks")] + +use super::*; +use frame_benchmarking::v1::{ + account, benchmarks, benchmarks_instance_pallet, whitelist_account, whitelisted_caller, BenchmarkError, +}; +use frame_support::{ + dispatch::UnfilteredDispatchable, + traits::{EnsureOrigin, Get}, + BoundedVec, +}; +use frame_system::RawOrigin as SystemOrigin; +use sp_runtime::traits::Bounded; +use sp_std::prelude::*; + +use crate::Pallet as Uniques; +const SEED: u32 = 0; + +fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let collection_owner: T::AccountId = account("colletction_owner", 0, SEED); + let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); + let collection_id = T::Helper::collection(0); + (collection_id, collection_owner, collection_owner_lookup) +} +fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); + assert!(Uniques::::force_create( + SystemOrigin::Root.into(), + collection_id.clone(), + collection_owner_lookup.clone(), + false, + ) + .is_ok()); + (collection_id, collection_owner, collection_owner_lookup) +} +fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_collection_metadata( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_metadata( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + item, + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_attribute, I: 'static>( + item: T::ItemId, +) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + let caller_lookup = T::Lookup::unlookup(caller.clone()); + let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); + assert!(Uniques::::set_attribute( + SystemOrigin::Signed(caller.clone()).into(), + T::Helper::collection(0), + Some(item), + key.clone(), + vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), + ) + .is_ok()); + (key, caller, caller_lookup) +} +fn mint_item_with_extra_deposit, I: 'static>( + index: u16, +) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let item = T::Helper::item(index); + assert!(Uniques::::mint_with_extra_deposit( + SystemOrigin::Signed(collection_owner.clone()).into(), + collection_id, + item, + collection_owner_lookup.clone(), + index.into(), + ) + .is_ok()); + (item, collection_owner, collection_owner_lookup) +} + +benchmarks_instance_pallet! { + + // destroy { + // let n in 0 .. 1_000; + // let m in 0 .. 1_000; + // let a in 0 .. 1_000; + + // let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + // add_collection_metadata::(); + // for i in 0..n { + // mint_item_with_extra_deposit::(i as u16); + // } + // for i in 0..m { + // add_item_metadata::(T::Helper::item(i as u16)); + // } + // for i in 0..a { + // add_item_attribute::(T::Helper::item(i as u16)); + // } + // let witness = Uniques2::Collection::::get(collection.clone()).unwrap().destroy_witness(); + // }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) + + mint_with_extra_deposit { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let item = T::Helper::item(0); + let deposit = BalanceOf::::max_value(); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, collection_owner_lookup, deposit) + + + burn { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let (item, ..) = mint_item_with_extra_deposit::(0); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, Some(collection_owner_lookup)) + + + + + impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); +} diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 8bd2616e383..d9de74711e1 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -25,6 +25,8 @@ pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::{prelude::*, vec::Vec}; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; #[cfg(test)] mod tests; @@ -39,8 +41,26 @@ pub mod pallet { use frame_system::pallet_prelude::*; use sp_runtime::DispatchResult; + #[cfg(feature = "runtime-benchmarks")] + pub trait BenchmarkHelper { + fn collection(i: u16) -> CollectionId; + fn item(i: u16) -> ItemId; + } + #[cfg(feature = "runtime-benchmarks")] + impl, ItemId: From> BenchmarkHelper for () { + fn collection(i: u16) -> CollectionId { + i.into() + } + fn item(i: u16) -> ItemId { + i.into() + } + } #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config {} + pub trait Config: frame_system::Config + pallet_uniques::Config { + #[cfg(feature = "runtime-benchmarks")] + /// A set of helper functions for benchmarking. + type Helper: BenchmarkHelper; + } #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); From dfb33c1a7bc31a2c515bfbf6eb83a75c27c09f7a Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 03:30:37 +0900 Subject: [PATCH 029/101] fix test --- pallets/uniques/src/tests.rs | 162 +++++++++++++++++++---------------- 1 file changed, 86 insertions(+), 76 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index acd72c6c148..a4e75e0356a 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -2,7 +2,7 @@ use super::*; use crate as pallet_nodle_uniques; use frame_support::{ - assert_ok, construct_runtime, parameter_types, + assert_noop, assert_ok, construct_runtime, parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, }; use sp_core::H256; @@ -69,20 +69,7 @@ parameter_types! { pub TestCollectionDeposit: u64 = 2; pub TestItemDeposit: u64 = 1; } -#[cfg(feature = "runtime-benchmarks")] -pub trait BenchmarkHelper { - fn collection(i: u16) -> CollectionId; - fn item(i: u16) -> ItemId; -} -#[cfg(feature = "runtime-benchmarks")] -impl, ItemId: From> BenchmarkHelper for () { - fn collection(i: u16) -> CollectionId { - i.into() - } - fn item(i: u16) -> ItemId { - i.into() - } -} + impl pallet_uniques::Config for Test { type RuntimeEvent = RuntimeEvent; type CollectionId = u32; @@ -103,7 +90,10 @@ impl pallet_uniques::Config for Test { #[cfg(feature = "runtime-benchmarks")] type Helper = (); } -impl Config for Test {} +impl Config for Test { + #[cfg(feature = "runtime-benchmarks")] + type Helper = (); +} macro_rules! bvec { ($( $x:tt )*) => { @@ -148,7 +138,7 @@ mod tests { )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(collection_owner_id1), + RuntimeOrigin::signed(collection_owner_id), collection_id, item_id, item_owner, @@ -278,12 +268,15 @@ mod tests { TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); - assert_err!(Uniques::burn( - RuntimeOrigin::signed(not_collection_owner_id), - collection_id, - item_id, - None - )); + assert_noop!( + Uniques::burn( + RuntimeOrigin::signed(not_collection_owner_id), + collection_id, + item_id, + None + ), + pallet_uniques::Error::::NoPermission + ); // reserved balance should not have changed assert_eq!( @@ -293,61 +286,78 @@ mod tests { }) } - #[test] - fn test_destroy_collection() { - new_test_ext().execute_with(|| { - // let extra_deposit = 20; - // let collection_id = 0; - // let item_id = 10; - // let item_id2 = 12; - // let collection_owner_id = 1; - // let item_owner = 42; - // let init_balance = 100; - // Balances::make_free_balance_be(&collection_owner_id, init_balance); - // Balances::make_free_balance_be(&item_owner, init_balance); - // assert_ok!(Uniques::create( - // RuntimeOrigin::signed(collection_owner_id), - // collection_id, - // collection_owner_id - // )); - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() - // ); - // assert_ok!(Uniques::set_collection_metadata( - // RuntimeOrigin::signed(1), - // 0, - // bvec![0, 0], - // false - // )); + // #[test] + // fn test_destroy_collection() { + // new_test_ext().execute_with(|| { + // let extra_deposit = 20; + // let collection_id = 0; + // let item_id1 = 10; + // let item_id2 = 12; + // let item_id3 = 14; + // let collection_owner_id = 1; + // let item_owner = 42; + // let init_balance = 100; + // Balances::make_free_balance_be(&collection_owner_id, init_balance); + // Balances::make_free_balance_be(&item_owner, init_balance); + // assert_ok!(Uniques::create( + // RuntimeOrigin::signed(collection_owner_id), + // collection_id, + // collection_owner_id + // )); + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + // ); + // assert_ok!(Uniques::set_collection_metadata( + // RuntimeOrigin::signed(1), + // 0, + // bvec![0, 0], + // false + // )); - // assert_ok!(Uniques::mint_with_extra_deposit( - // RuntimeOrigin::signed(1), - // collection_id, - // item_id, - // item_owner, - // extra_deposit - // )); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id1, + // item_owner, + // extra_deposit + // )); - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 - // ); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id2, + // item_owner, + // extra_deposit + // )); - // assert_ok!(Uniques::destr(RuntimeOrigin::signed(1), collection_id, item_id, None)); + // assert_ok!(Uniques::mint_with_extra_deposit( + // RuntimeOrigin::signed(1), + // collection_id, + // item_id3, + // item_owner, + // extra_deposit + // )); - // // check if extra deposit is freed as well as the item deposit - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + 3 - // ); - // // check that the owner of the collection does not recover the reserved amount of the - // burnt item assert_eq!( - // Balances::free_balance(&collection_owner_id), - // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) - // ); - // // extra deposit transferred to the item owner free balance - // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); - }) - } + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + 3*TestItemDeposit::get() + 3*extra_deposit + 3 + // ); + + // assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, None)); + + // // check if extra deposit is freed as well as the item deposit + // assert_eq!( + // Balances::reserved_balance(&collection_owner_id), + // TestCollectionDeposit::get() + 3 + // ); + // // check that the owner of the collection does not recover the reserved amount of the + // burnt item assert_eq!( + // Balances::free_balance(&collection_owner_id), + // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) + // ); + // // extra deposit transferred to the item owner free balance + // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + // }) + // } } From f1f2a507aa286e75b9e086e09c08a6b3a1750f18 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 11:35:50 +0900 Subject: [PATCH 030/101] pallet-uniques: update dependency to 9.42 --- Cargo.lock | 3 +-- pallets/uniques/Cargo.toml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a728d3e872d..4a865b7ce19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -200,7 +200,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -4135,7 +4134,6 @@ version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" - [[package]] name = "libloading" version = "0.7.4" @@ -6224,6 +6222,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "support", ] [[package]] diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 67580ee331a..ae462ac87f1 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -35,14 +35,14 @@ serde = { version = "1.0.152", optional = true, features = ["derive"] } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.40" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.42" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } support = { path = "../../support" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40" } \ No newline at end of file +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } \ No newline at end of file From 4b5019172f0d219a2df0284ca23323ca9715bcb2 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 13:05:00 +0900 Subject: [PATCH 031/101] pallet-uniques: comment benchmark for destroy --- pallets/uniques/src/benchmarking.rs | 98 ++++++++++++++--------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index d830d19b4b1..c9ba4505da3 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -67,55 +67,55 @@ fn add_collection_metadata, I: 'static>() -> (T::AccountId, Account .is_ok()); (caller, caller_lookup) } -fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - - let caller = collection_owner; - let caller_lookup = collection_owner_lookup; - assert!(Uniques::::set_metadata( - SystemOrigin::Signed(caller.clone()).into(), - T::Helper::collection(0), - item, - vec![0; T::StringLimit::get() as usize].try_into().unwrap(), - false, - ) - .is_ok()); - (caller, caller_lookup) -} -fn add_item_attribute, I: 'static>( - item: T::ItemId, -) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - - let caller = collection_owner; - let caller_lookup = collection_owner_lookup; - let caller_lookup = T::Lookup::unlookup(caller.clone()); - let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); - assert!(Uniques::::set_attribute( - SystemOrigin::Signed(caller.clone()).into(), - T::Helper::collection(0), - Some(item), - key.clone(), - vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), - ) - .is_ok()); - (key, caller, caller_lookup) -} -fn mint_item_with_extra_deposit, I: 'static>( - index: u16, -) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); - let item = T::Helper::item(index); - assert!(Uniques::::mint_with_extra_deposit( - SystemOrigin::Signed(collection_owner.clone()).into(), - collection_id, - item, - collection_owner_lookup.clone(), - index.into(), - ) - .is_ok()); - (item, collection_owner, collection_owner_lookup) -} +// fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { +// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + +// let caller = collection_owner; +// let caller_lookup = collection_owner_lookup; +// assert!(Uniques::::set_metadata( +// SystemOrigin::Signed(caller.clone()).into(), +// T::Helper::collection(0), +// item, +// vec![0; T::StringLimit::get() as usize].try_into().unwrap(), +// false, +// ) +// .is_ok()); +// (caller, caller_lookup) +// } +// fn add_item_attribute, I: 'static>( +// item: T::ItemId, +// ) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { +// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + +// let caller = collection_owner; +// let caller_lookup = collection_owner_lookup; +// let caller_lookup = T::Lookup::unlookup(caller.clone()); +// let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); +// assert!(Uniques::::set_attribute( +// SystemOrigin::Signed(caller.clone()).into(), +// T::Helper::collection(0), +// Some(item), +// key.clone(), +// vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), +// ) +// .is_ok()); +// (key, caller, caller_lookup) +// } +// fn mint_item_with_extra_deposit, I: 'static>( +// index: u16, +// ) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { +// let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); +// let item = T::Helper::item(index); +// assert!(Uniques::::mint_with_extra_deposit( +// SystemOrigin::Signed(collection_owner.clone()).into(), +// collection_id, +// item, +// collection_owner_lookup.clone(), +// index.into(), +// ) +// .is_ok()); +// (item, collection_owner, collection_owner_lookup) +// } benchmarks_instance_pallet! { From fcbe0b42093f9009088d2686b906ee9a02b6b836 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 13:11:20 +0900 Subject: [PATCH 032/101] fix: clippy --- pallets/uniques/src/benchmarking.rs | 4 +--- pallets/uniques/src/lib.rs | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index c9ba4505da3..aed9e459413 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -20,9 +20,7 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; -use frame_benchmarking::v1::{ - account, benchmarks, benchmarks_instance_pallet, whitelist_account, whitelisted_caller, BenchmarkError, -}; +use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; use frame_support::{ dispatch::UnfilteredDispatchable, traits::{EnsureOrigin, Get}, diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index d9de74711e1..cba438efbf1 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -24,7 +24,7 @@ use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; -use sp_std::{prelude::*, vec::Vec}; +use sp_std::vec::Vec; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] @@ -236,7 +236,7 @@ pub mod pallet { pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; let item_owner = pallet_uniques::Pallet::::owner(collection, item); pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - if let Some(extra_deposit) = ExtraDeposit::::take(&collection, &item) { + if let Some(extra_deposit) = ExtraDeposit::::take(collection, item) { if let Some(item_owner) = item_owner { >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( @@ -478,6 +478,7 @@ pub mod pallet { /// Weight: `O(1)` #[pallet::call_index(15)] #[pallet::weight(0)] + #[allow(clippy::too_many_arguments)] pub fn force_item_status( origin: OriginFor, collection: T::CollectionId, @@ -753,7 +754,7 @@ pub mod pallet { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; >::Currency::reserve(&collection_owner, deposit)?; - ExtraDeposit::::insert(&collection, &item, deposit); + ExtraDeposit::::insert(collection, item, deposit); Ok(()) }) } From 75dc6fc3bea662d95b3b9e41fe8daf01d363d108 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 13:12:59 +0900 Subject: [PATCH 033/101] pallet-uniques: uncomment benchmark mint_item_with_extra_deposit --- pallets/uniques/src/benchmarking.rs | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index aed9e459413..52d7f268aef 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -99,21 +99,21 @@ fn add_collection_metadata, I: 'static>() -> (T::AccountId, Account // .is_ok()); // (key, caller, caller_lookup) // } -// fn mint_item_with_extra_deposit, I: 'static>( -// index: u16, -// ) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { -// let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); -// let item = T::Helper::item(index); -// assert!(Uniques::::mint_with_extra_deposit( -// SystemOrigin::Signed(collection_owner.clone()).into(), -// collection_id, -// item, -// collection_owner_lookup.clone(), -// index.into(), -// ) -// .is_ok()); -// (item, collection_owner, collection_owner_lookup) -// } +fn mint_item_with_extra_deposit, I: 'static>( + index: u16, +) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let item = T::Helper::item(index); + assert!(Uniques::::mint_with_extra_deposit( + SystemOrigin::Signed(collection_owner.clone()).into(), + collection_id, + item, + collection_owner_lookup.clone(), + index.into(), + ) + .is_ok()); + (item, collection_owner, collection_owner_lookup) +} benchmarks_instance_pallet! { From 1418997d448d983303ee4975c69d8f1f054e060a Mon Sep 17 00:00:00 2001 From: Hounsette Date: Tue, 27 Jun 2023 13:14:46 +0900 Subject: [PATCH 034/101] clippy --- pallets/uniques/src/benchmarking.rs | 37 +++++++++++++---------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 52d7f268aef..cb0f31e04e8 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -21,11 +21,6 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; -use frame_support::{ - dispatch::UnfilteredDispatchable, - traits::{EnsureOrigin, Get}, - BoundedVec, -}; use frame_system::RawOrigin as SystemOrigin; use sp_runtime::traits::Bounded; use sp_std::prelude::*; @@ -44,27 +39,27 @@ fn create_collection, I: 'static>() -> (T::CollectionId, T::Account T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); assert!(Uniques::::force_create( SystemOrigin::Root.into(), - collection_id.clone(), + collection_id, collection_owner_lookup.clone(), false, ) .is_ok()); (collection_id, collection_owner, collection_owner_lookup) } -fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); +// fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { +// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - let caller = collection_owner; - let caller_lookup = collection_owner_lookup; - assert!(Uniques::::set_collection_metadata( - SystemOrigin::Signed(caller.clone()).into(), - T::Helper::collection(0), - vec![0; T::StringLimit::get() as usize].try_into().unwrap(), - false, - ) - .is_ok()); - (caller, caller_lookup) -} +// let caller = collection_owner; +// let caller_lookup = collection_owner_lookup; +// assert!(Uniques::::set_collection_metadata( +// SystemOrigin::Signed(caller.clone()).into(), +// T::Helper::collection(0), +// vec![0; T::StringLimit::get() as usize].try_into().unwrap(), +// false, +// ) +// .is_ok()); +// (caller, caller_lookup) +// } // fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { // let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); @@ -140,13 +135,13 @@ benchmarks_instance_pallet! { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); let item = T::Helper::item(0); let deposit = BalanceOf::::max_value(); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, collection_owner_lookup, deposit) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) burn { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); let (item, ..) = mint_item_with_extra_deposit::(0); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id.clone(), item, Some(collection_owner_lookup)) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) From 66298752ba6a83586af383446aebf5f89e1ce0f7 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 27 Jun 2023 16:27:41 +0900 Subject: [PATCH 035/101] Testrun of benchmarks --- runtimes/eden/src/weights/pallet_uniques.rs | 390 ++++++++++---------- 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/runtimes/eden/src/weights/pallet_uniques.rs b/runtimes/eden/src/weights/pallet_uniques.rs index 15e3bce0a83..4fa83dbc05f 100644 --- a/runtimes/eden/src/weights/pallet_uniques.rs +++ b/runtimes/eden/src/weights/pallet_uniques.rs @@ -19,17 +19,17 @@ //! Autogenerated weights for pallet_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/nodle-parachain +// target/release/nodle-parachain // benchmark // pallet // --chain=dev -// --steps=50 -// --repeat=20 +// --steps=8 +// --repeat=11 // --pallet=pallet_uniques // --extrinsic=* // --execution=wasm @@ -47,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -57,16 +57,16 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ClassAccount (r:0 w:1) - // Proof: Uniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn create() -> Weight { - // Minimum execution time: 51_290 nanoseconds. - Weight::from_parts(53_340_000_u64, 0) + // Minimum execution time: 46_988 nanoseconds. + Weight::from_parts(47_702_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -75,22 +75,22 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ClassAccount (r:0 w:1) - // Proof: Uniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_create() -> Weight { - // Minimum execution time: 25_911 nanoseconds. - Weight::from_parts(26_609_000_u64, 0) + // Minimum execution time: 24_034 nanoseconds. + Weight::from_parts(24_675_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1001 w:1000) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: Uniques InstanceMetadataOf (r:1000 w:1000) - // Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: Uniques Attribute (r:1000 w:1000) - // Proof: Uniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -99,26 +99,26 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ClassAccount (r:0 w:1) - // Proof: Uniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: Uniques ClassMetadataOf (r:0 w:1) - // Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: Uniques Account (r:0 w:1000) - // Proof: Uniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques CollectionMaxSupply (r:0 w:1) - // Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) /// The range of component `n` is `[0, 1000]`. /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_884_970 nanoseconds. - Weight::from_parts(2_910_680_000_u64, 0) - // Standard Error: 26_990 - .saturating_add(Weight::from_parts(10_215_116_u64, 0).saturating_mul(n as u64)) - // Standard Error: 26_990 - .saturating_add(Weight::from_parts(274_953_u64, 0).saturating_mul(m as u64)) - // Standard Error: 26_990 - .saturating_add(Weight::from_parts(329_508_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 2_707_170 nanoseconds. + Weight::from_parts(291_155_708_u64, 0) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(7_182_204_u64, 0).saturating_mul(n as u64)) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(1_162_388_u64, 0).saturating_mul(m as u64)) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(1_216_824_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -128,12 +128,12 @@ impl pallet_uniques::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) } - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques CollectionMaxSupply (r:1 w:0) - // Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -142,18 +142,18 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Account (r:0 w:1) - // Proof: Uniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn mint() -> Weight { - // Minimum execution time: 61_050 nanoseconds. - Weight::from_parts(62_800_000_u64, 0) + // Minimum execution time: 42_225 nanoseconds. + Weight::from_parts(42_592_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -162,20 +162,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Account (r:0 w:1) - // Proof: Uniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques ItemPriceOf (r:0 w:1) - // Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 63_810 nanoseconds. - Weight::from_parts(65_220_000_u64, 0) + // Minimum execution time: 44_017 nanoseconds. + Weight::from_parts(44_739_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -184,20 +184,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Account (r:0 w:2) - // Proof: Uniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques ItemPriceOf (r:0 w:1) - // Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:2) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn transfer() -> Weight { - // Minimum execution time: 45_230 nanoseconds. - Weight::from_parts(46_240_000_u64, 0) + // Minimum execution time: 31_201 nanoseconds. + Weight::from_parts(31_950_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:5000 w:5000) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:5000 w:5000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -208,19 +208,19 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - // Minimum execution time: 24_200 nanoseconds. - Weight::from_parts(24_690_000_u64, 0) - // Standard Error: 17_269 - .saturating_add(Weight::from_parts(27_927_662_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 17_054 nanoseconds. + Weight::from_parts(17_209_000_u64, 0) + // Standard Error: 31_935 + .saturating_add(Weight::from_parts(18_225_581_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) } - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -230,15 +230,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze() -> Weight { - // Minimum execution time: 30_590 nanoseconds. - Weight::from_parts(31_190_000_u64, 0) + // Minimum execution time: 21_441 nanoseconds. + Weight::from_parts(22_010_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -248,13 +248,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw() -> Weight { - // Minimum execution time: 29_950 nanoseconds. - Weight::from_parts(31_040_000_u64, 0) + // Minimum execution time: 21_632 nanoseconds. + Weight::from_parts(22_017_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -264,13 +264,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze_collection() -> Weight { - // Minimum execution time: 22_270 nanoseconds. - Weight::from_parts(22_970_000_u64, 0) + // Minimum execution time: 15_941 nanoseconds. + Weight::from_parts(16_315_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -280,15 +280,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw_collection() -> Weight { - // Minimum execution time: 22_200 nanoseconds. - Weight::from_parts(22_880_000_u64, 0) + // Minimum execution time: 15_927 nanoseconds. + Weight::from_parts(16_400_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques OwnershipAcceptance (r:1 w:1) - // Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -297,16 +297,16 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ClassAccount (r:0 w:2) - // Proof: Uniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 35_990 nanoseconds. - Weight::from_parts(36_660_000_u64, 0) + // Minimum execution time: 25_054 nanoseconds. + Weight::from_parts(25_420_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -316,13 +316,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_team() -> Weight { - // Minimum execution time: 23_270 nanoseconds. - Weight::from_parts(24_080_000_u64, 0) + // Minimum execution time: 16_619 nanoseconds. + Weight::from_parts(16_905_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -331,20 +331,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ClassAccount (r:0 w:1) - // Proof: Uniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_item_status() -> Weight { - // Minimum execution time: 27_340 nanoseconds. - Weight::from_parts(27_900_000_u64, 0) + // Minimum execution time: 19_596 nanoseconds. + Weight::from_parts(19_904_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques InstanceMetadataOf (r:1 w:0) - // Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: Uniques Attribute (r:1 w:1) - // Proof: Uniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1 w:1) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -354,17 +354,17 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_attribute() -> Weight { - // Minimum execution time: 67_940 nanoseconds. - Weight::from_parts(69_000_000_u64, 0) + // Minimum execution time: 46_776 nanoseconds. + Weight::from_parts(47_116_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques InstanceMetadataOf (r:1 w:0) - // Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: Uniques Attribute (r:1 w:1) - // Proof: Uniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1 w:1) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -374,15 +374,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_attribute() -> Weight { - // Minimum execution time: 63_070 nanoseconds. - Weight::from_parts(64_030_000_u64, 0) + // Minimum execution time: 44_091 nanoseconds. + Weight::from_parts(45_006_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques InstanceMetadataOf (r:1 w:1) - // Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -392,15 +392,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_metadata() -> Weight { - // Minimum execution time: 50_980 nanoseconds. - Weight::from_parts(51_950_000_u64, 0) + // Minimum execution time: 35_699 nanoseconds. + Weight::from_parts(36_366_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques InstanceMetadataOf (r:1 w:1) - // Proof: Uniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -410,15 +410,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_metadata() -> Weight { - // Minimum execution time: 51_609 nanoseconds. - Weight::from_parts(52_949_000_u64, 0) + // Minimum execution time: 36_573 nanoseconds. + Weight::from_parts(36_853_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:1) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques ClassMetadataOf (r:1 w:1) - // Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -428,15 +428,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_metadata() -> Weight { - // Minimum execution time: 53_120 nanoseconds. - Weight::from_parts(54_530_000_u64, 0) + // Minimum execution time: 36_968 nanoseconds. + Weight::from_parts(37_562_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques ClassMetadataOf (r:1 w:1) - // Proof: Uniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -446,15 +446,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_collection_metadata() -> Weight { - // Minimum execution time: 50_510 nanoseconds. - Weight::from_parts(51_210_000_u64, 0) + // Minimum execution time: 35_887 nanoseconds. + Weight::from_parts(36_289_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -464,15 +464,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn approve_transfer() -> Weight { - // Minimum execution time: 31_630 nanoseconds. - Weight::from_parts(32_320_000_u64, 0) + // Minimum execution time: 22_518 nanoseconds. + Weight::from_parts(23_136_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -482,13 +482,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn cancel_approval() -> Weight { - // Minimum execution time: 31_190 nanoseconds. - Weight::from_parts(32_000_000_u64, 0) + // Minimum execution time: 22_680 nanoseconds. + Weight::from_parts(23_962_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques OwnershipAcceptance (r:1 w:1) - // Proof: Uniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -498,15 +498,15 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_accept_ownership() -> Weight { - // Minimum execution time: 25_790 nanoseconds. - Weight::from_parts(26_530_000_u64, 0) + // Minimum execution time: 18_176 nanoseconds. + Weight::from_parts(18_597_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) - // Proof: Uniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -516,13 +516,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_max_supply() -> Weight { - // Minimum execution time: 25_430 nanoseconds. - Weight::from_parts(26_310_000_u64, 0) + // Minimum execution time: 18_929 nanoseconds. + Weight::from_parts(21_410_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Asset (r:1 w:0) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:0) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -531,20 +531,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques ItemPriceOf (r:0 w:1) - // Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn set_price() -> Weight { - // Minimum execution time: 26_380 nanoseconds. - Weight::from_parts(27_070_000_u64, 0) + // Minimum execution time: 19_445 nanoseconds. + Weight::from_parts(19_595_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: Uniques ItemPriceOf (r:1 w:1) - // Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - // Storage: Uniques Class (r:1 w:0) - // Proof: Uniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:1 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -553,11 +553,11 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Account (r:0 w:2) - // Proof: Uniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:2) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn buy_item() -> Weight { - // Minimum execution time: 61_190 nanoseconds. - Weight::from_parts(62_290_000_u64, 0) + // Minimum execution time: 43_806 nanoseconds. + Weight::from_parts(44_693_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } From b9c1eebf1b0ee5574afdfdadb335aa508d19ac55 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 27 Jun 2023 17:06:57 +0900 Subject: [PATCH 036/101] Testcase updated to v0.9.42 Testcase must use existetial deposit >0 New types added --- pallets/uniques/src/tests.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index a4e75e0356a..abea595669f 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -59,11 +59,19 @@ impl pallet_balances::Config for Test { type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxLocks = (); - type ExistentialDeposit = (); + type ExistentialDeposit = ConstU64<1>; type AccountStore = frame_system::Pallet; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type WeightInfo = (); + #[doc = " The ID type for holds."] + type HoldIdentifier = [u8; 8]; + #[doc = " The ID type for freezes."] + type FreezeIdentifier = [u8; 8]; + #[doc = " The maximum number of holds that can exist on an account at any time."] + type MaxHolds = (); + #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] + type MaxFreezes = (); } parameter_types! { pub TestCollectionDeposit: u64 = 2; @@ -170,7 +178,6 @@ mod tests { let extra_deposit = 20; let collection_id = 0; let item_id = 10; - let item_id2 = 12; let collection_owner_id = 1; let item_owner = 42; let init_balance = 100; @@ -232,7 +239,6 @@ mod tests { let extra_deposit = 20; let collection_id = 0; let item_id = 10; - let item_id2 = 12; let collection_owner_id = 1; let not_collection_owner_id = 255; let item_owner = 42; From 23847c621e5fd44606d75bcd6414a849d4762f8d Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 28 Jun 2023 10:16:00 +0900 Subject: [PATCH 037/101] Integrate new weights --- pallets/uniques/src/lib.rs | 46 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index cba438efbf1..d8b502432b2 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -22,7 +22,7 @@ use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; -use pallet_uniques::DestroyWitness; +use pallet_uniques::{DestroyWitness, WeightInfo}; use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; #[cfg(feature = "runtime-benchmarks")] @@ -100,7 +100,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(0)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::create())] pub fn create( origin: OriginFor, collection: T::CollectionId, @@ -126,7 +126,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(1)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::force_create())] pub fn force_create( origin: OriginFor, collection: T::CollectionId, @@ -152,7 +152,11 @@ pub mod pallet { /// - `m = witness.item_metadatas` /// - `a = witness.attributes` #[pallet::call_index(2)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::destroy( + witness.items, + witness.item_metadatas, + witness.attributes, + ))] pub fn destroy( origin: OriginFor, collection: T::CollectionId, @@ -199,7 +203,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(3)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::mint())] pub fn mint( origin: OriginFor, collection: T::CollectionId, @@ -225,7 +229,7 @@ pub mod pallet { /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. #[pallet::call_index(4)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::burn())] pub fn burn( origin: OriginFor, collection: T::CollectionId, @@ -268,7 +272,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(5)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::transfer())] pub fn transfer( origin: OriginFor, collection: T::CollectionId, @@ -296,7 +300,7 @@ pub mod pallet { /// /// Weight: `O(items.len())` #[pallet::call_index(6)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::redeposit(items.len() as u32))] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { pallet_uniques::Pallet::::redeposit(origin, collection, items) } @@ -312,7 +316,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(7)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::freeze())] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::freeze(origin, collection, item) } @@ -328,7 +332,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(8)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::thaw())] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::thaw(origin, collection, item) } @@ -343,7 +347,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(9)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::freeze_collection())] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::freeze_collection(origin, collection) } @@ -358,7 +362,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(10)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::thaw_collection())] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::thaw_collection(origin, collection) } @@ -375,7 +379,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(11)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::transfer_ownership())] pub fn transfer_ownership( origin: OriginFor, collection: T::CollectionId, @@ -397,7 +401,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(12)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_team())] pub fn set_team( origin: OriginFor, collection: T::CollectionId, @@ -450,7 +454,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(14)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::cancel_approval())] pub fn cancel_approval( origin: OriginFor, collection: T::CollectionId, @@ -519,7 +523,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(16)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_attribute())] pub fn set_attribute( origin: OriginFor, collection: T::CollectionId, @@ -573,7 +577,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(18)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_metadata())] pub fn set_metadata( origin: OriginFor, collection: T::CollectionId, @@ -620,7 +624,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(20)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_collection_metadata())] pub fn set_collection_metadata( origin: OriginFor, collection: T::CollectionId, @@ -659,7 +663,7 @@ pub mod pallet { /// /// Emits `OwnershipAcceptanceChanged`. #[pallet::call_index(22)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_accept_ownership())] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) } @@ -697,7 +701,7 @@ pub mod pallet { /// Emits `ItemPriceSet` on success if the price is not `None`. /// Emits `ItemPriceRemoved` on success if the price is `None`. #[pallet::call_index(24)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_price())] pub fn set_price( origin: OriginFor, collection: T::CollectionId, @@ -718,7 +722,7 @@ pub mod pallet { /// /// Emits `ItemBought` on success. #[pallet::call_index(25)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::buy_item())] #[transactional] pub fn buy_item( origin: OriginFor, From 3b0c8a21fb81861ca95855c7aaa5f601be8ac0fa Mon Sep 17 00:00:00 2001 From: Hounsette Date: Wed, 28 Jun 2023 13:14:39 +0900 Subject: [PATCH 038/101] pallet-uniques: benchmarks --- pallets/uniques/src/benchmarking.rs | 2 +- pallets/uniques/src/lib.rs | 66 +++++++++++++++++------------ 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index cb0f31e04e8..00380e3c4e0 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -31,7 +31,7 @@ const SEED: u32 = 0; fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { let collection_owner: T::AccountId = account("colletction_owner", 0, SEED); let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); - let collection_id = T::Helper::collection(0); + let collection_id = >::Helper::collection(0); (collection_id, collection_owner, collection_owner_lookup) } fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index cba438efbf1..3c0ef8c6ba3 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -25,6 +25,11 @@ pub use pallet::*; use pallet_uniques::DestroyWitness; use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; + +mod weights; +//pub use weights::WeightInfo; +use pallet_uniques::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] @@ -59,7 +64,10 @@ pub mod pallet { pub trait Config: frame_system::Config + pallet_uniques::Config { #[cfg(feature = "runtime-benchmarks")] /// A set of helper functions for benchmarking. - type Helper: BenchmarkHelper; + type Helper: BenchmarkHelper< + >::CollectionId, + >::ItemId, + >; } #[pallet::pallet] @@ -100,7 +108,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(0)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::create())] pub fn create( origin: OriginFor, collection: T::CollectionId, @@ -126,7 +134,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(1)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::force_create())] pub fn force_create( origin: OriginFor, collection: T::CollectionId, @@ -152,7 +160,9 @@ pub mod pallet { /// - `m = witness.item_metadatas` /// - `a = witness.attributes` #[pallet::call_index(2)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::destroy(witness.items, + witness.item_metadatas, + witness.attributes,))] pub fn destroy( origin: OriginFor, collection: T::CollectionId, @@ -199,7 +209,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(3)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::mint())] pub fn mint( origin: OriginFor, collection: T::CollectionId, @@ -225,7 +235,7 @@ pub mod pallet { /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. #[pallet::call_index(4)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::create())] pub fn burn( origin: OriginFor, collection: T::CollectionId, @@ -268,7 +278,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(5)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::transfer())] pub fn transfer( origin: OriginFor, collection: T::CollectionId, @@ -296,7 +306,7 @@ pub mod pallet { /// /// Weight: `O(items.len())` #[pallet::call_index(6)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::redeposit(items.len() as u32))] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { pallet_uniques::Pallet::::redeposit(origin, collection, items) } @@ -312,7 +322,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(7)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::freeze())] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::freeze(origin, collection, item) } @@ -328,7 +338,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(8)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::thaw())] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::thaw(origin, collection, item) } @@ -343,7 +353,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(9)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::freeze_collection())] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::freeze_collection(origin, collection) } @@ -358,7 +368,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(10)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::thaw_collection())] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::thaw_collection(origin, collection) } @@ -375,7 +385,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(11)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::transfer_ownership())] pub fn transfer_ownership( origin: OriginFor, collection: T::CollectionId, @@ -397,7 +407,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(12)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_team())] pub fn set_team( origin: OriginFor, collection: T::CollectionId, @@ -423,7 +433,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(13)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::approve_transfer())] pub fn approve_transfer( origin: OriginFor, collection: T::CollectionId, @@ -450,7 +460,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(14)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::cancel_approval())] pub fn cancel_approval( origin: OriginFor, collection: T::CollectionId, @@ -477,7 +487,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(15)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::force_item_status())] #[allow(clippy::too_many_arguments)] pub fn force_item_status( origin: OriginFor, @@ -519,7 +529,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(16)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_attribute())] pub fn set_attribute( origin: OriginFor, collection: T::CollectionId, @@ -545,7 +555,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(17)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::clear_attribute())] pub fn clear_attribute( origin: OriginFor, collection: T::CollectionId, @@ -573,7 +583,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(18)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_metadata())] pub fn set_metadata( origin: OriginFor, collection: T::CollectionId, @@ -598,7 +608,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(19)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::clear_metadata())] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::clear_metadata(origin, collection, item) } @@ -620,7 +630,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(20)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_collection_metadata())] pub fn set_collection_metadata( origin: OriginFor, collection: T::CollectionId, @@ -643,7 +653,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(21)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::clear_collection_metadata())] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) } @@ -659,7 +669,7 @@ pub mod pallet { /// /// Emits `OwnershipAcceptanceChanged`. #[pallet::call_index(22)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_accept_ownership())] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) } @@ -676,7 +686,7 @@ pub mod pallet { /// /// Emits `CollectionMaxSupplySet` event when successful. #[pallet::call_index(23)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_collection_max_supply())] pub fn set_collection_max_supply( origin: OriginFor, collection: T::CollectionId, @@ -697,7 +707,7 @@ pub mod pallet { /// Emits `ItemPriceSet` on success if the price is not `None`. /// Emits `ItemPriceRemoved` on success if the price is `None`. #[pallet::call_index(24)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::set_price())] pub fn set_price( origin: OriginFor, collection: T::CollectionId, @@ -718,7 +728,7 @@ pub mod pallet { /// /// Emits `ItemBought` on success. #[pallet::call_index(25)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::buy_item())] #[transactional] pub fn buy_item( origin: OriginFor, @@ -741,7 +751,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(26)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::mint())] #[transactional] pub fn mint_with_extra_deposit( origin: OriginFor, From d02c659e09c7e7fe4903f2788570ac0bc9fb13c0 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Wed, 28 Jun 2023 13:21:30 +0900 Subject: [PATCH 039/101] add weights.rs --- pallets/uniques/src/weights.rs | 564 +++++++++++++++++++++++++++++++++ 1 file changed, 564 insertions(+) create mode 100644 pallets/uniques/src/weights.rs diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs new file mode 100644 index 00000000000..4fa83dbc05f --- /dev/null +++ b/pallets/uniques/src/weights.rs @@ -0,0 +1,564 @@ +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//! Autogenerated weights for pallet_uniques +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/nodle-parachain +// benchmark +// pallet +// --chain=dev +// --steps=8 +// --repeat=11 +// --pallet=pallet_uniques +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --template=./.maintain/external_pallet_weights.hbs +// --output=runtimes/eden/src/weights + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight}}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_uniques`. +pub struct WeightInfo(PhantomData); +impl pallet_uniques::WeightInfo for WeightInfo { + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn create() -> Weight { + // Minimum execution time: 46_988 nanoseconds. + Weight::from_parts(47_702_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn force_create() -> Weight { + // Minimum execution time: 24_034 nanoseconds. + Weight::from_parts(24_675_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 2_707_170 nanoseconds. + Weight::from_parts(291_155_708_u64, 0) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(7_182_204_u64, 0).saturating_mul(n as u64)) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(1_162_388_u64, 0).saturating_mul(m as u64)) + // Standard Error: 31_683 + .saturating_add(Weight::from_parts(1_216_824_u64, 0).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(T::DbWeight::get().writes(6_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + fn mint() -> Weight { + // Minimum execution time: 42_225 nanoseconds. + Weight::from_parts(42_592_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { + // Minimum execution time: 44_017 nanoseconds. + Weight::from_parts(44_739_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:2) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn transfer() -> Weight { + // Minimum execution time: 31_201 nanoseconds. + Weight::from_parts(31_950_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:5000 w:5000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `i` is `[0, 5000]`. + fn redeposit(i: u32, ) -> Weight { + // Minimum execution time: 17_054 nanoseconds. + Weight::from_parts(17_209_000_u64, 0) + // Standard Error: 31_935 + .saturating_add(Weight::from_parts(18_225_581_u64, 0).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i as u64))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn freeze() -> Weight { + // Minimum execution time: 21_441 nanoseconds. + Weight::from_parts(22_010_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn thaw() -> Weight { + // Minimum execution time: 21_632 nanoseconds. + Weight::from_parts(22_017_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn freeze_collection() -> Weight { + // Minimum execution time: 15_941 nanoseconds. + Weight::from_parts(16_315_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn thaw_collection() -> Weight { + // Minimum execution time: 15_927 nanoseconds. + Weight::from_parts(16_400_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn transfer_ownership() -> Weight { + // Minimum execution time: 25_054 nanoseconds. + Weight::from_parts(25_420_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_team() -> Weight { + // Minimum execution time: 16_619 nanoseconds. + Weight::from_parts(16_905_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + fn force_item_status() -> Weight { + // Minimum execution time: 19_596 nanoseconds. + Weight::from_parts(19_904_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1 w:1) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_attribute() -> Weight { + // Minimum execution time: 46_776 nanoseconds. + Weight::from_parts(47_116_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1 w:1) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn clear_attribute() -> Weight { + // Minimum execution time: 44_091 nanoseconds. + Weight::from_parts(45_006_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_metadata() -> Weight { + // Minimum execution time: 35_699 nanoseconds. + Weight::from_parts(36_366_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn clear_metadata() -> Weight { + // Minimum execution time: 36_573 nanoseconds. + Weight::from_parts(36_853_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_collection_metadata() -> Weight { + // Minimum execution time: 36_968 nanoseconds. + Weight::from_parts(37_562_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn clear_collection_metadata() -> Weight { + // Minimum execution time: 35_887 nanoseconds. + Weight::from_parts(36_289_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn approve_transfer() -> Weight { + // Minimum execution time: 22_518 nanoseconds. + Weight::from_parts(23_136_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn cancel_approval() -> Weight { + // Minimum execution time: 22_680 nanoseconds. + Weight::from_parts(23_962_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_accept_ownership() -> Weight { + // Minimum execution time: 18_176 nanoseconds. + Weight::from_parts(18_597_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + fn set_collection_max_supply() -> Weight { + // Minimum execution time: 18_929 nanoseconds. + Weight::from_parts(21_410_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Asset (r:1 w:0) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn set_price() -> Weight { + // Minimum execution time: 19_445 nanoseconds. + Weight::from_parts(19_595_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:1 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:2) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + fn buy_item() -> Weight { + // Minimum execution time: 43_806 nanoseconds. + Weight::from_parts(44_693_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } +} From 460f73d9c64152a2de5877893d258f4495702a74 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 28 Jun 2023 13:40:03 +0900 Subject: [PATCH 040/101] Merge conflict --- pallets/uniques/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 5716238e1e1..64c662dd8e3 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -26,9 +26,7 @@ use pallet_uniques::{DestroyWitness, WeightInfo}; use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; -mod weights; -//pub use weights::WeightInfo; -use pallet_uniques::WeightInfo; +// mod weights; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; From 447cdda14bc7ae0432d2cec47c76e421d5e894e1 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 29 Jun 2023 10:39:55 +1200 Subject: [PATCH 041/101] fix(pallet-nodle-uniques): reuse the pallet-uniques's benchmark helper --- pallets/uniques/Cargo.toml | 1 + pallets/uniques/src/benchmarking.rs | 3 ++- pallets/uniques/src/lib.rs | 23 +---------------------- pallets/uniques/src/tests.rs | 5 +---- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index ae462ac87f1..42d55ffc9ab 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -27,6 +27,7 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "pallet-uniques/runtime-benchmarks", ] [dependencies] diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 00380e3c4e0..18860af2eda 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -22,6 +22,7 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; use frame_system::RawOrigin as SystemOrigin; +use pallet_uniques::BenchmarkHelper; use sp_runtime::traits::Bounded; use sp_std::prelude::*; @@ -31,7 +32,7 @@ const SEED: u32 = 0; fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { let collection_owner: T::AccountId = account("colletction_owner", 0, SEED); let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); - let collection_id = >::Helper::collection(0); + let collection_id = >::Helper::collection(0); (collection_id, collection_owner, collection_owner_lookup) } fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 64c662dd8e3..3d2352012a7 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -44,29 +44,8 @@ pub mod pallet { use frame_system::pallet_prelude::*; use sp_runtime::DispatchResult; - #[cfg(feature = "runtime-benchmarks")] - pub trait BenchmarkHelper { - fn collection(i: u16) -> CollectionId; - fn item(i: u16) -> ItemId; - } - #[cfg(feature = "runtime-benchmarks")] - impl, ItemId: From> BenchmarkHelper for () { - fn collection(i: u16) -> CollectionId { - i.into() - } - fn item(i: u16) -> ItemId { - i.into() - } - } #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config { - #[cfg(feature = "runtime-benchmarks")] - /// A set of helper functions for benchmarking. - type Helper: BenchmarkHelper< - >::CollectionId, - >::ItemId, - >; - } + pub trait Config: frame_system::Config + pallet_uniques::Config {} #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index abea595669f..3bf8604cbf7 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -98,10 +98,7 @@ impl pallet_uniques::Config for Test { #[cfg(feature = "runtime-benchmarks")] type Helper = (); } -impl Config for Test { - #[cfg(feature = "runtime-benchmarks")] - type Helper = (); -} +impl Config for Test {} macro_rules! bvec { ($( $x:tt )*) => { From 038c524206e2555a2190b8ec46edde813fc0e744 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 08:05:04 +0900 Subject: [PATCH 042/101] pallet_uniques: Becnhmarks: add destroy benchmark --- pallets/uniques/src/benchmarking.rs | 136 ++++++++++++++-------------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 18860af2eda..9068b82ed13 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -21,6 +21,7 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; +use frame_support::{traits::Get, BoundedVec}; use frame_system::RawOrigin as SystemOrigin; use pallet_uniques::BenchmarkHelper; use sp_runtime::traits::Bounded; @@ -47,54 +48,51 @@ fn create_collection, I: 'static>() -> (T::CollectionId, T::Account .is_ok()); (collection_id, collection_owner, collection_owner_lookup) } -// fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { -// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - -// let caller = collection_owner; -// let caller_lookup = collection_owner_lookup; -// assert!(Uniques::::set_collection_metadata( -// SystemOrigin::Signed(caller.clone()).into(), -// T::Helper::collection(0), -// vec![0; T::StringLimit::get() as usize].try_into().unwrap(), -// false, -// ) -// .is_ok()); -// (caller, caller_lookup) -// } -// fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { -// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - -// let caller = collection_owner; -// let caller_lookup = collection_owner_lookup; -// assert!(Uniques::::set_metadata( -// SystemOrigin::Signed(caller.clone()).into(), -// T::Helper::collection(0), -// item, -// vec![0; T::StringLimit::get() as usize].try_into().unwrap(), -// false, -// ) -// .is_ok()); -// (caller, caller_lookup) -// } -// fn add_item_attribute, I: 'static>( -// item: T::ItemId, -// ) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { -// let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); - -// let caller = collection_owner; -// let caller_lookup = collection_owner_lookup; -// let caller_lookup = T::Lookup::unlookup(caller.clone()); -// let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); -// assert!(Uniques::::set_attribute( -// SystemOrigin::Signed(caller.clone()).into(), -// T::Helper::collection(0), -// Some(item), -// key.clone(), -// vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), -// ) -// .is_ok()); -// (key, caller, caller_lookup) -// } +fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_collection_metadata( + SystemOrigin::Signed(caller.clone()).into(), + >::Helper::collection(0), + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_metadata, I: 'static>(item: T::ItemId) -> (T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let caller = collection_owner; + let caller_lookup = collection_owner_lookup; + assert!(Uniques::::set_metadata( + SystemOrigin::Signed(caller.clone()).into(), + >::Helper::collection(0), + item, + vec![0; T::StringLimit::get() as usize].try_into().unwrap(), + false, + ) + .is_ok()); + (caller, caller_lookup) +} +fn add_item_attribute, I: 'static>( + item: T::ItemId, +) -> (BoundedVec, T::AccountId, AccountIdLookupOf) { + let (.., collection_owner, collection_owner_lookup) = get_config::(); + + let key: BoundedVec<_, _> = vec![0; T::KeyLimit::get() as usize].try_into().unwrap(); + assert!(Uniques::::set_attribute( + SystemOrigin::Signed(collection_owner.clone()).into(), + >::Helper::collection(0), + Some(item), + key.clone(), + vec![0; T::ValueLimit::get() as usize].try_into().unwrap(), + ) + .is_ok()); + (key, collection_owner, collection_owner_lookup) +} fn mint_item_with_extra_deposit, I: 'static>( index: u16, ) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { @@ -113,28 +111,32 @@ fn mint_item_with_extra_deposit, I: 'static>( benchmarks_instance_pallet! { - // destroy { - // let n in 0 .. 1_000; - // let m in 0 .. 1_000; - // let a in 0 .. 1_000; - - // let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); - // add_collection_metadata::(); - // for i in 0..n { - // mint_item_with_extra_deposit::(i as u16); - // } - // for i in 0..m { - // add_item_metadata::(T::Helper::item(i as u16)); - // } - // for i in 0..a { - // add_item_attribute::(T::Helper::item(i as u16)); - // } - // let witness = Uniques2::Collection::::get(collection.clone()).unwrap().destroy_witness(); - // }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) + destroy { + let n in 0 .. 1_000; + let m in 0 .. 1_000; + let a in 0 .. 1_000; + + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + add_collection_metadata::(); + for i in 0..n { + mint_item_with_extra_deposit::(i as u16); + } + for i in 0..m { + add_item_metadata::(T::Helper::item(i as u16)); + } + for i in 0..a { + add_item_attribute::(T::Helper::item(i as u16)); + } + let witness = DestroyWitness{ + items: n, + item_metadatas: m, + attributes: a, + }; + }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) mint_with_extra_deposit { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); - let item = T::Helper::item(0); + let item = >::Helper::item(0); let deposit = BalanceOf::::max_value(); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) From 63e988df32434a49d8736035584bac786c07bb53 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 29 Jun 2023 11:29:34 +1200 Subject: [PATCH 043/101] fix(pallet-nodle-uniques): fix benchmark for mint_with_extra_deposit --- pallets/uniques/src/benchmarking.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 9068b82ed13..c7165afca6e 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -21,7 +21,8 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; -use frame_support::{traits::Get, BoundedVec}; +use frame_support::assert_ok; +use frame_support::traits::OriginTrait; use frame_system::RawOrigin as SystemOrigin; use pallet_uniques::BenchmarkHelper; use sp_runtime::traits::Bounded; @@ -36,16 +37,16 @@ fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, Acc let collection_id = >::Helper::collection(0); (collection_id, collection_owner, collection_owner_lookup) } + fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - assert!(Uniques::::force_create( - SystemOrigin::Root.into(), + assert_ok!(Uniques::::force_create( + T::RuntimeOrigin::root(), collection_id, collection_owner_lookup.clone(), false, - ) - .is_ok()); + )); (collection_id, collection_owner, collection_owner_lookup) } fn add_collection_metadata, I: 'static>() -> (T::AccountId, AccountIdLookupOf) { @@ -136,8 +137,8 @@ benchmarks_instance_pallet! { mint_with_extra_deposit { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); - let item = >::Helper::item(0); - let deposit = BalanceOf::::max_value(); + let item = T::Helper::item(0); + let deposit = 5u32.into(); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) From bcb6f909441ed3da9621e648325241a844dafee7 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 29 Jun 2023 11:34:37 +1200 Subject: [PATCH 044/101] fix(pallet-nodle-uniques): fix merge --- pallets/uniques/src/benchmarking.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index c7165afca6e..5abfebed04a 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -21,8 +21,11 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; -use frame_support::assert_ok; -use frame_support::traits::OriginTrait; +use frame_support::{ + assert_ok, + traits::{Get, OriginTrait}, + BoundedVec, +}; use frame_system::RawOrigin as SystemOrigin; use pallet_uniques::BenchmarkHelper; use sp_runtime::traits::Bounded; From 00d73937f88252b8066d0d05d7a8b409a44c4b3f Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 08:57:13 +0900 Subject: [PATCH 045/101] fix(pallet-uniques): benchmarls --- pallets/uniques/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 5abfebed04a..c92ab50f758 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -100,7 +100,7 @@ fn add_item_attribute, I: 'static>( fn mint_item_with_extra_deposit, I: 'static>( index: u16, ) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); let item = T::Helper::item(index); assert!(Uniques::::mint_with_extra_deposit( SystemOrigin::Signed(collection_owner.clone()).into(), From 7e4bc3def0482471d5971db26341eac5c38f18fd Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 09:15:32 +0900 Subject: [PATCH 046/101] pallet-uniques: Add nodle uniques to list benchmarks --- pallets/uniques/Cargo.toml | 2 +- runtimes/eden/Cargo.toml | 1 + runtimes/eden/src/lib.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 42d55ffc9ab..6674358bac5 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -27,7 +27,7 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "pallet-uniques/runtime-benchmarks", + "pallet-uniques/runtime-benchmarks", ] [dependencies] diff --git a/runtimes/eden/Cargo.toml b/runtimes/eden/Cargo.toml index 0db9006bcc7..57ee4aa975c 100644 --- a/runtimes/eden/Cargo.toml +++ b/runtimes/eden/Cargo.toml @@ -93,6 +93,7 @@ runtime-benchmarks = [ "pallet-preimage/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", + "pallet-nodle-uniques/runtime-benchmarks", "pallet-utility/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", "pallet-membership/runtime-benchmarks", diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index b9d57eb9b16..e57328c75dd 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -367,6 +367,7 @@ sp_api::impl_runtime_apis! { list_benchmark!(list, extra, pallet_reserve, CompanyReserve); list_benchmark!(list, extra, pallet_grants, Vesting); list_benchmark!(list, extra, pallet_uniques, SubstrateUniques); + list_benchmark!(list, extra, pallet_nodle_uniques, Uniques); list_benchmark!(list, extra, pallet_utility, Utility); list_benchmark!(list, extra, pallet_allocations, Allocations); list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection); @@ -408,6 +409,7 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, pallet_reserve, CompanyReserve); add_benchmark!(params, batches, pallet_grants, Vesting); add_benchmark!(params, batches, pallet_uniques, SubstrateUniques); + add_benchmark!(params, batches, pallet_nodle_uniques, Uniques); add_benchmark!(params, batches, pallet_utility, Utility); add_benchmark!(params, batches, pallet_allocations, Allocations); add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection); From 352799e717b29934f5df821862c4c4c78018ed18 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 11:09:59 +0900 Subject: [PATCH 047/101] bench --- pallets/uniques/src/lib.rs | 11 +- pallets/uniques/src/weights.rs | 534 +++++++-------------------------- 2 files changed, 123 insertions(+), 422 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 3d2352012a7..d7854d0b3d5 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -26,7 +26,10 @@ use pallet_uniques::{DestroyWitness, WeightInfo}; use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; -// mod weights; +mod weights; + +use weights::WeightInfo as NodleWeightInfo; + #[cfg(feature = "runtime-benchmarks")] mod benchmarking; @@ -137,7 +140,7 @@ pub mod pallet { /// - `m = witness.item_metadatas` /// - `a = witness.attributes` #[pallet::call_index(2)] - #[pallet::weight(T::WeightInfo::destroy( + #[pallet::weight( as NodleWeightInfo>::destroy( witness.items, witness.item_metadatas, witness.attributes, @@ -214,7 +217,7 @@ pub mod pallet { /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. #[pallet::call_index(4)] - #[pallet::weight(T::WeightInfo::burn())] + #[pallet::weight( as NodleWeightInfo>::burn())] pub fn burn( origin: OriginFor, collection: T::CollectionId, @@ -730,7 +733,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(26)] - #[pallet::weight(T::WeightInfo::mint())] + #[pallet::weight( as NodleWeightInfo>::mint_with_extra_deposit())] #[transactional] pub fn mint_with_extra_deposit( origin: OriginFor, diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 4fa83dbc05f..f0e7a055388 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -16,81 +16,56 @@ * along with this program. If not, see . */ -//! Autogenerated weights for pallet_uniques +//! Autogenerated weights for pallet_nodle_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `2`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `MacBook-Pro-2`, CPU: `` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/nodle-parachain +// ./target/release/nodle-parachain // benchmark // pallet // --chain=dev -// --steps=8 -// --repeat=11 -// --pallet=pallet_uniques +// --steps=2 +// --repeat=1 +// --pallet=pallet_nodle_uniques // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --template=./.maintain/external_pallet_weights.hbs +// --template=./.maintain/internal_pallet_weights.hbs // --output=runtimes/eden/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; use core::marker::PhantomData; -/// Weight functions for `pallet_uniques`. -pub struct WeightInfo(PhantomData); -impl pallet_uniques::WeightInfo for WeightInfo { - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn create() -> Weight { - // Minimum execution time: 46_988 nanoseconds. - Weight::from_parts(47_702_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn force_create() -> Weight { - // Minimum execution time: 24_034 nanoseconds. - Weight::from_parts(24_675_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } +/// Weight functions needed for pallet_nodle_uniques. +pub trait WeightInfo { + fn destroy(n: u32, m: u32, a: u32, ) -> Weight; + fn mint_with_extra_deposit() -> Weight; + fn burn() -> Weight; +} + +/// Weight functions for `pallet_nodle_uniques`. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:1001 w:1000) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1001 w:1000) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) // Storage: SubstrateUniques Attribute (r:1000 w:1000) // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -111,20 +86,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_707_170 nanoseconds. - Weight::from_parts(291_155_708_u64, 0) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(7_182_204_u64, 0).saturating_mul(n as u64)) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(1_162_388_u64, 0).saturating_mul(m as u64)) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(1_216_824_u64, 0).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n as u64))) + // Minimum execution time: 3_548_000 nanoseconds. + Weight::from_parts(296_333_333_u64, 0) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(30_107_333_u64, 0).saturating_mul(n as u64)) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(1_870_333_u64, 0).saturating_mul(m as u64)) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(1_381_333_u64, 0).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) - .saturating_add(T::DbWeight::get().writes(6_u64)) - .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) } @@ -134,6 +109,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -144,16 +121,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - fn mint() -> Weight { - // Minimum execution time: 42_225 nanoseconds. - Weight::from_parts(42_592_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(5_u64)) + // Storage: Uniques Asset (r:0 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + fn mint_with_extra_deposit() -> Weight { + // Minimum execution time: 75_000 nanoseconds. + Weight::from_parts(75_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1 w:1) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -162,209 +143,33 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques Asset (r:1 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 44_017 nanoseconds. - Weight::from_parts(44_739_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques Account (r:0 w:2) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - fn transfer() -> Weight { - // Minimum execution time: 31_201 nanoseconds. - Weight::from_parts(31_950_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) + // Minimum execution time: 65_000 nanoseconds. + Weight::from_parts(65_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } +} + +impl WeightInfo for () { // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:5000 w:5000) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `i` is `[0, 5000]`. - fn redeposit(i: u32, ) -> Weight { - // Minimum execution time: 17_054 nanoseconds. - Weight::from_parts(17_209_000_u64, 0) - // Standard Error: 31_935 - .saturating_add(Weight::from_parts(18_225_581_u64, 0).saturating_mul(i as u64)) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i as u64))) - .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) - } - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn freeze() -> Weight { - // Minimum execution time: 21_441 nanoseconds. - Weight::from_parts(22_010_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Asset (r:1 w:1) + // Storage: Uniques Asset (r:1001 w:1000) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn thaw() -> Weight { - // Minimum execution time: 21_632 nanoseconds. - Weight::from_parts(22_017_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn freeze_collection() -> Weight { - // Minimum execution time: 15_941 nanoseconds. - Weight::from_parts(16_315_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn thaw_collection() -> Weight { - // Minimum execution time: 15_927 nanoseconds. - Weight::from_parts(16_400_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) - // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:2) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn transfer_ownership() -> Weight { - // Minimum execution time: 25_054 nanoseconds. - Weight::from_parts(25_420_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_team() -> Weight { - // Minimum execution time: 16_619 nanoseconds. - Weight::from_parts(16_905_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - fn force_item_status() -> Weight { - // Minimum execution time: 19_596 nanoseconds. - Weight::from_parts(19_904_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1 w:1) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_attribute() -> Weight { - // Minimum execution time: 46_776 nanoseconds. - Weight::from_parts(47_116_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:0) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1 w:1) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -373,140 +178,43 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn clear_attribute() -> Weight { - // Minimum execution time: 44_091 nanoseconds. - Weight::from_parts(45_006_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_metadata() -> Weight { - // Minimum execution time: 35_699 nanoseconds. - Weight::from_parts(36_366_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1 w:1) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn clear_metadata() -> Weight { - // Minimum execution time: 36_573 nanoseconds. - Weight::from_parts(36_853_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) - // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_collection_metadata() -> Weight { - // Minimum execution time: 36_968 nanoseconds. - Weight::from_parts(37_562_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:1 w:1) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn clear_collection_metadata() -> Weight { - // Minimum execution time: 35_887 nanoseconds. - Weight::from_parts(36_289_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 3_548_000 nanoseconds. + Weight::from_parts(296_333_333_u64, 0) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(30_107_333_u64, 0).saturating_mul(n as u64)) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(1_870_333_u64, 0).saturating_mul(m as u64)) + // Standard Error: 326_121 + .saturating_add(Weight::from_parts(1_381_333_u64, 0).saturating_mul(a as u64)) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(RocksDbWeight::get().writes(7_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a as u64))) } - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1 w:1) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn approve_transfer() -> Weight { - // Minimum execution time: 22_518 nanoseconds. - Weight::from_parts(23_136_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Class (r:1 w:0) + // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn cancel_approval() -> Weight { - // Minimum execution time: 22_680 nanoseconds. - Weight::from_parts(23_962_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) - // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_accept_ownership() -> Weight { - // Minimum execution time: 18_176 nanoseconds. - Weight::from_parts(18_597_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:1) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -515,36 +223,22 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - fn set_collection_max_supply() -> Weight { - // Minimum execution time: 18_929 nanoseconds. - Weight::from_parts(21_410_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - // Storage: SubstrateUniques Asset (r:1 w:0) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - fn set_price() -> Weight { - // Minimum execution time: 19_445 nanoseconds. - Weight::from_parts(19_595_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:0 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + fn mint_with_extra_deposit() -> Weight { + // Minimum execution time: 75_000 nanoseconds. + Weight::from_parts(75_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1 w:1) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:1 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:0) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System ExecutionPhase (r:1 w:0) @@ -553,12 +247,16 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques Account (r:0 w:2) + // Storage: Uniques Asset (r:1 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - fn buy_item() -> Weight { - // Minimum execution time: 43_806 nanoseconds. - Weight::from_parts(44_693_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(7_u64)) - .saturating_add(T::DbWeight::get().writes(6_u64)) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { + // Minimum execution time: 65_000 nanoseconds. + Weight::from_parts(65_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } } From acb0dafb28eedf811c191ea2a40c30f696b4fdf8 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 11:20:39 +0900 Subject: [PATCH 048/101] update bench script --- scripts/run_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 19f871d6b94..dba28654c1f 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -6,7 +6,7 @@ REPEAT="${2:-20}" export external="frame_system pallet_balances pallet_collator_selection pallet_contracts pallet_membership\ pallet_multisig pallet_preimage pallet_scheduler pallet_timestamp pallet_uniques pallet_utility pallet_xcm" -export internal="pallet_allocations pallet_grants pallet_reserve" +export internal="pallet_allocations pallet_grants pallet_reserve pallet_nodle_uniques" export xcm_generic_extrinsic="report_holding, buy_execution, query_response, transact, refund_surplus,\ set_error_handler, set_appendix, clear_error, descend_origin, clear_origin, report_error, claim_asset, trap, \ subscribe_version, unsubscribe_version, initiate_reserve_withdraw, burn_asset, expect_asset, expect_origin,\ From 95b6717d750727540efc1a9bbdddd998b4060c48 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 11:31:45 +0900 Subject: [PATCH 049/101] fmt --- pallets/uniques/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index d7854d0b3d5..4e4ada0db85 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -30,7 +30,6 @@ mod weights; use weights::WeightInfo as NodleWeightInfo; - #[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] From 366fa4314fa3a447770efd896adef81ae87cb14a Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 29 Jun 2023 14:55:12 +1200 Subject: [PATCH 050/101] Clearly separate nodle weights from uniques weights (#761) * Revert "update bench script" This reverts commit acb0dafb28eedf811c191ea2a40c30f696b4fdf8. * Revert "bench" This reverts commit 352799e717b29934f5df821862c4c4c78018ed18. * fix(pallet-nodle-uniques): reuse pallet-uniques benchmarking as much as possible * fix(pallet-nodle-uniques): use our own weights for extrinsics specific to Nodle --- pallets/uniques/src/lib.rs | 66 ++++----- pallets/uniques/src/tests.rs | 4 +- pallets/uniques/src/weights.rs | 229 ++++-------------------------- runtimes/eden/src/pallets_util.rs | 4 +- scripts/run_benchmarks.sh | 2 +- 5 files changed, 65 insertions(+), 240 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 4e4ada0db85..3e58cbf19af 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -22,13 +22,12 @@ use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; -use pallet_uniques::{DestroyWitness, WeightInfo}; +use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; -mod weights; - -use weights::WeightInfo as NodleWeightInfo; +pub mod weights; +pub use weights::WeightInfo; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; @@ -47,7 +46,10 @@ pub mod pallet { use sp_runtime::DispatchResult; #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config {} + pub trait Config: frame_system::Config + pallet_uniques::Config { + /// Weight information for extrinsics specific to this pallet. + type WeightInfo: WeightInfo; + } #[pallet::pallet] pub struct Pallet(PhantomData<(T, I)>); @@ -87,7 +89,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::create())] + #[pallet::weight(>::WeightInfo::create())] pub fn create( origin: OriginFor, collection: T::CollectionId, @@ -113,7 +115,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::force_create())] + #[pallet::weight(>::WeightInfo::force_create())] pub fn force_create( origin: OriginFor, collection: T::CollectionId, @@ -139,7 +141,7 @@ pub mod pallet { /// - `m = witness.item_metadatas` /// - `a = witness.attributes` #[pallet::call_index(2)] - #[pallet::weight( as NodleWeightInfo>::destroy( + #[pallet::weight(>::WeightInfo::destroy( witness.items, witness.item_metadatas, witness.attributes, @@ -190,7 +192,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::mint())] + #[pallet::weight(>::WeightInfo::mint())] pub fn mint( origin: OriginFor, collection: T::CollectionId, @@ -216,7 +218,7 @@ pub mod pallet { /// Weight: `O(1)` /// Modes: `check_owner.is_some()`. #[pallet::call_index(4)] - #[pallet::weight( as NodleWeightInfo>::burn())] + #[pallet::weight(>::WeightInfo::burn())] pub fn burn( origin: OriginFor, collection: T::CollectionId, @@ -259,7 +261,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(5)] - #[pallet::weight(T::WeightInfo::transfer())] + #[pallet::weight(>::WeightInfo::transfer())] pub fn transfer( origin: OriginFor, collection: T::CollectionId, @@ -287,7 +289,7 @@ pub mod pallet { /// /// Weight: `O(items.len())` #[pallet::call_index(6)] - #[pallet::weight(T::WeightInfo::redeposit(items.len() as u32))] + #[pallet::weight(>::WeightInfo::redeposit(items.len() as u32))] pub fn redeposit(origin: OriginFor, collection: T::CollectionId, items: Vec) -> DispatchResult { pallet_uniques::Pallet::::redeposit(origin, collection, items) } @@ -303,7 +305,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(7)] - #[pallet::weight(T::WeightInfo::freeze())] + #[pallet::weight(>::WeightInfo::freeze())] pub fn freeze(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::freeze(origin, collection, item) } @@ -319,7 +321,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(8)] - #[pallet::weight(T::WeightInfo::thaw())] + #[pallet::weight(>::WeightInfo::thaw())] pub fn thaw(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::thaw(origin, collection, item) } @@ -334,7 +336,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(9)] - #[pallet::weight(T::WeightInfo::freeze_collection())] + #[pallet::weight(>::WeightInfo::freeze_collection())] pub fn freeze_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::freeze_collection(origin, collection) } @@ -349,7 +351,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(10)] - #[pallet::weight(T::WeightInfo::thaw_collection())] + #[pallet::weight(>::WeightInfo::thaw_collection())] pub fn thaw_collection(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::thaw_collection(origin, collection) } @@ -366,7 +368,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(11)] - #[pallet::weight(T::WeightInfo::transfer_ownership())] + #[pallet::weight(>::WeightInfo::transfer_ownership())] pub fn transfer_ownership( origin: OriginFor, collection: T::CollectionId, @@ -388,7 +390,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(12)] - #[pallet::weight(T::WeightInfo::set_team())] + #[pallet::weight(>::WeightInfo::set_team())] pub fn set_team( origin: OriginFor, collection: T::CollectionId, @@ -414,7 +416,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(13)] - #[pallet::weight(T::WeightInfo::approve_transfer())] + #[pallet::weight(>::WeightInfo::approve_transfer())] pub fn approve_transfer( origin: OriginFor, collection: T::CollectionId, @@ -441,7 +443,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(14)] - #[pallet::weight(T::WeightInfo::cancel_approval())] + #[pallet::weight(>::WeightInfo::cancel_approval())] pub fn cancel_approval( origin: OriginFor, collection: T::CollectionId, @@ -468,7 +470,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(15)] - #[pallet::weight(T::WeightInfo::force_item_status())] + #[pallet::weight(>::WeightInfo::force_item_status())] #[allow(clippy::too_many_arguments)] pub fn force_item_status( origin: OriginFor, @@ -510,7 +512,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(16)] - #[pallet::weight(T::WeightInfo::set_attribute())] + #[pallet::weight(>::WeightInfo::set_attribute())] pub fn set_attribute( origin: OriginFor, collection: T::CollectionId, @@ -536,7 +538,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(17)] - #[pallet::weight(T::WeightInfo::clear_attribute())] + #[pallet::weight(>::WeightInfo::clear_attribute())] pub fn clear_attribute( origin: OriginFor, collection: T::CollectionId, @@ -564,7 +566,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(18)] - #[pallet::weight(T::WeightInfo::set_metadata())] + #[pallet::weight(>::WeightInfo::set_metadata())] pub fn set_metadata( origin: OriginFor, collection: T::CollectionId, @@ -589,7 +591,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(19)] - #[pallet::weight(T::WeightInfo::clear_metadata())] + #[pallet::weight(>::WeightInfo::clear_metadata())] pub fn clear_metadata(origin: OriginFor, collection: T::CollectionId, item: T::ItemId) -> DispatchResult { pallet_uniques::Pallet::::clear_metadata(origin, collection, item) } @@ -611,7 +613,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(20)] - #[pallet::weight(T::WeightInfo::set_collection_metadata())] + #[pallet::weight(>::WeightInfo::set_collection_metadata())] pub fn set_collection_metadata( origin: OriginFor, collection: T::CollectionId, @@ -634,7 +636,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(21)] - #[pallet::weight(T::WeightInfo::clear_collection_metadata())] + #[pallet::weight(>::WeightInfo::clear_collection_metadata())] pub fn clear_collection_metadata(origin: OriginFor, collection: T::CollectionId) -> DispatchResult { pallet_uniques::Pallet::::clear_collection_metadata(origin, collection) } @@ -650,7 +652,7 @@ pub mod pallet { /// /// Emits `OwnershipAcceptanceChanged`. #[pallet::call_index(22)] - #[pallet::weight(T::WeightInfo::set_accept_ownership())] + #[pallet::weight(>::WeightInfo::set_accept_ownership())] pub fn set_accept_ownership(origin: OriginFor, maybe_collection: Option) -> DispatchResult { pallet_uniques::Pallet::::set_accept_ownership(origin, maybe_collection) } @@ -667,7 +669,7 @@ pub mod pallet { /// /// Emits `CollectionMaxSupplySet` event when successful. #[pallet::call_index(23)] - #[pallet::weight(T::WeightInfo::set_collection_max_supply())] + #[pallet::weight(>::WeightInfo::set_collection_max_supply())] pub fn set_collection_max_supply( origin: OriginFor, collection: T::CollectionId, @@ -688,7 +690,7 @@ pub mod pallet { /// Emits `ItemPriceSet` on success if the price is not `None`. /// Emits `ItemPriceRemoved` on success if the price is `None`. #[pallet::call_index(24)] - #[pallet::weight(T::WeightInfo::set_price())] + #[pallet::weight(>::WeightInfo::set_price())] pub fn set_price( origin: OriginFor, collection: T::CollectionId, @@ -709,7 +711,7 @@ pub mod pallet { /// /// Emits `ItemBought` on success. #[pallet::call_index(25)] - #[pallet::weight(T::WeightInfo::buy_item())] + #[pallet::weight(>::WeightInfo::buy_item())] #[transactional] pub fn buy_item( origin: OriginFor, @@ -732,7 +734,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(26)] - #[pallet::weight( as NodleWeightInfo>::mint_with_extra_deposit())] + #[pallet::weight(>::WeightInfo::mint_with_extra_deposit())] #[transactional] pub fn mint_with_extra_deposit( origin: OriginFor, diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 3bf8604cbf7..f429dd1a683 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -98,7 +98,9 @@ impl pallet_uniques::Config for Test { #[cfg(feature = "runtime-benchmarks")] type Helper = (); } -impl Config for Test {} +impl Config for Test { + type WeightInfo = (); +} macro_rules! bvec { ($( $x:tt )*) => { diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index f0e7a055388..8685acf238c 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -16,247 +16,66 @@ * along with this program. If not, see . */ -//! Autogenerated weights for pallet_nodle_uniques +//! Autogenerated weights for pallet_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `2`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `MacBook-Pro-2`, CPU: `` +//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/nodle-parachain +// target/release/nodle-parachain // benchmark // pallet // --chain=dev -// --steps=2 -// --repeat=1 +// --steps=8 +// --repeat=11 // --pallet=pallet_nodle_uniques // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --template=./.maintain/internal_pallet_weights.hbs +// --template=./.maintain/external_pallet_weights.hbs // --output=runtimes/eden/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; +use frame_support::{traits::Get, weights::{Weight}}; use core::marker::PhantomData; /// Weight functions needed for pallet_nodle_uniques. pub trait WeightInfo { - fn destroy(n: u32, m: u32, a: u32, ) -> Weight; fn mint_with_extra_deposit() -> Weight; fn burn() -> Weight; + fn destroy(n: u32, m: u32, a: u32, ) -> Weight; } -/// Weight functions for `pallet_nodle_uniques`. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1001 w:1000) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1001 w:1000) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) - // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1000) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// The range of component `n` is `[0, 1000]`. - /// The range of component `m` is `[0, 1000]`. - /// The range of component `a` is `[0, 1000]`. - fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_548_000 nanoseconds. - Weight::from_parts(296_333_333_u64, 0) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(30_107_333_u64, 0).saturating_mul(n as u64)) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(1_870_333_u64, 0).saturating_mul(m as u64)) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(1_381_333_u64, 0).saturating_mul(a as u64)) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) - .saturating_add(T::DbWeight::get().writes(7_u64)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n as u64))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) - } - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:0 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 75_000 nanoseconds. - Weight::from_parts(75_000_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(7_u64)) + Weight::from_parts(0, 0) } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { - // Minimum execution time: 65_000 nanoseconds. - Weight::from_parts(65_000_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + Weight::from_parts(0, 0) + } + + fn destroy(_n: u32, _m: u32, _a: u32) -> Weight { + Weight::from_parts(0, 0) } } impl WeightInfo for () { - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1001 w:1000) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1001 w:1000) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques ClassAccount (r:0 w:1) - // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) - // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) - // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1000) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// The range of component `n` is `[0, 1000]`. - /// The range of component `m` is `[0, 1000]`. - /// The range of component `a` is `[0, 1000]`. - fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_548_000 nanoseconds. - Weight::from_parts(296_333_333_u64, 0) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(30_107_333_u64, 0).saturating_mul(n as u64)) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(1_870_333_u64, 0).saturating_mul(m as u64)) - // Standard Error: 326_121 - .saturating_add(Weight::from_parts(1_381_333_u64, 0).saturating_mul(a as u64)) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) - .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a as u64))) - .saturating_add(RocksDbWeight::get().writes(7_u64)) - .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n as u64))) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m as u64))) - .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a as u64))) - } - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) - // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:0 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 75_000 nanoseconds. - Weight::from_parts(75_000_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(7_u64)) + Weight::from_parts(0, 0) } - // Storage: SubstrateUniques Class (r:1 w:1) - // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: SubstrateUniques Asset (r:1 w:1) - // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: System Account (r:1 w:1) - // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - // Storage: System Number (r:1 w:0) - // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System ExecutionPhase (r:1 w:0) - // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - // Storage: System EventCount (r:1 w:1) - // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - // Storage: System Events (r:1 w:1) - // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - // Storage: SubstrateUniques Account (r:0 w:1) - // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) - // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) + fn burn() -> Weight { - // Minimum execution time: 65_000 nanoseconds. - Weight::from_parts(65_000_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(8_u64)) + Weight::from_parts(0, 0) } -} + + fn destroy(_n: u32, _m: u32, _a: u32) -> Weight { + Weight::from_parts(0, 0) + } +} \ No newline at end of file diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index c73c817dd6c..3c7c304fd13 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -138,7 +138,9 @@ impl pallet_uniques::Config for Runtime { type Locker = (); } -impl pallet_nodle_uniques::Config for Runtime {} +impl pallet_nodle_uniques::Config for Runtime { + type WeightInfo = pallet_nodle_uniques::weights::SubstrateWeight; +} parameter_types! { pub const DepositPerItem: Balance = constants::deposit(1, 0); diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index dba28654c1f..19f871d6b94 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -6,7 +6,7 @@ REPEAT="${2:-20}" export external="frame_system pallet_balances pallet_collator_selection pallet_contracts pallet_membership\ pallet_multisig pallet_preimage pallet_scheduler pallet_timestamp pallet_uniques pallet_utility pallet_xcm" -export internal="pallet_allocations pallet_grants pallet_reserve pallet_nodle_uniques" +export internal="pallet_allocations pallet_grants pallet_reserve" export xcm_generic_extrinsic="report_holding, buy_execution, query_response, transact, refund_surplus,\ set_error_handler, set_appendix, clear_error, descend_origin, clear_origin, report_error, claim_asset, trap, \ subscribe_version, unsubscribe_version, initiate_reserve_withdraw, burn_asset, expect_asset, expect_origin,\ From bfb7f900da6b9bc2f987a6420d7a87a9b021081e Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 12:00:23 +0900 Subject: [PATCH 051/101] pallet-unique-nodle: add to script becnh --- scripts/run_benchmarks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 19f871d6b94..dba28654c1f 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -6,7 +6,7 @@ REPEAT="${2:-20}" export external="frame_system pallet_balances pallet_collator_selection pallet_contracts pallet_membership\ pallet_multisig pallet_preimage pallet_scheduler pallet_timestamp pallet_uniques pallet_utility pallet_xcm" -export internal="pallet_allocations pallet_grants pallet_reserve" +export internal="pallet_allocations pallet_grants pallet_reserve pallet_nodle_uniques" export xcm_generic_extrinsic="report_holding, buy_execution, query_response, transact, refund_surplus,\ set_error_handler, set_appendix, clear_error, descend_origin, clear_origin, report_error, claim_asset, trap, \ subscribe_version, unsubscribe_version, initiate_reserve_withdraw, burn_asset, expect_asset, expect_origin,\ From 2f456717ff67f3a5c508418efa0a94008fb82fa8 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 12:11:41 +0900 Subject: [PATCH 052/101] Remove auto generated headers --- pallets/uniques/src/weights.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 8685acf238c..5eddbf83002 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -16,26 +16,6 @@ * along with this program. If not, see . */ -//! Autogenerated weights for pallet_uniques -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 - -// Executed Command: -// target/release/nodle-parachain -// benchmark -// pallet -// --chain=dev -// --steps=8 -// --repeat=11 -// --pallet=pallet_nodle_uniques -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --template=./.maintain/external_pallet_weights.hbs -// --output=runtimes/eden/src/weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] From 469de839968b3f6e345ce7025ca26f1afa485a36 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 29 Jun 2023 15:16:38 +1200 Subject: [PATCH 053/101] benchmark(pallet-nodle-uniques): local benchmark --- pallets/uniques/src/weights.rs | 240 ++++++++++++++++++++++++++++++--- 1 file changed, 223 insertions(+), 17 deletions(-) diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 5eddbf83002..34b46100e25 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -16,46 +16,252 @@ * along with this program. If not, see . */ +//! Autogenerated weights for pallet_nodle_uniques +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-06-29, STEPS: `2`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// ./target/release/nodle-parachain +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_nodle_uniques +// --extrinsic +// * +// --steps +// 2 +// --repeat +// 1 +// --output +// ./weights.rs +// --template +// ./.maintain/internal_pallet_weights.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight}}; +use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; use core::marker::PhantomData; /// Weight functions needed for pallet_nodle_uniques. pub trait WeightInfo { + fn destroy(n: u32, m: u32, a: u32, ) -> Weight; fn mint_with_extra_deposit() -> Weight; fn burn() -> Weight; - fn destroy(n: u32, m: u32, a: u32, ) -> Weight; } +/// Weight functions for `pallet_nodle_uniques`. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:1001 w:1000) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 2_964_000 nanoseconds. + Weight::from_parts(2_964_000_000_u64, 0) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(25_211_769_u64, 0).saturating_mul(n as u64)) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(420_769_u64, 0).saturating_mul(m as u64)) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(560_769_u64, 0).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:0 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 64_000 nanoseconds. + Weight::from_parts(64_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } - + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques Asset (r:1 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - Weight::from_parts(0, 0) - } - - fn destroy(_n: u32, _m: u32, _a: u32) -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 55_000 nanoseconds. + Weight::from_parts(55_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } } impl WeightInfo for () { + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:1001 w:1000) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1001 w:1000) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) + // Proof: SubstrateUniques ClassMetadataOf (max_values: None, max_size: Some(167), added: 2642, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1000) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:0 w:1) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. + fn destroy(n: u32, m: u32, a: u32, ) -> Weight { + // Minimum execution time: 2_964_000 nanoseconds. + Weight::from_parts(2_964_000_000_u64, 0) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(25_211_769_u64, 0).saturating_mul(n as u64)) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(420_769_u64, 0).saturating_mul(m as u64)) + // Standard Error: 1_176_728 + .saturating_add(Weight::from_parts(560_769_u64, 0).saturating_mul(a as u64)) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(a as u64))) + .saturating_add(RocksDbWeight::get().writes(7_u64)) + .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(m as u64))) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(a as u64))) + } + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques CollectionMaxSupply (r:1 w:0) + // Proof: SubstrateUniques CollectionMaxSupply (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: Uniques Asset (r:0 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 64_000 nanoseconds. + Weight::from_parts(64_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(7_u64)) } - + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: SubstrateUniques Asset (r:1 w:1) + // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques Asset (r:1 w:1) + // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: SubstrateUniques Account (r:0 w:1) + // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) + // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) + // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 55_000 nanoseconds. + Weight::from_parts(55_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } - - fn destroy(_n: u32, _m: u32, _a: u32) -> Weight { - Weight::from_parts(0, 0) - } -} \ No newline at end of file +} From f68d9b59d92c4f769789a9a0a8e06fd2d8b9c14f Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 12:24:14 +0900 Subject: [PATCH 054/101] Indentation --- pallets/uniques/Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 6674358bac5..fc9bd5030f1 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -24,9 +24,9 @@ try-runtime = [ "pallet-uniques/try-runtime" ] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", ] @@ -46,4 +46,4 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } support = { path = "../../support" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } \ No newline at end of file +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.42" } From 7feea0ad1badb21deeac8b611b2ef77f235f9de3 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 12:29:02 +0900 Subject: [PATCH 055/101] Code clean up, Removed a trap for future maintainer --- pallets/uniques/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 3e58cbf19af..bca56e85e88 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -27,7 +27,7 @@ use sp_runtime::traits::StaticLookup; use sp_std::vec::Vec; pub mod weights; -pub use weights::WeightInfo; +pub use weights::WeightInfo as NodleWeightInfo; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; @@ -48,7 +48,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_uniques::Config { /// Weight information for extrinsics specific to this pallet. - type WeightInfo: WeightInfo; + type WeightInfo: NodleWeightInfo; } #[pallet::pallet] From fd08e6e43389c0e1d00a8d9573d188e149632401 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 13:41:55 +0900 Subject: [PATCH 056/101] Clippy --fix --- pallets/uniques/src/tests.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index f429dd1a683..95b9f23e879 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -115,7 +115,7 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { ext } #[cfg(test)] -mod tests { +mod test_cases { use super::*; #[test] @@ -134,7 +134,7 @@ mod tests { collection_owner_id )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( @@ -153,7 +153,7 @@ mod tests { )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); @@ -165,7 +165,7 @@ mod tests { extra_deposit )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + 2 * TestItemDeposit::get() + 2 * extra_deposit + 3 ); }) @@ -188,7 +188,7 @@ mod tests { collection_owner_id )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( @@ -207,7 +207,7 @@ mod tests { )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); @@ -220,16 +220,16 @@ mod tests { // check if extra deposit is freed as well as the item deposit assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + 3 ); // check that the owner of the collection does not recover the reserved amount of the burnt item assert_eq!( - Balances::free_balance(&collection_owner_id), + Balances::free_balance(collection_owner_id), init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) ); // extra deposit transferred to the item owner free balance - assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); + assert_eq!(Balances::free_balance(item_owner), init_balance + extra_deposit); }) } #[test] @@ -250,7 +250,7 @@ mod tests { collection_owner_id )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( @@ -269,7 +269,7 @@ mod tests { )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); @@ -285,7 +285,7 @@ mod tests { // reserved balance should not have changed assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + TestItemDeposit::get() + extra_deposit + 3 ); }) From 061924924843a81eaeb0cdcea4d33ff9b122a831 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 14:47:47 +0900 Subject: [PATCH 057/101] pallet-uniques: uncomment test case for destroy and fix bug --- Cargo.lock | 16 ++-- pallets/uniques/src/lib.rs | 2 +- pallets/uniques/src/tests.rs | 139 ++++++++++++++++++----------------- 3 files changed, 80 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a865b7ce19..bcb2bc01555 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5249,7 +5249,7 @@ dependencies = [ [[package]] name = "nodle-parachain" -version = "2.1.0" +version = "2.2.2" dependencies = [ "clap", "cumulus-client-cli", @@ -5614,7 +5614,7 @@ dependencies = [ [[package]] name = "pallet-allocations" -version = "2.1.0" +version = "2.2.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6041,7 +6041,7 @@ dependencies = [ [[package]] name = "pallet-grants" -version = "2.1.0" +version = "2.2.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6127,7 +6127,7 @@ dependencies = [ [[package]] name = "pallet-mandate" -version = "2.1.0" +version = "2.2.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -6400,7 +6400,7 @@ dependencies = [ [[package]] name = "pallet-reserve" -version = "2.1.0" +version = "2.2.2" dependencies = [ "frame-benchmarking", "frame-support", @@ -8337,7 +8337,7 @@ dependencies = [ [[package]] name = "primitives" -version = "2.1.0" +version = "2.2.2" dependencies = [ "frame-support", "frame-system", @@ -9066,7 +9066,7 @@ dependencies = [ [[package]] name = "runtime-eden" -version = "2.1.0" +version = "2.2.2" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -11932,7 +11932,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "support" -version = "2.1.0" +version = "2.2.2" [[package]] name = "syn" diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index bca56e85e88..e1056d3ce36 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -168,8 +168,8 @@ pub mod pallet { for (item_owner, extra_deposit) in item_owners { >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( - &item_owner, &collection_owner, + &item_owner, extra_deposit, ExistenceRequirement::AllowDeath, )?; diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 95b9f23e879..6fad8e1d9b1 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -291,78 +291,81 @@ mod test_cases { }) } - // #[test] - // fn test_destroy_collection() { - // new_test_ext().execute_with(|| { - // let extra_deposit = 20; - // let collection_id = 0; - // let item_id1 = 10; - // let item_id2 = 12; - // let item_id3 = 14; - // let collection_owner_id = 1; - // let item_owner = 42; - // let init_balance = 100; - // Balances::make_free_balance_be(&collection_owner_id, init_balance); - // Balances::make_free_balance_be(&item_owner, init_balance); - // assert_ok!(Uniques::create( - // RuntimeOrigin::signed(collection_owner_id), - // collection_id, - // collection_owner_id - // )); - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() - // ); - // assert_ok!(Uniques::set_collection_metadata( - // RuntimeOrigin::signed(1), - // 0, - // bvec![0, 0], - // false - // )); + #[test] + fn test_destroy_collection() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id1 = 10; + let item_id2 = 12; + let item_id3 = 14; + let collection_owner_id = 1; + let item_owner = 42; + let init_balance = 100; + Balances::make_free_balance_be(&collection_owner_id, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner_id), + collection_id, + collection_owner_id + )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + ); + assert_ok!(Uniques::set_collection_metadata( + RuntimeOrigin::signed(1), + 0, + bvec![0, 0], + false + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id1, + item_owner, + extra_deposit + )); - // assert_ok!(Uniques::mint_with_extra_deposit( - // RuntimeOrigin::signed(1), - // collection_id, - // item_id1, - // item_owner, - // extra_deposit - // )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id2, + item_owner, + extra_deposit + )); - // assert_ok!(Uniques::mint_with_extra_deposit( - // RuntimeOrigin::signed(1), - // collection_id, - // item_id2, - // item_owner, - // extra_deposit - // )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id3, + item_owner, + extra_deposit + )); - // assert_ok!(Uniques::mint_with_extra_deposit( - // RuntimeOrigin::signed(1), - // collection_id, - // item_id3, - // item_owner, - // extra_deposit - // )); + assert_eq!( + Balances::reserved_balance(&collection_owner_id), + TestCollectionDeposit::get() + 3 * TestItemDeposit::get() + 3 * extra_deposit + 3 + ); + let witness = DestroyWitness { + items: 3, + item_metadatas: 0, + attributes: 0, + }; - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + 3*TestItemDeposit::get() + 3*extra_deposit + 3 - // ); + assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness)); - // assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, None)); + // check if extra deposit is freed as well as the item deposit + assert_eq!(Balances::reserved_balance(&collection_owner_id), 0); - // // check if extra deposit is freed as well as the item deposit - // assert_eq!( - // Balances::reserved_balance(&collection_owner_id), - // TestCollectionDeposit::get() + 3 - // ); - // // check that the owner of the collection does not recover the reserved amount of the - // burnt item assert_eq!( - // Balances::free_balance(&collection_owner_id), - // init_balance - (TestCollectionDeposit::get() + 3 + extra_deposit) - // ); - // // extra deposit transferred to the item owner free balance - // assert_eq!(Balances::free_balance(&item_owner), init_balance + extra_deposit); - // }) - // } + //check that the owner of the collection does not recover the reserved amount of the burnt item + assert_eq!( + Balances::free_balance(&collection_owner_id), + init_balance - 3 * extra_deposit + ); + // extra deposit transferred to the item owner free balance + assert_eq!(Balances::free_balance(&item_owner), init_balance + 3 * extra_deposit); + }) + } } From f8649e8f065346ee7b92b6e0aed5eb742d62e633 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 15:48:41 +0900 Subject: [PATCH 058/101] Prerun benchmarks --- pallets/allocations/src/weights.rs | 60 +++++++++++------------ pallets/grants/src/weights.rs | 76 ++++++++++++++++++----------- pallets/reserve/src/benchmarking.rs | 8 +-- pallets/reserve/src/weights.rs | 60 +++++++++++++---------- pallets/uniques/src/tests.rs | 10 ++-- pallets/uniques/src/weights.rs | 69 ++++++++++++-------------- scripts/run_benchmarks.sh | 14 +++++- 7 files changed, 163 insertions(+), 134 deletions(-) diff --git a/pallets/allocations/src/weights.rs b/pallets/allocations/src/weights.rs index 7d4a6258c55..246e1057984 100644 --- a/pallets/allocations/src/weights.rs +++ b/pallets/allocations/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_allocations //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-22, STEPS: `5`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -28,21 +28,21 @@ // benchmark // pallet // --chain=dev -// --steps=5 -// --repeat=2 +// --steps=4 +// --repeat=4 // --pallet=pallet_allocations // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --template=./.maintain/internal_pallet_weights.hbs -// --output=runtimes/eden/src/weights +// --output=temp_weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions needed for pallet_allocations. pub trait WeightInfo { @@ -72,10 +72,10 @@ impl WeightInfo for SubstrateWeight { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 119_151 nanoseconds. - Weight::from_parts(153_648_032_u64, 0) - // Standard Error: 251_254 - .saturating_add(Weight::from_parts(34_072_839_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 165_928 nanoseconds. + Weight::from_parts(538_545_854_u64, 0) + // Standard Error: 1_398_161 + .saturating_add(Weight::from_parts(56_105_047_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -98,8 +98,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 24_481 nanoseconds. - Weight::from_parts(32_686_000_u64, 0) + // Minimum execution time: 20_975 nanoseconds. + Weight::from_parts(23_428_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -120,8 +120,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 19_860 nanoseconds. - Weight::from_parts(28_746_000_u64, 0) + // Minimum execution time: 17_209 nanoseconds. + Weight::from_parts(18_412_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 39_459 nanoseconds. - Weight::from_parts(46_275_000_u64, 0) + // Minimum execution time: 35_185 nanoseconds. + Weight::from_parts(36_347_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -162,8 +162,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 11_782 nanoseconds. - Weight::from_parts(19_881_000_u64, 0) + // Minimum execution time: 10_386 nanoseconds. + Weight::from_parts(10_941_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -186,10 +186,10 @@ impl WeightInfo for () { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 119_151 nanoseconds. - Weight::from_parts(153_648_032_u64, 0) - // Standard Error: 251_254 - .saturating_add(Weight::from_parts(34_072_839_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 165_928 nanoseconds. + Weight::from_parts(538_545_854_u64, 0) + // Standard Error: 1_398_161 + .saturating_add(Weight::from_parts(56_105_047_u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -212,8 +212,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 24_481 nanoseconds. - Weight::from_parts(32_686_000_u64, 0) + // Minimum execution time: 20_975 nanoseconds. + Weight::from_parts(23_428_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -234,8 +234,8 @@ impl WeightInfo for () { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 19_860 nanoseconds. - Weight::from_parts(28_746_000_u64, 0) + // Minimum execution time: 17_209 nanoseconds. + Weight::from_parts(18_412_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -262,8 +262,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 39_459 nanoseconds. - Weight::from_parts(46_275_000_u64, 0) + // Minimum execution time: 35_185 nanoseconds. + Weight::from_parts(36_347_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -276,9 +276,9 @@ impl WeightInfo for () { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 11_782 nanoseconds. - Weight::from_parts(19_881_000_u64, 0) + // Minimum execution time: 10_386 nanoseconds. + Weight::from_parts(10_941_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } -} \ No newline at end of file +} diff --git a/pallets/grants/src/weights.rs b/pallets/grants/src/weights.rs index 40dce37b32e..5e0c5ebcf16 100644 --- a/pallets/grants/src/weights.rs +++ b/pallets/grants/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_grants //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-22, STEPS: `5`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -28,21 +28,21 @@ // benchmark // pallet // --chain=dev -// --steps=5 -// --repeat=2 +// --steps=4 +// --repeat=4 // --pallet=pallet_grants // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --template=./.maintain/internal_pallet_weights.hbs -// --output=runtimes/eden/src/weights +// --output=temp_weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions needed for pallet_grants. pub trait WeightInfo { @@ -59,6 +59,8 @@ impl WeightInfo for SubstrateWeight { // Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured) // Storage: Vesting VestingSchedules (r:1 w:1) // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -71,10 +73,12 @@ impl WeightInfo for SubstrateWeight { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 99_486 nanoseconds. - Weight::from_parts(118_862_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Minimum execution time: 130_336 nanoseconds. + Weight::from_parts(142_148_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) @@ -83,6 +87,8 @@ impl WeightInfo for SubstrateWeight { // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -94,9 +100,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 65_428 nanoseconds. - Weight::from_parts(73_672_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Minimum execution time: 59_601 nanoseconds. + Weight::from_parts(60_760_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: Vesting Renounced (r:1 w:0) @@ -107,6 +113,8 @@ impl WeightInfo for SubstrateWeight { // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -117,12 +125,14 @@ impl WeightInfo for SubstrateWeight { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 128_201 nanoseconds. - Weight::from_parts(145_727_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(11_u64)) + // Minimum execution time: 179_424 nanoseconds. + Weight::from_parts(195_653_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } // Storage: System Number (r:1 w:0) @@ -136,8 +146,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 24_592 nanoseconds. - Weight::from_parts(26_160_000_u64, 0) + // Minimum execution time: 16_977 nanoseconds. + Weight::from_parts(17_795_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -148,6 +158,8 @@ impl WeightInfo for () { // Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured) // Storage: Vesting VestingSchedules (r:1 w:1) // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -160,10 +172,12 @@ impl WeightInfo for () { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 99_486 nanoseconds. - Weight::from_parts(118_862_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Minimum execution time: 130_336 nanoseconds. + Weight::from_parts(142_148_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) @@ -172,6 +186,8 @@ impl WeightInfo for () { // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -183,9 +199,9 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 65_428 nanoseconds. - Weight::from_parts(73_672_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Minimum execution time: 59_601 nanoseconds. + Weight::from_parts(60_760_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } // Storage: Vesting Renounced (r:1 w:0) @@ -196,6 +212,8 @@ impl WeightInfo for () { // Proof: Vesting VestingSchedules (max_values: None, max_size: Some(2850), added: 5325, mode: MaxEncodedLen) // Storage: Balances Locks (r:1 w:1) // Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + // Storage: Balances Freezes (r:1 w:0) + // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -206,12 +224,14 @@ impl WeightInfo for () { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 128_201 nanoseconds. - Weight::from_parts(145_727_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(11_u64)) + // Minimum execution time: 179_424 nanoseconds. + Weight::from_parts(195_653_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } // Storage: System Number (r:1 w:0) @@ -225,9 +245,9 @@ impl WeightInfo for () { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 24_592 nanoseconds. - Weight::from_parts(26_160_000_u64, 0) + // Minimum execution time: 16_977 nanoseconds. + Weight::from_parts(17_795_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } -} \ No newline at end of file +} diff --git a/pallets/reserve/src/benchmarking.rs b/pallets/reserve/src/benchmarking.rs index 54ce5ebe4c4..ad44d5e2ec0 100644 --- a/pallets/reserve/src/benchmarking.rs +++ b/pallets/reserve/src/benchmarking.rs @@ -37,15 +37,15 @@ const SEED: u32 = 0; benchmarks_instance_pallet! { tip { let tipper = account("caller", 0, SEED); - let value = 100u32.into(); - let _ = T::Currency::make_free_balance_be(&tipper, value); + let value = 10u32.into(); + let _ = T::Currency::make_free_balance_be(&tipper, 100002u32.into()); }: _(RawOrigin::Signed(tipper), value) spend { let dest = account("dest", 0, SEED); - let value = 10u32.into(); + let value = 10000u32.into(); - T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), 100u32.into()); + T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), 0x7FFFFFFFu32.into()); let call = Call::::spend{ to: dest, diff --git a/pallets/reserve/src/weights.rs b/pallets/reserve/src/weights.rs index dbd3e247f1b..9d90444d002 100644 --- a/pallets/reserve/src/weights.rs +++ b/pallets/reserve/src/weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for pallet_reserve //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-22, STEPS: `5`, REPEAT: 2, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` //! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -28,21 +28,21 @@ // benchmark // pallet // --chain=dev -// --steps=5 -// --repeat=2 +// --steps=4 +// --repeat=4 // --pallet=pallet_reserve // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --template=./.maintain/internal_pallet_weights.hbs -// --output=runtimes/eden/src/weights +// --output=temp_weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::{constants::RocksDbWeight, Weight}}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions needed for pallet_reserve. pub trait WeightInfo { @@ -53,7 +53,9 @@ pub trait WeightInfo { /// Weight functions for `pallet_reserve`. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - // Storage: System Account (r:2 w:0) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -64,12 +66,14 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 25_599 nanoseconds. - Weight::from_parts(34_648_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Minimum execution time: 78_949 nanoseconds. + Weight::from_parts(80_942_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } - // Storage: System Account (r:2 w:0) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -80,15 +84,17 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 26_397 nanoseconds. - Weight::from_parts(35_327_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(6_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Minimum execution time: 88_215 nanoseconds. + Weight::from_parts(88_974_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } } impl WeightInfo for () { - // Storage: System Account (r:2 w:0) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -99,12 +105,14 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 25_599 nanoseconds. - Weight::from_parts(34_648_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Minimum execution time: 78_949 nanoseconds. + Weight::from_parts(80_942_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } - // Storage: System Account (r:2 w:0) + // Storage: Balances TotalIssuance (r:1 w:0) + // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -115,9 +123,9 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 26_397 nanoseconds. - Weight::from_parts(35_327_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(6_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Minimum execution time: 88_215 nanoseconds. + Weight::from_parts(88_974_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) } -} \ No newline at end of file +} diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 6fad8e1d9b1..0383e93749a 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -310,7 +310,7 @@ mod test_cases { collection_owner_id )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() ); assert_ok!(Uniques::set_collection_metadata( @@ -345,7 +345,7 @@ mod test_cases { )); assert_eq!( - Balances::reserved_balance(&collection_owner_id), + Balances::reserved_balance(collection_owner_id), TestCollectionDeposit::get() + 3 * TestItemDeposit::get() + 3 * extra_deposit + 3 ); let witness = DestroyWitness { @@ -357,15 +357,15 @@ mod test_cases { assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness)); // check if extra deposit is freed as well as the item deposit - assert_eq!(Balances::reserved_balance(&collection_owner_id), 0); + assert_eq!(Balances::reserved_balance(collection_owner_id), 0); //check that the owner of the collection does not recover the reserved amount of the burnt item assert_eq!( - Balances::free_balance(&collection_owner_id), + Balances::free_balance(collection_owner_id), init_balance - 3 * extra_deposit ); // extra deposit transferred to the item owner free balance - assert_eq!(Balances::free_balance(&item_owner), init_balance + 3 * extra_deposit); + assert_eq!(Balances::free_balance(item_owner), init_balance + 3 * extra_deposit); }) } } diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 34b46100e25..1d44f96843e 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -19,28 +19,23 @@ //! Autogenerated weights for pallet_nodle_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `2`, REPEAT: 1, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `Alexs-MacBook-Pro-2.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/nodle-parachain // benchmark // pallet +// --chain=dev +// --steps=4 +// --repeat=4 +// --pallet=pallet_nodle_uniques +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --pallet -// pallet_nodle_uniques -// --extrinsic -// * -// --steps -// 2 -// --repeat -// 1 -// --output -// ./weights.rs -// --template -// ./.maintain/internal_pallet_weights.hbs +// --template=./.maintain/internal_pallet_weights.hbs +// --output=temp_weights #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -91,14 +86,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_964_000 nanoseconds. - Weight::from_parts(2_964_000_000_u64, 0) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(25_211_769_u64, 0).saturating_mul(n as u64)) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(420_769_u64, 0).saturating_mul(m as u64)) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(560_769_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_621_404 nanoseconds. + Weight::from_parts(2_576_288_977_u64, 0) + // Standard Error: 1_014_432 + .saturating_add(Weight::from_parts(24_161_588_u64, 0).saturating_mul(n as u64)) + // Standard Error: 1_014_432 + .saturating_add(Weight::from_parts(3_110_495_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -129,8 +122,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Uniques Asset (r:0 w:1) // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 64_000 nanoseconds. - Weight::from_parts(64_000_000_u64, 0) + // Minimum execution time: 66_493 nanoseconds. + Weight::from_parts(69_000_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -155,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 55_000 nanoseconds. - Weight::from_parts(55_000_000_u64, 0) + // Minimum execution time: 59_406 nanoseconds. + Weight::from_parts(62_930_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -195,14 +188,12 @@ impl WeightInfo for () { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_964_000 nanoseconds. - Weight::from_parts(2_964_000_000_u64, 0) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(25_211_769_u64, 0).saturating_mul(n as u64)) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(420_769_u64, 0).saturating_mul(m as u64)) - // Standard Error: 1_176_728 - .saturating_add(Weight::from_parts(560_769_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_621_404 nanoseconds. + Weight::from_parts(2_576_288_977_u64, 0) + // Standard Error: 1_014_432 + .saturating_add(Weight::from_parts(24_161_588_u64, 0).saturating_mul(n as u64)) + // Standard Error: 1_014_432 + .saturating_add(Weight::from_parts(3_110_495_u64, 0).saturating_mul(a as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -233,8 +224,8 @@ impl WeightInfo for () { // Storage: Uniques Asset (r:0 w:1) // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 64_000 nanoseconds. - Weight::from_parts(64_000_000_u64, 0) + // Minimum execution time: 66_493 nanoseconds. + Weight::from_parts(69_000_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -259,8 +250,8 @@ impl WeightInfo for () { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 55_000 nanoseconds. - Weight::from_parts(55_000_000_u64, 0) + // Minimum execution time: 59_406 nanoseconds. + Weight::from_parts(62_930_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index dba28654c1f..9e62b8dfedc 100755 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -17,6 +17,7 @@ cargo build --profile release \ --features=runtime-benchmarks \ --manifest-path=node/Cargo.toml +install -d temp_weights for PALLET in $internal do ./target/release/nodle-parachain benchmark pallet \ @@ -28,7 +29,7 @@ do --execution=wasm \ --wasm-execution=compiled \ --template=./.maintain/internal_pallet_weights.hbs \ - --output=runtimes/eden/src/weights + --output=temp_weights done for PALLET in $external @@ -67,7 +68,16 @@ done --wasm-execution=compiled \ --template=./.maintain/xcm.hbs \ --output=runtimes/eden/src/weights -sed -s 's/pallet_contracts::WeightInfo/pallet_contracts::weights::WeightInfo/' -i runtimes/eden/src/weights/pallet_contracts.rs +sed -s 's/pallet_contracts::WeightInfo/pallet_contracts::weights::WeightInfo/' -i runtimes/eden/src/weights/pallet_contracts.rs + +mv temp_weights/pallet_grants.rs pallets/grants/src/weights.rs +mv temp_weights/pallet_allocations.rs pallets/allocations/src/weights.rs +mv temp_weights/pallet_reserve.rs pallets/reserve/src/weights.rs +mv temp_weights/pallet_nodle_uniques.rs pallets/uniques/src/weights.rs + +cargo clippy --fix --allow-dirty +cargo fmt + echo "Running on gcloud server? Run:" echo " git commit -v -a -m Benchmarks ; git format-patch HEAD~" echo "And on dev machine:" From d0c4319ca6eaf8338c295951e2a254dd641836f4 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Thu, 29 Jun 2023 20:15:33 +0900 Subject: [PATCH 059/101] Run benchmarks --- pallets/allocations/src/weights.rs | 56 +- pallets/grants/src/weights.rs | 40 +- pallets/reserve/src/weights.rs | 24 +- pallets/uniques/src/weights.rs | 52 +- runtimes/eden/src/weights/frame_system.rs | 44 +- runtimes/eden/src/weights/pallet_balances.rs | 40 +- .../src/weights/pallet_collator_selection.rs | 48 +- runtimes/eden/src/weights/pallet_contracts.rs | 938 +++++++++--------- .../eden/src/weights/pallet_membership.rs | 60 +- runtimes/eden/src/weights/pallet_multisig.rs | 70 +- runtimes/eden/src/weights/pallet_preimage.rs | 60 +- runtimes/eden/src/weights/pallet_timestamp.rs | 12 +- runtimes/eden/src/weights/pallet_uniques.rs | 130 +-- runtimes/eden/src/weights/pallet_utility.rs | 36 +- runtimes/eden/src/weights/pallet_xcm.rs | 60 +- .../weights/pallet_xcm_benchmarks_fungible.rs | 14 +- .../weights/pallet_xcm_benchmarks_generic.rs | 60 +- 17 files changed, 874 insertions(+), 870 deletions(-) diff --git a/pallets/allocations/src/weights.rs b/pallets/allocations/src/weights.rs index 246e1057984..95addc0d342 100644 --- a/pallets/allocations/src/weights.rs +++ b/pallets/allocations/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_allocations //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -28,8 +28,8 @@ // benchmark // pallet // --chain=dev -// --steps=4 -// --repeat=4 +// --steps=50 +// --repeat=20 // --pallet=pallet_allocations // --extrinsic=* // --execution=wasm @@ -72,10 +72,10 @@ impl WeightInfo for SubstrateWeight { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 165_928 nanoseconds. - Weight::from_parts(538_545_854_u64, 0) - // Standard Error: 1_398_161 - .saturating_add(Weight::from_parts(56_105_047_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 181_830 nanoseconds. + Weight::from_parts(64_532_663_u64, 0) + // Standard Error: 13_909 + .saturating_add(Weight::from_parts(65_969_287_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -98,8 +98,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 20_975 nanoseconds. - Weight::from_parts(23_428_000_u64, 0) + // Minimum execution time: 22_380 nanoseconds. + Weight::from_parts(22_910_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -120,8 +120,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 17_209 nanoseconds. - Weight::from_parts(18_412_000_u64, 0) + // Minimum execution time: 18_090 nanoseconds. + Weight::from_parts(18_650_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 35_185 nanoseconds. - Weight::from_parts(36_347_000_u64, 0) + // Minimum execution time: 37_171 nanoseconds. + Weight::from_parts(38_530_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -162,8 +162,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 10_386 nanoseconds. - Weight::from_parts(10_941_000_u64, 0) + // Minimum execution time: 10_560 nanoseconds. + Weight::from_parts(10_950_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -186,10 +186,10 @@ impl WeightInfo for () { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 165_928 nanoseconds. - Weight::from_parts(538_545_854_u64, 0) - // Standard Error: 1_398_161 - .saturating_add(Weight::from_parts(56_105_047_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 181_830 nanoseconds. + Weight::from_parts(64_532_663_u64, 0) + // Standard Error: 13_909 + .saturating_add(Weight::from_parts(65_969_287_u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -212,8 +212,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 20_975 nanoseconds. - Weight::from_parts(23_428_000_u64, 0) + // Minimum execution time: 22_380 nanoseconds. + Weight::from_parts(22_910_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -234,8 +234,8 @@ impl WeightInfo for () { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 17_209 nanoseconds. - Weight::from_parts(18_412_000_u64, 0) + // Minimum execution time: 18_090 nanoseconds. + Weight::from_parts(18_650_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -262,8 +262,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 35_185 nanoseconds. - Weight::from_parts(36_347_000_u64, 0) + // Minimum execution time: 37_171 nanoseconds. + Weight::from_parts(38_530_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -276,8 +276,8 @@ impl WeightInfo for () { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 10_386 nanoseconds. - Weight::from_parts(10_941_000_u64, 0) + // Minimum execution time: 10_560 nanoseconds. + Weight::from_parts(10_950_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/grants/src/weights.rs b/pallets/grants/src/weights.rs index 5e0c5ebcf16..e4940df9e9f 100644 --- a/pallets/grants/src/weights.rs +++ b/pallets/grants/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_grants //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -28,8 +28,8 @@ // benchmark // pallet // --chain=dev -// --steps=4 -// --repeat=4 +// --steps=50 +// --repeat=20 // --pallet=pallet_grants // --extrinsic=* // --execution=wasm @@ -76,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Freezes (r:1 w:0) // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 130_336 nanoseconds. - Weight::from_parts(142_148_000_u64, 0) + // Minimum execution time: 136_920 nanoseconds. + Weight::from_parts(139_940_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -100,8 +100,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 59_601 nanoseconds. - Weight::from_parts(60_760_000_u64, 0) + // Minimum execution time: 63_020 nanoseconds. + Weight::from_parts(64_090_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -130,8 +130,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 179_424 nanoseconds. - Weight::from_parts(195_653_000_u64, 0) + // Minimum execution time: 186_680 nanoseconds. + Weight::from_parts(190_229_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -146,8 +146,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 16_977 nanoseconds. - Weight::from_parts(17_795_000_u64, 0) + // Minimum execution time: 17_530 nanoseconds. + Weight::from_parts(18_170_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -175,8 +175,8 @@ impl WeightInfo for () { // Storage: Balances Freezes (r:1 w:0) // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 130_336 nanoseconds. - Weight::from_parts(142_148_000_u64, 0) + // Minimum execution time: 136_920 nanoseconds. + Weight::from_parts(139_940_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -199,8 +199,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 59_601 nanoseconds. - Weight::from_parts(60_760_000_u64, 0) + // Minimum execution time: 63_020 nanoseconds. + Weight::from_parts(64_090_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -229,8 +229,8 @@ impl WeightInfo for () { // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 179_424 nanoseconds. - Weight::from_parts(195_653_000_u64, 0) + // Minimum execution time: 186_680 nanoseconds. + Weight::from_parts(190_229_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -245,8 +245,8 @@ impl WeightInfo for () { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 16_977 nanoseconds. - Weight::from_parts(17_795_000_u64, 0) + // Minimum execution time: 17_530 nanoseconds. + Weight::from_parts(18_170_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/reserve/src/weights.rs b/pallets/reserve/src/weights.rs index 9d90444d002..252cb966965 100644 --- a/pallets/reserve/src/weights.rs +++ b/pallets/reserve/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_reserve //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -28,8 +28,8 @@ // benchmark // pallet // --chain=dev -// --steps=4 -// --repeat=4 +// --steps=50 +// --repeat=20 // --pallet=pallet_reserve // --extrinsic=* // --execution=wasm @@ -66,8 +66,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 78_949 nanoseconds. - Weight::from_parts(80_942_000_u64, 0) + // Minimum execution time: 80_790 nanoseconds. + Weight::from_parts(82_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -84,8 +84,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 88_215 nanoseconds. - Weight::from_parts(88_974_000_u64, 0) + // Minimum execution time: 92_200 nanoseconds. + Weight::from_parts(95_300_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 78_949 nanoseconds. - Weight::from_parts(80_942_000_u64, 0) + // Minimum execution time: 80_790 nanoseconds. + Weight::from_parts(82_780_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -123,8 +123,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 88_215 nanoseconds. - Weight::from_parts(88_974_000_u64, 0) + // Minimum execution time: 92_200 nanoseconds. + Weight::from_parts(95_300_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 1d44f96843e..ba1d3387374 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_nodle_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `4`, REPEAT: 4, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -28,8 +28,8 @@ // benchmark // pallet // --chain=dev -// --steps=4 -// --repeat=4 +// --steps=50 +// --repeat=20 // --pallet=pallet_nodle_uniques // --extrinsic=* // --execution=wasm @@ -86,12 +86,14 @@ impl WeightInfo for SubstrateWeight { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_621_404 nanoseconds. - Weight::from_parts(2_576_288_977_u64, 0) - // Standard Error: 1_014_432 - .saturating_add(Weight::from_parts(24_161_588_u64, 0).saturating_mul(n as u64)) - // Standard Error: 1_014_432 - .saturating_add(Weight::from_parts(3_110_495_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_399_149 nanoseconds. + Weight::from_parts(3_408_100_000_u64, 0) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(38_037_182_u64, 0).saturating_mul(n as u64)) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(272_909_u64, 0).saturating_mul(m as u64)) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(378_882_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -122,8 +124,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Uniques Asset (r:0 w:1) // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 66_493 nanoseconds. - Weight::from_parts(69_000_000_u64, 0) + // Minimum execution time: 96_450 nanoseconds. + Weight::from_parts(98_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -148,8 +150,8 @@ impl WeightInfo for SubstrateWeight { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 59_406 nanoseconds. - Weight::from_parts(62_930_000_u64, 0) + // Minimum execution time: 85_460 nanoseconds. + Weight::from_parts(86_750_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -188,12 +190,14 @@ impl WeightInfo for () { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_621_404 nanoseconds. - Weight::from_parts(2_576_288_977_u64, 0) - // Standard Error: 1_014_432 - .saturating_add(Weight::from_parts(24_161_588_u64, 0).saturating_mul(n as u64)) - // Standard Error: 1_014_432 - .saturating_add(Weight::from_parts(3_110_495_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_399_149 nanoseconds. + Weight::from_parts(3_408_100_000_u64, 0) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(38_037_182_u64, 0).saturating_mul(n as u64)) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(272_909_u64, 0).saturating_mul(m as u64)) + // Standard Error: 30_380 + .saturating_add(Weight::from_parts(378_882_u64, 0).saturating_mul(a as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -224,8 +228,8 @@ impl WeightInfo for () { // Storage: Uniques Asset (r:0 w:1) // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 66_493 nanoseconds. - Weight::from_parts(69_000_000_u64, 0) + // Minimum execution time: 96_450 nanoseconds. + Weight::from_parts(98_140_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -250,8 +254,8 @@ impl WeightInfo for () { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 59_406 nanoseconds. - Weight::from_parts(62_930_000_u64, 0) + // Minimum execution time: 85_460 nanoseconds. + Weight::from_parts(86_750_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } diff --git a/runtimes/eden/src/weights/frame_system.rs b/runtimes/eden/src/weights/frame_system.rs index fa855cf6085..578e3cb8afb 100644 --- a/runtimes/eden/src/weights/frame_system.rs +++ b/runtimes/eden/src/weights/frame_system.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,8 +49,8 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - // Minimum execution time: 3_780 nanoseconds. - Weight::from_parts(4_734_636_u64, 0) + // Minimum execution time: 3_810 nanoseconds. + Weight::from_parts(4_457_571_u64, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(287_u64, 0).saturating_mul(b as u64)) } @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 15_150 nanoseconds. - Weight::from_parts(23_319_833_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_514_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 16_290 nanoseconds. + Weight::from_parts(17_287_723_u64, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_531_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -76,8 +76,8 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - // Minimum execution time: 6_750 nanoseconds. - Weight::from_parts(7_150_000_u64, 0) + // Minimum execution time: 7_210 nanoseconds. + Weight::from_parts(7_550_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -85,30 +85,30 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - // Minimum execution time: 3_570 nanoseconds. - Weight::from_parts(3_669_000_u64, 0) - // Standard Error: 3_026 - .saturating_add(Weight::from_parts(1_134_809_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 3_680 nanoseconds. + Weight::from_parts(3_760_000_u64, 0) + // Standard Error: 2_051 + .saturating_add(Weight::from_parts(1_045_084_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // Minimum execution time: 3_630 nanoseconds. - Weight::from_parts(3_700_000_u64, 0) - // Standard Error: 927 - .saturating_add(Weight::from_parts(732_993_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 3_700 nanoseconds. + Weight::from_parts(3_811_000_u64, 0) + // Standard Error: 845 + .saturating_add(Weight::from_parts(704_053_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // Minimum execution time: 6_960 nanoseconds. - Weight::from_parts(7_240_000_u64, 0) - // Standard Error: 1_200 - .saturating_add(Weight::from_parts(1_289_959_u64, 0).saturating_mul(p as u64)) + // Minimum execution time: 6_740 nanoseconds. + Weight::from_parts(7_080_000_u64, 0) + // Standard Error: 1_077 + .saturating_add(Weight::from_parts(1_280_308_u64, 0).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p as u64))) } diff --git a/runtimes/eden/src/weights/pallet_balances.rs b/runtimes/eden/src/weights/pallet_balances.rs index 59c97d726e3..4f6eba3d17f 100644 --- a/runtimes/eden/src/weights/pallet_balances.rs +++ b/runtimes/eden/src/weights/pallet_balances.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_allow_death() -> Weight { - // Minimum execution time: 101_640 nanoseconds. - Weight::from_parts(103_110_000_u64, 0) + // Minimum execution time: 103_240 nanoseconds. + Weight::from_parts(105_360_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - // Minimum execution time: 78_530 nanoseconds. - Weight::from_parts(79_440_000_u64, 0) + // Minimum execution time: 80_500 nanoseconds. + Weight::from_parts(82_280_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -94,8 +94,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_set_balance_creating() -> Weight { - // Minimum execution time: 29_130 nanoseconds. - Weight::from_parts(30_340_000_u64, 0) + // Minimum execution time: 29_300 nanoseconds. + Weight::from_parts(30_180_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -112,8 +112,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn force_set_balance_killing() -> Weight { - // Minimum execution time: 43_790 nanoseconds. - Weight::from_parts(45_180_000_u64, 0) + // Minimum execution time: 43_980 nanoseconds. + Weight::from_parts(45_820_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -130,8 +130,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_transfer() -> Weight { - // Minimum execution time: 103_580 nanoseconds. - Weight::from_parts(105_800_000_u64, 0) + // Minimum execution time: 106_620 nanoseconds. + Weight::from_parts(109_260_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -148,8 +148,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_all() -> Weight { - // Minimum execution time: 95_540 nanoseconds. - Weight::from_parts(98_120_000_u64, 0) + // Minimum execution time: 97_770 nanoseconds. + Weight::from_parts(99_880_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -164,8 +164,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_unreserve() -> Weight { - // Minimum execution time: 34_220 nanoseconds. - Weight::from_parts(35_420_000_u64, 0) + // Minimum execution time: 34_440 nanoseconds. + Weight::from_parts(35_831_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -181,10 +181,10 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { - // Minimum execution time: 32_910 nanoseconds. - Weight::from_parts(33_460_000_u64, 0) - // Standard Error: 11_163 - .saturating_add(Weight::from_parts(25_469_362_u64, 0).saturating_mul(u as u64)) + // Minimum execution time: 34_080 nanoseconds. + Weight::from_parts(34_500_000_u64, 0) + // Standard Error: 13_151 + .saturating_add(Weight::from_parts(25_726_758_u64, 0).saturating_mul(u as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u as u64))) .saturating_add(T::DbWeight::get().writes(2_u64)) diff --git a/runtimes/eden/src/weights/pallet_collator_selection.rs b/runtimes/eden/src/weights/pallet_collator_selection.rs index 2538ce384b1..d51d778fcdf 100644 --- a/runtimes/eden/src/weights/pallet_collator_selection.rs +++ b/runtimes/eden/src/weights/pallet_collator_selection.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,10 +61,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(1601), added: 2096, mode: MaxEncodedLen) /// The range of component `b` is `[1, 50]`. fn set_invulnerables(b: u32, ) -> Weight { - // Minimum execution time: 24_340 nanoseconds. - Weight::from_parts(23_946_797_u64, 0) - // Standard Error: 5_974 - .saturating_add(Weight::from_parts(4_230_869_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 25_350 nanoseconds. + Weight::from_parts(24_930_554_u64, 0) + // Standard Error: 6_348 + .saturating_add(Weight::from_parts(4_371_990_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -80,8 +80,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection DesiredCandidates (r:0 w:1) // Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_desired_candidates() -> Weight { - // Minimum execution time: 14_060 nanoseconds. - Weight::from_parts(14_410_000_u64, 0) + // Minimum execution time: 14_040 nanoseconds. + Weight::from_parts(14_570_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -96,8 +96,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection CandidacyBond (r:0 w:1) // Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn set_candidacy_bond() -> Weight { - // Minimum execution time: 14_490 nanoseconds. - Weight::from_parts(14_900_000_u64, 0) + // Minimum execution time: 14_610 nanoseconds. + Weight::from_parts(15_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// The range of component `c` is `[1, 999]`. fn register_as_candidate(c: u32, ) -> Weight { - // Minimum execution time: 70_640 nanoseconds. - Weight::from_parts(76_082_191_u64, 0) - // Standard Error: 885 - .saturating_add(Weight::from_parts(87_217_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 71_900 nanoseconds. + Weight::from_parts(76_968_917_u64, 0) + // Standard Error: 983 + .saturating_add(Weight::from_parts(91_848_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -144,10 +144,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// The range of component `c` is `[4, 1000]`. fn leave_intent(c: u32, ) -> Weight { - // Minimum execution time: 55_760 nanoseconds. - Weight::from_parts(59_332_208_u64, 0) - // Standard Error: 971 - .saturating_add(Weight::from_parts(90_013_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 56_510 nanoseconds. + Weight::from_parts(59_749_444_u64, 0) + // Standard Error: 945 + .saturating_add(Weight::from_parts(92_469_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -168,8 +168,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) fn note_author() -> Weight { - // Minimum execution time: 86_760 nanoseconds. - Weight::from_parts(88_660_000_u64, 0) + // Minimum execution time: 87_830 nanoseconds. + Weight::from_parts(89_769_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -194,10 +194,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(_r: u32, c: u32, ) -> Weight { - // Minimum execution time: 27_720 nanoseconds. - Weight::from_parts(28_450_000_u64, 0) - // Standard Error: 1_224_557 - .saturating_add(Weight::from_parts(42_038_535_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 29_570 nanoseconds. + Weight::from_parts(30_170_000_u64, 0) + // Standard Error: 1_230_327 + .saturating_add(Weight::from_parts(42_501_317_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1_u64)) diff --git a/runtimes/eden/src/weights/pallet_contracts.rs b/runtimes/eden/src/weights/pallet_contracts.rs index d4a92168e80..7af3064131d 100644 --- a/runtimes/eden/src/weights/pallet_contracts.rs +++ b/runtimes/eden/src/weights/pallet_contracts.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,18 +50,18 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: Contracts DeletionQueueCounter (r:1 w:0) // Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) fn on_process_deletion_queue_batch() -> Weight { - // Minimum execution time: 3_850 nanoseconds. - Weight::from_parts(4_050_000_u64, 0) + // Minimum execution time: 4_100 nanoseconds. + Weight::from_parts(4_220_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { - // Minimum execution time: 20_510 nanoseconds. - Weight::from_parts(8_749_502_u64, 0) - // Standard Error: 1_191 - .saturating_add(Weight::from_parts(1_162_854_u64, 0).saturating_mul(k as u64)) + // Minimum execution time: 21_520 nanoseconds. + Weight::from_parts(13_231_502_u64, 0) + // Standard Error: 1_038 + .saturating_add(Weight::from_parts(1_143_215_u64, 0).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -73,10 +73,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// The range of component `c` is `[0, 61717]`. fn reinstrument(c: u32, ) -> Weight { - // Minimum execution time: 48_170 nanoseconds. - Weight::from_parts(55_115_415_u64, 0) - // Standard Error: 47 - .saturating_add(Weight::from_parts(63_021_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 49_290 nanoseconds. + Weight::from_parts(50_962_738_u64, 0) + // Standard Error: 50 + .saturating_add(Weight::from_parts(65_865_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -102,10 +102,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `c` is `[0, 125952]`. fn call_with_code_per_byte(c: u32, ) -> Weight { - // Minimum execution time: 417_920 nanoseconds. - Weight::from_parts(454_095_146_u64, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(39_048_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 423_980 nanoseconds. + Weight::from_parts(459_714_945_u64, 0) + // Standard Error: 27 + .saturating_add(Weight::from_parts(40_886_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -139,14 +139,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { - // Minimum execution time: 4_580_549 nanoseconds. - Weight::from_parts(1_009_340_759_u64, 0) - // Standard Error: 466 - .saturating_add(Weight::from_parts(123_382_u64, 0).saturating_mul(c as u64)) - // Standard Error: 27 - .saturating_add(Weight::from_parts(1_885_u64, 0).saturating_mul(i as u64)) - // Standard Error: 27 - .saturating_add(Weight::from_parts(1_611_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 4_565_350 nanoseconds. + Weight::from_parts(718_961_748_u64, 0) + // Standard Error: 166 + .saturating_add(Weight::from_parts(132_490_u64, 0).saturating_mul(c as u64)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_928_u64, 0).saturating_mul(i as u64)) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_805_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(12_u64)) } @@ -177,12 +177,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate(i: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_445_480 nanoseconds. - Weight::from_parts(519_313_313_u64, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_935_u64, 0).saturating_mul(i as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_837_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 2_457_230 nanoseconds. + Weight::from_parts(549_560_856_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_919_u64, 0).saturating_mul(i as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_822_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } @@ -207,8 +207,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: System EventTopics (r:2 w:2) // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) fn call() -> Weight { - // Minimum execution time: 332_851 nanoseconds. - Weight::from_parts(341_230_000_u64, 0) + // Minimum execution time: 338_620 nanoseconds. + Weight::from_parts(345_750_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -230,10 +230,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) /// The range of component `c` is `[0, 61717]`. fn upload_code(c: u32, ) -> Weight { - // Minimum execution time: 401_410 nanoseconds. - Weight::from_parts(416_782_798_u64, 0) - // Standard Error: 129 - .saturating_add(Weight::from_parts(124_767_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 404_980 nanoseconds. + Weight::from_parts(419_653_844_u64, 0) + // Standard Error: 63 + .saturating_add(Weight::from_parts(130_294_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -254,8 +254,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: Contracts PristineCode (r:0 w:1) // Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) fn remove_code() -> Weight { - // Minimum execution time: 56_120 nanoseconds. - Weight::from_parts(57_250_000_u64, 0) + // Minimum execution time: 57_910 nanoseconds. + Weight::from_parts(59_400_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -274,8 +274,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: System EventTopics (r:3 w:3) // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) fn set_code() -> Weight { - // Minimum execution time: 51_311 nanoseconds. - Weight::from_parts(52_250_000_u64, 0) + // Minimum execution time: 52_430 nanoseconds. + Weight::from_parts(53_410_000_u64, 0) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -301,10 +301,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_caller(r: u32, ) -> Weight { - // Minimum execution time: 377_590 nanoseconds. - Weight::from_parts(387_903_308_u64, 0) - // Standard Error: 471 - .saturating_add(Weight::from_parts(590_346_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 383_050 nanoseconds. + Weight::from_parts(391_618_088_u64, 0) + // Standard Error: 432 + .saturating_add(Weight::from_parts(579_096_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -330,10 +330,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_is_contract(r: u32, ) -> Weight { - // Minimum execution time: 375_850 nanoseconds. - Weight::from_parts(190_608_178_u64, 0) - // Standard Error: 7_474 - .saturating_add(Weight::from_parts(4_794_541_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_040 nanoseconds. + Weight::from_parts(188_968_585_u64, 0) + // Standard Error: 7_096 + .saturating_add(Weight::from_parts(4_862_839_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -360,10 +360,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 376_920 nanoseconds. - Weight::from_parts(188_382_219_u64, 0) - // Standard Error: 6_911 - .saturating_add(Weight::from_parts(6_268_395_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_480 nanoseconds. + Weight::from_parts(200_203_307_u64, 0) + // Standard Error: 6_512 + .saturating_add(Weight::from_parts(6_315_784_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -390,10 +390,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_own_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 375_160 nanoseconds. - Weight::from_parts(389_808_577_u64, 0) - // Standard Error: 596 - .saturating_add(Weight::from_parts(819_938_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 387_170 nanoseconds. + Weight::from_parts(392_373_540_u64, 0) + // Standard Error: 1_151 + .saturating_add(Weight::from_parts(775_160_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -419,10 +419,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_origin(r: u32, ) -> Weight { - // Minimum execution time: 369_820 nanoseconds. - Weight::from_parts(381_240_986_u64, 0) - // Standard Error: 295 - .saturating_add(Weight::from_parts(179_907_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_380 nanoseconds. + Weight::from_parts(385_735_047_u64, 0) + // Standard Error: 272 + .saturating_add(Weight::from_parts(195_663_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -448,10 +448,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_address(r: u32, ) -> Weight { - // Minimum execution time: 376_570 nanoseconds. - Weight::from_parts(389_702_484_u64, 0) - // Standard Error: 731 - .saturating_add(Weight::from_parts(590_488_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 377_340 nanoseconds. + Weight::from_parts(390_022_369_u64, 0) + // Standard Error: 445 + .saturating_add(Weight::from_parts(574_540_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -477,10 +477,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { - // Minimum execution time: 373_571 nanoseconds. - Weight::from_parts(389_386_119_u64, 0) - // Standard Error: 652 - .saturating_add(Weight::from_parts(1_054_076_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 377_980 nanoseconds. + Weight::from_parts(391_438_607_u64, 0) + // Standard Error: 553 + .saturating_add(Weight::from_parts(1_004_479_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -506,10 +506,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_balance(r: u32, ) -> Weight { - // Minimum execution time: 376_270 nanoseconds. - Weight::from_parts(391_645_401_u64, 0) - // Standard Error: 1_169 - .saturating_add(Weight::from_parts(2_821_735_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_110 nanoseconds. + Weight::from_parts(395_632_220_u64, 0) + // Standard Error: 1_017 + .saturating_add(Weight::from_parts(2_808_534_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -535,10 +535,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_value_transferred(r: u32, ) -> Weight { - // Minimum execution time: 377_280 nanoseconds. - Weight::from_parts(391_911_102_u64, 0) - // Standard Error: 599 - .saturating_add(Weight::from_parts(589_121_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_380 nanoseconds. + Weight::from_parts(392_638_043_u64, 0) + // Standard Error: 408 + .saturating_add(Weight::from_parts(571_689_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -564,10 +564,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_minimum_balance(r: u32, ) -> Weight { - // Minimum execution time: 395_440 nanoseconds. - Weight::from_parts(389_655_544_u64, 0) - // Standard Error: 655 - .saturating_add(Weight::from_parts(579_538_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_960 nanoseconds. + Weight::from_parts(391_264_215_u64, 0) + // Standard Error: 448 + .saturating_add(Weight::from_parts(572_075_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -593,10 +593,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_block_number(r: u32, ) -> Weight { - // Minimum execution time: 375_860 nanoseconds. - Weight::from_parts(385_639_817_u64, 0) - // Standard Error: 581 - .saturating_add(Weight::from_parts(577_545_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_589 nanoseconds. + Weight::from_parts(392_072_873_u64, 0) + // Standard Error: 437 + .saturating_add(Weight::from_parts(567_673_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -622,10 +622,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_now(r: u32, ) -> Weight { - // Minimum execution time: 375_300 nanoseconds. - Weight::from_parts(387_996_504_u64, 0) - // Standard Error: 422 - .saturating_add(Weight::from_parts(586_591_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_790 nanoseconds. + Weight::from_parts(390_746_463_u64, 0) + // Standard Error: 517 + .saturating_add(Weight::from_parts(574_213_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -653,10 +653,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { - // Minimum execution time: 376_220 nanoseconds. - Weight::from_parts(400_299_185_u64, 0) - // Standard Error: 942 - .saturating_add(Weight::from_parts(2_139_538_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_430 nanoseconds. + Weight::from_parts(402_749_112_u64, 0) + // Standard Error: 819 + .saturating_add(Weight::from_parts(2_130_270_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -682,10 +682,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_gas(r: u32, ) -> Weight { - // Minimum execution time: 286_960 nanoseconds. - Weight::from_parts(298_166_095_u64, 0) - // Standard Error: 237 - .saturating_add(Weight::from_parts(150_669_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 291_210 nanoseconds. + Weight::from_parts(302_201_440_u64, 0) + // Standard Error: 236 + .saturating_add(Weight::from_parts(150_417_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -711,10 +711,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_input(r: u32, ) -> Weight { - // Minimum execution time: 376_380 nanoseconds. - Weight::from_parts(388_215_441_u64, 0) - // Standard Error: 638 - .saturating_add(Weight::from_parts(413_386_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_800 nanoseconds. + Weight::from_parts(392_925_180_u64, 0) + // Standard Error: 505 + .saturating_add(Weight::from_parts(418_289_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -740,10 +740,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_input_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 377_870 nanoseconds. - Weight::from_parts(388_417_477_u64, 0) + // Minimum execution time: 381_229 nanoseconds. + Weight::from_parts(392_009_852_u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(579_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(582_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -769,10 +769,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { - // Minimum execution time: 367_420 nanoseconds. - Weight::from_parts(376_813_787_u64, 0) - // Standard Error: 406_911 - .saturating_add(Weight::from_parts(3_618_312_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_040 nanoseconds. + Weight::from_parts(381_528_646_u64, 0) + // Standard Error: 440_595 + .saturating_add(Weight::from_parts(4_465_353_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -798,8 +798,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_return_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 373_450 nanoseconds. - Weight::from_parts(382_136_567_u64, 0) + // Minimum execution time: 376_540 nanoseconds. + Weight::from_parts(385_925_776_u64, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(217_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) @@ -833,10 +833,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { - // Minimum execution time: 372_770 nanoseconds. - Weight::from_parts(382_830_906_u64, 0) - // Standard Error: 425_585 - .saturating_add(Weight::from_parts(201_230_693_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 377_340 nanoseconds. + Weight::from_parts(387_191_614_u64, 0) + // Standard Error: 401_619 + .saturating_add(Weight::from_parts(208_275_385_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -866,10 +866,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_random(r: u32, ) -> Weight { - // Minimum execution time: 373_560 nanoseconds. - Weight::from_parts(396_568_753_u64, 0) - // Standard Error: 1_317 - .saturating_add(Weight::from_parts(3_319_362_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_860 nanoseconds. + Weight::from_parts(407_636_014_u64, 0) + // Standard Error: 1_362 + .saturating_add(Weight::from_parts(3_352_493_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -895,10 +895,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_deposit_event(r: u32, ) -> Weight { - // Minimum execution time: 369_010 nanoseconds. - Weight::from_parts(390_095_875_u64, 0) - // Standard Error: 2_543 - .saturating_add(Weight::from_parts(6_510_074_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_790 nanoseconds. + Weight::from_parts(415_237_034_u64, 0) + // Standard Error: 2_609 + .saturating_add(Weight::from_parts(6_728_905_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -925,12 +925,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16384]`. fn seal_deposit_event_per_topic_and_byte(t: u32, n: u32, ) -> Weight { - // Minimum execution time: 399_160 nanoseconds. - Weight::from_parts(394_410_671_u64, 0) - // Standard Error: 55_673 - .saturating_add(Weight::from_parts(4_086_885_u64, 0).saturating_mul(t as u64)) - // Standard Error: 15 - .saturating_add(Weight::from_parts(917_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 404_140 nanoseconds. + Weight::from_parts(398_862_860_u64, 0) + // Standard Error: 71_368 + .saturating_add(Weight::from_parts(4_313_576_u64, 0).saturating_mul(t as u64)) + // Standard Error: 19 + .saturating_add(Weight::from_parts(925_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -958,10 +958,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_debug_message(r: u32, ) -> Weight { - // Minimum execution time: 290_790 nanoseconds. - Weight::from_parts(303_393_765_u64, 0) - // Standard Error: 417 - .saturating_add(Weight::from_parts(258_737_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 295_910 nanoseconds. + Weight::from_parts(307_139_225_u64, 0) + // Standard Error: 452 + .saturating_add(Weight::from_parts(272_028_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -987,10 +987,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1048576]`. fn seal_debug_message_per_byte(i: u32, ) -> Weight { - // Minimum execution time: 503_630 nanoseconds. - Weight::from_parts(511_270_955_u64, 0) + // Minimum execution time: 508_860 nanoseconds. + Weight::from_parts(516_529_476_u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(792_u64, 0).saturating_mul(i as u64)) + .saturating_add(Weight::from_parts(795_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -998,10 +998,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_set_storage(r: u32, ) -> Weight { - // Minimum execution time: 379_359 nanoseconds. - Weight::from_parts(279_684_710_u64, 0) - // Standard Error: 9_997 - .saturating_add(Weight::from_parts(7_611_206_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 381_690 nanoseconds. + Weight::from_parts(284_833_379_u64, 0) + // Standard Error: 10_052 + .saturating_add(Weight::from_parts(7_646_157_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1011,10 +1011,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_set_storage_per_new_byte(n: u32, ) -> Weight { - // Minimum execution time: 402_120 nanoseconds. - Weight::from_parts(463_457_763_u64, 0) - // Standard Error: 78 - .saturating_add(Weight::from_parts(721_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 408_420 nanoseconds. + Weight::from_parts(468_791_746_u64, 0) + // Standard Error: 76 + .saturating_add(Weight::from_parts(674_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -1022,10 +1022,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_set_storage_per_old_byte(n: u32, ) -> Weight { - // Minimum execution time: 398_550 nanoseconds. - Weight::from_parts(408_182_184_u64, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(240_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 401_920 nanoseconds. + Weight::from_parts(411_987_932_u64, 0) + // Standard Error: 19 + .saturating_add(Weight::from_parts(279_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1033,10 +1033,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_clear_storage(r: u32, ) -> Weight { - // Minimum execution time: 377_160 nanoseconds. - Weight::from_parts(275_781_165_u64, 0) - // Standard Error: 10_388 - .saturating_add(Weight::from_parts(7_480_300_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 381_860 nanoseconds. + Weight::from_parts(277_903_672_u64, 0) + // Standard Error: 10_386 + .saturating_add(Weight::from_parts(7_489_935_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1046,10 +1046,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_clear_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 397_130 nanoseconds. - Weight::from_parts(407_319_059_u64, 0) - // Standard Error: 30 - .saturating_add(Weight::from_parts(287_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 402_250 nanoseconds. + Weight::from_parts(413_319_249_u64, 0) + // Standard Error: 37 + .saturating_add(Weight::from_parts(121_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1057,10 +1057,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_get_storage(r: u32, ) -> Weight { - // Minimum execution time: 375_960 nanoseconds. - Weight::from_parts(286_631_138_u64, 0) - // Standard Error: 10_172 - .saturating_add(Weight::from_parts(6_507_243_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 385_500 nanoseconds. + Weight::from_parts(296_620_104_u64, 0) + // Standard Error: 9_288 + .saturating_add(Weight::from_parts(6_510_875_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1069,10 +1069,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_get_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 398_860 nanoseconds. - Weight::from_parts(411_623_698_u64, 0) - // Standard Error: 54 - .saturating_add(Weight::from_parts(637_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 403_240 nanoseconds. + Weight::from_parts(412_260_846_u64, 0) + // Standard Error: 37 + .saturating_add(Weight::from_parts(757_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1080,10 +1080,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_contains_storage(r: u32, ) -> Weight { - // Minimum execution time: 375_420 nanoseconds. - Weight::from_parts(292_342_200_u64, 0) - // Standard Error: 9_005 - .saturating_add(Weight::from_parts(6_206_593_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 381_100 nanoseconds. + Weight::from_parts(294_772_496_u64, 0) + // Standard Error: 9_372 + .saturating_add(Weight::from_parts(6_171_330_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1092,10 +1092,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_contains_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 394_570 nanoseconds. - Weight::from_parts(404_192_893_u64, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(359_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 401_310 nanoseconds. + Weight::from_parts(410_430_495_u64, 0) + // Standard Error: 32 + .saturating_add(Weight::from_parts(202_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1103,10 +1103,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_take_storage(r: u32, ) -> Weight { - // Minimum execution time: 376_620 nanoseconds. - Weight::from_parts(277_834_054_u64, 0) - // Standard Error: 10_341 - .saturating_add(Weight::from_parts(7_747_866_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_660 nanoseconds. + Weight::from_parts(275_604_513_u64, 0) + // Standard Error: 10_842 + .saturating_add(Weight::from_parts(7_777_716_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1116,10 +1116,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_take_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 401_700 nanoseconds. - Weight::from_parts(410_805_313_u64, 0) - // Standard Error: 37 - .saturating_add(Weight::from_parts(956_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 404_750 nanoseconds. + Weight::from_parts(414_406_039_u64, 0) + // Standard Error: 27 + .saturating_add(Weight::from_parts(846_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1145,10 +1145,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_transfer(r: u32, ) -> Weight { - // Minimum execution time: 381_380 nanoseconds. - Weight::from_parts(224_300_223_u64, 0) - // Standard Error: 27_808 - .saturating_add(Weight::from_parts(67_123_176_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 381_350 nanoseconds. + Weight::from_parts(323_648_256_u64, 0) + // Standard Error: 19_097 + .saturating_add(Weight::from_parts(68_412_115_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1176,10 +1176,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { - // Minimum execution time: 377_770 nanoseconds. - Weight::from_parts(383_790_000_u64, 0) - // Standard Error: 93_169 - .saturating_add(Weight::from_parts(330_245_446_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 384_360 nanoseconds. + Weight::from_parts(389_720_000_u64, 0) + // Standard Error: 75_371 + .saturating_add(Weight::from_parts(332_724_354_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1207,10 +1207,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_delegate_call(r: u32, ) -> Weight { - // Minimum execution time: 378_600 nanoseconds. - Weight::from_parts(382_120_000_u64, 0) - // Standard Error: 117_710 - .saturating_add(Weight::from_parts(324_006_853_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 382_640 nanoseconds. + Weight::from_parts(387_760_000_u64, 0) + // Standard Error: 108_064 + .saturating_add(Weight::from_parts(325_372_016_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1239,12 +1239,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { - // Minimum execution time: 691_030 nanoseconds. - Weight::from_parts(627_254_644_u64, 0) - // Standard Error: 559_888 - .saturating_add(Weight::from_parts(72_065_387_u64, 0).saturating_mul(t as u64)) + // Minimum execution time: 698_770 nanoseconds. + Weight::from_parts(636_373_395_u64, 0) + // Standard Error: 486_016 + .saturating_add(Weight::from_parts(72_976_113_u64, 0).saturating_mul(t as u64)) // Standard Error: 0 - .saturating_add(Weight::from_parts(584_u64, 0).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(583_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(7_u64)) @@ -1276,10 +1276,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { - // Minimum execution time: 933_650 nanoseconds. - Weight::from_parts(937_360_000_u64, 0) - // Standard Error: 263_426 - .saturating_add(Weight::from_parts(559_327_392_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 945_000 nanoseconds. + Weight::from_parts(948_450_000_u64, 0) + // Standard Error: 246_205 + .saturating_add(Weight::from_parts(564_340_692_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(8_u64)) @@ -1313,14 +1313,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_546_440 nanoseconds. - Weight::from_parts(770_341_003_u64, 0) - // Standard Error: 4_378_819 - .saturating_add(Weight::from_parts(107_137_012_u64, 0).saturating_mul(t as u64)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_720_u64, 0).saturating_mul(i as u64)) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_794_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 2_556_310 nanoseconds. + Weight::from_parts(779_804_090_u64, 0) + // Standard Error: 4_580_135 + .saturating_add(Weight::from_parts(117_155_943_u64, 0).saturating_mul(t as u64)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_721_u64, 0).saturating_mul(i as u64)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_782_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(12_u64)) @@ -1348,10 +1348,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { - // Minimum execution time: 369_580 nanoseconds. - Weight::from_parts(384_718_815_u64, 0) - // Standard Error: 506 - .saturating_add(Weight::from_parts(527_930_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_830 nanoseconds. + Weight::from_parts(390_280_556_u64, 0) + // Standard Error: 589 + .saturating_add(Weight::from_parts(543_953_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1377,10 +1377,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_sha2_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 373_550 nanoseconds. - Weight::from_parts(378_905_829_u64, 0) + // Minimum execution time: 379_300 nanoseconds. + Weight::from_parts(383_418_823_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_126_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(1_123_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1406,10 +1406,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { - // Minimum execution time: 368_480 nanoseconds. - Weight::from_parts(384_625_361_u64, 0) - // Standard Error: 659 - .saturating_add(Weight::from_parts(885_141_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 376_130 nanoseconds. + Weight::from_parts(387_840_387_u64, 0) + // Standard Error: 504 + .saturating_add(Weight::from_parts(906_203_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1435,10 +1435,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 374_460 nanoseconds. - Weight::from_parts(379_887_474_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_206_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 379_889 nanoseconds. + Weight::from_parts(383_169_141_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_254_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1464,10 +1464,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { - // Minimum execution time: 369_410 nanoseconds. - Weight::from_parts(382_033_929_u64, 0) - // Standard Error: 507 - .saturating_add(Weight::from_parts(620_958_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 375_300 nanoseconds. + Weight::from_parts(386_141_509_u64, 0) + // Standard Error: 432 + .saturating_add(Weight::from_parts(628_420_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1493,10 +1493,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 373_989 nanoseconds. - Weight::from_parts(378_243_004_u64, 0) + // Minimum execution time: 376_660 nanoseconds. + Weight::from_parts(383_630_643_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_465_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(1_458_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1522,10 +1522,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { - // Minimum execution time: 370_120 nanoseconds. - Weight::from_parts(382_574_249_u64, 0) - // Standard Error: 436 - .saturating_add(Weight::from_parts(610_425_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_990 nanoseconds. + Weight::from_parts(389_160_380_u64, 0) + // Standard Error: 460 + .saturating_add(Weight::from_parts(623_960_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1551,10 +1551,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 374_810 nanoseconds. - Weight::from_parts(379_120_226_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_464_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 378_340 nanoseconds. + Weight::from_parts(381_284_849_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_461_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1580,10 +1580,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 447_070 nanoseconds. - Weight::from_parts(457_707_992_u64, 0) + // Minimum execution time: 454_040 nanoseconds. + Weight::from_parts(464_620_092_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(6_093_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(6_016_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1609,10 +1609,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { - // Minimum execution time: 378_839 nanoseconds. - Weight::from_parts(404_533_261_u64, 0) - // Standard Error: 8_174 - .saturating_add(Weight::from_parts(59_225_177_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 382_790 nanoseconds. + Weight::from_parts(409_201_580_u64, 0) + // Standard Error: 7_414 + .saturating_add(Weight::from_parts(59_300_752_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1638,10 +1638,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { - // Minimum execution time: 376_591 nanoseconds. - Weight::from_parts(407_415_184_u64, 0) - // Standard Error: 8_727 - .saturating_add(Weight::from_parts(43_069_439_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 384_460 nanoseconds. + Weight::from_parts(408_702_777_u64, 0) + // Standard Error: 10_849 + .saturating_add(Weight::from_parts(43_021_782_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1667,10 +1667,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { - // Minimum execution time: 378_250 nanoseconds. - Weight::from_parts(394_404_253_u64, 0) - // Standard Error: 5_761 - .saturating_add(Weight::from_parts(11_288_077_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 380_990 nanoseconds. + Weight::from_parts(397_850_988_u64, 0) + // Standard Error: 4_740 + .saturating_add(Weight::from_parts(11_231_123_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1698,10 +1698,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_set_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 388_130 nanoseconds. - Weight::from_parts(389_150_000_u64, 0) - // Standard Error: 37_587 - .saturating_add(Weight::from_parts(32_257_944_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_909 nanoseconds. + Weight::from_parts(384_580_000_u64, 0) + // Standard Error: 37_730 + .saturating_add(Weight::from_parts(33_035_152_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1729,10 +1729,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 370_670 nanoseconds. - Weight::from_parts(382_544_507_u64, 0) - // Standard Error: 427 - .saturating_add(Weight::from_parts(182_627_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_540 nanoseconds. + Weight::from_parts(385_732_270_u64, 0) + // Standard Error: 324 + .saturating_add(Weight::from_parts(184_891_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1758,10 +1758,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 376_729 nanoseconds. - Weight::from_parts(411_815_446_u64, 0) - // Standard Error: 713 - .saturating_add(Weight::from_parts(262_773_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 378_910 nanoseconds. + Weight::from_parts(415_049_910_u64, 0) + // Standard Error: 597 + .saturating_add(Weight::from_parts(267_223_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1789,368 +1789,368 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { - // Minimum execution time: 371_889 nanoseconds. - Weight::from_parts(387_742_744_u64, 0) - // Standard Error: 355 - .saturating_add(Weight::from_parts(150_086_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_170 nanoseconds. + Weight::from_parts(388_538_543_u64, 0) + // Standard Error: 291 + .saturating_add(Weight::from_parts(154_183_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64const(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_448_632_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_541_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_170 nanoseconds. + Weight::from_parts(3_646_731_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(4_044_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { - // Minimum execution time: 3_260 nanoseconds. - Weight::from_parts(3_879_972_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(7_152_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_480 nanoseconds. + Weight::from_parts(4_266_521_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_386_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { - // Minimum execution time: 3_350 nanoseconds. - Weight::from_parts(3_946_393_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(7_698_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_410 nanoseconds. + Weight::from_parts(4_170_766_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(7_971_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_703_498_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(10_676_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_080 nanoseconds. + Weight::from_parts(3_765_913_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(10_784_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { - // Minimum execution time: 3_069 nanoseconds. - Weight::from_parts(6_423_843_u64, 0) - // Standard Error: 339 - .saturating_add(Weight::from_parts(14_418_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_070 nanoseconds. + Weight::from_parts(4_505_185_u64, 0) + // Standard Error: 145 + .saturating_add(Weight::from_parts(19_203_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { - // Minimum execution time: 3_050 nanoseconds. - Weight::from_parts(3_737_768_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_482_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(4_124_079_u64, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(6_791_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_763_046_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_501_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_100 nanoseconds. + Weight::from_parts(4_131_779_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_780_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_952_004_u64, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(11_313_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_069 nanoseconds. + Weight::from_parts(4_195_873_u64, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(11_397_u64, 0).saturating_mul(r as u64)) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_421_963_u64, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(9_u64, 0).saturating_mul(e as u64)) + // Minimum execution time: 3_230 nanoseconds. + Weight::from_parts(3_544_771_u64, 0) + // Standard Error: 35 + .saturating_add(Weight::from_parts(144_u64, 0).saturating_mul(e as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { - // Minimum execution time: 3_110 nanoseconds. - Weight::from_parts(3_383_035_u64, 0) - // Standard Error: 18 - .saturating_add(Weight::from_parts(20_603_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_220 nanoseconds. + Weight::from_parts(3_585_496_u64, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(18_843_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { - // Minimum execution time: 3_620 nanoseconds. - Weight::from_parts(5_574_526_u64, 0) - // Standard Error: 37 - .saturating_add(Weight::from_parts(28_099_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_900 nanoseconds. + Weight::from_parts(5_709_266_u64, 0) + // Standard Error: 32 + .saturating_add(Weight::from_parts(26_985_u64, 0).saturating_mul(r as u64)) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { - // Minimum execution time: 3_090 nanoseconds. - Weight::from_parts(3_638_621_u64, 0) - // Standard Error: 25 - .saturating_add(Weight::from_parts(1_498_u64, 0).saturating_mul(l as u64)) + // Minimum execution time: 3_240 nanoseconds. + Weight::from_parts(3_658_358_u64, 0) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_536_u64, 0).saturating_mul(l as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { - // Minimum execution time: 4_740 nanoseconds. - Weight::from_parts(5_155_284_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_519_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_830 nanoseconds. + Weight::from_parts(5_052_492_u64, 0) + // Standard Error: 31 + .saturating_add(Weight::from_parts(20_838_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { - // Minimum execution time: 4_760 nanoseconds. - Weight::from_parts(5_148_479_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_839_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_830 nanoseconds. + Weight::from_parts(5_110_722_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_913_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { - // Minimum execution time: 4_680 nanoseconds. - Weight::from_parts(5_138_550_u64, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(5_892_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_760 nanoseconds. + Weight::from_parts(5_482_586_u64, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(6_216_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { - // Minimum execution time: 3_300 nanoseconds. - Weight::from_parts(4_038_111_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(9_146_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_480 nanoseconds. + Weight::from_parts(4_105_054_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_978_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { - // Minimum execution time: 3_300 nanoseconds. - Weight::from_parts(4_248_567_u64, 0) - // Standard Error: 20 - .saturating_add(Weight::from_parts(9_448_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_490 nanoseconds. + Weight::from_parts(4_001_987_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(9_851_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { - // Minimum execution time: 3_300 nanoseconds. - Weight::from_parts(3_736_187_u64, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(6_200_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_420 nanoseconds. + Weight::from_parts(3_925_654_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(5_118_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { - // Minimum execution time: 3_210 nanoseconds. - Weight::from_parts(1_693_585_u64, 0) - // Standard Error: 177_360 - .saturating_add(Weight::from_parts(16_119_688_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_260 nanoseconds. + Weight::from_parts(1_641_524_u64, 0) + // Standard Error: 176_303 + .saturating_add(Weight::from_parts(16_155_407_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { - // Minimum execution time: 3_050 nanoseconds. - Weight::from_parts(3_517_850_u64, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(5_560_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_080 nanoseconds. + Weight::from_parts(3_642_905_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(6_074_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { - // Minimum execution time: 3_010 nanoseconds. - Weight::from_parts(3_522_031_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_828_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_150 nanoseconds. + Weight::from_parts(3_696_251_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(6_340_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_526_888_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_836_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_000 nanoseconds. + Weight::from_parts(3_636_177_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(6_356_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { - // Minimum execution time: 3_020 nanoseconds. - Weight::from_parts(3_497_162_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_839_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_091 nanoseconds. + Weight::from_parts(3_659_253_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(6_584_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(3_522_114_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_816_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_110 nanoseconds. + Weight::from_parts(3_613_892_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(6_360_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { - // Minimum execution time: 3_080 nanoseconds. - Weight::from_parts(3_510_620_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_535_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_129 nanoseconds. + Weight::from_parts(3_639_176_u64, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(6_376_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_412_527_u64, 0) - // Standard Error: 11 - .saturating_add(Weight::from_parts(5_947_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_140 nanoseconds. + Weight::from_parts(3_702_983_u64, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(6_349_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { - // Minimum execution time: 3_060 nanoseconds. - Weight::from_parts(3_625_618_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_120_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_150 nanoseconds. + Weight::from_parts(3_703_537_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_663_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { - // Minimum execution time: 3_080 nanoseconds. - Weight::from_parts(3_645_283_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_117_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_130 nanoseconds. + Weight::from_parts(3_673_460_u64, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(8_694_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_639_464_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_118_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_180 nanoseconds. + Weight::from_parts(3_733_086_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_644_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_629_861_u64, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_131_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_250 nanoseconds. + Weight::from_parts(3_726_184_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_657_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { - // Minimum execution time: 3_071 nanoseconds. - Weight::from_parts(3_612_888_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_133_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_170 nanoseconds. + Weight::from_parts(3_758_014_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_623_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_612_211_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_442_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_809_755_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_591_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { - // Minimum execution time: 3_080 nanoseconds. - Weight::from_parts(3_631_383_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(7_834_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_180 nanoseconds. + Weight::from_parts(3_729_222_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_658_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Minimum execution time: 3_040 nanoseconds. - Weight::from_parts(3_649_727_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(8_423_u64, 0).saturating_mul(r as u64)) + Weight::from_parts(3_707_227_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_930_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { - // Minimum execution time: 3_020 nanoseconds. - Weight::from_parts(3_620_811_u64, 0) + // Minimum execution time: 3_090 nanoseconds. + Weight::from_parts(3_709_248_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(8_129_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_661_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { - // Minimum execution time: 3_020 nanoseconds. - Weight::from_parts(3_619_824_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_126_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_689_326_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_952_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { - // Minimum execution time: 3_090 nanoseconds. - Weight::from_parts(3_568_778_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_132_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_100 nanoseconds. + Weight::from_parts(3_736_984_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_640_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { - // Minimum execution time: 3_010 nanoseconds. - Weight::from_parts(3_615_968_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_122_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_150 nanoseconds. + Weight::from_parts(3_794_381_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_592_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_594_448_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_137_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_091 nanoseconds. + Weight::from_parts(3_784_335_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_584_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(3_594_269_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_975_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_100 nanoseconds. + Weight::from_parts(3_685_184_u64, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(9_822_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { - // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_648_606_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(8_697_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_149 nanoseconds. + Weight::from_parts(3_775_067_u64, 0) + // Standard Error: 16 + .saturating_add(Weight::from_parts(9_231_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_490_052_u64, 0) + // Minimum execution time: 3_140 nanoseconds. + Weight::from_parts(3_718_663_u64, 0) // Standard Error: 9 - .saturating_add(Weight::from_parts(9_274_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(9_803_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_646_150_u64, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_680_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_070 nanoseconds. + Weight::from_parts(3_690_845_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(9_277_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { - // Minimum execution time: 3_020 nanoseconds. - Weight::from_parts(3_598_032_u64, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(7_838_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_120 nanoseconds. + Weight::from_parts(3_752_404_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_619_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { - // Minimum execution time: 3_060 nanoseconds. - Weight::from_parts(3_590_381_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_134_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_170 nanoseconds. + Weight::from_parts(3_799_900_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_633_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_689_905_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_107_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_150 nanoseconds. + Weight::from_parts(3_766_677_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_635_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { - // Minimum execution time: 3_070 nanoseconds. - Weight::from_parts(3_582_586_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_406_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_160 nanoseconds. + Weight::from_parts(3_820_262_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_586_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { - // Minimum execution time: 3_090 nanoseconds. - Weight::from_parts(3_614_232_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_118_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_160 nanoseconds. + Weight::from_parts(3_752_578_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_626_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { - // Minimum execution time: 3_020 nanoseconds. - Weight::from_parts(3_571_026_u64, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(8_162_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_090 nanoseconds. + Weight::from_parts(3_743_029_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_359_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(3_617_184_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_120_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_030 nanoseconds. + Weight::from_parts(3_675_945_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_666_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { - // Minimum execution time: 3_050 nanoseconds. - Weight::from_parts(3_619_116_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(8_128_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_786_935_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(8_622_u64, 0).saturating_mul(r as u64)) } } diff --git a/runtimes/eden/src/weights/pallet_membership.rs b/runtimes/eden/src/weights/pallet_membership.rs index 35c748e5dfe..4bfba54d884 100644 --- a/runtimes/eden/src/weights/pallet_membership.rs +++ b/runtimes/eden/src/weights/pallet_membership.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -65,10 +65,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 49]`. fn add_member(m: u32, ) -> Weight { - // Minimum execution time: 25_700 nanoseconds. - Weight::from_parts(26_936_324_u64, 0) - // Standard Error: 1_088 - .saturating_add(Weight::from_parts(65_278_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 26_560 nanoseconds. + Weight::from_parts(27_820_234_u64, 0) + // Standard Error: 1_157 + .saturating_add(Weight::from_parts(62_927_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -92,10 +92,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 50]`. fn remove_member(m: u32, ) -> Weight { - // Minimum execution time: 29_470 nanoseconds. - Weight::from_parts(30_891_100_u64, 0) - // Standard Error: 1_691 - .saturating_add(Weight::from_parts(59_368_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 30_000 nanoseconds. + Weight::from_parts(31_757_245_u64, 0) + // Standard Error: 1_677 + .saturating_add(Weight::from_parts(53_811_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -119,10 +119,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 50]`. fn swap_member(m: u32, ) -> Weight { - // Minimum execution time: 29_890 nanoseconds. - Weight::from_parts(31_136_747_u64, 0) - // Standard Error: 1_632 - .saturating_add(Weight::from_parts(85_361_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 30_440 nanoseconds. + Weight::from_parts(32_045_233_u64, 0) + // Standard Error: 2_265 + .saturating_add(Weight::from_parts(77_954_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -146,10 +146,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn reset_member(m: u32, ) -> Weight { - // Minimum execution time: 29_470 nanoseconds. - Weight::from_parts(31_706_138_u64, 0) - // Standard Error: 2_451 - .saturating_add(Weight::from_parts(233_174_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 30_290 nanoseconds. + Weight::from_parts(32_319_847_u64, 0) + // Standard Error: 2_349 + .saturating_add(Weight::from_parts(224_187_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -173,10 +173,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn change_key(m: u32, ) -> Weight { - // Minimum execution time: 31_000 nanoseconds. - Weight::from_parts(32_510_851_u64, 0) - // Standard Error: 1_632 - .saturating_add(Weight::from_parts(86_350_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 31_160 nanoseconds. + Weight::from_parts(33_213_913_u64, 0) + // Standard Error: 3_032 + .saturating_add(Weight::from_parts(78_812_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -188,10 +188,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn set_prime(m: u32, ) -> Weight { - // Minimum execution time: 10_930 nanoseconds. - Weight::from_parts(11_445_262_u64, 0) - // Standard Error: 520 - .saturating_add(Weight::from_parts(14_444_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 11_280 nanoseconds. + Weight::from_parts(11_880_846_u64, 0) + // Standard Error: 525 + .saturating_add(Weight::from_parts(9_314_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -201,10 +201,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn clear_prime(m: u32, ) -> Weight { - // Minimum execution time: 4_950 nanoseconds. - Weight::from_parts(5_244_125_u64, 0) - // Standard Error: 295 - .saturating_add(Weight::from_parts(2_502_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 5_300 nanoseconds. + Weight::from_parts(5_689_917_u64, 0) + // Standard Error: 334 + .saturating_add(Weight::from_parts(2_827_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } } diff --git a/runtimes/eden/src/weights/pallet_multisig.rs b/runtimes/eden/src/weights/pallet_multisig.rs index 3354e58fce1..a4709a3c0f4 100644 --- a/runtimes/eden/src/weights/pallet_multisig.rs +++ b/runtimes/eden/src/weights/pallet_multisig.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,10 +49,10 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 17_680 nanoseconds. - Weight::from_parts(18_871_077_u64, 0) + // Minimum execution time: 17_980 nanoseconds. + Weight::from_parts(19_226_063_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(445_u64, 0).saturating_mul(z as u64)) + .saturating_add(Weight::from_parts(438_u64, 0).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 66_390 nanoseconds. - Weight::from_parts(58_796_197_u64, 0) - // Standard Error: 1_186 - .saturating_add(Weight::from_parts(98_060_u64, 0).saturating_mul(s as u64)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(1_402_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 68_560 nanoseconds. + Weight::from_parts(61_704_653_u64, 0) + // Standard Error: 1_106 + .saturating_add(Weight::from_parts(92_028_u64, 0).saturating_mul(s as u64)) + // Standard Error: 10 + .saturating_add(Weight::from_parts(1_389_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -89,12 +89,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 40_700 nanoseconds. - Weight::from_parts(33_416_002_u64, 0) - // Standard Error: 591 - .saturating_add(Weight::from_parts(85_542_u64, 0).saturating_mul(s as u64)) - // Standard Error: 5 - .saturating_add(Weight::from_parts(1_426_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 42_740 nanoseconds. + Weight::from_parts(36_010_226_u64, 0) + // Standard Error: 813 + .saturating_add(Weight::from_parts(79_569_u64, 0).saturating_mul(s as u64)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_393_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -113,12 +113,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 72_850 nanoseconds. - Weight::from_parts(62_962_096_u64, 0) - // Standard Error: 1_182 - .saturating_add(Weight::from_parts(122_167_u64, 0).saturating_mul(s as u64)) - // Standard Error: 11 - .saturating_add(Weight::from_parts(1_500_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 76_200 nanoseconds. + Weight::from_parts(66_188_610_u64, 0) + // Standard Error: 1_246 + .saturating_add(Weight::from_parts(119_610_u64, 0).saturating_mul(s as u64)) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_476_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -134,10 +134,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 54_271 nanoseconds. - Weight::from_parts(56_630_864_u64, 0) - // Standard Error: 1_165 - .saturating_add(Weight::from_parts(98_958_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 56_630 nanoseconds. + Weight::from_parts(58_945_224_u64, 0) + // Standard Error: 1_076 + .saturating_add(Weight::from_parts(97_044_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -153,10 +153,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 30_780 nanoseconds. - Weight::from_parts(31_693_760_u64, 0) - // Standard Error: 845 - .saturating_add(Weight::from_parts(83_673_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 32_670 nanoseconds. + Weight::from_parts(33_530_453_u64, 0) + // Standard Error: 648 + .saturating_add(Weight::from_parts(79_949_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -172,10 +172,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 55_820 nanoseconds. - Weight::from_parts(57_571_778_u64, 0) - // Standard Error: 1_169 - .saturating_add(Weight::from_parts(93_453_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 57_920 nanoseconds. + Weight::from_parts(59_844_460_u64, 0) + // Standard Error: 1_405 + .saturating_add(Weight::from_parts(86_409_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } diff --git a/runtimes/eden/src/weights/pallet_preimage.rs b/runtimes/eden/src/weights/pallet_preimage.rs index 70090824514..3f3a12f84e4 100644 --- a/runtimes/eden/src/weights/pallet_preimage.rs +++ b/runtimes/eden/src/weights/pallet_preimage.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,10 +61,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - // Minimum execution time: 51_020 nanoseconds. - Weight::from_parts(24_836_949_u64, 0) + // Minimum execution time: 52_020 nanoseconds. + Weight::from_parts(42_445_488_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(2_124_u64, 0).saturating_mul(s as u64)) + .saturating_add(Weight::from_parts(2_085_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -82,10 +82,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - // Minimum execution time: 27_790 nanoseconds. - Weight::from_parts(28_010_000_u64, 0) + // Minimum execution time: 27_970 nanoseconds. + Weight::from_parts(28_880_000_u64, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(2_113_u64, 0).saturating_mul(s as u64)) + .saturating_add(Weight::from_parts(2_103_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -103,10 +103,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - // Minimum execution time: 26_910 nanoseconds. - Weight::from_parts(27_300_000_u64, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(2_120_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 27_389 nanoseconds. + Weight::from_parts(27_891_000_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_113_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -123,8 +123,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_preimage() -> Weight { - // Minimum execution time: 57_330 nanoseconds. - Weight::from_parts(58_420_000_u64, 0) + // Minimum execution time: 58_540 nanoseconds. + Weight::from_parts(60_390_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -141,8 +141,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_no_deposit_preimage() -> Weight { - // Minimum execution time: 31_730 nanoseconds. - Weight::from_parts(32_580_000_u64, 0) + // Minimum execution time: 33_100 nanoseconds. + Weight::from_parts(33_980_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -157,16 +157,16 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn request_preimage() -> Weight { - // Minimum execution time: 28_720 nanoseconds. - Weight::from_parts(29_590_000_u64, 0) + // Minimum execution time: 29_371 nanoseconds. + Weight::from_parts(30_110_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_no_deposit_preimage() -> Weight { - // Minimum execution time: 16_080 nanoseconds. - Weight::from_parts(16_889_000_u64, 0) + // Minimum execution time: 16_240 nanoseconds. + Weight::from_parts(16_810_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -181,16 +181,16 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn request_unnoted_preimage() -> Weight { - // Minimum execution time: 24_240 nanoseconds. - Weight::from_parts(24_960_000_u64, 0) + // Minimum execution time: 25_120 nanoseconds. + Weight::from_parts(25_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_requested_preimage() -> Weight { - // Minimum execution time: 13_190 nanoseconds. - Weight::from_parts(13_630_000_u64, 0) + // Minimum execution time: 13_829 nanoseconds. + Weight::from_parts(14_160_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -207,24 +207,24 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unrequest_preimage() -> Weight { - // Minimum execution time: 29_670 nanoseconds. - Weight::from_parts(30_410_000_u64, 0) + // Minimum execution time: 30_600 nanoseconds. + Weight::from_parts(31_700_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_unnoted_preimage() -> Weight { - // Minimum execution time: 12_710 nanoseconds. - Weight::from_parts(13_150_000_u64, 0) + // Minimum execution time: 13_290 nanoseconds. + Weight::from_parts(13_769_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_multi_referenced_preimage() -> Weight { - // Minimum execution time: 13_050 nanoseconds. - Weight::from_parts(13_640_000_u64, 0) + // Minimum execution time: 13_580 nanoseconds. + Weight::from_parts(13_970_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } diff --git a/runtimes/eden/src/weights/pallet_timestamp.rs b/runtimes/eden/src/weights/pallet_timestamp.rs index acadadd072a..efe95e4a96f 100644 --- a/runtimes/eden/src/weights/pallet_timestamp.rs +++ b/runtimes/eden/src/weights/pallet_timestamp.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,13 +50,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - // Minimum execution time: 10_850 nanoseconds. - Weight::from_parts(11_260_000_u64, 0) + // Minimum execution time: 11_250 nanoseconds. + Weight::from_parts(11_770_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn on_finalize() -> Weight { - // Minimum execution time: 6_180 nanoseconds. - Weight::from_parts(6_420_000_u64, 0) + // Minimum execution time: 6_310 nanoseconds. + Weight::from_parts(6_470_000_u64, 0) } } diff --git a/runtimes/eden/src/weights/pallet_uniques.rs b/runtimes/eden/src/weights/pallet_uniques.rs index 4fa83dbc05f..94353d2b537 100644 --- a/runtimes/eden/src/weights/pallet_uniques.rs +++ b/runtimes/eden/src/weights/pallet_uniques.rs @@ -19,17 +19,17 @@ //! Autogenerated weights for pallet_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-27, STEPS: `8`, REPEAT: 11, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `tama`, CPU: `11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/release/nodle-parachain +// ./target/release/nodle-parachain // benchmark // pallet // --chain=dev -// --steps=8 -// --repeat=11 +// --steps=50 +// --repeat=20 // --pallet=pallet_uniques // --extrinsic=* // --execution=wasm @@ -60,8 +60,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn create() -> Weight { - // Minimum execution time: 46_988 nanoseconds. - Weight::from_parts(47_702_000_u64, 0) + // Minimum execution time: 50_870 nanoseconds. + Weight::from_parts(51_951_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -78,8 +78,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_create() -> Weight { - // Minimum execution time: 24_034 nanoseconds. - Weight::from_parts(24_675_000_u64, 0) + // Minimum execution time: 25_160 nanoseconds. + Weight::from_parts(25_870_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -111,14 +111,14 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_707_170 nanoseconds. - Weight::from_parts(291_155_708_u64, 0) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(7_182_204_u64, 0).saturating_mul(n as u64)) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(1_162_388_u64, 0).saturating_mul(m as u64)) - // Standard Error: 31_683 - .saturating_add(Weight::from_parts(1_216_824_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 2_823_130 nanoseconds. + Weight::from_parts(2_843_460_000_u64, 0) + // Standard Error: 25_391 + .saturating_add(Weight::from_parts(10_271_855_u64, 0).saturating_mul(n as u64)) + // Standard Error: 25_391 + .saturating_add(Weight::from_parts(253_681_u64, 0).saturating_mul(m as u64)) + // Standard Error: 25_391 + .saturating_add(Weight::from_parts(329_868_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -145,8 +145,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn mint() -> Weight { - // Minimum execution time: 42_225 nanoseconds. - Weight::from_parts(42_592_000_u64, 0) + // Minimum execution time: 62_270 nanoseconds. + Weight::from_parts(63_250_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -167,8 +167,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 44_017 nanoseconds. - Weight::from_parts(44_739_000_u64, 0) + // Minimum execution time: 63_720 nanoseconds. + Weight::from_parts(65_230_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -189,8 +189,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn transfer() -> Weight { - // Minimum execution time: 31_201 nanoseconds. - Weight::from_parts(31_950_000_u64, 0) + // Minimum execution time: 44_900 nanoseconds. + Weight::from_parts(45_650_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -208,10 +208,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - // Minimum execution time: 17_054 nanoseconds. - Weight::from_parts(17_209_000_u64, 0) - // Standard Error: 31_935 - .saturating_add(Weight::from_parts(18_225_581_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 24_290 nanoseconds. + Weight::from_parts(24_920_000_u64, 0) + // Standard Error: 15_832 + .saturating_add(Weight::from_parts(27_964_005_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -230,8 +230,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze() -> Weight { - // Minimum execution time: 21_441 nanoseconds. - Weight::from_parts(22_010_000_u64, 0) + // Minimum execution time: 30_420 nanoseconds. + Weight::from_parts(31_170_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -248,8 +248,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw() -> Weight { - // Minimum execution time: 21_632 nanoseconds. - Weight::from_parts(22_017_000_u64, 0) + // Minimum execution time: 30_071 nanoseconds. + Weight::from_parts(30_680_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -264,8 +264,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze_collection() -> Weight { - // Minimum execution time: 15_941 nanoseconds. - Weight::from_parts(16_315_000_u64, 0) + // Minimum execution time: 22_340 nanoseconds. + Weight::from_parts(23_210_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -280,8 +280,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw_collection() -> Weight { - // Minimum execution time: 15_927 nanoseconds. - Weight::from_parts(16_400_000_u64, 0) + // Minimum execution time: 22_630 nanoseconds. + Weight::from_parts(23_130_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -300,8 +300,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:2) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 25_054 nanoseconds. - Weight::from_parts(25_420_000_u64, 0) + // Minimum execution time: 35_560 nanoseconds. + Weight::from_parts(36_410_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -316,8 +316,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_team() -> Weight { - // Minimum execution time: 16_619 nanoseconds. - Weight::from_parts(16_905_000_u64, 0) + // Minimum execution time: 23_510 nanoseconds. + Weight::from_parts(24_340_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -334,8 +334,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_item_status() -> Weight { - // Minimum execution time: 19_596 nanoseconds. - Weight::from_parts(19_904_000_u64, 0) + // Minimum execution time: 27_460 nanoseconds. + Weight::from_parts(28_380_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -354,8 +354,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_attribute() -> Weight { - // Minimum execution time: 46_776 nanoseconds. - Weight::from_parts(47_116_000_u64, 0) + // Minimum execution time: 68_530 nanoseconds. + Weight::from_parts(69_920_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -374,8 +374,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_attribute() -> Weight { - // Minimum execution time: 44_091 nanoseconds. - Weight::from_parts(45_006_000_u64, 0) + // Minimum execution time: 63_430 nanoseconds. + Weight::from_parts(64_770_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -392,8 +392,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_metadata() -> Weight { - // Minimum execution time: 35_699 nanoseconds. - Weight::from_parts(36_366_000_u64, 0) + // Minimum execution time: 50_840 nanoseconds. + Weight::from_parts(52_040_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -410,8 +410,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_metadata() -> Weight { - // Minimum execution time: 36_573 nanoseconds. - Weight::from_parts(36_853_000_u64, 0) + // Minimum execution time: 52_040 nanoseconds. + Weight::from_parts(53_350_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -428,8 +428,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_metadata() -> Weight { - // Minimum execution time: 36_968 nanoseconds. - Weight::from_parts(37_562_000_u64, 0) + // Minimum execution time: 53_610 nanoseconds. + Weight::from_parts(54_380_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -446,8 +446,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_collection_metadata() -> Weight { - // Minimum execution time: 35_887 nanoseconds. - Weight::from_parts(36_289_000_u64, 0) + // Minimum execution time: 50_980 nanoseconds. + Weight::from_parts(52_360_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -464,8 +464,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn approve_transfer() -> Weight { - // Minimum execution time: 22_518 nanoseconds. - Weight::from_parts(23_136_000_u64, 0) + // Minimum execution time: 31_311 nanoseconds. + Weight::from_parts(32_520_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -482,8 +482,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn cancel_approval() -> Weight { - // Minimum execution time: 22_680 nanoseconds. - Weight::from_parts(23_962_000_u64, 0) + // Minimum execution time: 31_380 nanoseconds. + Weight::from_parts(32_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -498,8 +498,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_accept_ownership() -> Weight { - // Minimum execution time: 18_176 nanoseconds. - Weight::from_parts(18_597_000_u64, 0) + // Minimum execution time: 25_900 nanoseconds. + Weight::from_parts(26_830_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -516,8 +516,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_max_supply() -> Weight { - // Minimum execution time: 18_929 nanoseconds. - Weight::from_parts(21_410_000_u64, 0) + // Minimum execution time: 25_840 nanoseconds. + Weight::from_parts(26_530_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -534,8 +534,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn set_price() -> Weight { - // Minimum execution time: 19_445 nanoseconds. - Weight::from_parts(19_595_000_u64, 0) + // Minimum execution time: 26_390 nanoseconds. + Weight::from_parts(27_129_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -556,8 +556,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques Account (r:0 w:2) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn buy_item() -> Weight { - // Minimum execution time: 43_806 nanoseconds. - Weight::from_parts(44_693_000_u64, 0) + // Minimum execution time: 61_810 nanoseconds. + Weight::from_parts(63_420_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } diff --git a/runtimes/eden/src/weights/pallet_utility.rs b/runtimes/eden/src/weights/pallet_utility.rs index 2397d5ddc2d..952d88f09e1 100644 --- a/runtimes/eden/src/weights/pallet_utility.rs +++ b/runtimes/eden/src/weights/pallet_utility.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -57,16 +57,16 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // Minimum execution time: 13_890 nanoseconds. - Weight::from_parts(36_523_333_u64, 0) - // Standard Error: 11_568 - .saturating_add(Weight::from_parts(8_301_885_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_249 nanoseconds. + Weight::from_parts(21_983_687_u64, 0) + // Standard Error: 2_493 + .saturating_add(Weight::from_parts(8_711_227_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } fn as_derivative() -> Weight { - // Minimum execution time: 9_050 nanoseconds. - Weight::from_parts(9_360_000_u64, 0) + // Minimum execution time: 9_470 nanoseconds. + Weight::from_parts(9_990_000_u64, 0) } // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -78,10 +78,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // Minimum execution time: 13_830 nanoseconds. - Weight::from_parts(19_297_958_u64, 0) - // Standard Error: 2_579 - .saturating_add(Weight::from_parts(8_820_697_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_331 nanoseconds. + Weight::from_parts(12_307_035_u64, 0) + // Standard Error: 3_080 + .saturating_add(Weight::from_parts(9_311_752_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -94,8 +94,8 @@ impl pallet_utility::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn dispatch_as() -> Weight { - // Minimum execution time: 17_920 nanoseconds. - Weight::from_parts(18_600_000_u64, 0) + // Minimum execution time: 18_870 nanoseconds. + Weight::from_parts(19_460_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -109,10 +109,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // Minimum execution time: 13_800 nanoseconds. - Weight::from_parts(17_738_860_u64, 0) - // Standard Error: 3_184 - .saturating_add(Weight::from_parts(8_272_420_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_200 nanoseconds. + Weight::from_parts(23_785_825_u64, 0) + // Standard Error: 1_921 + .saturating_add(Weight::from_parts(8_711_803_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm.rs b/runtimes/eden/src/weights/pallet_xcm.rs index 9f768c3dbf5..ed0a05eb849 100644 --- a/runtimes/eden/src/weights/pallet_xcm.rs +++ b/runtimes/eden/src/weights/pallet_xcm.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_xcm //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-012bd056`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,8 +66,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn send() -> Weight { - // Minimum execution time: 44_220 nanoseconds. - Weight::from_parts(45_950_000_u64, 0) + // Minimum execution time: 47_120 nanoseconds. + Weight::from_parts(48_520_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -90,8 +90,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 42_780 nanoseconds. - Weight::from_parts(43_710_000_u64, 0) + // Minimum execution time: 44_920 nanoseconds. + Weight::from_parts(45_740_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -112,16 +112,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm SupportedVersion (r:0 w:1) // Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) fn force_xcm_version() -> Weight { - // Minimum execution time: 18_551 nanoseconds. - Weight::from_parts(19_090_000_u64, 0) + // Minimum execution time: 19_360 nanoseconds. + Weight::from_parts(19_880_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) // Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) fn force_default_xcm_version() -> Weight { - // Minimum execution time: 5_030 nanoseconds. - Weight::from_parts(5_290_000_u64, 0) + // Minimum execution time: 5_250 nanoseconds. + Weight::from_parts(5_440_000_u64, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -149,8 +149,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 52_300 nanoseconds. - Weight::from_parts(57_710_000_u64, 0) + // Minimum execution time: 54_471 nanoseconds. + Weight::from_parts(55_970_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -177,39 +177,39 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 52_030 nanoseconds. - Weight::from_parts(53_660_000_u64, 0) + // Minimum execution time: 55_540 nanoseconds. + Weight::from_parts(56_360_000_u64, 0) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } // Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1) // Proof Skipped: PolkadotXcm XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured) fn force_suspension() -> Weight { - // Minimum execution time: 5_050 nanoseconds. - Weight::from_parts(5_380_000_u64, 0) + // Minimum execution time: 5_160 nanoseconds. + Weight::from_parts(5_429_000_u64, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: PolkadotXcm SupportedVersion (r:4 w:2) // Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) fn migrate_supported_version() -> Weight { - // Minimum execution time: 26_991 nanoseconds. - Weight::from_parts(27_640_000_u64, 0) + // Minimum execution time: 26_940 nanoseconds. + Weight::from_parts(27_680_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) // Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) fn migrate_version_notifiers() -> Weight { - // Minimum execution time: 27_220 nanoseconds. - Weight::from_parts(27_780_000_u64, 0) + // Minimum execution time: 27_180 nanoseconds. + Weight::from_parts(28_190_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn already_notified_target() -> Weight { - // Minimum execution time: 28_710 nanoseconds. - Weight::from_parts(29_650_000_u64, 0) + // Minimum execution time: 29_140 nanoseconds. + Weight::from_parts(29_850_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -233,23 +233,23 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn notify_current_targets() -> Weight { - // Minimum execution time: 49_060 nanoseconds. - Weight::from_parts(50_830_000_u64, 0) + // Minimum execution time: 51_340 nanoseconds. + Weight::from_parts(52_770_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn notify_target_migration_fail() -> Weight { - // Minimum execution time: 15_600 nanoseconds. - Weight::from_parts(16_091_000_u64, 0) + // Minimum execution time: 15_440 nanoseconds. + Weight::from_parts(15_870_000_u64, 0) .saturating_add(T::DbWeight::get().reads(3_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn migrate_version_notify_targets() -> Weight { - // Minimum execution time: 27_580 nanoseconds. - Weight::from_parts(28_180_000_u64, 0) + // Minimum execution time: 28_100 nanoseconds. + Weight::from_parts(28_951_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -274,8 +274,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn migrate_and_notify_old_targets() -> Weight { - // Minimum execution time: 60_290 nanoseconds. - Weight::from_parts(62_180_000_u64, 0) + // Minimum execution time: 62_720 nanoseconds. + Weight::from_parts(64_340_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs b/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs index 9815ca4897b..47902f6190f 100644 --- a/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs +++ b/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -59,7 +59,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_parts(47_820_000_u64, 0) + Weight::from_parts(48_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -76,7 +76,7 @@ impl WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_asset() -> Weight { - Weight::from_parts(99_370_000_u64, 0) + Weight::from_parts(99_020_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -105,7 +105,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_parts(133_850_000_u64, 0) + Weight::from_parts(138_560_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -127,7 +127,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_parts(54_371_000_u64, 0) + Weight::from_parts(53_450_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -156,7 +156,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_parts(93_020_000_u64, 0) + Weight::from_parts(94_020_000_u64, 0) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -183,7 +183,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_parts(55_530_000_u64, 0) + Weight::from_parts(56_311_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs b/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs index 54b1cd7b15c..b85be835105 100644 --- a/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs +++ b/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -69,14 +69,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_holding() -> Weight { - Weight::from_parts(57_840_000_u64, 0) + Weight::from_parts(60_550_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn buy_execution() -> Weight { - Weight::from_parts(8_640_000_u64, 0) + Weight::from_parts(8_910_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -93,7 +93,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn query_response() -> Weight { - Weight::from_parts(23_380_000_u64, 0) + Weight::from_parts(24_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -108,49 +108,49 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn transact() -> Weight { - Weight::from_parts(26_000_000_u64, 0) + Weight::from_parts(27_009_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn refund_surplus() -> Weight { - Weight::from_parts(8_640_000_u64, 0) + Weight::from_parts(8_970_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_error_handler() -> Weight { - Weight::from_parts(8_520_000_u64, 0) + Weight::from_parts(8_810_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_appendix() -> Weight { - Weight::from_parts(8_600_000_u64, 0) + Weight::from_parts(8_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_error() -> Weight { - Weight::from_parts(8_431_000_u64, 0) + Weight::from_parts(8_590_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn descend_origin() -> Weight { - Weight::from_parts(9_280_000_u64, 0) + Weight::from_parts(9_510_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_origin() -> Weight { - Weight::from_parts(8_440_000_u64, 0) + Weight::from_parts(8_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -177,7 +177,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_error() -> Weight { - Weight::from_parts(46_960_000_u64, 0) + Weight::from_parts(48_831_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -194,14 +194,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn claim_asset() -> Weight { - Weight::from_parts(31_380_000_u64, 0) + Weight::from_parts(31_900_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn trap() -> Weight { - Weight::from_parts(8_540_000_u64, 0) + Weight::from_parts(8_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -228,7 +228,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn subscribe_version() -> Weight { - Weight::from_parts(52_351_000_u64, 0) + Weight::from_parts(52_991_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -237,7 +237,7 @@ impl WeightInfo { // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_parts(12_480_000_u64, 0) + Weight::from_parts(13_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -264,42 +264,42 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_parts(53_071_000_u64, 0) + Weight::from_parts(54_690_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn burn_asset() -> Weight { - Weight::from_parts(10_610_000_u64, 0) + Weight::from_parts(10_530_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_asset() -> Weight { - Weight::from_parts(8_710_000_u64, 0) + Weight::from_parts(8_931_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_origin() -> Weight { - Weight::from_parts(8_550_000_u64, 0) + Weight::from_parts(8_830_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_error() -> Weight { - Weight::from_parts(8_491_000_u64, 0) + Weight::from_parts(8_650_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_transact_status() -> Weight { - Weight::from_parts(8_760_000_u64, 0) + Weight::from_parts(9_120_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -326,14 +326,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn query_pallet() -> Weight { - Weight::from_parts(56_960_000_u64, 0) + Weight::from_parts(62_040_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_pallet() -> Weight { - Weight::from_parts(16_580_000_u64, 0) + Weight::from_parts(19_520_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -360,42 +360,42 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_transact_status() -> Weight { - Weight::from_parts(47_150_000_u64, 0) + Weight::from_parts(48_860_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_transact_status() -> Weight { - Weight::from_parts(8_520_000_u64, 0) + Weight::from_parts(8_690_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_topic() -> Weight { - Weight::from_parts(8_311_000_u64, 0) + Weight::from_parts(8_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_topic() -> Weight { - Weight::from_parts(8_340_000_u64, 0) + Weight::from_parts(8_630_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_fees_mode() -> Weight { - Weight::from_parts(8_350_000_u64, 0) + Weight::from_parts(8_640_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn unpaid_execution() -> Weight { - Weight::from_parts(8_591_000_u64, 0) + Weight::from_parts(8_760_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } From 2f53134b8391fe09a352c68fc47f65d2c7bcf81d Mon Sep 17 00:00:00 2001 From: Hounsette Date: Thu, 29 Jun 2023 23:11:40 +0900 Subject: [PATCH 060/101] migration(pallet-uniques): adding backbone for storage migration --- launch.json | 2 +- runtimes/eden/src/lib.rs | 2 ++ runtimes/eden/src/migrations.rs | 41 +++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 runtimes/eden/src/migrations.rs diff --git a/launch.json b/launch.json index a87d1fe84b5..9301d3720c4 100644 --- a/launch.json +++ b/launch.json @@ -14,7 +14,7 @@ "port": 30555 }, { - "name": "charlie", + "name": "charle", "wsPort": 9966, "port": 30666 }, diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index e57328c75dd..e3f07b722b6 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -63,6 +63,8 @@ mod version; mod weights; mod xcm_config; +mod migrations; + pub use pallets_consensus::SessionKeys; #[cfg(feature = "std")] pub use version::native_version; diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs new file mode 100644 index 00000000000..830585ee98f --- /dev/null +++ b/runtimes/eden/src/migrations.rs @@ -0,0 +1,41 @@ +use crate::{Runtime, RuntimeOrigin}; +use frame_support::{ + migration, parameter_types, + traits::{GetStorageVersion, OnRuntimeUpgrade}, + weights::Weight, + BoundedVec, +}; +use primitives::{AccountId, Balance}; + +#[cfg(feature = "try-runtime")] +use codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use sp_std::prelude::*; + +const STORAGE_VERSION_ITEM: &[u8] = b"StorageVersion"; + +const MIGRATION: &str = "migration"; +#[cfg(feature = "try-runtime")] +const TRY_RUNTIME: &str = "try-runtime"; + +pub struct MovePalletUniquesToSubstrateUniques; +impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { + fn on_runtime_upgrade() -> Weight { + //todo: replace with correct weights + let mut weight = ::DbWeight::get().reads(4); + weight += ::DbWeight::get().writes(1); + migration::move_pallet(b"Uniques", b"SubstrateUniques"); + weight + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + + //todo + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), &'static str> { + //todo + } +} \ No newline at end of file From 8ca1a5ae4cfaa2c417a26cfccb7c84d9b143111f Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 30 Jun 2023 11:20:13 +1200 Subject: [PATCH 061/101] fix(pallet-reserve): run benchmark tests in the test mode --- pallets/reserve/Cargo.toml | 4 +++- pallets/reserve/src/benchmarking.rs | 12 ++++++------ pallets/reserve/src/lib.rs | 1 + pallets/uniques/Cargo.toml | 2 +- pallets/uniques/src/benchmarking.rs | 5 ----- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pallets/reserve/Cargo.toml b/pallets/reserve/Cargo.toml index d3dc7ebe6f2..91dd56f6c6a 100644 --- a/pallets/reserve/Cargo.toml +++ b/pallets/reserve/Cargo.toml @@ -9,6 +9,7 @@ default = ["std"] std = [ "codec/std", "serde", + "frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-balances/std", @@ -17,9 +18,10 @@ std = [ "sp-std/std", ] runtime-benchmarks = [ - "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "frame-support/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/reserve/src/benchmarking.rs b/pallets/reserve/src/benchmarking.rs index ad44d5e2ec0..23fbe5b5b0e 100644 --- a/pallets/reserve/src/benchmarking.rs +++ b/pallets/reserve/src/benchmarking.rs @@ -37,19 +37,19 @@ const SEED: u32 = 0; benchmarks_instance_pallet! { tip { let tipper = account("caller", 0, SEED); - let value = 10u32.into(); - let _ = T::Currency::make_free_balance_be(&tipper, 100002u32.into()); - }: _(RawOrigin::Signed(tipper), value) + let value = 10u32; + let _ = T::Currency::make_free_balance_be(&tipper, (value * 2).into()); + }: _(RawOrigin::Signed(tipper), value.into()) spend { let dest = account("dest", 0, SEED); - let value = 10000u32.into(); + let value = 10000u32; - T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), 0x7FFFFFFFu32.into()); + T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), (value * 2).into()); let call = Call::::spend{ to: dest, - amount: value + amount: value.into() }; let origin = T::ExternalOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; }: { call.dispatch_bypass_filter(origin)? } diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index a806267e219..de9cf9be7a7 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -20,6 +20,7 @@ //! A module that is called by the `collective` and is in charge of holding //! the company funds. +#[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index fc9bd5030f1..2c24562dcdb 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -11,7 +11,7 @@ std = [ "serde", "scale-info/std", "frame-support/std", - "frame-benchmarking?/std", + "frame-benchmarking/std", "frame-system/std", "sp-io/std", "sp-runtime/std", diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index c92ab50f758..7c7b938bbbb 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -114,7 +114,6 @@ fn mint_item_with_extra_deposit, I: 'static>( } benchmarks_instance_pallet! { - destroy { let n in 0 .. 1_000; let m in 0 .. 1_000; @@ -144,14 +143,10 @@ benchmarks_instance_pallet! { let deposit = 5u32.into(); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) - burn { let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); let (item, ..) = mint_item_with_extra_deposit::(0); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) - - - impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); } From 7a3b11e7d38ff40a91d52a45852832c2e7502218 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 30 Jun 2023 13:14:53 +1200 Subject: [PATCH 062/101] fix(pallet-reserve): fix benchmark --- pallets/reserve/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/reserve/src/benchmarking.rs b/pallets/reserve/src/benchmarking.rs index 23fbe5b5b0e..289aa8642e7 100644 --- a/pallets/reserve/src/benchmarking.rs +++ b/pallets/reserve/src/benchmarking.rs @@ -37,7 +37,7 @@ const SEED: u32 = 0; benchmarks_instance_pallet! { tip { let tipper = account("caller", 0, SEED); - let value = 10u32; + let value = 10000u32; let _ = T::Currency::make_free_balance_be(&tipper, (value * 2).into()); }: _(RawOrigin::Signed(tipper), value.into()) From 983cdca4f9e016a0799006b08033b4a6171f711d Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 30 Jun 2023 11:56:23 +0900 Subject: [PATCH 063/101] Reserve benchmarks --- pallets/reserve/src/benchmarking.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pallets/reserve/src/benchmarking.rs b/pallets/reserve/src/benchmarking.rs index 23fbe5b5b0e..57296f32356 100644 --- a/pallets/reserve/src/benchmarking.rs +++ b/pallets/reserve/src/benchmarking.rs @@ -37,15 +37,19 @@ const SEED: u32 = 0; benchmarks_instance_pallet! { tip { let tipper = account("caller", 0, SEED); - let value = 10u32; - let _ = T::Currency::make_free_balance_be(&tipper, (value * 2).into()); - }: _(RawOrigin::Signed(tipper), value.into()) + let smallest_usable_amount = T::Currency::minimum_balance().saturating_add(1u32.into()); + let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount).into(); + let tip_amount = smallest_usable_amount; + let _ = T::Currency::make_free_balance_be(&tipper,starting_amount); + }: _(RawOrigin::Signed(tipper), tip_amount) spend { let dest = account("dest", 0, SEED); - let value = 10000u32; + let smallest_usable_amount = T::Currency::minimum_balance(); + let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount).into(); + let value = smallest_usable_amount; - T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), (value * 2).into()); + T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(), starting_amount ); let call = Call::::spend{ to: dest, From 8d802bb6b53ffe701749e7a2ce890a0f1d3652d0 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 30 Jun 2023 13:17:07 +0900 Subject: [PATCH 064/101] Clippy auto fix --- pallets/reserve/src/benchmarking.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/reserve/src/benchmarking.rs b/pallets/reserve/src/benchmarking.rs index 525a7473910..91a09534721 100644 --- a/pallets/reserve/src/benchmarking.rs +++ b/pallets/reserve/src/benchmarking.rs @@ -38,7 +38,7 @@ benchmarks_instance_pallet! { tip { let tipper = account("caller", 0, SEED); let smallest_usable_amount = T::Currency::minimum_balance().saturating_add(1u32.into()); - let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount).into(); + let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount); let tip_amount = smallest_usable_amount; let _ = T::Currency::make_free_balance_be(&tipper,starting_amount); }: _(RawOrigin::Signed(tipper), tip_amount) @@ -46,14 +46,14 @@ benchmarks_instance_pallet! { spend { let dest = account("dest", 0, SEED); let smallest_usable_amount = T::Currency::minimum_balance(); - let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount).into(); + let starting_amount = smallest_usable_amount.saturating_add(smallest_usable_amount); let value = smallest_usable_amount; T::Currency::make_free_balance_be(&T::PalletId::get().into_account_truncating(),starting_amount); let call = Call::::spend{ to: dest, - amount: value.into() + amount: value }; let origin = T::ExternalOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; }: { call.dispatch_bypass_filter(origin)? } From a8c305d806d1b0841cb52c11358e9ccf6ce4c1a0 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Fri, 30 Jun 2023 13:56:00 +0900 Subject: [PATCH 065/101] Spellcheck --- pallets/uniques/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 7c7b938bbbb..5f3afa14cb5 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -35,7 +35,7 @@ use crate::Pallet as Uniques; const SEED: u32 = 0; fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { - let collection_owner: T::AccountId = account("colletction_owner", 0, SEED); + let collection_owner: T::AccountId = account("collection_owner", 0, SEED); let collection_owner_lookup = T::Lookup::unlookup(collection_owner.clone()); let collection_id = >::Helper::collection(0); (collection_id, collection_owner, collection_owner_lookup) From 19c0f745193d40eb66533022a1c11413dba79891 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 3 Jul 2023 01:20:43 +0900 Subject: [PATCH 066/101] migration(pallet-uniques): add preupgrade test, WIP --- launch.json | 2 +- runtimes/eden/src/migrations.rs | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/launch.json b/launch.json index 9301d3720c4..a87d1fe84b5 100644 --- a/launch.json +++ b/launch.json @@ -14,7 +14,7 @@ "port": 30555 }, { - "name": "charle", + "name": "charlie", "wsPort": 9966, "port": 30666 }, diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 830585ee98f..95824be13cf 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -3,8 +3,9 @@ use frame_support::{ migration, parameter_types, traits::{GetStorageVersion, OnRuntimeUpgrade}, weights::Weight, - BoundedVec, + BoundedVec, Twox128, }; +use pallet_uniques::{CollectionDetails, CollectionMetadata}; use primitives::{AccountId, Balance}; #[cfg(feature = "try-runtime")] @@ -21,21 +22,29 @@ const TRY_RUNTIME: &str = "try-runtime"; pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn on_runtime_upgrade() -> Weight { - //todo: replace with correct weights + //todo: replace with correct weights let mut weight = ::DbWeight::get().reads(4); - weight += ::DbWeight::get().writes(1); - migration::move_pallet(b"Uniques", b"SubstrateUniques"); + weight += ::DbWeight::get().writes(1); + migration::move_pallet(b"Uniques", b"SubstrateUniques"); weight } #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { + let collection_owner_1 = pallet_uniques::Module::::collection_owner(0).unwrap(); + let collection_details = migration::take_storage_value::>( + b"Uniques", + b"CollectionDetails", + &[], //todo hash collection_owner_1 + ) + .unwrap(); - //todo + Ok(collection_details.encode()) } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - //todo + fn post_upgrade(state: Vec) -> Result<(), &'static str> { + Ok(()) + //todo } -} \ No newline at end of file +} From cc1350eef4ac40f3cc2398d4c718047909cf580d Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 3 Jul 2023 21:24:12 +0900 Subject: [PATCH 067/101] migration(pallet-uniques): Add check pre and post upgrade for collection details --- runtimes/eden/src/migrations.rs | 48 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 95824be13cf..89233b6c058 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,24 +1,16 @@ -use crate::{Runtime, RuntimeOrigin}; -use frame_support::{ - migration, parameter_types, - traits::{GetStorageVersion, OnRuntimeUpgrade}, - weights::Weight, - BoundedVec, Twox128, -}; -use pallet_uniques::{CollectionDetails, CollectionMetadata}; +use crate::Runtime; +use frame_support::{migration, traits::OnRuntimeUpgrade, weights::Weight, Blake2_128Concat}; + +use pallet_uniques::CollectionDetails; +#[cfg(feature = "try-runtime")] use primitives::{AccountId, Balance}; #[cfg(feature = "try-runtime")] use codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] use sp_std::prelude::*; - -const STORAGE_VERSION_ITEM: &[u8] = b"StorageVersion"; - -const MIGRATION: &str = "migration"; #[cfg(feature = "try-runtime")] -const TRY_RUNTIME: &str = "try-runtime"; - +type CollectionId = u32; pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn on_runtime_upgrade() -> Weight { @@ -31,19 +23,33 @@ impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { - let collection_owner_1 = pallet_uniques::Module::::collection_owner(0).unwrap(); - let collection_details = migration::take_storage_value::>( - b"Uniques", - b"CollectionDetails", - &[], //todo hash collection_owner_1 - ) - .unwrap(); + let iter = migration::storage_key_iter::, Blake2_128Concat>( + b"Uniques", b"Class", + ); + let mut collection_details: Vec<(CollectionId, CollectionDetails)> = Vec::new(); + for collection_detail in iter { + collection_details.push(collection_detail); + } Ok(collection_details.encode()) } #[cfg(feature = "try-runtime")] fn post_upgrade(state: Vec) -> Result<(), &'static str> { + let previous_collection_details: Vec<(CollectionId, CollectionDetails)> = + Decode::decode(&mut state.as_slice()).map_err(|_| "Unable to decode previous collection details")?; + let mut current_collection_details = Vec::<(CollectionId, CollectionDetails)>::new(); + let iter = migration::storage_key_iter::, Blake2_128Concat>( + b"SubstrateUniques", + b"Class", + ); + for collection_detail in iter { + current_collection_details.push(collection_detail); + } + + if current_collection_details != previous_collection_details { + return Err("Pallet Uniques Migration: Collection details do not match"); + } Ok(()) //todo } From b108c7d44f1b7bef5dc1a012a8b2169620bdc376 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 3 Jul 2023 22:53:03 +0900 Subject: [PATCH 068/101] migration(pallet-uniques): add logging info --- runtimes/eden/src/lib.rs | 10 ++++++++-- runtimes/eden/src/migrations.rs | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index e3f07b722b6..050be37f952 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -156,8 +156,14 @@ pub type SignedPayload = generic::SignedPayload; pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. -pub type Executive = - frame_executive::Executive, Runtime, AllPalletsWithSystem>; +pub type Executive = frame_executive::Executive< + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + migrations::MovePalletUniquesToSubstrateUniques, +>; #[cfg(feature = "runtime-benchmarks")] pub type XcmGenericBenchmarks = pallet_xcm_benchmarks::generic::Pallet; #[cfg(feature = "runtime-benchmarks")] diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 89233b6c058..c58d60fba2d 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -1,16 +1,20 @@ use crate::Runtime; -use frame_support::{migration, traits::OnRuntimeUpgrade, weights::Weight, Blake2_128Concat}; +use frame_support::{migration, traits::OnRuntimeUpgrade, weights::Weight}; +#[cfg(feature = "try-runtime")] +use codec::{Decode, Encode}; +#[cfg(feature = "try-runtime")] +use frame_support::Blake2_128Concat; +#[cfg(feature = "try-runtime")] use pallet_uniques::CollectionDetails; #[cfg(feature = "try-runtime")] use primitives::{AccountId, Balance}; - -#[cfg(feature = "try-runtime")] -use codec::{Decode, Encode}; #[cfg(feature = "try-runtime")] use sp_std::prelude::*; #[cfg(feature = "try-runtime")] type CollectionId = u32; +#[cfg(feature = "try-runtime")] +const TRY_RUNTIME: &str = "try-runtime"; pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn on_runtime_upgrade() -> Weight { @@ -28,6 +32,11 @@ impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { ); let mut collection_details: Vec<(CollectionId, CollectionDetails)> = Vec::new(); for collection_detail in iter { + log::info!( + target: TRY_RUNTIME, + "Collection before migration: {:?}", + collection_detail + ); collection_details.push(collection_detail); } From 74dc85b49c72780580bd79337be4c3e1f3526a75 Mon Sep 17 00:00:00 2001 From: Hounsette Date: Mon, 3 Jul 2023 23:27:21 +0900 Subject: [PATCH 069/101] migration(pallet-uniques): add comment --- runtimes/eden/src/migrations.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index c58d60fba2d..efaef91413a 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -18,8 +18,8 @@ const TRY_RUNTIME: &str = "try-runtime"; pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn on_runtime_upgrade() -> Weight { - //todo: replace with correct weights - let mut weight = ::DbWeight::get().reads(4); + //Assuming that it takes only 1 read and 1 write to move a pallet + let mut weight = ::DbWeight::get().reads(1); weight += ::DbWeight::get().writes(1); migration::move_pallet(b"Uniques", b"SubstrateUniques"); weight @@ -60,6 +60,5 @@ impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { return Err("Pallet Uniques Migration: Collection details do not match"); } Ok(()) - //todo } } From e8478ede4dfc7dfb09e26d399c9bae1d10da5107 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 4 Jul 2023 21:45:41 +1200 Subject: [PATCH 070/101] fix(pallet-nodle-uniques): fix the storage prefix of ExtraDeposit --- pallets/uniques/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index e1056d3ce36..d29aab1b409 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -58,7 +58,6 @@ pub mod pallet { impl, I: 'static> Hooks> for Pallet {} #[pallet::storage] - #[pallet::storage_prefix = "Asset"] /// The extra deposits in existence. pub(super) type ExtraDeposit, I: 'static = ()> = StorageDoubleMap< _, From 49b9e04a950dba677c16e343f77170cddbcdf379 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 6 Jul 2023 12:32:35 +1200 Subject: [PATCH 071/101] refactor(pallet-nodle-uniques): simplify the logic in destroy --- pallets/uniques/src/lib.rs | 21 ++++----------------- pallets/uniques/src/tests.rs | 4 ++++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index d29aab1b409..5282465e51d 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -152,19 +152,9 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - let mut item_owners: Vec<(T::AccountId, BalanceOf)> = Vec::new(); - - // Recover the item owners for each item in the ExtraDeposit Storage - for (item, extra_deposit) in ExtraDeposit::::iter_prefix(collection) { - if let Some(item_owner) = pallet_uniques::Pallet::::owner(collection, item) { - item_owners.push((item_owner, extra_deposit)); - } - } - - let ret = pallet_uniques::Pallet::::destroy(origin, collection, witness)?; - - // Unreserve and transfer extra reserved deposit to the item owners - for (item_owner, extra_deposit) in item_owners { + for (item, extra_deposit) in ExtraDeposit::::drain_prefix(collection) { + let item_owner = + pallet_uniques::Pallet::::owner(collection, item).ok_or(DispatchError::CannotLookup)?; >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( &collection_owner, @@ -173,10 +163,7 @@ pub mod pallet { ExistenceRequirement::AllowDeath, )?; } - - // Clear the extra storage map - let _ = ExtraDeposit::::clear_prefix(collection, witness.items, None); - Ok(ret) + pallet_uniques::Pallet::::destroy(origin, collection, witness) } /// Mint an item of a particular collection. diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 0383e93749a..b0056d58349 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -354,8 +354,12 @@ mod test_cases { attributes: 0, }; + assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), 3); + assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness)); + assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), 0); + // check if extra deposit is freed as well as the item deposit assert_eq!(Balances::reserved_balance(collection_owner_id), 0); From eb899e467b166efb3919fc3cc5d9ff7131632ac2 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 6 Jul 2023 14:13:51 +1200 Subject: [PATCH 072/101] test(pallet-nodle-uniques): test_no_storage_change_happens_if_destroy_fails --- pallets/uniques/src/tests.rs | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index b0056d58349..03ddfc8315a 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -372,4 +372,50 @@ mod test_cases { assert_eq!(Balances::free_balance(item_owner), init_balance + 3 * extra_deposit); }) } + + #[test] + fn test_no_storage_change_happens_if_destroy_fails() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner = 1; + let item_owner = 42; + let init_balance = 100; + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(1), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + // This wrong witness should make the destroy fail + let witness = DestroyWitness { + items: 2, + item_metadatas: 0, + attributes: 0, + }; + + assert_noop!( + Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness), + pallet_uniques::Error::::BadWitness + ); + + assert_eq!( + ExtraDeposit::::get(collection_id, item_id).unwrap(), + extra_deposit + ); + }) + } } From a43ff3f843f57e4fcd70e2fe72c7a56a745e8c4f Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Thu, 6 Jul 2023 15:47:20 +1200 Subject: [PATCH 073/101] refactor(pallet-nodle-uniques): adds more ensuring checks for burn and destroy and improve the test --- pallets/uniques/src/lib.rs | 33 +++++---- pallets/uniques/src/tests.rs | 133 ++++++++++++++++++++++------------- 2 files changed, 103 insertions(+), 63 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 5282465e51d..e4b9297e293 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -23,7 +23,7 @@ use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; pub use pallet::*; use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; -use sp_runtime::traits::StaticLookup; +use sp_runtime::traits::{StaticLookup, Zero}; use sp_std::vec::Vec; pub mod weights; @@ -155,7 +155,10 @@ pub mod pallet { for (item, extra_deposit) in ExtraDeposit::::drain_prefix(collection) { let item_owner = pallet_uniques::Pallet::::owner(collection, item).ok_or(DispatchError::CannotLookup)?; - >::Currency::unreserve(&collection_owner, extra_deposit); + ensure!( + >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), + DispatchError::Corruption + ); >::Currency::transfer( &collection_owner, &item_owner, @@ -213,20 +216,20 @@ pub mod pallet { ) -> DispatchResult { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - let item_owner = pallet_uniques::Pallet::::owner(collection, item); + let item_owner = + pallet_uniques::Pallet::::owner(collection, item).ok_or(DispatchError::CannotLookup)?; pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - if let Some(extra_deposit) = ExtraDeposit::::take(collection, item) { - if let Some(item_owner) = item_owner { - >::Currency::unreserve(&collection_owner, extra_deposit); - >::Currency::transfer( - &collection_owner, - &item_owner, - extra_deposit, - ExistenceRequirement::AllowDeath, - )?; - } - } - Ok(()) + let extra_deposit = ExtraDeposit::::take(collection, item).ok_or(DispatchError::CannotLookup)?; + ensure!( + >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), + DispatchError::Corruption + ); + >::Currency::transfer( + &collection_owner, + &item_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + ) } /// Move an item from the sender account to another. diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 03ddfc8315a..0b94c5d2bb5 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -294,82 +294,79 @@ mod test_cases { #[test] fn test_destroy_collection() { new_test_ext().execute_with(|| { - let extra_deposit = 20; let collection_id = 0; - let item_id1 = 10; - let item_id2 = 12; - let item_id3 = 14; - let collection_owner_id = 1; - let item_owner = 42; + let items = [10, 12, 15]; + let extra_deposits = [20, 30, 40]; + let collection_owner = 1; + let owners = [42, 43]; let init_balance = 100; - Balances::make_free_balance_be(&collection_owner_id, init_balance); - Balances::make_free_balance_be(&item_owner, init_balance); + + let total_extra_deposit = extra_deposits.into_iter().reduce(|a, b| a + b).unwrap(); + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&owners[0], init_balance); + Balances::make_free_balance_be(&owners[1], init_balance); + assert_ok!(Uniques::create( - RuntimeOrigin::signed(collection_owner_id), + RuntimeOrigin::signed(collection_owner), collection_id, - collection_owner_id + collection_owner )); assert_eq!( - Balances::reserved_balance(collection_owner_id), + Balances::reserved_balance(collection_owner), TestCollectionDeposit::get() ); - assert_ok!(Uniques::set_collection_metadata( - RuntimeOrigin::signed(1), - 0, - bvec![0, 0], - false - )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner), collection_id, - item_id1, - item_owner, - extra_deposit + items[0], + owners[0], + extra_deposits[0] )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner), collection_id, - item_id2, - item_owner, - extra_deposit + items[1], + owners[0], + extra_deposits[1] )); - assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner), collection_id, - item_id3, - item_owner, - extra_deposit + items[2], + owners[1], + extra_deposits[2] )); assert_eq!( - Balances::reserved_balance(collection_owner_id), - TestCollectionDeposit::get() + 3 * TestItemDeposit::get() + 3 * extra_deposit + 3 + Balances::reserved_balance(collection_owner), + total_extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get() * items.len() as u64 ); + assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), items.len()); + let witness = DestroyWitness { - items: 3, + items: items.len() as u32, item_metadatas: 0, attributes: 0, }; - - assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), 3); - - assert_ok!(Uniques::destroy(RuntimeOrigin::signed(1), collection_id, witness)); + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection_id, + witness + )); assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), 0); - - // check if extra deposit is freed as well as the item deposit - assert_eq!(Balances::reserved_balance(collection_owner_id), 0); - - //check that the owner of the collection does not recover the reserved amount of the burnt item + assert_eq!(Balances::reserved_balance(collection_owner), 0); assert_eq!( - Balances::free_balance(collection_owner_id), - init_balance - 3 * extra_deposit + Balances::free_balance(collection_owner), + init_balance - total_extra_deposit ); - // extra deposit transferred to the item owner free balance - assert_eq!(Balances::free_balance(item_owner), init_balance + 3 * extra_deposit); + assert_eq!( + Balances::free_balance(owners[0]), + init_balance + extra_deposits[0] + extra_deposits[1] + ); + assert_eq!(Balances::free_balance(owners[1]), init_balance + extra_deposits[2]); }) } @@ -393,7 +390,7 @@ mod test_cases { )); assert_ok!(Uniques::mint_with_extra_deposit( - RuntimeOrigin::signed(1), + RuntimeOrigin::signed(collection_owner), collection_id, item_id, item_owner, @@ -418,4 +415,44 @@ mod test_cases { ); }) } + + #[test] + fn test_no_storage_change_happens_if_burn_fails() { + new_test_ext().execute_with(|| { + let extra_deposit = 20; + let collection_id = 0; + let item_id = 10; + let collection_owner = 1; + let non_owner = 2; + let item_owner = 42; + let init_balance = 100; + + Balances::make_free_balance_be(&collection_owner, init_balance); + Balances::make_free_balance_be(&item_owner, init_balance); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + + assert_noop!( + Uniques::burn(RuntimeOrigin::signed(non_owner), collection_id, item_id, None), + pallet_uniques::Error::::NoPermission + ); + + assert_eq!( + ExtraDeposit::::get(collection_id, item_id).unwrap(), + extra_deposit + ); + }) + } } From 54dedc7592340d27a3747b4a173a3a108416edf9 Mon Sep 17 00:00:00 2001 From: Hounsette <90805027+Hounsette@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:29:20 +0900 Subject: [PATCH 074/101] Update pallets/uniques/src/lib.rs Co-authored-by: Eliott Teissonniere <10683430+ETeissonniere@users.noreply.github.com> --- pallets/uniques/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index e4b9297e293..2e2039faa95 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -29,7 +29,6 @@ use sp_std::vec::Vec; pub mod weights; pub use weights::WeightInfo as NodleWeightInfo; -#[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] mod tests; From 0739c73989316a7c2f36eafb8f25ad17800c087b Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 10:48:12 +1200 Subject: [PATCH 075/101] fix(runtime-eden): correct the weight of on-runtime-upgrade --- runtimes/eden/src/migrations.rs | 48 ++++++++++++++------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index efaef91413a..5429ee1b29f 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -13,33 +13,26 @@ use primitives::{AccountId, Balance}; use sp_std::prelude::*; #[cfg(feature = "try-runtime")] type CollectionId = u32; -#[cfg(feature = "try-runtime")] -const TRY_RUNTIME: &str = "try-runtime"; + +const NEW_UNIQUES_PALLET_NAME: &[u8] = b"SubstrateUniques"; +const OLD_UNIQUES_PALLET_NAME: &[u8] = b"Uniques"; +const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; + pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn on_runtime_upgrade() -> Weight { - //Assuming that it takes only 1 read and 1 write to move a pallet - let mut weight = ::DbWeight::get().reads(1); - weight += ::DbWeight::get().writes(1); - migration::move_pallet(b"Uniques", b"SubstrateUniques"); - weight + migration::move_pallet(OLD_UNIQUES_PALLET_NAME, NEW_UNIQUES_PALLET_NAME); + ::BlockWeights::get().max_block } #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, &'static str> { - let iter = migration::storage_key_iter::, Blake2_128Concat>( - b"Uniques", b"Class", - ); - let mut collection_details: Vec<(CollectionId, CollectionDetails)> = Vec::new(); - for collection_detail in iter { - log::info!( - target: TRY_RUNTIME, - "Collection before migration: {:?}", - collection_detail - ); - collection_details.push(collection_detail); - } - + let collection_details = migration::storage_key_iter::< + CollectionId, + CollectionDetails, + Blake2_128Concat, + >(OLD_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) + .collect::)>>(); Ok(collection_details.encode()) } @@ -47,14 +40,13 @@ impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { fn post_upgrade(state: Vec) -> Result<(), &'static str> { let previous_collection_details: Vec<(CollectionId, CollectionDetails)> = Decode::decode(&mut state.as_slice()).map_err(|_| "Unable to decode previous collection details")?; - let mut current_collection_details = Vec::<(CollectionId, CollectionDetails)>::new(); - let iter = migration::storage_key_iter::, Blake2_128Concat>( - b"SubstrateUniques", - b"Class", - ); - for collection_detail in iter { - current_collection_details.push(collection_detail); - } + + let current_collection_details = migration::storage_key_iter::< + CollectionId, + CollectionDetails, + Blake2_128Concat, + >(NEW_UNIQUES_PALLET_NAME, UNIQUES_CLASS_PREFIX) + .collect::>(); if current_collection_details != previous_collection_details { return Err("Pallet Uniques Migration: Collection details do not match"); From be251b8f678849c5eb671464f9ff17d203f0ae8a Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 11:16:09 +1200 Subject: [PATCH 076/101] chore(runtime-eden): define UNIQUES_CLASS_PREFIX only for try-runtime --- runtimes/eden/src/migrations.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 5429ee1b29f..5eee1cea1f1 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -13,10 +13,11 @@ use primitives::{AccountId, Balance}; use sp_std::prelude::*; #[cfg(feature = "try-runtime")] type CollectionId = u32; +#[cfg(feature = "try-runtime")] +const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; const NEW_UNIQUES_PALLET_NAME: &[u8] = b"SubstrateUniques"; const OLD_UNIQUES_PALLET_NAME: &[u8] = b"Uniques"; -const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; pub struct MovePalletUniquesToSubstrateUniques; impl OnRuntimeUpgrade for MovePalletUniquesToSubstrateUniques { From 99b5ab80264e2f5fb52498e5dbafa93ba15b5f71 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 11:36:33 +1200 Subject: [PATCH 077/101] chore(pallet-nodle-uniques): fix a comment Co-authored-by: Fredrik Simonsson --- pallets/uniques/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 2e2039faa95..319c62a5624 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -716,7 +716,7 @@ pub mod pallet { /// /// - `collection`: The collection of the item to be minted. /// - `item`: The item value of the item to be minted. - /// - `owner`: The initial owner of the minted item. + /// - `beneficiary`: The initial owner of the minted item. /// /// Emits `Issued` event when successful. /// From 9c6d8d888a6f111a671ecc093c0bb39a7901b1a6 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 13:33:10 +1200 Subject: [PATCH 078/101] feat(nodle-uniques-pallet): let collection owner place a cap on total extra deposit for a collection --- pallets/uniques/src/lib.rs | 128 ++++++++++++++++++++++++++--------- pallets/uniques/src/tests.rs | 11 +-- 2 files changed, 103 insertions(+), 36 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 319c62a5624..623f79ad880 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,11 +20,9 @@ //! Handle the ability to notify other pallets that they should stop all -use frame_support::traits::{Currency, ExistenceRequirement, ReservableCurrency}; +use frame_support::traits::Currency; pub use pallet::*; -use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; -use sp_runtime::traits::{StaticLookup, Zero}; -use sp_std::vec::Vec; +use sp_runtime::traits::StaticLookup; pub mod weights; pub use weights::WeightInfo as NodleWeightInfo; @@ -40,9 +38,15 @@ pub type BalanceOf = #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::{pallet_prelude::*, transactional}; + use frame_support::{ + pallet_prelude::*, + traits::{ExistenceRequirement, ReservableCurrency}, + transactional, + }; use frame_system::pallet_prelude::*; - use sp_runtime::DispatchResult; + use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; + use sp_runtime::{traits::Zero, DispatchResult}; + use sp_std::vec::Vec; #[pallet::config] pub trait Config: frame_system::Config + pallet_uniques::Config { @@ -58,7 +62,7 @@ pub mod pallet { #[pallet::storage] /// The extra deposits in existence. - pub(super) type ExtraDeposit, I: 'static = ()> = StorageDoubleMap< + pub(crate) type ItemExtraDeposits, I: 'static = ()> = StorageDoubleMap< _, Blake2_128Concat, T::CollectionId, @@ -68,6 +72,22 @@ pub mod pallet { OptionQuery, >; + #[pallet::storage] + pub(crate) type CollectionExtraDepositLimits, I: 'static = ()> = + StorageMap<_, Blake2_128Concat, T::CollectionId, BalanceOf, OptionQuery>; + + #[pallet::error] + pub enum Error { + /// Issuing with extra deposit exceeds the collection owner's limit. + ExceedExtraDepositLimitForCollection, + /// The owner of collection is not known. + UnknownCollectionOwner, + /// The owner of item is not known. + UnknownItemOwner, + /// Full un-reserve was unsuccessful. + UnreserveFailed, + } + #[pallet::call] impl, I: 'static> Pallet { /// Issue a new collection of non-fungible items from a public origin. @@ -149,14 +169,14 @@ pub mod pallet { collection: T::CollectionId, witness: DestroyWitness, ) -> DispatchResultWithPostInfo { - let collection_owner = - pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - for (item, extra_deposit) in ExtraDeposit::::drain_prefix(collection) { + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::UnknownCollectionOwner)?; + for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { let item_owner = - pallet_uniques::Pallet::::owner(collection, item).ok_or(DispatchError::CannotLookup)?; + pallet_uniques::Pallet::::owner(collection, item).ok_or(Error::::UnknownItemOwner)?; ensure!( >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), - DispatchError::Corruption + Error::::UnreserveFailed, ); >::Currency::transfer( &collection_owner, @@ -213,22 +233,26 @@ pub mod pallet { item: T::ItemId, check_owner: Option>, ) -> DispatchResult { - let collection_owner = - pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::UnknownCollectionOwner)?; let item_owner = - pallet_uniques::Pallet::::owner(collection, item).ok_or(DispatchError::CannotLookup)?; + pallet_uniques::Pallet::::owner(collection, item).ok_or(Error::::UnknownItemOwner)?; pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; - let extra_deposit = ExtraDeposit::::take(collection, item).ok_or(DispatchError::CannotLookup)?; - ensure!( - >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), - DispatchError::Corruption - ); - >::Currency::transfer( - &collection_owner, - &item_owner, - extra_deposit, - ExistenceRequirement::AllowDeath, - ) + let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); + if !extra_deposit.is_zero() { + ensure!( + >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), + Error::::UnreserveFailed, + ); + >::Currency::transfer( + &collection_owner, + &item_owner, + extra_deposit, + ExistenceRequirement::AllowDeath, + ) + } else { + Ok(()) + } } /// Move an item from the sender account to another. @@ -710,6 +734,39 @@ pub mod pallet { pallet_uniques::Pallet::::buy_item(origin, collection, item, bid_price) } + /// Issue a new collection of non-fungible items from a public origin. + /// + /// This new collection has no items initially and its owner is the origin. + /// + /// The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + /// + /// `ItemDeposit` funds of sender are reserved. + /// + /// Parameters: + /// - `collection`: The identifier of the new collection. This must not be currently in use. + /// - `admin`: The admin of this collection. The admin is the initial address of each + /// member of the collection's admin team. + /// - `extra_deposit_limit`: The cap on the total amount of funds that an admin/issuer can + /// reserve from the collection owner (origin of this call) while minting NFTs with extra + /// deposit. + /// + /// Emits `Created` event when successful. + /// + /// Weight: `O(1)` + #[pallet::call_index(26)] + #[pallet::weight(>::WeightInfo::create())] + pub fn create_with_extra_deposit_limit( + origin: OriginFor, + collection: T::CollectionId, + admin: AccountIdLookupOf, + extra_deposit_limit: BalanceOf, + ) -> DispatchResult { + // Since the extrinsic is transactional the following call only succeeds if the + // collection is also created successfully. + CollectionExtraDepositLimits::::insert(&collection, extra_deposit_limit); + pallet_uniques::Pallet::::create(origin, collection, admin) + } + /// Mint an item of a particular collection with extra deposit. /// /// The origin must be Signed and the sender must be the Issuer of the `collection`. @@ -721,7 +778,7 @@ pub mod pallet { /// Emits `Issued` event when successful. /// /// Weight: `O(1)` - #[pallet::call_index(26)] + #[pallet::call_index(27)] #[pallet::weight(>::WeightInfo::mint_with_extra_deposit())] #[transactional] pub fn mint_with_extra_deposit( @@ -732,11 +789,18 @@ pub mod pallet { deposit: BalanceOf, ) -> DispatchResult { pallet_uniques::Pallet::::mint(origin, collection, item, owner).and_then(|_| { - let collection_owner = - pallet_uniques::Pallet::::collection_owner(collection).ok_or(DispatchError::CannotLookup)?; - >::Currency::reserve(&collection_owner, deposit)?; - ExtraDeposit::::insert(collection, item, deposit); - Ok(()) + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::UnknownCollectionOwner)?; + let extra_deposit_limit = + CollectionExtraDepositLimits::::get(&collection).unwrap_or_else(Zero::zero); + if deposit < extra_deposit_limit { + >::Currency::reserve(&collection_owner, deposit)?; + ItemExtraDeposits::::insert(collection, item, deposit); + CollectionExtraDepositLimits::::insert(&collection, extra_deposit_limit - deposit); + Ok(()) + } else { + Err(Error::::ExceedExtraDepositLimitForCollection)? + } }) } } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 0b94c5d2bb5..1fc4193e960 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -343,7 +343,10 @@ mod test_cases { Balances::reserved_balance(collection_owner), total_extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get() * items.len() as u64 ); - assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), items.len()); + assert_eq!( + ItemExtraDeposits::::iter_prefix(collection_id).count(), + items.len() + ); let witness = DestroyWitness { items: items.len() as u32, @@ -356,7 +359,7 @@ mod test_cases { witness )); - assert_eq!(ExtraDeposit::::iter_prefix(collection_id).count(), 0); + assert_eq!(ItemExtraDeposits::::iter_prefix(collection_id).count(), 0); assert_eq!(Balances::reserved_balance(collection_owner), 0); assert_eq!( Balances::free_balance(collection_owner), @@ -410,7 +413,7 @@ mod test_cases { ); assert_eq!( - ExtraDeposit::::get(collection_id, item_id).unwrap(), + ItemExtraDeposits::::get(collection_id, item_id).unwrap(), extra_deposit ); }) @@ -450,7 +453,7 @@ mod test_cases { ); assert_eq!( - ExtraDeposit::::get(collection_id, item_id).unwrap(), + ItemExtraDeposits::::get(collection_id, item_id).unwrap(), extra_deposit ); }) From 4ec38c2b682b8b5730fc32976e624c2d4da464b4 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 16:06:22 +1200 Subject: [PATCH 079/101] feat(nodle-uniques-pallet): keep track of total extra deposit for each collection and place the cap on it --- pallets/uniques/src/benchmarking.rs | 27 ++++++---- pallets/uniques/src/lib.rs | 83 +++++++++++++++++++++-------- pallets/uniques/src/tests.rs | 31 ++++++----- 3 files changed, 96 insertions(+), 45 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 5f3afa14cb5..dfea833be4a 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -27,7 +27,7 @@ use frame_support::{ BoundedVec, }; use frame_system::RawOrigin as SystemOrigin; -use pallet_uniques::BenchmarkHelper; +use pallet_uniques::{BenchmarkHelper, DestroyWitness}; use sp_runtime::traits::Bounded; use sp_std::prelude::*; @@ -41,14 +41,16 @@ fn get_config, I: 'static>() -> (T::CollectionId, T::AccountId, Acc (collection_id, collection_owner, collection_owner_lookup) } -fn create_collection, I: 'static>() -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { +fn create_collection, I: 'static>( + extra_deposit_limit: BalanceOf, +) -> (T::CollectionId, T::AccountId, AccountIdLookupOf) { let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - assert_ok!(Uniques::::force_create( - T::RuntimeOrigin::root(), + assert_ok!(Uniques::::create_with_extra_deposit_limit( + SystemOrigin::Signed(collection_owner.clone()).into(), collection_id, collection_owner_lookup.clone(), - false, + extra_deposit_limit )); (collection_id, collection_owner, collection_owner_lookup) } @@ -99,6 +101,7 @@ fn add_item_attribute, I: 'static>( } fn mint_item_with_extra_deposit, I: 'static>( index: u16, + deposit: BalanceOf, ) -> (T::ItemId, T::AccountId, AccountIdLookupOf) { let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); let item = T::Helper::item(index); @@ -107,7 +110,7 @@ fn mint_item_with_extra_deposit, I: 'static>( collection_id, item, collection_owner_lookup.clone(), - index.into(), + deposit, ) .is_ok()); (item, collection_owner, collection_owner_lookup) @@ -119,10 +122,12 @@ benchmarks_instance_pallet! { let m in 0 .. 1_000; let a in 0 .. 1_000; - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); + add_collection_metadata::(); + for i in 0..n { - mint_item_with_extra_deposit::(i as u16); + mint_item_with_extra_deposit::(i as u16, T::Currency::minimum_balance()); } for i in 0..m { add_item_metadata::(T::Helper::item(i as u16)); @@ -138,14 +143,14 @@ benchmarks_instance_pallet! { }: _(SystemOrigin::Signed(collection_owner), collection_id, witness) mint_with_extra_deposit { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); let item = T::Helper::item(0); let deposit = 5u32.into(); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, collection_owner_lookup, deposit) burn { - let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(); - let (item, ..) = mint_item_with_extra_deposit::(0); + let (collection_id, collection_owner, collection_owner_lookup) = create_collection::(BalanceOf::::max_value()); + let (item, ..) = mint_item_with_extra_deposit::(0, T::Currency::minimum_balance()); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 623f79ad880..8453a495ea1 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -20,12 +20,19 @@ //! Handle the ability to notify other pallets that they should stop all -use frame_support::traits::Currency; +use codec::{Decode, Encode}; +use frame_support::pallet_prelude::MaxEncodedLen; +use frame_support::traits::{tokens::Balance, Currency}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{StaticLookup, Zero}, + RuntimeDebug, +}; + pub use pallet::*; -use sp_runtime::traits::StaticLookup; +pub use weights::WeightInfo as NodleWeightInfo; pub mod weights; -pub use weights::WeightInfo as NodleWeightInfo; mod benchmarking; #[cfg(test)] @@ -35,6 +42,36 @@ type AccountIdLookupOf = <::Lookup as StaticLookup pub type BalanceOf = <>::Currency as Currency<::AccountId>>::Balance; +#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +pub struct ExtraDepositDetails { + /// The cap for the total extra deposit for the collection + /// + /// `total` should never go higher than `limit`. + limit: T, + /// The total extra deposit reserved so far + /// + /// Ever mint with extra deposit should update this value. + total: T, +} + +impl ExtraDepositDetails { + pub fn with_limit(limit: T) -> Self { + Self { + limit, + ..Default::default() + } + } + pub fn add(&mut self, value: T) -> Result<(), &'static str> { + let new_total = self.total.checked_add(&value).ok_or("Overflow adding extra deposit")?; + if new_total <= self.limit { + self.total = new_total; + Ok(()) + } else { + Err("Total extra deposit exceeds limit") + } + } +} + #[frame_support::pallet] pub mod pallet { use super::*; @@ -45,7 +82,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; use pallet_uniques::{DestroyWitness, WeightInfo as UniquesWeightInfo}; - use sp_runtime::{traits::Zero, DispatchResult}; + use sp_runtime::DispatchResult; use sp_std::vec::Vec; #[pallet::config] @@ -73,8 +110,8 @@ pub mod pallet { >; #[pallet::storage] - pub(crate) type CollectionExtraDepositLimits, I: 'static = ()> = - StorageMap<_, Blake2_128Concat, T::CollectionId, BalanceOf, OptionQuery>; + pub(crate) type CollectionExtraDepositDetails, I: 'static = ()> = + StorageMap<_, Blake2_128Concat, T::CollectionId, ExtraDepositDetails>, OptionQuery>; #[pallet::error] pub enum Error { @@ -755,15 +792,19 @@ pub mod pallet { /// Weight: `O(1)` #[pallet::call_index(26)] #[pallet::weight(>::WeightInfo::create())] + #[transactional] pub fn create_with_extra_deposit_limit( origin: OriginFor, collection: T::CollectionId, admin: AccountIdLookupOf, - extra_deposit_limit: BalanceOf, + limit: BalanceOf, ) -> DispatchResult { // Since the extrinsic is transactional the following call only succeeds if the // collection is also created successfully. - CollectionExtraDepositLimits::::insert(&collection, extra_deposit_limit); + CollectionExtraDepositDetails::::insert( + &collection, + ExtraDepositDetails::>::with_limit(limit), + ); pallet_uniques::Pallet::::create(origin, collection, admin) } @@ -788,20 +829,18 @@ pub mod pallet { owner: AccountIdLookupOf, deposit: BalanceOf, ) -> DispatchResult { - pallet_uniques::Pallet::::mint(origin, collection, item, owner).and_then(|_| { - let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::UnknownCollectionOwner)?; - let extra_deposit_limit = - CollectionExtraDepositLimits::::get(&collection).unwrap_or_else(Zero::zero); - if deposit < extra_deposit_limit { - >::Currency::reserve(&collection_owner, deposit)?; - ItemExtraDeposits::::insert(collection, item, deposit); - CollectionExtraDepositLimits::::insert(&collection, extra_deposit_limit - deposit); - Ok(()) - } else { - Err(Error::::ExceedExtraDepositLimitForCollection)? - } - }) + pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; + let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::UnknownCollectionOwner)?; + let mut extra_deposit_details = + CollectionExtraDepositDetails::::get(&collection).unwrap_or_else(Default::default); + extra_deposit_details + .add(deposit) + .map_err(|_| Error::::ExceedExtraDepositLimitForCollection)?; + >::Currency::reserve(&collection_owner, deposit)?; + ItemExtraDeposits::::insert(collection, item, deposit); + CollectionExtraDepositDetails::::insert(&collection, extra_deposit_details); + Ok(()) } } } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 1fc4193e960..ad14eba21a5 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -5,6 +5,7 @@ use frame_support::{ assert_noop, assert_ok, construct_runtime, parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, }; +use pallet_uniques::DestroyWitness; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -128,10 +129,11 @@ mod test_cases { let collection_owner_id = 1; let item_owner = 42; Balances::make_free_balance_be(&collection_owner_id, 100); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner_id), collection_id, - collection_owner_id + collection_owner_id, + 100 )); assert_eq!( Balances::reserved_balance(collection_owner_id), @@ -182,10 +184,11 @@ mod test_cases { let init_balance = 100; Balances::make_free_balance_be(&collection_owner_id, init_balance); Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner_id), collection_id, - collection_owner_id + collection_owner_id, + 100 )); assert_eq!( Balances::reserved_balance(collection_owner_id), @@ -244,10 +247,11 @@ mod test_cases { let init_balance = 100; Balances::make_free_balance_be(&collection_owner_id, init_balance); Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner_id), collection_id, - collection_owner_id + collection_owner_id, + 100 )); assert_eq!( Balances::reserved_balance(collection_owner_id), @@ -307,10 +311,11 @@ mod test_cases { Balances::make_free_balance_be(&owners[0], init_balance); Balances::make_free_balance_be(&owners[1], init_balance); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner), collection_id, - collection_owner + collection_owner, + 100 )); assert_eq!( Balances::reserved_balance(collection_owner), @@ -386,10 +391,11 @@ mod test_cases { Balances::make_free_balance_be(&collection_owner, init_balance); Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner), collection_id, - collection_owner + collection_owner, + 100 )); assert_ok!(Uniques::mint_with_extra_deposit( @@ -433,10 +439,11 @@ mod test_cases { Balances::make_free_balance_be(&collection_owner, init_balance); Balances::make_free_balance_be(&item_owner, init_balance); - assert_ok!(Uniques::create( + assert_ok!(Uniques::create_with_extra_deposit_limit( RuntimeOrigin::signed(collection_owner), collection_id, - collection_owner + collection_owner, + 100 )); assert_ok!(Uniques::mint_with_extra_deposit( From 90fd4d2a54ec4570792765787474788f6260c84b Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Fri, 7 Jul 2023 16:35:32 +1200 Subject: [PATCH 080/101] feat(nodle-uniques-pallet): repatriate total extra deposit when the owner is transferred --- pallets/uniques/src/lib.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 8453a495ea1..d7661bd5853 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -70,6 +70,9 @@ impl ExtraDepositDetails { Err("Total extra deposit exceeds limit") } } + pub fn total(&self) -> T { + self.total + } } #[frame_support::pallet] @@ -77,7 +80,7 @@ pub mod pallet { use super::*; use frame_support::{ pallet_prelude::*, - traits::{ExistenceRequirement, ReservableCurrency}, + traits::{BalanceStatus::Reserved, ExistenceRequirement, ReservableCurrency}, transactional, }; use frame_system::pallet_prelude::*; @@ -423,7 +426,16 @@ pub mod pallet { collection: T::CollectionId, owner: AccountIdLookupOf, ) -> DispatchResult { - pallet_uniques::Pallet::::transfer_ownership(origin, collection, owner) + pallet_uniques::Pallet::::transfer_ownership(origin.clone(), collection, owner.clone())?; + let old_owner = ensure_signed(origin)?; + let new_owner = T::Lookup::lookup(owner)?; + if old_owner != new_owner { + let total_extra_deposit = CollectionExtraDepositDetails::::get(collection) + .unwrap_or_default() + .total(); + T::Currency::repatriate_reserved(&old_owner, &new_owner, total_extra_deposit, Reserved)?; + } + Ok(()) } /// Change the Issuer, Admin and Freezer of a collection. @@ -832,8 +844,7 @@ pub mod pallet { pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) .ok_or(Error::::UnknownCollectionOwner)?; - let mut extra_deposit_details = - CollectionExtraDepositDetails::::get(&collection).unwrap_or_else(Default::default); + let mut extra_deposit_details = CollectionExtraDepositDetails::::get(&collection).unwrap_or_default(); extra_deposit_details .add(deposit) .map_err(|_| Error::::ExceedExtraDepositLimitForCollection)?; From 02834faa268392a031e5761ca9c6e25bb8383ac4 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 09:30:33 +1200 Subject: [PATCH 081/101] fix(nodle-uniques-pallet): address warnings --- pallets/uniques/src/benchmarking.rs | 6 +----- pallets/uniques/src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index dfea833be4a..fb6d5d9dce6 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -21,11 +21,7 @@ use super::*; use frame_benchmarking::v1::{account, benchmarks_instance_pallet}; -use frame_support::{ - assert_ok, - traits::{Get, OriginTrait}, - BoundedVec, -}; +use frame_support::{assert_ok, traits::Get, BoundedVec}; use frame_system::RawOrigin as SystemOrigin; use pallet_uniques::{BenchmarkHelper, DestroyWitness}; use sp_runtime::traits::Bounded; diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index d7661bd5853..ba0f9f79ce7 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -814,7 +814,7 @@ pub mod pallet { // Since the extrinsic is transactional the following call only succeeds if the // collection is also created successfully. CollectionExtraDepositDetails::::insert( - &collection, + collection, ExtraDepositDetails::>::with_limit(limit), ); pallet_uniques::Pallet::::create(origin, collection, admin) @@ -844,13 +844,13 @@ pub mod pallet { pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) .ok_or(Error::::UnknownCollectionOwner)?; - let mut extra_deposit_details = CollectionExtraDepositDetails::::get(&collection).unwrap_or_default(); + let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); extra_deposit_details .add(deposit) .map_err(|_| Error::::ExceedExtraDepositLimitForCollection)?; >::Currency::reserve(&collection_owner, deposit)?; ItemExtraDeposits::::insert(collection, item, deposit); - CollectionExtraDepositDetails::::insert(&collection, extra_deposit_details); + CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); Ok(()) } } From 7724c38e739692856a50a1fd7302927efb8f5bfb Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 11:38:23 +1200 Subject: [PATCH 082/101] test(nodle-uniques-pallet): add more test cases --- pallets/uniques/src/tests.rs | 185 ++++++++++++++++++++++++++++++++++- 1 file changed, 184 insertions(+), 1 deletion(-) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index ad14eba21a5..ad3f741bbb9 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -117,8 +117,190 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { } #[cfg(test)] mod test_cases { - use super::*; + use frame_support::traits::Len; + #[test] + fn test_extra_deposit_limit_is_zero_if_not_set_explicitly() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + )); + assert_noop!( + Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + 1 + ), + Error::::ExceedExtraDepositLimitForCollection + ); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + 0 + )); + assert_eq!( + Balances::reserved_balance(collection_owner), + TestCollectionDeposit::get() + TestItemDeposit::get() + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_set_per_collection() { + new_test_ext().execute_with(|| { + let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + let mut total_extra_deposit_limit = 0; + for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + assert_noop!( + Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + 1 + ), + Error::::ExceedExtraDepositLimitForCollection + ); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + )); + total_extra_deposit_limit += extra_deposit_limit; + } + + assert_eq!( + Balances::reserved_balance(collection_owner), + (TestCollectionDeposit::get() + TestItemDeposit::get()) + * (extra_deposit_limits_per_collection.len() as u64) + + total_extra_deposit_limit + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_maintained_when_minting_several_items() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + // The deposits below sum up to 100. + let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0), (3, 5, 12)]; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + for (item, item_owner, deposit) in items_and_owners_and_deposits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + deposit + )); + } + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 4, 6, 1), + Error::::ExceedExtraDepositLimitForCollection + ); + }) + } + + #[test] + fn test_transfer_ownership_repatriates_extra_deposit() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = extra_deposit_limit - 1; + + let collection_id = 0; + let collection_old_owner = 1; + let collection_new_owner = 2; + + let old_owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); + let old_owner_free_balance = 2 * old_owner_reserved_balance; + let new_owner_free_balance = old_owner_free_balance - 1; + + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_old_owner, old_owner_free_balance); + Balances::make_free_balance_be(&collection_new_owner, new_owner_free_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + collection_old_owner, + extra_deposit_limit + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + assert_eq!( + Balances::reserved_balance(collection_old_owner), + old_owner_reserved_balance + ); + + assert_ok!(Uniques::set_accept_ownership( + RuntimeOrigin::signed(collection_new_owner), + Some(collection_id), + )); + assert_ok!(Uniques::transfer_ownership( + RuntimeOrigin::signed(collection_old_owner), + collection_id, + collection_new_owner + )); + + assert_eq!(Balances::reserved_balance(collection_old_owner), 0); + assert_eq!( + Balances::free_balance(collection_old_owner), + old_owner_free_balance - old_owner_reserved_balance + ); + assert_eq!( + Balances::reserved_balance(collection_new_owner), + old_owner_reserved_balance + ); + assert_eq!(Balances::free_balance(collection_new_owner), new_owner_free_balance); + }) + } + #[test] fn test_mint_with_extra_deposit() { new_test_ext().execute_with(|| { @@ -235,6 +417,7 @@ mod test_cases { assert_eq!(Balances::free_balance(item_owner), init_balance + extra_deposit); }) } + #[test] fn test_mint_and_burn_wrong_origin_with_extra_deposit() { new_test_ext().execute_with(|| { From e0bef9c628b7894ffa305b299de5e88e5840e9c9 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 12:40:11 +1200 Subject: [PATCH 083/101] feat(nodle-uniques-pallet): go ahead with destroy and burn even when unreserve is partial --- pallets/uniques/src/lib.rs | 10 +--- pallets/uniques/src/tests.rs | 113 +++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 8 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index ba0f9f79ce7..e607dfbd364 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -214,10 +214,7 @@ pub mod pallet { for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { let item_owner = pallet_uniques::Pallet::::owner(collection, item).ok_or(Error::::UnknownItemOwner)?; - ensure!( - >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), - Error::::UnreserveFailed, - ); + >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( &collection_owner, &item_owner, @@ -280,10 +277,7 @@ pub mod pallet { pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); if !extra_deposit.is_zero() { - ensure!( - >::Currency::unreserve(&collection_owner, extra_deposit).is_zero(), - Error::::UnreserveFailed, - ); + >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( &collection_owner, &item_owner, diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index ad3f741bbb9..e7550ea71b1 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -355,6 +355,119 @@ mod test_cases { }) } + #[test] + fn test_burn_when_extra_deposit_is_zero() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + 0 + )); + + assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); + }) + } + + #[test] + fn test_burn_goes_ahead_despite_partial_unreserve() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + + assert_ok!(Balances::force_unreserve( + RuntimeOrigin::root(), + collection_owner, + extra_deposit + )); + + assert_ok!(Uniques::burn(RuntimeOrigin::signed(item_owner), collection, item, None)); + }) + } + + #[test] + fn test_destroy_despite_partial_unreserve() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 2 * extra_deposit_limit); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + + assert_ok!(Balances::force_unreserve( + RuntimeOrigin::root(), + collection_owner, + extra_deposit + )); + + let witness = DestroyWitness { + items: 1, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection, + witness + )); + }) + } + #[test] fn test_mint_and_burn_with_extra_deposit() { new_test_ext().execute_with(|| { From b780bbae0a5114448c304de4aee83fd5a4bc4997 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 13:08:52 +1200 Subject: [PATCH 084/101] chore(nodle-uniques-pallet): remove unused error --- pallets/uniques/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index e607dfbd364..81ead88f5cb 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -124,8 +124,6 @@ pub mod pallet { UnknownCollectionOwner, /// The owner of item is not known. UnknownItemOwner, - /// Full un-reserve was unsuccessful. - UnreserveFailed, } #[pallet::call] From 3671767308b38e08909bacfd27212fe3c4daa594 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 13:20:10 +1200 Subject: [PATCH 085/101] feat(runtime-eden): minimize metadata change for extrinsics of pallet located at index 42 --- runtimes/eden/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtimes/eden/src/lib.rs b/runtimes/eden/src/lib.rs index 050be37f952..8cbaa26a1da 100644 --- a/runtimes/eden/src/lib.rs +++ b/runtimes/eden/src/lib.rs @@ -112,9 +112,9 @@ construct_runtime! { // Neat things Utility: pallet_utility = 40, Multisig: pallet_multisig = 41, - SubstrateUniques: pallet_uniques::{Pallet, Storage, Event} = 42, + Uniques: pallet_nodle_uniques = 42, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 43, - Uniques: pallet_nodle_uniques = 44, + SubstrateUniques: pallet_uniques::{Pallet, Storage, Event} = 44, // Nodle Stack // EmergencyShutdown: pallet_emergency_shutdown = 50, From aac98e83f7515cddf1cd679da133e8c00caf056a Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 15:17:03 +1200 Subject: [PATCH 086/101] test(nodle-uniques-pallet): test_transfer_ownership_to_self --- pallets/uniques/src/tests.rs | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index e7550ea71b1..2d7f0a9a329 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -301,6 +301,56 @@ mod test_cases { }) } + #[test] + fn test_transfer_ownership_to_self() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = extra_deposit_limit - 1; + + let collection_id = 0; + let collection_owner = 1; + + let owner_reserved_balance = extra_deposit + TestCollectionDeposit::get() + TestItemDeposit::get(); + let owner_free_balance = 2 * owner_reserved_balance; + + let item_id = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, owner_free_balance); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner, + extra_deposit_limit + )); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection_id, + item_id, + item_owner, + extra_deposit + )); + assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); + + assert_ok!(Uniques::set_accept_ownership( + RuntimeOrigin::signed(collection_owner), + Some(collection_id), + )); + assert_ok!(Uniques::transfer_ownership( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_owner + )); + + assert_eq!(Balances::reserved_balance(collection_owner), owner_reserved_balance); + assert_eq!( + Balances::free_balance(collection_owner), + owner_free_balance - owner_reserved_balance + ); + }) + } + #[test] fn test_mint_with_extra_deposit() { new_test_ext().execute_with(|| { From 6dcbf147c1b7921dbf76b0af563901f5b313cde3 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 15:19:19 +1200 Subject: [PATCH 087/101] chore(reserve-pallet): revert incidental change --- pallets/reserve/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/reserve/src/lib.rs b/pallets/reserve/src/lib.rs index de9cf9be7a7..a806267e219 100644 --- a/pallets/reserve/src/lib.rs +++ b/pallets/reserve/src/lib.rs @@ -20,7 +20,6 @@ //! A module that is called by the `collective` and is in charge of holding //! the company funds. -#[cfg(feature = "runtime-benchmarks")] mod benchmarking; #[cfg(test)] From 5a02b3478647828b3bdf836f9fdabe88c1e5703a Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 15:36:27 +1200 Subject: [PATCH 088/101] benchmark(nodle-uniques-pallet): add the benchmark placeholders for new functions [WIP] --- pallets/uniques/src/lib.rs | 4 ++-- pallets/uniques/src/weights.rs | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 81ead88f5cb..3f5a5bf0564 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -412,7 +412,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(11)] - #[pallet::weight(>::WeightInfo::transfer_ownership())] + #[pallet::weight(>::WeightInfo::transfer_ownership())] pub fn transfer_ownership( origin: OriginFor, collection: T::CollectionId, @@ -795,7 +795,7 @@ pub mod pallet { /// /// Weight: `O(1)` #[pallet::call_index(26)] - #[pallet::weight(>::WeightInfo::create())] + #[pallet::weight(>::WeightInfo::create_with_extra_deposit_limit())] #[transactional] pub fn create_with_extra_deposit_limit( origin: OriginFor, diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index ba1d3387374..a2bba6e9c59 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -49,6 +49,8 @@ pub trait WeightInfo { fn destroy(n: u32, m: u32, a: u32, ) -> Weight; fn mint_with_extra_deposit() -> Weight; fn burn() -> Weight; + fn create_with_extra_deposit_limit() -> Weight; + fn transfer_ownership() -> Weight; } /// Weight functions for `pallet_nodle_uniques`. @@ -155,6 +157,14 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } + + fn create_with_extra_deposit_limit() -> Weight { + Weight::from_parts(0, 0) + } + + fn transfer_ownership() -> Weight { + Weight::from_parts(0, 0) + } } impl WeightInfo for () { @@ -259,4 +269,12 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } + + fn create_with_extra_deposit_limit() -> Weight { + Weight::from_parts(0, 0) + } + + fn transfer_ownership() -> Weight { + Weight::from_parts(0, 0) + } } From e744cd668d37bf2a349df2c9abca97738b524189 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 15:56:49 +1200 Subject: [PATCH 089/101] benchmark(nodle-uniques-pallet): add the benchmark tests for create_with_extra_deposit_limit and transfer_ownership --- pallets/uniques/src/benchmarking.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index fb6d5d9dce6..68d2d7f2149 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -112,6 +112,14 @@ fn mint_item_with_extra_deposit, I: 'static>( (item, collection_owner, collection_owner_lookup) } +fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) { + let events = frame_system::Pallet::::events(); + let system_event: ::RuntimeEvent = generic_event.into(); + // compare to the last event record + let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + benchmarks_instance_pallet! { destroy { let n in 0 .. 1_000; @@ -149,5 +157,25 @@ benchmarks_instance_pallet! { let (item, ..) = mint_item_with_extra_deposit::(0, T::Currency::minimum_balance()); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, item, Some(collection_owner_lookup)) + create_with_extra_deposit_limit { + let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); + T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup.clone(), BalanceOf::::max_value()) + verify { + assert_last_event::(pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into()); + } + + transfer_ownership { + let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); + let target: T::AccountId = account("target", 0, SEED); + let target_lookup = T::Lookup::unlookup(target.clone()); + T::Currency::make_free_balance_be(&target, T::Currency::minimum_balance()); + let origin = SystemOrigin::Signed(target.clone()).into(); + Uniques::::set_accept_ownership(origin, Some(collection))?; + }: _(SystemOrigin::Signed(collection_owner), collection, target_lookup) + verify { + assert_last_event::(pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into()); + } + impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); } From e06efee13c564717c7f2eab2f645c540a398ab02 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 16:11:47 +1200 Subject: [PATCH 090/101] lint(nodle-uniques-pallet): remove redundant clone --- pallets/uniques/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 68d2d7f2149..bb2f9ffd299 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -160,7 +160,7 @@ benchmarks_instance_pallet! { create_with_extra_deposit_limit { let (collection_id, collection_owner, collection_owner_lookup) = get_config::(); T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); - }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup.clone(), BalanceOf::::max_value()) + }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup, BalanceOf::::max_value()) verify { assert_last_event::(pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into()); } From b1a6644f9dcf991f63f47916238f5d3015ed22d1 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Mon, 10 Jul 2023 16:21:57 +1200 Subject: [PATCH 091/101] benchmark(pallet-nodle-uniques): update weights [WIP] --- pallets/uniques/src/weights.rs | 90 +++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 6 deletions(-) diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index a2bba6e9c59..dec5fed46fb 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -158,12 +158,51 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().writes(8_u64)) } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn create_with_extra_deposit_limit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 37_000 nanoseconds. + Weight::from_parts(41_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) } - + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 58_000 nanoseconds. + Weight::from_parts(59_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } } @@ -270,11 +309,50 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(8_u64)) } + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:1 w:1) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques ClassAccount (r:0 w:1) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn create_with_extra_deposit_limit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 37_000 nanoseconds. + Weight::from_parts(41_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(6_u64)) } - + // Storage: SubstrateUniques OwnershipAcceptance (r:1 w:1) + // Proof: SubstrateUniques OwnershipAcceptance (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques Class (r:1 w:1) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: System Account (r:2 w:2) + // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:0) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: SubstrateUniques ClassAccount (r:0 w:2) + // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 58_000 nanoseconds. + Weight::from_parts(59_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(9_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } } From 6b8b1920d75749971ec0303be6e66d2dc27f5961 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Mon, 10 Jul 2023 19:11:45 +0900 Subject: [PATCH 092/101] Update weights --- pallets/allocations/src/weights.rs | 52 +- pallets/grants/src/weights.rs | 36 +- pallets/reserve/src/weights.rs | 20 +- pallets/uniques/src/weights.rs | 122 +-- runtimes/eden/src/weights/frame_system.rs | 44 +- runtimes/eden/src/weights/pallet_balances.rs | 40 +- .../src/weights/pallet_collator_selection.rs | 48 +- runtimes/eden/src/weights/pallet_contracts.rs | 920 +++++++++--------- .../eden/src/weights/pallet_membership.rs | 60 +- runtimes/eden/src/weights/pallet_multisig.rs | 70 +- runtimes/eden/src/weights/pallet_preimage.rs | 62 +- runtimes/eden/src/weights/pallet_timestamp.rs | 12 +- runtimes/eden/src/weights/pallet_uniques.rs | 124 +-- runtimes/eden/src/weights/pallet_utility.rs | 36 +- runtimes/eden/src/weights/pallet_xcm.rs | 60 +- .../weights/pallet_xcm_benchmarks_fungible.rs | 14 +- .../weights/pallet_xcm_benchmarks_generic.rs | 58 +- scripts/init.sh | 3 +- 18 files changed, 891 insertions(+), 890 deletions(-) diff --git a/pallets/allocations/src/weights.rs b/pallets/allocations/src/weights.rs index 95addc0d342..797c9e4de49 100644 --- a/pallets/allocations/src/weights.rs +++ b/pallets/allocations/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_allocations //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -72,10 +72,10 @@ impl WeightInfo for SubstrateWeight { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 181_830 nanoseconds. - Weight::from_parts(64_532_663_u64, 0) - // Standard Error: 13_909 - .saturating_add(Weight::from_parts(65_969_287_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 180_370 nanoseconds. + Weight::from_parts(64_125_680_u64, 0) + // Standard Error: 13_436 + .saturating_add(Weight::from_parts(64_728_017_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -98,8 +98,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 22_380 nanoseconds. - Weight::from_parts(22_910_000_u64, 0) + // Minimum execution time: 22_280 nanoseconds. + Weight::from_parts(23_030_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -120,8 +120,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 18_090 nanoseconds. - Weight::from_parts(18_650_000_u64, 0) + // Minimum execution time: 18_060 nanoseconds. + Weight::from_parts(18_640_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -148,8 +148,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 37_171 nanoseconds. - Weight::from_parts(38_530_000_u64, 0) + // Minimum execution time: 37_240 nanoseconds. + Weight::from_parts(38_420_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -162,8 +162,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 10_560 nanoseconds. - Weight::from_parts(10_950_000_u64, 0) + // Minimum execution time: 10_670 nanoseconds. + Weight::from_parts(10_900_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -186,10 +186,10 @@ impl WeightInfo for () { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[1, 500]`. fn allocate(b: u32, ) -> Weight { - // Minimum execution time: 181_830 nanoseconds. - Weight::from_parts(64_532_663_u64, 0) - // Standard Error: 13_909 - .saturating_add(Weight::from_parts(65_969_287_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 180_370 nanoseconds. + Weight::from_parts(64_125_680_u64, 0) + // Standard Error: 13_436 + .saturating_add(Weight::from_parts(64_728_017_u64, 0).saturating_mul(b as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -212,8 +212,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn calc_quota() -> Weight { - // Minimum execution time: 22_380 nanoseconds. - Weight::from_parts(22_910_000_u64, 0) + // Minimum execution time: 22_280 nanoseconds. + Weight::from_parts(23_030_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -234,8 +234,8 @@ impl WeightInfo for () { // Storage: Allocations SessionQuota (r:0 w:1) // Proof: Allocations SessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn renew_quota() -> Weight { - // Minimum execution time: 18_090 nanoseconds. - Weight::from_parts(18_650_000_u64, 0) + // Minimum execution time: 18_060 nanoseconds. + Weight::from_parts(18_640_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -262,8 +262,8 @@ impl WeightInfo for () { // Storage: Allocations NextSessionQuota (r:0 w:1) // Proof: Allocations NextSessionQuota (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn checked_update_session_quota() -> Weight { - // Minimum execution time: 37_171 nanoseconds. - Weight::from_parts(38_530_000_u64, 0) + // Minimum execution time: 37_240 nanoseconds. + Weight::from_parts(38_420_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -276,8 +276,8 @@ impl WeightInfo for () { // Storage: Allocations SessionQuotaRenewSchedule (r:0 w:1) // Proof: Allocations SessionQuotaRenewSchedule (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_curve_starting_block() -> Weight { - // Minimum execution time: 10_560 nanoseconds. - Weight::from_parts(10_950_000_u64, 0) + // Minimum execution time: 10_670 nanoseconds. + Weight::from_parts(10_900_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/grants/src/weights.rs b/pallets/grants/src/weights.rs index e4940df9e9f..1a083332f1a 100644 --- a/pallets/grants/src/weights.rs +++ b/pallets/grants/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_grants //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -76,8 +76,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Balances Freezes (r:1 w:0) // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 136_920 nanoseconds. - Weight::from_parts(139_940_000_u64, 0) + // Minimum execution time: 132_770 nanoseconds. + Weight::from_parts(135_120_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -100,8 +100,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 63_020 nanoseconds. - Weight::from_parts(64_090_000_u64, 0) + // Minimum execution time: 62_090 nanoseconds. + Weight::from_parts(63_390_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -130,8 +130,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 186_680 nanoseconds. - Weight::from_parts(190_229_000_u64, 0) + // Minimum execution time: 184_010 nanoseconds. + Weight::from_parts(187_570_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -146,8 +146,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 17_530 nanoseconds. - Weight::from_parts(18_170_000_u64, 0) + // Minimum execution time: 17_470 nanoseconds. + Weight::from_parts(18_120_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -175,8 +175,8 @@ impl WeightInfo for () { // Storage: Balances Freezes (r:1 w:0) // Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn add_vesting_schedule() -> Weight { - // Minimum execution time: 136_920 nanoseconds. - Weight::from_parts(139_940_000_u64, 0) + // Minimum execution time: 132_770 nanoseconds. + Weight::from_parts(135_120_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -199,8 +199,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn claim() -> Weight { - // Minimum execution time: 63_020 nanoseconds. - Weight::from_parts(64_090_000_u64, 0) + // Minimum execution time: 62_090 nanoseconds. + Weight::from_parts(63_390_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -229,8 +229,8 @@ impl WeightInfo for () { // Storage: Vesting CounterForVestingSchedules (r:1 w:1) // Proof: Vesting CounterForVestingSchedules (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn cancel_all_vesting_schedules() -> Weight { - // Minimum execution time: 186_680 nanoseconds. - Weight::from_parts(190_229_000_u64, 0) + // Minimum execution time: 184_010 nanoseconds. + Weight::from_parts(187_570_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -245,8 +245,8 @@ impl WeightInfo for () { // Storage: Vesting Renounced (r:0 w:1) // Proof: Vesting Renounced (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn renounce() -> Weight { - // Minimum execution time: 17_530 nanoseconds. - Weight::from_parts(18_170_000_u64, 0) + // Minimum execution time: 17_470 nanoseconds. + Weight::from_parts(18_120_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } diff --git a/pallets/reserve/src/weights.rs b/pallets/reserve/src/weights.rs index 252cb966965..59c4dad276a 100644 --- a/pallets/reserve/src/weights.rs +++ b/pallets/reserve/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_reserve //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,8 +66,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 80_790 nanoseconds. - Weight::from_parts(82_780_000_u64, 0) + // Minimum execution time: 79_920 nanoseconds. + Weight::from_parts(81_710_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -84,8 +84,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 92_200 nanoseconds. - Weight::from_parts(95_300_000_u64, 0) + // Minimum execution time: 90_430 nanoseconds. + Weight::from_parts(91_690_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn tip() -> Weight { - // Minimum execution time: 80_790 nanoseconds. - Weight::from_parts(82_780_000_u64, 0) + // Minimum execution time: 79_920 nanoseconds. + Weight::from_parts(81_710_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -123,8 +123,8 @@ impl WeightInfo for () { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn spend() -> Weight { - // Minimum execution time: 92_200 nanoseconds. - Weight::from_parts(95_300_000_u64, 0) + // Minimum execution time: 90_430 nanoseconds. + Weight::from_parts(91_690_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index dec5fed46fb..98469fd7ed4 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_nodle_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -58,14 +58,10 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1001 w:1000) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1001 w:1000) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -76,6 +72,10 @@ impl WeightInfo for SubstrateWeight { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) @@ -88,14 +88,14 @@ impl WeightInfo for SubstrateWeight { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_399_149 nanoseconds. - Weight::from_parts(3_408_100_000_u64, 0) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(38_037_182_u64, 0).saturating_mul(n as u64)) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(272_909_u64, 0).saturating_mul(m as u64)) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(378_882_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_373_259 nanoseconds. + Weight::from_parts(3_391_890_000_u64, 0) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(38_453_923_u64, 0).saturating_mul(n as u64)) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(167_125_u64, 0).saturating_mul(m as u64)) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(340_047_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -121,15 +121,17 @@ impl WeightInfo for SubstrateWeight { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:0 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:0 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 96_450 nanoseconds. - Weight::from_parts(98_140_000_u64, 0) - .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().writes(7_u64)) + // Minimum execution time: 97_860 nanoseconds. + Weight::from_parts(100_160_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) @@ -145,19 +147,18 @@ impl WeightInfo for SubstrateWeight { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 85_460 nanoseconds. - Weight::from_parts(86_750_000_u64, 0) + // Minimum execution time: 96_870 nanoseconds. + Weight::from_parts(99_550_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } - // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) @@ -175,8 +176,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn create_with_extra_deposit_limit() -> Weight { - // Minimum execution time: 37_000 nanoseconds. - Weight::from_parts(41_000_000_u64, 0) + // Minimum execution time: 57_991 nanoseconds. + Weight::from_parts(59_300_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -199,8 +200,8 @@ impl WeightInfo for SubstrateWeight { // Storage: SubstrateUniques ClassAccount (r:0 w:2) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 58_000 nanoseconds. - Weight::from_parts(59_000_000_u64, 0) + // Minimum execution time: 89_700 nanoseconds. + Weight::from_parts(91_700_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -209,14 +210,10 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:1001 w:1000) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1001 w:1000) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Asset (r:1001 w:1000) // Proof: SubstrateUniques Asset (max_values: None, max_size: Some(122), added: 2597, mode: MaxEncodedLen) - // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) - // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) - // Storage: SubstrateUniques Attribute (r:1000 w:1000) - // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) // Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) // Storage: System Number (r:1 w:0) @@ -227,6 +224,10 @@ impl WeightInfo for () { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: SubstrateUniques InstanceMetadataOf (r:1000 w:1000) + // Proof: SubstrateUniques InstanceMetadataOf (max_values: None, max_size: Some(187), added: 2662, mode: MaxEncodedLen) + // Storage: SubstrateUniques Attribute (r:1000 w:1000) + // Proof: SubstrateUniques Attribute (max_values: None, max_size: Some(364), added: 2839, mode: MaxEncodedLen) // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) // Storage: SubstrateUniques ClassMetadataOf (r:0 w:1) @@ -239,14 +240,14 @@ impl WeightInfo for () { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 3_399_149 nanoseconds. - Weight::from_parts(3_408_100_000_u64, 0) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(38_037_182_u64, 0).saturating_mul(n as u64)) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(272_909_u64, 0).saturating_mul(m as u64)) - // Standard Error: 30_380 - .saturating_add(Weight::from_parts(378_882_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 3_373_259 nanoseconds. + Weight::from_parts(3_391_890_000_u64, 0) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(38_453_923_u64, 0).saturating_mul(n as u64)) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(167_125_u64, 0).saturating_mul(m as u64)) + // Standard Error: 33_513 + .saturating_add(Weight::from_parts(340_047_u64, 0).saturating_mul(a as u64)) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(n as u64))) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -272,15 +273,17 @@ impl WeightInfo for () { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) - // Storage: Uniques Asset (r:0 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:0 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) fn mint_with_extra_deposit() -> Weight { - // Minimum execution time: 96_450 nanoseconds. - Weight::from_parts(98_140_000_u64, 0) - .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().writes(7_u64)) + // Minimum execution time: 97_860 nanoseconds. + Weight::from_parts(100_160_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(9_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) } // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) @@ -296,19 +299,18 @@ impl WeightInfo for () { // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) - // Storage: Uniques Asset (r:1 w:1) - // Proof: Uniques Asset (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + // Storage: Uniques ItemExtraDeposits (r:1 w:1) + // Proof: Uniques ItemExtraDeposits (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 85_460 nanoseconds. - Weight::from_parts(86_750_000_u64, 0) + // Minimum execution time: 96_870 nanoseconds. + Weight::from_parts(99_550_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } - // Storage: SubstrateUniques Class (r:1 w:1) // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) // Storage: System Account (r:1 w:1) @@ -326,8 +328,8 @@ impl WeightInfo for () { // Storage: Uniques CollectionExtraDepositDetails (r:0 w:1) // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) fn create_with_extra_deposit_limit() -> Weight { - // Minimum execution time: 37_000 nanoseconds. - Weight::from_parts(41_000_000_u64, 0) + // Minimum execution time: 57_991 nanoseconds. + Weight::from_parts(59_300_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -350,8 +352,8 @@ impl WeightInfo for () { // Storage: SubstrateUniques ClassAccount (r:0 w:2) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 58_000 nanoseconds. - Weight::from_parts(59_000_000_u64, 0) + // Minimum execution time: 89_700 nanoseconds. + Weight::from_parts(91_700_000_u64, 0) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } diff --git a/runtimes/eden/src/weights/frame_system.rs b/runtimes/eden/src/weights/frame_system.rs index 578e3cb8afb..63a50e9a076 100644 --- a/runtimes/eden/src/weights/frame_system.rs +++ b/runtimes/eden/src/weights/frame_system.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,8 +49,8 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - // Minimum execution time: 3_810 nanoseconds. - Weight::from_parts(4_457_571_u64, 0) + // Minimum execution time: 3_840 nanoseconds. + Weight::from_parts(4_529_377_u64, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(287_u64, 0).saturating_mul(b as u64)) } @@ -64,10 +64,10 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - // Minimum execution time: 16_290 nanoseconds. - Weight::from_parts(17_287_723_u64, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(1_531_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 15_630 nanoseconds. + Weight::from_parts(29_606_707_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_519_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -76,8 +76,8 @@ impl frame_system::WeightInfo for WeightInfo { // Storage: unknown `0x3a686561707061676573` (r:0 w:1) // Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { - // Minimum execution time: 7_210 nanoseconds. - Weight::from_parts(7_550_000_u64, 0) + // Minimum execution time: 6_880 nanoseconds. + Weight::from_parts(7_220_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -85,30 +85,30 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { - // Minimum execution time: 3_680 nanoseconds. - Weight::from_parts(3_760_000_u64, 0) - // Standard Error: 2_051 - .saturating_add(Weight::from_parts(1_045_084_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 3_440 nanoseconds. + Weight::from_parts(3_620_000_u64, 0) + // Standard Error: 1_913 + .saturating_add(Weight::from_parts(1_077_655_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { - // Minimum execution time: 3_700 nanoseconds. - Weight::from_parts(3_811_000_u64, 0) - // Standard Error: 845 - .saturating_add(Weight::from_parts(704_053_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 3_470 nanoseconds. + Weight::from_parts(3_590_000_u64, 0) + // Standard Error: 825 + .saturating_add(Weight::from_parts(715_741_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - // Minimum execution time: 6_740 nanoseconds. - Weight::from_parts(7_080_000_u64, 0) - // Standard Error: 1_077 - .saturating_add(Weight::from_parts(1_280_308_u64, 0).saturating_mul(p as u64)) + // Minimum execution time: 6_711 nanoseconds. + Weight::from_parts(7_029_000_u64, 0) + // Standard Error: 1_048 + .saturating_add(Weight::from_parts(1_301_022_u64, 0).saturating_mul(p as u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p as u64))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p as u64))) } diff --git a/runtimes/eden/src/weights/pallet_balances.rs b/runtimes/eden/src/weights/pallet_balances.rs index 4f6eba3d17f..5e76c92abe2 100644 --- a/runtimes/eden/src/weights/pallet_balances.rs +++ b/runtimes/eden/src/weights/pallet_balances.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_allow_death() -> Weight { - // Minimum execution time: 103_240 nanoseconds. - Weight::from_parts(105_360_000_u64, 0) + // Minimum execution time: 102_120 nanoseconds. + Weight::from_parts(103_560_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -78,8 +78,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_keep_alive() -> Weight { - // Minimum execution time: 80_500 nanoseconds. - Weight::from_parts(82_280_000_u64, 0) + // Minimum execution time: 78_110 nanoseconds. + Weight::from_parts(80_110_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -94,8 +94,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_set_balance_creating() -> Weight { - // Minimum execution time: 29_300 nanoseconds. - Weight::from_parts(30_180_000_u64, 0) + // Minimum execution time: 29_070 nanoseconds. + Weight::from_parts(29_980_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -112,8 +112,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn force_set_balance_killing() -> Weight { - // Minimum execution time: 43_980 nanoseconds. - Weight::from_parts(45_820_000_u64, 0) + // Minimum execution time: 44_420 nanoseconds. + Weight::from_parts(45_329_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -130,8 +130,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_transfer() -> Weight { - // Minimum execution time: 106_620 nanoseconds. - Weight::from_parts(109_260_000_u64, 0) + // Minimum execution time: 103_660 nanoseconds. + Weight::from_parts(105_820_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -148,8 +148,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn transfer_all() -> Weight { - // Minimum execution time: 97_770 nanoseconds. - Weight::from_parts(99_880_000_u64, 0) + // Minimum execution time: 96_330 nanoseconds. + Weight::from_parts(98_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -164,8 +164,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn force_unreserve() -> Weight { - // Minimum execution time: 34_440 nanoseconds. - Weight::from_parts(35_831_000_u64, 0) + // Minimum execution time: 34_820 nanoseconds. + Weight::from_parts(35_430_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -181,10 +181,10 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { - // Minimum execution time: 34_080 nanoseconds. - Weight::from_parts(34_500_000_u64, 0) - // Standard Error: 13_151 - .saturating_add(Weight::from_parts(25_726_758_u64, 0).saturating_mul(u as u64)) + // Minimum execution time: 33_600 nanoseconds. + Weight::from_parts(34_250_000_u64, 0) + // Standard Error: 10_895 + .saturating_add(Weight::from_parts(25_364_413_u64, 0).saturating_mul(u as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u as u64))) .saturating_add(T::DbWeight::get().writes(2_u64)) diff --git a/runtimes/eden/src/weights/pallet_collator_selection.rs b/runtimes/eden/src/weights/pallet_collator_selection.rs index d51d778fcdf..1a03dce4423 100644 --- a/runtimes/eden/src/weights/pallet_collator_selection.rs +++ b/runtimes/eden/src/weights/pallet_collator_selection.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,10 +61,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection Invulnerables (max_values: Some(1), max_size: Some(1601), added: 2096, mode: MaxEncodedLen) /// The range of component `b` is `[1, 50]`. fn set_invulnerables(b: u32, ) -> Weight { - // Minimum execution time: 25_350 nanoseconds. - Weight::from_parts(24_930_554_u64, 0) - // Standard Error: 6_348 - .saturating_add(Weight::from_parts(4_371_990_u64, 0).saturating_mul(b as u64)) + // Minimum execution time: 24_790 nanoseconds. + Weight::from_parts(24_629_405_u64, 0) + // Standard Error: 6_588 + .saturating_add(Weight::from_parts(4_266_100_u64, 0).saturating_mul(b as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -80,8 +80,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection DesiredCandidates (r:0 w:1) // Proof: CollatorSelection DesiredCandidates (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) fn set_desired_candidates() -> Weight { - // Minimum execution time: 14_040 nanoseconds. - Weight::from_parts(14_570_000_u64, 0) + // Minimum execution time: 13_900 nanoseconds. + Weight::from_parts(14_380_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -96,8 +96,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection CandidacyBond (r:0 w:1) // Proof: CollatorSelection CandidacyBond (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) fn set_candidacy_bond() -> Weight { - // Minimum execution time: 14_610 nanoseconds. - Weight::from_parts(15_100_000_u64, 0) + // Minimum execution time: 14_260 nanoseconds. + Weight::from_parts(14_849_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -123,10 +123,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// The range of component `c` is `[1, 999]`. fn register_as_candidate(c: u32, ) -> Weight { - // Minimum execution time: 71_900 nanoseconds. - Weight::from_parts(76_968_917_u64, 0) - // Standard Error: 983 - .saturating_add(Weight::from_parts(91_848_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 70_270 nanoseconds. + Weight::from_parts(75_523_309_u64, 0) + // Standard Error: 973 + .saturating_add(Weight::from_parts(89_212_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -144,10 +144,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) /// The range of component `c` is `[4, 1000]`. fn leave_intent(c: u32, ) -> Weight { - // Minimum execution time: 56_510 nanoseconds. - Weight::from_parts(59_749_444_u64, 0) - // Standard Error: 945 - .saturating_add(Weight::from_parts(92_469_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 55_860 nanoseconds. + Weight::from_parts(58_676_416_u64, 0) + // Standard Error: 992 + .saturating_add(Weight::from_parts(90_510_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -168,8 +168,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Storage: CollatorSelection LastAuthoredBlock (r:0 w:1) // Proof: CollatorSelection LastAuthoredBlock (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) fn note_author() -> Weight { - // Minimum execution time: 87_830 nanoseconds. - Weight::from_parts(89_769_000_u64, 0) + // Minimum execution time: 85_790 nanoseconds. + Weight::from_parts(86_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -194,10 +194,10 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `r` is `[1, 1000]`. /// The range of component `c` is `[1, 1000]`. fn new_session(_r: u32, c: u32, ) -> Weight { - // Minimum execution time: 29_570 nanoseconds. - Weight::from_parts(30_170_000_u64, 0) - // Standard Error: 1_230_327 - .saturating_add(Weight::from_parts(42_501_317_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 28_840 nanoseconds. + Weight::from_parts(29_260_000_u64, 0) + // Standard Error: 1_205_887 + .saturating_add(Weight::from_parts(41_619_286_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c as u64))) .saturating_add(T::DbWeight::get().writes(1_u64)) diff --git a/runtimes/eden/src/weights/pallet_contracts.rs b/runtimes/eden/src/weights/pallet_contracts.rs index 7af3064131d..425a456035e 100644 --- a/runtimes/eden/src/weights/pallet_contracts.rs +++ b/runtimes/eden/src/weights/pallet_contracts.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,18 +50,18 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: Contracts DeletionQueueCounter (r:1 w:0) // Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) fn on_process_deletion_queue_batch() -> Weight { - // Minimum execution time: 4_100 nanoseconds. - Weight::from_parts(4_220_000_u64, 0) + // Minimum execution time: 4_030 nanoseconds. + Weight::from_parts(4_240_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) } // Storage: Skipped Metadata (r:0 w:0) // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { - // Minimum execution time: 21_520 nanoseconds. - Weight::from_parts(13_231_502_u64, 0) - // Standard Error: 1_038 - .saturating_add(Weight::from_parts(1_143_215_u64, 0).saturating_mul(k as u64)) + // Minimum execution time: 20_940 nanoseconds. + Weight::from_parts(13_226_806_u64, 0) + // Standard Error: 1_133 + .saturating_add(Weight::from_parts(1_190_372_u64, 0).saturating_mul(k as u64)) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k as u64))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -73,10 +73,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// The range of component `c` is `[0, 61717]`. fn reinstrument(c: u32, ) -> Weight { - // Minimum execution time: 49_290 nanoseconds. - Weight::from_parts(50_962_738_u64, 0) - // Standard Error: 50 - .saturating_add(Weight::from_parts(65_865_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 49_291 nanoseconds. + Weight::from_parts(51_176_239_u64, 0) + // Standard Error: 165 + .saturating_add(Weight::from_parts(68_555_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -102,10 +102,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `c` is `[0, 125952]`. fn call_with_code_per_byte(c: u32, ) -> Weight { - // Minimum execution time: 423_980 nanoseconds. - Weight::from_parts(459_714_945_u64, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(40_886_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 411_500 nanoseconds. + Weight::from_parts(445_363_860_u64, 0) + // Standard Error: 22 + .saturating_add(Weight::from_parts(43_610_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -139,14 +139,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { - // Minimum execution time: 4_565_350 nanoseconds. - Weight::from_parts(718_961_748_u64, 0) - // Standard Error: 166 - .saturating_add(Weight::from_parts(132_490_u64, 0).saturating_mul(c as u64)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_928_u64, 0).saturating_mul(i as u64)) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_805_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 4_571_090 nanoseconds. + Weight::from_parts(677_993_998_u64, 0) + // Standard Error: 151 + .saturating_add(Weight::from_parts(133_826_u64, 0).saturating_mul(c as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_932_u64, 0).saturating_mul(i as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_845_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(12_u64)) } @@ -177,12 +177,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate(i: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_457_230 nanoseconds. - Weight::from_parts(549_560_856_u64, 0) + // Minimum execution time: 2_448_210 nanoseconds. + Weight::from_parts(528_737_319_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(1_919_u64, 0).saturating_mul(i as u64)) + .saturating_add(Weight::from_parts(1_928_u64, 0).saturating_mul(i as u64)) // Standard Error: 8 - .saturating_add(Weight::from_parts(1_822_u64, 0).saturating_mul(s as u64)) + .saturating_add(Weight::from_parts(1_827_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } @@ -207,8 +207,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: System EventTopics (r:2 w:2) // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) fn call() -> Weight { - // Minimum execution time: 338_620 nanoseconds. - Weight::from_parts(345_750_000_u64, 0) + // Minimum execution time: 327_310 nanoseconds. + Weight::from_parts(334_620_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -230,10 +230,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) /// The range of component `c` is `[0, 61717]`. fn upload_code(c: u32, ) -> Weight { - // Minimum execution time: 404_980 nanoseconds. - Weight::from_parts(419_653_844_u64, 0) - // Standard Error: 63 - .saturating_add(Weight::from_parts(130_294_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 395_720 nanoseconds. + Weight::from_parts(405_198_727_u64, 0) + // Standard Error: 67 + .saturating_add(Weight::from_parts(133_632_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -254,8 +254,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: Contracts PristineCode (r:0 w:1) // Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) fn remove_code() -> Weight { - // Minimum execution time: 57_910 nanoseconds. - Weight::from_parts(59_400_000_u64, 0) + // Minimum execution time: 57_030 nanoseconds. + Weight::from_parts(57_931_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -274,8 +274,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Storage: System EventTopics (r:3 w:3) // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) fn set_code() -> Weight { - // Minimum execution time: 52_430 nanoseconds. - Weight::from_parts(53_410_000_u64, 0) + // Minimum execution time: 51_470 nanoseconds. + Weight::from_parts(52_720_000_u64, 0) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -301,10 +301,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_caller(r: u32, ) -> Weight { - // Minimum execution time: 383_050 nanoseconds. - Weight::from_parts(391_618_088_u64, 0) - // Standard Error: 432 - .saturating_add(Weight::from_parts(579_096_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_560 nanoseconds. + Weight::from_parts(386_621_965_u64, 0) + // Standard Error: 533 + .saturating_add(Weight::from_parts(566_098_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -330,10 +330,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_is_contract(r: u32, ) -> Weight { - // Minimum execution time: 380_040 nanoseconds. - Weight::from_parts(188_968_585_u64, 0) - // Standard Error: 7_096 - .saturating_add(Weight::from_parts(4_862_839_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_820 nanoseconds. + Weight::from_parts(188_260_251_u64, 0) + // Standard Error: 6_776 + .saturating_add(Weight::from_parts(4_772_943_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -360,10 +360,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 380_480 nanoseconds. - Weight::from_parts(200_203_307_u64, 0) - // Standard Error: 6_512 - .saturating_add(Weight::from_parts(6_315_784_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 374_291 nanoseconds. + Weight::from_parts(186_166_419_u64, 0) + // Standard Error: 6_996 + .saturating_add(Weight::from_parts(6_214_095_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -390,10 +390,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_own_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 387_170 nanoseconds. - Weight::from_parts(392_373_540_u64, 0) - // Standard Error: 1_151 - .saturating_add(Weight::from_parts(775_160_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 376_540 nanoseconds. + Weight::from_parts(386_298_818_u64, 0) + // Standard Error: 520 + .saturating_add(Weight::from_parts(745_945_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -419,10 +419,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_origin(r: u32, ) -> Weight { - // Minimum execution time: 373_380 nanoseconds. - Weight::from_parts(385_735_047_u64, 0) - // Standard Error: 272 - .saturating_add(Weight::from_parts(195_663_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 365_540 nanoseconds. + Weight::from_parts(378_882_058_u64, 0) + // Standard Error: 305 + .saturating_add(Weight::from_parts(183_571_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -448,10 +448,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_address(r: u32, ) -> Weight { - // Minimum execution time: 377_340 nanoseconds. - Weight::from_parts(390_022_369_u64, 0) - // Standard Error: 445 - .saturating_add(Weight::from_parts(574_540_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 368_760 nanoseconds. + Weight::from_parts(384_049_072_u64, 0) + // Standard Error: 489 + .saturating_add(Weight::from_parts(573_420_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -477,10 +477,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { - // Minimum execution time: 377_980 nanoseconds. - Weight::from_parts(391_438_607_u64, 0) - // Standard Error: 553 - .saturating_add(Weight::from_parts(1_004_479_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_730 nanoseconds. + Weight::from_parts(385_176_727_u64, 0) + // Standard Error: 558 + .saturating_add(Weight::from_parts(985_007_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -506,10 +506,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_balance(r: u32, ) -> Weight { - // Minimum execution time: 380_110 nanoseconds. - Weight::from_parts(395_632_220_u64, 0) - // Standard Error: 1_017 - .saturating_add(Weight::from_parts(2_808_534_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_940 nanoseconds. + Weight::from_parts(392_740_707_u64, 0) + // Standard Error: 845 + .saturating_add(Weight::from_parts(2_738_870_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -535,10 +535,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_value_transferred(r: u32, ) -> Weight { - // Minimum execution time: 380_380 nanoseconds. - Weight::from_parts(392_638_043_u64, 0) - // Standard Error: 408 - .saturating_add(Weight::from_parts(571_689_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_330 nanoseconds. + Weight::from_parts(386_357_214_u64, 0) + // Standard Error: 533 + .saturating_add(Weight::from_parts(564_286_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -564,10 +564,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_minimum_balance(r: u32, ) -> Weight { - // Minimum execution time: 378_960 nanoseconds. - Weight::from_parts(391_264_215_u64, 0) - // Standard Error: 448 - .saturating_add(Weight::from_parts(572_075_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 376_520 nanoseconds. + Weight::from_parts(386_201_777_u64, 0) + // Standard Error: 428 + .saturating_add(Weight::from_parts(565_499_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -593,10 +593,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_block_number(r: u32, ) -> Weight { - // Minimum execution time: 378_589 nanoseconds. - Weight::from_parts(392_072_873_u64, 0) - // Standard Error: 437 - .saturating_add(Weight::from_parts(567_673_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 370_370 nanoseconds. + Weight::from_parts(385_819_852_u64, 0) + // Standard Error: 450 + .saturating_add(Weight::from_parts(553_793_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -622,10 +622,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_now(r: u32, ) -> Weight { - // Minimum execution time: 380_790 nanoseconds. - Weight::from_parts(390_746_463_u64, 0) - // Standard Error: 517 - .saturating_add(Weight::from_parts(574_213_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_540 nanoseconds. + Weight::from_parts(385_265_939_u64, 0) + // Standard Error: 474 + .saturating_add(Weight::from_parts(561_035_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -653,10 +653,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { - // Minimum execution time: 380_430 nanoseconds. - Weight::from_parts(402_749_112_u64, 0) - // Standard Error: 819 - .saturating_add(Weight::from_parts(2_130_270_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_210 nanoseconds. + Weight::from_parts(398_096_440_u64, 0) + // Standard Error: 846 + .saturating_add(Weight::from_parts(2_077_133_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -682,10 +682,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_gas(r: u32, ) -> Weight { - // Minimum execution time: 291_210 nanoseconds. - Weight::from_parts(302_201_440_u64, 0) - // Standard Error: 236 - .saturating_add(Weight::from_parts(150_417_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 282_350 nanoseconds. + Weight::from_parts(294_525_456_u64, 0) + // Standard Error: 322 + .saturating_add(Weight::from_parts(152_726_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -711,10 +711,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_input(r: u32, ) -> Weight { - // Minimum execution time: 380_800 nanoseconds. - Weight::from_parts(392_925_180_u64, 0) - // Standard Error: 505 - .saturating_add(Weight::from_parts(418_289_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_810 nanoseconds. + Weight::from_parts(384_343_597_u64, 0) + // Standard Error: 467 + .saturating_add(Weight::from_parts(410_604_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -740,10 +740,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_input_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 381_229 nanoseconds. - Weight::from_parts(392_009_852_u64, 0) + // Minimum execution time: 374_310 nanoseconds. + Weight::from_parts(384_179_830_u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(582_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(584_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -769,10 +769,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { - // Minimum execution time: 371_040 nanoseconds. - Weight::from_parts(381_528_646_u64, 0) - // Standard Error: 440_595 - .saturating_add(Weight::from_parts(4_465_353_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 361_830 nanoseconds. + Weight::from_parts(372_958_755_u64, 0) + // Standard Error: 458_318 + .saturating_add(Weight::from_parts(4_774_344_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -798,8 +798,8 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_return_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 376_540 nanoseconds. - Weight::from_parts(385_925_776_u64, 0) + // Minimum execution time: 370_040 nanoseconds. + Weight::from_parts(378_535_626_u64, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(217_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) @@ -833,10 +833,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { - // Minimum execution time: 377_340 nanoseconds. - Weight::from_parts(387_191_614_u64, 0) - // Standard Error: 401_619 - .saturating_add(Weight::from_parts(208_275_385_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 368_649 nanoseconds. + Weight::from_parts(378_831_855_u64, 0) + // Standard Error: 460_552 + .saturating_add(Weight::from_parts(200_327_044_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -866,10 +866,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_random(r: u32, ) -> Weight { - // Minimum execution time: 378_860 nanoseconds. - Weight::from_parts(407_636_014_u64, 0) - // Standard Error: 1_362 - .saturating_add(Weight::from_parts(3_352_493_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 368_280 nanoseconds. + Weight::from_parts(385_366_082_u64, 0) + // Standard Error: 1_115 + .saturating_add(Weight::from_parts(3_243_231_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -895,10 +895,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_deposit_event(r: u32, ) -> Weight { - // Minimum execution time: 373_790 nanoseconds. - Weight::from_parts(415_237_034_u64, 0) - // Standard Error: 2_609 - .saturating_add(Weight::from_parts(6_728_905_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 363_880 nanoseconds. + Weight::from_parts(384_338_686_u64, 0) + // Standard Error: 3_112 + .saturating_add(Weight::from_parts(6_524_970_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -925,12 +925,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16384]`. fn seal_deposit_event_per_topic_and_byte(t: u32, n: u32, ) -> Weight { - // Minimum execution time: 404_140 nanoseconds. - Weight::from_parts(398_862_860_u64, 0) - // Standard Error: 71_368 - .saturating_add(Weight::from_parts(4_313_576_u64, 0).saturating_mul(t as u64)) - // Standard Error: 19 - .saturating_add(Weight::from_parts(925_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 397_399 nanoseconds. + Weight::from_parts(396_112_563_u64, 0) + // Standard Error: 64_732 + .saturating_add(Weight::from_parts(3_711_249_u64, 0).saturating_mul(t as u64)) + // Standard Error: 18 + .saturating_add(Weight::from_parts(889_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -958,10 +958,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_debug_message(r: u32, ) -> Weight { - // Minimum execution time: 295_910 nanoseconds. - Weight::from_parts(307_139_225_u64, 0) - // Standard Error: 452 - .saturating_add(Weight::from_parts(272_028_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 288_800 nanoseconds. + Weight::from_parts(301_931_959_u64, 0) + // Standard Error: 475 + .saturating_add(Weight::from_parts(271_305_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -987,10 +987,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1048576]`. fn seal_debug_message_per_byte(i: u32, ) -> Weight { - // Minimum execution time: 508_860 nanoseconds. - Weight::from_parts(516_529_476_u64, 0) + // Minimum execution time: 502_230 nanoseconds. + Weight::from_parts(513_753_340_u64, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(795_u64, 0).saturating_mul(i as u64)) + .saturating_add(Weight::from_parts(799_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -998,10 +998,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_set_storage(r: u32, ) -> Weight { - // Minimum execution time: 381_690 nanoseconds. - Weight::from_parts(284_833_379_u64, 0) - // Standard Error: 10_052 - .saturating_add(Weight::from_parts(7_646_157_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 375_660 nanoseconds. + Weight::from_parts(280_976_750_u64, 0) + // Standard Error: 10_048 + .saturating_add(Weight::from_parts(7_642_380_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1011,10 +1011,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_set_storage_per_new_byte(n: u32, ) -> Weight { - // Minimum execution time: 408_420 nanoseconds. - Weight::from_parts(468_791_746_u64, 0) - // Standard Error: 76 - .saturating_add(Weight::from_parts(674_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 397_890 nanoseconds. + Weight::from_parts(459_344_849_u64, 0) + // Standard Error: 77 + .saturating_add(Weight::from_parts(789_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } @@ -1022,10 +1022,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_set_storage_per_old_byte(n: u32, ) -> Weight { - // Minimum execution time: 401_920 nanoseconds. - Weight::from_parts(411_987_932_u64, 0) - // Standard Error: 19 - .saturating_add(Weight::from_parts(279_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 394_840 nanoseconds. + Weight::from_parts(406_773_202_u64, 0) + // Standard Error: 26 + .saturating_add(Weight::from_parts(210_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1033,10 +1033,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_clear_storage(r: u32, ) -> Weight { - // Minimum execution time: 381_860 nanoseconds. - Weight::from_parts(277_903_672_u64, 0) - // Standard Error: 10_386 - .saturating_add(Weight::from_parts(7_489_935_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_190 nanoseconds. + Weight::from_parts(270_455_667_u64, 0) + // Standard Error: 10_858 + .saturating_add(Weight::from_parts(7_477_636_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1046,10 +1046,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_clear_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 402_250 nanoseconds. - Weight::from_parts(413_319_249_u64, 0) - // Standard Error: 37 - .saturating_add(Weight::from_parts(121_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 394_931 nanoseconds. + Weight::from_parts(405_341_001_u64, 0) + // Standard Error: 30 + .saturating_add(Weight::from_parts(206_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1057,10 +1057,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_get_storage(r: u32, ) -> Weight { - // Minimum execution time: 385_500 nanoseconds. - Weight::from_parts(296_620_104_u64, 0) - // Standard Error: 9_288 - .saturating_add(Weight::from_parts(6_510_875_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_500 nanoseconds. + Weight::from_parts(287_951_108_u64, 0) + // Standard Error: 9_879 + .saturating_add(Weight::from_parts(6_472_339_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1069,10 +1069,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_get_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 403_240 nanoseconds. - Weight::from_parts(412_260_846_u64, 0) - // Standard Error: 37 - .saturating_add(Weight::from_parts(757_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 394_331 nanoseconds. + Weight::from_parts(404_613_644_u64, 0) + // Standard Error: 32 + .saturating_add(Weight::from_parts(895_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1080,10 +1080,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_contains_storage(r: u32, ) -> Weight { - // Minimum execution time: 381_100 nanoseconds. - Weight::from_parts(294_772_496_u64, 0) - // Standard Error: 9_372 - .saturating_add(Weight::from_parts(6_171_330_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_650 nanoseconds. + Weight::from_parts(288_325_637_u64, 0) + // Standard Error: 9_568 + .saturating_add(Weight::from_parts(6_211_071_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1092,10 +1092,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_contains_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 401_310 nanoseconds. - Weight::from_parts(410_430_495_u64, 0) - // Standard Error: 32 - .saturating_add(Weight::from_parts(202_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 390_160 nanoseconds. + Weight::from_parts(401_269_326_u64, 0) + // Standard Error: 25 + .saturating_add(Weight::from_parts(398_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1103,10 +1103,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_take_storage(r: u32, ) -> Weight { - // Minimum execution time: 378_660 nanoseconds. - Weight::from_parts(275_604_513_u64, 0) - // Standard Error: 10_842 - .saturating_add(Weight::from_parts(7_777_716_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_710 nanoseconds. + Weight::from_parts(270_803_877_u64, 0) + // Standard Error: 10_784 + .saturating_add(Weight::from_parts(7_711_804_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1116,10 +1116,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 16384]`. fn seal_take_storage_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 404_750 nanoseconds. - Weight::from_parts(414_406_039_u64, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(846_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 395_500 nanoseconds. + Weight::from_parts(407_903_516_u64, 0) + // Standard Error: 32 + .saturating_add(Weight::from_parts(830_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1145,10 +1145,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_transfer(r: u32, ) -> Weight { - // Minimum execution time: 381_350 nanoseconds. - Weight::from_parts(323_648_256_u64, 0) - // Standard Error: 19_097 - .saturating_add(Weight::from_parts(68_412_115_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_740 nanoseconds. + Weight::from_parts(253_987_620_u64, 0) + // Standard Error: 15_263 + .saturating_add(Weight::from_parts(65_898_465_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1176,10 +1176,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { - // Minimum execution time: 384_360 nanoseconds. - Weight::from_parts(389_720_000_u64, 0) - // Standard Error: 75_371 - .saturating_add(Weight::from_parts(332_724_354_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 374_730 nanoseconds. + Weight::from_parts(379_970_000_u64, 0) + // Standard Error: 93_934 + .saturating_add(Weight::from_parts(329_615_606_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1207,10 +1207,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_delegate_call(r: u32, ) -> Weight { - // Minimum execution time: 382_640 nanoseconds. - Weight::from_parts(387_760_000_u64, 0) - // Standard Error: 108_064 - .saturating_add(Weight::from_parts(325_372_016_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 376_990 nanoseconds. + Weight::from_parts(383_120_000_u64, 0) + // Standard Error: 120_648 + .saturating_add(Weight::from_parts(320_214_826_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1239,12 +1239,12 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { - // Minimum execution time: 698_770 nanoseconds. - Weight::from_parts(636_373_395_u64, 0) - // Standard Error: 486_016 - .saturating_add(Weight::from_parts(72_976_113_u64, 0).saturating_mul(t as u64)) + // Minimum execution time: 689_780 nanoseconds. + Weight::from_parts(629_524_808_u64, 0) + // Standard Error: 485_263 + .saturating_add(Weight::from_parts(68_458_700_u64, 0).saturating_mul(t as u64)) // Standard Error: 0 - .saturating_add(Weight::from_parts(583_u64, 0).saturating_mul(c as u64)) + .saturating_add(Weight::from_parts(580_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(7_u64)) @@ -1276,10 +1276,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { - // Minimum execution time: 945_000 nanoseconds. - Weight::from_parts(948_450_000_u64, 0) - // Standard Error: 246_205 - .saturating_add(Weight::from_parts(564_340_692_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 922_601 nanoseconds. + Weight::from_parts(931_840_000_u64, 0) + // Standard Error: 246_090 + .saturating_add(Weight::from_parts(556_769_723_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(8_u64)) @@ -1313,14 +1313,14 @@ impl pallet_contracts::weights::WeightInfo for WeightIn /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_556_310 nanoseconds. - Weight::from_parts(779_804_090_u64, 0) - // Standard Error: 4_580_135 - .saturating_add(Weight::from_parts(117_155_943_u64, 0).saturating_mul(t as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_721_u64, 0).saturating_mul(i as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_782_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 2_554_499 nanoseconds. + Weight::from_parts(758_408_139_u64, 0) + // Standard Error: 5_192_913 + .saturating_add(Weight::from_parts(109_892_135_u64, 0).saturating_mul(t as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_736_u64, 0).saturating_mul(i as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_803_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(18_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t as u64))) .saturating_add(T::DbWeight::get().writes(12_u64)) @@ -1348,10 +1348,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { - // Minimum execution time: 373_830 nanoseconds. - Weight::from_parts(390_280_556_u64, 0) - // Standard Error: 589 - .saturating_add(Weight::from_parts(543_953_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 366_250 nanoseconds. + Weight::from_parts(379_045_917_u64, 0) + // Standard Error: 483 + .saturating_add(Weight::from_parts(555_800_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1377,10 +1377,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_sha2_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 379_300 nanoseconds. - Weight::from_parts(383_418_823_u64, 0) + // Minimum execution time: 374_200 nanoseconds. + Weight::from_parts(373_839_572_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_123_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(1_133_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1406,10 +1406,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { - // Minimum execution time: 376_130 nanoseconds. - Weight::from_parts(387_840_387_u64, 0) - // Standard Error: 504 - .saturating_add(Weight::from_parts(906_203_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 366_110 nanoseconds. + Weight::from_parts(380_453_810_u64, 0) + // Standard Error: 480 + .saturating_add(Weight::from_parts(920_904_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1435,10 +1435,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 379_889 nanoseconds. - Weight::from_parts(383_169_141_u64, 0) + // Minimum execution time: 369_490 nanoseconds. + Weight::from_parts(374_405_028_u64, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(3_254_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(3_188_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1464,10 +1464,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { - // Minimum execution time: 375_300 nanoseconds. - Weight::from_parts(386_141_509_u64, 0) - // Standard Error: 432 - .saturating_add(Weight::from_parts(628_420_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 367_140 nanoseconds. + Weight::from_parts(379_122_822_u64, 0) + // Standard Error: 523 + .saturating_add(Weight::from_parts(616_752_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1493,10 +1493,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 376_660 nanoseconds. - Weight::from_parts(383_630_643_u64, 0) + // Minimum execution time: 373_131 nanoseconds. + Weight::from_parts(375_161_073_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(1_458_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(1_461_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1522,10 +1522,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { - // Minimum execution time: 378_990 nanoseconds. - Weight::from_parts(389_160_380_u64, 0) - // Standard Error: 460 - .saturating_add(Weight::from_parts(623_960_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 367_480 nanoseconds. + Weight::from_parts(380_120_608_u64, 0) + // Standard Error: 442 + .saturating_add(Weight::from_parts(636_187_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1551,10 +1551,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 378_340 nanoseconds. - Weight::from_parts(381_284_849_u64, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(1_461_u64, 0).saturating_mul(n as u64)) + // Minimum execution time: 371_050 nanoseconds. + Weight::from_parts(371_934_565_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_476_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1580,10 +1580,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { - // Minimum execution time: 454_040 nanoseconds. - Weight::from_parts(464_620_092_u64, 0) + // Minimum execution time: 443_150 nanoseconds. + Weight::from_parts(456_103_291_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(6_016_u64, 0).saturating_mul(n as u64)) + .saturating_add(Weight::from_parts(6_051_u64, 0).saturating_mul(n as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1609,10 +1609,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { - // Minimum execution time: 382_790 nanoseconds. - Weight::from_parts(409_201_580_u64, 0) - // Standard Error: 7_414 - .saturating_add(Weight::from_parts(59_300_752_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 369_000 nanoseconds. + Weight::from_parts(416_837_065_u64, 0) + // Standard Error: 13_989 + .saturating_add(Weight::from_parts(59_437_946_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1638,10 +1638,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { - // Minimum execution time: 384_460 nanoseconds. - Weight::from_parts(408_702_777_u64, 0) - // Standard Error: 10_849 - .saturating_add(Weight::from_parts(43_021_782_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 373_980 nanoseconds. + Weight::from_parts(393_380_984_u64, 0) + // Standard Error: 12_067 + .saturating_add(Weight::from_parts(43_415_782_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1667,10 +1667,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { - // Minimum execution time: 380_990 nanoseconds. - Weight::from_parts(397_850_988_u64, 0) - // Standard Error: 4_740 - .saturating_add(Weight::from_parts(11_231_123_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 374_260 nanoseconds. + Weight::from_parts(392_590_064_u64, 0) + // Standard Error: 5_043 + .saturating_add(Weight::from_parts(11_218_539_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1698,10 +1698,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_set_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 378_909 nanoseconds. - Weight::from_parts(384_580_000_u64, 0) - // Standard Error: 37_730 - .saturating_add(Weight::from_parts(33_035_152_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 371_430 nanoseconds. + Weight::from_parts(378_380_000_u64, 0) + // Standard Error: 39_109 + .saturating_add(Weight::from_parts(32_408_848_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r as u64))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1729,10 +1729,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 373_540 nanoseconds. - Weight::from_parts(385_732_270_u64, 0) - // Standard Error: 324 - .saturating_add(Weight::from_parts(184_891_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 369_860 nanoseconds. + Weight::from_parts(379_060_078_u64, 0) + // Standard Error: 279 + .saturating_add(Weight::from_parts(182_728_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1758,10 +1758,10 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 378_910 nanoseconds. - Weight::from_parts(415_049_910_u64, 0) - // Standard Error: 597 - .saturating_add(Weight::from_parts(267_223_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 372_410 nanoseconds. + Weight::from_parts(406_827_095_u64, 0) + // Standard Error: 690 + .saturating_add(Weight::from_parts(271_882_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1789,368 +1789,368 @@ impl pallet_contracts::weights::WeightInfo for WeightIn // Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 1600]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { - // Minimum execution time: 372_170 nanoseconds. - Weight::from_parts(388_538_543_u64, 0) - // Standard Error: 291 - .saturating_add(Weight::from_parts(154_183_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 365_120 nanoseconds. + Weight::from_parts(384_106_854_u64, 0) + // Standard Error: 258 + .saturating_add(Weight::from_parts(159_064_u64, 0).saturating_mul(r as u64)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64const(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_646_731_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(4_044_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_180 nanoseconds. + Weight::from_parts(3_514_006_u64, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(4_713_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { - // Minimum execution time: 3_480 nanoseconds. - Weight::from_parts(4_266_521_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_386_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_460 nanoseconds. + Weight::from_parts(4_110_796_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(7_635_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { - // Minimum execution time: 3_410 nanoseconds. - Weight::from_parts(4_170_766_u64, 0) + // Minimum execution time: 3_480 nanoseconds. + Weight::from_parts(4_096_627_u64, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(7_971_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(7_937_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { - // Minimum execution time: 3_080 nanoseconds. - Weight::from_parts(3_765_913_u64, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(10_784_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_180 nanoseconds. + Weight::from_parts(3_726_442_u64, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(10_744_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { - // Minimum execution time: 3_070 nanoseconds. - Weight::from_parts(4_505_185_u64, 0) - // Standard Error: 145 - .saturating_add(Weight::from_parts(19_203_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_180 nanoseconds. + Weight::from_parts(2_719_104_u64, 0) + // Standard Error: 67 + .saturating_add(Weight::from_parts(16_223_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(4_124_079_u64, 0) - // Standard Error: 11 - .saturating_add(Weight::from_parts(6_791_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_220 nanoseconds. + Weight::from_parts(3_813_823_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(6_199_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(4_131_779_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_780_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_130 nanoseconds. + Weight::from_parts(3_918_458_u64, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(9_644_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { - // Minimum execution time: 3_069 nanoseconds. - Weight::from_parts(4_195_873_u64, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(11_397_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_916_320_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(10_814_u64, 0).saturating_mul(r as u64)) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Minimum execution time: 3_230 nanoseconds. - Weight::from_parts(3_544_771_u64, 0) - // Standard Error: 35 - .saturating_add(Weight::from_parts(144_u64, 0).saturating_mul(e as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_522_554_u64, 0) + // Standard Error: 41 + .saturating_add(Weight::from_parts(139_u64, 0).saturating_mul(e as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { - // Minimum execution time: 3_220 nanoseconds. - Weight::from_parts(3_585_496_u64, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(18_843_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_140 nanoseconds. + Weight::from_parts(3_596_412_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(18_364_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { - // Minimum execution time: 3_900 nanoseconds. - Weight::from_parts(5_709_266_u64, 0) - // Standard Error: 32 - .saturating_add(Weight::from_parts(26_985_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_820 nanoseconds. + Weight::from_parts(6_115_499_u64, 0) + // Standard Error: 27 + .saturating_add(Weight::from_parts(26_974_u64, 0).saturating_mul(r as u64)) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { - // Minimum execution time: 3_240 nanoseconds. - Weight::from_parts(3_658_358_u64, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(1_536_u64, 0).saturating_mul(l as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_791_512_u64, 0) + // Standard Error: 25 + .saturating_add(Weight::from_parts(1_524_u64, 0).saturating_mul(l as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { - // Minimum execution time: 4_830 nanoseconds. - Weight::from_parts(5_052_492_u64, 0) - // Standard Error: 31 - .saturating_add(Weight::from_parts(20_838_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_860 nanoseconds. + Weight::from_parts(6_814_803_u64, 0) + // Standard Error: 306 + .saturating_add(Weight::from_parts(18_111_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { - // Minimum execution time: 4_830 nanoseconds. - Weight::from_parts(5_110_722_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(3_913_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_910 nanoseconds. + Weight::from_parts(5_295_259_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(3_874_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { - // Minimum execution time: 4_760 nanoseconds. - Weight::from_parts(5_482_586_u64, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(6_216_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 4_930 nanoseconds. + Weight::from_parts(5_354_160_u64, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(6_056_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { - // Minimum execution time: 3_480 nanoseconds. - Weight::from_parts(4_105_054_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_978_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_520 nanoseconds. + Weight::from_parts(4_146_314_u64, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(9_776_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { - // Minimum execution time: 3_490 nanoseconds. - Weight::from_parts(4_001_987_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(9_851_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_520 nanoseconds. + Weight::from_parts(4_160_597_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(9_412_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { - // Minimum execution time: 3_420 nanoseconds. - Weight::from_parts(3_925_654_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(5_118_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_390 nanoseconds. + Weight::from_parts(3_856_629_u64, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(6_638_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { - // Minimum execution time: 3_260 nanoseconds. - Weight::from_parts(1_641_524_u64, 0) - // Standard Error: 176_303 - .saturating_add(Weight::from_parts(16_155_407_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_360 nanoseconds. + Weight::from_parts(1_711_461_u64, 0) + // Standard Error: 174_877 + .saturating_add(Weight::from_parts(16_238_305_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { - // Minimum execution time: 3_080 nanoseconds. - Weight::from_parts(3_642_905_u64, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(6_074_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_602_552_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_158_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_696_251_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(6_340_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_090 nanoseconds. + Weight::from_parts(3_563_178_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(6_183_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(3_636_177_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_356_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_250 nanoseconds. + Weight::from_parts(3_639_813_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_876_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { - // Minimum execution time: 3_091 nanoseconds. - Weight::from_parts(3_659_253_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(6_584_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_623_448_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_879_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { - // Minimum execution time: 3_110 nanoseconds. - Weight::from_parts(3_613_892_u64, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(6_360_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_260 nanoseconds. + Weight::from_parts(3_583_550_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_861_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { - // Minimum execution time: 3_129 nanoseconds. - Weight::from_parts(3_639_176_u64, 0) + // Minimum execution time: 3_220 nanoseconds. + Weight::from_parts(3_697_325_u64, 0) // Standard Error: 7 - .saturating_add(Weight::from_parts(6_376_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(5_808_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Minimum execution time: 3_140 nanoseconds. - Weight::from_parts(3_702_983_u64, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(6_349_u64, 0).saturating_mul(r as u64)) + Weight::from_parts(3_616_431_u64, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_847_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_703_537_u64, 0) + // Minimum execution time: 3_210 nanoseconds. + Weight::from_parts(3_703_546_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(8_663_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_427_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { - // Minimum execution time: 3_130 nanoseconds. - Weight::from_parts(3_673_460_u64, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(8_694_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_607_717_u64, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(8_775_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { - // Minimum execution time: 3_180 nanoseconds. - Weight::from_parts(3_733_086_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_644_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_240 nanoseconds. + Weight::from_parts(3_757_682_u64, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(8_457_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { - // Minimum execution time: 3_250 nanoseconds. - Weight::from_parts(3_726_184_u64, 0) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_807_591_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(8_657_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_430_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_758_014_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_623_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_130 nanoseconds. + Weight::from_parts(3_666_363_u64, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(8_441_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_809_755_u64, 0) + // Minimum execution time: 3_220 nanoseconds. + Weight::from_parts(3_778_804_u64, 0) // Standard Error: 10 - .saturating_add(Weight::from_parts(8_591_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_443_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { - // Minimum execution time: 3_180 nanoseconds. - Weight::from_parts(3_729_222_u64, 0) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_634_946_u64, 0) // Standard Error: 9 - .saturating_add(Weight::from_parts(8_658_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_470_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { - // Minimum execution time: 3_040 nanoseconds. - Weight::from_parts(3_707_227_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_930_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_210 nanoseconds. + Weight::from_parts(3_720_472_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_443_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { - // Minimum execution time: 3_090 nanoseconds. - Weight::from_parts(3_709_248_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(8_661_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_260 nanoseconds. + Weight::from_parts(3_684_691_u64, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(8_440_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { - // Minimum execution time: 3_190 nanoseconds. - Weight::from_parts(3_689_326_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_952_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_229 nanoseconds. + Weight::from_parts(3_838_125_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(8_403_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_736_984_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(8_640_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_230 nanoseconds. + Weight::from_parts(3_673_869_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(8_464_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_794_381_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_592_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_120 nanoseconds. + Weight::from_parts(3_625_528_u64, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(8_750_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { - // Minimum execution time: 3_091 nanoseconds. - Weight::from_parts(3_784_335_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_584_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_171 nanoseconds. + Weight::from_parts(3_759_935_u64, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(8_454_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { - // Minimum execution time: 3_100 nanoseconds. - Weight::from_parts(3_685_184_u64, 0) - // Standard Error: 15 - .saturating_add(Weight::from_parts(9_822_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_130 nanoseconds. + Weight::from_parts(3_577_789_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(9_676_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { - // Minimum execution time: 3_149 nanoseconds. - Weight::from_parts(3_775_067_u64, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(9_231_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_210 nanoseconds. + Weight::from_parts(3_743_523_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(9_348_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { - // Minimum execution time: 3_140 nanoseconds. - Weight::from_parts(3_718_663_u64, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(9_803_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_210 nanoseconds. + Weight::from_parts(3_684_116_u64, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(9_393_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { - // Minimum execution time: 3_070 nanoseconds. - Weight::from_parts(3_690_845_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(9_277_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_160 nanoseconds. + Weight::from_parts(3_558_907_u64, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(9_427_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Minimum execution time: 3_120 nanoseconds. - Weight::from_parts(3_752_404_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_619_u64, 0).saturating_mul(r as u64)) + Weight::from_parts(3_714_002_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(8_161_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { - // Minimum execution time: 3_170 nanoseconds. - Weight::from_parts(3_799_900_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(8_633_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_240 nanoseconds. + Weight::from_parts(3_687_561_u64, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(8_479_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { - // Minimum execution time: 3_150 nanoseconds. - Weight::from_parts(3_766_677_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_635_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_200 nanoseconds. + Weight::from_parts(3_685_542_u64, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(8_460_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_820_262_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_586_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_230 nanoseconds. + Weight::from_parts(3_732_592_u64, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(8_511_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { - // Minimum execution time: 3_160 nanoseconds. - Weight::from_parts(3_752_578_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_626_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_807_430_u64, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(8_312_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { - // Minimum execution time: 3_090 nanoseconds. - Weight::from_parts(3_743_029_u64, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(8_359_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_170 nanoseconds. + Weight::from_parts(3_688_491_u64, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(8_458_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { - // Minimum execution time: 3_030 nanoseconds. - Weight::from_parts(3_675_945_u64, 0) + // Minimum execution time: 3_240 nanoseconds. + Weight::from_parts(3_743_457_u64, 0) // Standard Error: 10 - .saturating_add(Weight::from_parts(8_666_u64, 0).saturating_mul(r as u64)) + .saturating_add(Weight::from_parts(8_491_u64, 0).saturating_mul(r as u64)) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { - // Minimum execution time: 3_200 nanoseconds. - Weight::from_parts(3_786_935_u64, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(8_622_u64, 0).saturating_mul(r as u64)) + // Minimum execution time: 3_190 nanoseconds. + Weight::from_parts(3_780_045_u64, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(8_468_u64, 0).saturating_mul(r as u64)) } } diff --git a/runtimes/eden/src/weights/pallet_membership.rs b/runtimes/eden/src/weights/pallet_membership.rs index 4bfba54d884..062cfe73fd2 100644 --- a/runtimes/eden/src/weights/pallet_membership.rs +++ b/runtimes/eden/src/weights/pallet_membership.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -65,10 +65,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 49]`. fn add_member(m: u32, ) -> Weight { - // Minimum execution time: 26_560 nanoseconds. - Weight::from_parts(27_820_234_u64, 0) - // Standard Error: 1_157 - .saturating_add(Weight::from_parts(62_927_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 26_550 nanoseconds. + Weight::from_parts(27_691_405_u64, 0) + // Standard Error: 1_637 + .saturating_add(Weight::from_parts(65_684_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -92,10 +92,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 50]`. fn remove_member(m: u32, ) -> Weight { - // Minimum execution time: 30_000 nanoseconds. - Weight::from_parts(31_757_245_u64, 0) - // Standard Error: 1_677 - .saturating_add(Weight::from_parts(53_811_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 30_190 nanoseconds. + Weight::from_parts(31_827_696_u64, 0) + // Standard Error: 1_726 + .saturating_add(Weight::from_parts(52_763_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -119,10 +119,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[2, 50]`. fn swap_member(m: u32, ) -> Weight { - // Minimum execution time: 30_440 nanoseconds. - Weight::from_parts(32_045_233_u64, 0) - // Standard Error: 2_265 - .saturating_add(Weight::from_parts(77_954_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 30_370 nanoseconds. + Weight::from_parts(31_865_251_u64, 0) + // Standard Error: 2_095 + .saturating_add(Weight::from_parts(81_624_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -146,10 +146,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn reset_member(m: u32, ) -> Weight { - // Minimum execution time: 30_290 nanoseconds. - Weight::from_parts(32_319_847_u64, 0) - // Standard Error: 2_349 - .saturating_add(Weight::from_parts(224_187_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 29_970 nanoseconds. + Weight::from_parts(32_476_272_u64, 0) + // Standard Error: 2_284 + .saturating_add(Weight::from_parts(217_402_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -173,10 +173,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn change_key(m: u32, ) -> Weight { - // Minimum execution time: 31_160 nanoseconds. - Weight::from_parts(33_213_913_u64, 0) - // Standard Error: 3_032 - .saturating_add(Weight::from_parts(78_812_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 31_291 nanoseconds. + Weight::from_parts(33_141_744_u64, 0) + // Standard Error: 1_808 + .saturating_add(Weight::from_parts(79_699_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -188,10 +188,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn set_prime(m: u32, ) -> Weight { - // Minimum execution time: 11_280 nanoseconds. - Weight::from_parts(11_880_846_u64, 0) - // Standard Error: 525 - .saturating_add(Weight::from_parts(9_314_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 11_329 nanoseconds. + Weight::from_parts(11_818_840_u64, 0) + // Standard Error: 620 + .saturating_add(Weight::from_parts(9_539_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -201,10 +201,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `m` is `[1, 50]`. fn clear_prime(m: u32, ) -> Weight { - // Minimum execution time: 5_300 nanoseconds. - Weight::from_parts(5_689_917_u64, 0) - // Standard Error: 334 - .saturating_add(Weight::from_parts(2_827_u64, 0).saturating_mul(m as u64)) + // Minimum execution time: 5_200 nanoseconds. + Weight::from_parts(5_573_115_u64, 0) + // Standard Error: 335 + .saturating_add(Weight::from_parts(2_637_u64, 0).saturating_mul(m as u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } } diff --git a/runtimes/eden/src/weights/pallet_multisig.rs b/runtimes/eden/src/weights/pallet_multisig.rs index a4709a3c0f4..8ed484240ed 100644 --- a/runtimes/eden/src/weights/pallet_multisig.rs +++ b/runtimes/eden/src/weights/pallet_multisig.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -49,10 +49,10 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(z: u32, ) -> Weight { - // Minimum execution time: 17_980 nanoseconds. - Weight::from_parts(19_226_063_u64, 0) + // Minimum execution time: 18_200 nanoseconds. + Weight::from_parts(19_043_053_u64, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(438_u64, 0).saturating_mul(z as u64)) + .saturating_add(Weight::from_parts(462_u64, 0).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen) @@ -67,12 +67,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 68_560 nanoseconds. - Weight::from_parts(61_704_653_u64, 0) - // Standard Error: 1_106 - .saturating_add(Weight::from_parts(92_028_u64, 0).saturating_mul(s as u64)) - // Standard Error: 10 - .saturating_add(Weight::from_parts(1_389_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 67_490 nanoseconds. + Weight::from_parts(59_776_179_u64, 0) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(97_156_u64, 0).saturating_mul(s as u64)) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_464_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -89,12 +89,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[3, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 42_740 nanoseconds. - Weight::from_parts(36_010_226_u64, 0) - // Standard Error: 813 - .saturating_add(Weight::from_parts(79_569_u64, 0).saturating_mul(s as u64)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_393_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 41_430 nanoseconds. + Weight::from_parts(35_467_346_u64, 0) + // Standard Error: 818 + .saturating_add(Weight::from_parts(81_006_u64, 0).saturating_mul(s as u64)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_398_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -113,12 +113,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 76_200 nanoseconds. - Weight::from_parts(66_188_610_u64, 0) - // Standard Error: 1_246 - .saturating_add(Weight::from_parts(119_610_u64, 0).saturating_mul(s as u64)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_476_u64, 0).saturating_mul(z as u64)) + // Minimum execution time: 74_910 nanoseconds. + Weight::from_parts(65_333_794_u64, 0) + // Standard Error: 1_655 + .saturating_add(Weight::from_parts(121_122_u64, 0).saturating_mul(s as u64)) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_488_u64, 0).saturating_mul(z as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -134,10 +134,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { - // Minimum execution time: 56_630 nanoseconds. - Weight::from_parts(58_945_224_u64, 0) - // Standard Error: 1_076 - .saturating_add(Weight::from_parts(97_044_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 55_490 nanoseconds. + Weight::from_parts(57_850_097_u64, 0) + // Standard Error: 1_577 + .saturating_add(Weight::from_parts(101_783_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -153,10 +153,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn approve_as_multi_approve(s: u32, ) -> Weight { - // Minimum execution time: 32_670 nanoseconds. - Weight::from_parts(33_530_453_u64, 0) - // Standard Error: 648 - .saturating_add(Weight::from_parts(79_949_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 31_700 nanoseconds. + Weight::from_parts(33_323_232_u64, 0) + // Standard Error: 1_098 + .saturating_add(Weight::from_parts(78_924_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -172,10 +172,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { - // Minimum execution time: 57_920 nanoseconds. - Weight::from_parts(59_844_460_u64, 0) - // Standard Error: 1_405 - .saturating_add(Weight::from_parts(86_409_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 57_090 nanoseconds. + Weight::from_parts(59_337_417_u64, 0) + // Standard Error: 1_477 + .saturating_add(Weight::from_parts(84_223_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } diff --git a/runtimes/eden/src/weights/pallet_preimage.rs b/runtimes/eden/src/weights/pallet_preimage.rs index 3f3a12f84e4..56255e547d8 100644 --- a/runtimes/eden/src/weights/pallet_preimage.rs +++ b/runtimes/eden/src/weights/pallet_preimage.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -61,10 +61,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - // Minimum execution time: 52_020 nanoseconds. - Weight::from_parts(42_445_488_u64, 0) + // Minimum execution time: 51_610 nanoseconds. + Weight::from_parts(36_558_340_u64, 0) // Standard Error: 8 - .saturating_add(Weight::from_parts(2_085_u64, 0).saturating_mul(s as u64)) + .saturating_add(Weight::from_parts(2_119_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -82,10 +82,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - // Minimum execution time: 27_970 nanoseconds. - Weight::from_parts(28_880_000_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_103_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 28_230 nanoseconds. + Weight::from_parts(51_613_927_u64, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(2_089_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -103,10 +103,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - // Minimum execution time: 27_389 nanoseconds. - Weight::from_parts(27_891_000_u64, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(2_113_u64, 0).saturating_mul(s as u64)) + // Minimum execution time: 26_240 nanoseconds. + Weight::from_parts(29_324_449_u64, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(2_109_u64, 0).saturating_mul(s as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -123,8 +123,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_preimage() -> Weight { - // Minimum execution time: 58_540 nanoseconds. - Weight::from_parts(60_390_000_u64, 0) + // Minimum execution time: 57_820 nanoseconds. + Weight::from_parts(59_720_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -141,8 +141,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unnote_no_deposit_preimage() -> Weight { - // Minimum execution time: 33_100 nanoseconds. - Weight::from_parts(33_980_000_u64, 0) + // Minimum execution time: 32_840 nanoseconds. + Weight::from_parts(34_450_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -157,16 +157,16 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn request_preimage() -> Weight { - // Minimum execution time: 29_371 nanoseconds. - Weight::from_parts(30_110_000_u64, 0) + // Minimum execution time: 29_060 nanoseconds. + Weight::from_parts(29_651_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_no_deposit_preimage() -> Weight { - // Minimum execution time: 16_240 nanoseconds. - Weight::from_parts(16_810_000_u64, 0) + // Minimum execution time: 16_110 nanoseconds. + Weight::from_parts(16_910_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -181,16 +181,16 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn request_unnoted_preimage() -> Weight { - // Minimum execution time: 25_120 nanoseconds. - Weight::from_parts(25_780_000_u64, 0) + // Minimum execution time: 24_500 nanoseconds. + Weight::from_parts(25_260_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn request_requested_preimage() -> Weight { - // Minimum execution time: 13_829 nanoseconds. - Weight::from_parts(14_160_000_u64, 0) + // Minimum execution time: 13_690 nanoseconds. + Weight::from_parts(14_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -207,24 +207,24 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage PreimageFor (r:0 w:1) // Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) fn unrequest_preimage() -> Weight { - // Minimum execution time: 30_600 nanoseconds. - Weight::from_parts(31_700_000_u64, 0) + // Minimum execution time: 31_130 nanoseconds. + Weight::from_parts(32_230_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_unnoted_preimage() -> Weight { - // Minimum execution time: 13_290 nanoseconds. - Weight::from_parts(13_769_000_u64, 0) + // Minimum execution time: 13_380 nanoseconds. + Weight::from_parts(13_751_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) fn unrequest_multi_referenced_preimage() -> Weight { - // Minimum execution time: 13_580 nanoseconds. - Weight::from_parts(13_970_000_u64, 0) + // Minimum execution time: 13_240 nanoseconds. + Weight::from_parts(13_670_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } diff --git a/runtimes/eden/src/weights/pallet_timestamp.rs b/runtimes/eden/src/weights/pallet_timestamp.rs index efe95e4a96f..c8b0fc68feb 100644 --- a/runtimes/eden/src/weights/pallet_timestamp.rs +++ b/runtimes/eden/src/weights/pallet_timestamp.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -50,13 +50,13 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) // Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) fn set() -> Weight { - // Minimum execution time: 11_250 nanoseconds. - Weight::from_parts(11_770_000_u64, 0) + // Minimum execution time: 10_750 nanoseconds. + Weight::from_parts(11_420_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn on_finalize() -> Weight { - // Minimum execution time: 6_310 nanoseconds. - Weight::from_parts(6_470_000_u64, 0) + // Minimum execution time: 6_160 nanoseconds. + Weight::from_parts(6_410_000_u64, 0) } } diff --git a/runtimes/eden/src/weights/pallet_uniques.rs b/runtimes/eden/src/weights/pallet_uniques.rs index 94353d2b537..bcca3db6b16 100644 --- a/runtimes/eden/src/weights/pallet_uniques.rs +++ b/runtimes/eden/src/weights/pallet_uniques.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_uniques //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn create() -> Weight { - // Minimum execution time: 50_870 nanoseconds. - Weight::from_parts(51_951_000_u64, 0) + // Minimum execution time: 50_640 nanoseconds. + Weight::from_parts(51_400_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -78,8 +78,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_create() -> Weight { - // Minimum execution time: 25_160 nanoseconds. - Weight::from_parts(25_870_000_u64, 0) + // Minimum execution time: 25_220 nanoseconds. + Weight::from_parts(25_760_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -111,14 +111,14 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { - // Minimum execution time: 2_823_130 nanoseconds. - Weight::from_parts(2_843_460_000_u64, 0) - // Standard Error: 25_391 - .saturating_add(Weight::from_parts(10_271_855_u64, 0).saturating_mul(n as u64)) - // Standard Error: 25_391 - .saturating_add(Weight::from_parts(253_681_u64, 0).saturating_mul(m as u64)) - // Standard Error: 25_391 - .saturating_add(Weight::from_parts(329_868_u64, 0).saturating_mul(a as u64)) + // Minimum execution time: 2_873_440 nanoseconds. + Weight::from_parts(2_891_970_000_u64, 0) + // Standard Error: 26_239 + .saturating_add(Weight::from_parts(10_148_597_u64, 0).saturating_mul(n as u64)) + // Standard Error: 26_239 + .saturating_add(Weight::from_parts(262_920_u64, 0).saturating_mul(m as u64)) + // Standard Error: 26_239 + .saturating_add(Weight::from_parts(286_773_u64, 0).saturating_mul(a as u64)) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n as u64))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m as u64))) @@ -145,8 +145,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques Account (r:0 w:1) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn mint() -> Weight { - // Minimum execution time: 62_270 nanoseconds. - Weight::from_parts(63_250_000_u64, 0) + // Minimum execution time: 60_820 nanoseconds. + Weight::from_parts(62_840_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -167,8 +167,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn burn() -> Weight { - // Minimum execution time: 63_720 nanoseconds. - Weight::from_parts(65_230_000_u64, 0) + // Minimum execution time: 63_340 nanoseconds. + Weight::from_parts(64_350_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -189,8 +189,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn transfer() -> Weight { - // Minimum execution time: 44_900 nanoseconds. - Weight::from_parts(45_650_000_u64, 0) + // Minimum execution time: 43_890 nanoseconds. + Weight::from_parts(44_930_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -208,10 +208,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { - // Minimum execution time: 24_290 nanoseconds. - Weight::from_parts(24_920_000_u64, 0) - // Standard Error: 15_832 - .saturating_add(Weight::from_parts(27_964_005_u64, 0).saturating_mul(i as u64)) + // Minimum execution time: 24_009 nanoseconds. + Weight::from_parts(24_469_000_u64, 0) + // Standard Error: 14_190 + .saturating_add(Weight::from_parts(27_598_031_u64, 0).saturating_mul(i as u64)) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i as u64))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -230,8 +230,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze() -> Weight { - // Minimum execution time: 30_420 nanoseconds. - Weight::from_parts(31_170_000_u64, 0) + // Minimum execution time: 30_260 nanoseconds. + Weight::from_parts(30_890_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -248,8 +248,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw() -> Weight { - // Minimum execution time: 30_071 nanoseconds. - Weight::from_parts(30_680_000_u64, 0) + // Minimum execution time: 29_780 nanoseconds. + Weight::from_parts(30_390_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -264,8 +264,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn freeze_collection() -> Weight { - // Minimum execution time: 22_340 nanoseconds. - Weight::from_parts(23_210_000_u64, 0) + // Minimum execution time: 22_040 nanoseconds. + Weight::from_parts(22_300_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -280,8 +280,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn thaw_collection() -> Weight { - // Minimum execution time: 22_630 nanoseconds. - Weight::from_parts(23_130_000_u64, 0) + // Minimum execution time: 22_020 nanoseconds. + Weight::from_parts(22_860_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -300,8 +300,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:2) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { - // Minimum execution time: 35_560 nanoseconds. - Weight::from_parts(36_410_000_u64, 0) + // Minimum execution time: 35_250 nanoseconds. + Weight::from_parts(35_920_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -316,8 +316,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_team() -> Weight { - // Minimum execution time: 23_510 nanoseconds. - Weight::from_parts(24_340_000_u64, 0) + // Minimum execution time: 22_810 nanoseconds. + Weight::from_parts(23_570_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -334,8 +334,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ClassAccount (r:0 w:1) // Proof: SubstrateUniques ClassAccount (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen) fn force_item_status() -> Weight { - // Minimum execution time: 27_460 nanoseconds. - Weight::from_parts(28_380_000_u64, 0) + // Minimum execution time: 27_120 nanoseconds. + Weight::from_parts(27_680_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -354,8 +354,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_attribute() -> Weight { - // Minimum execution time: 68_530 nanoseconds. - Weight::from_parts(69_920_000_u64, 0) + // Minimum execution time: 67_230 nanoseconds. + Weight::from_parts(68_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -374,8 +374,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_attribute() -> Weight { - // Minimum execution time: 63_430 nanoseconds. - Weight::from_parts(64_770_000_u64, 0) + // Minimum execution time: 62_110 nanoseconds. + Weight::from_parts(63_690_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -392,8 +392,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_metadata() -> Weight { - // Minimum execution time: 50_840 nanoseconds. - Weight::from_parts(52_040_000_u64, 0) + // Minimum execution time: 50_330 nanoseconds. + Weight::from_parts(51_490_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -410,8 +410,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_metadata() -> Weight { - // Minimum execution time: 52_040 nanoseconds. - Weight::from_parts(53_350_000_u64, 0) + // Minimum execution time: 51_380 nanoseconds. + Weight::from_parts(52_480_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -428,8 +428,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_metadata() -> Weight { - // Minimum execution time: 53_610 nanoseconds. - Weight::from_parts(54_380_000_u64, 0) + // Minimum execution time: 52_990 nanoseconds. + Weight::from_parts(53_900_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -446,8 +446,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn clear_collection_metadata() -> Weight { - // Minimum execution time: 50_980 nanoseconds. - Weight::from_parts(52_360_000_u64, 0) + // Minimum execution time: 50_470 nanoseconds. + Weight::from_parts(51_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -464,8 +464,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn approve_transfer() -> Weight { - // Minimum execution time: 31_311 nanoseconds. - Weight::from_parts(32_520_000_u64, 0) + // Minimum execution time: 31_070 nanoseconds. + Weight::from_parts(31_800_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -482,8 +482,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn cancel_approval() -> Weight { - // Minimum execution time: 31_380 nanoseconds. - Weight::from_parts(32_140_000_u64, 0) + // Minimum execution time: 30_680 nanoseconds. + Weight::from_parts(31_630_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -498,8 +498,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_accept_ownership() -> Weight { - // Minimum execution time: 25_900 nanoseconds. - Weight::from_parts(26_830_000_u64, 0) + // Minimum execution time: 25_660 nanoseconds. + Weight::from_parts(26_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -516,8 +516,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn set_collection_max_supply() -> Weight { - // Minimum execution time: 25_840 nanoseconds. - Weight::from_parts(26_530_000_u64, 0) + // Minimum execution time: 25_490 nanoseconds. + Weight::from_parts(26_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -534,8 +534,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques ItemPriceOf (r:0 w:1) // Proof: SubstrateUniques ItemPriceOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) fn set_price() -> Weight { - // Minimum execution time: 26_390 nanoseconds. - Weight::from_parts(27_129_000_u64, 0) + // Minimum execution time: 25_689 nanoseconds. + Weight::from_parts(26_520_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -556,8 +556,8 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: SubstrateUniques Account (r:0 w:2) // Proof: SubstrateUniques Account (max_values: None, max_size: Some(88), added: 2563, mode: MaxEncodedLen) fn buy_item() -> Weight { - // Minimum execution time: 61_810 nanoseconds. - Weight::from_parts(63_420_000_u64, 0) + // Minimum execution time: 61_540 nanoseconds. + Weight::from_parts(62_350_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } diff --git a/runtimes/eden/src/weights/pallet_utility.rs b/runtimes/eden/src/weights/pallet_utility.rs index 952d88f09e1..077e78b0b53 100644 --- a/runtimes/eden/src/weights/pallet_utility.rs +++ b/runtimes/eden/src/weights/pallet_utility.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -57,16 +57,16 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - // Minimum execution time: 14_249 nanoseconds. - Weight::from_parts(21_983_687_u64, 0) - // Standard Error: 2_493 - .saturating_add(Weight::from_parts(8_711_227_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_170 nanoseconds. + Weight::from_parts(20_591_792_u64, 0) + // Standard Error: 4_565 + .saturating_add(Weight::from_parts(8_462_977_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } fn as_derivative() -> Weight { - // Minimum execution time: 9_470 nanoseconds. - Weight::from_parts(9_990_000_u64, 0) + // Minimum execution time: 9_010 nanoseconds. + Weight::from_parts(9_530_000_u64, 0) } // Storage: System Number (r:1 w:0) // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -78,10 +78,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - // Minimum execution time: 14_331 nanoseconds. - Weight::from_parts(12_307_035_u64, 0) - // Standard Error: 3_080 - .saturating_add(Weight::from_parts(9_311_752_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_040 nanoseconds. + Weight::from_parts(24_333_470_u64, 0) + // Standard Error: 3_912 + .saturating_add(Weight::from_parts(9_038_319_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -94,8 +94,8 @@ impl pallet_utility::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn dispatch_as() -> Weight { - // Minimum execution time: 18_870 nanoseconds. - Weight::from_parts(19_460_000_u64, 0) + // Minimum execution time: 18_440 nanoseconds. + Weight::from_parts(18_880_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -109,10 +109,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - // Minimum execution time: 14_200 nanoseconds. - Weight::from_parts(23_785_825_u64, 0) - // Standard Error: 1_921 - .saturating_add(Weight::from_parts(8_711_803_u64, 0).saturating_mul(c as u64)) + // Minimum execution time: 14_160 nanoseconds. + Weight::from_parts(12_251_148_u64, 0) + // Standard Error: 3_554 + .saturating_add(Weight::from_parts(8_528_019_u64, 0).saturating_mul(c as u64)) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm.rs b/runtimes/eden/src/weights/pallet_xcm.rs index ed0a05eb849..7503160d93a 100644 --- a/runtimes/eden/src/weights/pallet_xcm.rs +++ b/runtimes/eden/src/weights/pallet_xcm.rs @@ -19,8 +19,8 @@ //! Autogenerated weights for pallet_xcm //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `chain-bench-2aa7e463`, CPU: `AMD EPYC 7B13` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `chain-bench-2a6c49ba`, CPU: `AMD EPYC 7B13` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -66,8 +66,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn send() -> Weight { - // Minimum execution time: 47_120 nanoseconds. - Weight::from_parts(48_520_000_u64, 0) + // Minimum execution time: 45_230 nanoseconds. + Weight::from_parts(47_630_000_u64, 0) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -90,8 +90,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 44_920 nanoseconds. - Weight::from_parts(45_740_000_u64, 0) + // Minimum execution time: 43_950 nanoseconds. + Weight::from_parts(45_210_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -112,16 +112,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm SupportedVersion (r:0 w:1) // Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) fn force_xcm_version() -> Weight { - // Minimum execution time: 19_360 nanoseconds. - Weight::from_parts(19_880_000_u64, 0) + // Minimum execution time: 18_630 nanoseconds. + Weight::from_parts(19_140_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) // Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) fn force_default_xcm_version() -> Weight { - // Minimum execution time: 5_250 nanoseconds. - Weight::from_parts(5_440_000_u64, 0) + // Minimum execution time: 5_169 nanoseconds. + Weight::from_parts(5_380_000_u64, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -149,8 +149,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 54_471 nanoseconds. - Weight::from_parts(55_970_000_u64, 0) + // Minimum execution time: 52_550 nanoseconds. + Weight::from_parts(54_340_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -177,39 +177,39 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 55_540 nanoseconds. - Weight::from_parts(56_360_000_u64, 0) + // Minimum execution time: 53_120 nanoseconds. + Weight::from_parts(54_389_000_u64, 0) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } // Storage: PolkadotXcm XcmExecutionSuspended (r:0 w:1) // Proof Skipped: PolkadotXcm XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured) fn force_suspension() -> Weight { - // Minimum execution time: 5_160 nanoseconds. - Weight::from_parts(5_429_000_u64, 0) + // Minimum execution time: 5_080 nanoseconds. + Weight::from_parts(5_311_000_u64, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: PolkadotXcm SupportedVersion (r:4 w:2) // Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) fn migrate_supported_version() -> Weight { - // Minimum execution time: 26_940 nanoseconds. - Weight::from_parts(27_680_000_u64, 0) + // Minimum execution time: 27_240 nanoseconds. + Weight::from_parts(28_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) // Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured) fn migrate_version_notifiers() -> Weight { - // Minimum execution time: 27_180 nanoseconds. - Weight::from_parts(28_190_000_u64, 0) + // Minimum execution time: 27_050 nanoseconds. + Weight::from_parts(27_970_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn already_notified_target() -> Weight { - // Minimum execution time: 29_140 nanoseconds. - Weight::from_parts(29_850_000_u64, 0) + // Minimum execution time: 28_780 nanoseconds. + Weight::from_parts(29_370_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) @@ -233,23 +233,23 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn notify_current_targets() -> Weight { - // Minimum execution time: 51_340 nanoseconds. - Weight::from_parts(52_770_000_u64, 0) + // Minimum execution time: 49_850 nanoseconds. + Weight::from_parts(51_470_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn notify_target_migration_fail() -> Weight { - // Minimum execution time: 15_440 nanoseconds. - Weight::from_parts(15_870_000_u64, 0) + // Minimum execution time: 15_510 nanoseconds. + Weight::from_parts(15_830_000_u64, 0) .saturating_add(T::DbWeight::get().reads(3_u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) fn migrate_version_notify_targets() -> Weight { - // Minimum execution time: 28_100 nanoseconds. - Weight::from_parts(28_951_000_u64, 0) + // Minimum execution time: 28_009 nanoseconds. + Weight::from_parts(28_589_000_u64, 0) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -274,8 +274,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn migrate_and_notify_old_targets() -> Weight { - // Minimum execution time: 62_720 nanoseconds. - Weight::from_parts(64_340_000_u64, 0) + // Minimum execution time: 61_151 nanoseconds. + Weight::from_parts(62_960_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs b/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs index 47902f6190f..e1ed782ca05 100644 --- a/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs +++ b/runtimes/eden/src/weights/pallet_xcm_benchmarks_fungible.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -59,7 +59,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_parts(48_140_000_u64, 0) + Weight::from_parts(48_560_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -76,7 +76,7 @@ impl WeightInfo { // Storage: System Events (r:1 w:1) // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_asset() -> Weight { - Weight::from_parts(99_020_000_u64, 0) + Weight::from_parts(97_969_000_u64, 0) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -105,7 +105,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_parts(138_560_000_u64, 0) + Weight::from_parts(136_020_000_u64, 0) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -127,7 +127,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn deposit_asset() -> Weight { - Weight::from_parts(53_450_000_u64, 0) + Weight::from_parts(53_380_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -156,7 +156,7 @@ impl WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_parts(94_020_000_u64, 0) + Weight::from_parts(93_349_000_u64, 0) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -183,7 +183,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_parts(56_311_000_u64, 0) + Weight::from_parts(56_340_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } diff --git a/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs b/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs index b85be835105..2fd9fff89dc 100644 --- a/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs +++ b/runtimes/eden/src/weights/pallet_xcm_benchmarks_generic.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-29, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -69,14 +69,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_holding() -> Weight { - Weight::from_parts(60_550_000_u64, 0) + Weight::from_parts(58_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn buy_execution() -> Weight { - Weight::from_parts(8_910_000_u64, 0) + Weight::from_parts(8_990_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -93,7 +93,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn query_response() -> Weight { - Weight::from_parts(24_620_000_u64, 0) + Weight::from_parts(24_220_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -108,21 +108,21 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn transact() -> Weight { - Weight::from_parts(27_009_000_u64, 0) + Weight::from_parts(27_190_000_u64, 0) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn refund_surplus() -> Weight { - Weight::from_parts(8_970_000_u64, 0) + Weight::from_parts(8_891_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_error_handler() -> Weight { - Weight::from_parts(8_810_000_u64, 0) + Weight::from_parts(8_880_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -136,21 +136,21 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_error() -> Weight { - Weight::from_parts(8_590_000_u64, 0) + Weight::from_parts(8_790_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn descend_origin() -> Weight { - Weight::from_parts(9_510_000_u64, 0) + Weight::from_parts(9_660_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_origin() -> Weight { - Weight::from_parts(8_620_000_u64, 0) + Weight::from_parts(8_730_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -177,7 +177,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_error() -> Weight { - Weight::from_parts(48_831_000_u64, 0) + Weight::from_parts(48_420_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -194,14 +194,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn claim_asset() -> Weight { - Weight::from_parts(31_900_000_u64, 0) + Weight::from_parts(31_780_000_u64, 0) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn trap() -> Weight { - Weight::from_parts(8_620_000_u64, 0) + Weight::from_parts(8_770_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -228,7 +228,7 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn subscribe_version() -> Weight { - Weight::from_parts(52_991_000_u64, 0) + Weight::from_parts(52_880_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -237,7 +237,7 @@ impl WeightInfo { // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) // Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_parts(13_100_000_u64, 0) + Weight::from_parts(13_130_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -264,42 +264,42 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_parts(54_690_000_u64, 0) + Weight::from_parts(54_700_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn burn_asset() -> Weight { - Weight::from_parts(10_530_000_u64, 0) + Weight::from_parts(10_650_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_asset() -> Weight { - Weight::from_parts(8_931_000_u64, 0) + Weight::from_parts(9_100_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_origin() -> Weight { - Weight::from_parts(8_830_000_u64, 0) + Weight::from_parts(8_910_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_error() -> Weight { - Weight::from_parts(8_650_000_u64, 0) + Weight::from_parts(8_810_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_transact_status() -> Weight { - Weight::from_parts(9_120_000_u64, 0) + Weight::from_parts(9_160_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -326,14 +326,14 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn query_pallet() -> Weight { - Weight::from_parts(62_040_000_u64, 0) + Weight::from_parts(62_720_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn expect_pallet() -> Weight { - Weight::from_parts(19_520_000_u64, 0) + Weight::from_parts(19_560_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -360,42 +360,42 @@ impl WeightInfo { // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn report_transact_status() -> Weight { - Weight::from_parts(48_860_000_u64, 0) + Weight::from_parts(49_060_000_u64, 0) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_transact_status() -> Weight { - Weight::from_parts(8_690_000_u64, 0) + Weight::from_parts(8_820_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_topic() -> Weight { - Weight::from_parts(8_620_000_u64, 0) + Weight::from_parts(8_720_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn clear_topic() -> Weight { - Weight::from_parts(8_630_000_u64, 0) + Weight::from_parts(8_660_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn set_fees_mode() -> Weight { - Weight::from_parts(8_640_000_u64, 0) + Weight::from_parts(8_720_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } // Storage: Balances TotalIssuance (r:1 w:1) // Proof: Balances TotalIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen) pub(crate) fn unpaid_execution() -> Weight { - Weight::from_parts(8_760_000_u64, 0) + Weight::from_parts(8_951_000_u64, 0) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } diff --git a/scripts/init.sh b/scripts/init.sh index ddc08c9192d..b2c536a7aed 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -5,8 +5,7 @@ set -e echo "*** Initializing WASM build environment" if [ -z $CI_PROJECT_NAME ] ; then - rustup update nightly rustup update stable fi -rustup target add wasm32-unknown-unknown --toolchain nightly \ No newline at end of file +rustup target add wasm32-unknown-unknown --toolchain stable From af09e94ddc3dc540ebc1051f27e9e6e685d94a22 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 10:16:34 +1200 Subject: [PATCH 093/101] chore(eden-runtime): simplify several use statements Co-authored-by: Eliott Teissonniere <10683430+ETeissonniere@users.noreply.github.com> --- runtimes/eden/src/migrations.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 5eee1cea1f1..0f977eb2971 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -2,15 +2,13 @@ use crate::Runtime; use frame_support::{migration, traits::OnRuntimeUpgrade, weights::Weight}; #[cfg(feature = "try-runtime")] -use codec::{Decode, Encode}; -#[cfg(feature = "try-runtime")] -use frame_support::Blake2_128Concat; -#[cfg(feature = "try-runtime")] -use pallet_uniques::CollectionDetails; -#[cfg(feature = "try-runtime")] -use primitives::{AccountId, Balance}; -#[cfg(feature = "try-runtime")] -use sp_std::prelude::*; +use { + codec::{Decode, Encode}, + frame_support::Blake2_128Concat, + pallet_uniques::CollectionDetails, + primitives::{AccountId, Balance}, + sp_std::prelude::* +}; #[cfg(feature = "try-runtime")] type CollectionId = u32; #[cfg(feature = "try-runtime")] From 36c3526de62600420972856ae91309d2a43a7da1 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 10:29:33 +1200 Subject: [PATCH 094/101] feat(pallet-nodle-uniques): remove the collection details after it is destroyed --- pallets/uniques/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 3f5a5bf0564..85cca19f1d4 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -220,6 +220,7 @@ pub mod pallet { ExistenceRequirement::AllowDeath, )?; } + CollectionExtraDepositDetails::::remove(collection); pallet_uniques::Pallet::::destroy(origin, collection, witness) } From 2b1a7844273b4f2012a17bb263423271b22480c8 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 11:27:10 +1200 Subject: [PATCH 095/101] fmt(eden-runtime): correct fmt --- runtimes/eden/src/migrations.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 0f977eb2971..c88364d68cd 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -3,14 +3,16 @@ use frame_support::{migration, traits::OnRuntimeUpgrade, weights::Weight}; #[cfg(feature = "try-runtime")] use { - codec::{Decode, Encode}, - frame_support::Blake2_128Concat, - pallet_uniques::CollectionDetails, - primitives::{AccountId, Balance}, - sp_std::prelude::* + codec::{Decode, Encode}, + frame_support::Blake2_128Concat, + pallet_uniques::CollectionDetails, + primitives::{AccountId, Balance}, + sp_std::prelude::*, }; + #[cfg(feature = "try-runtime")] type CollectionId = u32; + #[cfg(feature = "try-runtime")] const UNIQUES_CLASS_PREFIX: &[u8] = b"Class"; From 8cff4250622bea2629fba76a6d230ef26267a5f6 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 12:03:28 +1200 Subject: [PATCH 096/101] test(pallet-nodle-uniques): test_destroy_removes_extra_deposit_details --- pallets/uniques/src/tests.rs | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index 2d7f0a9a329..dbfd6b01585 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -518,6 +518,72 @@ mod test_cases { }) } + #[test] + fn test_destroy_removes_extra_deposit_details() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let extra_deposit = 20; + let collection = 0; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, 3 * extra_deposit_limit); + + assert!(!CollectionExtraDepositDetails::::contains_key(collection)); + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + assert_eq!( + CollectionExtraDepositDetails::::get(collection).unwrap().limit, + extra_deposit_limit + ); + + assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit + )); + assert!(!ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + assert_eq!( + CollectionExtraDepositDetails::::get(collection).unwrap().total, + extra_deposit + ); + + let witness = DestroyWitness { + items: 1, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy( + RuntimeOrigin::signed(collection_owner), + collection, + witness + )); + assert!(!CollectionExtraDepositDetails::::contains_key(collection)); + assert!(ItemExtraDeposits::::iter_prefix(collection).count().is_zero()); + + // Recreate the collection with higher limit + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + 1 + )); + assert_eq!( + CollectionExtraDepositDetails::::get(collection).unwrap().limit, + extra_deposit_limit + 1 + ); + assert_eq!(CollectionExtraDepositDetails::::get(collection).unwrap().total, 0); + }) + } + #[test] fn test_mint_and_burn_with_extra_deposit() { new_test_ext().execute_with(|| { From b60c12d5c3d1a72f911352802115b880da026d35 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 14:16:21 +1200 Subject: [PATCH 097/101] Update pallets/uniques/Cargo.toml Co-authored-by: Fredrik Simonsson --- pallets/uniques/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/uniques/Cargo.toml b/pallets/uniques/Cargo.toml index 2c24562dcdb..aebe8344147 100644 --- a/pallets/uniques/Cargo.toml +++ b/pallets/uniques/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-nodle-uniques" version = "2.1.0" -authors = ["Eliott Teissonniere "] +authors = ["Nodle "] edition = "2021" [features] From 12e58efeb8c6c874bb67970f2822f950b3954b03 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 15:08:44 +1200 Subject: [PATCH 098/101] feat(pallet-nodle-uniques): update_extra_deposit_limit --- pallets/uniques/src/lib.rs | 92 +++++++++++++++---- pallets/uniques/src/tests.rs | 156 ++++++++++++++++++++++++++++++++- pallets/uniques/src/weights.rs | 9 ++ 3 files changed, 237 insertions(+), 20 deletions(-) diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index 85cca19f1d4..d9acaa662bd 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -54,6 +54,15 @@ pub struct ExtraDepositDetails { total: T, } +pub enum ExtraDepositHandlingError { + /// Overflow adding extra deposit + Overflow, + /// The total extra deposit exceeds the limit + TotalExceedsLimit, + /// The limit is below the current commitment + LimitBelowCommitment, +} + impl ExtraDepositDetails { pub fn with_limit(limit: T) -> Self { Self { @@ -61,13 +70,24 @@ impl ExtraDepositDetails { ..Default::default() } } - pub fn add(&mut self, value: T) -> Result<(), &'static str> { - let new_total = self.total.checked_add(&value).ok_or("Overflow adding extra deposit")?; + pub fn add(&mut self, value: T) -> Result<(), ExtraDepositHandlingError> { + let new_total = self + .total + .checked_add(&value) + .ok_or(ExtraDepositHandlingError::Overflow)?; if new_total <= self.limit { self.total = new_total; Ok(()) } else { - Err("Total extra deposit exceeds limit") + Err(ExtraDepositHandlingError::TotalExceedsLimit) + } + } + pub fn update_limit(&mut self, new_limit: T) -> Result<(), ExtraDepositHandlingError> { + if new_limit >= self.total { + self.limit = new_limit; + Ok(()) + } else { + Err(ExtraDepositHandlingError::LimitBelowCommitment) } } pub fn total(&self) -> T { @@ -118,12 +138,16 @@ pub mod pallet { #[pallet::error] pub enum Error { - /// Issuing with extra deposit exceeds the collection owner's limit. - ExceedExtraDepositLimitForCollection, - /// The owner of collection is not known. - UnknownCollectionOwner, - /// The owner of item is not known. - UnknownItemOwner, + /// Cannot mint the token most likely due to extra deposit exceeding the collection owner's limit. + FailedToIncreaseTotalExtraDeposit, + /// The owner of collection is not retrievable most likely due to collection not existing. + FailedToRetrieveCollectionOwner, + /// The owner of item is not found due to item not existing. + FailedToRetrieveItemOwner, + /// Permission denied. + PermissionDenied, + /// Cannot update the extra deposit limit most likely due to it going lower than commitment + FailedToUpdateExtraDepositLimit, } #[pallet::call] @@ -208,10 +232,10 @@ pub mod pallet { witness: DestroyWitness, ) -> DispatchResultWithPostInfo { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::UnknownCollectionOwner)?; + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; for (item, extra_deposit) in ItemExtraDeposits::::drain_prefix(collection) { - let item_owner = - pallet_uniques::Pallet::::owner(collection, item).ok_or(Error::::UnknownItemOwner)?; + let item_owner = pallet_uniques::Pallet::::owner(collection, item) + .ok_or(Error::::FailedToRetrieveItemOwner)?; >::Currency::unreserve(&collection_owner, extra_deposit); >::Currency::transfer( &collection_owner, @@ -270,9 +294,9 @@ pub mod pallet { check_owner: Option>, ) -> DispatchResult { let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::UnknownCollectionOwner)?; - let item_owner = - pallet_uniques::Pallet::::owner(collection, item).ok_or(Error::::UnknownItemOwner)?; + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + let item_owner = pallet_uniques::Pallet::::owner(collection, item) + .ok_or(Error::::FailedToRetrieveItemOwner)?; pallet_uniques::Pallet::::burn(origin, collection, item, check_owner)?; let extra_deposit = ItemExtraDeposits::::take(collection, item).unwrap_or_else(Zero::zero); if !extra_deposit.is_zero() { @@ -836,15 +860,49 @@ pub mod pallet { ) -> DispatchResult { pallet_uniques::Pallet::::mint(origin, collection, item, owner)?; let collection_owner = pallet_uniques::Pallet::::collection_owner(collection) - .ok_or(Error::::UnknownCollectionOwner)?; + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); extra_deposit_details .add(deposit) - .map_err(|_| Error::::ExceedExtraDepositLimitForCollection)?; + .map_err(|_| Error::::FailedToIncreaseTotalExtraDeposit)?; >::Currency::reserve(&collection_owner, deposit)?; ItemExtraDeposits::::insert(collection, item, deposit); CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); Ok(()) } + + /// Update extra deposit limit for a collection when it's not against what is already + /// reserved. + /// + /// Only the collection owner can update this limit to a value higher than the total extra + /// deposit for the collection currently. + /// + /// Parameters: + /// - `collection`: The identifier of the collection owned by the origin. + /// - `limit`: The new cap on the total amount of funds that an admin/issuer can + /// reserve from the collection owner (origin of this call) while minting NFTs with extra + /// deposit. + /// + /// Weight: `O(1)` + #[pallet::call_index(28)] + #[pallet::weight(>::WeightInfo::update_extra_deposit_limit())] + #[transactional] + pub fn update_extra_deposit_limit( + origin: OriginFor, + collection: T::CollectionId, + limit: BalanceOf, + ) -> DispatchResult { + let origin = ensure_signed(origin)?; + let owner = pallet_uniques::Pallet::::collection_owner(collection) + .ok_or(Error::::FailedToRetrieveCollectionOwner)?; + ensure!(origin == owner, Error::::PermissionDenied); + + let mut extra_deposit_details = CollectionExtraDepositDetails::::get(collection).unwrap_or_default(); + extra_deposit_details + .update_limit(limit) + .map_err(|_| Error::::FailedToUpdateExtraDepositLimit)?; + CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + Ok(()) + } } } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index dbfd6b01585..f46b2497e75 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -142,7 +142,7 @@ mod test_cases { item_owner, 1 ), - Error::::ExceedExtraDepositLimitForCollection + Error::::FailedToIncreaseTotalExtraDeposit ); assert_ok!(Uniques::mint_with_extra_deposit( RuntimeOrigin::signed(collection_owner), @@ -184,7 +184,7 @@ mod test_cases { item_owner, extra_deposit_limit + 1 ), - Error::::ExceedExtraDepositLimitForCollection + Error::::FailedToIncreaseTotalExtraDeposit ); assert_ok!(Uniques::mint_with_extra_deposit( RuntimeOrigin::signed(collection_owner), @@ -235,7 +235,157 @@ mod test_cases { assert_noop!( Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 4, 6, 1), - Error::::ExceedExtraDepositLimitForCollection + Error::::FailedToIncreaseTotalExtraDeposit + ); + }) + } + + #[test] + fn test_extra_deposit_limit_is_updatable_when_over_or_equal_previous_total() { + new_test_ext().execute_with(|| { + let extra_deposit_limit = 100; + let collection = 0; + let collection_owner = 1; + // The deposits below sum up to 100. + let items_and_owners_and_deposits = [(0, 2, 53), (1, 3, 35), (2, 4, 0)]; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + + for (item, item_owner, deposit) in items_and_owners_and_deposits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + deposit + )); + } + let extra_deposit_total = CollectionExtraDepositDetails::::get(collection) + .unwrap_or_default() + .total; + assert_noop!( + Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + extra_deposit_total - 1 + ), + Error::::FailedToUpdateExtraDepositLimit + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + extra_deposit_total + )); + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), collection, 3, 5, 1), + Error::::FailedToIncreaseTotalExtraDeposit + ); + }) + } + + #[test] + fn test_only_collection_owner_can_update_extra_deposit_limit() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let collection_admin = 2; + + let item_owner = 3; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + 20 + )); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_admin), collection_id, 30), + Error::::PermissionDenied + ); + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(item_owner), collection_id, 30), + Error::::PermissionDenied + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + 30 + )); + }) + } + + #[test] + fn test_updating_extra_deposit_limit_fails_when_collection_not_exist() { + new_test_ext().execute_with(|| { + let collection_id = 0; + let collection_owner = 1; + let collection_admin = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id, 30), + Error::::FailedToRetrieveCollectionOwner + ); + + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + 20 + )); + + assert_noop!( + Uniques::update_extra_deposit_limit(RuntimeOrigin::signed(collection_owner), collection_id + 1, 30), + Error::::FailedToRetrieveCollectionOwner + ); + + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + 30 + )); + }) + } + + #[test] + fn test_extra_deposit_is_updatable_for_collections_without_previous_extra_deposit_details() { + new_test_ext().execute_with(|| { + let collection_id = 7; + let collection_owner = 1; + let collection_admin = 2; + + Balances::make_free_balance_be(&collection_owner, 100); + + assert_ok!(Uniques::create( + RuntimeOrigin::signed(collection_owner), + collection_id, + collection_admin, + )); + + let limit = 30; + assert_ok!(Uniques::update_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection_id, + limit + )); + + assert_eq!( + CollectionExtraDepositDetails::::get(collection_id).unwrap().limit, + limit ); }) } diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 98469fd7ed4..2f78ffdb7a5 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -51,6 +51,7 @@ pub trait WeightInfo { fn burn() -> Weight; fn create_with_extra_deposit_limit() -> Weight; fn transfer_ownership() -> Weight; + fn update_extra_deposit_limit() -> Weight; } /// Weight functions for `pallet_nodle_uniques`. @@ -205,6 +206,10 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } + + fn update_extra_deposit_limit() -> Weight { + Weight::from_parts(0, 0) + } } impl WeightInfo for () { @@ -357,4 +362,8 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } + + fn update_extra_deposit_limit() -> Weight { + Weight::from_parts(0, 0) + } } From a2c585efa9db39bcb0d8eecc08fb77a8b2262844 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 17:39:10 +1200 Subject: [PATCH 099/101] feat(pallet-nodle-uniques): emit ExtraDepositLimitUpdated event Plus benchmark update_extra_deposit_limit locally --- pallets/uniques/src/benchmarking.rs | 17 ++++++++++---- pallets/uniques/src/lib.rs | 17 ++++++++++++++ pallets/uniques/src/tests.rs | 3 ++- pallets/uniques/src/weights.rs | 36 +++++++++++++++++++++++++---- runtimes/eden/src/pallets_util.rs | 1 + 5 files changed, 65 insertions(+), 9 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index bb2f9ffd299..2d68fcf3699 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -112,9 +112,8 @@ fn mint_item_with_extra_deposit, I: 'static>( (item, collection_owner, collection_owner_lookup) } -fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) { +fn assert_last_event, I: 'static>(system_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); @@ -162,7 +161,8 @@ benchmarks_instance_pallet! { T::Currency::make_free_balance_be(&collection_owner, BalanceOf::::max_value()); }: _(SystemOrigin::Signed(collection_owner.clone()), collection_id, collection_owner_lookup, BalanceOf::::max_value()) verify { - assert_last_event::(pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into()); + let event: >::RuntimeEvent = pallet_uniques::Event::Created { collection: >::Helper::collection(0), creator: collection_owner.clone(), owner: collection_owner }.into(); + assert_last_event::(event.into()); } transfer_ownership { @@ -174,7 +174,16 @@ benchmarks_instance_pallet! { Uniques::::set_accept_ownership(origin, Some(collection))?; }: _(SystemOrigin::Signed(collection_owner), collection, target_lookup) verify { - assert_last_event::(pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into()); + let event: >::RuntimeEvent = pallet_uniques::Event::OwnerChanged { collection, new_owner: target }.into(); + assert_last_event::(event.into()); + } + + update_extra_deposit_limit { + let (collection, collection_owner, _) = create_collection::(BalanceOf::::max_value()); + }: _(SystemOrigin::Signed(collection_owner), collection, BalanceOf::::min_value()) + verify { + let event: >::RuntimeEvent = Event::ExtraDepositLimitUpdated { collection, limit: BalanceOf::::min_value() }.into(); + assert_last_event::(event.into()); } impl_benchmark_test_suite!(Uniques, crate::tests::new_test_ext(), crate::tests::Test); diff --git a/pallets/uniques/src/lib.rs b/pallets/uniques/src/lib.rs index d9acaa662bd..7a8d0344536 100644 --- a/pallets/uniques/src/lib.rs +++ b/pallets/uniques/src/lib.rs @@ -110,6 +110,9 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_uniques::Config { + /// The overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Weight information for extrinsics specific to this pallet. type WeightInfo: NodleWeightInfo; } @@ -136,6 +139,16 @@ pub mod pallet { pub(crate) type CollectionExtraDepositDetails, I: 'static = ()> = StorageMap<_, Blake2_128Concat, T::CollectionId, ExtraDepositDetails>, OptionQuery>; + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event, I: 'static = ()> { + /// A `collection` was created. + ExtraDepositLimitUpdated { + collection: T::CollectionId, + limit: BalanceOf, + }, + } + #[pallet::error] pub enum Error { /// Cannot mint the token most likely due to extra deposit exceeding the collection owner's limit. @@ -883,6 +896,8 @@ pub mod pallet { /// reserve from the collection owner (origin of this call) while minting NFTs with extra /// deposit. /// + /// Emits `ExtraDepositLimitUpdated` event when successful. + /// /// Weight: `O(1)` #[pallet::call_index(28)] #[pallet::weight(>::WeightInfo::update_extra_deposit_limit())] @@ -902,6 +917,8 @@ pub mod pallet { .update_limit(limit) .map_err(|_| Error::::FailedToUpdateExtraDepositLimit)?; CollectionExtraDepositDetails::::insert(collection, extra_deposit_details); + + Self::deposit_event(Event::::ExtraDepositLimitUpdated { collection, limit }); Ok(()) } } diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index f46b2497e75..a3a2d14eacd 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -23,7 +23,7 @@ construct_runtime!( { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Uniques: pallet_nodle_uniques::{Call, Storage}, + Uniques: pallet_nodle_uniques::{Call, Storage, Event}, Uniques2: pallet_uniques::{Pallet, Call, Storage, Event}, } ); @@ -100,6 +100,7 @@ impl pallet_uniques::Config for Test { type Helper = (); } impl Config for Test { + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } diff --git a/pallets/uniques/src/weights.rs b/pallets/uniques/src/weights.rs index 2f78ffdb7a5..2d217aff888 100644 --- a/pallets/uniques/src/weights.rs +++ b/pallets/uniques/src/weights.rs @@ -206,9 +206,23 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(8_u64)) } - + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn update_extra_deposit_limit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 20_000 nanoseconds. + Weight::from_parts(20_000_000_u64, 0) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } } @@ -362,8 +376,22 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(8_u64)) } - + // Storage: SubstrateUniques Class (r:1 w:0) + // Proof: SubstrateUniques Class (max_values: None, max_size: Some(178), added: 2653, mode: MaxEncodedLen) + // Storage: Uniques CollectionExtraDepositDetails (r:1 w:1) + // Proof: Uniques CollectionExtraDepositDetails (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) + // Storage: System Number (r:1 w:0) + // Proof: System Number (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System ExecutionPhase (r:1 w:0) + // Proof: System ExecutionPhase (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) + // Storage: System EventCount (r:1 w:1) + // Proof: System EventCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + // Storage: System Events (r:1 w:1) + // Proof Skipped: System Events (max_values: Some(1), max_size: None, mode: Measured) fn update_extra_deposit_limit() -> Weight { - Weight::from_parts(0, 0) + // Minimum execution time: 20_000 nanoseconds. + Weight::from_parts(20_000_000_u64, 0) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) } } diff --git a/runtimes/eden/src/pallets_util.rs b/runtimes/eden/src/pallets_util.rs index 3c7c304fd13..f624d39f2fb 100644 --- a/runtimes/eden/src/pallets_util.rs +++ b/runtimes/eden/src/pallets_util.rs @@ -139,6 +139,7 @@ impl pallet_uniques::Config for Runtime { } impl pallet_nodle_uniques::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type WeightInfo = pallet_nodle_uniques::weights::SubstrateWeight; } From b4753fd265f743a4d6dbb9c3f1c0eac3c6ba8f52 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 18:02:34 +1200 Subject: [PATCH 100/101] test(pallet-nodle-uniques): test_destroying_one_collection_does_not_impact_others --- pallets/uniques/src/tests.rs | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/pallets/uniques/src/tests.rs b/pallets/uniques/src/tests.rs index a3a2d14eacd..3e9a5fcbb82 100644 --- a/pallets/uniques/src/tests.rs +++ b/pallets/uniques/src/tests.rs @@ -206,6 +206,52 @@ mod test_cases { }) } + #[test] + fn test_destroying_one_collection_does_not_impact_others() { + new_test_ext().execute_with(|| { + let extra_deposit_limits_per_collection = [(0, 53), (1, 143), (2, 0), (3, 1), (4, 71)]; + let collection_owner = 1; + let item = 0; + let item_owner = 2; + + Balances::make_free_balance_be(&collection_owner, u64::MAX); + + for (collection, extra_deposit_limit) in extra_deposit_limits_per_collection { + assert_ok!(Uniques::create_with_extra_deposit_limit( + RuntimeOrigin::signed(collection_owner), + collection, + collection_owner, + extra_deposit_limit + )); + } + + let witness = DestroyWitness { + items: 0, + item_metadatas: 0, + attributes: 0, + }; + assert_ok!(Uniques::destroy(RuntimeOrigin::signed(collection_owner), 1, witness)); + + // remaining collections after 1 us destroyed are 0, 2, 3, 4 + let remaining_collections_and_limits = [(0, 53), (2, 0), (3, 1), (4, 71)]; + + for (collection, extra_deposit_limit) in remaining_collections_and_limits { + assert_ok!(Uniques::mint_with_extra_deposit( + RuntimeOrigin::signed(collection_owner), + collection, + item, + item_owner, + extra_deposit_limit + )); + } + + assert_noop!( + Uniques::mint_with_extra_deposit(RuntimeOrigin::signed(collection_owner), 1, item, item_owner, 1), + pallet_uniques::Error::::UnknownCollection + ); + }) + } + #[test] fn test_extra_deposit_limit_is_maintained_when_minting_several_items() { new_test_ext().execute_with(|| { From 798601553e8565df5de74c276725c8e417ca9605 Mon Sep 17 00:00:00 2001 From: Alex Sedighi Date: Tue, 11 Jul 2023 18:05:23 +1200 Subject: [PATCH 101/101] chore(pallet-nodle-uniques): update file header for benchmarking.rs --- pallets/uniques/src/benchmarking.rs | 37 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/pallets/uniques/src/benchmarking.rs b/pallets/uniques/src/benchmarking.rs index 2d68fcf3699..d2726a4c01b 100644 --- a/pallets/uniques/src/benchmarking.rs +++ b/pallets/uniques/src/benchmarking.rs @@ -1,21 +1,22 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Uniques pallet benchmarking. +/* + * This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain + * Copyright (C) 2020-2022 Nodle International + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//! Nodle uniques pallet benchmarking. #![cfg(feature = "runtime-benchmarks")]