From b878662ee89123c97d5325b122017cc137869c91 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 28 Apr 2023 18:08:33 +0200 Subject: [PATCH 01/74] Frame Add translate_next This works similarly to to `translate` but only translate a single entry. This function will be useful in the context of multi-block migration. --- frame/support/src/storage/generator/map.rs | 37 ++++++++++++++++++++++ frame/support/src/storage/mod.rs | 11 +++++++ frame/support/src/storage/types/map.rs | 11 ++++++- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/frame/support/src/storage/generator/map.rs b/frame/support/src/storage/generator/map.rs index 3b36b9bddb704..8a7269502572a 100644 --- a/frame/support/src/storage/generator/map.rs +++ b/frame/support/src/storage/generator/map.rs @@ -207,6 +207,43 @@ where } } } + + fn translate_next Option>( + previous_key: Option>, + mut f: F, + ) -> (Option>, Result<(), ()>) { + let prefix = G::prefix_hash(); + let previous_key = previous_key.unwrap_or_else(|| prefix.clone()); + + match sp_io::storage::next_key(&previous_key).filter(|n| n.starts_with(&prefix)) { + Some(current_key) => { + let value = match unhashed::get::(¤t_key) { + Some(value) => value, + None => { + log::error!("Invalid translate: fail to decode old value"); + return (Some(current_key), Err(())) + }, + }; + + let mut key_material = G::Hasher::reverse(¤t_key[prefix.len()..]); + let key = match K::decode(&mut key_material) { + Ok(key) => key, + Err(_) => { + log::error!("Invalid translate: fail to decode key"); + return (Some(current_key), Err(())) + }, + }; + + match f(key, value) { + Some(new) => unhashed::put::(¤t_key, &new), + None => unhashed::kill(¤t_key), + } + + (Some(current_key), Ok(())) + }, + None => (None, Ok(())), + } + } } impl> storage::StorageMap for G { diff --git a/frame/support/src/storage/mod.rs b/frame/support/src/storage/mod.rs index 4c6ea943c6920..2e823af2bfa1a 100644 --- a/frame/support/src/storage/mod.rs +++ b/frame/support/src/storage/mod.rs @@ -303,6 +303,17 @@ pub trait IterableStorageMap: StorageMap { /// /// NOTE: If a value fail to decode because storage is corrupted then it is skipped. fn translate Option>(f: F); + + /// Translate the next entry following `previous_key` by a function `f`. + /// By returning `None` from `f` for an element, you'll remove it from the map. + /// + /// Returns the next key to iterate from in lexicographical order of the encoded key. + /// and whether or not the translation failed because either the old key or value was + /// corrupted. + fn translate_next Option>( + previous_key: Option>, + f: F, + ) -> (Option>, Result<(), ()>); } /// A strongly-typed double map in storage whose secondary keys and values can be iterated over. diff --git a/frame/support/src/storage/types/map.rs b/frame/support/src/storage/types/map.rs index 2110732b2f69c..8bfde09de2fec 100644 --- a/frame/support/src/storage/types/map.rs +++ b/frame/support/src/storage/types/map.rs @@ -484,7 +484,7 @@ mod test { use crate::{ hash::*, metadata_ir::{StorageEntryModifierIR, StorageEntryTypeIR, StorageHasherIR}, - storage::types::ValueQuery, + storage::{types::ValueQuery, IterableStorageMap}, }; use sp_io::{hashing::twox_128, TestExternalities}; @@ -700,6 +700,15 @@ mod test { A::translate::(|k, v| Some((k * v as u16).into())); assert_eq!(A::iter().collect::>(), vec![(4, 40), (3, 30)]); + let translate_next = |k: u16, v: u8| Some((v as u16 / k).into()); + let (k, _) = A::translate_next::(None, translate_next); + let (k, _) = A::translate_next::(k, translate_next); + assert_eq!((None, Ok(())), A::translate_next::(k, translate_next)); + assert_eq!(A::iter().collect::>(), vec![(4, 10), (3, 10)]); + + let _ = A::translate_next::(None, |_, _| None); + assert_eq!(A::iter().collect::>(), vec![(3, 10)]); + let mut entries = vec![]; A::build_metadata(vec![], &mut entries); AValueQueryWithAnOnEmpty::build_metadata(vec![], &mut entries); From 7ab57746cf973a52c1c5e55cca913d89d89464a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Thu, 23 Feb 2023 00:24:55 +0100 Subject: [PATCH 02/74] Move to lazy migration --- frame/contracts/primitives/src/lib.rs | 14 + frame/contracts/src/lib.rs | 41 +- frame/contracts/src/migration.rs | 617 +++++++++----------------- frame/contracts/src/migration/v9.rs | 96 ++++ frame/support/src/traits/metadata.rs | 10 +- 5 files changed, 372 insertions(+), 406 deletions(-) create mode 100644 frame/contracts/src/migration/v9.rs diff --git a/frame/contracts/primitives/src/lib.rs b/frame/contracts/primitives/src/lib.rs index e73ceb031e184..795b31691161c 100644 --- a/frame/contracts/primitives/src/lib.rs +++ b/frame/contracts/primitives/src/lib.rs @@ -95,6 +95,20 @@ pub enum ContractAccessError { DoesntExist, /// Storage key cannot be decoded from the provided input data. KeyDecodingFailed, + /// Storage is migrating. Try again later. + MigrationInProgress, +} + +impl From for ContractResult, B> { + fn from(error: DispatchError) -> Self { + ContractResult { + gas_consumed: Zero::zero(), + gas_required: Zero::zero(), + storage_deposit: Default::default(), + debug_message: Vec::new(), + result: Err(error), + } + } } bitflags! { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 5a82a4a42b4a9..41d510aa01e20 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -108,7 +108,7 @@ use crate::{ use codec::{Codec, Encode, HasCompact}; use environmental::*; use frame_support::{ - dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo}, + dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, WithPostDispatchInfo}, ensure, traits::{ tokens::fungible::Inspect, ConstU32, Contains, Currency, Get, Randomness, @@ -314,11 +314,17 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { + // TODO: run migration here + if Migration::::ensure_migrated().is_err() { + return T::DbWeight::get().reads(1) + } ContractInfo::::process_deletion_queue_batch(remaining_weight) .saturating_add(T::WeightInfo::on_process_deletion_queue_batch()) } fn integrity_test() { + Migration::::integrity_test(); + // Total runtime memory limit let max_runtime_mem: u32 = T::Schedule::get().limits.runtime_memory; // Memory limits for a single contract: @@ -497,6 +503,7 @@ pub mod pallet { storage_deposit_limit: Option< as codec::HasCompact>::Type>, determinism: Determinism, ) -> DispatchResult { + Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; Self::bare_upload_code(origin, code, storage_deposit_limit.map(Into::into), determinism) .map(|_| ()) @@ -512,6 +519,7 @@ pub mod pallet { origin: OriginFor, code_hash: CodeHash, ) -> DispatchResultWithPostInfo { + Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; >::remove(&origin, code_hash)?; // we waive the fee because removing unused code is beneficial @@ -535,6 +543,7 @@ pub mod pallet { dest: AccountIdLookupOf, code_hash: CodeHash, ) -> DispatchResult { + Migration::::ensure_migrated()?; ensure_root(origin)?; let dest = T::Lookup::lookup(dest)?; >::try_mutate(&dest, |contract| { @@ -584,6 +593,7 @@ pub mod pallet { storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec, ) -> DispatchResultWithPostInfo { + Migration::::ensure_migrated()?; let gas_limit: Weight = gas_limit.into(); let origin = ensure_signed(origin)?; let dest = T::Lookup::lookup(dest)?; @@ -645,6 +655,7 @@ pub mod pallet { data: Vec, salt: Vec, ) -> DispatchResultWithPostInfo { + Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; let code_len = code.len() as u32; let data_len = data.len() as u32; @@ -688,6 +699,7 @@ pub mod pallet { data: Vec, salt: Vec, ) -> DispatchResultWithPostInfo { + Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; let data_len = data.len() as u32; let salt_len = salt.len() as u32; @@ -711,6 +723,17 @@ pub mod pallet { T::WeightInfo::instantiate(data_len, salt_len), ) } + + /// TODO: add benchmark for base weight + /// TODO: add a minimum weight limit so that people don't spam small free extrinsics + #[pallet::call_index(9)] + #[pallet::weight(*weight_limit)] + pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { + ensure_signed(origin)?; + Migration::::migrate(weight_limit) + .map(|weight| PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }) + .map_err(|(weight, error)| error.with_weight(weight)) + } } #[pallet::event] @@ -863,6 +886,8 @@ pub mod pallet { CodeRejected, /// An indetermistic code was used in a context where this is not permitted. Indeterministic, + MigrationInProgress, + NoMigrationPerformed, } /// A mapping from an original code hash to the original code, untouched by instrumentation. @@ -922,6 +947,10 @@ pub mod pallet { #[pallet::storage] pub(crate) type DeletionQueueCounter = StorageValue<_, DeletionQueueManager, ValueQuery>; + + #[pallet::storage] + pub(crate) type MigrationInProgress = + StorageValue<_, migration::Cursor, OptionQuery>; } /// Context of a contract invocation. @@ -1137,6 +1166,9 @@ impl Pallet { debug: bool, determinism: Determinism, ) -> ContractExecResult> { + if let Err(err) = Migration::::ensure_migrated() { + return err.into() + } let mut debug_message = if debug { Some(DebugBufferVec::::default()) } else { None }; let common = CommonInput { origin, @@ -1178,6 +1210,9 @@ impl Pallet { salt: Vec, debug: bool, ) -> ContractInstantiateResult> { + if let Err(err) = Migration::::ensure_migrated() { + return err.into() + } let mut debug_message = if debug { Some(DebugBufferVec::::default()) } else { None }; let common = CommonInput { origin, @@ -1210,6 +1245,7 @@ impl Pallet { storage_deposit_limit: Option>, determinism: Determinism, ) -> CodeUploadResult, BalanceOf> { + Migration::::ensure_migrated()?; let schedule = T::Schedule::get(); let module = PrefabWasmModule::from_code( code, @@ -1230,6 +1266,9 @@ impl Pallet { /// Query storage of a specified contract under a specified key. pub fn get_storage(address: T::AccountId, key: Vec) -> GetStorageResult { + if let Err(_) = Migration::::ensure_migrated() { + return Err(ContractAccessError::MigrationInProgress) + } let contract_info = ContractInfoOf::::get(&address).ok_or(ContractAccessError::DoesntExist)?; diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 96a4c3203474c..1d69baad453b5 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,459 +15,268 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{BalanceOf, CodeHash, Config, Pallet, TrieId, Weight}; -use codec::{Decode, Encode}; +mod v9; + +use crate::{Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; +use codec::{Codec, Decode}; use frame_support::{ codec, pallet_prelude::*, - storage::migration, - storage_alias, - traits::{Get, OnRuntimeUpgrade}, - Identity, Twox64Concat, + traits::{ConstU32, Get, OnRuntimeUpgrade}, }; -use sp_runtime::traits::Saturating; use sp_std::{marker::PhantomData, prelude::*}; -/// Performs all necessary migrations based on `StorageVersion`. -pub struct Migration(PhantomData); -impl OnRuntimeUpgrade for Migration { - fn on_runtime_upgrade() -> Weight { - let version = >::on_chain_storage_version(); - let mut weight = Weight::zero(); +const PROOF_ENCODE: &str = "Tuple::max_encoded_len() < Cursor::max_encoded_len()` is verified in `Self::integrity_test()`; qed"; +const PROOF_DECODE: &str = + "We encode to the same type in this trait only. No other code touches this item; qed"; +const PROOF_EXISTS: &str = "Required migration not supported by this runtime. This is a bug."; - if version < 4 { - v4::migrate::(&mut weight); - } +pub type Cursor = BoundedVec>; +type Migrations = (v9::Migration,); - if version < 5 { - v5::migrate::(&mut weight); - } +enum IsFinished { + Yes, + No, +} - if version < 6 { - v6::migrate::(&mut weight); - } +trait Migrate: Codec + MaxEncodedLen + Default { + const VERSION: u16; - if version < 7 { - v7::migrate::(&mut weight); - } + fn max_step_weight() -> Weight; - if version < 8 { - v8::migrate::(&mut weight); - } + fn step(&mut self) -> (IsFinished, Option); +} - if version < 9 { - v9::migrate::(&mut weight); - } +trait MigrateSequence { + const VERSION_RANGE: Option<(u16, u16)>; - StorageVersion::new(9).put::>(); - weight.saturating_accrue(T::DbWeight::get().writes(1)); + fn new(version: StorageVersion) -> Cursor; - weight - } + fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> Option; - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { - let version = >::on_chain_storage_version(); + fn integrity_test(); - if version == 7 { - v8::pre_upgrade::()?; + fn is_upgrade_supported(in_storage: StorageVersion, target: StorageVersion) -> bool { + if in_storage == target { + return true } - - Ok(version.encode()) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { - let version = Decode::decode(&mut state.as_ref()).map_err(|_| "Cannot decode version")?; - post_checks::post_upgrade::(version) - } -} - -/// V4: `Schedule` is changed to be a config item rather than an in-storage value. -mod v4 { - use super::*; - - pub fn migrate(weight: &mut Weight) { - #[allow(deprecated)] - migration::remove_storage_prefix(>::name().as_bytes(), b"CurrentSchedule", b""); - weight.saturating_accrue(T::DbWeight::get().writes(1)); + if in_storage > target { + return false + } + let Some((low, high)) = Self::VERSION_RANGE else { + return false + }; + let Some(first_supported) = low.checked_sub(1) else { + return false + }; + in_storage == first_supported && target == high } } -/// V5: State rent is removed which obsoletes some fields in `ContractInfo`. -mod v5 { - use super::*; - - type AliveContractInfo = - RawAliveContractInfo, BalanceOf, ::BlockNumber>; - type TombstoneContractInfo = RawTombstoneContractInfo< - ::Hash, - ::Hashing, - >; - - #[derive(Decode)] - enum OldContractInfo { - Alive(AliveContractInfo), - Tombstone(TombstoneContractInfo), - } +/// Performs all necessary migrations based on `StorageVersion`. +pub struct Migration(PhantomData); - #[derive(Decode)] - struct RawAliveContractInfo { - trie_id: TrieId, - _storage_size: u32, - _pair_count: u32, - code_hash: CodeHash, - _rent_allowance: Balance, - _rent_paid: Balance, - _deduct_block: BlockNumber, - _last_write: Option, - _reserved: Option<()>, - } +impl OnRuntimeUpgrade for Migration { + fn on_runtime_upgrade() -> Weight { + let latest_version = >::current_storage_version(); + let storage_version = >::on_chain_storage_version(); + let mut weight = T::DbWeight::get().reads(1); - #[derive(Decode)] - struct RawTombstoneContractInfo(H, PhantomData); + if storage_version == latest_version { + return weight + } - #[derive(Decode)] - struct OldDeletedContract { - _pair_count: u32, - trie_id: TrieId, - } + // In case a migration is already in progress we create the next migration + // (if any) right when the current one finishes. + weight.saturating_accrue(T::DbWeight::get().reads(1)); + if Self::in_progress() { + return weight + } - pub type ContractInfo = RawContractInfo>; + log::info!( + target: LOG_TARGET, + "RuntimeUpgraded. Upgrading storage from {storage_version:?} to {latest_version:?}.", + ); - #[derive(Encode, Decode)] - pub struct RawContractInfo { - pub trie_id: TrieId, - pub code_hash: CodeHash, - pub _reserved: Option<()>, - } + let cursor = Migrations::::new(storage_version + 1); + MigrationInProgress::::set(Some(cursor)); + weight.saturating_accrue(T::DbWeight::get().writes(1)); - #[derive(Encode, Decode)] - struct DeletedContract { - trie_id: TrieId, + weight } - #[storage_alias] - type ContractInfoOf = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - ContractInfo, - >; - - #[storage_alias] - type DeletionQueue = StorageValue, Vec>; - - pub fn migrate(weight: &mut Weight) { - >::translate(|_key, old: OldContractInfo| { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - match old { - OldContractInfo::Alive(old) => Some(ContractInfo:: { - trie_id: old.trie_id, - code_hash: old.code_hash, - _reserved: old._reserved, - }), - OldContractInfo::Tombstone(_) => None, - } - }); - - DeletionQueue::::translate(|old: Option>| { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - old.map(|old| old.into_iter().map(|o| DeletedContract { trie_id: o.trie_id }).collect()) - }) - .ok(); + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + // We can't really do much here as our migrations do not happen during the runtime upgrade. + // Instead, we call the migrations `pre_upgrade` and `post_upgrade` hooks when we iterate + // over our migrations. + let storage_version = >::on_chain_storage_version(); + let target_version = >::current_storage_version(); + if Migrations::::is_upgrade_supported(storage_version, target_version) { + Ok(Vec::new()) + } else { + Err("New runtime does not contain the required migrations to perform this upgrade.") + } } } -/// V6: Added storage deposits -mod v6 { - use super::*; - - #[derive(Encode, Decode)] - struct OldPrefabWasmModule { - #[codec(compact)] - instruction_weights_version: u32, - #[codec(compact)] - initial: u32, - #[codec(compact)] - maximum: u32, - #[codec(compact)] - refcount: u64, - _reserved: Option<()>, - code: Vec, - original_code_len: u32, - } - - #[derive(Encode, Decode)] - pub struct PrefabWasmModule { - #[codec(compact)] - pub instruction_weights_version: u32, - #[codec(compact)] - pub initial: u32, - #[codec(compact)] - pub maximum: u32, - pub code: Vec, - } - - use v5::ContractInfo as OldContractInfo; - - #[derive(Encode, Decode)] - pub struct RawContractInfo { - pub trie_id: TrieId, - pub code_hash: CodeHash, - pub storage_deposit: Balance, +impl Migration { + pub(crate) fn integrity_test() { + Migrations::::integrity_test() } - #[derive(Encode, Decode)] - pub struct OwnerInfo { - owner: T::AccountId, - #[codec(compact)] - deposit: BalanceOf, - #[codec(compact)] - refcount: u64, - } - - pub type ContractInfo = RawContractInfo, BalanceOf>; - - #[storage_alias] - type ContractInfoOf = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - ContractInfo, - >; - - #[storage_alias] - type CodeStorage = StorageMap, Identity, CodeHash, PrefabWasmModule>; - - #[storage_alias] - type OwnerInfoOf = StorageMap, Identity, CodeHash, OwnerInfo>; - - pub fn migrate(weight: &mut Weight) { - >::translate(|_key, old: OldContractInfo| { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - Some(ContractInfo:: { - trie_id: old.trie_id, - code_hash: old.code_hash, - storage_deposit: Default::default(), - }) - }); - - let nobody = T::AccountId::decode(&mut sp_runtime::traits::TrailingZeroInput::zeroes()) - .expect("Infinite input; no dead input space; qed"); - - >::translate(|key, old: OldPrefabWasmModule| { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 2)); - >::insert( - key, - OwnerInfo { - refcount: old.refcount, - owner: nobody.clone(), - deposit: Default::default(), + pub(crate) fn migrate(weight_limit: Weight) -> Result { + let mut weight_left = weight_limit; + + // for mutating `MigrationInProgress` and `StorageVersion` + weight_left + .checked_reduce(T::DbWeight::get().reads_writes(2, 2)) + .ok_or_else(|| (0.into(), Error::::NoMigrationPerformed.into()))?; + + MigrationInProgress::::try_mutate_exists(|progress| { + let cursor_before = progress.as_mut().ok_or_else(|| { + (weight_limit.saturating_sub(weight_left), Error::::NoMigrationPerformed.into()) + })?; + + // if a migration is running it is always upgrading to the next version + let storage_version = >::on_chain_storage_version(); + let in_progress_version = storage_version + 1; + + *progress = match Migrations::::steps( + in_progress_version, + cursor_before.as_ref(), + &mut weight_left, + ) { + // ongoing + Some(cursor) => { + // refund as we did not update the storage version + weight_left.saturating_accrue(T::DbWeight::get().writes(1)); + // we still have a cursor which keeps the pallet disabled + Some(cursor) }, - ); - Some(PrefabWasmModule { - instruction_weights_version: old.instruction_weights_version, - initial: old.initial, - maximum: old.maximum, - code: old.code, - }) - }); - } -} - -/// Rename `AccountCounter` to `Nonce`. -mod v7 { - use super::*; - - pub fn migrate(weight: &mut Weight) { - #[storage_alias] - type AccountCounter = StorageValue, u64, ValueQuery>; - #[storage_alias] - type Nonce = StorageValue, u64, ValueQuery>; + // finished + None => { + in_progress_version.put::>(); + if >::current_storage_version() != in_progress_version { + // chain the next migration + log::info!( + target: LOG_TARGET, + "Started migrating to {:?},", + in_progress_version + 1, + ); + Some(Migrations::::new(in_progress_version + 1)) + } else { + // enable pallet by removing the storage item + log::info!( + target: LOG_TARGET, + "All migrations done. At version {:?},", + in_progress_version + 1, + ); + None + } + }, + }; - Nonce::::set(AccountCounter::::take()); - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 2)) + Ok(weight_limit.saturating_sub(weight_left)) + }) } -} -/// Update `ContractInfo` with new fields that track storage deposits. -mod v8 { - use super::*; - use sp_io::default_child_storage as child; - use v6::ContractInfo as OldContractInfo; - - #[derive(Encode, Decode)] - pub struct ContractInfo { - pub trie_id: TrieId, - pub code_hash: CodeHash, - pub storage_bytes: u32, - pub storage_items: u32, - pub storage_byte_deposit: BalanceOf, - pub storage_item_deposit: BalanceOf, - pub storage_base_deposit: BalanceOf, + pub(crate) fn ensure_migrated() -> DispatchResult { + if Self::in_progress() { + Err(Error::::MigrationInProgress.into()) + } else { + Ok(()) + } } - #[storage_alias] - type ContractInfoOf = - StorageMap, Twox64Concat, ::AccountId, V>; - - pub fn migrate(weight: &mut Weight) { - >>::translate_values(|old: OldContractInfo| { - // Count storage items of this contract - let mut storage_bytes = 0u32; - let mut storage_items = 0u32; - let mut key = Vec::new(); - while let Some(next) = child::next_key(&old.trie_id, &key) { - key = next; - let mut val_out = []; - let len = child::read(&old.trie_id, &key, &mut val_out, 0) - .expect("The loop conditions checks for existence of the key; qed"); - storage_bytes.saturating_accrue(len); - storage_items.saturating_accrue(1); - } - - let storage_byte_deposit = - T::DepositPerByte::get().saturating_mul(storage_bytes.into()); - let storage_item_deposit = - T::DepositPerItem::get().saturating_mul(storage_items.into()); - let storage_base_deposit = old - .storage_deposit - .saturating_sub(storage_byte_deposit) - .saturating_sub(storage_item_deposit); - - // Reads: One read for each storage item plus the contract info itself. - // Writes: Only the new contract info. - weight.saturating_accrue( - T::DbWeight::get().reads_writes(u64::from(storage_items) + 1, 1), - ); - - Some(ContractInfo { - trie_id: old.trie_id, - code_hash: old.code_hash, - storage_bytes, - storage_items, - storage_byte_deposit, - storage_item_deposit, - storage_base_deposit, - }) - }); + fn in_progress() -> bool { + MigrationInProgress::::exists() } +} - #[cfg(feature = "try-runtime")] - pub fn pre_upgrade() -> Result<(), &'static str> { - use frame_support::traits::ReservableCurrency; - for (key, value) in ContractInfoOf::>::iter() { - let reserved = T::Currency::reserved_balance(&key); - ensure!(reserved >= value.storage_deposit, "Reserved balance out of sync."); - } - Ok(()) +#[impl_trait_for_tuples::impl_for_tuples(10)] +#[tuple_types_custom_trait_bound(Migrate)] +impl MigrateSequence for Tuple { + const VERSION_RANGE: Option<(u16, u16)> = { + let mut versions: Option<(u16, u16)> = None; + for_tuples!( + #( + match versions { + None => { + versions = Some((Tuple::VERSION, Tuple::VERSION)); + }, + Some((min_version, last_version)) if Tuple::VERSION == last_version + 1 => { + versions = Some((min_version, Tuple::VERSION)); + }, + _ => panic!("Migrations must be ordered by their versions with no gaps.") + } + )* + ); + versions + }; + + fn new(version: StorageVersion) -> Cursor { + for_tuples!( + #( + if version == Tuple::VERSION { + return Tuple::default().encode().try_into().expect(PROOF_ENCODE) + } + )* + ); + panic!("{PROOF_EXISTS}") } -} -/// Update `CodeStorage` with the new `determinism` field. -mod v9 { - use super::*; - use crate::Determinism; - use v6::PrefabWasmModule as OldPrefabWasmModule; - - #[derive(Encode, Decode)] - pub struct PrefabWasmModule { - #[codec(compact)] - pub instruction_weights_version: u32, - #[codec(compact)] - pub initial: u32, - #[codec(compact)] - pub maximum: u32, - pub code: Vec, - pub determinism: Determinism, + fn steps( + version: StorageVersion, + mut cursor: &[u8], + weight_left: &mut Weight, + ) -> Option { + for_tuples!( + #( + if version == Tuple::VERSION { + let mut migration = ::decode(&mut cursor) + .expect(PROOF_DECODE); + let max_weight = Tuple::max_step_weight(); + while weight_left.all_gt(max_weight) { + let (finished, weight) = migration.step(); + weight_left.saturating_reduce(weight.unwrap_or(max_weight)); + if matches!(finished, IsFinished::Yes) { + return None + } + } + return Some(migration.encode().try_into().expect(PROOF_ENCODE)) + } + )* + ); + panic!("{PROOF_EXISTS}") } - #[storage_alias] - type CodeStorage = StorageMap, Identity, CodeHash, PrefabWasmModule>; - - pub fn migrate(weight: &mut Weight) { - >::translate_values(|old: OldPrefabWasmModule| { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - Some(PrefabWasmModule { - instruction_weights_version: old.instruction_weights_version, - initial: old.initial, - maximum: old.maximum, - code: old.code, - determinism: Determinism::Enforced, - }) - }); + fn integrity_test() { + for_tuples!( + #( + let len = ::max_encoded_len(); + let max = Cursor::bound(); + if len > max { + let version = Tuple::VERSION; + panic!( + "Migration {} has size {} which is bigger than the maximum of {}", + version, len, max, + ); + } + )* + ); } } -// Post checks always need to be run against the latest storage version. This is why we -// do not scope them in the per version modules. They always need to be ported to the latest -// version. -#[cfg(feature = "try-runtime")] -mod post_checks { +#[cfg(test)] +mod test { use super::*; - use crate::Determinism; - use sp_io::default_child_storage as child; - use v8::ContractInfo; - use v9::PrefabWasmModule; - - #[storage_alias] - type CodeStorage = StorageMap, Identity, CodeHash, PrefabWasmModule>; - - #[storage_alias] - type ContractInfoOf = - StorageMap, Twox64Concat, ::AccountId, V>; - - pub fn post_upgrade(old_version: StorageVersion) -> Result<(), &'static str> { - if old_version < 7 { - return Ok(()) - } + use crate::tests::Test; - if old_version < 8 { - v8::()?; - } - - if old_version < 9 { - v9::()?; - } - - Ok(()) - } - - fn v8() -> Result<(), &'static str> { - use frame_support::traits::ReservableCurrency; - for (key, value) in ContractInfoOf::>::iter() { - let reserved = T::Currency::reserved_balance(&key); - let stored = value - .storage_base_deposit - .saturating_add(value.storage_byte_deposit) - .saturating_add(value.storage_item_deposit); - ensure!(reserved >= stored, "Reserved balance out of sync."); - - let mut storage_bytes = 0u32; - let mut storage_items = 0u32; - let mut key = Vec::new(); - while let Some(next) = child::next_key(&value.trie_id, &key) { - key = next; - let mut val_out = []; - let len = child::read(&value.trie_id, &key, &mut val_out, 0) - .expect("The loop conditions checks for existence of the key; qed"); - storage_bytes.saturating_accrue(len); - storage_items.saturating_accrue(1); - } - ensure!(storage_bytes == value.storage_bytes, "Storage bytes do not match.",); - ensure!(storage_items == value.storage_items, "Storage items do not match.",); - } - Ok(()) - } - - fn v9() -> Result<(), &'static str> { - for value in CodeStorage::::iter_values() { - ensure!( - value.determinism == Determinism::Enforced, - "All pre-existing codes need to be deterministic." - ); - } - Ok(()) + #[test] + fn check_versions() { + // this fails the compilation when running local tests + // otherwise it will only be evaluated when the whole runtime is build + let _ = Migrations::::VERSION_RANGE; } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs new file mode 100644 index 0000000000000..933d68ea375a3 --- /dev/null +++ b/frame/contracts/src/migration/v9.rs @@ -0,0 +1,96 @@ +// 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. + +//! Update `CodeStorage` with the new `determinism` field. + +use crate::{ + migration::{IsFinished, Migrate, PROOF_DECODE}, + CodeHash, Config, Determinism, Pallet, Weight, +}; +use codec::{Decode, Encode}; +use frame_support::{ + codec, pallet_prelude::*, storage, storage_alias, traits::Get, BoundedVec, DefaultNoBound, + Identity, StoragePrefixedMap, +}; +use sp_std::{marker::PhantomData, prelude::*}; + +#[derive(Encode, Decode)] +struct OldPrefabWasmModule { + #[codec(compact)] + pub instruction_weights_version: u32, + #[codec(compact)] + pub initial: u32, + #[codec(compact)] + pub maximum: u32, + pub code: Vec, +} + +#[derive(Encode, Decode)] +struct PrefabWasmModule { + #[codec(compact)] + pub instruction_weights_version: u32, + #[codec(compact)] + pub initial: u32, + #[codec(compact)] + pub maximum: u32, + pub code: Vec, + pub determinism: Determinism, +} + +#[storage_alias] +type OldCodeStorage = StorageMap, Identity, CodeHash, OldPrefabWasmModule>; + +#[storage_alias] +type CodeStorage = StorageMap, Identity, CodeHash, PrefabWasmModule>; + +#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] +pub struct Migration { + last_key: Option>>, + _phantom: PhantomData, +} + +impl Migrate for Migration { + const VERSION: u16 = 9; + + fn max_step_weight() -> Weight { + // TODO: benchmark step + Weight::from_parts(0, 0) + } + + fn step(&mut self) -> (IsFinished, Option) { + let mut iter = if let Some(last_key) = self.last_key.take() { + OldCodeStorage::::iter_from(last_key.to_vec()) + } else { + OldCodeStorage::::iter() + }; + + if let Some((key, old)) = iter.next() { + let module = PrefabWasmModule { + instruction_weights_version: old.instruction_weights_version, + initial: old.initial, + maximum: old.maximum, + code: old.code, + determinism: Determinism::Enforced, + }; + CodeStorage::::insert(key, module); + self.last_key = Some(iter.last_raw_key().to_vec().try_into().unwrap()); + (IsFinished::No, None) + } else { + (IsFinished::Yes, None) + } + } +} diff --git a/frame/support/src/traits/metadata.rs b/frame/support/src/traits/metadata.rs index 20ddb1d34ca1a..8daca3165e368 100644 --- a/frame/support/src/traits/metadata.rs +++ b/frame/support/src/traits/metadata.rs @@ -20,7 +20,7 @@ use codec::{Decode, Encode}; use impl_trait_for_tuples::impl_for_tuples; use sp_runtime::RuntimeDebug; -use sp_std::prelude::*; +use sp_std::{ops::Add, prelude::*}; /// Provides information about the pallet itself and its setup in the runtime. /// @@ -232,6 +232,14 @@ impl PartialOrd for StorageVersion { } } +impl Add for StorageVersion { + type Output = StorageVersion; + + fn add(self, rhs: u16) -> Self::Output { + Self::new(self.0 + rhs) + } +} + /// Provides information about the storage version of a pallet. /// /// It differentiates between current and on-chain storage version. Both should be only out of sync From e49f0ce0f6d4d72f4de98afffc1bdb6e61463946 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 14:16:41 +0200 Subject: [PATCH 03/74] Updates --- frame/contracts/src/benchmarking/mod.rs | 10 + frame/contracts/src/lib.rs | 43 ++- frame/contracts/src/migration.rs | 342 +++++++++++++++++++----- frame/contracts/src/migration/v9.rs | 68 +++-- frame/contracts/src/weights.rs | 10 + 5 files changed, 367 insertions(+), 106 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 6ebfb18509b1c..252daa4c2e1fb 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -234,6 +234,16 @@ benchmarks! { Contracts::::reinstrument_module(&mut module, &schedule)?; } + // This benchmarks the v9 migration cost + #[pov_mode = Measured] + v9_translate_wasm_module { + let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); + migration::v9::store_old_dummy_code::(c as usize); + let mut migration = migration::v9::Migration::::default(); + }: { + migration.step(); + } + // This benchmarks the overhead of loading a code of size `c` byte from storage and into // the sandbox. This does **not** include the actual execution for which the gas meter // is responsible. This is achieved by generating all code to the `deploy` function diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 41d510aa01e20..e06a1b02b90c1 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -131,7 +131,7 @@ use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; pub use crate::{ address::{AddressGenerator, DefaultAddressGenerator}, exec::Frame, - migration::Migration, + migration::*, pallet::*, schedule::{HostFnWeights, InstructionWeights, Limits, Schedule}, wasm::Determinism, @@ -177,8 +177,12 @@ pub mod pallet { use frame_system::pallet_prelude::*; /// The current storage version. + #[cfg(not(test))] const STORAGE_VERSION: StorageVersion = StorageVersion::new(9); + #[cfg(test)] + const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); + #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(PhantomData); @@ -314,10 +318,14 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { - // TODO: run migration here - if Migration::::ensure_migrated().is_err() { - return T::DbWeight::get().reads(1) - } + use MigrateResult::*; + + let remaining_weight = match Migration::::migrate(remaining_weight) { + (InProgress, weight) => return remaining_weight.saturating_sub(weight), + (NoMigrationPerformed | Completed, weight) => + remaining_weight.saturating_sub(weight), + }; + ContractInfo::::process_deletion_queue_batch(remaining_weight) .saturating_add(T::WeightInfo::on_process_deletion_queue_batch()) } @@ -724,15 +732,24 @@ pub mod pallet { ) } - /// TODO: add benchmark for base weight - /// TODO: add a minimum weight limit so that people don't spam small free extrinsics #[pallet::call_index(9)] - #[pallet::weight(*weight_limit)] + #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { ensure_signed(origin)?; - Migration::::migrate(weight_limit) - .map(|weight| PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }) - .map_err(|(weight, error)| error.with_weight(weight)) + ensure!( + weight_limit.any_gt(T::WeightInfo::migrate().saturating_mul(10)), + Error::::MigrateWeightLimitTooLow + ); + + use MigrateResult::*; + match Migration::::migrate(weight_limit) { + (InProgress | Completed, weight) => + Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), + (NoMigrationPerformed, weight) => { + let err: DispatchError = >::NoMigrationPerformed.into(); + Err(err.with_weight(weight)) + }, + } } } @@ -886,8 +903,12 @@ pub mod pallet { CodeRejected, /// An indetermistic code was used in a context where this is not permitted. Indeterministic, + /// A pending migration needs to complete before the extrinsic can be called. MigrationInProgress, + /// Migrate dispatch call was attempted but no migration was performed. NoMigrationPerformed, + /// The weight limit for a migration dispatch call was too low. + MigrateWeightLimitTooLow, } /// A mapping from an original code hash to the original code, untouched by instrumentation. diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 1d69baad453b5..4e11b49eb9460 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,6 +15,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#[cfg(feature = "runtime-benchmarks")] +pub mod v9; +#[cfg(not(feature = "runtime-benchmarks"))] mod v9; use crate::{Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; @@ -24,38 +27,97 @@ use frame_support::{ pallet_prelude::*, traits::{ConstU32, Get, OnRuntimeUpgrade}, }; -use sp_std::{marker::PhantomData, prelude::*}; +use sp_std::marker::PhantomData; + +#[cfg(feature = "try-runtime")] +use sp_std::prelude::*; const PROOF_ENCODE: &str = "Tuple::max_encoded_len() < Cursor::max_encoded_len()` is verified in `Self::integrity_test()`; qed"; const PROOF_DECODE: &str = "We encode to the same type in this trait only. No other code touches this item; qed"; -const PROOF_EXISTS: &str = "Required migration not supported by this runtime. This is a bug."; + +fn invalid_version(version: StorageVersion) -> ! { + panic!("Required migration {version:?} not supported by this runtime. This is a bug."); +} pub type Cursor = BoundedVec>; -type Migrations = (v9::Migration,); +type Migrations = (NoopMigration<7>, NoopMigration<8>, v9::Migration); -enum IsFinished { +/// IsFinished describes whether a migration is finished or not. +pub enum IsFinished { Yes, No, } -trait Migrate: Codec + MaxEncodedLen + Default { +/// A trait that allows to migrate storage from one version to another. +/// The migration is done in steps. The migration is finished when +/// `step()` returns `IsFinished::Yes`. +pub trait Migrate: Codec + MaxEncodedLen + Default { + /// Returns the version of the migration. const VERSION: u16; + /// Returns the maximum weight that can be consumed in a single step. fn max_step_weight() -> Weight; - fn step(&mut self) -> (IsFinished, Option); + /// Process one step of the migration. + /// Returns whether the migration is finished and the weight consumed. + fn step(&mut self) -> (IsFinished, Weight); } -trait MigrateSequence { - const VERSION_RANGE: Option<(u16, u16)>; +/// A noop migration that can be used when there is no migration to be done for a given version. +#[derive(frame_support::DefaultNoBound, Encode, Decode, MaxEncodedLen)] +pub struct NoopMigration; + +impl Migrate for NoopMigration { + const VERSION: u16 = N; + fn max_step_weight() -> Weight { + Weight::zero() + } + fn step(&mut self) -> (IsFinished, Weight) { + log::debug!(target: LOG_TARGET, "No migration for version {}", N); + (IsFinished::Yes, Weight::zero()) + } +} +mod private { + pub trait Sealed {} + #[impl_trait_for_tuples::impl_for_tuples(10)] + #[tuple_types_custom_trait_bound(crate::Migrate)] + impl Sealed for Tuple {} +} + +/// Defines a sequence of migrations. +/// The sequence must be defined by a tuple of migrations, each of which must implement the +/// `Migrate` trait. Migrations must be ordered by their versions with no gaps. +pub trait MigrateSequence: private::Sealed { + /// Returns the range of versions that this migration can handle. + /// Migrations must be ordered by their versions with no gaps. + /// The following code will fail to compile: + /// + /// The following code will fail to compile: + /// ```compile_fail + /// # use pallet_contracts::{NoopMigration, MigrateSequence}; + /// let _ = <(NoopMigration<1>, NoopMigration<3>)>::VERSION_RANGE; + /// ``` + /// The following code will compile: + /// ``` + /// # use pallet_contracts::{NoopMigration, MigrateSequence}; + /// let _ = <(NoopMigration<1>, NoopMigration<2>)>::VERSION_RANGE; + /// ``` + const VERSION_RANGE: (u16, u16); + + /// Returns the default cursor for the given version. fn new(version: StorageVersion) -> Cursor; + /// Execute the migration step until the weight limit is reached. + /// Returns the new cursor or `None` if the migration is finished. fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> Option; + /// Verify that each migration's cursor fits into the Cursor type. fn integrity_test(); + /// Returns whether migration from `in_storage` to `target` is supported. + /// A migration is supported if (in_storage + 1, target) is contained by `VERSION_RANGE`. fn is_upgrade_supported(in_storage: StorageVersion, target: StorageVersion) -> bool { if in_storage == target { return true @@ -63,20 +125,19 @@ trait MigrateSequence { if in_storage > target { return false } - let Some((low, high)) = Self::VERSION_RANGE else { - return false - }; + + let (low, high) = Self::VERSION_RANGE; let Some(first_supported) = low.checked_sub(1) else { return false }; - in_storage == first_supported && target == high + in_storage >= first_supported && target == high } } /// Performs all necessary migrations based on `StorageVersion`. -pub struct Migration(PhantomData); +pub struct Migration>(PhantomData<(T, M)>); -impl OnRuntimeUpgrade for Migration { +impl OnRuntimeUpgrade for Migration { fn on_runtime_upgrade() -> Weight { let latest_version = >::current_storage_version(); let storage_version = >::on_chain_storage_version(); @@ -98,10 +159,26 @@ impl OnRuntimeUpgrade for Migration { "RuntimeUpgraded. Upgrading storage from {storage_version:?} to {latest_version:?}.", ); - let cursor = Migrations::::new(storage_version + 1); + let cursor = M::new(storage_version + 1); MigrationInProgress::::set(Some(cursor)); weight.saturating_accrue(T::DbWeight::get().writes(1)); + // drive the migration to completion when using try-runtime + if cfg!(feature = "try-runtime") { + loop { + use MigrateResult::*; + match Migration::::migrate(Weight::MAX) { + (InProgress, w) => { + weight.saturating_add(w); + }, + (NoMigrationPerformed | Completed, w) => { + weight.saturating_add(w); + break + }, + } + } + } + weight } @@ -112,72 +189,100 @@ impl OnRuntimeUpgrade for Migration { // over our migrations. let storage_version = >::on_chain_storage_version(); let target_version = >::current_storage_version(); - if Migrations::::is_upgrade_supported(storage_version, target_version) { + if M::is_upgrade_supported(storage_version, target_version) { + let nonce = >::get(); + log::info!(target: LOG_TARGET, "Pre-upgrade current nonce: {}", nonce); + Ok(Vec::new()) } else { + log::error!( + target: LOG_TARGET, + "Range supported {:?}, range requested {:?}", + M::VERSION_RANGE, + (storage_version, target_version) + ); Err("New runtime does not contain the required migrations to perform this upgrade.") } } } -impl Migration { +/// The result of a migration step. +#[derive(Debug, PartialEq)] +pub enum MigrateResult { + NoMigrationPerformed, + InProgress, + Completed, +} + +impl Migration { pub(crate) fn integrity_test() { - Migrations::::integrity_test() + M::integrity_test() } - pub(crate) fn migrate(weight_limit: Weight) -> Result { + /// Migrate + /// Return the weight used and whether or not a migration is in progress + pub(crate) fn migrate(weight_limit: Weight) -> (MigrateResult, Weight) { let mut weight_left = weight_limit; // for mutating `MigrationInProgress` and `StorageVersion` - weight_left - .checked_reduce(T::DbWeight::get().reads_writes(2, 2)) - .ok_or_else(|| (0.into(), Error::::NoMigrationPerformed.into()))?; + if weight_left.checked_reduce(T::DbWeight::get().reads_writes(2, 2)).is_none() { + return (MigrateResult::NoMigrationPerformed, Weight::zero()) + } - MigrationInProgress::::try_mutate_exists(|progress| { - let cursor_before = progress.as_mut().ok_or_else(|| { - (weight_limit.saturating_sub(weight_left), Error::::NoMigrationPerformed.into()) - })?; + MigrationInProgress::::mutate_exists(|progress| { + let Some(cursor_before) = progress.as_mut() else { + return (MigrateResult::NoMigrationPerformed,weight_limit.saturating_sub(weight_left)) + }; // if a migration is running it is always upgrading to the next version let storage_version = >::on_chain_storage_version(); let in_progress_version = storage_version + 1; - *progress = match Migrations::::steps( + log::info!( + target: LOG_TARGET, + "Migrating from {:?} to {:?},", + storage_version, in_progress_version, - cursor_before.as_ref(), - &mut weight_left, - ) { - // ongoing - Some(cursor) => { - // refund as we did not update the storage version - weight_left.saturating_accrue(T::DbWeight::get().writes(1)); - // we still have a cursor which keeps the pallet disabled - Some(cursor) - }, - // finished - None => { - in_progress_version.put::>(); - if >::current_storage_version() != in_progress_version { - // chain the next migration - log::info!( - target: LOG_TARGET, - "Started migrating to {:?},", - in_progress_version + 1, - ); - Some(Migrations::::new(in_progress_version + 1)) - } else { - // enable pallet by removing the storage item - log::info!( - target: LOG_TARGET, - "All migrations done. At version {:?},", - in_progress_version + 1, - ); - None - } - }, + ); + + *progress = + match M::steps(in_progress_version, cursor_before.as_ref(), &mut weight_left) { + // ongoing + Some(cursor) => { + // refund as we did not update the storage version + weight_left.saturating_accrue(T::DbWeight::get().writes(1)); + // we still have a cursor which keeps the pallet disabled + Some(cursor) + }, + // finished + None => { + in_progress_version.put::>(); + if >::current_storage_version() != in_progress_version { + // chain the next migration + log::info!( + target: LOG_TARGET, + "Next migration is {:?},", + in_progress_version + 1, + ); + Some(M::new(in_progress_version + 1)) + } else { + // enable pallet by removing the storage item + log::info!( + target: LOG_TARGET, + "All migrations done. At version {:?},", + in_progress_version, + ); + None + } + }, + }; + + let state = match progress { + Some(_) => MigrateResult::InProgress, + None => MigrateResult::Completed, }; - Ok(weight_limit.saturating_sub(weight_left)) + (state, weight_limit.saturating_sub(weight_left)) }) } @@ -195,18 +300,18 @@ impl Migration { } #[impl_trait_for_tuples::impl_for_tuples(10)] -#[tuple_types_custom_trait_bound(Migrate)] -impl MigrateSequence for Tuple { - const VERSION_RANGE: Option<(u16, u16)> = { - let mut versions: Option<(u16, u16)> = None; +#[tuple_types_custom_trait_bound(Migrate)] +impl MigrateSequence for Tuple { + const VERSION_RANGE: (u16, u16) = { + let mut versions: (u16, u16) = (0, 0); for_tuples!( #( match versions { - None => { - versions = Some((Tuple::VERSION, Tuple::VERSION)); + (0, 0) => { + versions = (Tuple::VERSION, Tuple::VERSION); }, - Some((min_version, last_version)) if Tuple::VERSION == last_version + 1 => { - versions = Some((min_version, Tuple::VERSION)); + (min_version, last_version) if Tuple::VERSION == last_version + 1 => { + versions = (min_version, Tuple::VERSION); }, _ => panic!("Migrations must be ordered by their versions with no gaps.") } @@ -223,7 +328,7 @@ impl MigrateSequence for Tuple { } )* ); - panic!("{PROOF_EXISTS}") + invalid_version(version) } fn steps( @@ -239,7 +344,7 @@ impl MigrateSequence for Tuple { let max_weight = Tuple::max_step_weight(); while weight_left.all_gt(max_weight) { let (finished, weight) = migration.step(); - weight_left.saturating_reduce(weight.unwrap_or(max_weight)); + weight_left.saturating_reduce(weight); if matches!(finished, IsFinished::Yes) { return None } @@ -248,7 +353,7 @@ impl MigrateSequence for Tuple { } )* ); - panic!("{PROOF_EXISTS}") + invalid_version(version) } fn integrity_test() { @@ -271,7 +376,28 @@ impl MigrateSequence for Tuple { #[cfg(test)] mod test { use super::*; - use crate::tests::Test; + use crate::tests::{ExtBuilder, Test}; + + #[derive(frame_support::DefaultNoBound, Encode, Decode, MaxEncodedLen)] + struct MockMigration { + _phantom: sp_std::marker::PhantomData, + last_key: u16, + } + + impl Migrate for MockMigration { + const VERSION: u16 = N; + fn max_step_weight() -> Weight { + Weight::from_all(1) + } + fn step(&mut self) -> (IsFinished, Weight) { + self.last_key += 1; + if self.last_key == N { + (IsFinished::Yes, Weight::from_all(1)) + } else { + (IsFinished::No, Weight::from_all(1)) + } + } + } #[test] fn check_versions() { @@ -279,4 +405,78 @@ mod test { // otherwise it will only be evaluated when the whole runtime is build let _ = Migrations::::VERSION_RANGE; } + + #[test] + fn version_range_works() { + let range = <(MockMigration<1, Test>, MockMigration<2, Test>)>::VERSION_RANGE; + assert_eq!(range, (1, 2)); + } + + #[test] + fn is_upgrade_supported_works() { + type M = (MockMigration<7, Test>, MockMigration<8, Test>, MockMigration<9, Test>); + + [(1, 1), (6, 9), (8, 9)].into_iter().for_each(|(from, to)| { + assert!( + M::is_upgrade_supported(StorageVersion::new(from), StorageVersion::new(to)), + "{} -> {} is supported", + from, + to + ) + }); + + [(1, 0), (0, 3), (5, 9), (7, 10)].into_iter().for_each(|(from, to)| { + assert!( + !M::is_upgrade_supported(StorageVersion::new(from), StorageVersion::new(to)), + "{} -> {} is not supported", + from, + to + ) + }); + } + + #[test] + fn steps_works() { + type M = (MockMigration<2, Test>, MockMigration<3, Test>); + let version = StorageVersion::new(2); + let cursor = M::new(version); + + let mut weight = Weight::from_all(2); + let cursor = M::steps(version, &cursor, &mut weight).unwrap(); + assert_eq!(cursor.to_vec(), vec![1u8, 0]); + assert_eq!(weight, Weight::from_all(1)); + + let mut weight = Weight::from_all(2); + assert!(M::steps(version, &cursor, &mut weight).is_none()); + } + + #[test] + fn no_migration_performed_works() { + type M = (MockMigration<2, Test>, MockMigration<3, Test>); + type TestMigration = Migration; + + ExtBuilder::default().build().execute_with(|| { + assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed) + }); + } + + #[test] + fn migration_works() { + type M = (MockMigration<1, Test>, MockMigration<2, Test>); + type TestMigration = Migration; + + ExtBuilder::default().build().execute_with(|| { + TestMigration::on_runtime_upgrade(); + for (version, status) in [(1, MigrateResult::InProgress), (2, MigrateResult::Completed)] + { + assert_eq!(TestMigration::migrate(Weight::MAX).0, status); + assert_eq!( + >::on_chain_storage_version(), + StorageVersion::new(version) + ); + } + + assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed) + }); + } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index 933d68ea375a3..0f431a94b7354 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -18,25 +18,46 @@ //! Update `CodeStorage` with the new `determinism` field. use crate::{ - migration::{IsFinished, Migrate, PROOF_DECODE}, - CodeHash, Config, Determinism, Pallet, Weight, + migration::{IsFinished, Migrate}, + weights::WeightInfo, + CodeHash, Config, Determinism, Pallet, Weight, LOG_TARGET, }; use codec::{Decode, Encode}; use frame_support::{ - codec, pallet_prelude::*, storage, storage_alias, traits::Get, BoundedVec, DefaultNoBound, - Identity, StoragePrefixedMap, + codec, pallet_prelude::*, storage_alias, BoundedVec, DefaultNoBound, Identity, }; use sp_std::{marker::PhantomData, prelude::*}; -#[derive(Encode, Decode)] -struct OldPrefabWasmModule { - #[codec(compact)] - pub instruction_weights_version: u32, - #[codec(compact)] - pub initial: u32, - #[codec(compact)] - pub maximum: u32, - pub code: Vec, +mod old { + use super::*; + + #[derive(Encode, Decode)] + pub struct PrefabWasmModule { + #[codec(compact)] + pub instruction_weights_version: u32, + #[codec(compact)] + pub initial: u32, + #[codec(compact)] + pub maximum: u32, + pub code: Vec, + } + + #[storage_alias] + pub type CodeStorage = + StorageMap, Identity, CodeHash, PrefabWasmModule>; +} + +#[cfg(feature = "runtime-benchmarks")] +pub fn store_old_dummy_code(len: usize) { + use sp_runtime::traits::Hash; + let module = old::PrefabWasmModule { + instruction_weights_version: 0, + initial: 0, + maximum: 0, + code: vec![42u8; len], + }; + let hash = T::Hashing::hash(&module.code); + old::CodeStorage::::insert(hash, module); } #[derive(Encode, Decode)] @@ -51,9 +72,6 @@ struct PrefabWasmModule { pub determinism: Determinism, } -#[storage_alias] -type OldCodeStorage = StorageMap, Identity, CodeHash, OldPrefabWasmModule>; - #[storage_alias] type CodeStorage = StorageMap, Identity, CodeHash, PrefabWasmModule>; @@ -63,22 +81,23 @@ pub struct Migration { _phantom: PhantomData, } -impl Migrate for Migration { +impl Migrate for Migration { const VERSION: u16 = 9; fn max_step_weight() -> Weight { - // TODO: benchmark step - Weight::from_parts(0, 0) + T::WeightInfo::v9_translate_wasm_module(T::MaxCodeLen::get()) } - fn step(&mut self) -> (IsFinished, Option) { + fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_key) = self.last_key.take() { - OldCodeStorage::::iter_from(last_key.to_vec()) + old::CodeStorage::::iter_from(last_key.to_vec()) } else { - OldCodeStorage::::iter() + old::CodeStorage::::iter() }; if let Some((key, old)) = iter.next() { + log::debug!(target: LOG_TARGET, "Migrating contract code {:?}", key); + let len = old.code.len() as u32; let module = PrefabWasmModule { instruction_weights_version: old.instruction_weights_version, initial: old.initial, @@ -88,9 +107,10 @@ impl Migrate for Migration { }; CodeStorage::::insert(key, module); self.last_key = Some(iter.last_raw_key().to_vec().try_into().unwrap()); - (IsFinished::No, None) + (IsFinished::No, T::WeightInfo::v9_translate_wasm_module(len)) } else { - (IsFinished::Yes, None) + log::debug!(target: LOG_TARGET, "No more contracts code to migrate"); + (IsFinished::Yes, T::WeightInfo::v9_translate_wasm_module(0)) } } } diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index cdaba7f59b72f..5cecee9d39a0f 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -166,6 +166,16 @@ pub trait WeightInfo { fn instr_i64shru(r: u32, ) -> Weight; fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; + + // TODO run benchmark to generate + fn migrate() -> Weight { + Weight::from_parts(0, 0) + } + + // TODO run benchmark to generate + fn v9_translate_wasm_module(_r: u32, ) -> Weight { + Weight::from_parts(0, 0) + } } /// Weights for pallet_contracts using the Substrate node and recommended hardware. From 758902a0a0aad1ef88cf7f260a97205ed9d8f135 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 14:36:57 +0200 Subject: [PATCH 04/74] simplify MockMigration --- frame/contracts/src/migration.rs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 4e11b49eb9460..4fdb08664870e 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -378,20 +378,21 @@ mod test { use super::*; use crate::tests::{ExtBuilder, Test}; - #[derive(frame_support::DefaultNoBound, Encode, Decode, MaxEncodedLen)] - struct MockMigration { - _phantom: sp_std::marker::PhantomData, - last_key: u16, + #[derive(Default, Encode, Decode, MaxEncodedLen)] + struct MockMigration { + // MockMigration needs `N` steps to finish + count: u16, } - impl Migrate for MockMigration { + impl Migrate for MockMigration { const VERSION: u16 = N; fn max_step_weight() -> Weight { Weight::from_all(1) } fn step(&mut self) -> (IsFinished, Weight) { - self.last_key += 1; - if self.last_key == N { + assert!(self.count != N); + self.count += 1; + if self.count == N { (IsFinished::Yes, Weight::from_all(1)) } else { (IsFinished::No, Weight::from_all(1)) @@ -408,13 +409,13 @@ mod test { #[test] fn version_range_works() { - let range = <(MockMigration<1, Test>, MockMigration<2, Test>)>::VERSION_RANGE; + let range = <(MockMigration<1>, MockMigration<2>)>::VERSION_RANGE; assert_eq!(range, (1, 2)); } #[test] fn is_upgrade_supported_works() { - type M = (MockMigration<7, Test>, MockMigration<8, Test>, MockMigration<9, Test>); + type M = (MockMigration<7>, MockMigration<8>, MockMigration<9>); [(1, 1), (6, 9), (8, 9)].into_iter().for_each(|(from, to)| { assert!( @@ -437,7 +438,7 @@ mod test { #[test] fn steps_works() { - type M = (MockMigration<2, Test>, MockMigration<3, Test>); + type M = (MockMigration<2>, MockMigration<3>); let version = StorageVersion::new(2); let cursor = M::new(version); @@ -452,7 +453,7 @@ mod test { #[test] fn no_migration_performed_works() { - type M = (MockMigration<2, Test>, MockMigration<3, Test>); + type M = (MockMigration<2>, MockMigration<3>); type TestMigration = Migration; ExtBuilder::default().build().execute_with(|| { @@ -462,7 +463,7 @@ mod test { #[test] fn migration_works() { - type M = (MockMigration<1, Test>, MockMigration<2, Test>); + type M = (MockMigration<1>, MockMigration<2>); type TestMigration = Migration; ExtBuilder::default().build().execute_with(|| { From 3a9c925fb4abadaa702167fb1cf755aa8caa25aa Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 15:18:16 +0200 Subject: [PATCH 05/74] wip --- frame/contracts/src/migration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 4fdb08664870e..6573e2371dfa4 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -113,10 +113,10 @@ pub trait MigrateSequence: private::Sealed { /// Returns the new cursor or `None` if the migration is finished. fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> Option; - /// Verify that each migration's cursor fits into the Cursor type. + /// Verify that each migration's cursor fits into `Cursor`. fn integrity_test(); - /// Returns whether migration from `in_storage` to `target` is supported. + /// Returns whether migrating from `in_storage` to `target` is supported. /// A migration is supported if (in_storage + 1, target) is contained by `VERSION_RANGE`. fn is_upgrade_supported(in_storage: StorageVersion, target: StorageVersion) -> bool { if in_storage == target { From c7aa478f0a0348f84eb2eef7725b1dd726bc0129 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 15:19:16 +0200 Subject: [PATCH 06/74] wip --- frame/contracts/src/migration.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 6573e2371dfa4..7006043ba17f6 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -191,8 +191,6 @@ impl OnRuntimeUpgrade for Migration { let target_version = >::current_storage_version(); if M::is_upgrade_supported(storage_version, target_version) { let nonce = >::get(); - log::info!(target: LOG_TARGET, "Pre-upgrade current nonce: {}", nonce); - Ok(Vec::new()) } else { log::error!( From c5d33ce6618e31f69a758be7bda59a5cf664769f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 16:33:45 +0200 Subject: [PATCH 07/74] add bench --- frame/contracts/src/benchmarking/mod.rs | 6 ++++++ frame/contracts/src/lib.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 252daa4c2e1fb..88d7626345335 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -244,6 +244,12 @@ benchmarks! { migration.step(); } + // This benchmarks the base weight of dispatching a migrate call + #[pov_mode = Measured] + migrate { + let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); + }: _(origin, Weight::MAX) + // This benchmarks the overhead of loading a code of size `c` byte from storage and into // the sandbox. This does **not** include the actual execution for which the gas meter // is responsible. This is achieved by generating all code to the `deploy` function diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e06a1b02b90c1..1441a25f8fe43 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -746,6 +746,9 @@ pub mod pallet { (InProgress | Completed, weight) => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), (NoMigrationPerformed, weight) => { + if cfg!(feature = "runtime-benchmarks") { + return Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }) + } let err: DispatchError = >::NoMigrationPerformed.into(); Err(err.with_weight(weight)) }, From a27b8bc76f21fe5eda9906b09dfd5920e1a4f723 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 16:33:55 +0200 Subject: [PATCH 08/74] add bench --- frame/contracts/src/migration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 7006043ba17f6..be9bc2c4ef71c 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -207,6 +207,7 @@ impl OnRuntimeUpgrade for Migration { /// The result of a migration step. #[derive(Debug, PartialEq)] pub enum MigrateResult { + /// No migration was performed NoMigrationPerformed, InProgress, Completed, From d4eee87f10d0d0005356c83cdde2d6dd66734d8b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 16:34:21 +0200 Subject: [PATCH 09/74] fmt --- frame/contracts/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 1441a25f8fe43..9c38b8538152b 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -747,7 +747,10 @@ pub mod pallet { Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), (NoMigrationPerformed, weight) => { if cfg!(feature = "runtime-benchmarks") { - return Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }) + return Ok(PostDispatchInfo { + actual_weight: Some(weight), + pays_fee: Pays::No, + }) } let err: DispatchError = >::NoMigrationPerformed.into(); Err(err.with_weight(weight)) From f5d96389572442ea8e356babd1471ab7e0d3fcbb Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 17:08:44 +0200 Subject: [PATCH 10/74] fix bench --- frame/contracts/src/benchmarking/mod.rs | 4 +++- frame/contracts/src/lib.rs | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 88d7626345335..b6f1f679a8cfe 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -248,7 +248,9 @@ benchmarks! { #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - }: _(origin, Weight::MAX) + }: { + >::migrate(origin.into(), Weight::MAX).unwrap_or_default() + } // This benchmarks the overhead of loading a code of size `c` byte from storage and into // the sandbox. This does **not** include the actual execution for which the gas meter diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 9c38b8538152b..e06a1b02b90c1 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -746,12 +746,6 @@ pub mod pallet { (InProgress | Completed, weight) => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), (NoMigrationPerformed, weight) => { - if cfg!(feature = "runtime-benchmarks") { - return Ok(PostDispatchInfo { - actual_weight: Some(weight), - pays_fee: Pays::No, - }) - } let err: DispatchError = >::NoMigrationPerformed.into(); Err(err.with_weight(weight)) }, From dc501ce4b730d43e443d9c55dcb7ecb8e4ed1efc Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 2 May 2023 17:09:48 +0200 Subject: [PATCH 11/74] add . --- frame/contracts/src/benchmarking/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index b6f1f679a8cfe..10cf60e2d1d66 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -234,7 +234,7 @@ benchmarks! { Contracts::::reinstrument_module(&mut module, &schedule)?; } - // This benchmarks the v9 migration cost + // This benchmarks the v9 migration cost. #[pov_mode = Measured] v9_translate_wasm_module { let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); @@ -244,7 +244,7 @@ benchmarks! { migration.step(); } - // This benchmarks the base weight of dispatching a migrate call + // This benchmarks the base weight of dispatching a migrate call. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); From e6cd691612a4fa165b1bbfa98e735871cf2bab58 Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Tue, 2 May 2023 19:45:49 +0000 Subject: [PATCH 12/74] ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts --- frame/contracts/src/weights.rs | 2468 ++++++++++++++++++-------------- 1 file changed, 1358 insertions(+), 1110 deletions(-) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 5cecee9d39a0f..3664cdf510c0c 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -18,30 +18,32 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/substrate +// target/production/substrate // benchmark // pallet -// --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_contracts // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./frame/contracts/src/weights.rs +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json +// --pallet=pallet_contracts +// --chain=dev // --header=./HEADER-APACHE2 +// --output=./frame/contracts/src/weights.rs // --template=./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; @@ -51,6 +53,8 @@ pub trait WeightInfo { fn on_process_deletion_queue_batch() -> Weight; fn on_initialize_per_trie_key(k: u32, ) -> Weight; fn reinstrument(c: u32, ) -> Weight; + fn v9_translate_wasm_module(c: u32, ) -> Weight; + fn migrate() -> Weight; fn call_with_code_per_byte(c: u32, ) -> Weight; fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight; fn instantiate(i: u32, s: u32, ) -> Weight; @@ -166,16 +170,6 @@ pub trait WeightInfo { fn instr_i64shru(r: u32, ) -> Weight; fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; - - // TODO run benchmark to generate - fn migrate() -> Weight { - Weight::from_parts(0, 0) - } - - // TODO run benchmark to generate - fn v9_translate_wasm_module(_r: u32, ) -> Weight { - Weight::from_parts(0, 0) - } } /// Weights for pallet_contracts using the Substrate node and recommended hardware. @@ -187,8 +181,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_565_000 picoseconds. - Weight::from_parts(2_759_000, 1594) + // Minimum execution time: 2_548_000 picoseconds. + Weight::from_parts(2_677_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -198,10 +192,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_480_000 picoseconds. - Weight::from_parts(10_153_869, 478) - // Standard Error: 427 - .saturating_add(Weight::from_parts(958_726, 0).saturating_mul(k.into())) + // Minimum execution time: 13_465_000 picoseconds. + Weight::from_parts(8_978_953, 478) + // Standard Error: 947 + .saturating_add(Weight::from_parts(967_373, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -217,14 +211,41 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_406_000 picoseconds. - Weight::from_parts(28_467_370, 3708) - // Standard Error: 46 - .saturating_add(Weight::from_parts(53_724, 0).saturating_mul(c.into())) + // Minimum execution time: 30_499_000 picoseconds. + Weight::from_parts(22_221_289, 3708) + // Standard Error: 128 + .saturating_add(Weight::from_parts(54_915, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts CodeStorage (r:2 w:1) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// The range of component `c` is `[0, 61717]`. + fn v9_translate_wasm_module(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `178 + c * (1 ±0)` + // Estimated: `6114 + c * (1 ±0)` + // Minimum execution time: 9_369_000 picoseconds. + Weight::from_parts(10_852_386, 6114) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_306, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_978_000 picoseconds. + Weight::from_parts(6_097_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -240,14 +261,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 263_198_000 picoseconds. - Weight::from_parts(276_162_279, 6656) - // Standard Error: 18 - .saturating_add(Weight::from_parts(37_378, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 266_158_000 picoseconds. + Weight::from_parts(279_911_136, 6656) + // Standard Error: 29 + .saturating_add(Weight::from_parts(37_837, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -271,17 +294,19 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_132_259_000 picoseconds. - Weight::from_parts(513_284_834, 8659) - // Standard Error: 280 - .saturating_add(Weight::from_parts(106_723, 0).saturating_mul(c.into())) + // Minimum execution time: 3_133_022_000 picoseconds. + Weight::from_parts(647_533_067, 8659) + // Standard Error: 283 + .saturating_add(Weight::from_parts(106_602, 0).saturating_mul(c.into())) // Standard Error: 16 - .saturating_add(Weight::from_parts(1_166, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_117, 0).saturating_mul(i.into())) // Standard Error: 16 - .saturating_add(Weight::from_parts(1_436, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(Weight::from_parts(1_405, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -302,15 +327,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_646_604_000 picoseconds. - Weight::from_parts(271_369_256, 6408) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_426, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_438, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Minimum execution time: 1_651_947_000 picoseconds. + Weight::from_parts(293_042_001, 6408) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_444, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -325,11 +352,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 191_360_000 picoseconds. - Weight::from_parts(192_625_000, 6699) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 194_753_000 picoseconds. + Weight::from_parts(195_766_000, 6699) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -343,13 +372,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 245_207_000 picoseconds. - Weight::from_parts(244_703_457, 3574) - // Standard Error: 61 - .saturating_add(Weight::from_parts(106_850, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Minimum execution time: 256_804_000 picoseconds. + Weight::from_parts(267_432_334, 3574) + // Standard Error: 103 + .saturating_add(Weight::from_parts(108_385, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -362,11 +393,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_560_000 picoseconds. - Weight::from_parts(33_833_000, 3720) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Minimum execution time: 34_924_000 picoseconds. + Weight::from_parts(35_867_000, 3720) + .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:2 w:2) @@ -377,11 +410,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_288_000 picoseconds. - Weight::from_parts(33_775_000, 8985) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 34_578_000 picoseconds. + Weight::from_parts(35_470_000, 8985) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -397,14 +432,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 234_292_000 picoseconds. - Weight::from_parts(235_941_911, 6722) - // Standard Error: 413 - .saturating_add(Weight::from_parts(339_913, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_237_000 picoseconds. + Weight::from_parts(246_399_253, 6722) + // Standard Error: 781 + .saturating_add(Weight::from_parts(322_803, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -420,15 +457,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 236_273_000 picoseconds. - Weight::from_parts(74_380_906, 6743) - // Standard Error: 5_745 - .saturating_add(Weight::from_parts(3_331_781, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_025_000 picoseconds. + Weight::from_parts(76_642_081, 6743) + // Standard Error: 6_541 + .saturating_add(Weight::from_parts(3_308_462, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -444,15 +483,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 236_573_000 picoseconds. - Weight::from_parts(82_473_906, 6747) - // Standard Error: 5_510 - .saturating_add(Weight::from_parts(4_131_820, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 240_177_000 picoseconds. + Weight::from_parts(66_393_427, 6747) + // Standard Error: 7_670 + .saturating_add(Weight::from_parts(4_164_419, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -468,14 +509,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 235_878_000 picoseconds. - Weight::from_parts(238_387_359, 6730) - // Standard Error: 318 - .saturating_add(Weight::from_parts(409_923, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_175_000 picoseconds. + Weight::from_parts(247_360_071, 6730) + // Standard Error: 5_724 + .saturating_add(Weight::from_parts(412_164, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -491,14 +534,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 233_476_000 picoseconds. - Weight::from_parts(238_014_452, 6723) - // Standard Error: 145 - .saturating_add(Weight::from_parts(165_823, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 234_959_000 picoseconds. + Weight::from_parts(241_263_663, 6723) + // Standard Error: 422 + .saturating_add(Weight::from_parts(160_204, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -514,14 +559,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_490_000 picoseconds. - Weight::from_parts(240_039_685, 6724) - // Standard Error: 330 - .saturating_add(Weight::from_parts(332_291, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_469_000 picoseconds. + Weight::from_parts(244_507_496, 6724) + // Standard Error: 761 + .saturating_add(Weight::from_parts(322_807, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -535,16 +582,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `783 + r * (6 ±0)` - // Estimated: `6721 + r * (6 ±0)` - // Minimum execution time: 236_093_000 picoseconds. - Weight::from_parts(238_513_328, 6721) - // Standard Error: 206 - .saturating_add(Weight::from_parts(328_899, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Measured: `778 + r * (6 ±0)` + // Estimated: `6719 + r * (6 ±0)` + // Minimum execution time: 237_524_000 picoseconds. + Weight::from_parts(241_895_288, 6719) + // Standard Error: 773 + .saturating_add(Weight::from_parts(521_994, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:2 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -560,14 +609,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 234_801_000 picoseconds. - Weight::from_parts(243_519_159, 6846) - // Standard Error: 1_367 - .saturating_add(Weight::from_parts(1_449_599, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 240_344_000 picoseconds. + Weight::from_parts(246_991_292, 6846) + // Standard Error: 1_133 + .saturating_add(Weight::from_parts(1_462_720, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -583,14 +634,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 236_765_000 picoseconds. - Weight::from_parts(237_843_244, 6741) - // Standard Error: 308 - .saturating_add(Weight::from_parts(329_911, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_908_000 picoseconds. + Weight::from_parts(242_820_641, 6741) + // Standard Error: 597 + .saturating_add(Weight::from_parts(324_174, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -606,14 +659,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 236_690_000 picoseconds. - Weight::from_parts(241_743_164, 6739) - // Standard Error: 333 - .saturating_add(Weight::from_parts(324_693, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_856_000 picoseconds. + Weight::from_parts(251_150_544, 6739) + // Standard Error: 868 + .saturating_add(Weight::from_parts(315_232, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -629,14 +684,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 236_149_000 picoseconds. - Weight::from_parts(239_090_707, 6737) - // Standard Error: 246 - .saturating_add(Weight::from_parts(344_488, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_197_000 picoseconds. + Weight::from_parts(241_186_858, 6737) + // Standard Error: 639 + .saturating_add(Weight::from_parts(318_375, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -652,14 +709,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 235_057_000 picoseconds. - Weight::from_parts(237_752_870, 6723) - // Standard Error: 236 - .saturating_add(Weight::from_parts(328_235, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_676_000 picoseconds. + Weight::from_parts(243_872_868, 6723) + // Standard Error: 611 + .saturating_add(Weight::from_parts(316_938, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -675,16 +734,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (10 ±0)` - // Estimated: `6796 + r * (10 ±0)` - // Minimum execution time: 234_995_000 picoseconds. - Weight::from_parts(246_473_554, 6796) - // Standard Error: 1_015 - .saturating_add(Weight::from_parts(1_337_653, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `852 + r * (14 ±0)` + // Estimated: `6785 + r * (14 ±0)` + // Minimum execution time: 237_520_000 picoseconds. + Weight::from_parts(258_882_921, 6785) + // Standard Error: 1_949 + .saturating_add(Weight::from_parts(1_365_562, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -700,14 +761,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 160_445_000 picoseconds. - Weight::from_parts(165_558_135, 6687) - // Standard Error: 234 - .saturating_add(Weight::from_parts(133_607, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 163_866_000 picoseconds. + Weight::from_parts(166_333_760, 6687) + // Standard Error: 2_405 + .saturating_add(Weight::from_parts(138_325, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -723,14 +786,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_065_000 picoseconds. - Weight::from_parts(237_797_177, 6724) - // Standard Error: 336 - .saturating_add(Weight::from_parts(267_302, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_456_000 picoseconds. + Weight::from_parts(245_578_643, 6724) + // Standard Error: 549 + .saturating_add(Weight::from_parts(265_605, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -746,13 +811,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 236_215_000 picoseconds. - Weight::from_parts(239_347_313, 6724) - // Standard Error: 0 - .saturating_add(Weight::from_parts(587, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_032_000 picoseconds. + Weight::from_parts(242_874_505, 6724) + // Standard Error: 1 + .saturating_add(Weight::from_parts(593, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -768,14 +835,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 231_571_000 picoseconds. - Weight::from_parts(233_477_918, 6708) - // Standard Error: 95_776 - .saturating_add(Weight::from_parts(1_733_181, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 234_478_000 picoseconds. + Weight::from_parts(237_534_048, 6708) + // Standard Error: 197_777 + .saturating_add(Weight::from_parts(1_581_051, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -791,13 +860,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 234_956_000 picoseconds. - Weight::from_parts(236_785_051, 6731) + // Minimum execution time: 237_015_000 picoseconds. + Weight::from_parts(239_909_565, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -819,16 +890,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 234_275_000 picoseconds. - Weight::from_parts(236_776_769, 6750) - // Standard Error: 137_203 - .saturating_add(Weight::from_parts(110_758_930, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 236_370_000 picoseconds. + Weight::from_parts(239_243_467, 6750) + // Standard Error: 274_349 + .saturating_add(Weight::from_parts(115_896_632, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 7781).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -846,14 +919,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 235_593_000 picoseconds. - Weight::from_parts(253_731_242, 6769) - // Standard Error: 2_129 - .saturating_add(Weight::from_parts(1_771_297, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 239_772_000 picoseconds. + Weight::from_parts(242_724_214, 6769) + // Standard Error: 2_967 + .saturating_add(Weight::from_parts(1_754_941, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -869,14 +944,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 232_124_000 picoseconds. - Weight::from_parts(245_904_447, 6723) - // Standard Error: 2_185 - .saturating_add(Weight::from_parts(3_470_410, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 235_440_000 picoseconds. + Weight::from_parts(272_455_779, 6723) + // Standard Error: 4_633 + .saturating_add(Weight::from_parts(3_484_878, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -893,18 +970,20 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 250_301_000 picoseconds. - Weight::from_parts(245_292_258, 6744) - // Standard Error: 29_864 - .saturating_add(Weight::from_parts(2_163_531, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(583, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 254_882_000 picoseconds. + Weight::from_parts(249_748_140, 6744) + // Standard Error: 94_551 + .saturating_add(Weight::from_parts(2_385_909, 0).saturating_mul(t.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -920,14 +999,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 165_711_000 picoseconds. - Weight::from_parts(168_792_571, 6721) - // Standard Error: 216 - .saturating_add(Weight::from_parts(230_285, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 166_376_000 picoseconds. + Weight::from_parts(171_383_256, 6721) + // Standard Error: 345 + .saturating_add(Weight::from_parts(233_133, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -943,11 +1024,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 348_928_000 picoseconds. - Weight::from_parts(352_224_793, 131670) - // Standard Error: 0 - .saturating_add(Weight::from_parts(731, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 353_406_000 picoseconds. + Weight::from_parts(357_371_823, 131670) + // Standard Error: 1 + .saturating_add(Weight::from_parts(740, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -957,11 +1038,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 236_418_000 picoseconds. - Weight::from_parts(129_862_840, 843) - // Standard Error: 9_733 - .saturating_add(Weight::from_parts(6_005_187, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_610_000 picoseconds. + Weight::from_parts(129_137_013, 843) + // Standard Error: 10_406 + .saturating_add(Weight::from_parts(6_175_998, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -974,11 +1055,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 251_599_000 picoseconds. - Weight::from_parts(285_284_665, 1280) - // Standard Error: 46 - .saturating_add(Weight::from_parts(410, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Minimum execution time: 253_714_000 picoseconds. + Weight::from_parts(286_943_345, 1280) + // Standard Error: 52 + .saturating_add(Weight::from_parts(580, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -988,11 +1069,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 251_309_000 picoseconds. - Weight::from_parts(253_555_552, 1167) - // Standard Error: 9 - .saturating_add(Weight::from_parts(27, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 254_191_000 picoseconds. + Weight::from_parts(260_134_212, 1167) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1003,11 +1082,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 235_441_000 picoseconds. - Weight::from_parts(132_980_942, 845) - // Standard Error: 9_421 - .saturating_add(Weight::from_parts(5_854_896, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_786_000 picoseconds. + Weight::from_parts(130_111_573, 845) + // Standard Error: 10_357 + .saturating_add(Weight::from_parts(5_982_349, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -1020,11 +1099,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 249_967_000 picoseconds. - Weight::from_parts(252_122_186, 1163) - // Standard Error: 10 - .saturating_add(Weight::from_parts(74, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 253_416_000 picoseconds. + Weight::from_parts(255_813_949, 1163) + // Standard Error: 24 + .saturating_add(Weight::from_parts(159, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1035,11 +1114,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 235_647_000 picoseconds. - Weight::from_parts(145_525_169, 840) - // Standard Error: 8_553 - .saturating_add(Weight::from_parts(4_948_021, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_113_000 picoseconds. + Weight::from_parts(150_650_781, 840) + // Standard Error: 9_285 + .saturating_add(Weight::from_parts(4_954_934, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) @@ -1051,11 +1130,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 249_576_000 picoseconds. - Weight::from_parts(250_747_191, 1179) - // Standard Error: 8 - .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 254_076_000 picoseconds. + Weight::from_parts(256_571_975, 1179) + // Standard Error: 36 + .saturating_add(Weight::from_parts(590, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1066,11 +1145,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 236_110_000 picoseconds. - Weight::from_parts(148_420_625, 857) - // Standard Error: 8_175 - .saturating_add(Weight::from_parts(4_684_126, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_142_000 picoseconds. + Weight::from_parts(151_921_194, 857) + // Standard Error: 8_732 + .saturating_add(Weight::from_parts(4_789_792, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) @@ -1082,11 +1161,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 247_800_000 picoseconds. - Weight::from_parts(249_410_575, 1166) - // Standard Error: 6 - .saturating_add(Weight::from_parts(99, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 251_295_000 picoseconds. + Weight::from_parts(253_924_366, 1166) + // Standard Error: 29 + .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1097,11 +1176,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 235_251_000 picoseconds. - Weight::from_parts(128_816_707, 836) - // Standard Error: 9_887 - .saturating_add(Weight::from_parts(6_167_176, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_249_000 picoseconds. + Weight::from_parts(136_162_523, 836) + // Standard Error: 10_064 + .saturating_add(Weight::from_parts(6_136_548, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -1114,14 +1193,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 250_401_000 picoseconds. - Weight::from_parts(253_298_243, 1180) - // Standard Error: 9 - .saturating_add(Weight::from_parts(667, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 253_832_000 picoseconds. + Weight::from_parts(256_959_533, 1180) + // Standard Error: 17 + .saturating_add(Weight::from_parts(656, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1601) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1137,16 +1218,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 236_470_000 picoseconds. - Weight::from_parts(98_898_727, 7270) - // Standard Error: 33_316 - .saturating_add(Weight::from_parts(35_149_946, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 239_088_000 picoseconds. + Weight::from_parts(285_114_297, 7270) + // Standard Error: 46_679 + .saturating_add(Weight::from_parts(35_601_583, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -1160,18 +1243,20 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1237 + r * (256 ±0)` - // Estimated: `7125 + r * (2732 ±0)` - // Minimum execution time: 238_303_000 picoseconds. - Weight::from_parts(239_024_000, 7125) - // Standard Error: 65_907 - .saturating_add(Weight::from_parts(209_419_071, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `1140 + r * (276 ±0)` + // Estimated: `7049 + r * (2752 ±0)` + // Minimum execution time: 240_796_000 picoseconds. + Weight::from_parts(241_521_000, 7049) + // Standard Error: 96_067 + .saturating_add(Weight::from_parts(213_656_608, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2732).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1186,17 +1271,19 @@ impl WeightInfo for SubstrateWeight { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` - // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 235_961_000 picoseconds. - Weight::from_parts(236_939_000, 6727) - // Standard Error: 83_087 - .saturating_add(Weight::from_parts(205_646_517, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Estimated: `6727 + r * (2572 ±3)` + // Minimum execution time: 239_065_000 picoseconds. + Weight::from_parts(240_123_000, 6727) + // Standard Error: 94_312 + .saturating_add(Weight::from_parts(208_326_355, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2572).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:3 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -1213,18 +1300,20 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 410_156_000 picoseconds. - Weight::from_parts(378_378_143, 9569) - // Standard Error: 285_172 - .saturating_add(Weight::from_parts(34_736_740, 0).saturating_mul(t.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(591, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Minimum execution time: 414_681_000 picoseconds. + Weight::from_parts(387_233_284, 9569) + // Standard Error: 923_756 + .saturating_add(Weight::from_parts(31_886_473, 0).saturating_mul(t.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1602) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -1239,21 +1328,23 @@ impl WeightInfo for SubstrateWeight { /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:802 w:802) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 800]`. + /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1301 + r * (254 ±0)` - // Estimated: `7131 + r * (5205 ±0)` - // Minimum execution time: 236_748_000 picoseconds. - Weight::from_parts(237_129_000, 7131) - // Standard Error: 280_059 - .saturating_add(Weight::from_parts(341_428_013, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Measured: `1322 + r * (254 ±0)` + // Estimated: `7146 + r * (5205 ±0)` + // Minimum execution time: 574_065_000 picoseconds. + Weight::from_parts(575_592_000, 7146) + // Standard Error: 246_955 + .saturating_add(Weight::from_parts(345_705_670, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 5205).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -1275,20 +1366,22 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_613_796_000 picoseconds. - Weight::from_parts(340_002_206, 9492) - // Standard Error: 4_296_381 - .saturating_add(Weight::from_parts(115_239_834, 0).saturating_mul(t.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_145, 0).saturating_mul(i.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(13_u64)) + // Minimum execution time: 1_615_748_000 picoseconds. + Weight::from_parts(341_307_617, 9492) + // Standard Error: 5_315_899 + .saturating_add(Weight::from_parts(119_339_357, 0).saturating_mul(t.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_343, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2634).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1304,14 +1397,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 233_111_000 picoseconds. - Weight::from_parts(238_643_933, 6718) - // Standard Error: 184 - .saturating_add(Weight::from_parts(572_296, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 235_569_000 picoseconds. + Weight::from_parts(240_272_470, 6718) + // Standard Error: 739 + .saturating_add(Weight::from_parts(569_501, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1327,13 +1422,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 234_746_000 picoseconds. - Weight::from_parts(229_815_552, 6725) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_892, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 236_251_000 picoseconds. + Weight::from_parts(231_532_969, 6725) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_935, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1349,14 +1446,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 232_732_000 picoseconds. - Weight::from_parts(239_007_209, 6721) - // Standard Error: 256 - .saturating_add(Weight::from_parts(733_879, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 235_261_000 picoseconds. + Weight::from_parts(245_916_216, 6721) + // Standard Error: 2_735 + .saturating_add(Weight::from_parts(746_676, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1372,13 +1471,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 234_184_000 picoseconds. - Weight::from_parts(227_603_375, 6729) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_127, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_766_000 picoseconds. + Weight::from_parts(224_241_852, 6729) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_182, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1394,14 +1495,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 233_038_000 picoseconds. - Weight::from_parts(238_515_817, 6724) - // Standard Error: 255 - .saturating_add(Weight::from_parts(413_343, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 235_106_000 picoseconds. + Weight::from_parts(240_306_761, 6724) + // Standard Error: 753 + .saturating_add(Weight::from_parts(415_885, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1417,13 +1520,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 232_996_000 picoseconds. - Weight::from_parts(226_706_997, 6733) - // Standard Error: 1 - .saturating_add(Weight::from_parts(908, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 237_193_000 picoseconds. + Weight::from_parts(235_328_929, 6733) + // Standard Error: 3 + .saturating_add(Weight::from_parts(915, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1439,14 +1544,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 232_292_000 picoseconds. - Weight::from_parts(237_997_001, 6725) - // Standard Error: 219 - .saturating_add(Weight::from_parts(410_177, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 235_233_000 picoseconds. + Weight::from_parts(243_027_485, 6725) + // Standard Error: 709 + .saturating_add(Weight::from_parts(407_457, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1462,13 +1569,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 234_815_000 picoseconds. - Weight::from_parts(226_317_150, 6727) - // Standard Error: 1 - .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 236_933_000 picoseconds. + Weight::from_parts(229_499_726, 6727) + // Standard Error: 2 + .saturating_add(Weight::from_parts(916, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1483,15 +1592,17 @@ impl WeightInfo for SubstrateWeight { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6848 + n * (1 ±0)` - // Minimum execution time: 286_323_000 picoseconds. - Weight::from_parts(290_287_955, 6848) - // Standard Error: 1 - .saturating_add(Weight::from_parts(4_693, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Estimated: `6849 + n * (1 ±0)` + // Minimum execution time: 289_569_000 picoseconds. + Weight::from_parts(295_501_374, 6849) + // Standard Error: 8 + .saturating_add(Weight::from_parts(4_718, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1505,16 +1616,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `727 + r * (112 ±0)` + // Measured: `722 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 235_938_000 picoseconds. - Weight::from_parts(242_728_358, 6666) - // Standard Error: 9_725 - .saturating_add(Weight::from_parts(47_527_740, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_956_000 picoseconds. + Weight::from_parts(249_363_777, 6666) + // Standard Error: 21_411 + .saturating_add(Weight::from_parts(48_134_102, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1528,16 +1641,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `822 + r * (76 ±0)` + // Measured: `821 + r * (76 ±0)` // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 236_108_000 picoseconds. - Weight::from_parts(248_577_226, 6716) - // Standard Error: 9_565 - .saturating_add(Weight::from_parts(36_733_552, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_366_000 picoseconds. + Weight::from_parts(256_403_505, 6716) + // Standard Error: 19_860 + .saturating_add(Weight::from_parts(37_761_641, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1553,14 +1668,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 236_440_000 picoseconds. - Weight::from_parts(240_771_418, 6731) - // Standard Error: 1_849 - .saturating_add(Weight::from_parts(9_185_896, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_127_000 picoseconds. + Weight::from_parts(243_612_263, 6731) + // Standard Error: 9_428 + .saturating_add(Weight::from_parts(9_337_164, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1577,17 +1694,19 @@ impl WeightInfo for SubstrateWeight { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±10)` - // Minimum execution time: 235_056_000 picoseconds. - Weight::from_parts(235_743_000, 8190) - // Standard Error: 46_122 - .saturating_add(Weight::from_parts(21_447_984, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Estimated: `8190 + r * (3090 ±7)` + // Minimum execution time: 240_700_000 picoseconds. + Weight::from_parts(241_021_000, 8190) + // Standard Error: 46_456 + .saturating_add(Weight::from_parts(21_734_413, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1603,14 +1722,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 235_213_000 picoseconds. - Weight::from_parts(239_456_464, 6723) - // Standard Error: 130 - .saturating_add(Weight::from_parts(159_851, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_740_000 picoseconds. + Weight::from_parts(242_205_894, 6723) + // Standard Error: 356 + .saturating_add(Weight::from_parts(162_911, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1626,14 +1747,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 237_886_000 picoseconds. - Weight::from_parts(262_430_157, 7805) - // Standard Error: 939 - .saturating_add(Weight::from_parts(260_005, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 240_552_000 picoseconds. + Weight::from_parts(270_251_375, 7805) + // Standard Error: 1_043 + .saturating_add(Weight::from_parts(261_776, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1651,11 +1774,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_014_000 picoseconds. - Weight::from_parts(240_042_671, 6723) - // Standard Error: 152 - .saturating_add(Weight::from_parts(138_382, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 238_216_000 picoseconds. + Weight::from_parts(245_301_500, 6723) + // Standard Error: 475 + .saturating_add(Weight::from_parts(142_584, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } @@ -1664,510 +1787,508 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_846_015, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_935, 0).saturating_mul(r.into())) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(1_955_112, 0) + // Standard Error: 22 + .saturating_add(Weight::from_parts(3_030, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(2_197_197, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_335, 0).saturating_mul(r.into())) + // Minimum execution time: 1_794_000 picoseconds. + Weight::from_parts(2_376_415, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(6_440, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_200_545, 0) + // Minimum execution time: 1_777_000 picoseconds. + Weight::from_parts(2_334_614, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(6_011, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_545_000 picoseconds. - Weight::from_parts(1_977_462, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(7_901, 0).saturating_mul(r.into())) + // Minimum execution time: 1_681_000 picoseconds. + Weight::from_parts(2_142_669, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(7_905, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_515_000 picoseconds. - Weight::from_parts(1_866_184, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_514, 0).saturating_mul(r.into())) + // Minimum execution time: 1_661_000 picoseconds. + Weight::from_parts(1_958_045, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(10_695, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_618_000 picoseconds. - Weight::from_parts(1_895_104, 0) + // Minimum execution time: 1_702_000 picoseconds. + Weight::from_parts(1_955_142, 0) // Standard Error: 12 - .saturating_add(Weight::from_parts(4_523, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(4_573, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510_000 picoseconds. - Weight::from_parts(1_779_998, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_832, 0).saturating_mul(r.into())) + // Minimum execution time: 1_683_000 picoseconds. + Weight::from_parts(1_701_381, 0) + // Standard Error: 16 + .saturating_add(Weight::from_parts(7_045, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_726_996, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(9_199, 0).saturating_mul(r.into())) + // Minimum execution time: 1_657_000 picoseconds. + Weight::from_parts(1_480_531, 0) + // Standard Error: 39 + .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { + fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_682_000 picoseconds. - Weight::from_parts(1_789_910, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(42, 0).saturating_mul(e.into())) + // Minimum execution time: 1_769_000 picoseconds. + Weight::from_parts(1_966_619, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_539_000 picoseconds. - Weight::from_parts(2_093_056, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(18_917, 0).saturating_mul(r.into())) + // Minimum execution time: 1_711_000 picoseconds. + Weight::from_parts(2_182_859, 0) + // Standard Error: 99 + .saturating_add(Weight::from_parts(18_097, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_851_000 picoseconds. - Weight::from_parts(3_134_610, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(24_714, 0).saturating_mul(r.into())) + // Minimum execution time: 1_953_000 picoseconds. + Weight::from_parts(3_241_691, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(24_191, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(1_885_921, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_243, 0).saturating_mul(l.into())) + // Minimum execution time: 1_755_000 picoseconds. + Weight::from_parts(2_028_508, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(1_207, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(3_014_725, 0) + // Minimum execution time: 2_980_000 picoseconds. + Weight::from_parts(3_261_891, 0) // Standard Error: 1 - .saturating_add(Weight::from_parts(2_447, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_523, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_881_000 picoseconds. - Weight::from_parts(3_137_711, 0) + // Minimum execution time: 2_939_000 picoseconds. + Weight::from_parts(3_175_345, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_608, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_809_000 picoseconds. - Weight::from_parts(3_142_066, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_841, 0).saturating_mul(r.into())) + // Minimum execution time: 2_912_000 picoseconds. + Weight::from_parts(3_735_750, 0) + // Standard Error: 34 + .saturating_add(Weight::from_parts(3_877, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_704_000 picoseconds. - Weight::from_parts(2_083_619, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(8_366, 0).saturating_mul(r.into())) + // Minimum execution time: 1_807_000 picoseconds. + Weight::from_parts(2_271_723, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(8_432, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(2_048_256, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_826, 0).saturating_mul(r.into())) + // Minimum execution time: 1_836_000 picoseconds. + Weight::from_parts(2_232_939, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(9_011, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_924_626, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_746, 0).saturating_mul(r.into())) + // Minimum execution time: 1_729_000 picoseconds. + Weight::from_parts(2_119_576, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_585_000 picoseconds. - Weight::from_parts(490_856, 0) - // Standard Error: 133_673 - .saturating_add(Weight::from_parts(13_182_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(748_659, 0) + // Standard Error: 133_811 + .saturating_add(Weight::from_parts(13_138_871, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_851_563, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(2_482_502, 0) + // Standard Error: 43 + .saturating_add(Weight::from_parts(3_966, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_564_000 picoseconds. - Weight::from_parts(1_914_178, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_732, 0).saturating_mul(r.into())) + // Minimum execution time: 1_677_000 picoseconds. + Weight::from_parts(2_076_124, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_559_000 picoseconds. - Weight::from_parts(1_886_992, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_731, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(2_137_336, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_553_000 picoseconds. - Weight::from_parts(1_886_545, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_658, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630_000 picoseconds. + Weight::from_parts(2_052_637, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_663, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_853_647, 0) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(2_052_774, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_974, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_554_000 picoseconds. - Weight::from_parts(1_868_877, 0) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(2_055_918, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_806, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_514_000 picoseconds. - Weight::from_parts(1_882_233, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_700, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(2_091_607, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_738, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_897_247, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_955, 0).saturating_mul(r.into())) + // Minimum execution time: 1_683_000 picoseconds. + Weight::from_parts(2_111_881, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_956, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_922_333, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_933, 0).saturating_mul(r.into())) + // Minimum execution time: 1_653_000 picoseconds. + Weight::from_parts(2_137_933, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_512_000 picoseconds. - Weight::from_parts(1_848_668, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_966, 0).saturating_mul(r.into())) + // Minimum execution time: 1_685_000 picoseconds. + Weight::from_parts(2_098_255, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_522_000 picoseconds. - Weight::from_parts(1_875_257, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(2_047_735, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_986, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_546_000 picoseconds. - Weight::from_parts(1_836_691, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_654_000 picoseconds. + Weight::from_parts(2_082_616, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_805, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_505_000 picoseconds. - Weight::from_parts(1_907_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_075, 0).saturating_mul(r.into())) + // Minimum execution time: 1_751_000 picoseconds. + Weight::from_parts(2_122_838, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(6_105, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_891_008, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(2_072_110, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_556_000 picoseconds. - Weight::from_parts(1_910_864, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_059, 0).saturating_mul(r.into())) + // Minimum execution time: 1_669_000 picoseconds. + Weight::from_parts(2_084_659, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_062, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_544_000 picoseconds. - Weight::from_parts(1_912_650, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_943, 0).saturating_mul(r.into())) + // Minimum execution time: 1_693_000 picoseconds. + Weight::from_parts(2_127_258, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_942, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_855_260, 0) + // Minimum execution time: 1_680_000 picoseconds. + Weight::from_parts(2_058_880, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_975, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_960, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_521_000 picoseconds. - Weight::from_parts(1_867_259, 0) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(2_081_497, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_846, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_835, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_509_000 picoseconds. - Weight::from_parts(1_893_018, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_096, 0).saturating_mul(r.into())) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(2_085_806, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_496_000 picoseconds. - Weight::from_parts(1_886_659, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_717_000 picoseconds. + Weight::from_parts(2_090_258, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_717, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_890_548, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(11_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_747_000 picoseconds. + Weight::from_parts(2_159_835, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(11_839, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_891_903, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_613, 0).saturating_mul(r.into())) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(2_370_448, 0) + // Standard Error: 50 + .saturating_add(Weight::from_parts(10_582, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_504_000 picoseconds. - Weight::from_parts(1_632_694, 0) + // Minimum execution time: 1_678_000 picoseconds. + Weight::from_parts(1_810_647, 0) // Standard Error: 7 - .saturating_add(Weight::from_parts(12_281, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(12_293, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_878_413, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(10_737, 0).saturating_mul(r.into())) + // Minimum execution time: 1_665_000 picoseconds. + Weight::from_parts(2_040_394, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(10_661, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_898_519, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_645, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(2_108_062, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_654, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_503_000 picoseconds. - Weight::from_parts(1_895_532, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_745, 0).saturating_mul(r.into())) + // Minimum execution time: 1_741_000 picoseconds. + Weight::from_parts(2_162_731, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_738, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_868_720, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_873, 0).saturating_mul(r.into())) + // Minimum execution time: 1_720_000 picoseconds. + Weight::from_parts(2_060_130, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_871, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_894_207, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_843, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(2_260_151, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(6_047, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_473_000 picoseconds. - Weight::from_parts(1_880_224, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_709_000 picoseconds. + Weight::from_parts(2_161_907, 0) + // Standard Error: 38 + .saturating_add(Weight::from_parts(6_254, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_447_000 picoseconds. - Weight::from_parts(1_884_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_849, 0).saturating_mul(r.into())) + // Minimum execution time: 1_659_000 picoseconds. + Weight::from_parts(2_089_988, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_473, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_908_813, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) + // Minimum execution time: 1_663_000 picoseconds. + Weight::from_parts(3_266_049, 0) + // Standard Error: 93 + .saturating_add(Weight::from_parts(5_974, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_878_015, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_848, 0).saturating_mul(r.into())) + // Minimum execution time: 1_700_000 picoseconds. + Weight::from_parts(2_107_727, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_068, 0).saturating_mul(r.into())) } } @@ -2179,8 +2300,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_565_000 picoseconds. - Weight::from_parts(2_759_000, 1594) + // Minimum execution time: 2_548_000 picoseconds. + Weight::from_parts(2_677_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2190,10 +2311,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_480_000 picoseconds. - Weight::from_parts(10_153_869, 478) - // Standard Error: 427 - .saturating_add(Weight::from_parts(958_726, 0).saturating_mul(k.into())) + // Minimum execution time: 13_465_000 picoseconds. + Weight::from_parts(8_978_953, 478) + // Standard Error: 947 + .saturating_add(Weight::from_parts(967_373, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -2209,14 +2330,41 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_406_000 picoseconds. - Weight::from_parts(28_467_370, 3708) - // Standard Error: 46 - .saturating_add(Weight::from_parts(53_724, 0).saturating_mul(c.into())) + // Minimum execution time: 30_499_000 picoseconds. + Weight::from_parts(22_221_289, 3708) + // Standard Error: 128 + .saturating_add(Weight::from_parts(54_915, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts CodeStorage (r:2 w:1) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// The range of component `c` is `[0, 61717]`. + fn v9_translate_wasm_module(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `178 + c * (1 ±0)` + // Estimated: `6114 + c * (1 ±0)` + // Minimum execution time: 9_369_000 picoseconds. + Weight::from_parts(10_852_386, 6114) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_306, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 5_978_000 picoseconds. + Weight::from_parts(6_097_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -2232,14 +2380,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 263_198_000 picoseconds. - Weight::from_parts(276_162_279, 6656) - // Standard Error: 18 - .saturating_add(Weight::from_parts(37_378, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 266_158_000 picoseconds. + Weight::from_parts(279_911_136, 6656) + // Standard Error: 29 + .saturating_add(Weight::from_parts(37_837, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -2263,17 +2413,19 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_132_259_000 picoseconds. - Weight::from_parts(513_284_834, 8659) - // Standard Error: 280 - .saturating_add(Weight::from_parts(106_723, 0).saturating_mul(c.into())) + // Minimum execution time: 3_133_022_000 picoseconds. + Weight::from_parts(647_533_067, 8659) + // Standard Error: 283 + .saturating_add(Weight::from_parts(106_602, 0).saturating_mul(c.into())) // Standard Error: 16 - .saturating_add(Weight::from_parts(1_166, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_117, 0).saturating_mul(i.into())) // Standard Error: 16 - .saturating_add(Weight::from_parts(1_436, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + .saturating_add(Weight::from_parts(1_405, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -2294,15 +2446,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_646_604_000 picoseconds. - Weight::from_parts(271_369_256, 6408) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_426, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_438, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Minimum execution time: 1_651_947_000 picoseconds. + Weight::from_parts(293_042_001, 6408) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_444, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -2317,11 +2471,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 191_360_000 picoseconds. - Weight::from_parts(192_625_000, 6699) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 194_753_000 picoseconds. + Weight::from_parts(195_766_000, 6699) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -2335,13 +2491,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 245_207_000 picoseconds. - Weight::from_parts(244_703_457, 3574) - // Standard Error: 61 - .saturating_add(Weight::from_parts(106_850, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Minimum execution time: 256_804_000 picoseconds. + Weight::from_parts(267_432_334, 3574) + // Standard Error: 103 + .saturating_add(Weight::from_parts(108_385, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -2354,11 +2512,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_560_000 picoseconds. - Weight::from_parts(33_833_000, 3720) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Minimum execution time: 34_924_000 picoseconds. + Weight::from_parts(35_867_000, 3720) + .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:2 w:2) @@ -2369,11 +2529,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_288_000 picoseconds. - Weight::from_parts(33_775_000, 8985) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 34_578_000 picoseconds. + Weight::from_parts(35_470_000, 8985) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2389,14 +2551,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 234_292_000 picoseconds. - Weight::from_parts(235_941_911, 6722) - // Standard Error: 413 - .saturating_add(Weight::from_parts(339_913, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_237_000 picoseconds. + Weight::from_parts(246_399_253, 6722) + // Standard Error: 781 + .saturating_add(Weight::from_parts(322_803, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -2412,15 +2576,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 236_273_000 picoseconds. - Weight::from_parts(74_380_906, 6743) - // Standard Error: 5_745 - .saturating_add(Weight::from_parts(3_331_781, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_025_000 picoseconds. + Weight::from_parts(76_642_081, 6743) + // Standard Error: 6_541 + .saturating_add(Weight::from_parts(3_308_462, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -2436,15 +2602,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 236_573_000 picoseconds. - Weight::from_parts(82_473_906, 6747) - // Standard Error: 5_510 - .saturating_add(Weight::from_parts(4_131_820, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 240_177_000 picoseconds. + Weight::from_parts(66_393_427, 6747) + // Standard Error: 7_670 + .saturating_add(Weight::from_parts(4_164_419, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2460,14 +2628,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 235_878_000 picoseconds. - Weight::from_parts(238_387_359, 6730) - // Standard Error: 318 - .saturating_add(Weight::from_parts(409_923, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_175_000 picoseconds. + Weight::from_parts(247_360_071, 6730) + // Standard Error: 5_724 + .saturating_add(Weight::from_parts(412_164, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2483,14 +2653,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 233_476_000 picoseconds. - Weight::from_parts(238_014_452, 6723) - // Standard Error: 145 - .saturating_add(Weight::from_parts(165_823, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 234_959_000 picoseconds. + Weight::from_parts(241_263_663, 6723) + // Standard Error: 422 + .saturating_add(Weight::from_parts(160_204, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2506,14 +2678,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_490_000 picoseconds. - Weight::from_parts(240_039_685, 6724) - // Standard Error: 330 - .saturating_add(Weight::from_parts(332_291, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_469_000 picoseconds. + Weight::from_parts(244_507_496, 6724) + // Standard Error: 761 + .saturating_add(Weight::from_parts(322_807, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2527,16 +2701,18 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `783 + r * (6 ±0)` - // Estimated: `6721 + r * (6 ±0)` - // Minimum execution time: 236_093_000 picoseconds. - Weight::from_parts(238_513_328, 6721) - // Standard Error: 206 - .saturating_add(Weight::from_parts(328_899, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Measured: `778 + r * (6 ±0)` + // Estimated: `6719 + r * (6 ±0)` + // Minimum execution time: 237_524_000 picoseconds. + Weight::from_parts(241_895_288, 6719) + // Standard Error: 773 + .saturating_add(Weight::from_parts(521_994, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:2 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2552,14 +2728,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 234_801_000 picoseconds. - Weight::from_parts(243_519_159, 6846) - // Standard Error: 1_367 - .saturating_add(Weight::from_parts(1_449_599, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 240_344_000 picoseconds. + Weight::from_parts(246_991_292, 6846) + // Standard Error: 1_133 + .saturating_add(Weight::from_parts(1_462_720, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2575,14 +2753,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 236_765_000 picoseconds. - Weight::from_parts(237_843_244, 6741) - // Standard Error: 308 - .saturating_add(Weight::from_parts(329_911, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_908_000 picoseconds. + Weight::from_parts(242_820_641, 6741) + // Standard Error: 597 + .saturating_add(Weight::from_parts(324_174, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2598,14 +2778,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 236_690_000 picoseconds. - Weight::from_parts(241_743_164, 6739) - // Standard Error: 333 - .saturating_add(Weight::from_parts(324_693, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_856_000 picoseconds. + Weight::from_parts(251_150_544, 6739) + // Standard Error: 868 + .saturating_add(Weight::from_parts(315_232, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2621,14 +2803,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 236_149_000 picoseconds. - Weight::from_parts(239_090_707, 6737) - // Standard Error: 246 - .saturating_add(Weight::from_parts(344_488, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_197_000 picoseconds. + Weight::from_parts(241_186_858, 6737) + // Standard Error: 639 + .saturating_add(Weight::from_parts(318_375, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2644,14 +2828,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 235_057_000 picoseconds. - Weight::from_parts(237_752_870, 6723) - // Standard Error: 236 - .saturating_add(Weight::from_parts(328_235, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_676_000 picoseconds. + Weight::from_parts(243_872_868, 6723) + // Standard Error: 611 + .saturating_add(Weight::from_parts(316_938, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2667,16 +2853,18 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (10 ±0)` - // Estimated: `6796 + r * (10 ±0)` - // Minimum execution time: 234_995_000 picoseconds. - Weight::from_parts(246_473_554, 6796) - // Standard Error: 1_015 - .saturating_add(Weight::from_parts(1_337_653, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Measured: `852 + r * (14 ±0)` + // Estimated: `6785 + r * (14 ±0)` + // Minimum execution time: 237_520_000 picoseconds. + Weight::from_parts(258_882_921, 6785) + // Standard Error: 1_949 + .saturating_add(Weight::from_parts(1_365_562, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2692,14 +2880,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 160_445_000 picoseconds. - Weight::from_parts(165_558_135, 6687) - // Standard Error: 234 - .saturating_add(Weight::from_parts(133_607, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 163_866_000 picoseconds. + Weight::from_parts(166_333_760, 6687) + // Standard Error: 2_405 + .saturating_add(Weight::from_parts(138_325, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2715,14 +2905,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_065_000 picoseconds. - Weight::from_parts(237_797_177, 6724) - // Standard Error: 336 - .saturating_add(Weight::from_parts(267_302, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_456_000 picoseconds. + Weight::from_parts(245_578_643, 6724) + // Standard Error: 549 + .saturating_add(Weight::from_parts(265_605, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2738,13 +2930,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 236_215_000 picoseconds. - Weight::from_parts(239_347_313, 6724) - // Standard Error: 0 - .saturating_add(Weight::from_parts(587, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_032_000 picoseconds. + Weight::from_parts(242_874_505, 6724) + // Standard Error: 1 + .saturating_add(Weight::from_parts(593, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2760,14 +2954,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 231_571_000 picoseconds. - Weight::from_parts(233_477_918, 6708) - // Standard Error: 95_776 - .saturating_add(Weight::from_parts(1_733_181, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 234_478_000 picoseconds. + Weight::from_parts(237_534_048, 6708) + // Standard Error: 197_777 + .saturating_add(Weight::from_parts(1_581_051, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2783,13 +2979,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 234_956_000 picoseconds. - Weight::from_parts(236_785_051, 6731) + // Minimum execution time: 237_015_000 picoseconds. + Weight::from_parts(239_909_565, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2811,16 +3009,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 234_275_000 picoseconds. - Weight::from_parts(236_776_769, 6750) - // Standard Error: 137_203 - .saturating_add(Weight::from_parts(110_758_930, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 236_370_000 picoseconds. + Weight::from_parts(239_243_467, 6750) + // Standard Error: 274_349 + .saturating_add(Weight::from_parts(115_896_632, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((8_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 7781).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2838,14 +3038,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 235_593_000 picoseconds. - Weight::from_parts(253_731_242, 6769) - // Standard Error: 2_129 - .saturating_add(Weight::from_parts(1_771_297, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 239_772_000 picoseconds. + Weight::from_parts(242_724_214, 6769) + // Standard Error: 2_967 + .saturating_add(Weight::from_parts(1_754_941, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2861,14 +3063,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 232_124_000 picoseconds. - Weight::from_parts(245_904_447, 6723) - // Standard Error: 2_185 - .saturating_add(Weight::from_parts(3_470_410, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 235_440_000 picoseconds. + Weight::from_parts(272_455_779, 6723) + // Standard Error: 4_633 + .saturating_add(Weight::from_parts(3_484_878, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2885,18 +3089,20 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 250_301_000 picoseconds. - Weight::from_parts(245_292_258, 6744) - // Standard Error: 29_864 - .saturating_add(Weight::from_parts(2_163_531, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(583, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 254_882_000 picoseconds. + Weight::from_parts(249_748_140, 6744) + // Standard Error: 94_551 + .saturating_add(Weight::from_parts(2_385_909, 0).saturating_mul(t.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2912,14 +3118,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 165_711_000 picoseconds. - Weight::from_parts(168_792_571, 6721) - // Standard Error: 216 - .saturating_add(Weight::from_parts(230_285, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 166_376_000 picoseconds. + Weight::from_parts(171_383_256, 6721) + // Standard Error: 345 + .saturating_add(Weight::from_parts(233_133, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2935,11 +3143,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 348_928_000 picoseconds. - Weight::from_parts(352_224_793, 131670) - // Standard Error: 0 - .saturating_add(Weight::from_parts(731, 0).saturating_mul(i.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 353_406_000 picoseconds. + Weight::from_parts(357_371_823, 131670) + // Standard Error: 1 + .saturating_add(Weight::from_parts(740, 0).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2949,11 +3157,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 236_418_000 picoseconds. - Weight::from_parts(129_862_840, 843) - // Standard Error: 9_733 - .saturating_add(Weight::from_parts(6_005_187, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_610_000 picoseconds. + Weight::from_parts(129_137_013, 843) + // Standard Error: 10_406 + .saturating_add(Weight::from_parts(6_175_998, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -2966,11 +3174,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 251_599_000 picoseconds. - Weight::from_parts(285_284_665, 1280) - // Standard Error: 46 - .saturating_add(Weight::from_parts(410, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Minimum execution time: 253_714_000 picoseconds. + Weight::from_parts(286_943_345, 1280) + // Standard Error: 52 + .saturating_add(Weight::from_parts(580, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2980,11 +3188,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 251_309_000 picoseconds. - Weight::from_parts(253_555_552, 1167) - // Standard Error: 9 - .saturating_add(Weight::from_parts(27, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 254_191_000 picoseconds. + Weight::from_parts(260_134_212, 1167) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2995,11 +3201,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 235_441_000 picoseconds. - Weight::from_parts(132_980_942, 845) - // Standard Error: 9_421 - .saturating_add(Weight::from_parts(5_854_896, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_786_000 picoseconds. + Weight::from_parts(130_111_573, 845) + // Standard Error: 10_357 + .saturating_add(Weight::from_parts(5_982_349, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -3012,11 +3218,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 249_967_000 picoseconds. - Weight::from_parts(252_122_186, 1163) - // Standard Error: 10 - .saturating_add(Weight::from_parts(74, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 253_416_000 picoseconds. + Weight::from_parts(255_813_949, 1163) + // Standard Error: 24 + .saturating_add(Weight::from_parts(159, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3027,11 +3233,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 235_647_000 picoseconds. - Weight::from_parts(145_525_169, 840) - // Standard Error: 8_553 - .saturating_add(Weight::from_parts(4_948_021, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_113_000 picoseconds. + Weight::from_parts(150_650_781, 840) + // Standard Error: 9_285 + .saturating_add(Weight::from_parts(4_954_934, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) @@ -3043,11 +3249,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 249_576_000 picoseconds. - Weight::from_parts(250_747_191, 1179) - // Standard Error: 8 - .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 254_076_000 picoseconds. + Weight::from_parts(256_571_975, 1179) + // Standard Error: 36 + .saturating_add(Weight::from_parts(590, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3058,11 +3264,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 236_110_000 picoseconds. - Weight::from_parts(148_420_625, 857) - // Standard Error: 8_175 - .saturating_add(Weight::from_parts(4_684_126, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_142_000 picoseconds. + Weight::from_parts(151_921_194, 857) + // Standard Error: 8_732 + .saturating_add(Weight::from_parts(4_789_792, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) @@ -3074,11 +3280,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 247_800_000 picoseconds. - Weight::from_parts(249_410_575, 1166) - // Standard Error: 6 - .saturating_add(Weight::from_parts(99, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 251_295_000 picoseconds. + Weight::from_parts(253_924_366, 1166) + // Standard Error: 29 + .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3089,11 +3295,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 235_251_000 picoseconds. - Weight::from_parts(128_816_707, 836) - // Standard Error: 9_887 - .saturating_add(Weight::from_parts(6_167_176, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_249_000 picoseconds. + Weight::from_parts(136_162_523, 836) + // Standard Error: 10_064 + .saturating_add(Weight::from_parts(6_136_548, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -3106,14 +3312,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 250_401_000 picoseconds. - Weight::from_parts(253_298_243, 1180) - // Standard Error: 9 - .saturating_add(Weight::from_parts(667, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 253_832_000 picoseconds. + Weight::from_parts(256_959_533, 1180) + // Standard Error: 17 + .saturating_add(Weight::from_parts(656, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1601) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3129,16 +3337,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 236_470_000 picoseconds. - Weight::from_parts(98_898_727, 7270) - // Standard Error: 33_316 - .saturating_add(Weight::from_parts(35_149_946, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 239_088_000 picoseconds. + Weight::from_parts(285_114_297, 7270) + // Standard Error: 46_679 + .saturating_add(Weight::from_parts(35_601_583, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -3152,18 +3362,20 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1237 + r * (256 ±0)` - // Estimated: `7125 + r * (2732 ±0)` - // Minimum execution time: 238_303_000 picoseconds. - Weight::from_parts(239_024_000, 7125) - // Standard Error: 65_907 - .saturating_add(Weight::from_parts(209_419_071, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Measured: `1140 + r * (276 ±0)` + // Estimated: `7049 + r * (2752 ±0)` + // Minimum execution time: 240_796_000 picoseconds. + Weight::from_parts(241_521_000, 7049) + // Standard Error: 96_067 + .saturating_add(Weight::from_parts(213_656_608, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2732).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3178,17 +3390,19 @@ impl WeightInfo for () { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` - // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 235_961_000 picoseconds. - Weight::from_parts(236_939_000, 6727) - // Standard Error: 83_087 - .saturating_add(Weight::from_parts(205_646_517, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Estimated: `6727 + r * (2572 ±3)` + // Minimum execution time: 239_065_000 picoseconds. + Weight::from_parts(240_123_000, 6727) + // Standard Error: 94_312 + .saturating_add(Weight::from_parts(208_326_355, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2572).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:3 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -3205,18 +3419,20 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 410_156_000 picoseconds. - Weight::from_parts(378_378_143, 9569) - // Standard Error: 285_172 - .saturating_add(Weight::from_parts(34_736_740, 0).saturating_mul(t.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(591, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Minimum execution time: 414_681_000 picoseconds. + Weight::from_parts(387_233_284, 9569) + // Standard Error: 923_756 + .saturating_add(Weight::from_parts(31_886_473, 0).saturating_mul(t.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1602) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -3231,21 +3447,23 @@ impl WeightInfo for () { /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:802 w:802) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 800]`. + /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1301 + r * (254 ±0)` - // Estimated: `7131 + r * (5205 ±0)` - // Minimum execution time: 236_748_000 picoseconds. - Weight::from_parts(237_129_000, 7131) - // Standard Error: 280_059 - .saturating_add(Weight::from_parts(341_428_013, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Measured: `1322 + r * (254 ±0)` + // Estimated: `7146 + r * (5205 ±0)` + // Minimum execution time: 574_065_000 picoseconds. + Weight::from_parts(575_592_000, 7146) + // Standard Error: 246_955 + .saturating_add(Weight::from_parts(345_705_670, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((5_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 5205).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -3267,20 +3485,22 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_613_796_000 picoseconds. - Weight::from_parts(340_002_206, 9492) - // Standard Error: 4_296_381 - .saturating_add(Weight::from_parts(115_239_834, 0).saturating_mul(t.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_145, 0).saturating_mul(i.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(13_u64)) + // Minimum execution time: 1_615_748_000 picoseconds. + Weight::from_parts(341_307_617, 9492) + // Standard Error: 5_315_899 + .saturating_add(Weight::from_parts(119_339_357, 0).saturating_mul(t.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_343, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2634).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3296,14 +3516,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 233_111_000 picoseconds. - Weight::from_parts(238_643_933, 6718) - // Standard Error: 184 - .saturating_add(Weight::from_parts(572_296, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 235_569_000 picoseconds. + Weight::from_parts(240_272_470, 6718) + // Standard Error: 739 + .saturating_add(Weight::from_parts(569_501, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3319,13 +3541,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 234_746_000 picoseconds. - Weight::from_parts(229_815_552, 6725) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_892, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 236_251_000 picoseconds. + Weight::from_parts(231_532_969, 6725) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_935, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3341,14 +3565,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 232_732_000 picoseconds. - Weight::from_parts(239_007_209, 6721) - // Standard Error: 256 - .saturating_add(Weight::from_parts(733_879, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 235_261_000 picoseconds. + Weight::from_parts(245_916_216, 6721) + // Standard Error: 2_735 + .saturating_add(Weight::from_parts(746_676, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3364,13 +3590,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 234_184_000 picoseconds. - Weight::from_parts(227_603_375, 6729) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_127, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_766_000 picoseconds. + Weight::from_parts(224_241_852, 6729) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_182, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3386,14 +3614,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 233_038_000 picoseconds. - Weight::from_parts(238_515_817, 6724) - // Standard Error: 255 - .saturating_add(Weight::from_parts(413_343, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 235_106_000 picoseconds. + Weight::from_parts(240_306_761, 6724) + // Standard Error: 753 + .saturating_add(Weight::from_parts(415_885, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3409,13 +3639,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 232_996_000 picoseconds. - Weight::from_parts(226_706_997, 6733) - // Standard Error: 1 - .saturating_add(Weight::from_parts(908, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 237_193_000 picoseconds. + Weight::from_parts(235_328_929, 6733) + // Standard Error: 3 + .saturating_add(Weight::from_parts(915, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3431,14 +3663,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 232_292_000 picoseconds. - Weight::from_parts(237_997_001, 6725) - // Standard Error: 219 - .saturating_add(Weight::from_parts(410_177, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 235_233_000 picoseconds. + Weight::from_parts(243_027_485, 6725) + // Standard Error: 709 + .saturating_add(Weight::from_parts(407_457, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3454,13 +3688,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 234_815_000 picoseconds. - Weight::from_parts(226_317_150, 6727) - // Standard Error: 1 - .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 236_933_000 picoseconds. + Weight::from_parts(229_499_726, 6727) + // Standard Error: 2 + .saturating_add(Weight::from_parts(916, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3475,15 +3711,17 @@ impl WeightInfo for () { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6848 + n * (1 ±0)` - // Minimum execution time: 286_323_000 picoseconds. - Weight::from_parts(290_287_955, 6848) - // Standard Error: 1 - .saturating_add(Weight::from_parts(4_693, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Estimated: `6849 + n * (1 ±0)` + // Minimum execution time: 289_569_000 picoseconds. + Weight::from_parts(295_501_374, 6849) + // Standard Error: 8 + .saturating_add(Weight::from_parts(4_718, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3497,16 +3735,18 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `727 + r * (112 ±0)` + // Measured: `722 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 235_938_000 picoseconds. - Weight::from_parts(242_728_358, 6666) - // Standard Error: 9_725 - .saturating_add(Weight::from_parts(47_527_740, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_956_000 picoseconds. + Weight::from_parts(249_363_777, 6666) + // Standard Error: 21_411 + .saturating_add(Weight::from_parts(48_134_102, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3520,16 +3760,18 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `822 + r * (76 ±0)` + // Measured: `821 + r * (76 ±0)` // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 236_108_000 picoseconds. - Weight::from_parts(248_577_226, 6716) - // Standard Error: 9_565 - .saturating_add(Weight::from_parts(36_733_552, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_366_000 picoseconds. + Weight::from_parts(256_403_505, 6716) + // Standard Error: 19_860 + .saturating_add(Weight::from_parts(37_761_641, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3545,14 +3787,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 236_440_000 picoseconds. - Weight::from_parts(240_771_418, 6731) - // Standard Error: 1_849 - .saturating_add(Weight::from_parts(9_185_896, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_127_000 picoseconds. + Weight::from_parts(243_612_263, 6731) + // Standard Error: 9_428 + .saturating_add(Weight::from_parts(9_337_164, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3569,17 +3813,19 @@ impl WeightInfo for () { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±10)` - // Minimum execution time: 235_056_000 picoseconds. - Weight::from_parts(235_743_000, 8190) - // Standard Error: 46_122 - .saturating_add(Weight::from_parts(21_447_984, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Estimated: `8190 + r * (3090 ±7)` + // Minimum execution time: 240_700_000 picoseconds. + Weight::from_parts(241_021_000, 8190) + // Standard Error: 46_456 + .saturating_add(Weight::from_parts(21_734_413, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3595,14 +3841,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 235_213_000 picoseconds. - Weight::from_parts(239_456_464, 6723) - // Standard Error: 130 - .saturating_add(Weight::from_parts(159_851, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_740_000 picoseconds. + Weight::from_parts(242_205_894, 6723) + // Standard Error: 356 + .saturating_add(Weight::from_parts(162_911, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3618,14 +3866,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 237_886_000 picoseconds. - Weight::from_parts(262_430_157, 7805) - // Standard Error: 939 - .saturating_add(Weight::from_parts(260_005, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 240_552_000 picoseconds. + Weight::from_parts(270_251_375, 7805) + // Standard Error: 1_043 + .saturating_add(Weight::from_parts(261_776, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3643,11 +3893,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_014_000 picoseconds. - Weight::from_parts(240_042_671, 6723) - // Standard Error: 152 - .saturating_add(Weight::from_parts(138_382, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 238_216_000 picoseconds. + Weight::from_parts(245_301_500, 6723) + // Standard Error: 475 + .saturating_add(Weight::from_parts(142_584, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } @@ -3656,509 +3906,507 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_846_015, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(2_935, 0).saturating_mul(r.into())) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(1_955_112, 0) + // Standard Error: 22 + .saturating_add(Weight::from_parts(3_030, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(2_197_197, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_335, 0).saturating_mul(r.into())) + // Minimum execution time: 1_794_000 picoseconds. + Weight::from_parts(2_376_415, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(6_440, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_200_545, 0) + // Minimum execution time: 1_777_000 picoseconds. + Weight::from_parts(2_334_614, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(6_011, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_545_000 picoseconds. - Weight::from_parts(1_977_462, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(7_901, 0).saturating_mul(r.into())) + // Minimum execution time: 1_681_000 picoseconds. + Weight::from_parts(2_142_669, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(7_905, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_515_000 picoseconds. - Weight::from_parts(1_866_184, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_514, 0).saturating_mul(r.into())) + // Minimum execution time: 1_661_000 picoseconds. + Weight::from_parts(1_958_045, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(10_695, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_618_000 picoseconds. - Weight::from_parts(1_895_104, 0) + // Minimum execution time: 1_702_000 picoseconds. + Weight::from_parts(1_955_142, 0) // Standard Error: 12 - .saturating_add(Weight::from_parts(4_523, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(4_573, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510_000 picoseconds. - Weight::from_parts(1_779_998, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_832, 0).saturating_mul(r.into())) + // Minimum execution time: 1_683_000 picoseconds. + Weight::from_parts(1_701_381, 0) + // Standard Error: 16 + .saturating_add(Weight::from_parts(7_045, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_726_996, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(9_199, 0).saturating_mul(r.into())) + // Minimum execution time: 1_657_000 picoseconds. + Weight::from_parts(1_480_531, 0) + // Standard Error: 39 + .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { + fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_682_000 picoseconds. - Weight::from_parts(1_789_910, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(42, 0).saturating_mul(e.into())) + // Minimum execution time: 1_769_000 picoseconds. + Weight::from_parts(1_966_619, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_539_000 picoseconds. - Weight::from_parts(2_093_056, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(18_917, 0).saturating_mul(r.into())) + // Minimum execution time: 1_711_000 picoseconds. + Weight::from_parts(2_182_859, 0) + // Standard Error: 99 + .saturating_add(Weight::from_parts(18_097, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_851_000 picoseconds. - Weight::from_parts(3_134_610, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(24_714, 0).saturating_mul(r.into())) + // Minimum execution time: 1_953_000 picoseconds. + Weight::from_parts(3_241_691, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(24_191, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(1_885_921, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_243, 0).saturating_mul(l.into())) + // Minimum execution time: 1_755_000 picoseconds. + Weight::from_parts(2_028_508, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(1_207, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(3_014_725, 0) + // Minimum execution time: 2_980_000 picoseconds. + Weight::from_parts(3_261_891, 0) // Standard Error: 1 - .saturating_add(Weight::from_parts(2_447, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_523, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_881_000 picoseconds. - Weight::from_parts(3_137_711, 0) + // Minimum execution time: 2_939_000 picoseconds. + Weight::from_parts(3_175_345, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_608, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_809_000 picoseconds. - Weight::from_parts(3_142_066, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_841, 0).saturating_mul(r.into())) + // Minimum execution time: 2_912_000 picoseconds. + Weight::from_parts(3_735_750, 0) + // Standard Error: 34 + .saturating_add(Weight::from_parts(3_877, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_704_000 picoseconds. - Weight::from_parts(2_083_619, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(8_366, 0).saturating_mul(r.into())) + // Minimum execution time: 1_807_000 picoseconds. + Weight::from_parts(2_271_723, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(8_432, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(2_048_256, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_826, 0).saturating_mul(r.into())) + // Minimum execution time: 1_836_000 picoseconds. + Weight::from_parts(2_232_939, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(9_011, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_924_626, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_746, 0).saturating_mul(r.into())) + // Minimum execution time: 1_729_000 picoseconds. + Weight::from_parts(2_119_576, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_585_000 picoseconds. - Weight::from_parts(490_856, 0) - // Standard Error: 133_673 - .saturating_add(Weight::from_parts(13_182_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(748_659, 0) + // Standard Error: 133_811 + .saturating_add(Weight::from_parts(13_138_871, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_851_563, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(2_482_502, 0) + // Standard Error: 43 + .saturating_add(Weight::from_parts(3_966, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_564_000 picoseconds. - Weight::from_parts(1_914_178, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_732, 0).saturating_mul(r.into())) + // Minimum execution time: 1_677_000 picoseconds. + Weight::from_parts(2_076_124, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_559_000 picoseconds. - Weight::from_parts(1_886_992, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_731, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(2_137_336, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_553_000 picoseconds. - Weight::from_parts(1_886_545, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_658, 0).saturating_mul(r.into())) + // Minimum execution time: 1_630_000 picoseconds. + Weight::from_parts(2_052_637, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_663, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_853_647, 0) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(2_052_774, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_974, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_554_000 picoseconds. - Weight::from_parts(1_868_877, 0) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(2_055_918, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_806, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_514_000 picoseconds. - Weight::from_parts(1_882_233, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_700, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(2_091_607, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_738, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_897_247, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_955, 0).saturating_mul(r.into())) + // Minimum execution time: 1_683_000 picoseconds. + Weight::from_parts(2_111_881, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_956, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_922_333, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_933, 0).saturating_mul(r.into())) + // Minimum execution time: 1_653_000 picoseconds. + Weight::from_parts(2_137_933, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_512_000 picoseconds. - Weight::from_parts(1_848_668, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_966, 0).saturating_mul(r.into())) + // Minimum execution time: 1_685_000 picoseconds. + Weight::from_parts(2_098_255, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_522_000 picoseconds. - Weight::from_parts(1_875_257, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(2_047_735, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_986, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_546_000 picoseconds. - Weight::from_parts(1_836_691, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_654_000 picoseconds. + Weight::from_parts(2_082_616, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_805, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_505_000 picoseconds. - Weight::from_parts(1_907_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_075, 0).saturating_mul(r.into())) + // Minimum execution time: 1_751_000 picoseconds. + Weight::from_parts(2_122_838, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(6_105, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_891_008, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(2_072_110, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_556_000 picoseconds. - Weight::from_parts(1_910_864, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_059, 0).saturating_mul(r.into())) + // Minimum execution time: 1_669_000 picoseconds. + Weight::from_parts(2_084_659, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_062, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_544_000 picoseconds. - Weight::from_parts(1_912_650, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_943, 0).saturating_mul(r.into())) + // Minimum execution time: 1_693_000 picoseconds. + Weight::from_parts(2_127_258, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_942, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_855_260, 0) + // Minimum execution time: 1_680_000 picoseconds. + Weight::from_parts(2_058_880, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_975, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_960, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_521_000 picoseconds. - Weight::from_parts(1_867_259, 0) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(2_081_497, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_846, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_835, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_509_000 picoseconds. - Weight::from_parts(1_893_018, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_096, 0).saturating_mul(r.into())) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(2_085_806, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_496_000 picoseconds. - Weight::from_parts(1_886_659, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_717_000 picoseconds. + Weight::from_parts(2_090_258, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_717, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_890_548, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(11_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_747_000 picoseconds. + Weight::from_parts(2_159_835, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(11_839, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_891_903, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_613, 0).saturating_mul(r.into())) + // Minimum execution time: 1_724_000 picoseconds. + Weight::from_parts(2_370_448, 0) + // Standard Error: 50 + .saturating_add(Weight::from_parts(10_582, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_504_000 picoseconds. - Weight::from_parts(1_632_694, 0) + // Minimum execution time: 1_678_000 picoseconds. + Weight::from_parts(1_810_647, 0) // Standard Error: 7 - .saturating_add(Weight::from_parts(12_281, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(12_293, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_878_413, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(10_737, 0).saturating_mul(r.into())) + // Minimum execution time: 1_665_000 picoseconds. + Weight::from_parts(2_040_394, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(10_661, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_898_519, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_645, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(2_108_062, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_654, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_503_000 picoseconds. - Weight::from_parts(1_895_532, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_745, 0).saturating_mul(r.into())) + // Minimum execution time: 1_741_000 picoseconds. + Weight::from_parts(2_162_731, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_738, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_868_720, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_873, 0).saturating_mul(r.into())) + // Minimum execution time: 1_720_000 picoseconds. + Weight::from_parts(2_060_130, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_871, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_894_207, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_843, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(2_260_151, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(6_047, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_473_000 picoseconds. - Weight::from_parts(1_880_224, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_709_000 picoseconds. + Weight::from_parts(2_161_907, 0) + // Standard Error: 38 + .saturating_add(Weight::from_parts(6_254, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_447_000 picoseconds. - Weight::from_parts(1_884_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_849, 0).saturating_mul(r.into())) + // Minimum execution time: 1_659_000 picoseconds. + Weight::from_parts(2_089_988, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_473, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_908_813, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) + // Minimum execution time: 1_663_000 picoseconds. + Weight::from_parts(3_266_049, 0) + // Standard Error: 93 + .saturating_add(Weight::from_parts(5_974, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_878_015, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_848, 0).saturating_mul(r.into())) + // Minimum execution time: 1_700_000 picoseconds. + Weight::from_parts(2_107_727, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_068, 0).saturating_mul(r.into())) } } From 5db9beb1e582f1c327d35c7c5f8acb8cbc8838a1 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 5 May 2023 08:44:51 +0200 Subject: [PATCH 13/74] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/migration.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index be9bc2c4ef71c..affab86014fa0 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -50,6 +50,7 @@ pub enum IsFinished { } /// A trait that allows to migrate storage from one version to another. +/// /// The migration is done in steps. The migration is finished when /// `step()` returns `IsFinished::Yes`. pub trait Migrate: Codec + MaxEncodedLen + Default { @@ -60,6 +61,7 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { fn max_step_weight() -> Weight; /// Process one step of the migration. + /// /// Returns whether the migration is finished and the weight consumed. fn step(&mut self) -> (IsFinished, Weight); } @@ -87,6 +89,7 @@ mod private { } /// Defines a sequence of migrations. +/// /// The sequence must be defined by a tuple of migrations, each of which must implement the /// `Migrate` trait. Migrations must be ordered by their versions with no gaps. pub trait MigrateSequence: private::Sealed { @@ -110,6 +113,7 @@ pub trait MigrateSequence: private::Sealed { fn new(version: StorageVersion) -> Cursor; /// Execute the migration step until the weight limit is reached. + /// /// Returns the new cursor or `None` if the migration is finished. fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> Option; @@ -117,6 +121,7 @@ pub trait MigrateSequence: private::Sealed { fn integrity_test(); /// Returns whether migrating from `in_storage` to `target` is supported. + /// /// A migration is supported if (in_storage + 1, target) is contained by `VERSION_RANGE`. fn is_upgrade_supported(in_storage: StorageVersion, target: StorageVersion) -> bool { if in_storage == target { From 1bd551e94049b1df2a8359e92a304c823fc2b7c6 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 May 2023 13:31:39 +0200 Subject: [PATCH 14/74] Scalfold v10 / v11 fix tests --- frame/contracts/src/migration.rs | 13 +++++--- frame/contracts/src/migration/v10.rs | 44 +++++++++++++++++++++++++++ frame/contracts/src/migration/v11.rs | 45 ++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 frame/contracts/src/migration/v10.rs create mode 100644 frame/contracts/src/migration/v11.rs diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index affab86014fa0..39fe455d56f70 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,6 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +mod v10; +mod v11; #[cfg(feature = "runtime-benchmarks")] pub mod v9; #[cfg(not(feature = "runtime-benchmarks"))] @@ -41,7 +43,7 @@ fn invalid_version(version: StorageVersion) -> ! { } pub type Cursor = BoundedVec>; -type Migrations = (NoopMigration<7>, NoopMigration<8>, v9::Migration); +type Migrations = (v9::Migration, v10::Migration, v11::Migration); /// IsFinished describes whether a migration is finished or not. pub enum IsFinished { @@ -135,7 +137,8 @@ pub trait MigrateSequence: private::Sealed { let Some(first_supported) = low.checked_sub(1) else { return false }; - in_storage >= first_supported && target == high + + in_storage == first_supported && target == high } } @@ -421,7 +424,7 @@ mod test { fn is_upgrade_supported_works() { type M = (MockMigration<7>, MockMigration<8>, MockMigration<9>); - [(1, 1), (6, 9), (8, 9)].into_iter().for_each(|(from, to)| { + [(1, 1), (6, 9)].into_iter().for_each(|(from, to)| { assert!( M::is_upgrade_supported(StorageVersion::new(from), StorageVersion::new(to)), "{} -> {} is supported", @@ -471,6 +474,7 @@ mod test { type TestMigration = Migration; ExtBuilder::default().build().execute_with(|| { + assert_eq!(StorageVersion::get::>(), 0); TestMigration::on_runtime_upgrade(); for (version, status) in [(1, MigrateResult::InProgress), (2, MigrateResult::Completed)] { @@ -481,7 +485,8 @@ mod test { ); } - assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed) + assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed); + assert_eq!(StorageVersion::get::>(), 2); }); } } diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs new file mode 100644 index 0000000000000..23e762ccfdfde --- /dev/null +++ b/frame/contracts/src/migration/v10.rs @@ -0,0 +1,44 @@ +// 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. + +//! Update `CodeStorage` with the new `determinism` field. + +use crate::{ + migration::{IsFinished, Migrate}, + Config, Weight, +}; +use codec::{Decode, Encode}; +use frame_support::{codec, pallet_prelude::*, DefaultNoBound}; +use sp_std::marker::PhantomData; + +#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] +pub struct Migration { + _phantom: PhantomData, +} + +impl Migrate for Migration { + const VERSION: u16 = 10; + + fn max_step_weight() -> Weight { + Weight::zero() // TODO fix + } + + fn step(&mut self) -> (IsFinished, Weight) { + // TODO + (IsFinished::Yes, Self::max_step_weight()) + } +} diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs new file mode 100644 index 0000000000000..246aabc189e3c --- /dev/null +++ b/frame/contracts/src/migration/v11.rs @@ -0,0 +1,45 @@ +// 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. + +//! Update `CodeStorage` with the new `determinism` field. + +use crate::{ + migration::{IsFinished, Migrate}, + Config, Weight, +}; +use codec::{Decode, Encode}; +use frame_support::{codec, pallet_prelude::*, DefaultNoBound}; +use sp_std::marker::PhantomData; + +#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] +pub struct Migration { + _phantom: PhantomData, +} + +impl Migrate for Migration { + const VERSION: u16 = 11; + + fn max_step_weight() -> Weight { + Weight::zero() // TODO fix + } + + fn step(&mut self) -> (IsFinished, Weight) { + // TODO + (IsFinished::Yes, Self::max_step_weight()) + } +} + From d71899592c2641114390587c79723075a1f949dd Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 May 2023 13:40:19 +0200 Subject: [PATCH 15/74] PR comment --- frame/contracts/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e06a1b02b90c1..1a3b2e29d1d77 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -178,8 +178,9 @@ pub mod pallet { /// The current storage version. #[cfg(not(test))] - const STORAGE_VERSION: StorageVersion = StorageVersion::new(9); + const STORAGE_VERSION: StorageVersion = StorageVersion::new(11); + /// Hard coded storage version for running tests that depend on the current storage version. #[cfg(test)] const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); From 131cc45901df9967dbd4b9bb8b095e9ab523b31e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 May 2023 14:20:17 +0200 Subject: [PATCH 16/74] tweak pub use --- frame/contracts/src/lib.rs | 7 ++++--- frame/contracts/src/migration.rs | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 1a3b2e29d1d77..7888f7dd0831a 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -131,12 +131,13 @@ use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; pub use crate::{ address::{AddressGenerator, DefaultAddressGenerator}, exec::Frame, - migration::*, + migration::{Migration, MigrateSequence, NoopMigration}, pallet::*, schedule::{HostFnWeights, InstructionWeights, Limits, Schedule}, wasm::Determinism, }; + #[cfg(doc)] pub use crate::wasm::api_doc; @@ -319,7 +320,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { - use MigrateResult::*; + use migration::MigrateResult::*; let remaining_weight = match Migration::::migrate(remaining_weight) { (InProgress, weight) => return remaining_weight.saturating_sub(weight), @@ -742,7 +743,7 @@ pub mod pallet { Error::::MigrateWeightLimitTooLow ); - use MigrateResult::*; + use migration::MigrateResult::*; match Migration::::migrate(weight_limit) { (InProgress | Completed, weight) => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 39fe455d56f70..eedf728c502cb 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -69,6 +69,7 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { } /// A noop migration that can be used when there is no migration to be done for a given version. +#[doc(hidden)] #[derive(frame_support::DefaultNoBound, Encode, Decode, MaxEncodedLen)] pub struct NoopMigration; @@ -84,9 +85,10 @@ impl Migrate for NoopMigration { } mod private { + use crate::migration::Migrate; pub trait Sealed {} #[impl_trait_for_tuples::impl_for_tuples(10)] - #[tuple_types_custom_trait_bound(crate::Migrate)] + #[tuple_types_custom_trait_bound(Migrate)] impl Sealed for Tuple {} } @@ -198,7 +200,6 @@ impl OnRuntimeUpgrade for Migration { let storage_version = >::on_chain_storage_version(); let target_version = >::current_storage_version(); if M::is_upgrade_supported(storage_version, target_version) { - let nonce = >::get(); Ok(Vec::new()) } else { log::error!( From 1f22230a35229022d6399c161fb81e9d76ee5d6d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 May 2023 20:20:51 +0200 Subject: [PATCH 17/74] wip --- frame/contracts/src/benchmarking/mod.rs | 12 +++- frame/contracts/src/lib.rs | 16 +++--- frame/contracts/src/migration.rs | 7 +++ frame/contracts/src/migration/v10.rs | 76 ++++++++++++++++++++++++- frame/contracts/src/migration/v11.rs | 56 ++++++++++++++++-- 5 files changed, 150 insertions(+), 17 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 10cf60e2d1d66..ea89c97d98ec5 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -31,12 +31,13 @@ use self::{ }; use crate::{ exec::{AccountIdOf, Key}, + migration::Migrate, wasm::CallFlags, Pallet as Contracts, *, }; use codec::{Encode, MaxEncodedLen}; use frame_benchmarking::v1::{account, benchmarks, whitelisted_caller}; -use frame_support::weights::Weight; +use frame_support::{pallet_prelude::StorageVersion, weights::Weight}; use frame_system::RawOrigin; use sp_runtime::{ traits::{Bounded, Hash}, @@ -244,12 +245,19 @@ benchmarks! { migration.step(); } - // This benchmarks the base weight of dispatching a migrate call. + // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); + + // Execute a (noop) migration a step from 0 -> 1 + assert_eq!(StorageVersion::get::>(), 0); + MigrationInProgress::::set(Some(Default::default())); + }: { >::migrate(origin.into(), Weight::MAX).unwrap_or_default() + } verify { + assert_eq!(StorageVersion::get::>(), 1); } // This benchmarks the overhead of loading a code of size `c` byte from storage and into diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 7888f7dd0831a..bfb400e5ef156 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -131,13 +131,12 @@ use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; pub use crate::{ address::{AddressGenerator, DefaultAddressGenerator}, exec::Frame, - migration::{Migration, MigrateSequence, NoopMigration}, + migration::{MigrateSequence, Migration, NoopMigration}, pallet::*, schedule::{HostFnWeights, InstructionWeights, Limits, Schedule}, wasm::Determinism, }; - #[cfg(doc)] pub use crate::wasm::api_doc; @@ -178,11 +177,11 @@ pub mod pallet { use frame_system::pallet_prelude::*; /// The current storage version. - #[cfg(not(test))] + #[cfg(not(any(test, feature = "runtime-benchmarks")))] const STORAGE_VERSION: StorageVersion = StorageVersion::new(11); /// Hard coded storage version for running tests that depend on the current storage version. - #[cfg(test)] + #[cfg(any(test, feature = "runtime-benchmarks"))] const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); #[pallet::pallet] @@ -743,11 +742,14 @@ pub mod pallet { Error::::MigrateWeightLimitTooLow ); + let (result, weight) = Migration::::migrate(weight_limit); + let weight = weight.saturating_add(T::WeightInfo::migrate()); + use migration::MigrateResult::*; - match Migration::::migrate(weight_limit) { - (InProgress | Completed, weight) => + match result { + InProgress | Completed => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), - (NoMigrationPerformed, weight) => { + NoMigrationPerformed => { let err: DispatchError = >::NoMigrationPerformed.into(); Err(err.with_weight(weight)) }, diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index eedf728c502cb..f1993f9ac9a53 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -145,8 +145,15 @@ pub trait MigrateSequence: private::Sealed { } /// Performs all necessary migrations based on `StorageVersion`. +#[cfg(not(feature = "runtime-benchmarks"))] pub struct Migration>(PhantomData<(T, M)>); +/// Custom migration for running runtime-benchmarks. +#[cfg(feature = "runtime-benchmarks")] +pub struct Migration, NoopMigration<2>)>( + PhantomData<(T, M)>, +); + impl OnRuntimeUpgrade for Migration { fn on_runtime_upgrade() -> Weight { let latest_version = >::current_storage_version(); diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 23e762ccfdfde..5e4cb9b544e38 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -18,12 +18,68 @@ //! Update `CodeStorage` with the new `determinism` field. use crate::{ + address::AddressGenerator, + exec::AccountIdOf, migration::{IsFinished, Migrate}, - Config, Weight, + BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, }; use codec::{Decode, Encode}; -use frame_support::{codec, pallet_prelude::*, DefaultNoBound}; -use sp_std::marker::PhantomData; +use frame_support::{ + codec, + pallet_prelude::*, + storage_alias, + traits::{Currency, ExistenceRequirement}, + DefaultNoBound, +}; +use sp_std::{marker::PhantomData, ops::Deref}; +mod old { + use super::*; + + #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] + #[scale_info(skip_type_params(T))] + pub struct ContractInfo { + pub trie_id: TrieId, + pub code_hash: CodeHash, + pub storage_bytes: u32, + pub storage_items: u32, + pub storage_byte_deposit: BalanceOf, + pub storage_item_deposit: BalanceOf, + pub storage_base_deposit: BalanceOf, + } + + #[storage_alias] + pub type ContractInfoOf = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + ContractInfo, + >; +} + +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)] +#[scale_info(skip_type_params(T))] +pub struct DepositAccount(AccountIdOf); + +impl Deref for DepositAccount { + type Target = AccountIdOf; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[scale_info(skip_type_params(T))] +pub struct ContractInfo { + pub trie_id: TrieId, + deposit_account: DepositAccount, + pub code_hash: CodeHash, + storage_bytes: u32, + storage_items: u32, + pub storage_byte_deposit: BalanceOf, + storage_item_deposit: BalanceOf, + storage_base_deposit: BalanceOf, +} #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] pub struct Migration { @@ -39,6 +95,20 @@ impl Migrate for Migration { fn step(&mut self) -> (IsFinished, Weight) { // TODO + + let (account, contract) = old::ContractInfoOf::::iter().next().unwrap(); + + let deposit_account: DepositAccount = + DepositAccount(T::AddressGenerator::deposit_address(&account)); + + T::Currency::transfer( + &account, + &deposit_account, + contract.storage_byte_deposit, + ExistenceRequirement::KeepAlive, + ) + .unwrap(); + (IsFinished::Yes, Self::max_step_weight()) } } diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 246aabc189e3c..01ac1e1b1c4d8 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -19,17 +19,56 @@ use crate::{ migration::{IsFinished, Migrate}, - Config, Weight, + Config, Pallet, TrieId, Weight, }; use codec::{Decode, Encode}; -use frame_support::{codec, pallet_prelude::*, DefaultNoBound}; +use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; use sp_std::marker::PhantomData; +mod old { + use super::*; + + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen)] + pub struct DeletedContract { + pub(crate) trie_id: TrieId, + } + + #[storage_alias] + pub type DeletionQueue = StorageValue, Vec>; +} + +#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, DefaultNoBound, Clone)] +#[scale_info(skip_type_params(T))] +pub struct DeletionQueueManager { + insert_counter: u32, + delete_counter: u32, + _phantom: PhantomData, +} + +#[storage_alias] +type DeletionQueue = StorageMap, Twox64Concat, u32, TrieId>; + +#[storage_alias] +type DeletionQueueCounter = StorageValue, DeletionQueueManager, ValueQuery>; + #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] pub struct Migration { _phantom: PhantomData, } +#[cfg(feature = "runtime-benchmarks")] +pub fn store_old_dummy_code(len: usize) { + use sp_runtime::traits::Hash; + let module = old::PrefabWasmModule { + instruction_weights_version: 0, + initial: 0, + maximum: 0, + code: vec![42u8; len], + }; + let hash = T::Hashing::hash(&module.code); + old::CodeStorage::::insert(hash, module); +} + impl Migrate for Migration { const VERSION: u16 = 11; @@ -38,8 +77,15 @@ impl Migrate for Migration { } fn step(&mut self) -> (IsFinished, Weight) { - // TODO - (IsFinished::Yes, Self::max_step_weight()) + let Some(contracts) = old::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; + + let mut queue = DeletionQueueManager::::default(); + for contract in contracts { + >::insert(queue.insert_counter, contract.trie_id); + queue.insert_counter += 1; + } + + >::set(queue); + (IsFinished::Yes, Weight::zero()) } } - From f3f69c822ac6db6b2efd9b9386facf21a3829130 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 12:50:15 +0200 Subject: [PATCH 18/74] wip --- frame/contracts/src/benchmarking/mod.rs | 22 +++- frame/contracts/src/migration.rs | 9 +- frame/contracts/src/migration/v10.rs | 133 ++++++++++++++++++++---- frame/contracts/src/migration/v11.rs | 50 +++++---- frame/contracts/src/migration/v9.rs | 6 +- frame/contracts/src/tests.rs | 30 ++++++ frame/contracts/src/weights.rs | 6 +- 7 files changed, 205 insertions(+), 51 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index ea89c97d98ec5..5c831cf2bc499 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -237,7 +237,7 @@ benchmarks! { // This benchmarks the v9 migration cost. #[pov_mode = Measured] - v9_translate_wasm_module { + v9_migration_step { let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); migration::v9::store_old_dummy_code::(c as usize); let mut migration = migration::v9::Migration::::default(); @@ -245,6 +245,26 @@ benchmarks! { migration.step(); } + #[pov_mode = Measured] + v10_migration_step { + let account = account::("account", 0, 0); + let code = WasmModule::::dummy_with_bytes(0); + let info = Contract::::new(code, vec![])?.info()?; + migration::v10::store_old_contrat_info::(account, info); + let mut migration = migration::v10::Migration::::default(); + }: { + migration.step(); + } + + #[pov_mode = Measured] + v11_migration_step { + let k in 0 .. 1024; + migration::v11::fill_old_queue::(k as usize); + let mut migration = migration::v11::Migration::::default(); + }: { + migration.step(); + } + // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] migrate { diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index f1993f9ac9a53..ba9515f37a2bd 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,12 +15,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -mod v10; -mod v11; -#[cfg(feature = "runtime-benchmarks")] +// TODO gate +pub mod v10; +pub mod v11; pub mod v9; -#[cfg(not(feature = "runtime-benchmarks"))] -mod v9; use crate::{Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; use codec::{Codec, Decode}; @@ -43,6 +41,7 @@ fn invalid_version(version: StorageVersion) -> ! { } pub type Cursor = BoundedVec>; + type Migrations = (v9::Migration, v10::Migration, v11::Migration); /// IsFinished describes whether a migration is finished or not. diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 5e4cb9b544e38..150a474162298 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -17,20 +17,28 @@ //! Update `CodeStorage` with the new `determinism` field. +use core::cmp::{max, min}; + use crate::{ address::AddressGenerator, exec::AccountIdOf, migration::{IsFinished, Migrate}, - BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, + BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET, }; use codec::{Decode, Encode}; use frame_support::{ codec, pallet_prelude::*, storage_alias, - traits::{Currency, ExistenceRequirement}, + traits::{ + tokens::{Fortitude::Polite, Preservation::Preserve}, + Currency, ExistenceRequirement, ReservableCurrency, + }, DefaultNoBound, }; + +use frame_support::traits::fungible::Inspect; +use sp_runtime::{Perbill, Saturating}; use sp_std::{marker::PhantomData, ops::Deref}; mod old { use super::*; @@ -56,6 +64,20 @@ mod old { >; } +#[cfg(feature = "runtime-benchmarks")] +pub fn store_old_contrat_info(account: T::AccountId, info: crate::ContractInfo) { + let info = old::ContractInfo { + trie_id: info.trie_id, + code_hash: info.code_hash, + storage_bytes: Default::default(), + storage_items: Default::default(), + storage_byte_deposit: Default::default(), + storage_item_deposit: Default::default(), + storage_base_deposit: Default::default(), + }; + old::ContractInfoOf::::insert(account, info); +} + #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct DepositAccount(AccountIdOf); @@ -83,9 +105,14 @@ pub struct ContractInfo { #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] pub struct Migration { + last_key: Option>>, _phantom: PhantomData, } +#[storage_alias] +type ContractInfoOf = + StorageMap, Twox64Concat, ::AccountId, ContractInfo>; + impl Migrate for Migration { const VERSION: u16 = 10; @@ -94,21 +121,91 @@ impl Migrate for Migration { } fn step(&mut self) -> (IsFinished, Weight) { - // TODO - - let (account, contract) = old::ContractInfoOf::::iter().next().unwrap(); - - let deposit_account: DepositAccount = - DepositAccount(T::AddressGenerator::deposit_address(&account)); - - T::Currency::transfer( - &account, - &deposit_account, - contract.storage_byte_deposit, - ExistenceRequirement::KeepAlive, - ) - .unwrap(); - - (IsFinished::Yes, Self::max_step_weight()) + let mut iter = if let Some(last_key) = self.last_key.take() { + old::ContractInfoOf::::iter_from(last_key.to_vec()) + } else { + old::ContractInfoOf::::iter() + }; + + if let Some((account, contract)) = iter.next() { + log::debug!(target: LOG_TARGET, "Migrating contract info for account {:?}", account); + let min_balance = Pallet::::min_balance(); + + // Store last key for next migration step + self.last_key = Some(iter.last_raw_key().to_vec().try_into().unwrap()); + + // Get the new deposit account address + let deposit_account: DepositAccount = + DepositAccount(T::AddressGenerator::deposit_address(&account)); + + // Calculate the existing deposit, that should be reserved on the contract account + let old_deposit = contract + .storage_byte_deposit + .saturating_add(contract.storage_item_deposit) + .saturating_add(contract.storage_base_deposit); + + // Unreserve the existing deposit, so we can transfer it to the deposit account. + // Note we can't use repatriate_reserve, because it only works with existing accounts + T::Currency::unreserve(&account, old_deposit); + + // Attempt to transfer it to the deposit account. + let new_deposit = T::Currency::transfer( + &account, + &deposit_account, + old_deposit, + ExistenceRequirement::KeepAlive, + ) + .map(|_| old_deposit) + // If it fails, we try to transfer the account reducible balance instead. + .or_else(|_| { + log::error!( + target: LOG_TARGET, + "Failed to transfer deposit for account {:?}", + account + ); + let deposit = T::Currency::reducible_balance(&account, Preserve, Polite); + T::Currency::transfer( + &account, + &deposit_account, + T::Currency::reducible_balance(&account, Preserve, Polite), + ExistenceRequirement::KeepAlive, + ) + .map(|_| deposit) + }) + // If it fails we fallback to minting the ED. + .unwrap_or_else(|_| { + log::error!(target: LOG_TARGET, "Failed to transfer ED for account {:?}", account); + T::Currency::deposit_creating(&deposit_account, min_balance); + min_balance + }); + + // Calculate the new base_deposit + let new_base_deposit = min( + max(contract.storage_base_deposit, min_balance.saturating_add(min_balance)), + new_deposit, + ); + + let new_deposit_without_base = new_deposit.saturating_sub(new_base_deposit); + let old_deposit_without_base = + old_deposit.saturating_sub(contract.storage_base_deposit); + let ratio = Perbill::from_rational(new_deposit_without_base, old_deposit_without_base); + + let new_contract_info = ContractInfo { + trie_id: contract.trie_id, + deposit_account, + code_hash: contract.code_hash, + storage_bytes: contract.storage_bytes, + storage_items: contract.storage_items, + storage_byte_deposit: ratio.mul_ceil(contract.storage_byte_deposit), + storage_item_deposit: ratio.mul_ceil(contract.storage_item_deposit), + storage_base_deposit: new_base_deposit, + }; + ContractInfoOf::::insert(&account, new_contract_info); + + (IsFinished::No, Weight::zero()) + } else { + log::debug!(target: LOG_TARGET, "Done Migrating contract info"); + (IsFinished::Yes, Weight::zero()) + } } } diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 01ac1e1b1c4d8..31af9a94316fa 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -19,7 +19,7 @@ use crate::{ migration::{IsFinished, Migrate}, - Config, Pallet, TrieId, Weight, + Config, Pallet, TrieId, Weight, LOG_TARGET, }; use codec::{Decode, Encode}; use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; @@ -45,6 +45,15 @@ pub struct DeletionQueueManager { _phantom: PhantomData, } +#[cfg(feature = "runtime-benchmarks")] +pub fn fill_old_queue(len: usize) { + let queue: Vec = + std::iter::repeat_with(|| old::DeletedContract { trie_id: Default::default() }) + .take(len) + .collect(); + old::DeletionQueue::::set(Some(queue)); +} + #[storage_alias] type DeletionQueue = StorageMap, Twox64Concat, u32, TrieId>; @@ -56,36 +65,35 @@ pub struct Migration { _phantom: PhantomData, } -#[cfg(feature = "runtime-benchmarks")] -pub fn store_old_dummy_code(len: usize) { - use sp_runtime::traits::Hash; - let module = old::PrefabWasmModule { - instruction_weights_version: 0, - initial: 0, - maximum: 0, - code: vec![42u8; len], - }; - let hash = T::Hashing::hash(&module.code); - old::CodeStorage::::insert(hash, module); -} - impl Migrate for Migration { const VERSION: u16 = 11; + // It will be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/paritytech/substrate/pull/13702/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c) + // but in practice the queue is always empty, so 128 is isa good enough approximation for not + // underestimating the weight of our migration. fn max_step_weight() -> Weight { Weight::zero() // TODO fix } fn step(&mut self) -> (IsFinished, Weight) { - let Some(contracts) = old::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; - - let mut queue = DeletionQueueManager::::default(); - for contract in contracts { - >::insert(queue.insert_counter, contract.trie_id); - queue.insert_counter += 1; + let Some(old_queue) = old::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; + + log::debug!( + target: LOG_TARGET, + "Migrating deletion queue with {} deleted contracts", + old_queue.len() + ); + + if !old_queue.is_empty() { + let mut queue = DeletionQueueManager::::default(); + for contract in old_queue { + >::insert(queue.insert_counter, contract.trie_id); + queue.insert_counter += 1; + } + + >::set(queue); } - >::set(queue); (IsFinished::Yes, Weight::zero()) } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index 0f431a94b7354..bc3e2f51d99bf 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -85,7 +85,7 @@ impl Migrate for Migration { const VERSION: u16 = 9; fn max_step_weight() -> Weight { - T::WeightInfo::v9_translate_wasm_module(T::MaxCodeLen::get()) + T::WeightInfo::v9_migration_step(T::MaxCodeLen::get()) } fn step(&mut self) -> (IsFinished, Weight) { @@ -107,10 +107,10 @@ impl Migrate for Migration { }; CodeStorage::::insert(key, module); self.last_key = Some(iter.last_raw_key().to_vec().try_into().unwrap()); - (IsFinished::No, T::WeightInfo::v9_translate_wasm_module(len)) + (IsFinished::No, T::WeightInfo::v9_migration_step(len)) } else { log::debug!(target: LOG_TARGET, "No more contracts code to migrate"); - (IsFinished::Yes, T::WeightInfo::v9_translate_wasm_module(0)) + (IsFinished::Yes, T::WeightInfo::v9_migration_step(0)) } } } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 697b58f15c609..447dff263a64b 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -2195,6 +2195,36 @@ fn lazy_removal_does_no_run_on_low_remaining_weight() { }); } +#[test] +fn print_stuff() { + let (code, _hash) = compile_module::("self_destruct").unwrap(); + + let mut ext = ExtBuilder::default().existential_deposit(50).build(); + + ext.execute_with(|| { + let min_balance = ::Currency::minimum_balance(); + let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); + + let addr = Contracts::bare_instantiate( + ALICE, + min_balance * 100, + GAS_LIMIT, + None, + Code::Upload(code), + vec![], + vec![], + false, + ) + .result + .unwrap() + .account_id; + + let info = get_contract(&addr); + println!("len trie_id: {:?}", info.trie_id.len()); + println!("info: {:?}", info.encoded_size()); + }); +} + #[test] fn lazy_removal_does_not_use_all_weight() { let (code, _hash) = compile_module::("self_destruct").unwrap(); diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 3664cdf510c0c..ffaf05c13f8dc 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -53,7 +53,7 @@ pub trait WeightInfo { fn on_process_deletion_queue_batch() -> Weight; fn on_initialize_per_trie_key(k: u32, ) -> Weight; fn reinstrument(c: u32, ) -> Weight; - fn v9_translate_wasm_module(c: u32, ) -> Weight; + fn v9_migration_step(c: u32, ) -> Weight; fn migrate() -> Weight; fn call_with_code_per_byte(c: u32, ) -> Weight; fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight; @@ -222,7 +222,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: Contracts CodeStorage (r:2 w:1) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// The range of component `c` is `[0, 61717]`. - fn v9_translate_wasm_module(c: u32, ) -> Weight { + fn v9_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `178 + c * (1 ±0)` // Estimated: `6114 + c * (1 ±0)` @@ -2341,7 +2341,7 @@ impl WeightInfo for () { /// Storage: Contracts CodeStorage (r:2 w:1) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// The range of component `c` is `[0, 61717]`. - fn v9_translate_wasm_module(c: u32, ) -> Weight { + fn v9_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `178 + c * (1 ±0)` // Estimated: `6114 + c * (1 ±0)` From 1b07693f9aff47949bb925a5671e2e240c064fa5 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 16:40:45 +0200 Subject: [PATCH 19/74] wip --- frame/contracts/src/benchmarking/mod.rs | 17 +- frame/contracts/src/migration.rs | 2 +- frame/contracts/src/migration/v10.rs | 12 +- frame/contracts/src/migration/v11.rs | 12 +- frame/contracts/src/weights.rs | 2024 ++++++++++++----------- 5 files changed, 1071 insertions(+), 996 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 5c831cf2bc499..22256e0a0bf49 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -271,13 +271,26 @@ benchmarks! { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); // Execute a (noop) migration a step from 0 -> 1 - assert_eq!(StorageVersion::get::>(), 0); + assert_eq!(StorageVersion::get::>(), 2); MigrationInProgress::::set(Some(Default::default())); }: { >::migrate(origin.into(), Weight::MAX).unwrap_or_default() } verify { - assert_eq!(StorageVersion::get::>(), 1); + assert_eq!(StorageVersion::get::>(), 3); + } + + // This benchmarks the base weight of dispatching a noop migrate call. + #[pov_mode = Measured] + on_runtime_upgrade { + // Execute a (noop) migration a step from 0 -> 1 + assert_eq!(StorageVersion::get::>(), 2); + MigrationInProgress::::set(Some(Default::default())); + + }: { + as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() + } verify { + assert_eq!(StorageVersion::get::>(), 3); } // This benchmarks the overhead of loading a code of size `c` byte from storage and into diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index ba9515f37a2bd..9d266e648a70a 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -149,7 +149,7 @@ pub struct Migration>(PhantomData< /// Custom migration for running runtime-benchmarks. #[cfg(feature = "runtime-benchmarks")] -pub struct Migration, NoopMigration<2>)>( +pub struct Migration, NoopMigration<4>)>( PhantomData<(T, M)>, ); diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 150a474162298..1b54d8bce4f9c 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -17,15 +17,15 @@ //! Update `CodeStorage` with the new `determinism` field. -use core::cmp::{max, min}; - use crate::{ address::AddressGenerator, exec::AccountIdOf, migration::{IsFinished, Migrate}, + weights::WeightInfo, BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET, }; use codec::{Decode, Encode}; +use core::cmp::{max, min}; use frame_support::{ codec, pallet_prelude::*, @@ -117,7 +117,7 @@ impl Migrate for Migration { const VERSION: u16 = 10; fn max_step_weight() -> Weight { - Weight::zero() // TODO fix + T::WeightInfo::v10_migration_step() } fn step(&mut self) -> (IsFinished, Weight) { @@ -200,12 +200,12 @@ impl Migrate for Migration { storage_item_deposit: ratio.mul_ceil(contract.storage_item_deposit), storage_base_deposit: new_base_deposit, }; - ContractInfoOf::::insert(&account, new_contract_info); - (IsFinished::No, Weight::zero()) + ContractInfoOf::::insert(&account, new_contract_info); + (IsFinished::No, T::WeightInfo::v10_migration_step()) } else { log::debug!(target: LOG_TARGET, "Done Migrating contract info"); - (IsFinished::Yes, Weight::zero()) + (IsFinished::Yes, T::WeightInfo::v10_migration_step()) } } } diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 31af9a94316fa..55575f00d8db7 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -19,12 +19,13 @@ use crate::{ migration::{IsFinished, Migrate}, + weights::WeightInfo, Config, Pallet, TrieId, Weight, LOG_TARGET, }; + use codec::{Decode, Encode}; use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; -use sp_std::marker::PhantomData; - +use sp_std::{marker::PhantomData, prelude::*}; mod old { use super::*; @@ -48,7 +49,7 @@ pub struct DeletionQueueManager { #[cfg(feature = "runtime-benchmarks")] pub fn fill_old_queue(len: usize) { let queue: Vec = - std::iter::repeat_with(|| old::DeletedContract { trie_id: Default::default() }) + core::iter::repeat_with(|| old::DeletedContract { trie_id: Default::default() }) .take(len) .collect(); old::DeletionQueue::::set(Some(queue)); @@ -72,11 +73,12 @@ impl Migrate for Migration { // but in practice the queue is always empty, so 128 is isa good enough approximation for not // underestimating the weight of our migration. fn max_step_weight() -> Weight { - Weight::zero() // TODO fix + T::WeightInfo::v11_migration_step(128) } fn step(&mut self) -> (IsFinished, Weight) { let Some(old_queue) = old::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; + let len = old_queue.len(); log::debug!( target: LOG_TARGET, @@ -94,6 +96,6 @@ impl Migrate for Migration { >::set(queue); } - (IsFinished::Yes, Weight::zero()) + (IsFinished::Yes, T::WeightInfo::v11_migration_step(len as u32)) } } diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index ffaf05c13f8dc..22cfd9e06bbe3 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -18,22 +18,20 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-09, STEPS: `50`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! HOSTNAME: `pgs-laptop.lan`, CPU: `` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// target/production/substrate +// target/release/substrate // benchmark // pallet // --steps=50 -// --repeat=20 +// --repeat=10 // --extrinsic=* // --execution=wasm // --wasm-execution=compiled -// --heap-pages=4096 -// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json // --pallet=pallet_contracts // --chain=dev // --header=./HEADER-APACHE2 @@ -54,6 +52,8 @@ pub trait WeightInfo { fn on_initialize_per_trie_key(k: u32, ) -> Weight; fn reinstrument(c: u32, ) -> Weight; fn v9_migration_step(c: u32, ) -> Weight; + fn v10_migration_step() -> Weight; + fn v11_migration_step(k: u32, ) -> Weight; fn migrate() -> Weight; fn call_with_code_per_byte(c: u32, ) -> Weight; fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight; @@ -181,8 +181,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_548_000 picoseconds. - Weight::from_parts(2_677_000, 1594) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -192,10 +192,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_465_000 picoseconds. - Weight::from_parts(8_978_953, 478) - // Standard Error: 947 - .saturating_add(Weight::from_parts(967_373, 0).saturating_mul(k.into())) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(6_956_629, 478) + // Standard Error: 3_221 + .saturating_add(Weight::from_parts(917_448, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -211,10 +211,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_499_000 picoseconds. - Weight::from_parts(22_221_289, 3708) - // Standard Error: 128 - .saturating_add(Weight::from_parts(54_915, 0).saturating_mul(c.into())) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(32_000_000, 3708) + // Standard Error: 112 + .saturating_add(Weight::from_parts(102_382, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -226,23 +226,55 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `178 + c * (1 ±0)` // Estimated: `6114 + c * (1 ±0)` - // Minimum execution time: 9_369_000 picoseconds. - Weight::from_parts(10_852_386, 6114) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_306, 0).saturating_mul(c.into())) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(6_237_316, 6114) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_061, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Storage: Contracts ContractInfoOf (r:2 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + fn v10_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `442` + // Estimated: `6382` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 6382) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Contracts DeletionQueue (r:1 w:1025) + /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: Contracts DeletionQueueCounter (r:0 w:1) + /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// The range of component `k` is `[0, 1024]`. + fn v11_migration_step(k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `138 + k * (1 ±0)` + // Estimated: `3602 + k * (1 ±0)` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(28_605, 3602) + // Standard Error: 1_636 + .saturating_add(Weight::from_parts(1_206_882, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) fn migrate() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 5_978_000 picoseconds. - Weight::from_parts(6_097_000, 1594) - .saturating_add(T::DbWeight::get().reads(1_u64)) + // Measured: `133` + // Estimated: `3598` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 3598) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Contracts MigrationInProgress (r:1 w:0) /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) @@ -261,10 +293,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 266_158_000 picoseconds. - Weight::from_parts(279_911_136, 6656) - // Standard Error: 29 - .saturating_add(Weight::from_parts(37_837, 0).saturating_mul(c.into())) + // Minimum execution time: 281_000_000 picoseconds. + Weight::from_parts(215_305_116, 6656) + // Standard Error: 197 + .saturating_add(Weight::from_parts(73_618, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -293,15 +325,15 @@ impl WeightInfo for SubstrateWeight { fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `270` - // Estimated: `8659` - // Minimum execution time: 3_133_022_000 picoseconds. - Weight::from_parts(647_533_067, 8659) - // Standard Error: 283 - .saturating_add(Weight::from_parts(106_602, 0).saturating_mul(c.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_117, 0).saturating_mul(i.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_405, 0).saturating_mul(s.into())) + // Estimated: `8661` + // Minimum execution time: 3_513_000_000 picoseconds. + Weight::from_parts(161_960_698, 8661) + // Standard Error: 651 + .saturating_add(Weight::from_parts(192_788, 0).saturating_mul(c.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_668, 0).saturating_mul(i.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_467, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } @@ -326,13 +358,13 @@ impl WeightInfo for SubstrateWeight { fn instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `482` - // Estimated: `6408` - // Minimum execution time: 1_651_947_000 picoseconds. - Weight::from_parts(293_042_001, 6408) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(i.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_444, 0).saturating_mul(s.into())) + // Estimated: `6407` + // Minimum execution time: 1_675_000_000 picoseconds. + Weight::from_parts(153_714_839, 6407) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_637, 0).saturating_mul(i.into())) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_607, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -352,8 +384,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 194_753_000 picoseconds. - Weight::from_parts(195_766_000, 6699) + // Minimum execution time: 194_000_000 picoseconds. + Weight::from_parts(201_000_000, 6699) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -372,10 +404,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 256_804_000 picoseconds. - Weight::from_parts(267_432_334, 3574) - // Standard Error: 103 - .saturating_add(Weight::from_parts(108_385, 0).saturating_mul(c.into())) + // Minimum execution time: 261_000_000 picoseconds. + Weight::from_parts(336_093_237, 3574) + // Standard Error: 330 + .saturating_add(Weight::from_parts(189_070, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -393,8 +425,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_924_000 picoseconds. - Weight::from_parts(35_867_000, 3720) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 3720) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -410,8 +442,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 34_578_000 picoseconds. - Weight::from_parts(35_470_000, 8985) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_000_000, 8985) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -432,10 +464,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 238_237_000 picoseconds. - Weight::from_parts(246_399_253, 6722) - // Standard Error: 781 - .saturating_add(Weight::from_parts(322_803, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(247_724_727, 6722) + // Standard Error: 975 + .saturating_add(Weight::from_parts(481_954, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -457,10 +489,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 238_025_000 picoseconds. - Weight::from_parts(76_642_081, 6743) - // Standard Error: 6_541 - .saturating_add(Weight::from_parts(3_308_462, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(112_219_961, 6743) + // Standard Error: 9_810 + .saturating_add(Weight::from_parts(3_335_222, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -483,10 +515,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 240_177_000 picoseconds. - Weight::from_parts(66_393_427, 6747) - // Standard Error: 7_670 - .saturating_add(Weight::from_parts(4_164_419, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(95_983_645, 6747) + // Standard Error: 10_997 + .saturating_add(Weight::from_parts(4_345_173, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -509,10 +541,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 238_175_000 picoseconds. - Weight::from_parts(247_360_071, 6730) - // Standard Error: 5_724 - .saturating_add(Weight::from_parts(412_164, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(244_902_119, 6730) + // Standard Error: 1_176 + .saturating_add(Weight::from_parts(601_187, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -534,10 +566,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_959_000 picoseconds. - Weight::from_parts(241_263_663, 6723) - // Standard Error: 422 - .saturating_add(Weight::from_parts(160_204, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(249_137_222, 6723) + // Standard Error: 652 + .saturating_add(Weight::from_parts(228_819, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -559,10 +591,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 237_469_000 picoseconds. - Weight::from_parts(244_507_496, 6724) - // Standard Error: 761 - .saturating_add(Weight::from_parts(322_807, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_373_668, 6724) + // Standard Error: 1_916 + .saturating_add(Weight::from_parts(508_033, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -584,10 +616,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6719 + r * (6 ±0)` - // Minimum execution time: 237_524_000 picoseconds. - Weight::from_parts(241_895_288, 6719) - // Standard Error: 773 - .saturating_add(Weight::from_parts(521_994, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(237_397_415, 6719) + // Standard Error: 2_017 + .saturating_add(Weight::from_parts(794_292, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -609,10 +641,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 240_344_000 picoseconds. - Weight::from_parts(246_991_292, 6846) - // Standard Error: 1_133 - .saturating_add(Weight::from_parts(1_462_720, 0).saturating_mul(r.into())) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(252_161_626, 6846) + // Standard Error: 4_818 + .saturating_add(Weight::from_parts(1_915_363, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -634,10 +666,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 239_908_000 picoseconds. - Weight::from_parts(242_820_641, 6741) - // Standard Error: 597 - .saturating_add(Weight::from_parts(324_174, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_417_535, 6741) + // Standard Error: 1_157 + .saturating_add(Weight::from_parts(486_728, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -659,10 +691,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 237_856_000 picoseconds. - Weight::from_parts(251_150_544, 6739) - // Standard Error: 868 - .saturating_add(Weight::from_parts(315_232, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(246_001_192, 6739) + // Standard Error: 1_276 + .saturating_add(Weight::from_parts(477_831, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -684,10 +716,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 237_197_000 picoseconds. - Weight::from_parts(241_186_858, 6737) - // Standard Error: 639 - .saturating_add(Weight::from_parts(318_375, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(254_882_028, 6737) + // Standard Error: 1_871 + .saturating_add(Weight::from_parts(488_056, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -709,10 +741,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 237_676_000 picoseconds. - Weight::from_parts(243_872_868, 6723) - // Standard Error: 611 - .saturating_add(Weight::from_parts(316_938, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(244_505_205, 6723) + // Standard Error: 1_327 + .saturating_add(Weight::from_parts(485_930, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -736,10 +768,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `852 + r * (14 ±0)` // Estimated: `6785 + r * (14 ±0)` - // Minimum execution time: 237_520_000 picoseconds. - Weight::from_parts(258_882_921, 6785) - // Standard Error: 1_949 - .saturating_add(Weight::from_parts(1_365_562, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(258_192_481, 6785) + // Standard Error: 1_849 + .saturating_add(Weight::from_parts(1_573_953, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) @@ -761,10 +793,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 163_866_000 picoseconds. - Weight::from_parts(166_333_760, 6687) - // Standard Error: 2_405 - .saturating_add(Weight::from_parts(138_325, 0).saturating_mul(r.into())) + // Minimum execution time: 156_000_000 picoseconds. + Weight::from_parts(157_749_743, 6687) + // Standard Error: 672 + .saturating_add(Weight::from_parts(202_788, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) @@ -786,10 +818,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 237_456_000 picoseconds. - Weight::from_parts(245_578_643, 6724) - // Standard Error: 549 - .saturating_add(Weight::from_parts(265_605, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(245_850_139, 6724) + // Standard Error: 1_021 + .saturating_add(Weight::from_parts(394_870, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -811,10 +843,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 241_032_000 picoseconds. - Weight::from_parts(242_874_505, 6724) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(250_558_922, 6724) // Standard Error: 1 - .saturating_add(Weight::from_parts(593, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(357, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -835,10 +867,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 234_478_000 picoseconds. - Weight::from_parts(237_534_048, 6708) - // Standard Error: 197_777 - .saturating_add(Weight::from_parts(1_581_051, 0).saturating_mul(r.into())) + // Minimum execution time: 238_000_000 picoseconds. + Weight::from_parts(241_382_113, 6708) + // Standard Error: 460_176 + .saturating_add(Weight::from_parts(9_617_886, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -860,10 +892,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 237_015_000 picoseconds. - Weight::from_parts(239_909_565, 6731) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(253_643_177, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(145, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -890,10 +922,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 236_370_000 picoseconds. - Weight::from_parts(239_243_467, 6750) - // Standard Error: 274_349 - .saturating_add(Weight::from_parts(115_896_632, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(246_276_422, 6750) + // Standard Error: 1_219_373 + .saturating_add(Weight::from_parts(123_723_577, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -919,10 +951,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 239_772_000 picoseconds. - Weight::from_parts(242_724_214, 6769) - // Standard Error: 2_967 - .saturating_add(Weight::from_parts(1_754_941, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(247_411_989, 6769) + // Standard Error: 2_641 + .saturating_add(Weight::from_parts(2_279_544, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -944,10 +976,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 235_440_000 picoseconds. - Weight::from_parts(272_455_779, 6723) - // Standard Error: 4_633 - .saturating_add(Weight::from_parts(3_484_878, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(233_124_230, 6723) + // Standard Error: 7_508 + .saturating_add(Weight::from_parts(4_180_190, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -970,12 +1002,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 254_882_000 picoseconds. - Weight::from_parts(249_748_140, 6744) - // Standard Error: 94_551 - .saturating_add(Weight::from_parts(2_385_909, 0).saturating_mul(t.into())) - // Standard Error: 26 - .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) + // Minimum execution time: 257_000_000 picoseconds. + Weight::from_parts(258_777_449, 6744) + // Standard Error: 178_914 + .saturating_add(Weight::from_parts(1_047_698, 0).saturating_mul(t.into())) + // Standard Error: 48 + .saturating_add(Weight::from_parts(242, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -999,10 +1031,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 166_376_000 picoseconds. - Weight::from_parts(171_383_256, 6721) - // Standard Error: 345 - .saturating_add(Weight::from_parts(233_133, 0).saturating_mul(r.into())) + // Minimum execution time: 160_000_000 picoseconds. + Weight::from_parts(164_953_391, 6721) + // Standard Error: 623 + .saturating_add(Weight::from_parts(331_573, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -1024,10 +1056,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 353_406_000 picoseconds. - Weight::from_parts(357_371_823, 131670) + // Minimum execution time: 328_000_000 picoseconds. + Weight::from_parts(330_131_900, 131670) // Standard Error: 1 - .saturating_add(Weight::from_parts(740, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(492, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1038,10 +1070,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 239_610_000 picoseconds. - Weight::from_parts(129_137_013, 843) - // Standard Error: 10_406 - .saturating_add(Weight::from_parts(6_175_998, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(178_965_804, 843) + // Standard Error: 37_124 + .saturating_add(Weight::from_parts(5_555_860, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1055,10 +1087,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 253_714_000 picoseconds. - Weight::from_parts(286_943_345, 1280) - // Standard Error: 52 - .saturating_add(Weight::from_parts(580, 0).saturating_mul(n.into())) + // Minimum execution time: 253_000_000 picoseconds. + Weight::from_parts(287_253_482, 1280) + // Standard Error: 73 + .saturating_add(Weight::from_parts(960, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1069,8 +1101,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 254_191_000 picoseconds. - Weight::from_parts(260_134_212, 1167) + // Minimum execution time: 253_000_000 picoseconds. + Weight::from_parts(266_941_040, 1167) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1082,10 +1114,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 238_786_000 picoseconds. - Weight::from_parts(130_111_573, 845) - // Standard Error: 10_357 - .saturating_add(Weight::from_parts(5_982_349, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(190_506_498, 845) + // Standard Error: 15_224 + .saturating_add(Weight::from_parts(5_245_595, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1099,10 +1131,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 253_416_000 picoseconds. - Weight::from_parts(255_813_949, 1163) - // Standard Error: 24 - .saturating_add(Weight::from_parts(159, 0).saturating_mul(n.into())) + // Minimum execution time: 252_000_000 picoseconds. + Weight::from_parts(252_930_713, 1163) + // Standard Error: 37 + .saturating_add(Weight::from_parts(341, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1114,10 +1146,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 239_113_000 picoseconds. - Weight::from_parts(150_650_781, 840) - // Standard Error: 9_285 - .saturating_add(Weight::from_parts(4_954_934, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(153_870_919, 840) + // Standard Error: 20_202 + .saturating_add(Weight::from_parts(4_698_160, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1130,10 +1162,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 254_076_000 picoseconds. - Weight::from_parts(256_571_975, 1179) - // Standard Error: 36 - .saturating_add(Weight::from_parts(590, 0).saturating_mul(n.into())) + // Minimum execution time: 256_000_000 picoseconds. + Weight::from_parts(272_824_702, 1179) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1145,10 +1175,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 239_142_000 picoseconds. - Weight::from_parts(151_921_194, 857) - // Standard Error: 8_732 - .saturating_add(Weight::from_parts(4_789_792, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(156_588_098, 857) + // Standard Error: 16_965 + .saturating_add(Weight::from_parts(4_357_625, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1161,10 +1191,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 251_295_000 picoseconds. - Weight::from_parts(253_924_366, 1166) - // Standard Error: 29 - .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) + // Minimum execution time: 252_000_000 picoseconds. + Weight::from_parts(258_036_189, 1166) + // Standard Error: 120 + .saturating_add(Weight::from_parts(288, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1176,10 +1206,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 238_249_000 picoseconds. - Weight::from_parts(136_162_523, 836) - // Standard Error: 10_064 - .saturating_add(Weight::from_parts(6_136_548, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(218_345_401, 836) + // Standard Error: 27_383 + .saturating_add(Weight::from_parts(5_524_816, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1193,10 +1223,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 253_832_000 picoseconds. - Weight::from_parts(256_959_533, 1180) - // Standard Error: 17 - .saturating_add(Weight::from_parts(656, 0).saturating_mul(n.into())) + // Minimum execution time: 254_000_000 picoseconds. + Weight::from_parts(255_915_925, 1180) + // Standard Error: 27 + .saturating_add(Weight::from_parts(432, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1218,10 +1248,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 239_088_000 picoseconds. - Weight::from_parts(285_114_297, 7270) - // Standard Error: 46_679 - .saturating_add(Weight::from_parts(35_601_583, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(283_191_618, 7270) + // Standard Error: 121_212 + .saturating_add(Weight::from_parts(44_059_400, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -1245,10 +1275,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1140 + r * (276 ±0)` // Estimated: `7049 + r * (2752 ±0)` - // Minimum execution time: 240_796_000 picoseconds. - Weight::from_parts(241_521_000, 7049) - // Standard Error: 96_067 - .saturating_add(Weight::from_parts(213_656_608, 0).saturating_mul(r.into())) + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(246_000_000, 7049) + // Standard Error: 277_674 + .saturating_add(Weight::from_parts(227_734_011, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1271,11 +1301,11 @@ impl WeightInfo for SubstrateWeight { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` - // Estimated: `6727 + r * (2572 ±3)` - // Minimum execution time: 239_065_000 picoseconds. - Weight::from_parts(240_123_000, 6727) - // Standard Error: 94_312 - .saturating_add(Weight::from_parts(208_326_355, 0).saturating_mul(r.into())) + // Estimated: `6727 + r * (2572 ±13)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_000_000, 6727) + // Standard Error: 303_428 + .saturating_add(Weight::from_parts(224_274_832, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1300,12 +1330,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 414_681_000 picoseconds. - Weight::from_parts(387_233_284, 9569) - // Standard Error: 923_756 - .saturating_add(Weight::from_parts(31_886_473, 0).saturating_mul(t.into())) - // Standard Error: 1 - .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + // Minimum execution time: 421_000_000 picoseconds. + Weight::from_parts(380_429_732, 9569) + // Standard Error: 1_430_131 + .saturating_add(Weight::from_parts(43_325_255, 0).saturating_mul(t.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(369, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(5_u64)) @@ -1333,10 +1363,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1322 + r * (254 ±0)` // Estimated: `7146 + r * (5205 ±0)` - // Minimum execution time: 574_065_000 picoseconds. - Weight::from_parts(575_592_000, 7146) - // Standard Error: 246_955 - .saturating_add(Weight::from_parts(345_705_670, 0).saturating_mul(r.into())) + // Minimum execution time: 602_000_000 picoseconds. + Weight::from_parts(604_000_000, 7146) + // Standard Error: 477_346 + .saturating_add(Weight::from_parts(366_530_753, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1365,15 +1395,15 @@ impl WeightInfo for SubstrateWeight { fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` - // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_615_748_000 picoseconds. - Weight::from_parts(341_307_617, 9492) - // Standard Error: 5_315_899 - .saturating_add(Weight::from_parts(119_339_357, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(i.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_343, 0).saturating_mul(s.into())) + // Estimated: `9493 + t * (2634 ±4)` + // Minimum execution time: 1_767_000_000 picoseconds. + Weight::from_parts(372_887_319, 9493) + // Standard Error: 6_072_227 + .saturating_add(Weight::from_parts(108_081_995, 0).saturating_mul(t.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(i.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_373, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) @@ -1397,10 +1427,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 235_569_000 picoseconds. - Weight::from_parts(240_272_470, 6718) - // Standard Error: 739 - .saturating_add(Weight::from_parts(569_501, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(247_838_491, 6718) + // Standard Error: 1_894 + .saturating_add(Weight::from_parts(649_120, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1422,10 +1452,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 236_251_000 picoseconds. - Weight::from_parts(231_532_969, 6725) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(253_982_032, 6725) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_935, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_136, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1446,10 +1476,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 235_261_000 picoseconds. - Weight::from_parts(245_916_216, 6721) - // Standard Error: 2_735 - .saturating_add(Weight::from_parts(746_676, 0).saturating_mul(r.into())) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(239_465_081, 6721) + // Standard Error: 2_370 + .saturating_add(Weight::from_parts(726_746, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1471,10 +1501,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 237_766_000 picoseconds. - Weight::from_parts(224_241_852, 6729) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_182, 0).saturating_mul(n.into())) + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(241_488_342, 6729) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_839, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1495,10 +1525,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 235_106_000 picoseconds. - Weight::from_parts(240_306_761, 6724) - // Standard Error: 753 - .saturating_add(Weight::from_parts(415_885, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(244_540_966, 6724) + // Standard Error: 1_478 + .saturating_add(Weight::from_parts(595_393, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1520,10 +1550,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 237_193_000 picoseconds. - Weight::from_parts(235_328_929, 6733) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(250_906_587, 6733) // Standard Error: 3 - .saturating_add(Weight::from_parts(915, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_140, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1544,10 +1574,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 235_233_000 picoseconds. - Weight::from_parts(243_027_485, 6725) - // Standard Error: 709 - .saturating_add(Weight::from_parts(407_457, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(244_475_285, 6725) + // Standard Error: 1_554 + .saturating_add(Weight::from_parts(582_997, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1569,10 +1599,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 236_933_000 picoseconds. - Weight::from_parts(229_499_726, 6727) + // Minimum execution time: 240_000_000 picoseconds. + Weight::from_parts(251_609_718, 6727) // Standard Error: 2 - .saturating_add(Weight::from_parts(916, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_114, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1592,11 +1622,11 @@ impl WeightInfo for SubstrateWeight { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6849 + n * (1 ±0)` - // Minimum execution time: 289_569_000 picoseconds. - Weight::from_parts(295_501_374, 6849) - // Standard Error: 8 - .saturating_add(Weight::from_parts(4_718, 0).saturating_mul(n.into())) + // Estimated: `6851 + n * (1 ±0)` + // Minimum execution time: 284_000_000 picoseconds. + Weight::from_parts(286_757_387, 6851) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_452, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1616,12 +1646,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `722 + r * (112 ±0)` + // Measured: `725 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 238_956_000 picoseconds. - Weight::from_parts(249_363_777, 6666) - // Standard Error: 21_411 - .saturating_add(Weight::from_parts(48_134_102, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(257_745_348, 6666) + // Standard Error: 49_977 + .saturating_add(Weight::from_parts(38_995_195, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -1641,12 +1671,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `821 + r * (76 ±0)` - // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 241_366_000 picoseconds. - Weight::from_parts(256_403_505, 6716) - // Standard Error: 19_860 - .saturating_add(Weight::from_parts(37_761_641, 0).saturating_mul(r.into())) + // Measured: `822 + r * (76 ±0)` + // Estimated: `6718 + r * (77 ±0)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(260_037_728, 6718) + // Standard Error: 71_454 + .saturating_add(Weight::from_parts(37_241_728, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -1667,11 +1697,11 @@ impl WeightInfo for SubstrateWeight { fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` - // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 241_127_000 picoseconds. - Weight::from_parts(243_612_263, 6731) - // Standard Error: 9_428 - .saturating_add(Weight::from_parts(9_337_164, 0).saturating_mul(r.into())) + // Estimated: `6733 + r * (42 ±0)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(245_865_215, 6733) + // Standard Error: 20_741 + .saturating_add(Weight::from_parts(8_415_385, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -1694,11 +1724,11 @@ impl WeightInfo for SubstrateWeight { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±7)` - // Minimum execution time: 240_700_000 picoseconds. - Weight::from_parts(241_021_000, 8190) - // Standard Error: 46_456 - .saturating_add(Weight::from_parts(21_734_413, 0).saturating_mul(r.into())) + // Estimated: `8190 + r * (3090 ±9)` + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(245_000_000, 8190) + // Standard Error: 44_605 + .saturating_add(Weight::from_parts(21_723_295, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1722,10 +1752,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 238_740_000 picoseconds. - Weight::from_parts(242_205_894, 6723) - // Standard Error: 356 - .saturating_add(Weight::from_parts(162_911, 0).saturating_mul(r.into())) + // Minimum execution time: 240_000_000 picoseconds. + Weight::from_parts(243_819_920, 6723) + // Standard Error: 895 + .saturating_add(Weight::from_parts(233_523, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1747,10 +1777,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 240_552_000 picoseconds. - Weight::from_parts(270_251_375, 7805) - // Standard Error: 1_043 - .saturating_add(Weight::from_parts(261_776, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(256_423_054, 7805) + // Standard Error: 2_733 + .saturating_add(Weight::from_parts(380_566, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -1774,10 +1804,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 238_216_000 picoseconds. - Weight::from_parts(245_301_500, 6723) - // Standard Error: 475 - .saturating_add(Weight::from_parts(142_584, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(247_913_498, 6723) + // Standard Error: 767 + .saturating_add(Weight::from_parts(197_935, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1787,508 +1817,508 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(1_955_112, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(3_030, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_211_298, 0) + // Standard Error: 19 + .saturating_add(Weight::from_parts(21_230, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_794_000 picoseconds. - Weight::from_parts(2_376_415, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(6_440, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_300_914, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(34_934, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_777_000 picoseconds. - Weight::from_parts(2_334_614, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_944_965, 0) + // Standard Error: 40 + .saturating_add(Weight::from_parts(35_606, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_681_000 picoseconds. - Weight::from_parts(2_142_669, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(7_905, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_083_102, 0) + // Standard Error: 115 + .saturating_add(Weight::from_parts(56_096, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_661_000 picoseconds. - Weight::from_parts(1_958_045, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(10_695, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_861_687, 0) + // Standard Error: 96 + .saturating_add(Weight::from_parts(52_645, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_702_000 picoseconds. - Weight::from_parts(1_955_142, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(4_573, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_107_761, 0) + // Standard Error: 58 + .saturating_add(Weight::from_parts(33_987, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_683_000 picoseconds. - Weight::from_parts(1_701_381, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(7_045, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_524_324, 0) + // Standard Error: 77 + .saturating_add(Weight::from_parts(45_014, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_657_000 picoseconds. - Weight::from_parts(1_480_531, 0) - // Standard Error: 39 - .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_036_695, 0) + // Standard Error: 108 + .saturating_add(Weight::from_parts(58_739, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_769_000 picoseconds. - Weight::from_parts(1_966_619, 0) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_711_000 picoseconds. - Weight::from_parts(2_182_859, 0) - // Standard Error: 99 - .saturating_add(Weight::from_parts(18_097, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + // Standard Error: 69 + .saturating_add(Weight::from_parts(63_164, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_953_000 picoseconds. - Weight::from_parts(3_241_691, 0) - // Standard Error: 15 - .saturating_add(Weight::from_parts(24_191, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(4_231_349, 0) + // Standard Error: 59 + .saturating_add(Weight::from_parts(77_591, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_755_000 picoseconds. - Weight::from_parts(2_028_508, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(1_207, 0).saturating_mul(l.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_085_461, 0) + // Standard Error: 68 + .saturating_add(Weight::from_parts(1_422, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_980_000 picoseconds. - Weight::from_parts(3_261_891, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_523, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_569_038, 0) + // Standard Error: 58 + .saturating_add(Weight::from_parts(23_450, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_939_000 picoseconds. - Weight::from_parts(3_175_345, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_117_498, 0) + // Standard Error: 45 + .saturating_add(Weight::from_parts(22_513, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_912_000 picoseconds. - Weight::from_parts(3_735_750, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(3_877, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_499_686, 0) + // Standard Error: 35 + .saturating_add(Weight::from_parts(32_969, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_807_000 picoseconds. - Weight::from_parts(2_271_723, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_432, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_157_198, 0) + // Standard Error: 74 + .saturating_add(Weight::from_parts(31_231, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_836_000 picoseconds. - Weight::from_parts(2_232_939, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(9_011, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_107_280, 0) + // Standard Error: 54 + .saturating_add(Weight::from_parts(29_185, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_729_000 picoseconds. - Weight::from_parts(2_119_576, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_098_021, 0) + // Standard Error: 81 + .saturating_add(Weight::from_parts(25_620, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_703_000 picoseconds. - Weight::from_parts(748_659, 0) - // Standard Error: 133_811 - .saturating_add(Weight::from_parts(13_138_871, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_641_811, 0) + // Standard Error: 129_714 + .saturating_add(Weight::from_parts(11_243_689, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_723_000 picoseconds. - Weight::from_parts(2_482_502, 0) - // Standard Error: 43 - .saturating_add(Weight::from_parts(3_966, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_309_208, 0) + // Standard Error: 65 + .saturating_add(Weight::from_parts(32_157, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_677_000 picoseconds. - Weight::from_parts(2_076_124, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_833_467, 0) + // Standard Error: 45 + .saturating_add(Weight::from_parts(32_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_668_000 picoseconds. - Weight::from_parts(2_137_336, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_424_461, 0) + // Standard Error: 81 + .saturating_add(Weight::from_parts(33_148, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_630_000 picoseconds. - Weight::from_parts(2_052_637, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_663, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_128_853, 0) + // Standard Error: 33 + .saturating_add(Weight::from_parts(32_425, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_703_000 picoseconds. - Weight::from_parts(2_052_774, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_974, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_014_578, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(31_922, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(2_055_918, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_053_915, 0) + // Standard Error: 57 + .saturating_add(Weight::from_parts(32_064, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_660_000 picoseconds. - Weight::from_parts(2_091_607, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(3_738, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_064_444, 0) + // Standard Error: 70 + .saturating_add(Weight::from_parts(32_075, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_683_000 picoseconds. - Weight::from_parts(2_111_881, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_956, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_376_773, 0) + // Standard Error: 101 + .saturating_add(Weight::from_parts(42_889, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_653_000 picoseconds. - Weight::from_parts(2_137_933, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_935, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_466_744, 0) + // Standard Error: 56 + .saturating_add(Weight::from_parts(43_537, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_685_000 picoseconds. - Weight::from_parts(2_098_255, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(3_270_120, 0) + // Standard Error: 49 + .saturating_add(Weight::from_parts(42_524, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(2_047_735, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_986, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_170_432, 0) + // Standard Error: 83 + .saturating_add(Weight::from_parts(42_720, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(2_082_616, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_805, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_377_136, 0) + // Standard Error: 55 + .saturating_add(Weight::from_parts(42_810, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_751_000 picoseconds. - Weight::from_parts(2_122_838, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(6_105, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_431_209, 0) + // Standard Error: 29 + .saturating_add(Weight::from_parts(42_663, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_723_000 picoseconds. - Weight::from_parts(2_072_110, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_324_510, 0) + // Standard Error: 68 + .saturating_add(Weight::from_parts(42_866, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_669_000 picoseconds. - Weight::from_parts(2_084_659, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_062, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_275_541, 0) + // Standard Error: 62 + .saturating_add(Weight::from_parts(42_827, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_693_000 picoseconds. - Weight::from_parts(2_127_258, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_942, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_128_921, 0) + // Standard Error: 42 + .saturating_add(Weight::from_parts(42_852, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_680_000 picoseconds. - Weight::from_parts(2_058_880, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_960, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_414_730, 0) + // Standard Error: 63 + .saturating_add(Weight::from_parts(42_767, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_686_000 picoseconds. - Weight::from_parts(2_081_497, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_835, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_866_928, 0) + // Standard Error: 48 + .saturating_add(Weight::from_parts(42_646, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(2_085_806, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_192_089, 0) + // Standard Error: 65 + .saturating_add(Weight::from_parts(42_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_717_000 picoseconds. - Weight::from_parts(2_090_258, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_717, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_779_553, 0) + // Standard Error: 61 + .saturating_add(Weight::from_parts(43_068, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_747_000 picoseconds. - Weight::from_parts(2_159_835, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(11_839, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_042_743, 0) + // Standard Error: 83 + .saturating_add(Weight::from_parts(43_449, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(2_370_448, 0) - // Standard Error: 50 - .saturating_add(Weight::from_parts(10_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_378_308, 0) + // Standard Error: 52 + .saturating_add(Weight::from_parts(42_748, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_678_000 picoseconds. - Weight::from_parts(1_810_647, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(12_293, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_511_293, 0) + // Standard Error: 44 + .saturating_add(Weight::from_parts(42_973, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_040_394, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(10_661, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_950_849, 0) + // Standard Error: 53 + .saturating_add(Weight::from_parts(42_939, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650_000 picoseconds. - Weight::from_parts(2_108_062, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_654, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_796_884, 0) + // Standard Error: 76 + .saturating_add(Weight::from_parts(42_800, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_741_000 picoseconds. - Weight::from_parts(2_162_731, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_738, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_427_710, 0) + // Standard Error: 92 + .saturating_add(Weight::from_parts(43_046, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_720_000 picoseconds. - Weight::from_parts(2_060_130, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_871, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_428_223, 0) + // Standard Error: 116 + .saturating_add(Weight::from_parts(43_947, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_686_000 picoseconds. - Weight::from_parts(2_260_151, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(6_047, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_733_880, 0) + // Standard Error: 47 + .saturating_add(Weight::from_parts(43_893, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_709_000 picoseconds. - Weight::from_parts(2_161_907, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(6_254, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(4_686_409, 0) + // Standard Error: 157 + .saturating_add(Weight::from_parts(42_949, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_659_000 picoseconds. - Weight::from_parts(2_089_988, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_473, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_722_852, 0) + // Standard Error: 100 + .saturating_add(Weight::from_parts(42_963, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_663_000 picoseconds. - Weight::from_parts(3_266_049, 0) - // Standard Error: 93 - .saturating_add(Weight::from_parts(5_974, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_033_429, 0) + // Standard Error: 85 + .saturating_add(Weight::from_parts(43_764, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_700_000 picoseconds. - Weight::from_parts(2_107_727, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_068, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_869_522, 0) + // Standard Error: 93 + .saturating_add(Weight::from_parts(42_889, 0).saturating_mul(r.into())) } } @@ -2300,8 +2330,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_548_000 picoseconds. - Weight::from_parts(2_677_000, 1594) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2311,10 +2341,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_465_000 picoseconds. - Weight::from_parts(8_978_953, 478) - // Standard Error: 947 - .saturating_add(Weight::from_parts(967_373, 0).saturating_mul(k.into())) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(6_956_629, 478) + // Standard Error: 3_221 + .saturating_add(Weight::from_parts(917_448, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -2330,10 +2360,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_499_000 picoseconds. - Weight::from_parts(22_221_289, 3708) - // Standard Error: 128 - .saturating_add(Weight::from_parts(54_915, 0).saturating_mul(c.into())) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(32_000_000, 3708) + // Standard Error: 112 + .saturating_add(Weight::from_parts(102_382, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2345,23 +2375,55 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `178 + c * (1 ±0)` // Estimated: `6114 + c * (1 ±0)` - // Minimum execution time: 9_369_000 picoseconds. - Weight::from_parts(10_852_386, 6114) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_306, 0).saturating_mul(c.into())) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(6_237_316, 6114) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_061, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Storage: Contracts ContractInfoOf (r:2 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + fn v10_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `442` + // Estimated: `6382` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 6382) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Contracts DeletionQueue (r:1 w:1025) + /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: Contracts DeletionQueueCounter (r:0 w:1) + /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// The range of component `k` is `[0, 1024]`. + fn v11_migration_step(k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `138 + k * (1 ±0)` + // Estimated: `3602 + k * (1 ±0)` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(28_605, 3602) + // Standard Error: 1_636 + .saturating_add(Weight::from_parts(1_206_882, 0).saturating_mul(k.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) fn migrate() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `1594` - // Minimum execution time: 5_978_000 picoseconds. - Weight::from_parts(6_097_000, 1594) - .saturating_add(RocksDbWeight::get().reads(1_u64)) + // Measured: `133` + // Estimated: `3598` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 3598) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: Contracts MigrationInProgress (r:1 w:0) /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) @@ -2380,10 +2442,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 266_158_000 picoseconds. - Weight::from_parts(279_911_136, 6656) - // Standard Error: 29 - .saturating_add(Weight::from_parts(37_837, 0).saturating_mul(c.into())) + // Minimum execution time: 281_000_000 picoseconds. + Weight::from_parts(215_305_116, 6656) + // Standard Error: 197 + .saturating_add(Weight::from_parts(73_618, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2412,15 +2474,15 @@ impl WeightInfo for () { fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `270` - // Estimated: `8659` - // Minimum execution time: 3_133_022_000 picoseconds. - Weight::from_parts(647_533_067, 8659) - // Standard Error: 283 - .saturating_add(Weight::from_parts(106_602, 0).saturating_mul(c.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_117, 0).saturating_mul(i.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_405, 0).saturating_mul(s.into())) + // Estimated: `8661` + // Minimum execution time: 3_513_000_000 picoseconds. + Weight::from_parts(161_960_698, 8661) + // Standard Error: 651 + .saturating_add(Weight::from_parts(192_788, 0).saturating_mul(c.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_668, 0).saturating_mul(i.into())) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_467, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -2445,13 +2507,13 @@ impl WeightInfo for () { fn instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `482` - // Estimated: `6408` - // Minimum execution time: 1_651_947_000 picoseconds. - Weight::from_parts(293_042_001, 6408) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(i.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_444, 0).saturating_mul(s.into())) + // Estimated: `6407` + // Minimum execution time: 1_675_000_000 picoseconds. + Weight::from_parts(153_714_839, 6407) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_637, 0).saturating_mul(i.into())) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_607, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -2471,8 +2533,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 194_753_000 picoseconds. - Weight::from_parts(195_766_000, 6699) + // Minimum execution time: 194_000_000 picoseconds. + Weight::from_parts(201_000_000, 6699) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2491,10 +2553,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 256_804_000 picoseconds. - Weight::from_parts(267_432_334, 3574) - // Standard Error: 103 - .saturating_add(Weight::from_parts(108_385, 0).saturating_mul(c.into())) + // Minimum execution time: 261_000_000 picoseconds. + Weight::from_parts(336_093_237, 3574) + // Standard Error: 330 + .saturating_add(Weight::from_parts(189_070, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2512,8 +2574,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_924_000 picoseconds. - Weight::from_parts(35_867_000, 3720) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 3720) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2529,8 +2591,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 34_578_000 picoseconds. - Weight::from_parts(35_470_000, 8985) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_000_000, 8985) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2551,10 +2613,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 238_237_000 picoseconds. - Weight::from_parts(246_399_253, 6722) - // Standard Error: 781 - .saturating_add(Weight::from_parts(322_803, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(247_724_727, 6722) + // Standard Error: 975 + .saturating_add(Weight::from_parts(481_954, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2576,10 +2638,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 238_025_000 picoseconds. - Weight::from_parts(76_642_081, 6743) - // Standard Error: 6_541 - .saturating_add(Weight::from_parts(3_308_462, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(112_219_961, 6743) + // Standard Error: 9_810 + .saturating_add(Weight::from_parts(3_335_222, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2602,10 +2664,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 240_177_000 picoseconds. - Weight::from_parts(66_393_427, 6747) - // Standard Error: 7_670 - .saturating_add(Weight::from_parts(4_164_419, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(95_983_645, 6747) + // Standard Error: 10_997 + .saturating_add(Weight::from_parts(4_345_173, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2628,10 +2690,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 238_175_000 picoseconds. - Weight::from_parts(247_360_071, 6730) - // Standard Error: 5_724 - .saturating_add(Weight::from_parts(412_164, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(244_902_119, 6730) + // Standard Error: 1_176 + .saturating_add(Weight::from_parts(601_187, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2653,10 +2715,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_959_000 picoseconds. - Weight::from_parts(241_263_663, 6723) - // Standard Error: 422 - .saturating_add(Weight::from_parts(160_204, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(249_137_222, 6723) + // Standard Error: 652 + .saturating_add(Weight::from_parts(228_819, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -2678,10 +2740,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 237_469_000 picoseconds. - Weight::from_parts(244_507_496, 6724) - // Standard Error: 761 - .saturating_add(Weight::from_parts(322_807, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_373_668, 6724) + // Standard Error: 1_916 + .saturating_add(Weight::from_parts(508_033, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2703,10 +2765,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6719 + r * (6 ±0)` - // Minimum execution time: 237_524_000 picoseconds. - Weight::from_parts(241_895_288, 6719) - // Standard Error: 773 - .saturating_add(Weight::from_parts(521_994, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(237_397_415, 6719) + // Standard Error: 2_017 + .saturating_add(Weight::from_parts(794_292, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2728,10 +2790,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 240_344_000 picoseconds. - Weight::from_parts(246_991_292, 6846) - // Standard Error: 1_133 - .saturating_add(Weight::from_parts(1_462_720, 0).saturating_mul(r.into())) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(252_161_626, 6846) + // Standard Error: 4_818 + .saturating_add(Weight::from_parts(1_915_363, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2753,10 +2815,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 239_908_000 picoseconds. - Weight::from_parts(242_820_641, 6741) - // Standard Error: 597 - .saturating_add(Weight::from_parts(324_174, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_417_535, 6741) + // Standard Error: 1_157 + .saturating_add(Weight::from_parts(486_728, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2778,10 +2840,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 237_856_000 picoseconds. - Weight::from_parts(251_150_544, 6739) - // Standard Error: 868 - .saturating_add(Weight::from_parts(315_232, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(246_001_192, 6739) + // Standard Error: 1_276 + .saturating_add(Weight::from_parts(477_831, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2803,10 +2865,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 237_197_000 picoseconds. - Weight::from_parts(241_186_858, 6737) - // Standard Error: 639 - .saturating_add(Weight::from_parts(318_375, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(254_882_028, 6737) + // Standard Error: 1_871 + .saturating_add(Weight::from_parts(488_056, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2828,10 +2890,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 237_676_000 picoseconds. - Weight::from_parts(243_872_868, 6723) - // Standard Error: 611 - .saturating_add(Weight::from_parts(316_938, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(244_505_205, 6723) + // Standard Error: 1_327 + .saturating_add(Weight::from_parts(485_930, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2855,10 +2917,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `852 + r * (14 ±0)` // Estimated: `6785 + r * (14 ±0)` - // Minimum execution time: 237_520_000 picoseconds. - Weight::from_parts(258_882_921, 6785) - // Standard Error: 1_949 - .saturating_add(Weight::from_parts(1_365_562, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(258_192_481, 6785) + // Standard Error: 1_849 + .saturating_add(Weight::from_parts(1_573_953, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) @@ -2880,10 +2942,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 163_866_000 picoseconds. - Weight::from_parts(166_333_760, 6687) - // Standard Error: 2_405 - .saturating_add(Weight::from_parts(138_325, 0).saturating_mul(r.into())) + // Minimum execution time: 156_000_000 picoseconds. + Weight::from_parts(157_749_743, 6687) + // Standard Error: 672 + .saturating_add(Weight::from_parts(202_788, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) @@ -2905,10 +2967,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 237_456_000 picoseconds. - Weight::from_parts(245_578_643, 6724) - // Standard Error: 549 - .saturating_add(Weight::from_parts(265_605, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(245_850_139, 6724) + // Standard Error: 1_021 + .saturating_add(Weight::from_parts(394_870, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2930,10 +2992,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 241_032_000 picoseconds. - Weight::from_parts(242_874_505, 6724) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(250_558_922, 6724) // Standard Error: 1 - .saturating_add(Weight::from_parts(593, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(357, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2954,10 +3016,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 234_478_000 picoseconds. - Weight::from_parts(237_534_048, 6708) - // Standard Error: 197_777 - .saturating_add(Weight::from_parts(1_581_051, 0).saturating_mul(r.into())) + // Minimum execution time: 238_000_000 picoseconds. + Weight::from_parts(241_382_113, 6708) + // Standard Error: 460_176 + .saturating_add(Weight::from_parts(9_617_886, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -2979,10 +3041,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 237_015_000 picoseconds. - Weight::from_parts(239_909_565, 6731) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(253_643_177, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(145, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3009,10 +3071,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 236_370_000 picoseconds. - Weight::from_parts(239_243_467, 6750) - // Standard Error: 274_349 - .saturating_add(Weight::from_parts(115_896_632, 0).saturating_mul(r.into())) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(246_276_422, 6750) + // Standard Error: 1_219_373 + .saturating_add(Weight::from_parts(123_723_577, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3038,10 +3100,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 239_772_000 picoseconds. - Weight::from_parts(242_724_214, 6769) - // Standard Error: 2_967 - .saturating_add(Weight::from_parts(1_754_941, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(247_411_989, 6769) + // Standard Error: 2_641 + .saturating_add(Weight::from_parts(2_279_544, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -3063,10 +3125,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 235_440_000 picoseconds. - Weight::from_parts(272_455_779, 6723) - // Standard Error: 4_633 - .saturating_add(Weight::from_parts(3_484_878, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(233_124_230, 6723) + // Standard Error: 7_508 + .saturating_add(Weight::from_parts(4_180_190, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -3089,12 +3151,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 254_882_000 picoseconds. - Weight::from_parts(249_748_140, 6744) - // Standard Error: 94_551 - .saturating_add(Weight::from_parts(2_385_909, 0).saturating_mul(t.into())) - // Standard Error: 26 - .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) + // Minimum execution time: 257_000_000 picoseconds. + Weight::from_parts(258_777_449, 6744) + // Standard Error: 178_914 + .saturating_add(Weight::from_parts(1_047_698, 0).saturating_mul(t.into())) + // Standard Error: 48 + .saturating_add(Weight::from_parts(242, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3118,10 +3180,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 166_376_000 picoseconds. - Weight::from_parts(171_383_256, 6721) - // Standard Error: 345 - .saturating_add(Weight::from_parts(233_133, 0).saturating_mul(r.into())) + // Minimum execution time: 160_000_000 picoseconds. + Weight::from_parts(164_953_391, 6721) + // Standard Error: 623 + .saturating_add(Weight::from_parts(331_573, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -3143,10 +3205,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 353_406_000 picoseconds. - Weight::from_parts(357_371_823, 131670) + // Minimum execution time: 328_000_000 picoseconds. + Weight::from_parts(330_131_900, 131670) // Standard Error: 1 - .saturating_add(Weight::from_parts(740, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(492, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3157,10 +3219,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 239_610_000 picoseconds. - Weight::from_parts(129_137_013, 843) - // Standard Error: 10_406 - .saturating_add(Weight::from_parts(6_175_998, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(178_965_804, 843) + // Standard Error: 37_124 + .saturating_add(Weight::from_parts(5_555_860, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3174,10 +3236,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 253_714_000 picoseconds. - Weight::from_parts(286_943_345, 1280) - // Standard Error: 52 - .saturating_add(Weight::from_parts(580, 0).saturating_mul(n.into())) + // Minimum execution time: 253_000_000 picoseconds. + Weight::from_parts(287_253_482, 1280) + // Standard Error: 73 + .saturating_add(Weight::from_parts(960, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -3188,8 +3250,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 254_191_000 picoseconds. - Weight::from_parts(260_134_212, 1167) + // Minimum execution time: 253_000_000 picoseconds. + Weight::from_parts(266_941_040, 1167) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3201,10 +3263,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 238_786_000 picoseconds. - Weight::from_parts(130_111_573, 845) - // Standard Error: 10_357 - .saturating_add(Weight::from_parts(5_982_349, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(190_506_498, 845) + // Standard Error: 15_224 + .saturating_add(Weight::from_parts(5_245_595, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3218,10 +3280,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 253_416_000 picoseconds. - Weight::from_parts(255_813_949, 1163) - // Standard Error: 24 - .saturating_add(Weight::from_parts(159, 0).saturating_mul(n.into())) + // Minimum execution time: 252_000_000 picoseconds. + Weight::from_parts(252_930_713, 1163) + // Standard Error: 37 + .saturating_add(Weight::from_parts(341, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3233,10 +3295,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 239_113_000 picoseconds. - Weight::from_parts(150_650_781, 840) - // Standard Error: 9_285 - .saturating_add(Weight::from_parts(4_954_934, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(153_870_919, 840) + // Standard Error: 20_202 + .saturating_add(Weight::from_parts(4_698_160, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3249,10 +3311,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 254_076_000 picoseconds. - Weight::from_parts(256_571_975, 1179) - // Standard Error: 36 - .saturating_add(Weight::from_parts(590, 0).saturating_mul(n.into())) + // Minimum execution time: 256_000_000 picoseconds. + Weight::from_parts(272_824_702, 1179) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3264,10 +3324,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 239_142_000 picoseconds. - Weight::from_parts(151_921_194, 857) - // Standard Error: 8_732 - .saturating_add(Weight::from_parts(4_789_792, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(156_588_098, 857) + // Standard Error: 16_965 + .saturating_add(Weight::from_parts(4_357_625, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3280,10 +3340,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 251_295_000 picoseconds. - Weight::from_parts(253_924_366, 1166) - // Standard Error: 29 - .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) + // Minimum execution time: 252_000_000 picoseconds. + Weight::from_parts(258_036_189, 1166) + // Standard Error: 120 + .saturating_add(Weight::from_parts(288, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3295,10 +3355,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 238_249_000 picoseconds. - Weight::from_parts(136_162_523, 836) - // Standard Error: 10_064 - .saturating_add(Weight::from_parts(6_136_548, 0).saturating_mul(r.into())) + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(218_345_401, 836) + // Standard Error: 27_383 + .saturating_add(Weight::from_parts(5_524_816, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3312,10 +3372,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 253_832_000 picoseconds. - Weight::from_parts(256_959_533, 1180) - // Standard Error: 17 - .saturating_add(Weight::from_parts(656, 0).saturating_mul(n.into())) + // Minimum execution time: 254_000_000 picoseconds. + Weight::from_parts(255_915_925, 1180) + // Standard Error: 27 + .saturating_add(Weight::from_parts(432, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3337,10 +3397,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 239_088_000 picoseconds. - Weight::from_parts(285_114_297, 7270) - // Standard Error: 46_679 - .saturating_add(Weight::from_parts(35_601_583, 0).saturating_mul(r.into())) + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(283_191_618, 7270) + // Standard Error: 121_212 + .saturating_add(Weight::from_parts(44_059_400, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) @@ -3364,10 +3424,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1140 + r * (276 ±0)` // Estimated: `7049 + r * (2752 ±0)` - // Minimum execution time: 240_796_000 picoseconds. - Weight::from_parts(241_521_000, 7049) - // Standard Error: 96_067 - .saturating_add(Weight::from_parts(213_656_608, 0).saturating_mul(r.into())) + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(246_000_000, 7049) + // Standard Error: 277_674 + .saturating_add(Weight::from_parts(227_734_011, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3390,11 +3450,11 @@ impl WeightInfo for () { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` - // Estimated: `6727 + r * (2572 ±3)` - // Minimum execution time: 239_065_000 picoseconds. - Weight::from_parts(240_123_000, 6727) - // Standard Error: 94_312 - .saturating_add(Weight::from_parts(208_326_355, 0).saturating_mul(r.into())) + // Estimated: `6727 + r * (2572 ±13)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(243_000_000, 6727) + // Standard Error: 303_428 + .saturating_add(Weight::from_parts(224_274_832, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3419,12 +3479,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 414_681_000 picoseconds. - Weight::from_parts(387_233_284, 9569) - // Standard Error: 923_756 - .saturating_add(Weight::from_parts(31_886_473, 0).saturating_mul(t.into())) - // Standard Error: 1 - .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + // Minimum execution time: 421_000_000 picoseconds. + Weight::from_parts(380_429_732, 9569) + // Standard Error: 1_430_131 + .saturating_add(Weight::from_parts(43_325_255, 0).saturating_mul(t.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(369, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(5_u64)) @@ -3452,10 +3512,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1322 + r * (254 ±0)` // Estimated: `7146 + r * (5205 ±0)` - // Minimum execution time: 574_065_000 picoseconds. - Weight::from_parts(575_592_000, 7146) - // Standard Error: 246_955 - .saturating_add(Weight::from_parts(345_705_670, 0).saturating_mul(r.into())) + // Minimum execution time: 602_000_000 picoseconds. + Weight::from_parts(604_000_000, 7146) + // Standard Error: 477_346 + .saturating_add(Weight::from_parts(366_530_753, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -3484,15 +3544,15 @@ impl WeightInfo for () { fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` - // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_615_748_000 picoseconds. - Weight::from_parts(341_307_617, 9492) - // Standard Error: 5_315_899 - .saturating_add(Weight::from_parts(119_339_357, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_168, 0).saturating_mul(i.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(1_343, 0).saturating_mul(s.into())) + // Estimated: `9493 + t * (2634 ±4)` + // Minimum execution time: 1_767_000_000 picoseconds. + Weight::from_parts(372_887_319, 9493) + // Standard Error: 6_072_227 + .saturating_add(Weight::from_parts(108_081_995, 0).saturating_mul(t.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(i.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_373, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) @@ -3516,10 +3576,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 235_569_000 picoseconds. - Weight::from_parts(240_272_470, 6718) - // Standard Error: 739 - .saturating_add(Weight::from_parts(569_501, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(247_838_491, 6718) + // Standard Error: 1_894 + .saturating_add(Weight::from_parts(649_120, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3541,10 +3601,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 236_251_000 picoseconds. - Weight::from_parts(231_532_969, 6725) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(253_982_032, 6725) // Standard Error: 3 - .saturating_add(Weight::from_parts(3_935, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_136, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3565,10 +3625,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 235_261_000 picoseconds. - Weight::from_parts(245_916_216, 6721) - // Standard Error: 2_735 - .saturating_add(Weight::from_parts(746_676, 0).saturating_mul(r.into())) + // Minimum execution time: 249_000_000 picoseconds. + Weight::from_parts(239_465_081, 6721) + // Standard Error: 2_370 + .saturating_add(Weight::from_parts(726_746, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3590,10 +3650,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 237_766_000 picoseconds. - Weight::from_parts(224_241_852, 6729) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_182, 0).saturating_mul(n.into())) + // Minimum execution time: 245_000_000 picoseconds. + Weight::from_parts(241_488_342, 6729) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_839, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3614,10 +3674,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 235_106_000 picoseconds. - Weight::from_parts(240_306_761, 6724) - // Standard Error: 753 - .saturating_add(Weight::from_parts(415_885, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(244_540_966, 6724) + // Standard Error: 1_478 + .saturating_add(Weight::from_parts(595_393, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3639,10 +3699,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 237_193_000 picoseconds. - Weight::from_parts(235_328_929, 6733) + // Minimum execution time: 241_000_000 picoseconds. + Weight::from_parts(250_906_587, 6733) // Standard Error: 3 - .saturating_add(Weight::from_parts(915, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_140, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3663,10 +3723,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 235_233_000 picoseconds. - Weight::from_parts(243_027_485, 6725) - // Standard Error: 709 - .saturating_add(Weight::from_parts(407_457, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(244_475_285, 6725) + // Standard Error: 1_554 + .saturating_add(Weight::from_parts(582_997, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3688,10 +3748,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 236_933_000 picoseconds. - Weight::from_parts(229_499_726, 6727) + // Minimum execution time: 240_000_000 picoseconds. + Weight::from_parts(251_609_718, 6727) // Standard Error: 2 - .saturating_add(Weight::from_parts(916, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_114, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3711,11 +3771,11 @@ impl WeightInfo for () { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6849 + n * (1 ±0)` - // Minimum execution time: 289_569_000 picoseconds. - Weight::from_parts(295_501_374, 6849) - // Standard Error: 8 - .saturating_add(Weight::from_parts(4_718, 0).saturating_mul(n.into())) + // Estimated: `6851 + n * (1 ±0)` + // Minimum execution time: 284_000_000 picoseconds. + Weight::from_parts(286_757_387, 6851) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_452, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3735,12 +3795,12 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `722 + r * (112 ±0)` + // Measured: `725 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 238_956_000 picoseconds. - Weight::from_parts(249_363_777, 6666) - // Standard Error: 21_411 - .saturating_add(Weight::from_parts(48_134_102, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(257_745_348, 6666) + // Standard Error: 49_977 + .saturating_add(Weight::from_parts(38_995_195, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -3760,12 +3820,12 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `821 + r * (76 ±0)` - // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 241_366_000 picoseconds. - Weight::from_parts(256_403_505, 6716) - // Standard Error: 19_860 - .saturating_add(Weight::from_parts(37_761_641, 0).saturating_mul(r.into())) + // Measured: `822 + r * (76 ±0)` + // Estimated: `6718 + r * (77 ±0)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(260_037_728, 6718) + // Standard Error: 71_454 + .saturating_add(Weight::from_parts(37_241_728, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -3786,11 +3846,11 @@ impl WeightInfo for () { fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` - // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 241_127_000 picoseconds. - Weight::from_parts(243_612_263, 6731) - // Standard Error: 9_428 - .saturating_add(Weight::from_parts(9_337_164, 0).saturating_mul(r.into())) + // Estimated: `6733 + r * (42 ±0)` + // Minimum execution time: 243_000_000 picoseconds. + Weight::from_parts(245_865_215, 6733) + // Standard Error: 20_741 + .saturating_add(Weight::from_parts(8_415_385, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -3813,11 +3873,11 @@ impl WeightInfo for () { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±7)` - // Minimum execution time: 240_700_000 picoseconds. - Weight::from_parts(241_021_000, 8190) - // Standard Error: 46_456 - .saturating_add(Weight::from_parts(21_734_413, 0).saturating_mul(r.into())) + // Estimated: `8190 + r * (3090 ±9)` + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(245_000_000, 8190) + // Standard Error: 44_605 + .saturating_add(Weight::from_parts(21_723_295, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3841,10 +3901,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 238_740_000 picoseconds. - Weight::from_parts(242_205_894, 6723) - // Standard Error: 356 - .saturating_add(Weight::from_parts(162_911, 0).saturating_mul(r.into())) + // Minimum execution time: 240_000_000 picoseconds. + Weight::from_parts(243_819_920, 6723) + // Standard Error: 895 + .saturating_add(Weight::from_parts(233_523, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3866,10 +3926,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 240_552_000 picoseconds. - Weight::from_parts(270_251_375, 7805) - // Standard Error: 1_043 - .saturating_add(Weight::from_parts(261_776, 0).saturating_mul(r.into())) + // Minimum execution time: 242_000_000 picoseconds. + Weight::from_parts(256_423_054, 7805) + // Standard Error: 2_733 + .saturating_add(Weight::from_parts(380_566, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -3893,10 +3953,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 238_216_000 picoseconds. - Weight::from_parts(245_301_500, 6723) - // Standard Error: 475 - .saturating_add(Weight::from_parts(142_584, 0).saturating_mul(r.into())) + // Minimum execution time: 239_000_000 picoseconds. + Weight::from_parts(247_913_498, 6723) + // Standard Error: 767 + .saturating_add(Weight::from_parts(197_935, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3906,507 +3966,507 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(1_955_112, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(3_030, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_211_298, 0) + // Standard Error: 19 + .saturating_add(Weight::from_parts(21_230, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_794_000 picoseconds. - Weight::from_parts(2_376_415, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(6_440, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_300_914, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(34_934, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_777_000 picoseconds. - Weight::from_parts(2_334_614, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_944_965, 0) + // Standard Error: 40 + .saturating_add(Weight::from_parts(35_606, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_681_000 picoseconds. - Weight::from_parts(2_142_669, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(7_905, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_083_102, 0) + // Standard Error: 115 + .saturating_add(Weight::from_parts(56_096, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_661_000 picoseconds. - Weight::from_parts(1_958_045, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(10_695, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_861_687, 0) + // Standard Error: 96 + .saturating_add(Weight::from_parts(52_645, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_702_000 picoseconds. - Weight::from_parts(1_955_142, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(4_573, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_107_761, 0) + // Standard Error: 58 + .saturating_add(Weight::from_parts(33_987, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_683_000 picoseconds. - Weight::from_parts(1_701_381, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(7_045, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_524_324, 0) + // Standard Error: 77 + .saturating_add(Weight::from_parts(45_014, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_657_000 picoseconds. - Weight::from_parts(1_480_531, 0) - // Standard Error: 39 - .saturating_add(Weight::from_parts(9_586, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_036_695, 0) + // Standard Error: 108 + .saturating_add(Weight::from_parts(58_739, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_769_000 picoseconds. - Weight::from_parts(1_966_619, 0) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_711_000 picoseconds. - Weight::from_parts(2_182_859, 0) - // Standard Error: 99 - .saturating_add(Weight::from_parts(18_097, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + // Standard Error: 69 + .saturating_add(Weight::from_parts(63_164, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_953_000 picoseconds. - Weight::from_parts(3_241_691, 0) - // Standard Error: 15 - .saturating_add(Weight::from_parts(24_191, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(4_231_349, 0) + // Standard Error: 59 + .saturating_add(Weight::from_parts(77_591, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_755_000 picoseconds. - Weight::from_parts(2_028_508, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(1_207, 0).saturating_mul(l.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_085_461, 0) + // Standard Error: 68 + .saturating_add(Weight::from_parts(1_422, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_980_000 picoseconds. - Weight::from_parts(3_261_891, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_523, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_569_038, 0) + // Standard Error: 58 + .saturating_add(Weight::from_parts(23_450, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_939_000 picoseconds. - Weight::from_parts(3_175_345, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_117_498, 0) + // Standard Error: 45 + .saturating_add(Weight::from_parts(22_513, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_912_000 picoseconds. - Weight::from_parts(3_735_750, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(3_877, 0).saturating_mul(r.into())) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_499_686, 0) + // Standard Error: 35 + .saturating_add(Weight::from_parts(32_969, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_807_000 picoseconds. - Weight::from_parts(2_271_723, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_432, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_157_198, 0) + // Standard Error: 74 + .saturating_add(Weight::from_parts(31_231, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_836_000 picoseconds. - Weight::from_parts(2_232_939, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(9_011, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_107_280, 0) + // Standard Error: 54 + .saturating_add(Weight::from_parts(29_185, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_729_000 picoseconds. - Weight::from_parts(2_119_576, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_098_021, 0) + // Standard Error: 81 + .saturating_add(Weight::from_parts(25_620, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_703_000 picoseconds. - Weight::from_parts(748_659, 0) - // Standard Error: 133_811 - .saturating_add(Weight::from_parts(13_138_871, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_641_811, 0) + // Standard Error: 129_714 + .saturating_add(Weight::from_parts(11_243_689, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_723_000 picoseconds. - Weight::from_parts(2_482_502, 0) - // Standard Error: 43 - .saturating_add(Weight::from_parts(3_966, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_309_208, 0) + // Standard Error: 65 + .saturating_add(Weight::from_parts(32_157, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_677_000 picoseconds. - Weight::from_parts(2_076_124, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_833_467, 0) + // Standard Error: 45 + .saturating_add(Weight::from_parts(32_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_668_000 picoseconds. - Weight::from_parts(2_137_336, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_424_461, 0) + // Standard Error: 81 + .saturating_add(Weight::from_parts(33_148, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_630_000 picoseconds. - Weight::from_parts(2_052_637, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_663, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_128_853, 0) + // Standard Error: 33 + .saturating_add(Weight::from_parts(32_425, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_703_000 picoseconds. - Weight::from_parts(2_052_774, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_974, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_014_578, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(31_922, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(2_055_918, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_053_915, 0) + // Standard Error: 57 + .saturating_add(Weight::from_parts(32_064, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_660_000 picoseconds. - Weight::from_parts(2_091_607, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(3_738, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_064_444, 0) + // Standard Error: 70 + .saturating_add(Weight::from_parts(32_075, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_683_000 picoseconds. - Weight::from_parts(2_111_881, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_956, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_376_773, 0) + // Standard Error: 101 + .saturating_add(Weight::from_parts(42_889, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_653_000 picoseconds. - Weight::from_parts(2_137_933, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_935, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_466_744, 0) + // Standard Error: 56 + .saturating_add(Weight::from_parts(43_537, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_685_000 picoseconds. - Weight::from_parts(2_098_255, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(3_270_120, 0) + // Standard Error: 49 + .saturating_add(Weight::from_parts(42_524, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(2_047_735, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_986, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_170_432, 0) + // Standard Error: 83 + .saturating_add(Weight::from_parts(42_720, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(2_082_616, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_805, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_377_136, 0) + // Standard Error: 55 + .saturating_add(Weight::from_parts(42_810, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_751_000 picoseconds. - Weight::from_parts(2_122_838, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(6_105, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_431_209, 0) + // Standard Error: 29 + .saturating_add(Weight::from_parts(42_663, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_723_000 picoseconds. - Weight::from_parts(2_072_110, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_982, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_324_510, 0) + // Standard Error: 68 + .saturating_add(Weight::from_parts(42_866, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_669_000 picoseconds. - Weight::from_parts(2_084_659, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_062, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_275_541, 0) + // Standard Error: 62 + .saturating_add(Weight::from_parts(42_827, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_693_000 picoseconds. - Weight::from_parts(2_127_258, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_942, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_128_921, 0) + // Standard Error: 42 + .saturating_add(Weight::from_parts(42_852, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_680_000 picoseconds. - Weight::from_parts(2_058_880, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_960, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_414_730, 0) + // Standard Error: 63 + .saturating_add(Weight::from_parts(42_767, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_686_000 picoseconds. - Weight::from_parts(2_081_497, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_835, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_866_928, 0) + // Standard Error: 48 + .saturating_add(Weight::from_parts(42_646, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(2_085_806, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_192_089, 0) + // Standard Error: 65 + .saturating_add(Weight::from_parts(42_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_717_000 picoseconds. - Weight::from_parts(2_090_258, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_717, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(1_779_553, 0) + // Standard Error: 61 + .saturating_add(Weight::from_parts(43_068, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_747_000 picoseconds. - Weight::from_parts(2_159_835, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(11_839, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_042_743, 0) + // Standard Error: 83 + .saturating_add(Weight::from_parts(43_449, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_724_000 picoseconds. - Weight::from_parts(2_370_448, 0) - // Standard Error: 50 - .saturating_add(Weight::from_parts(10_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_378_308, 0) + // Standard Error: 52 + .saturating_add(Weight::from_parts(42_748, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_678_000 picoseconds. - Weight::from_parts(1_810_647, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(12_293, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_511_293, 0) + // Standard Error: 44 + .saturating_add(Weight::from_parts(42_973, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_040_394, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(10_661, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(1_950_849, 0) + // Standard Error: 53 + .saturating_add(Weight::from_parts(42_939, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_650_000 picoseconds. - Weight::from_parts(2_108_062, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_654, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_796_884, 0) + // Standard Error: 76 + .saturating_add(Weight::from_parts(42_800, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_741_000 picoseconds. - Weight::from_parts(2_162_731, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_738, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_427_710, 0) + // Standard Error: 92 + .saturating_add(Weight::from_parts(43_046, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_720_000 picoseconds. - Weight::from_parts(2_060_130, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_871, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_428_223, 0) + // Standard Error: 116 + .saturating_add(Weight::from_parts(43_947, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_686_000 picoseconds. - Weight::from_parts(2_260_151, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(6_047, 0).saturating_mul(r.into())) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_733_880, 0) + // Standard Error: 47 + .saturating_add(Weight::from_parts(43_893, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_709_000 picoseconds. - Weight::from_parts(2_161_907, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(6_254, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(4_686_409, 0) + // Standard Error: 157 + .saturating_add(Weight::from_parts(42_949, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_659_000 picoseconds. - Weight::from_parts(2_089_988, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_473, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_722_852, 0) + // Standard Error: 100 + .saturating_add(Weight::from_parts(42_963, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_663_000 picoseconds. - Weight::from_parts(3_266_049, 0) - // Standard Error: 93 - .saturating_add(Weight::from_parts(5_974, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_033_429, 0) + // Standard Error: 85 + .saturating_add(Weight::from_parts(43_764, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_700_000 picoseconds. - Weight::from_parts(2_107_727, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_068, 0).saturating_mul(r.into())) + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(2_869_522, 0) + // Standard Error: 93 + .saturating_add(Weight::from_parts(42_889, 0).saturating_mul(r.into())) } } From e561a69e5068443e5608df4d76f894e781d39b63 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 16:51:40 +0200 Subject: [PATCH 20/74] misc merge master --- frame/contracts/src/lib.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index c1d063ff7d12b..ecb05d8d1c528 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -107,11 +107,7 @@ use crate::{ use codec::{Codec, Decode, Encode, HasCompact}; use environmental::*; use frame_support::{ -<<<<<<< HEAD - dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, WithPostDispatchInfo}, -======= dispatch::{DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin}, ->>>>>>> master ensure, error::BadOrigin, traits::{ From 4e7a1f79c675e98f519b2d49562b2c27b934b68d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 17:11:06 +0200 Subject: [PATCH 21/74] misc merge master --- frame/contracts/primitives/src/lib.rs | 5 ++++- frame/contracts/src/lib.rs | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frame/contracts/primitives/src/lib.rs b/frame/contracts/primitives/src/lib.rs index 5410438f39071..23cca7e8491d5 100644 --- a/frame/contracts/primitives/src/lib.rs +++ b/frame/contracts/primitives/src/lib.rs @@ -109,7 +109,9 @@ pub enum ContractAccessError { MigrationInProgress, } -impl From for ContractResult, B> { +impl From + for ContractResult, B, EventRecord> +{ fn from(error: DispatchError) -> Self { ContractResult { gas_consumed: Zero::zero(), @@ -117,6 +119,7 @@ impl From for ContractResult storage_deposit: Default::default(), debug_message: Vec::new(), result: Err(error), + events: None, } } } diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index ecb05d8d1c528..64f97cf0af38c 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -107,7 +107,10 @@ use crate::{ use codec::{Codec, Decode, Encode, HasCompact}; use environmental::*; use frame_support::{ - dispatch::{DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin}, + dispatch::{ + DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin, + WithPostDispatchInfo, + }, ensure, error::BadOrigin, traits::{ @@ -596,9 +599,6 @@ pub mod pallet { data: Vec, ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; - let gas_limit: Weight = gas_limit.into(); - let origin = ensure_signed(origin)?; - let dest = T::Lookup::lookup(dest)?; let common = CommonInput { origin: Origin::from_runtime_origin(origin)?, value, @@ -659,7 +659,6 @@ pub mod pallet { salt: Vec, ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; - let origin = ensure_signed(origin)?; let code_len = code.len() as u32; let data_len = data.len() as u32; let salt_len = salt.len() as u32; @@ -703,7 +702,6 @@ pub mod pallet { salt: Vec, ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; - let origin = ensure_signed(origin)?; let data_len = data.len() as u32; let salt_len = salt.len() as u32; let common = CommonInput { From db7b4e9c1a10eb6e61db373027e6cf8fd0b09f29 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 17:21:05 +0200 Subject: [PATCH 22/74] wip --- frame/contracts/src/weights.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 0a7f3ddf1ca4f..fb5fc0fe9b54a 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -169,6 +169,10 @@ pub trait WeightInfo { fn instr_i64shru(r: u32, ) -> Weight; fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; + fn migrate() -> Weight { Weight::zero() } + fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } + fn v10_migration_step() -> Weight { Weight::zero() } + fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } } /// Weights for pallet_contracts using the Substrate node and recommended hardware. From 3c08a373d00aeb820fe7dba52109ec2c89efb7b8 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 17:47:19 +0200 Subject: [PATCH 23/74] rm tmp stuff --- frame/contracts/src/tests.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index fa4d415c85e08..c32999d0ade3a 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -2263,36 +2263,6 @@ fn lazy_removal_does_no_run_on_low_remaining_weight() { }); } -#[test] -fn print_stuff() { - let (code, _hash) = compile_module::("self_destruct").unwrap(); - - let mut ext = ExtBuilder::default().existential_deposit(50).build(); - - ext.execute_with(|| { - let min_balance = ::Currency::minimum_balance(); - let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - - let addr = Contracts::bare_instantiate( - ALICE, - min_balance * 100, - GAS_LIMIT, - None, - Code::Upload(code), - vec![], - vec![], - false, - ) - .result - .unwrap() - .account_id; - - let info = get_contract(&addr); - println!("len trie_id: {:?}", info.trie_id.len()); - println!("info: {:?}", info.encoded_size()); - }); -} - #[test] fn lazy_removal_does_not_use_all_weight() { let (code, _hash) = compile_module::("self_destruct").unwrap(); From e966c87575144474b62721c967d1868bb8b911ab Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 May 2023 21:12:49 +0200 Subject: [PATCH 24/74] wip --- frame/contracts/src/benchmarking/mod.rs | 28 +++++++++++++++---- frame/contracts/src/migration.rs | 37 +++++++++++++++++++------ frame/contracts/src/weights.rs | 4 +++ 3 files changed, 56 insertions(+), 13 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index f024786e7d081..af2e210445501 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -235,7 +235,7 @@ benchmarks! { Contracts::::reinstrument_module(&mut module, &schedule)?; } - // This benchmarks the v9 migration cost. + // This benchmarks the v9 migration step. #[pov_mode = Measured] v9_migration_step { let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); @@ -245,6 +245,7 @@ benchmarks! { migration.step(); } + // This benchmarks the v10 migration step. #[pov_mode = Measured] v10_migration_step { let account = account::("account", 0, 0); @@ -256,6 +257,7 @@ benchmarks! { migration.step(); } + // This benchmarks the v11 migration step. #[pov_mode = Measured] v11_migration_step { let k in 0 .. 1024; @@ -265,25 +267,41 @@ benchmarks! { migration.step(); } + // This benchmarks the base weight of dispatching a noop migrate call. + #[pov_mode = Measured] + migrate_noop { + assert_eq!(StorageVersion::get::>(), 2); + }: { + Migration::::migrate(Weight::MAX); + } verify { + assert_eq!(StorageVersion::get::>(), 2); + } + // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - - // Execute a (noop) migration a step from 0 -> 1 assert_eq!(StorageVersion::get::>(), 2); MigrationInProgress::::set(Some(Default::default())); - }: { >::migrate(origin.into(), Weight::MAX).unwrap_or_default() } verify { assert_eq!(StorageVersion::get::>(), 3); } + // This benchmarks the base weight of dispatching a noop migrate call. + #[pov_mode = Measured] + on_runtime_upgrade_noop { + assert_eq!(StorageVersion::get::>(), 2); + }: { + as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() + } verify { + assert_eq!(StorageVersion::get::>(), 2); + } + // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] on_runtime_upgrade { - // Execute a (noop) migration a step from 0 -> 1 assert_eq!(StorageVersion::get::>(), 2); MigrationInProgress::::set(Some(Default::default())); diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 9d266e648a70a..5b02dcc9276fb 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -20,7 +20,7 @@ pub mod v10; pub mod v11; pub mod v9; -use crate::{Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; +use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; use codec::{Codec, Decode}; use frame_support::{ codec, @@ -157,17 +157,15 @@ impl OnRuntimeUpgrade for Migration { fn on_runtime_upgrade() -> Weight { let latest_version = >::current_storage_version(); let storage_version = >::on_chain_storage_version(); - let mut weight = T::DbWeight::get().reads(1); if storage_version == latest_version { - return weight + return T::WeightInfo::on_runtime_upgrade_noop() } // In case a migration is already in progress we create the next migration // (if any) right when the current one finishes. - weight.saturating_accrue(T::DbWeight::get().reads(1)); if Self::in_progress() { - return weight + return T::WeightInfo::on_runtime_upgrade_in_progress() } log::info!( @@ -175,6 +173,7 @@ impl OnRuntimeUpgrade for Migration { "RuntimeUpgraded. Upgrading storage from {storage_version:?} to {latest_version:?}.", ); + let mut weight = T::WeightInfo::on_runtime_upgrade(); let cursor = M::new(storage_version + 1); MigrationInProgress::::set(Some(cursor)); weight.saturating_accrue(T::DbWeight::get().writes(1)); @@ -195,7 +194,7 @@ impl OnRuntimeUpgrade for Migration { } } - weight + return weight } #[cfg(feature = "try-runtime")] @@ -238,8 +237,7 @@ impl Migration { pub(crate) fn migrate(weight_limit: Weight) -> (MigrateResult, Weight) { let mut weight_left = weight_limit; - // for mutating `MigrationInProgress` and `StorageVersion` - if weight_left.checked_reduce(T::DbWeight::get().reads_writes(2, 2)).is_none() { + if weight_left.checked_reduce(T::WeightInfo::migrate_noop()).is_none() { return (MigrateResult::NoMigrationPerformed, Weight::zero()) } @@ -392,6 +390,29 @@ mod test { use super::*; use crate::tests::{ExtBuilder, Test}; + mod mock_pallet { + pub use pallet::*; + #[frame_support::pallet(dev_mode)] + pub mod pallet { + use frame_support::pallet_prelude::*; + + const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); + + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config + Sized { + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; + } + + #[pallet::event] + pub enum Event {} + } + } + #[derive(Default, Encode, Decode, MaxEncodedLen)] struct MockMigration { // MockMigration needs `N` steps to finish diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index fb5fc0fe9b54a..aa4465e77ec5f 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -170,9 +170,13 @@ pub trait WeightInfo { fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; fn migrate() -> Weight { Weight::zero() } + fn migrate_noop() -> Weight { Weight::zero() } fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } fn v10_migration_step() -> Weight { Weight::zero() } fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } + fn on_runtime_upgrade() -> Weight { Weight::zero() } + fn on_runtime_upgrade_noop() -> Weight { Weight::zero() } + fn on_runtime_upgrade_in_progress() -> Weight { Weight::zero() } } /// Weights for pallet_contracts using the Substrate node and recommended hardware. From f1134c6435e12a55fa983586c2f2c92b0aea8b85 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 13:58:04 +0200 Subject: [PATCH 25/74] wip --- frame/contracts/src/benchmarking/mod.rs | 23 +++++-- frame/contracts/src/migration.rs | 85 +++++++++---------------- frame/contracts/src/tests.rs | 19 +++++- 3 files changed, 64 insertions(+), 63 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index af2e210445501..feb72f1f06f32 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -21,7 +21,6 @@ mod code; mod sandbox; - use self::{ code::{ body::{self, DynInstr::*}, @@ -296,19 +295,31 @@ benchmarks! { }: { as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() } verify { - assert_eq!(StorageVersion::get::>(), 2); + assert!(MigrationInProgress::::get().is_none()); } // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] - on_runtime_upgrade { - assert_eq!(StorageVersion::get::>(), 2); - MigrationInProgress::::set(Some(Default::default())); + on_runtime_upgrade_in_progress { + StorageVersion::new(0).put::>(); + let v = vec![42u8].try_into().ok(); + MigrationInProgress::::set(v.clone()); }: { as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() } verify { - assert_eq!(StorageVersion::get::>(), 3); + assert!(MigrationInProgress::::get().is_some()); + assert_eq!(MigrationInProgress::::get(), v); + } + + // This benchmarks the base weight of dispatching a noop migrate call. + #[pov_mode = Measured] + on_runtime_upgrade { + StorageVersion::new(0).put::>(); + }: { + as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() + } verify { + assert!(MigrationInProgress::::get().is_some()); } // This benchmarks the overhead of loading a code of size `c` byte from storage and into diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 5b02dcc9276fb..2ad6ba8e253a8 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -149,7 +149,7 @@ pub struct Migration>(PhantomData< /// Custom migration for running runtime-benchmarks. #[cfg(feature = "runtime-benchmarks")] -pub struct Migration, NoopMigration<4>)>( +pub struct Migration, NoopMigration<2>)>( PhantomData<(T, M)>, ); @@ -159,18 +159,20 @@ impl OnRuntimeUpgrade for Migration { let storage_version = >::on_chain_storage_version(); if storage_version == latest_version { + log::warn!(target: LOG_TARGET, "No Migration performed storage_version = latest_version = {:?}", &storage_version); return T::WeightInfo::on_runtime_upgrade_noop() } // In case a migration is already in progress we create the next migration // (if any) right when the current one finishes. if Self::in_progress() { + log::warn!( target: LOG_TARGET, "Migration already in progress {:?}", &storage_version); return T::WeightInfo::on_runtime_upgrade_in_progress() } log::info!( target: LOG_TARGET, - "RuntimeUpgraded. Upgrading storage from {storage_version:?} to {latest_version:?}.", + "Upgrading storage from {storage_version:?} to {latest_version:?}.", ); let mut weight = T::WeightInfo::on_runtime_upgrade(); @@ -178,19 +180,18 @@ impl OnRuntimeUpgrade for Migration { MigrationInProgress::::set(Some(cursor)); weight.saturating_accrue(T::DbWeight::get().writes(1)); - // drive the migration to completion when using try-runtime - if cfg!(feature = "try-runtime") { - loop { - use MigrateResult::*; - match Migration::::migrate(Weight::MAX) { - (InProgress, w) => { - weight.saturating_add(w); - }, - (NoMigrationPerformed | Completed, w) => { - weight.saturating_add(w); - break - }, - } + // drive the migration to completion when running try-runtime + #[cfg(all(feature = "try-runtime", not(test)))] + loop { + use MigrateResult::*; + match Self::migrate(Weight::MAX) { + (InProgress, w) => { + weight.saturating_add(w); + }, + (NoMigrationPerformed | Completed, w) => { + weight.saturating_add(w); + break + }, } } @@ -390,29 +391,6 @@ mod test { use super::*; use crate::tests::{ExtBuilder, Test}; - mod mock_pallet { - pub use pallet::*; - #[frame_support::pallet(dev_mode)] - pub mod pallet { - use frame_support::pallet_prelude::*; - - const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); - - #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config + Sized { - type RuntimeEvent: From> - + IsType<::RuntimeEvent>; - } - - #[pallet::event] - pub enum Event {} - } - } - #[derive(Default, Encode, Decode, MaxEncodedLen)] struct MockMigration { // MockMigration needs `N` steps to finish @@ -471,27 +449,26 @@ mod test { }); } - #[test] - fn steps_works() { - type M = (MockMigration<2>, MockMigration<3>); - let version = StorageVersion::new(2); - let cursor = M::new(version); - - let mut weight = Weight::from_all(2); - let cursor = M::steps(version, &cursor, &mut weight).unwrap(); - assert_eq!(cursor.to_vec(), vec![1u8, 0]); - assert_eq!(weight, Weight::from_all(1)); - - let mut weight = Weight::from_all(2); - assert!(M::steps(version, &cursor, &mut weight).is_none()); - } + // #[test] + // fn steps_works() { + // type M = (MockMigration<1>, MockMigration<2>); + // let version = StorageVersion::new(1); + // let cursor = M::new(version); + // + // let mut weight = Weight::MAX; + // let cursor = M::steps(version, &cursor, &mut weight).unwrap(); + // assert_eq!(cursor.to_vec(), vec![1u8, 0]); + // + // assert!(M::steps(version, &cursor, &mut weight).is_none()); + // } #[test] fn no_migration_performed_works() { - type M = (MockMigration<2>, MockMigration<3>); + type M = (MockMigration<1>, MockMigration<2>); type TestMigration = Migration; ExtBuilder::default().build().execute_with(|| { + assert_eq!(StorageVersion::get::>(), 2); assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed) }); } @@ -501,7 +478,7 @@ mod test { type M = (MockMigration<1>, MockMigration<2>); type TestMigration = Migration; - ExtBuilder::default().build().execute_with(|| { + ExtBuilder::default().set_storage_version(0).build().execute_with(|| { assert_eq!(StorageVersion::get::>(), 0); TestMigration::on_runtime_upgrade(); for (version, status) in [(1, MigrateResult::InProgress), (2, MigrateResult::Completed)] diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index c32999d0ade3a..ab9619fb2edba 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -39,7 +39,7 @@ use frame_support::{ storage::child, traits::{ ConstU32, ConstU64, Contains, Currency, ExistenceRequirement, LockableCurrency, OnIdle, - OnInitialize, WithdrawReasons, + OnInitialize, StorageVersion, WithdrawReasons, }, weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; @@ -438,10 +438,11 @@ pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000, 3 * 1024 * 102 pub struct ExtBuilder { existential_deposit: u64, + storage_version: Option, } impl Default for ExtBuilder { fn default() -> Self { - Self { existential_deposit: ExistentialDeposit::get() } + Self { existential_deposit: ExistentialDeposit::get(), storage_version: None } } } impl ExtBuilder { @@ -452,6 +453,10 @@ impl ExtBuilder { pub fn set_associated_consts(&self) { EXISTENTIAL_DEPOSIT.with(|v| *v.borrow_mut() = self.existential_deposit); } + pub fn set_storage_version(mut self, version: u16) -> Self { + self.storage_version = Some(StorageVersion::new(version)); + self + } pub fn build(self) -> sp_io::TestExternalities { use env_logger::{Builder, Env}; let env = Env::new().default_filter_or("runtime=debug"); @@ -463,7 +468,15 @@ impl ExtBuilder { .unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.register_extension(KeystoreExt::new(MemoryKeystore::new())); - ext.execute_with(|| System::set_block_number(1)); + ext.execute_with(|| { + use frame_support::traits::OnGenesis; + + Pallet::::on_genesis(); + if let Some(storage_version) = self.storage_version { + storage_version.put::>(); + } + System::set_block_number(1) + }); ext } } From a85ff26806d221b980be9bd472755394d4a68585 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 14:42:16 +0200 Subject: [PATCH 26/74] wip --- frame/contracts/src/benchmarking/mod.rs | 24 +++++++++--- frame/contracts/src/migration.rs | 51 ++++++++++++++----------- frame/contracts/src/weights.rs | 1 + 3 files changed, 48 insertions(+), 28 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index feb72f1f06f32..5b09f7c5d8a1e 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,6 +266,19 @@ benchmarks! { migration.step(); } + + // This benchmarks the base weight of dispatching a noop migrate call. + #[pov_mode = Measured] + migrate { + let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); + assert_eq!(StorageVersion::get::>(), 2); + MigrationInProgress::::set(Some(Default::default())); + }: { + >::migrate(origin.into(), Weight::MAX).unwrap_or_default() + } verify { + assert_eq!(StorageVersion::get::>(), 3); + } + // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] migrate_noop { @@ -278,14 +291,13 @@ benchmarks! { // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] - migrate { - let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - assert_eq!(StorageVersion::get::>(), 2); - MigrationInProgress::::set(Some(Default::default())); + migrate_update_storage_version { + StorageVersion::new(0).put::>(); + as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade(); }: { - >::migrate(origin.into(), Weight::MAX).unwrap_or_default() + Migration::::migrate(Weight::MAX); } verify { - assert_eq!(StorageVersion::get::>(), 3); + assert_eq!(StorageVersion::get::>(), 1); } // This benchmarks the base weight of dispatching a noop migrate call. diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 2ad6ba8e253a8..bce12832a5de9 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -78,7 +78,7 @@ impl Migrate for NoopMigration { Weight::zero() } fn step(&mut self) -> (IsFinished, Weight) { - log::debug!(target: LOG_TARGET, "No migration for version {}", N); + log::debug!(target: LOG_TARGET, "Noop migration for version {}", N); (IsFinished::Yes, Weight::zero()) } } @@ -175,27 +175,10 @@ impl OnRuntimeUpgrade for Migration { "Upgrading storage from {storage_version:?} to {latest_version:?}.", ); - let mut weight = T::WeightInfo::on_runtime_upgrade(); let cursor = M::new(storage_version + 1); MigrationInProgress::::set(Some(cursor)); - weight.saturating_accrue(T::DbWeight::get().writes(1)); - // drive the migration to completion when running try-runtime - #[cfg(all(feature = "try-runtime", not(test)))] - loop { - use MigrateResult::*; - match Self::migrate(Weight::MAX) { - (InProgress, w) => { - weight.saturating_add(w); - }, - (NoMigrationPerformed | Completed, w) => { - weight.saturating_add(w); - break - }, - } - } - - return weight + return T::WeightInfo::on_runtime_upgrade() } #[cfg(feature = "try-runtime")] @@ -217,6 +200,26 @@ impl OnRuntimeUpgrade for Migration { Err("New runtime does not contain the required migrations to perform this upgrade.") } } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), &'static str> { + let mut weight = Weight::zero(); + loop { + use MigrateResult::*; + match Self::migrate(Weight::MAX) { + (InProgress, w) => { + weight.saturating_add(w); + }, + (NoMigrationPerformed | Completed, w) => { + weight.saturating_add(w); + break + }, + } + } + + log::info!(target: LOG_TARGET, "Migration steps weight = {}", weight); + Ok(()) + } } /// The result of a migration step. @@ -238,13 +241,16 @@ impl Migration { pub(crate) fn migrate(weight_limit: Weight) -> (MigrateResult, Weight) { let mut weight_left = weight_limit; - if weight_left.checked_reduce(T::WeightInfo::migrate_noop()).is_none() { + if weight_left + .checked_reduce(T::WeightInfo::migrate_update_storage_version()) + .is_none() + { return (MigrateResult::NoMigrationPerformed, Weight::zero()) } MigrationInProgress::::mutate_exists(|progress| { let Some(cursor_before) = progress.as_mut() else { - return (MigrateResult::NoMigrationPerformed,weight_limit.saturating_sub(weight_left)) + return (MigrateResult::NoMigrationPerformed, weight_limit.saturating_sub(weight_left)) }; // if a migration is running it is always upgrading to the next version @@ -263,7 +269,8 @@ impl Migration { // ongoing Some(cursor) => { // refund as we did not update the storage version - weight_left.saturating_accrue(T::DbWeight::get().writes(1)); + weight_left + .saturating_accrue(T::WeightInfo::migrate_update_storage_version()); // we still have a cursor which keeps the pallet disabled Some(cursor) }, diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index aa4465e77ec5f..7d451522c2f9e 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -171,6 +171,7 @@ pub trait WeightInfo { fn instr_i64rotr(r: u32, ) -> Weight; fn migrate() -> Weight { Weight::zero() } fn migrate_noop() -> Weight { Weight::zero() } + fn migrate_update_storage_version() -> Weight { Weight::zero() } fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } fn v10_migration_step() -> Weight { Weight::zero() } fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } From 87a8f3b107fa60699896be73c46cede0d606a5ee Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 15:14:01 +0200 Subject: [PATCH 27/74] wip --- frame/contracts/src/benchmarking/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 5b09f7c5d8a1e..68d41eb2c0f11 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,7 +266,6 @@ benchmarks! { migration.step(); } - // This benchmarks the base weight of dispatching a noop migrate call. #[pov_mode = Measured] migrate { From 193c788954791665de155d0d5b93f7ca11d3ae0d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 16:15:12 +0200 Subject: [PATCH 28/74] wip --- frame/contracts/src/benchmarking/mod.rs | 18 ++++++++++++++++-- frame/contracts/src/migration.rs | 8 +++++--- frame/contracts/src/weights.rs | 1 + 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 68d41eb2c0f11..e85ecb96a2125 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -278,7 +278,8 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 3); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of executing Migration::migrate when there are no migration in + // progress. #[pov_mode = Measured] migrate_noop { assert_eq!(StorageVersion::get::>(), 2); @@ -288,7 +289,20 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 2); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of bumping the storage version + // progress. + #[pov_mode = Measured] + bump_storage_version { + assert_eq!(StorageVersion::get::>(), 2); + let new_version = StorageVersion::new(3); + }: { + new_version.put::>(); + } verify { + assert_eq!(StorageVersion::get::>(), 3); + } + + // This benchmarks the weight of executing Migration::migrate when a noop migration step bump + // the storage version. #[pov_mode = Measured] migrate_update_storage_version { StorageVersion::new(0).put::>(); diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index bce12832a5de9..ab119efb958b4 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -227,11 +227,14 @@ impl OnRuntimeUpgrade for Migration { pub enum MigrateResult { /// No migration was performed NoMigrationPerformed, + /// A migration is in progress InProgress, + /// All migrations are completed Completed, } impl Migration { + /// Verify that each migration's step of the MigrateSequence fits into `Cursor`. pub(crate) fn integrity_test() { M::integrity_test() } @@ -250,7 +253,7 @@ impl Migration { MigrationInProgress::::mutate_exists(|progress| { let Some(cursor_before) = progress.as_mut() else { - return (MigrateResult::NoMigrationPerformed, weight_limit.saturating_sub(weight_left)) + return (MigrateResult::NoMigrationPerformed, T::WeightInfo::migrate_noop()) }; // if a migration is running it is always upgrading to the next version @@ -269,8 +272,7 @@ impl Migration { // ongoing Some(cursor) => { // refund as we did not update the storage version - weight_left - .saturating_accrue(T::WeightInfo::migrate_update_storage_version()); + weight_left.saturating_accrue(T::WeightInfo::bump_storage_version()); // we still have a cursor which keeps the pallet disabled Some(cursor) }, diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 7d451522c2f9e..8c6bcc6a3fea8 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -169,6 +169,7 @@ pub trait WeightInfo { fn instr_i64shru(r: u32, ) -> Weight; fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; + fn bump_storage_version() -> Weight { Weight::zero() } fn migrate() -> Weight { Weight::zero() } fn migrate_noop() -> Weight { Weight::zero() } fn migrate_update_storage_version() -> Weight { Weight::zero() } From aafaa03595d666c5084317fcd5f9f922a34444b1 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 20:29:35 +0200 Subject: [PATCH 29/74] fixes --- frame/contracts/src/benchmarking/mod.rs | 8 +-- frame/contracts/src/lib.rs | 4 -- frame/contracts/src/migration.rs | 73 +++++++++++++++++++++---- 3 files changed, 65 insertions(+), 20 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index e85ecb96a2125..745510dd3dc1b 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,16 +266,16 @@ benchmarks! { migration.step(); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of dispatching a migrate call that perform a migration step. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - assert_eq!(StorageVersion::get::>(), 2); - MigrationInProgress::::set(Some(Default::default())); + StorageVersion::new(0).put::>(); + as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade(); }: { >::migrate(origin.into(), Weight::MAX).unwrap_or_default() } verify { - assert_eq!(StorageVersion::get::>(), 3); + assert_eq!(StorageVersion::get::>(), 1); } // This benchmarks the weight of executing Migration::migrate when there are no migration in diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index ebc0ab78b6fdc..47cce853ed46b 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -738,10 +738,6 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { ensure_signed(origin)?; - ensure!( - weight_limit.any_gt(T::WeightInfo::migrate().saturating_mul(10)), - Error::::MigrateWeightLimitTooLow - ); let (result, weight) = Migration::::migrate(weight_limit); let weight = weight.saturating_add(T::WeightInfo::migrate()); diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index ab119efb958b4..86bde76d0b0ae 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -25,7 +25,7 @@ use codec::{Codec, Decode}; use frame_support::{ codec, pallet_prelude::*, - traits::{ConstU32, Get, OnRuntimeUpgrade}, + traits::{ConstU32, OnRuntimeUpgrade}, }; use sp_std::marker::PhantomData; @@ -42,6 +42,8 @@ fn invalid_version(version: StorageVersion) -> ! { pub type Cursor = BoundedVec>; +// In benchmark we use noop migrations, to compute the weight of the migration framework itself. +// #[cfg(not(feature = "runtime-benchmarks"))] type Migrations = (v9::Migration, v10::Migration, v11::Migration); /// IsFinished describes whether a migration is finished or not. @@ -65,6 +67,18 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { /// /// Returns whether the migration is finished and the weight consumed. fn step(&mut self) -> (IsFinished, Weight); + + /// Execute some pre-checks prior to running this step. + #[cfg(feature = "try-runtime")] + fn pre_upgrade_step() -> Result<(), &'static str> { + Ok(()) + } + + /// Execute some post-checks after running this step + #[cfg(feature = "try-runtime")] + fn post_upgrade_step() -> Result<(), &'static str> { + Ok(()) + } } /// A noop migration that can be used when there is no migration to be done for a given version. @@ -115,6 +129,16 @@ pub trait MigrateSequence: private::Sealed { /// Returns the default cursor for the given version. fn new(version: StorageVersion) -> Cursor; + #[cfg(feature = "try-runtime")] + fn pre_upgrade_step(_version: StorageVersion) -> Result<(), &'static str> { + Ok(()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade_step(_version: StorageVersion) -> Result<(), &'static str> { + Ok(()) + } + /// Execute the migration step until the weight limit is reached. /// /// Returns the new cursor or `None` if the migration is finished. @@ -188,7 +212,7 @@ impl OnRuntimeUpgrade for Migration { // over our migrations. let storage_version = >::on_chain_storage_version(); let target_version = >::current_storage_version(); - if M::is_upgrade_supported(storage_version, target_version) { + if !M::is_upgrade_supported(storage_version, target_version) { Ok(Vec::new()) } else { log::error!( @@ -202,18 +226,16 @@ impl OnRuntimeUpgrade for Migration { } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { let mut weight = Weight::zero(); loop { - use MigrateResult::*; - match Self::migrate(Weight::MAX) { - (InProgress, w) => { - weight.saturating_add(w); - }, - (NoMigrationPerformed | Completed, w) => { - weight.saturating_add(w); - break - }, + let in_progress_version = >::on_chain_storage_version() + 1; + M::pre_upgrade_step(in_progress_version)?; + let (status, w) = Self::migrate(Weight::MAX); + weight.saturating_accrue(w); + M::post_upgrade_step(in_progress_version)?; + if matches!(status, MigrateResult::Completed) { + break } } @@ -286,6 +308,7 @@ impl Migration { "Next migration is {:?},", in_progress_version + 1, ); + Some(M::new(in_progress_version + 1)) } else { // enable pallet by removing the storage item @@ -353,6 +376,32 @@ impl MigrateSequence for Tuple { invalid_version(version) } + #[cfg(feature = "try-runtime")] + /// Execute the pre-checks of the step associated with this version. + fn pre_upgrade_step(version: StorageVersion) -> Result<(), &'static str> { + for_tuples!( + #( + if version == Tuple::VERSION { + return Tuple::pre_upgrade_step() + } + )* + ); + invalid_version(version) + } + + #[cfg(feature = "try-runtime")] + /// Execute the post-checks of the step associated with this version. + fn post_upgrade_step(version: StorageVersion) -> Result<(), &'static str> { + for_tuples!( + #( + if version == Tuple::VERSION { + return Tuple::post_upgrade_step() + } + )* + ); + invalid_version(version) + } + fn steps( version: StorageVersion, mut cursor: &[u8], From 0d84f2806cddd05ac12bc7e15f9ff56db8e9ec49 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 20:55:06 +0200 Subject: [PATCH 30/74] add state --- frame/contracts/src/migration.rs | 22 +++++++++++----------- frame/contracts/src/migration/v10.rs | 10 ++++++++++ frame/contracts/src/migration/v9.rs | 5 +++++ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 86bde76d0b0ae..f98cfe2af036e 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -70,13 +70,13 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { /// Execute some pre-checks prior to running this step. #[cfg(feature = "try-runtime")] - fn pre_upgrade_step() -> Result<(), &'static str> { - Ok(()) + fn pre_upgrade_step() -> Result, &'static str> { + Ok(Vec::new()) } /// Execute some post-checks after running this step #[cfg(feature = "try-runtime")] - fn post_upgrade_step() -> Result<(), &'static str> { + fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { Ok(()) } } @@ -130,12 +130,12 @@ pub trait MigrateSequence: private::Sealed { fn new(version: StorageVersion) -> Cursor; #[cfg(feature = "try-runtime")] - fn pre_upgrade_step(_version: StorageVersion) -> Result<(), &'static str> { - Ok(()) + fn pre_upgrade_step(_version: StorageVersion) -> Result, &'static str> { + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(_version: StorageVersion) -> Result<(), &'static str> { + fn post_upgrade_step(_version: StorageVersion, _state: Vec) -> Result<(), &'static str> { Ok(()) } @@ -230,10 +230,10 @@ impl OnRuntimeUpgrade for Migration { let mut weight = Weight::zero(); loop { let in_progress_version = >::on_chain_storage_version() + 1; - M::pre_upgrade_step(in_progress_version)?; + let state = M::pre_upgrade_step(in_progress_version)?; let (status, w) = Self::migrate(Weight::MAX); weight.saturating_accrue(w); - M::post_upgrade_step(in_progress_version)?; + M::post_upgrade_step(in_progress_version, state)?; if matches!(status, MigrateResult::Completed) { break } @@ -378,7 +378,7 @@ impl MigrateSequence for Tuple { #[cfg(feature = "try-runtime")] /// Execute the pre-checks of the step associated with this version. - fn pre_upgrade_step(version: StorageVersion) -> Result<(), &'static str> { + fn pre_upgrade_step(version: StorageVersion) -> Result, &'static str> { for_tuples!( #( if version == Tuple::VERSION { @@ -391,11 +391,11 @@ impl MigrateSequence for Tuple { #[cfg(feature = "try-runtime")] /// Execute the post-checks of the step associated with this version. - fn post_upgrade_step(version: StorageVersion) -> Result<(), &'static str> { + fn post_upgrade_step(version: StorageVersion, state: Vec) -> Result<(), &'static str> { for_tuples!( #( if version == Tuple::VERSION { - return Tuple::post_upgrade_step() + return Tuple::post_upgrade_step(state) } )* ); diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 1b54d8bce4f9c..c84400d2ada3c 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -208,4 +208,14 @@ impl Migrate for Migration { (IsFinished::Yes, T::WeightInfo::v10_migration_step()) } } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade_step() -> Result, &'static str> { + Ok(Vec::new()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { + Ok(()) + } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index bc3e2f51d99bf..6ba6543d328b0 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -113,4 +113,9 @@ impl Migrate for Migration { (IsFinished::Yes, T::WeightInfo::v9_migration_step(0)) } } + + #[cfg(feature = "try-runtime")] + fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { + Ok(()) + } } From be9bc8149d2d843daa75789bd45366b3a88865a1 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 22:03:38 +0200 Subject: [PATCH 31/74] wip --- frame/contracts/src/migration/v10.rs | 47 ++++++++++++++++++++++++++-- frame/contracts/src/migration/v9.rs | 26 ++++++++++++++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index c84400d2ada3c..b78925cfaa685 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -211,11 +211,54 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { - Ok(Vec::new()) + let sample: Vec<_> = old::ContractInfoOf::::iter() + .take(100) + .map(|(account, contract)| { + let old_deposit = min( + T::Currency::reserved_balance(&account), + contract + .storage_byte_deposit + .saturating_add(contract.storage_item_deposit) + .saturating_add(contract.storage_base_deposit), + ); + + (account, contract, old_deposit) + }) + .collect(); + + log::debug!(target: LOG_TARGET, "Taking sample of {} contracts", sample.len()); + Ok(sample.encode()) } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + let sample = , BalanceOf)> as Decode>::decode( + &mut &state[..], + ) + .unwrap(); + + log::debug!(target: LOG_TARGET, "Validating sample of {} contracts", sample.len()); + for (account, old_contract, old_deposit) in sample { + let contract = ContractInfoOf::::get(&account).unwrap(); + assert_eq!(old_contract.trie_id, contract.trie_id); + assert_eq!(old_contract.code_hash, contract.code_hash); + assert_eq!(old_contract.storage_bytes, contract.storage_bytes); + assert_eq!(old_contract.storage_items, contract.storage_items); + + let deposit = + <::Currency as frame_support::traits::Currency<_>>::total_balance( + &contract.deposit_account, + ); + assert_eq!(old_deposit, deposit); + assert_eq!( + deposit, + contract + .storage_byte_deposit + .saturating_add(contract.storage_item_deposit) + .saturating_add(contract.storage_base_deposit), + ) + } + Ok(()) } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index 6ba6543d328b0..8896687be1fc6 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -115,7 +115,31 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { + fn pre_upgrade_step() -> Result, &'static str> { + let sample: Vec<_> = old::CodeStorage::::iter() + .take(10) + .collect(); + + log::debug!(target: LOG_TARGET, "Taking sample of {} contract codes", sample.len()); + Ok(sample.encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + let sample = , old::PrefabWasmModule)> as Decode>::decode( + &mut &state[..], + ) + .unwrap(); + + log::debug!(target: LOG_TARGET, "Validating sample of {} contract codes", sample.len()); + for (code_hash, old) in sample { + let module = CodeStorage::::get(&code_hash).unwrap(); + assert_eq!(module.instruction_weights_version, old.instruction_weights_version); + assert_eq!(module.initial, old.initial); + assert_eq!(module.maximum, old.maximum); + assert_eq!(module.code, old.code); + } + Ok(()) } } From 59bd209525de47d61f078a9da144279ed18ecbe3 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 22:16:51 +0200 Subject: [PATCH 32/74] wip --- frame/contracts/src/benchmarking/mod.rs | 15 ++++++--------- frame/contracts/src/migration/v9.rs | 10 +++------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 745510dd3dc1b..cd9b270417790 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,7 +266,7 @@ benchmarks! { migration.step(); } - // This benchmarks the weight of dispatching a migrate call that perform a migration step. + // This benchmarks the weight of dispatching a migrate call that perform a noop migration step. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); @@ -278,8 +278,7 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 1); } - // This benchmarks the weight of executing Migration::migrate when there are no migration in - // progress. + // This benchmarks the weight of executing Migration::migrate when there are no migration in progress. #[pov_mode = Measured] migrate_noop { assert_eq!(StorageVersion::get::>(), 2); @@ -290,7 +289,6 @@ benchmarks! { } // This benchmarks the weight of bumping the storage version - // progress. #[pov_mode = Measured] bump_storage_version { assert_eq!(StorageVersion::get::>(), 2); @@ -301,8 +299,7 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 3); } - // This benchmarks the weight of executing Migration::migrate when a noop migration step bump - // the storage version. + // This benchmarks the weight of executing Migration::migrate that execute a noop migration that bump the storage version. #[pov_mode = Measured] migrate_update_storage_version { StorageVersion::new(0).put::>(); @@ -313,7 +310,7 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 1); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of running on_runtime_upgrade when there are no migration in progress. #[pov_mode = Measured] on_runtime_upgrade_noop { assert_eq!(StorageVersion::get::>(), 2); @@ -323,7 +320,7 @@ benchmarks! { assert!(MigrationInProgress::::get().is_none()); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of running on_runtime_upgrade when there is a migration in progress. #[pov_mode = Measured] on_runtime_upgrade_in_progress { StorageVersion::new(0).put::>(); @@ -337,7 +334,7 @@ benchmarks! { assert_eq!(MigrationInProgress::::get(), v); } - // This benchmarks the base weight of dispatching a noop migrate call. + // This benchmarks the weight of running on_runtime_upgrade when there is a migration to process. #[pov_mode = Measured] on_runtime_upgrade { StorageVersion::new(0).put::>(); diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index 8896687be1fc6..d54c11f8f5793 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -116,9 +116,7 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { - let sample: Vec<_> = old::CodeStorage::::iter() - .take(10) - .collect(); + let sample: Vec<_> = old::CodeStorage::::iter().take(10).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contract codes", sample.len()); Ok(sample.encode()) @@ -126,10 +124,8 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { - let sample = , old::PrefabWasmModule)> as Decode>::decode( - &mut &state[..], - ) - .unwrap(); + let sample = + , old::PrefabWasmModule)> as Decode>::decode(&mut &state[..]).unwrap(); log::debug!(target: LOG_TARGET, "Validating sample of {} contract codes", sample.len()); for (code_hash, old) in sample { From 92ddfa0cc467e6e885f72f71c964e89a515ec055 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 22:28:02 +0200 Subject: [PATCH 33/74] wip --- frame/contracts/src/migration/v10.rs | 8 ++++---- frame/contracts/src/migration/v11.rs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index b78925cfaa685..20958633e6366 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -15,7 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Update `CodeStorage` with the new `determinism` field. +//! Don't rely on reserved balances keeping an account alive +//! see https://github.com/paritytech/substrate/pull/13370 use crate::{ address::AddressGenerator, @@ -31,15 +32,14 @@ use frame_support::{ pallet_prelude::*, storage_alias, traits::{ + fungible::Inspect, tokens::{Fortitude::Polite, Preservation::Preserve}, Currency, ExistenceRequirement, ReservableCurrency, }, DefaultNoBound, }; - -use frame_support::traits::fungible::Inspect; use sp_runtime::{Perbill, Saturating}; -use sp_std::{marker::PhantomData, ops::Deref}; +use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; mod old { use super::*; diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 55575f00d8db7..2e352f27e4a0e 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -15,7 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Update `CodeStorage` with the new `determinism` field. +//! Overflowing bounded DeletionQueue. +//! See https://github.com/paritytech/substrate/pull/13702 use crate::{ migration::{IsFinished, Migrate}, From 12213457044cd3e216f2284d2d27c452f338280a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 22:29:59 +0200 Subject: [PATCH 34/74] wip --- frame/contracts/src/benchmarking/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index cd9b270417790..b1e766a866447 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -288,7 +288,7 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 2); } - // This benchmarks the weight of bumping the storage version + // This benchmarks the weight of bumping the storage version. #[pov_mode = Measured] bump_storage_version { assert_eq!(StorageVersion::get::>(), 2); @@ -299,7 +299,7 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 3); } - // This benchmarks the weight of executing Migration::migrate that execute a noop migration that bump the storage version. + // This benchmarks the weight of executing Migration::migrate to execute a noop migration that bump the storage version. #[pov_mode = Measured] migrate_update_storage_version { StorageVersion::new(0).put::>(); From 8445ae7a75851e3e7bab6233647bff7f704f6777 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 10 May 2023 23:03:58 +0200 Subject: [PATCH 35/74] wip --- frame/contracts/src/migration/v11.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 2e352f27e4a0e..ccc6d72458f7e 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -70,7 +70,7 @@ pub struct Migration { impl Migrate for Migration { const VERSION: u16 = 11; - // It will be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/paritytech/substrate/pull/13702/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c) + // It would be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/paritytech/substrate/pull/13702/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c) // but in practice the queue is always empty, so 128 is isa good enough approximation for not // underestimating the weight of our migration. fn max_step_weight() -> Weight { From 42e5b5b68ea310ab8dd29858e8dc8fd9032b28b2 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 08:07:33 +0200 Subject: [PATCH 36/74] wip --- frame/contracts/src/lib.rs | 2 +- frame/contracts/src/migration.rs | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 47cce853ed46b..61f9b0337d98a 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -735,7 +735,7 @@ pub mod pallet { } #[pallet::call_index(9)] - #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] + #[pallet::weight(T::WeightInfo::migrate().max(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { ensure_signed(origin)?; diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index f98cfe2af036e..d2ee693965b56 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -42,8 +42,8 @@ fn invalid_version(version: StorageVersion) -> ! { pub type Cursor = BoundedVec>; -// In benchmark we use noop migrations, to compute the weight of the migration framework itself. -// #[cfg(not(feature = "runtime-benchmarks"))] +// In benchmark and tests we use noop migrations, to test and bench the migration framework itself. +#[cfg(not(any(feature = "runtime-benchmarks", test)))] type Migrations = (v9::Migration, v10::Migration, v11::Migration); /// IsFinished describes whether a migration is finished or not. @@ -168,11 +168,11 @@ pub trait MigrateSequence: private::Sealed { } /// Performs all necessary migrations based on `StorageVersion`. -#[cfg(not(feature = "runtime-benchmarks"))] +#[cfg(not(any(feature = "runtime-benchmarks", test)))] pub struct Migration>(PhantomData<(T, M)>); -/// Custom migration for running runtime-benchmarks. -#[cfg(feature = "runtime-benchmarks")] +/// Custom migration for running runtime-benchmarks and tests. +#[cfg(any(feature = "runtime-benchmarks", test))] pub struct Migration, NoopMigration<2>)>( PhantomData<(T, M)>, ); @@ -471,13 +471,6 @@ mod test { } } - #[test] - fn check_versions() { - // this fails the compilation when running local tests - // otherwise it will only be evaluated when the whole runtime is build - let _ = Migrations::::VERSION_RANGE; - } - #[test] fn version_range_works() { let range = <(MockMigration<1>, MockMigration<2>)>::VERSION_RANGE; From 82ed2d1931cfe83fbe1916813cba992059ffd44a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 08:07:46 +0200 Subject: [PATCH 37/74] wip --- frame/contracts/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 61f9b0337d98a..152516ca2769e 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -740,7 +740,6 @@ pub mod pallet { ensure_signed(origin)?; let (result, weight) = Migration::::migrate(weight_limit); - let weight = weight.saturating_add(T::WeightInfo::migrate()); use migration::MigrateResult::*; match result { From dee4889ebaccfc2a094e7acf3424d26e0d8b49a3 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 08:14:02 +0200 Subject: [PATCH 38/74] wip --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 152516ca2769e..59afe176302f5 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -735,7 +735,7 @@ pub mod pallet { } #[pallet::call_index(9)] - #[pallet::weight(T::WeightInfo::migrate().max(*weight_limit))] + #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { ensure_signed(origin)?; From 6aff1bda8ec7a9358f5e80743fae80014f08b2bf Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 09:28:32 +0200 Subject: [PATCH 39/74] wip --- frame/contracts/src/benchmarking/mod.rs | 24 ++++++++++++++++-------- frame/contracts/src/lib.rs | 4 +++- frame/contracts/src/migration.rs | 4 ++-- frame/contracts/src/weights.rs | 3 ++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index b1e766a866447..17d6af4c92113 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,7 +266,7 @@ benchmarks! { migration.step(); } - // This benchmarks the weight of dispatching a migrate call that perform a noop migration step. + // This benchmarks the weight of dispatching a migrate call that perform a migration step. #[pov_mode = Measured] migrate { let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); @@ -278,14 +278,12 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 1); } - // This benchmarks the weight of executing Migration::migrate when there are no migration in progress. + // This benchmarks the weight of dispatching a migrate call that does nothing #[pov_mode = Measured] migrate_noop { - assert_eq!(StorageVersion::get::>(), 2); + let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); }: { - Migration::::migrate(Weight::MAX); - } verify { - assert_eq!(StorageVersion::get::>(), 2); + >::migrate(origin.into(), Weight::zero()).is_err() } // This benchmarks the weight of bumping the storage version. @@ -299,9 +297,19 @@ benchmarks! { assert_eq!(StorageVersion::get::>(), 3); } - // This benchmarks the weight of executing Migration::migrate to execute a noop migration that bump the storage version. + // This benchmarks the weight of executing Migration::migrate when there are no migration in progress. + #[pov_mode = Measured] + migration_noop { + assert_eq!(StorageVersion::get::>(), 2); + }: { + Migration::::migrate(Weight::MAX); + } verify { + assert_eq!(StorageVersion::get::>(), 2); + } + + // This benchmarks the weight of executing Migration::migrate to execute a migration that bump the storage version. #[pov_mode = Measured] - migrate_update_storage_version { + migration { StorageVersion::new(0).put::>(); as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade(); }: { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 59afe176302f5..a1801ffa2235c 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -737,11 +737,13 @@ pub mod pallet { #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { + use migration::MigrateResult::*; ensure_signed(origin)?; + let weight_limit = weight_limit.saturating_add(T::WeightInfo::migration()); let (result, weight) = Migration::::migrate(weight_limit); + let weight = weight.saturating_add(T::WeightInfo::migrate_noop()); - use migration::MigrateResult::*; match result { InProgress | Completed => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index d2ee693965b56..9cb5259542201 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -267,7 +267,7 @@ impl Migration { let mut weight_left = weight_limit; if weight_left - .checked_reduce(T::WeightInfo::migrate_update_storage_version()) + .checked_reduce(T::WeightInfo::migration()) .is_none() { return (MigrateResult::NoMigrationPerformed, Weight::zero()) @@ -275,7 +275,7 @@ impl Migration { MigrationInProgress::::mutate_exists(|progress| { let Some(cursor_before) = progress.as_mut() else { - return (MigrateResult::NoMigrationPerformed, T::WeightInfo::migrate_noop()) + return (MigrateResult::NoMigrationPerformed, T::WeightInfo::migration_noop()) }; // if a migration is running it is always upgrading to the next version diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 8c6bcc6a3fea8..8573d118f5100 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -172,7 +172,8 @@ pub trait WeightInfo { fn bump_storage_version() -> Weight { Weight::zero() } fn migrate() -> Weight { Weight::zero() } fn migrate_noop() -> Weight { Weight::zero() } - fn migrate_update_storage_version() -> Weight { Weight::zero() } + fn migration_noop() -> Weight { Weight::zero() } + fn migration() -> Weight { Weight::zero() } fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } fn v10_migration_step() -> Weight { Weight::zero() } fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } From 4a7ec2e5b26703866c072ebc8cfdcc61c4cccc00 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 09:28:48 +0200 Subject: [PATCH 40/74] wip --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index a1801ffa2235c..3cb863f3beeb1 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -735,7 +735,7 @@ pub mod pallet { } #[pallet::call_index(9)] - #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] + #[pallet::weight(T::WeightInfo::migrate_noop().saturating_add(T::WeightInfo::migration()).saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { use migration::MigrateResult::*; ensure_signed(origin)?; From f21b5245f332d44e992cf1e06de9448220ea7230 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 09:29:43 +0200 Subject: [PATCH 41/74] wip --- frame/contracts/src/benchmarking/mod.rs | 12 ------------ frame/contracts/src/weights.rs | 1 - 2 files changed, 13 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 17d6af4c92113..c27f00e1fb304 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -266,18 +266,6 @@ benchmarks! { migration.step(); } - // This benchmarks the weight of dispatching a migrate call that perform a migration step. - #[pov_mode = Measured] - migrate { - let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - StorageVersion::new(0).put::>(); - as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade(); - }: { - >::migrate(origin.into(), Weight::MAX).unwrap_or_default() - } verify { - assert_eq!(StorageVersion::get::>(), 1); - } - // This benchmarks the weight of dispatching a migrate call that does nothing #[pov_mode = Measured] migrate_noop { diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 8573d118f5100..0146ae7b9168c 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -170,7 +170,6 @@ pub trait WeightInfo { fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; fn bump_storage_version() -> Weight { Weight::zero() } - fn migrate() -> Weight { Weight::zero() } fn migrate_noop() -> Weight { Weight::zero() } fn migration_noop() -> Weight { Weight::zero() } fn migration() -> Weight { Weight::zero() } From 42cf92cc500087c29f2aa328e3570fc01b6bcb6c Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 09:45:47 +0200 Subject: [PATCH 42/74] wip --- frame/contracts/src/migration.rs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 9cb5259542201..960742e203c9b 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -266,10 +266,7 @@ impl Migration { pub(crate) fn migrate(weight_limit: Weight) -> (MigrateResult, Weight) { let mut weight_left = weight_limit; - if weight_left - .checked_reduce(T::WeightInfo::migration()) - .is_none() - { + if weight_left.checked_reduce(T::WeightInfo::migration()).is_none() { return (MigrateResult::NoMigrationPerformed, Weight::zero()) } @@ -500,18 +497,20 @@ mod test { }); } - // #[test] - // fn steps_works() { - // type M = (MockMigration<1>, MockMigration<2>); - // let version = StorageVersion::new(1); - // let cursor = M::new(version); - // - // let mut weight = Weight::MAX; - // let cursor = M::steps(version, &cursor, &mut weight).unwrap(); - // assert_eq!(cursor.to_vec(), vec![1u8, 0]); - // - // assert!(M::steps(version, &cursor, &mut weight).is_none()); - // } + #[test] + fn steps_works() { + type M = (MockMigration<2>, MockMigration<3>); + let version = StorageVersion::new(2); + let cursor = M::new(version); + + let mut weight = Weight::from_all(2); + let cursor = M::steps(version, &cursor, &mut weight).unwrap(); + assert_eq!(cursor.to_vec(), vec![1u8, 0]); + assert_eq!(weight, Weight::from_all(1)); + + let mut weight = Weight::from_all(2); + assert!(M::steps(version, &cursor, &mut weight).is_none()); + } #[test] fn no_migration_performed_works() { From 68ff246bad34bae018abc99c076a462e801f16d7 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 10:00:17 +0200 Subject: [PATCH 43/74] wip --- frame/contracts/src/migration/v10.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 20958633e6366..e17205eb12045 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -167,7 +167,7 @@ impl Migrate for Migration { T::Currency::transfer( &account, &deposit_account, - T::Currency::reducible_balance(&account, Preserve, Polite), + deposit, ExistenceRequirement::KeepAlive, ) .map(|_| deposit) @@ -179,12 +179,16 @@ impl Migrate for Migration { min_balance }); - // Calculate the new base_deposit + // Calculate the new base_deposit: + // Ideally, it should be the same as the original `base_deposit`. + // Ideally, it should be at least 2xED (for the contract and deposit account). + // It can't be more than the `new_deposit`. let new_base_deposit = min( max(contract.storage_base_deposit, min_balance.saturating_add(min_balance)), new_deposit, ); + // Calculate the ratio to adjust storage_byte and storage_item deposits. let new_deposit_without_base = new_deposit.saturating_sub(new_base_deposit); let old_deposit_without_base = old_deposit.saturating_sub(contract.storage_base_deposit); From bcd404b7d39839263430ee1248b548f140a0159e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 10:02:00 +0200 Subject: [PATCH 44/74] wip --- frame/contracts/src/migration/v11.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index ccc6d72458f7e..b7e3395b59161 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -71,7 +71,7 @@ impl Migrate for Migration { const VERSION: u16 = 11; // It would be more correct to make our use the now removed [DeletionQueueDepth](https://github.com/paritytech/substrate/pull/13702/files#diff-70e9723e9db62816e35f6f885b6770a8449c75a6c2733e9fa7a245fe52c4656c) - // but in practice the queue is always empty, so 128 is isa good enough approximation for not + // but in practice the queue is always empty, so 128 is a good enough approximation for not // underestimating the weight of our migration. fn max_step_weight() -> Weight { T::WeightInfo::v11_migration_step(128) From 0a321dbd6d8965eeb0983493332121b85f4ab5ae Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 10:42:56 +0200 Subject: [PATCH 45/74] fix --- frame/contracts/src/migration.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 960742e203c9b..bf9ffebf484dd 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -163,7 +163,7 @@ pub trait MigrateSequence: private::Sealed { return false }; - in_storage == first_supported && target == high + in_storage >= first_supported && target == high } } @@ -212,7 +212,7 @@ impl OnRuntimeUpgrade for Migration { // over our migrations. let storage_version = >::on_chain_storage_version(); let target_version = >::current_storage_version(); - if !M::is_upgrade_supported(storage_version, target_version) { + if M::is_upgrade_supported(storage_version, target_version) { Ok(Vec::new()) } else { log::error!( @@ -476,9 +476,9 @@ mod test { #[test] fn is_upgrade_supported_works() { - type M = (MockMigration<7>, MockMigration<8>, MockMigration<9>); + type M = (MockMigration<9>, MockMigration<10>, MockMigration<11>); - [(1, 1), (6, 9)].into_iter().for_each(|(from, to)| { + [(1, 1), (8, 11), (9, 11)].into_iter().for_each(|(from, to)| { assert!( M::is_upgrade_supported(StorageVersion::new(from), StorageVersion::new(to)), "{} -> {} is supported", @@ -487,7 +487,7 @@ mod test { ) }); - [(1, 0), (0, 3), (5, 9), (7, 10)].into_iter().for_each(|(from, to)| { + [(1, 0), (0, 3), (7, 11), (8, 10)].into_iter().for_each(|(from, to)| { assert!( !M::is_upgrade_supported(StorageVersion::new(from), StorageVersion::new(to)), "{} -> {} is not supported", From 4b771b29b76db069edde0b7d4520d449048df42b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 13:54:59 +0200 Subject: [PATCH 46/74] fixed compilation --- frame/contracts/src/benchmarking/mod.rs | 33 ++++++++++++------------- frame/contracts/src/migration/v10.rs | 33 +++++++++++++++---------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index c27f00e1fb304..c4e9427141d6e 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -1,5 +1,3 @@ -// This file is part of Substrate. - // Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 @@ -30,7 +28,7 @@ use self::{ }; use crate::{ exec::{AccountIdOf, Key}, - migration::Migrate, + migration::{Migrate, v9, v10, v11}, wasm::CallFlags, Pallet as Contracts, *, }; @@ -234,36 +232,37 @@ benchmarks! { Contracts::::reinstrument_module(&mut module, &schedule)?; } - // This benchmarks the v9 migration step. + // This benchmarks the v9 migration step. (update codeStorage) #[pov_mode = Measured] v9_migration_step { let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); - migration::v9::store_old_dummy_code::(c as usize); - let mut migration = migration::v9::Migration::::default(); + v9::store_old_dummy_code::(c as usize); + let mut m = v9::Migration::::default(); }: { - migration.step(); + m.step(); } - // This benchmarks the v10 migration step. + // This benchmarks the v10 migration step. (use dedicated deposit_account) #[pov_mode = Measured] v10_migration_step { - let account = account::("account", 0, 0); - let code = WasmModule::::dummy_with_bytes(0); - let info = Contract::::new(code, vec![])?.info()?; - migration::v10::store_old_contrat_info::(account, info); - let mut migration = migration::v10::Migration::::default(); + let contract = >::with_caller( + whitelisted_caller(), WasmModule::dummy(), vec![], + )?; + + v10::store_old_contrat_info::(contract.account_id.clone(), contract.info()?); + let mut m = v10::Migration::::default(); }: { - migration.step(); + m.step(); } // This benchmarks the v11 migration step. #[pov_mode = Measured] v11_migration_step { let k in 0 .. 1024; - migration::v11::fill_old_queue::(k as usize); - let mut migration = migration::v11::Migration::::default(); + v11::fill_old_queue::(k as usize); + let mut m = v11::Migration::::default(); }: { - migration.step(); + m.step(); } // This benchmarks the weight of dispatching a migrate call that does nothing diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index e17205eb12045..b8d5fa82e0f11 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -128,7 +128,7 @@ impl Migrate for Migration { }; if let Some((account, contract)) = iter.next() { - log::debug!(target: LOG_TARGET, "Migrating contract info for account {:?}", account); + log::debug!(target: LOG_TARGET, "\nMigrating contract info for account {:?}", account); let min_balance = Pallet::::min_balance(); // Store last key for next migration step @@ -144,9 +144,14 @@ impl Migrate for Migration { .saturating_add(contract.storage_item_deposit) .saturating_add(contract.storage_base_deposit); + log::debug!(target: LOG_TARGET, "Balance of {:?} {:?}", &account, T::Currency::balance(&account)); + // Unreserve the existing deposit, so we can transfer it to the deposit account. // Note we can't use repatriate_reserve, because it only works with existing accounts - T::Currency::unreserve(&account, old_deposit); + let unreserved_deposit = T::Currency::unreserve(&account, old_deposit); + if unreserved_deposit != old_deposit { + log::warn!(target: LOG_TARGET, "Partially unreserved {:?} out of {:?} asked", unreserved_deposit, old_deposit); + } // Attempt to transfer it to the deposit account. let new_deposit = T::Currency::transfer( @@ -155,14 +160,13 @@ impl Migrate for Migration { old_deposit, ExistenceRequirement::KeepAlive, ) - .map(|_| old_deposit) + .map(|_| { + log::debug!( target: LOG_TARGET, "Transferred original deposit ({:?}) to deposit account", old_deposit); + old_deposit + }) // If it fails, we try to transfer the account reducible balance instead. - .or_else(|_| { - log::error!( - target: LOG_TARGET, - "Failed to transfer deposit for account {:?}", - account - ); + .or_else(|err| { + log::error!( target: LOG_TARGET, "Failed to transfer deposit {:?} from {:?} to {:?}, reason: {:?}", old_deposit, account, deposit_account, err); let deposit = T::Currency::reducible_balance(&account, Preserve, Polite); T::Currency::transfer( &account, @@ -170,11 +174,14 @@ impl Migrate for Migration { deposit, ExistenceRequirement::KeepAlive, ) - .map(|_| deposit) + .map(|_| { + log::debug!( target: LOG_TARGET, "Transferred reducible balance ({:?}) to deposit account", deposit); + deposit + }) }) // If it fails we fallback to minting the ED. - .unwrap_or_else(|_| { - log::error!(target: LOG_TARGET, "Failed to transfer ED for account {:?}", account); + .unwrap_or_else(|err| { + log::error!(target: LOG_TARGET, "Failed to transfer ED from {:?} to {:?}, reason: {:?}", account, deposit_account, err); T::Currency::deposit_creating(&deposit_account, min_balance); min_balance }); @@ -216,7 +223,7 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { let sample: Vec<_> = old::ContractInfoOf::::iter() - .take(100) + .take(10) .map(|(account, contract)| { let old_deposit = min( T::Currency::reserved_balance(&account), From 7864d6cca3f9b94c42d305c6df50cf0665eec51b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 14:03:29 +0200 Subject: [PATCH 47/74] clean up logs --- frame/contracts/src/migration/v10.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index b8d5fa82e0f11..be50c8faf850f 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -153,7 +153,7 @@ impl Migrate for Migration { log::warn!(target: LOG_TARGET, "Partially unreserved {:?} out of {:?} asked", unreserved_deposit, old_deposit); } - // Attempt to transfer it to the deposit account. + // Attempt to transfer the old deposit to the deposit account. let new_deposit = T::Currency::transfer( &account, &deposit_account, @@ -166,7 +166,7 @@ impl Migrate for Migration { }) // If it fails, we try to transfer the account reducible balance instead. .or_else(|err| { - log::error!( target: LOG_TARGET, "Failed to transfer deposit {:?} from {:?} to {:?}, reason: {:?}", old_deposit, account, deposit_account, err); + log::error!( target: LOG_TARGET, "Failed to transfer deposit ({:?}), reason: {:?}", old_deposit, err); let deposit = T::Currency::reducible_balance(&account, Preserve, Polite); T::Currency::transfer( &account, @@ -181,7 +181,7 @@ impl Migrate for Migration { }) // If it fails we fallback to minting the ED. .unwrap_or_else(|err| { - log::error!(target: LOG_TARGET, "Failed to transfer ED from {:?} to {:?}, reason: {:?}", account, deposit_account, err); + log::error!(target: LOG_TARGET, "Failed to transfer ED, reason: {:?}", err); T::Currency::deposit_creating(&deposit_account, min_balance); min_balance }); From 2af1523be869fe715c06478905ee4be24d6d9515 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 16:04:19 +0200 Subject: [PATCH 48/74] wip --- frame/contracts/src/migration/v10.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index be50c8faf850f..02192124f4a25 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -38,7 +38,7 @@ use frame_support::{ }, DefaultNoBound, }; -use sp_runtime::{Perbill, Saturating}; +use sp_runtime::{traits::Zero, Perbill, Saturating}; use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; mod old { use super::*; @@ -140,17 +140,17 @@ impl Migrate for Migration { // Calculate the existing deposit, that should be reserved on the contract account let old_deposit = contract - .storage_byte_deposit + .storage_base_deposit .saturating_add(contract.storage_item_deposit) - .saturating_add(contract.storage_base_deposit); + .saturating_add(contract.storage_byte_deposit); log::debug!(target: LOG_TARGET, "Balance of {:?} {:?}", &account, T::Currency::balance(&account)); // Unreserve the existing deposit, so we can transfer it to the deposit account. // Note we can't use repatriate_reserve, because it only works with existing accounts - let unreserved_deposit = T::Currency::unreserve(&account, old_deposit); - if unreserved_deposit != old_deposit { - log::warn!(target: LOG_TARGET, "Partially unreserved {:?} out of {:?} asked", unreserved_deposit, old_deposit); + let remaining = T::Currency::unreserve(&account, old_deposit); + if !remaining.is_zero() { + log::warn!(target: LOG_TARGET, "Partially unreserved. Remaining {:?} out of {:?} asked", remaining, old_deposit); } // Attempt to transfer the old deposit to the deposit account. @@ -225,13 +225,10 @@ impl Migrate for Migration { let sample: Vec<_> = old::ContractInfoOf::::iter() .take(10) .map(|(account, contract)| { - let old_deposit = min( - T::Currency::reserved_balance(&account), - contract - .storage_byte_deposit - .saturating_add(contract.storage_item_deposit) - .saturating_add(contract.storage_base_deposit), - ); + let old_deposit = contract + .storage_byte_deposit + .saturating_add(contract.storage_item_deposit) + .saturating_add(contract.storage_base_deposit); (account, contract, old_deposit) }) From 4c4758b12beaa2a8c676b8b0148ed082e0de22b4 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 11 May 2023 20:15:16 +0200 Subject: [PATCH 49/74] Revert "Frame Add translate_next" This reverts commit b878662ee89123c97d5325b122017cc137869c91. --- frame/support/src/storage/generator/map.rs | 37 ---------------------- frame/support/src/storage/mod.rs | 11 ------- frame/support/src/storage/types/map.rs | 11 +------ 3 files changed, 1 insertion(+), 58 deletions(-) diff --git a/frame/support/src/storage/generator/map.rs b/frame/support/src/storage/generator/map.rs index 8a7269502572a..3b36b9bddb704 100644 --- a/frame/support/src/storage/generator/map.rs +++ b/frame/support/src/storage/generator/map.rs @@ -207,43 +207,6 @@ where } } } - - fn translate_next Option>( - previous_key: Option>, - mut f: F, - ) -> (Option>, Result<(), ()>) { - let prefix = G::prefix_hash(); - let previous_key = previous_key.unwrap_or_else(|| prefix.clone()); - - match sp_io::storage::next_key(&previous_key).filter(|n| n.starts_with(&prefix)) { - Some(current_key) => { - let value = match unhashed::get::(¤t_key) { - Some(value) => value, - None => { - log::error!("Invalid translate: fail to decode old value"); - return (Some(current_key), Err(())) - }, - }; - - let mut key_material = G::Hasher::reverse(¤t_key[prefix.len()..]); - let key = match K::decode(&mut key_material) { - Ok(key) => key, - Err(_) => { - log::error!("Invalid translate: fail to decode key"); - return (Some(current_key), Err(())) - }, - }; - - match f(key, value) { - Some(new) => unhashed::put::(¤t_key, &new), - None => unhashed::kill(¤t_key), - } - - (Some(current_key), Ok(())) - }, - None => (None, Ok(())), - } - } } impl> storage::StorageMap for G { diff --git a/frame/support/src/storage/mod.rs b/frame/support/src/storage/mod.rs index 2e823af2bfa1a..4c6ea943c6920 100644 --- a/frame/support/src/storage/mod.rs +++ b/frame/support/src/storage/mod.rs @@ -303,17 +303,6 @@ pub trait IterableStorageMap: StorageMap { /// /// NOTE: If a value fail to decode because storage is corrupted then it is skipped. fn translate Option>(f: F); - - /// Translate the next entry following `previous_key` by a function `f`. - /// By returning `None` from `f` for an element, you'll remove it from the map. - /// - /// Returns the next key to iterate from in lexicographical order of the encoded key. - /// and whether or not the translation failed because either the old key or value was - /// corrupted. - fn translate_next Option>( - previous_key: Option>, - f: F, - ) -> (Option>, Result<(), ()>); } /// A strongly-typed double map in storage whose secondary keys and values can be iterated over. diff --git a/frame/support/src/storage/types/map.rs b/frame/support/src/storage/types/map.rs index 8bfde09de2fec..2110732b2f69c 100644 --- a/frame/support/src/storage/types/map.rs +++ b/frame/support/src/storage/types/map.rs @@ -484,7 +484,7 @@ mod test { use crate::{ hash::*, metadata_ir::{StorageEntryModifierIR, StorageEntryTypeIR, StorageHasherIR}, - storage::{types::ValueQuery, IterableStorageMap}, + storage::types::ValueQuery, }; use sp_io::{hashing::twox_128, TestExternalities}; @@ -700,15 +700,6 @@ mod test { A::translate::(|k, v| Some((k * v as u16).into())); assert_eq!(A::iter().collect::>(), vec![(4, 40), (3, 30)]); - let translate_next = |k: u16, v: u8| Some((v as u16 / k).into()); - let (k, _) = A::translate_next::(None, translate_next); - let (k, _) = A::translate_next::(k, translate_next); - assert_eq!((None, Ok(())), A::translate_next::(k, translate_next)); - assert_eq!(A::iter().collect::>(), vec![(4, 10), (3, 10)]); - - let _ = A::translate_next::(None, |_, _| None); - assert_eq!(A::iter().collect::>(), vec![(3, 10)]); - let mut entries = vec![]; A::build_metadata(vec![], &mut entries); AValueQueryWithAnOnEmpty::build_metadata(vec![], &mut entries); From 1194ad3fabfa0312a097d8c4e27381364e0c0680 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 11:11:55 +0200 Subject: [PATCH 50/74] Fix v10 logic --- frame/contracts/src/migration.rs | 59 +++++++++++++++----------- frame/contracts/src/migration/v10.rs | 63 ++++++++++++++++++---------- 2 files changed, 74 insertions(+), 48 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index bf9ffebf484dd..7614ba16b66f7 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -177,31 +177,56 @@ pub struct Migration, NoopMigr PhantomData<(T, M)>, ); +#[cfg(feature = "try-runtime")] +impl Migration { + fn run_all_steps() -> Result<(), &'static str> { + let mut weight = Weight::zero(); + loop { + let in_progress_version = >::on_chain_storage_version() + 1; + let state = M::pre_upgrade_step(in_progress_version)?; + let (status, w) = Self::migrate(Weight::MAX); + weight.saturating_accrue(w); + M::post_upgrade_step(in_progress_version, state)?; + if matches!(status, MigrateResult::Completed) { + break + } + } + + let name = >::name(); + log::info!(target: LOG_TARGET, "{name}: Migration steps weight = {}", weight); + Ok(()) + } +} + impl OnRuntimeUpgrade for Migration { fn on_runtime_upgrade() -> Weight { + let name = >::name(); let latest_version = >::current_storage_version(); let storage_version = >::on_chain_storage_version(); if storage_version == latest_version { - log::warn!(target: LOG_TARGET, "No Migration performed storage_version = latest_version = {:?}", &storage_version); + log::warn!(target: LOG_TARGET, "{name}: No Migration performed storage_version = latest_version = {:?}", &storage_version); return T::WeightInfo::on_runtime_upgrade_noop() } // In case a migration is already in progress we create the next migration // (if any) right when the current one finishes. if Self::in_progress() { - log::warn!( target: LOG_TARGET, "Migration already in progress {:?}", &storage_version); + log::warn!( target: LOG_TARGET, "{name}: Migration already in progress {:?}", &storage_version); return T::WeightInfo::on_runtime_upgrade_in_progress() } log::info!( target: LOG_TARGET, - "Upgrading storage from {storage_version:?} to {latest_version:?}.", + "{name}: Upgrading storage from {storage_version:?} to {latest_version:?}.", ); let cursor = M::new(storage_version + 1); MigrationInProgress::::set(Some(cursor)); + #[cfg(feature = "try-runtime")] + Self::run_all_steps().unwrap(); + return T::WeightInfo::on_runtime_upgrade() } @@ -215,33 +240,16 @@ impl OnRuntimeUpgrade for Migration { if M::is_upgrade_supported(storage_version, target_version) { Ok(Vec::new()) } else { + let name = >::name(); log::error!( target: LOG_TARGET, - "Range supported {:?}, range requested {:?}", + "{name}: Range supported {:?}, range requested {:?}", M::VERSION_RANGE, (storage_version, target_version) ); Err("New runtime does not contain the required migrations to perform this upgrade.") } } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { - let mut weight = Weight::zero(); - loop { - let in_progress_version = >::on_chain_storage_version() + 1; - let state = M::pre_upgrade_step(in_progress_version)?; - let (status, w) = Self::migrate(Weight::MAX); - weight.saturating_accrue(w); - M::post_upgrade_step(in_progress_version, state)?; - if matches!(status, MigrateResult::Completed) { - break - } - } - - log::info!(target: LOG_TARGET, "Migration steps weight = {}", weight); - Ok(()) - } } /// The result of a migration step. @@ -264,6 +272,7 @@ impl Migration { /// Migrate /// Return the weight used and whether or not a migration is in progress pub(crate) fn migrate(weight_limit: Weight) -> (MigrateResult, Weight) { + let name = >::name(); let mut weight_left = weight_limit; if weight_left.checked_reduce(T::WeightInfo::migration()).is_none() { @@ -281,7 +290,7 @@ impl Migration { log::info!( target: LOG_TARGET, - "Migrating from {:?} to {:?},", + "{name}: Migrating from {:?} to {:?},", storage_version, in_progress_version, ); @@ -302,7 +311,7 @@ impl Migration { // chain the next migration log::info!( target: LOG_TARGET, - "Next migration is {:?},", + "{name}: Next migration is {:?},", in_progress_version + 1, ); @@ -311,7 +320,7 @@ impl Migration { // enable pallet by removing the storage item log::info!( target: LOG_TARGET, - "All migrations done. At version {:?},", + "{name}: All migrations done. At version {:?},", in_progress_version, ); None diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 02192124f4a25..2ae89e6991d04 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -40,6 +40,7 @@ use frame_support::{ }; use sp_runtime::{traits::Zero, Perbill, Saturating}; use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; + mod old { use super::*; @@ -128,7 +129,6 @@ impl Migrate for Migration { }; if let Some((account, contract)) = iter.next() { - log::debug!(target: LOG_TARGET, "\nMigrating contract info for account {:?}", account); let min_balance = Pallet::::min_balance(); // Store last key for next migration step @@ -144,25 +144,26 @@ impl Migrate for Migration { .saturating_add(contract.storage_item_deposit) .saturating_add(contract.storage_byte_deposit); - log::debug!(target: LOG_TARGET, "Balance of {:?} {:?}", &account, T::Currency::balance(&account)); - - // Unreserve the existing deposit, so we can transfer it to the deposit account. + // Unreserve the existing deposit // Note we can't use repatriate_reserve, because it only works with existing accounts let remaining = T::Currency::unreserve(&account, old_deposit); + if !remaining.is_zero() { log::warn!(target: LOG_TARGET, "Partially unreserved. Remaining {:?} out of {:?} asked", remaining, old_deposit); } // Attempt to transfer the old deposit to the deposit account. + // We just want to leave the minimum balance on the contract account + let amount = old_deposit.saturating_sub(min_balance); let new_deposit = T::Currency::transfer( &account, &deposit_account, - old_deposit, + amount, ExistenceRequirement::KeepAlive, ) .map(|_| { - log::debug!( target: LOG_TARGET, "Transferred original deposit ({:?}) to deposit account", old_deposit); - old_deposit + log::debug!( target: LOG_TARGET, "Transferred deposit ({:?}) to deposit account", amount); + amount }) // If it fails, we try to transfer the account reducible balance instead. .or_else(|err| { @@ -186,8 +187,8 @@ impl Migrate for Migration { min_balance }); - // Calculate the new base_deposit: - // Ideally, it should be the same as the original `base_deposit`. + // Calculate the new base_deposit to store in the contract: + // Ideally: it should be the same as the old one // Ideally, it should be at least 2xED (for the contract and deposit account). // It can't be more than the `new_deposit`. let new_base_deposit = min( @@ -201,15 +202,25 @@ impl Migrate for Migration { old_deposit.saturating_sub(contract.storage_base_deposit); let ratio = Perbill::from_rational(new_deposit_without_base, old_deposit_without_base); + // Calculate the new storage deposits based on the ratio + let storage_byte_deposit = ratio.mul_ceil(contract.storage_byte_deposit); + let storage_item_deposit = ratio.mul_ceil(contract.storage_item_deposit); + + // Recalculate the new base deposit, instead of using new_base_deposit to avoid rounding + // errors + let storage_base_deposit = new_deposit + .saturating_sub(storage_byte_deposit) + .saturating_sub(storage_item_deposit); + let new_contract_info = ContractInfo { trie_id: contract.trie_id, deposit_account, code_hash: contract.code_hash, storage_bytes: contract.storage_bytes, storage_items: contract.storage_items, - storage_byte_deposit: ratio.mul_ceil(contract.storage_byte_deposit), - storage_item_deposit: ratio.mul_ceil(contract.storage_item_deposit), - storage_base_deposit: new_base_deposit, + storage_byte_deposit, + storage_item_deposit, + storage_base_deposit, }; ContractInfoOf::::insert(&account, new_contract_info); @@ -225,12 +236,12 @@ impl Migrate for Migration { let sample: Vec<_> = old::ContractInfoOf::::iter() .take(10) .map(|(account, contract)| { - let old_deposit = contract - .storage_byte_deposit - .saturating_add(contract.storage_item_deposit) - .saturating_add(contract.storage_base_deposit); - - (account, contract, old_deposit) + let total_balance = <::Currency as frame_support::traits::Currency< + _, + >>::total_balance(&account); + let min_balance = Pallet::::min_balance(); + log::debug!(target: LOG_TARGET, "Old amount {:?} min {:?}", total_balance, min_balance); + (account, contract, total_balance) }) .collect(); @@ -246,8 +257,9 @@ impl Migrate for Migration { .unwrap(); log::debug!(target: LOG_TARGET, "Validating sample of {} contracts", sample.len()); - for (account, old_contract, old_deposit) in sample { + for (account, old_contract, old_account_balance) in sample { let contract = ContractInfoOf::::get(&account).unwrap(); + let min_balance = Pallet::::min_balance(); assert_eq!(old_contract.trie_id, contract.trie_id); assert_eq!(old_contract.code_hash, contract.code_hash); assert_eq!(old_contract.storage_bytes, contract.storage_bytes); @@ -257,14 +269,19 @@ impl Migrate for Migration { <::Currency as frame_support::traits::Currency<_>>::total_balance( &contract.deposit_account, ); - assert_eq!(old_deposit, deposit); + assert_eq!( + deposit, + old_account_balance.saturating_sub(min_balance), + "deposit account balance mismatch" + ); assert_eq!( deposit, contract - .storage_byte_deposit + .storage_base_deposit .saturating_add(contract.storage_item_deposit) - .saturating_add(contract.storage_base_deposit), - ) + .saturating_add(contract.storage_byte_deposit), + "deposit mismatch" + ); } Ok(()) From 657ac6ea5747ec06bcaf9afca9df698ffc1d95c8 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 12 May 2023 14:04:30 +0200 Subject: [PATCH 51/74] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/migration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 7614ba16b66f7..452921ed61ad3 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -68,13 +68,13 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { /// Returns whether the migration is finished and the weight consumed. fn step(&mut self) -> (IsFinished, Weight); - /// Execute some pre-checks prior to running this step. + /// Execute some pre-checks prior to running the first step of this migration. #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { Ok(Vec::new()) } - /// Execute some post-checks after running this step + /// Execute some post-checks after running the last step of this migration. #[cfg(feature = "try-runtime")] fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { Ok(()) From 69734aec45d2c7d2a01f225e717f31e3174c12db Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 17:03:43 +0200 Subject: [PATCH 52/74] wip --- frame/contracts/src/benchmarking/mod.rs | 35 ++------ frame/contracts/src/lib.rs | 25 +++--- frame/contracts/src/migration.rs | 113 +++++++++++------------- frame/contracts/src/migration/v10.rs | 42 ++------- frame/contracts/src/weights.rs | 3 +- 5 files changed, 85 insertions(+), 133 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index c4e9427141d6e..772c5538e2c98 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -28,7 +28,7 @@ use self::{ }; use crate::{ exec::{AccountIdOf, Key}, - migration::{Migrate, v9, v10, v11}, + migration::{v10, v11, v9, Migrate}, wasm::CallFlags, Pallet as Contracts, *, }; @@ -265,42 +265,24 @@ benchmarks! { m.step(); } - // This benchmarks the weight of dispatching a migrate call that does nothing - #[pov_mode = Measured] - migrate_noop { - let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); - }: { - >::migrate(origin.into(), Weight::zero()).is_err() - } - - // This benchmarks the weight of bumping the storage version. - #[pov_mode = Measured] - bump_storage_version { - assert_eq!(StorageVersion::get::>(), 2); - let new_version = StorageVersion::new(3); - }: { - new_version.put::>(); - } verify { - assert_eq!(StorageVersion::get::>(), 3); - } - - // This benchmarks the weight of executing Migration::migrate when there are no migration in progress. + // This benchmarks the weight of executing Migration::migrate to execute a noop migration. #[pov_mode = Measured] migration_noop { assert_eq!(StorageVersion::get::>(), 2); }: { - Migration::::migrate(Weight::MAX); + Migration::::migrate(Weight::MAX) } verify { assert_eq!(StorageVersion::get::>(), 2); } - // This benchmarks the weight of executing Migration::migrate to execute a migration that bump the storage version. + // This benchmarks the weight of executing Migration::migrate when there are no migration in progress. #[pov_mode = Measured] - migration { + migrate { StorageVersion::new(0).put::>(); as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade(); - }: { - Migration::::migrate(Weight::MAX); + let origin: RawOrigin<::AccountId> = RawOrigin::Signed(whitelisted_caller()); + }: { + >::migrate(origin.into(), Weight::MAX).unwrap() } verify { assert_eq!(StorageVersion::get::>(), 1); } @@ -321,7 +303,6 @@ benchmarks! { StorageVersion::new(0).put::>(); let v = vec![42u8].try_into().ok(); MigrationInProgress::::set(v.clone()); - }: { as frame_support::traits::OnRuntimeUpgrade>::on_runtime_upgrade() } verify { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 3cb863f3beeb1..ed0dcae859d0c 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -326,11 +326,12 @@ pub mod pallet { fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { use migration::MigrateResult::*; - let remaining_weight = match Migration::::migrate(remaining_weight) { - (InProgress, weight) => return remaining_weight.saturating_sub(weight), - (NoMigrationPerformed | Completed, weight) => - remaining_weight.saturating_sub(weight), - }; + let (result, weight) = Migration::::migrate(remaining_weight); + let remaining_weight = remaining_weight.saturating_sub(weight); + + if !matches!(result, Completed | NoMigrationInProgress) { + return weight + } ContractInfo::::process_deletion_queue_batch(remaining_weight) .saturating_add(T::WeightInfo::on_process_deletion_queue_batch()) @@ -735,21 +736,21 @@ pub mod pallet { } #[pallet::call_index(9)] - #[pallet::weight(T::WeightInfo::migrate_noop().saturating_add(T::WeightInfo::migration()).saturating_add(*weight_limit))] + #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { use migration::MigrateResult::*; ensure_signed(origin)?; - let weight_limit = weight_limit.saturating_add(T::WeightInfo::migration()); + let weight_limit = weight_limit.saturating_add(T::WeightInfo::migrate()); let (result, weight) = Migration::::migrate(weight_limit); - let weight = weight.saturating_add(T::WeightInfo::migrate_noop()); match result { - InProgress | Completed => - Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), - NoMigrationPerformed => { + Completed => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), + InProgress { steps_done, .. } if steps_done > 0 => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), + InProgress { .. } => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::Yes }), + NoMigrationInProgress | NoMigrationPerformed => { let err: DispatchError = >::NoMigrationPerformed.into(); - Err(err.with_weight(weight)) + Err(err.with_weight(T::WeightInfo::migrate())) }, } } diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 452921ed61ad3..1afb96156b7e6 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -140,9 +140,7 @@ pub trait MigrateSequence: private::Sealed { } /// Execute the migration step until the weight limit is reached. - /// - /// Returns the new cursor or `None` if the migration is finished. - fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> Option; + fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> StepResult; /// Verify that each migration's cursor fits into `Cursor`. fn integrity_test(); @@ -252,17 +250,26 @@ impl OnRuntimeUpgrade for Migration { } } -/// The result of a migration step. +/// The result of running the migration. #[derive(Debug, PartialEq)] pub enum MigrateResult { /// No migration was performed NoMigrationPerformed, + /// No migration currently in progress + NoMigrationInProgress, /// A migration is in progress - InProgress, + InProgress { steps_done: u32 }, /// All migrations are completed Completed, } +/// The result of running a migration step. +#[derive(Debug, PartialEq)] +pub enum StepResult { + InProgress { cursor: Cursor, steps_done: u32 }, + Completed { steps_done: u32 }, +} + impl Migration { /// Verify that each migration's step of the MigrateSequence fits into `Cursor`. pub(crate) fn integrity_test() { @@ -275,13 +282,13 @@ impl Migration { let name = >::name(); let mut weight_left = weight_limit; - if weight_left.checked_reduce(T::WeightInfo::migration()).is_none() { + if weight_left.checked_reduce(T::WeightInfo::migrate()).is_none() { return (MigrateResult::NoMigrationPerformed, Weight::zero()) } MigrationInProgress::::mutate_exists(|progress| { let Some(cursor_before) = progress.as_mut() else { - return (MigrateResult::NoMigrationPerformed, T::WeightInfo::migration_noop()) + return (MigrateResult::NoMigrationInProgress, T::WeightInfo::migration_noop()) }; // if a migration is running it is always upgrading to the next version @@ -295,45 +302,30 @@ impl Migration { in_progress_version, ); - *progress = - match M::steps(in_progress_version, cursor_before.as_ref(), &mut weight_left) { - // ongoing - Some(cursor) => { - // refund as we did not update the storage version - weight_left.saturating_accrue(T::WeightInfo::bump_storage_version()); - // we still have a cursor which keeps the pallet disabled - Some(cursor) - }, - // finished - None => { - in_progress_version.put::>(); - if >::current_storage_version() != in_progress_version { - // chain the next migration - log::info!( - target: LOG_TARGET, - "{name}: Next migration is {:?},", - in_progress_version + 1, - ); - - Some(M::new(in_progress_version + 1)) - } else { - // enable pallet by removing the storage item - log::info!( - target: LOG_TARGET, - "{name}: All migrations done. At version {:?},", - in_progress_version, - ); - None - } - }, - }; - - let state = match progress { - Some(_) => MigrateResult::InProgress, - None => MigrateResult::Completed, + let result = match M::steps( + in_progress_version, + cursor_before.as_ref(), + &mut weight_left, + ) { + StepResult::InProgress { cursor, steps_done } => { + *progress = Some(cursor); + MigrateResult::InProgress { steps_done } + }, + StepResult::Completed { steps_done } => { + in_progress_version.put::>(); + if >::current_storage_version() != in_progress_version { + log::info!( target: LOG_TARGET, "{name}: Next migration is {:?},", in_progress_version + 1); + *progress = Some(M::new(in_progress_version + 1)); + MigrateResult::InProgress { steps_done } + } else { + log::info!( target: LOG_TARGET, "{name}: All migrations done. At version {:?},", in_progress_version); + *progress = None; + MigrateResult::Completed + } + }, }; - (state, weight_limit.saturating_sub(weight_left)) + (result, weight_limit.saturating_sub(weight_left)) }) } @@ -408,25 +400,23 @@ impl MigrateSequence for Tuple { invalid_version(version) } - fn steps( - version: StorageVersion, - mut cursor: &[u8], - weight_left: &mut Weight, - ) -> Option { + fn steps(version: StorageVersion, mut cursor: &[u8], weight_left: &mut Weight) -> StepResult { for_tuples!( #( if version == Tuple::VERSION { let mut migration = ::decode(&mut cursor) .expect(PROOF_DECODE); let max_weight = Tuple::max_step_weight(); + let mut steps_done = 0; while weight_left.all_gt(max_weight) { let (finished, weight) = migration.step(); + steps_done += 1; weight_left.saturating_reduce(weight); if matches!(finished, IsFinished::Yes) { - return None + return StepResult::Completed{ steps_done } } } - return Some(migration.encode().try_into().expect(PROOF_ENCODE)) + return StepResult::InProgress{cursor: migration.encode().try_into().expect(PROOF_ENCODE), steps_done } } )* ); @@ -510,25 +500,29 @@ mod test { fn steps_works() { type M = (MockMigration<2>, MockMigration<3>); let version = StorageVersion::new(2); - let cursor = M::new(version); + let mut cursor = M::new(version); let mut weight = Weight::from_all(2); - let cursor = M::steps(version, &cursor, &mut weight).unwrap(); - assert_eq!(cursor.to_vec(), vec![1u8, 0]); + let result = M::steps(version, &cursor, &mut weight); + cursor = vec![1u8, 0].try_into().unwrap(); + assert_eq!(result, StepResult::InProgress { cursor: cursor.clone(), steps_done: 1 }); assert_eq!(weight, Weight::from_all(1)); let mut weight = Weight::from_all(2); - assert!(M::steps(version, &cursor, &mut weight).is_none()); + assert_eq!( + M::steps(version, &cursor, &mut weight), + StepResult::Completed { steps_done: 1 } + ); } #[test] - fn no_migration_performed_works() { + fn no_migration_in_progress_works() { type M = (MockMigration<1>, MockMigration<2>); type TestMigration = Migration; ExtBuilder::default().build().execute_with(|| { assert_eq!(StorageVersion::get::>(), 2); - assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed) + assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationInProgress) }); } @@ -540,7 +534,8 @@ mod test { ExtBuilder::default().set_storage_version(0).build().execute_with(|| { assert_eq!(StorageVersion::get::>(), 0); TestMigration::on_runtime_upgrade(); - for (version, status) in [(1, MigrateResult::InProgress), (2, MigrateResult::Completed)] + for (version, status) in + [(1, MigrateResult::InProgress { steps_done: 1 }), (2, MigrateResult::Completed)] { assert_eq!(TestMigration::migrate(Weight::MAX).0, status); assert_eq!( @@ -549,7 +544,7 @@ mod test { ); } - assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationPerformed); + assert_eq!(TestMigration::migrate(Weight::MAX).0, MigrateResult::NoMigrationInProgress); assert_eq!(StorageVersion::get::>(), 2); }); } diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 2ae89e6991d04..38a5a22836ecc 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -38,6 +38,7 @@ use frame_support::{ }, DefaultNoBound, }; +use sp_core::hexdisplay::HexDisplay; use sp_runtime::{traits::Zero, Perbill, Saturating}; use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; @@ -130,6 +131,7 @@ impl Migrate for Migration { if let Some((account, contract)) = iter.next() { let min_balance = Pallet::::min_balance(); + log::debug!(target: LOG_TARGET, "Account: 0x{} ", HexDisplay::from(&account.encode())); // Store last key for next migration step self.last_key = Some(iter.last_raw_key().to_vec().try_into().unwrap()); @@ -154,7 +156,9 @@ impl Migrate for Migration { // Attempt to transfer the old deposit to the deposit account. // We just want to leave the minimum balance on the contract account - let amount = old_deposit.saturating_sub(min_balance); + let amount = old_deposit + .saturating_sub(min_balance) + .min(T::Currency::reducible_balance(&account, Preserve, Polite)); let new_deposit = T::Currency::transfer( &account, &deposit_account, @@ -165,21 +169,6 @@ impl Migrate for Migration { log::debug!( target: LOG_TARGET, "Transferred deposit ({:?}) to deposit account", amount); amount }) - // If it fails, we try to transfer the account reducible balance instead. - .or_else(|err| { - log::error!( target: LOG_TARGET, "Failed to transfer deposit ({:?}), reason: {:?}", old_deposit, err); - let deposit = T::Currency::reducible_balance(&account, Preserve, Polite); - T::Currency::transfer( - &account, - &deposit_account, - deposit, - ExistenceRequirement::KeepAlive, - ) - .map(|_| { - log::debug!( target: LOG_TARGET, "Transferred reducible balance ({:?}) to deposit account", deposit); - deposit - }) - }) // If it fails we fallback to minting the ED. .unwrap_or_else(|err| { log::error!(target: LOG_TARGET, "Failed to transfer ED, reason: {:?}", err); @@ -233,17 +222,7 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { - let sample: Vec<_> = old::ContractInfoOf::::iter() - .take(10) - .map(|(account, contract)| { - let total_balance = <::Currency as frame_support::traits::Currency< - _, - >>::total_balance(&account); - let min_balance = Pallet::::min_balance(); - log::debug!(target: LOG_TARGET, "Old amount {:?} min {:?}", total_balance, min_balance); - (account, contract, total_balance) - }) - .collect(); + let sample: Vec<_> = old::ContractInfoOf::::iter().take(10).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contracts", sample.len()); Ok(sample.encode()) @@ -257,7 +236,9 @@ impl Migrate for Migration { .unwrap(); log::debug!(target: LOG_TARGET, "Validating sample of {} contracts", sample.len()); - for (account, old_contract, old_account_balance) in sample { + for (account, old_contract) in sample { + log::debug!(target: LOG_TARGET, "==="); + log::debug!(target: LOG_TARGET, "Account: 0x{} ", HexDisplay::from(&account.encode())); let contract = ContractInfoOf::::get(&account).unwrap(); let min_balance = Pallet::::min_balance(); assert_eq!(old_contract.trie_id, contract.trie_id); @@ -269,11 +250,6 @@ impl Migrate for Migration { <::Currency as frame_support::traits::Currency<_>>::total_balance( &contract.deposit_account, ); - assert_eq!( - deposit, - old_account_balance.saturating_sub(min_balance), - "deposit account balance mismatch" - ); assert_eq!( deposit, contract diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 0146ae7b9168c..24197da378e90 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -170,9 +170,8 @@ pub trait WeightInfo { fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; fn bump_storage_version() -> Weight { Weight::zero() } - fn migrate_noop() -> Weight { Weight::zero() } fn migration_noop() -> Weight { Weight::zero() } - fn migration() -> Weight { Weight::zero() } + fn migrate() -> Weight { Weight::zero() } fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } fn v10_migration_step() -> Weight { Weight::zero() } fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } From 98f5df5898378bc18a89a3273b59d5253512779f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 17:50:09 +0200 Subject: [PATCH 53/74] fixes --- frame/contracts/src/migration.rs | 3 ++- frame/contracts/src/migration/v10.rs | 7 ++----- frame/contracts/src/migration/v9.rs | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 1afb96156b7e6..55ccd41ceacf7 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,7 +15,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// TODO gate pub mod v10; pub mod v11; pub mod v9; @@ -179,11 +178,13 @@ pub struct Migration, NoopMigr impl Migration { fn run_all_steps() -> Result<(), &'static str> { let mut weight = Weight::zero(); + let name = >::name(); loop { let in_progress_version = >::on_chain_storage_version() + 1; let state = M::pre_upgrade_step(in_progress_version)?; let (status, w) = Self::migrate(Weight::MAX); weight.saturating_accrue(w); + log::info!(target: LOG_TARGET, "{name}: Migration step {:?} weight = {}", in_progress_version, weight); M::post_upgrade_step(in_progress_version, state)?; if matches!(status, MigrateResult::Completed) { break diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 38a5a22836ecc..20192e169de34 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -230,17 +230,14 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { - let sample = , BalanceOf)> as Decode>::decode( - &mut &state[..], - ) - .unwrap(); + let sample = + )> as Decode>::decode(&mut &state[..]).unwrap(); log::debug!(target: LOG_TARGET, "Validating sample of {} contracts", sample.len()); for (account, old_contract) in sample { log::debug!(target: LOG_TARGET, "==="); log::debug!(target: LOG_TARGET, "Account: 0x{} ", HexDisplay::from(&account.encode())); let contract = ContractInfoOf::::get(&account).unwrap(); - let min_balance = Pallet::::min_balance(); assert_eq!(old_contract.trie_id, contract.trie_id); assert_eq!(old_contract.code_hash, contract.code_hash); assert_eq!(old_contract.storage_bytes, contract.storage_bytes); diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index d54c11f8f5793..4d37814d1c4e5 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -131,6 +131,7 @@ impl Migrate for Migration { for (code_hash, old) in sample { let module = CodeStorage::::get(&code_hash).unwrap(); assert_eq!(module.instruction_weights_version, old.instruction_weights_version); + assert_eq!(module.determinism, Determinism::Enforced); assert_eq!(module.initial, old.initial); assert_eq!(module.maximum, old.maximum); assert_eq!(module.code, old.code); From 14b7102994fc41f67a6ba93ac6b5c6dbfe0cb22b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 18:05:11 +0200 Subject: [PATCH 54/74] exercise del_queue --- frame/contracts/src/migration/v11.rs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index b7e3395b59161..a1989b2d6f280 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -47,7 +47,7 @@ pub struct DeletionQueueManager { _phantom: PhantomData, } -#[cfg(feature = "runtime-benchmarks")] +#[cfg(any(feature = "runtime-benchmarks", feature = "try-runtime"))] pub fn fill_old_queue(len: usize) { let queue: Vec = core::iter::repeat_with(|| old::DeletedContract { trie_id: Default::default() }) @@ -99,4 +99,27 @@ impl Migrate for Migration { (IsFinished::Yes, T::WeightInfo::v11_migration_step(len as u32)) } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade_step() -> Result, &'static str> { + let old_queue = old::DeletionQueue::::take().unwrap_or_default(); + + if old_queue.is_empty() { + let len = 10u32; + log::debug!( target: LOG_TARGET, "Injecting {len} entries to deletion queue to test migration"); + fill_old_queue::(len as usize); + return Ok(len.encode()) + } + + Ok((old_queue.len() as u32).encode()) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + let len = ::decode(&mut &state[..]).unwrap(); + let counter = >::get(); + assert_eq!(counter.insert_counter, len); + assert_eq!(counter.delete_counter, len); + Ok(()) + } } From 59acab8c7b0c065d6add8cc896688b599e09023a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 18:06:27 +0200 Subject: [PATCH 55/74] bump sample size --- frame/contracts/src/migration/v9.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index 4d37814d1c4e5..e2a6bd17008dc 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -116,7 +116,7 @@ impl Migrate for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { - let sample: Vec<_> = old::CodeStorage::::iter().take(10).collect(); + let sample: Vec<_> = old::CodeStorage::::iter().take(100).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contract codes", sample.len()); Ok(sample.encode()) From 4a142bcf876188d52dead64fe8bf09572d5bd13f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 18:10:01 +0200 Subject: [PATCH 56/74] fmt --- frame/contracts/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index ed0dcae859d0c..e62e0c7250bf8 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -745,9 +745,12 @@ pub mod pallet { let (result, weight) = Migration::::migrate(weight_limit); match result { - Completed => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), - InProgress { steps_done, .. } if steps_done > 0 => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), - InProgress { .. } => Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::Yes }), + Completed => + Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), + InProgress { steps_done, .. } if steps_done > 0 => + Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::No }), + InProgress { .. } => + Ok(PostDispatchInfo { actual_weight: Some(weight), pays_fee: Pays::Yes }), NoMigrationInProgress | NoMigrationPerformed => { let err: DispatchError = >::NoMigrationPerformed.into(); Err(err.with_weight(T::WeightInfo::migrate())) From 48cf78a3114dd28379cb5eef40b83fd657a9af0d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 18:12:07 +0200 Subject: [PATCH 57/74] wip --- frame/contracts/src/migration/v11.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index a1989b2d6f280..02d6fcfe3ba7a 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -119,7 +119,7 @@ impl Migrate for Migration { let len = ::decode(&mut &state[..]).unwrap(); let counter = >::get(); assert_eq!(counter.insert_counter, len); - assert_eq!(counter.delete_counter, len); + assert_eq!(counter.delete_counter, 0); Ok(()) } } From 14f078c999e12043c3fd5f6eab9b47ad0dc59d93 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 18:19:03 +0200 Subject: [PATCH 58/74] blank line --- frame/contracts/src/migration/v10.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 20192e169de34..6590bb58cd70b 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -149,7 +149,6 @@ impl Migrate for Migration { // Unreserve the existing deposit // Note we can't use repatriate_reserve, because it only works with existing accounts let remaining = T::Currency::unreserve(&account, old_deposit); - if !remaining.is_zero() { log::warn!(target: LOG_TARGET, "Partially unreserved. Remaining {:?} out of {:?} asked", remaining, old_deposit); } From 79b36b955b93202d7aa07c26fab0a46e47f4a43d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 12 May 2023 21:06:06 +0200 Subject: [PATCH 59/74] fix lint --- frame/contracts/src/migration.rs | 66 ++++++++++++++++++---------- frame/contracts/src/migration/v10.rs | 13 +++++- frame/contracts/src/migration/v11.rs | 5 ++- frame/support/src/traits/hooks.rs | 2 +- 4 files changed, 58 insertions(+), 28 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 55ccd41ceacf7..a805dcbd2476a 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -184,7 +184,12 @@ impl Migration { let state = M::pre_upgrade_step(in_progress_version)?; let (status, w) = Self::migrate(Weight::MAX); weight.saturating_accrue(w); - log::info!(target: LOG_TARGET, "{name}: Migration step {:?} weight = {}", in_progress_version, weight); + log::info!( + target: LOG_TARGET, + "{name}: Migration step {:?} weight = {}", + in_progress_version, + weight + ); M::post_upgrade_step(in_progress_version, state)?; if matches!(status, MigrateResult::Completed) { break @@ -204,14 +209,22 @@ impl OnRuntimeUpgrade for Migration { let storage_version = >::on_chain_storage_version(); if storage_version == latest_version { - log::warn!(target: LOG_TARGET, "{name}: No Migration performed storage_version = latest_version = {:?}", &storage_version); + log::warn!( + target: LOG_TARGET, + "{name}: No Migration performed storage_version = latest_version = {:?}", + &storage_version + ); return T::WeightInfo::on_runtime_upgrade_noop() } // In case a migration is already in progress we create the next migration // (if any) right when the current one finishes. if Self::in_progress() { - log::warn!( target: LOG_TARGET, "{name}: Migration already in progress {:?}", &storage_version); + log::warn!( + target: LOG_TARGET, + "{name}: Migration already in progress {:?}", + &storage_version + ); return T::WeightInfo::on_runtime_upgrade_in_progress() } @@ -303,28 +316,33 @@ impl Migration { in_progress_version, ); - let result = match M::steps( - in_progress_version, - cursor_before.as_ref(), - &mut weight_left, - ) { - StepResult::InProgress { cursor, steps_done } => { - *progress = Some(cursor); - MigrateResult::InProgress { steps_done } - }, - StepResult::Completed { steps_done } => { - in_progress_version.put::>(); - if >::current_storage_version() != in_progress_version { - log::info!( target: LOG_TARGET, "{name}: Next migration is {:?},", in_progress_version + 1); - *progress = Some(M::new(in_progress_version + 1)); + let result = + match M::steps(in_progress_version, cursor_before.as_ref(), &mut weight_left) { + StepResult::InProgress { cursor, steps_done } => { + *progress = Some(cursor); MigrateResult::InProgress { steps_done } - } else { - log::info!( target: LOG_TARGET, "{name}: All migrations done. At version {:?},", in_progress_version); - *progress = None; - MigrateResult::Completed - } - }, - }; + }, + StepResult::Completed { steps_done } => { + in_progress_version.put::>(); + if >::current_storage_version() != in_progress_version { + log::info!( + target: LOG_TARGET, + "{name}: Next migration is {:?},", + in_progress_version + 1 + ); + *progress = Some(M::new(in_progress_version + 1)); + MigrateResult::InProgress { steps_done } + } else { + log::info!( + target: LOG_TARGET, + "{name}: All migrations done. At version {:?},", + in_progress_version + ); + *progress = None; + MigrateResult::Completed + } + }, + }; (result, weight_limit.saturating_sub(weight_left)) }) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 6590bb58cd70b..820c3650a5cf9 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -150,7 +150,12 @@ impl Migrate for Migration { // Note we can't use repatriate_reserve, because it only works with existing accounts let remaining = T::Currency::unreserve(&account, old_deposit); if !remaining.is_zero() { - log::warn!(target: LOG_TARGET, "Partially unreserved. Remaining {:?} out of {:?} asked", remaining, old_deposit); + log::warn!( + target: LOG_TARGET, + "Partially unreserved. Remaining {:?} out of {:?} asked", + remaining, + old_deposit + ); } // Attempt to transfer the old deposit to the deposit account. @@ -165,7 +170,11 @@ impl Migrate for Migration { ExistenceRequirement::KeepAlive, ) .map(|_| { - log::debug!( target: LOG_TARGET, "Transferred deposit ({:?}) to deposit account", amount); + log::debug!( + target: LOG_TARGET, + "Transferred deposit ({:?}) to deposit account", + amount + ); amount }) // If it fails we fallback to minting the ED. diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 02d6fcfe3ba7a..1df2502bfe84a 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -106,7 +106,10 @@ impl Migrate for Migration { if old_queue.is_empty() { let len = 10u32; - log::debug!( target: LOG_TARGET, "Injecting {len} entries to deletion queue to test migration"); + log::debug!( + target: LOG_TARGET, + "Injecting {len} entries to deletion queue to test migration" + ); fill_old_queue::(len as usize); return Ok(len.encode()) } diff --git a/frame/support/src/traits/hooks.rs b/frame/support/src/traits/hooks.rs index a4c6776572fac..bcf1b3d573ec2 100644 --- a/frame/support/src/traits/hooks.rs +++ b/frame/support/src/traits/hooks.rs @@ -229,7 +229,7 @@ impl OnRuntimeUpgrade for Tuple { ); }); - return Err("Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!") + return Err("Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!"); } Ok(weight) From d954437060484998cba146b1f8bfcc01c32e8828 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 09:48:23 +0200 Subject: [PATCH 60/74] fix rustdoc job lint --- frame/contracts/src/migration/v10.rs | 2 +- frame/contracts/src/migration/v11.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 820c3650a5cf9..42645733b17ff 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -16,7 +16,7 @@ // limitations under the License. //! Don't rely on reserved balances keeping an account alive -//! see https://github.com/paritytech/substrate/pull/13370 +//! See . use crate::{ address::AddressGenerator, diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 1df2502bfe84a..f4c74b4329630 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -16,7 +16,7 @@ // limitations under the License. //! Overflowing bounded DeletionQueue. -//! See https://github.com/paritytech/substrate/pull/13702 +//! See . use crate::{ migration::{IsFinished, Migrate}, From 9782bd9f744e74d76d9ffd24689f481793bf99c5 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 16:32:41 +0200 Subject: [PATCH 61/74] PR comment do not use dangerous into() --- frame/contracts/primitives/src/lib.rs | 15 -------------- frame/contracts/src/lib.rs | 29 ++++++++++++++++++--------- frame/contracts/src/migration.rs | 2 +- frame/contracts/src/migration/v10.rs | 2 +- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/frame/contracts/primitives/src/lib.rs b/frame/contracts/primitives/src/lib.rs index 23cca7e8491d5..3f830ca92486d 100644 --- a/frame/contracts/primitives/src/lib.rs +++ b/frame/contracts/primitives/src/lib.rs @@ -109,21 +109,6 @@ pub enum ContractAccessError { MigrationInProgress, } -impl From - for ContractResult, B, EventRecord> -{ - fn from(error: DispatchError) -> Self { - ContractResult { - gas_consumed: Zero::zero(), - gas_required: Zero::zero(), - storage_deposit: Default::default(), - debug_message: Vec::new(), - result: Err(error), - events: None, - } - } -} - bitflags! { /// Flags used by a contract to customize exit behaviour. #[derive(Encode, Decode, TypeInfo)] diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e62e0c7250bf8..5c460ec53cb81 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -123,12 +123,12 @@ use frame_support::{ use frame_system::{ensure_signed, pallet_prelude::OriginFor, EventRecord, Pallet as System}; use pallet_contracts_primitives::{ Code, CodeUploadResult, CodeUploadReturnValue, ContractAccessError, ContractExecResult, - ContractInstantiateResult, ExecReturnValue, GetStorageResult, InstantiateReturnValue, - StorageDeposit, + ContractInstantiateResult, ContractResult, ExecReturnValue, GetStorageResult, + InstantiateReturnValue, StorageDeposit, }; use scale_info::TypeInfo; use smallvec::Array; -use sp_runtime::traits::{Convert, Hash, Saturating, StaticLookup}; +use sp_runtime::traits::{Convert, Hash, Saturating, StaticLookup, Zero}; use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; pub use crate::{ @@ -1268,6 +1268,21 @@ impl Invokable for InstantiateInput { } } +macro_rules! ensure_no_migration_in_progress { + () => { + if Migration::::in_progress() { + return ContractResult { + gas_consumed: Zero::zero(), + gas_required: Zero::zero(), + storage_deposit: Default::default(), + debug_message: Vec::new(), + result: Err(Error::::MigrationInProgress.into()), + events: None, + } + } + }; +} + impl Pallet { /// Perform a call to a specified contract. /// @@ -1292,9 +1307,7 @@ impl Pallet { collect_events: CollectEvents, determinism: Determinism, ) -> ContractExecResult, EventRecordOf> { - if let Err(err) = Migration::::ensure_migrated() { - return err.into() - } + ensure_no_migration_in_progress!(); let mut debug_message = if matches!(debug, DebugInfo::UnsafeDebug) { Some(DebugBufferVec::::default()) @@ -1352,9 +1365,7 @@ impl Pallet { debug: DebugInfo, collect_events: CollectEvents, ) -> ContractInstantiateResult, EventRecordOf> { - if let Err(err) = Migration::::ensure_migrated() { - return err.into() - } + ensure_no_migration_in_progress!(); let mut debug_message = if debug == DebugInfo::UnsafeDebug { Some(DebugBufferVec::::default()) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index a805dcbd2476a..0e2461c03a309 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -356,7 +356,7 @@ impl Migration { } } - fn in_progress() -> bool { + pub(crate) fn in_progress() -> bool { MigrationInProgress::::exists() } } diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 42645733b17ff..2fb8dc4585f3f 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -159,10 +159,10 @@ impl Migrate for Migration { } // Attempt to transfer the old deposit to the deposit account. - // We just want to leave the minimum balance on the contract account let amount = old_deposit .saturating_sub(min_balance) .min(T::Currency::reducible_balance(&account, Preserve, Polite)); + let new_deposit = T::Currency::transfer( &account, &deposit_account, From 82adfd847b911fae0241250173eb8be215a6db94 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 16:50:48 +0200 Subject: [PATCH 62/74] Ad macros for updating mod visibility --- frame/contracts/src/migration.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 0e2461c03a309..9a5733cd04440 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -15,10 +15,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub mod v10; -pub mod v11; -pub mod v9; +//! Migration framework for pallets. + +/// Macro to include all migration modules. +/// We only want to make these modules public when `try-runtime` is +/// enabled, so we can use them in pre and post upgrade try-runtime methods. +macro_rules! use_modules { + ($($module:ident),*) => { + $( + #[cfg(feature = "try-runtime")] + pub mod $module; + #[cfg(not(feature = "try-runtime"))] + mod $module; + )* + }; +} +use_modules!(v9, v10, v11); use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; use codec::{Codec, Decode}; use frame_support::{ From 25b2ec6b86357bc082c94bc2ccb70c40b13281a3 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 17:48:31 +0200 Subject: [PATCH 63/74] Add doc --- frame/contracts/src/migration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 9a5733cd04440..e96cdc6ca04a8 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -52,6 +52,7 @@ fn invalid_version(version: StorageVersion) -> ! { panic!("Required migration {version:?} not supported by this runtime. This is a bug."); } +/// The cursor used to store the state of the current migration step. pub type Cursor = BoundedVec>; // In benchmark and tests we use noop migrations, to test and bench the migration framework itself. From 453489f0fc37706719a0ee920bfe19fdd846e96d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 17:48:46 +0200 Subject: [PATCH 64/74] Add max_weight to integrity_test --- frame/contracts/src/migration.rs | 43 ++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index e96cdc6ca04a8..6e9e5766a8d83 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -81,6 +81,29 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { /// Returns whether the migration is finished and the weight consumed. fn step(&mut self) -> (IsFinished, Weight); + /// Verify that the migration step fits into `Cursor`, and that `max_step_weight` is not greater + /// than `max_block_weight`. + fn integrity_test(max_block_weight: Weight) { + if Self::max_step_weight().any_gt(max_block_weight) { + panic!( + "Invalid max_step_weight for Migration {}. Value should be lower than {}", + Self::VERSION, + max_block_weight + ); + } + + let len = ::max_encoded_len(); + let max = Cursor::bound(); + if len > max { + panic!( + "Migration {} has size {} which is bigger than the maximum of {}", + Self::VERSION, + len, + max, + ); + } + } + /// Execute some pre-checks prior to running the first step of this migration. #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, &'static str> { @@ -155,8 +178,9 @@ pub trait MigrateSequence: private::Sealed { /// Execute the migration step until the weight limit is reached. fn steps(version: StorageVersion, cursor: &[u8], weight_left: &mut Weight) -> StepResult; - /// Verify that each migration's cursor fits into `Cursor`. - fn integrity_test(); + /// Verify that the migration step fits into `Cursor`, and that `max_step_weight` is not greater + /// than `max_block_weight`. + fn integrity_test(max_block_weight: Weight); /// Returns whether migrating from `in_storage` to `target` is supported. /// @@ -301,7 +325,8 @@ pub enum StepResult { impl Migration { /// Verify that each migration's step of the MigrateSequence fits into `Cursor`. pub(crate) fn integrity_test() { - M::integrity_test() + let max_weight = ::BlockWeights::get().max_block; + M::integrity_test(max_weight) } /// Migrate @@ -456,18 +481,10 @@ impl MigrateSequence for Tuple { invalid_version(version) } - fn integrity_test() { + fn integrity_test(max_block_weight: Weight) { for_tuples!( #( - let len = ::max_encoded_len(); - let max = Cursor::bound(); - if len > max { - let version = Tuple::VERSION; - panic!( - "Migration {} has size {} which is bigger than the maximum of {}", - version, len, max, - ); - } + Tuple::integrity_test(max_block_weight); )* ); } From 1ceb5e0b7874530b183e8b70d9ae6a092bc34556 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 15 May 2023 21:32:23 +0200 Subject: [PATCH 65/74] fix compilation --- frame/contracts/src/migration.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 6e9e5766a8d83..946f848c3892a 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -18,14 +18,14 @@ //! Migration framework for pallets. /// Macro to include all migration modules. -/// We only want to make these modules public when `try-runtime` is -/// enabled, so we can use them in pre and post upgrade try-runtime methods. +/// We only want to make these modules public when `runtime-benchmarks` is +/// enabled, so we can access migration code in benchmarks. macro_rules! use_modules { ($($module:ident),*) => { $( - #[cfg(feature = "try-runtime")] + #[cfg(feature = "runtime-benchmarks")] pub mod $module; - #[cfg(not(feature = "try-runtime"))] + #[cfg(not(feature = "runtime-benchmarks"))] mod $module; )* }; From ab445733ddb142fcceaf5e9def19c5b091f38b44 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 16 May 2023 11:50:36 +0200 Subject: [PATCH 66/74] Add no migration tests --- frame/contracts/src/tests.rs | 59 +++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index ab9619fb2edba..44b86e446be9f 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -28,7 +28,8 @@ use crate::{ wasm::{Determinism, PrefabWasmModule, ReturnCode as RuntimeReturnCode}, weights::WeightInfo, BalanceOf, Code, CodeStorage, CollectEvents, Config, ContractInfo, ContractInfoOf, DebugInfo, - DefaultAddressGenerator, DeletionQueueCounter, Error, Origin, Pallet, Schedule, + DefaultAddressGenerator, DeletionQueueCounter, Error, MigrationInProgress, Origin, Pallet, + Schedule, }; use assert_matches::assert_matches; use codec::Encode; @@ -557,6 +558,62 @@ fn calling_plain_account_fails() { }); } +#[test] +fn migration_in_progress_works() { + let (wasm, code_hash) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().existential_deposit(1).build().execute_with(|| { + let _ = Balances::deposit_creating(&ALICE, 1_000_000); + MigrationInProgress::::set(Some(Default::default())); + + assert_err!( + Contracts::upload_code( + RuntimeOrigin::signed(ALICE), + vec![], + None, + Determinism::Enforced + ), + Error::::MigrationInProgress, + ); + assert_err!( + Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash.clone()), + Error::::MigrationInProgress, + ); + assert_err!( + Contracts::set_code(RuntimeOrigin::signed(ALICE), BOB.clone(), code_hash.clone()), + Error::::MigrationInProgress, + ); + assert_err_ignore_postinfo!( + Contracts::call(RuntimeOrigin::signed(ALICE), BOB, 0, GAS_LIMIT, None, vec![],), + Error::::MigrationInProgress, + ); + assert_err_ignore_postinfo!( + Contracts::instantiate_with_code( + RuntimeOrigin::signed(ALICE), + 100_000, + GAS_LIMIT, + None, + wasm, + vec![], + vec![], + ), + Error::::MigrationInProgress, + ); + assert_err_ignore_postinfo!( + Contracts::instantiate( + RuntimeOrigin::signed(ALICE), + 100_000, + GAS_LIMIT, + None, + code_hash, + vec![], + vec![], + ), + Error::::MigrationInProgress, + ); + }); +} + #[test] fn instantiate_and_call_and_deposit_event() { let (wasm, code_hash) = compile_module::("event_and_return_on_deploy").unwrap(); From b8ee0196fb5392216ba06b40f857d53c7e087f05 Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Tue, 16 May 2023 11:16:49 +0000 Subject: [PATCH 67/74] ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts --- frame/contracts/src/weights.rs | 2557 +++++++++++++++++++------------- 1 file changed, 1489 insertions(+), 1068 deletions(-) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 24197da378e90..0d2a804152048 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-05-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -53,6 +53,14 @@ pub trait WeightInfo { fn on_process_deletion_queue_batch() -> Weight; fn on_initialize_per_trie_key(k: u32, ) -> Weight; fn reinstrument(c: u32, ) -> Weight; + fn v9_migration_step(c: u32, ) -> Weight; + fn v10_migration_step() -> Weight; + fn v11_migration_step(k: u32, ) -> Weight; + fn migration_noop() -> Weight; + fn migrate() -> Weight; + fn on_runtime_upgrade_noop() -> Weight; + fn on_runtime_upgrade_in_progress() -> Weight; + fn on_runtime_upgrade() -> Weight; fn call_with_code_per_byte(c: u32, ) -> Weight; fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight; fn instantiate(i: u32, s: u32, ) -> Weight; @@ -169,15 +177,6 @@ pub trait WeightInfo { fn instr_i64shru(r: u32, ) -> Weight; fn instr_i64rotl(r: u32, ) -> Weight; fn instr_i64rotr(r: u32, ) -> Weight; - fn bump_storage_version() -> Weight { Weight::zero() } - fn migration_noop() -> Weight { Weight::zero() } - fn migrate() -> Weight { Weight::zero() } - fn v9_migration_step(_k: u32) -> Weight { Weight::zero() } - fn v10_migration_step() -> Weight { Weight::zero() } - fn v11_migration_step(_k: u32) -> Weight { Weight::zero() } - fn on_runtime_upgrade() -> Weight { Weight::zero() } - fn on_runtime_upgrade_noop() -> Weight { Weight::zero() } - fn on_runtime_upgrade_in_progress() -> Weight { Weight::zero() } } /// Weights for pallet_contracts using the Substrate node and recommended hardware. @@ -189,8 +188,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_627_000 picoseconds. - Weight::from_parts(2_748_000, 1594) + // Minimum execution time: 2_630_000 picoseconds. + Weight::from_parts(2_778_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -200,10 +199,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_607_000 picoseconds. - Weight::from_parts(8_026_118, 478) - // Standard Error: 1_323 - .saturating_add(Weight::from_parts(980_583, 0).saturating_mul(k.into())) + // Minimum execution time: 13_453_000 picoseconds. + Weight::from_parts(10_904_078, 478) + // Standard Error: 931 + .saturating_add(Weight::from_parts(982_122, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -219,14 +218,121 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_563_000 picoseconds. - Weight::from_parts(22_292_544, 3708) - // Standard Error: 60 - .saturating_add(Weight::from_parts(54_541, 0).saturating_mul(c.into())) + // Minimum execution time: 30_972_000 picoseconds. + Weight::from_parts(31_129_287, 3708) + // Standard Error: 52 + .saturating_add(Weight::from_parts(54_996, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts CodeStorage (r:2 w:1) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// The range of component `c` is `[0, 61717]`. + fn v9_migration_step(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `178 + c * (1 ±0)` + // Estimated: `6114 + c * (1 ±0)` + // Minimum execution time: 9_696_000 picoseconds. + Weight::from_parts(10_697_026, 6114) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_307, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: Contracts ContractInfoOf (r:2 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + /// Storage: System Account (r:1 w:0) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) + fn v10_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `544` + // Estimated: `6484` + // Minimum execution time: 18_132_000 picoseconds. + Weight::from_parts(18_842_000, 6484) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Contracts DeletionQueue (r:1 w:1025) + /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: Contracts DeletionQueueCounter (r:0 w:1) + /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// The range of component `k` is `[0, 1024]`. + fn v11_migration_step(k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `138 + k * (1 ±0)` + // Estimated: `3602 + k * (1 ±0)` + // Minimum execution time: 3_952_000 picoseconds. + Weight::from_parts(4_129_000, 3602) + // Standard Error: 1_521 + .saturating_add(Weight::from_parts(1_013_657, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn migration_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 3_528_000 picoseconds. + Weight::from_parts(3_641_000, 1594) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + fn migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `133` + // Estimated: `3598` + // Minimum execution time: 13_433_000 picoseconds. + Weight::from_parts(13_710_000, 3598) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + fn on_runtime_upgrade_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 5_502_000 picoseconds. + Weight::from_parts(5_689_000, 3574) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn on_runtime_upgrade_in_progress() -> Weight { + // Proof Size summary in bytes: + // Measured: `134` + // Estimated: `3599` + // Minimum execution time: 7_846_000 picoseconds. + Weight::from_parts(8_078_000, 3599) + .saturating_add(T::DbWeight::get().reads(2_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn on_runtime_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_602_000, 3574) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -242,14 +348,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 268_884_000 picoseconds. - Weight::from_parts(277_799_331, 6656) - // Standard Error: 23 - .saturating_add(Weight::from_parts(37_876, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 280_993_000 picoseconds. + Weight::from_parts(289_622_441, 6656) + // Standard Error: 26 + .saturating_add(Weight::from_parts(38_061, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -273,17 +381,19 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_159_921_000 picoseconds. - Weight::from_parts(594_826_134, 8659) - // Standard Error: 290 - .saturating_add(Weight::from_parts(106_471, 0).saturating_mul(c.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_160, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_417, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Minimum execution time: 3_136_130_000 picoseconds. + Weight::from_parts(568_808_049, 8659) + // Standard Error: 288 + .saturating_add(Weight::from_parts(108_649, 0).saturating_mul(c.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_103, 0).saturating_mul(i.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_502, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -304,15 +414,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_653_811_000 picoseconds. - Weight::from_parts(296_038_081, 6408) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_461, 0).saturating_mul(i.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_430, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Minimum execution time: 1_655_107_000 picoseconds. + Weight::from_parts(266_843_437, 6408) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_463, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_458, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -327,11 +439,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 195_916_000 picoseconds. - Weight::from_parts(196_706_000, 6699) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 197_684_000 picoseconds. + Weight::from_parts(199_222_000, 6699) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -345,13 +459,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 251_137_000 picoseconds. - Weight::from_parts(252_985_435, 3574) - // Standard Error: 88 - .saturating_add(Weight::from_parts(108_141, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Minimum execution time: 254_766_000 picoseconds. + Weight::from_parts(247_865_224, 3574) + // Standard Error: 146 + .saturating_add(Weight::from_parts(108_830, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -364,11 +480,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_521_000 picoseconds. - Weight::from_parts(34_039_000, 3720) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Minimum execution time: 36_038_000 picoseconds. + Weight::from_parts(36_503_000, 3720) + .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:2 w:2) @@ -379,11 +497,13 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_477_000 picoseconds. - Weight::from_parts(33_890_000, 8985) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 35_312_000 picoseconds. + Weight::from_parts(35_852_000, 8985) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -399,14 +519,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 239_374_000 picoseconds. - Weight::from_parts(246_017_099, 6722) - // Standard Error: 539 - .saturating_add(Weight::from_parts(323_826, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_668_000 picoseconds. + Weight::from_parts(256_167_627, 6722) + // Standard Error: 2_447 + .saturating_add(Weight::from_parts(328_424, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -422,15 +544,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 240_656_000 picoseconds. - Weight::from_parts(87_361_934, 6743) - // Standard Error: 5_912 - .saturating_add(Weight::from_parts(3_329_840, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_353_000 picoseconds. + Weight::from_parts(82_743_116, 6743) + // Standard Error: 6_271 + .saturating_add(Weight::from_parts(3_331_316, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -446,15 +570,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 243_026_000 picoseconds. - Weight::from_parts(76_953_007, 6747) - // Standard Error: 6_640 - .saturating_add(Weight::from_parts(4_132_521, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 243_370_000 picoseconds. + Weight::from_parts(77_198_453, 6747) + // Standard Error: 6_968 + .saturating_add(Weight::from_parts(4_162_946, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -470,14 +596,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 242_736_000 picoseconds. - Weight::from_parts(243_136_007, 6730) - // Standard Error: 912 - .saturating_add(Weight::from_parts(414_717, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 244_083_000 picoseconds. + Weight::from_parts(239_899_316, 6730) + // Standard Error: 5_254 + .saturating_add(Weight::from_parts(423_863, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -493,14 +621,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 240_130_000 picoseconds. - Weight::from_parts(244_517_187, 6723) - // Standard Error: 384 - .saturating_add(Weight::from_parts(167_431, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_835_000 picoseconds. + Weight::from_parts(247_929_454, 6723) + // Standard Error: 2_309 + .saturating_add(Weight::from_parts(169_642, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -514,14 +644,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `668 + r * (3 ±0)` // Estimated: `6608 + r * (3 ±0)` - // Minimum execution time: 228_022_000 picoseconds. - Weight::from_parts(232_385_198, 6608) - // Standard Error: 300 - .saturating_add(Weight::from_parts(145_143, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5_u64)) + // Minimum execution time: 229_091_000 picoseconds. + Weight::from_parts(235_369_797, 6608) + // Standard Error: 283 + .saturating_add(Weight::from_parts(146_485, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -537,14 +669,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 240_250_000 picoseconds. - Weight::from_parts(240_268_824, 6724) - // Standard Error: 945 - .saturating_add(Weight::from_parts(329_577, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_638_000 picoseconds. + Weight::from_parts(245_890_126, 6724) + // Standard Error: 508 + .saturating_add(Weight::from_parts(323_232, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -560,14 +694,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6719 + r * (6 ±0)` - // Minimum execution time: 242_370_000 picoseconds. - Weight::from_parts(242_389_500, 6719) - // Standard Error: 712 - .saturating_add(Weight::from_parts(518_380, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_740_000 picoseconds. + Weight::from_parts(244_490_855, 6719) + // Standard Error: 1_872 + .saturating_add(Weight::from_parts(543_651, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:2 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -583,14 +719,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 238_563_000 picoseconds. - Weight::from_parts(253_511_314, 6846) - // Standard Error: 1_571 - .saturating_add(Weight::from_parts(1_454_089, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 241_787_000 picoseconds. + Weight::from_parts(243_819_464, 6846) + // Standard Error: 5_017 + .saturating_add(Weight::from_parts(1_496_444, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -606,14 +744,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 242_995_000 picoseconds. - Weight::from_parts(240_061_456, 6741) - // Standard Error: 2_650 - .saturating_add(Weight::from_parts(326_813, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 243_498_000 picoseconds. + Weight::from_parts(251_019_668, 6741) + // Standard Error: 1_479 + .saturating_add(Weight::from_parts(318_979, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -629,14 +769,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 241_342_000 picoseconds. - Weight::from_parts(240_875_314, 6739) - // Standard Error: 669 - .saturating_add(Weight::from_parts(324_519, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_572_000 picoseconds. + Weight::from_parts(246_453_396, 6739) + // Standard Error: 978 + .saturating_add(Weight::from_parts(320_095, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -652,14 +794,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 238_954_000 picoseconds. - Weight::from_parts(242_269_896, 6737) - // Standard Error: 1_453 - .saturating_add(Weight::from_parts(317_998, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_872_000 picoseconds. + Weight::from_parts(257_272_904, 6737) + // Standard Error: 4_146 + .saturating_add(Weight::from_parts(314_645, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -675,14 +819,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 240_935_000 picoseconds. - Weight::from_parts(242_938_271, 6723) - // Standard Error: 792 - .saturating_add(Weight::from_parts(316_782, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_139_000 picoseconds. + Weight::from_parts(244_667_764, 6723) + // Standard Error: 580 + .saturating_add(Weight::from_parts(323_005, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -700,14 +846,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `852 + r * (14 ±0)` // Estimated: `6785 + r * (14 ±0)` - // Minimum execution time: 240_142_000 picoseconds. - Weight::from_parts(241_386_730, 6785) - // Standard Error: 2_116 - .saturating_add(Weight::from_parts(1_387_202, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 242_370_000 picoseconds. + Weight::from_parts(247_330_421, 6785) + // Standard Error: 1_832 + .saturating_add(Weight::from_parts(1_396_737, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -723,14 +871,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 165_617_000 picoseconds. - Weight::from_parts(170_794_127, 6687) - // Standard Error: 209 - .saturating_add(Weight::from_parts(127_931, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 167_583_000 picoseconds. + Weight::from_parts(173_694_884, 6687) + // Standard Error: 2_880 + .saturating_add(Weight::from_parts(133_811, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -746,14 +896,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 238_832_000 picoseconds. - Weight::from_parts(237_110_694, 6724) - // Standard Error: 539 - .saturating_add(Weight::from_parts(280_610, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_932_000 picoseconds. + Weight::from_parts(246_356_239, 6724) + // Standard Error: 479 + .saturating_add(Weight::from_parts(268_456, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -769,13 +921,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 241_070_000 picoseconds. - Weight::from_parts(242_162_279, 6724) + // Minimum execution time: 245_611_000 picoseconds. + Weight::from_parts(246_102_856, 6724) // Standard Error: 1 - .saturating_add(Weight::from_parts(595, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(596, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -791,14 +945,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 236_337_000 picoseconds. - Weight::from_parts(238_883_828, 6708) - // Standard Error: 188_978 - .saturating_add(Weight::from_parts(926_671, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 238_764_000 picoseconds. + Weight::from_parts(241_225_075, 6708) + // Standard Error: 196_899 + .saturating_add(Weight::from_parts(3_361_624, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -814,13 +970,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 239_103_000 picoseconds. - Weight::from_parts(240_382_910, 6731) + // Minimum execution time: 243_075_000 picoseconds. + Weight::from_parts(244_139_227, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(181, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -842,16 +1000,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 238_739_000 picoseconds. - Weight::from_parts(241_041_330, 6750) - // Standard Error: 176_820 - .saturating_add(Weight::from_parts(115_332_869, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_330_000 picoseconds. + Weight::from_parts(244_187_673, 6750) + // Standard Error: 473_741 + .saturating_add(Weight::from_parts(117_358_926, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 7781).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -869,14 +1029,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 240_888_000 picoseconds. - Weight::from_parts(259_901_113, 6769) - // Standard Error: 5_935 - .saturating_add(Weight::from_parts(1_764_269, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 243_298_000 picoseconds. + Weight::from_parts(246_393_253, 6769) + // Standard Error: 4_125 + .saturating_add(Weight::from_parts(1_876_317, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -892,14 +1054,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 237_478_000 picoseconds. - Weight::from_parts(264_915_436, 6723) - // Standard Error: 4_644 - .saturating_add(Weight::from_parts(3_452_918, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 240_477_000 picoseconds. + Weight::from_parts(252_579_330, 6723) + // Standard Error: 1_993 + .saturating_add(Weight::from_parts(3_510_388, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -916,18 +1080,20 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 255_720_000 picoseconds. - Weight::from_parts(247_945_758, 6744) - // Standard Error: 73_390 - .saturating_add(Weight::from_parts(2_483_239, 0).saturating_mul(t.into())) - // Standard Error: 20 - .saturating_add(Weight::from_parts(756, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 259_029_000 picoseconds. + Weight::from_parts(252_262_484, 6744) + // Standard Error: 35_710 + .saturating_add(Weight::from_parts(2_236_764, 0).saturating_mul(t.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(648, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -943,14 +1109,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 172_214_000 picoseconds. - Weight::from_parts(177_306_567, 6721) - // Standard Error: 839 - .saturating_add(Weight::from_parts(230_558, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 170_544_000 picoseconds. + Weight::from_parts(174_555_287, 6721) + // Standard Error: 320 + .saturating_add(Weight::from_parts(233_911, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -966,11 +1134,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 354_105_000 picoseconds. - Weight::from_parts(360_649_854, 131670) - // Standard Error: 2 - .saturating_add(Weight::from_parts(737, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 357_160_000 picoseconds. + Weight::from_parts(359_930_328, 131670) + // Standard Error: 1 + .saturating_add(Weight::from_parts(738, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -980,11 +1148,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 239_637_000 picoseconds. - Weight::from_parts(136_431_436, 843) - // Standard Error: 10_238 - .saturating_add(Weight::from_parts(6_070_221, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_846_000 picoseconds. + Weight::from_parts(135_611_732, 843) + // Standard Error: 10_708 + .saturating_add(Weight::from_parts(6_146_995, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -997,11 +1165,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 256_198_000 picoseconds. - Weight::from_parts(289_972_802, 1280) - // Standard Error: 54 - .saturating_add(Weight::from_parts(438, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Minimum execution time: 258_885_000 picoseconds. + Weight::from_parts(292_699_689, 1280) + // Standard Error: 47 + .saturating_add(Weight::from_parts(433, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -1011,11 +1179,9 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 255_519_000 picoseconds. - Weight::from_parts(257_668_217, 1167) - // Standard Error: 19 - .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 258_297_000 picoseconds. + Weight::from_parts(262_380_805, 1167) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1026,11 +1192,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 239_461_000 picoseconds. - Weight::from_parts(131_630_528, 845) - // Standard Error: 10_483 - .saturating_add(Weight::from_parts(5_910_066, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_945_000 picoseconds. + Weight::from_parts(126_721_339, 845) + // Standard Error: 11_891 + .saturating_add(Weight::from_parts(6_134_319, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -1043,11 +1209,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 254_904_000 picoseconds. - Weight::from_parts(261_213_399, 1163) - // Standard Error: 178 - .saturating_add(Weight::from_parts(125, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 259_872_000 picoseconds. + Weight::from_parts(259_910_037, 1163) + // Standard Error: 142 + .saturating_add(Weight::from_parts(629, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1058,11 +1224,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 239_995_000 picoseconds. - Weight::from_parts(151_326_508, 840) - // Standard Error: 8_960 - .saturating_add(Weight::from_parts(4_937_728, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 245_005_000 picoseconds. + Weight::from_parts(155_891_939, 840) + // Standard Error: 9_938 + .saturating_add(Weight::from_parts(4_992_231, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) @@ -1074,11 +1240,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 254_515_000 picoseconds. - Weight::from_parts(256_728_817, 1179) - // Standard Error: 22 - .saturating_add(Weight::from_parts(706, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 257_926_000 picoseconds. + Weight::from_parts(261_438_340, 1179) + // Standard Error: 24 + .saturating_add(Weight::from_parts(659, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1089,11 +1255,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 240_601_000 picoseconds. - Weight::from_parts(154_476_561, 857) - // Standard Error: 8_872 - .saturating_add(Weight::from_parts(4_805_043, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 244_392_000 picoseconds. + Weight::from_parts(156_243_434, 857) + // Standard Error: 8_716 + .saturating_add(Weight::from_parts(4_813_682, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) @@ -1105,9 +1271,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 253_654_000 picoseconds. - Weight::from_parts(257_288_586, 1166) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 255_731_000 picoseconds. + Weight::from_parts(258_937_245, 1166) + // Standard Error: 26 + .saturating_add(Weight::from_parts(61, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1118,11 +1286,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 239_869_000 picoseconds. - Weight::from_parts(135_258_204, 836) - // Standard Error: 10_378 - .saturating_add(Weight::from_parts(6_144_770, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_902_000 picoseconds. + Weight::from_parts(140_670_703, 836) + // Standard Error: 10_042 + .saturating_add(Weight::from_parts(6_206_728, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -1135,14 +1303,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 258_153_000 picoseconds. - Weight::from_parts(260_068_186, 1180) - // Standard Error: 25 - .saturating_add(Weight::from_parts(744, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 258_425_000 picoseconds. + Weight::from_parts(266_011_498, 1180) + // Standard Error: 137 + .saturating_add(Weight::from_parts(383, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1601) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1158,16 +1328,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 243_189_000 picoseconds. - Weight::from_parts(243_465_000, 7270) - // Standard Error: 30_961 - .saturating_add(Weight::from_parts(35_376_623, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 243_533_000 picoseconds. + Weight::from_parts(67_275_548, 7270) + // Standard Error: 29_687 + .saturating_add(Weight::from_parts(36_086_917, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -1183,16 +1355,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1140 + r * (276 ±0)` // Estimated: `9332 + r * (2752 ±0)` - // Minimum execution time: 243_656_000 picoseconds. - Weight::from_parts(244_221_000, 9332) - // Standard Error: 69_762 - .saturating_add(Weight::from_parts(216_905_619, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Minimum execution time: 246_206_000 picoseconds. + Weight::from_parts(246_946_000, 9332) + // Standard Error: 74_648 + .saturating_add(Weight::from_parts(217_429_651, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1208,16 +1382,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 242_632_000 picoseconds. - Weight::from_parts(243_068_000, 6727) - // Standard Error: 126_218 - .saturating_add(Weight::from_parts(213_096_291, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 245_170_000 picoseconds. + Weight::from_parts(245_460_000, 6727) + // Standard Error: 110_429 + .saturating_add(Weight::from_parts(212_316_013, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2572).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:3 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -1234,18 +1410,20 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `12044 + t * (5154 ±0)` - // Minimum execution time: 421_691_000 picoseconds. - Weight::from_parts(394_587_369, 12044) - // Standard Error: 1_104_014 - .saturating_add(Weight::from_parts(30_461_758, 0).saturating_mul(t.into())) + // Minimum execution time: 424_523_000 picoseconds. + Weight::from_parts(392_267_161, 12044) + // Standard Error: 956_686 + .saturating_add(Weight::from_parts(36_399_297, 0).saturating_mul(t.into())) // Standard Error: 1 - .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(Weight::from_parts(600, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1602) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -1265,16 +1443,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1322 + r * (254 ±0)` // Estimated: `7146 + r * (5205 ±0)` - // Minimum execution time: 581_252_000 picoseconds. - Weight::from_parts(582_275_000, 7146) - // Standard Error: 279_771 - .saturating_add(Weight::from_parts(349_770_967, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(8_u64)) + // Minimum execution time: 582_323_000 picoseconds. + Weight::from_parts(584_276_000, 7146) + // Standard Error: 280_418 + .saturating_add(Weight::from_parts(349_510_405, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 5205).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -1296,20 +1476,22 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_623_241_000 picoseconds. - Weight::from_parts(317_076_173, 9492) - // Standard Error: 4_549_416 - .saturating_add(Weight::from_parts(125_360_446, 0).saturating_mul(t.into())) + // Minimum execution time: 1_627_228_000 picoseconds. + Weight::from_parts(358_838_236, 9492) + // Standard Error: 4_785_521 + .saturating_add(Weight::from_parts(114_920_186, 0).saturating_mul(t.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_163, 0).saturating_mul(i.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_352, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(13_u64)) + .saturating_add(Weight::from_parts(1_336, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(14_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2634).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1325,14 +1507,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 238_262_000 picoseconds. - Weight::from_parts(243_093_288, 6718) - // Standard Error: 870 - .saturating_add(Weight::from_parts(573_939, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_228_000 picoseconds. + Weight::from_parts(245_525_858, 6718) + // Standard Error: 1_774 + .saturating_add(Weight::from_parts(578_001, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1348,13 +1532,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 239_888_000 picoseconds. - Weight::from_parts(242_849_333, 6725) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_949, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_876_000 picoseconds. + Weight::from_parts(240_629_797, 6725) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_947, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1370,14 +1556,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 237_288_000 picoseconds. - Weight::from_parts(242_510_631, 6721) - // Standard Error: 977 - .saturating_add(Weight::from_parts(742_726, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_345_000 picoseconds. + Weight::from_parts(245_512_118, 6721) + // Standard Error: 771 + .saturating_add(Weight::from_parts(735_528, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1393,13 +1581,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 240_006_000 picoseconds. - Weight::from_parts(233_802_510, 6729) + // Minimum execution time: 242_741_000 picoseconds. + Weight::from_parts(232_209_398, 6729) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_161, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(3_099, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1415,14 +1605,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 237_532_000 picoseconds. - Weight::from_parts(243_087_565, 6724) - // Standard Error: 656 - .saturating_add(Weight::from_parts(417_850, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 239_254_000 picoseconds. + Weight::from_parts(244_250_047, 6724) + // Standard Error: 2_223 + .saturating_add(Weight::from_parts(421_533, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1438,13 +1630,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 241_429_000 picoseconds. - Weight::from_parts(233_528_258, 6733) - // Standard Error: 1 - .saturating_add(Weight::from_parts(913, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 240_848_000 picoseconds. + Weight::from_parts(239_049_162, 6733) + // Standard Error: 3 + .saturating_add(Weight::from_parts(914, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1460,14 +1654,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 237_622_000 picoseconds. - Weight::from_parts(240_476_401, 6725) - // Standard Error: 795 - .saturating_add(Weight::from_parts(416_869, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 240_496_000 picoseconds. + Weight::from_parts(245_279_278, 6725) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(414_108, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1483,13 +1679,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 241_134_000 picoseconds. - Weight::from_parts(234_043_271, 6727) - // Standard Error: 3 - .saturating_add(Weight::from_parts(919, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_529_000 picoseconds. + Weight::from_parts(234_715_148, 6727) + // Standard Error: 1 + .saturating_add(Weight::from_parts(914, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1505,14 +1703,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` // Estimated: `6849 + n * (1 ±0)` - // Minimum execution time: 292_699_000 picoseconds. - Weight::from_parts(301_523_608, 6849) - // Standard Error: 14 - .saturating_add(Weight::from_parts(4_676, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 294_982_000 picoseconds. + Weight::from_parts(299_613_855, 6849) + // Standard Error: 7 + .saturating_add(Weight::from_parts(4_668, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1526,16 +1726,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `727 + r * (112 ±0)` + // Measured: `726 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 241_126_000 picoseconds. - Weight::from_parts(248_796_458, 6666) - // Standard Error: 21_501 - .saturating_add(Weight::from_parts(48_091_265, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_583_000 picoseconds. + Weight::from_parts(251_860_767, 6666) + // Standard Error: 24_034 + .saturating_add(Weight::from_parts(48_144_071, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1550,15 +1752,17 @@ impl WeightInfo for SubstrateWeight { fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `822 + r * (76 ±0)` - // Estimated: `6717 + r * (77 ±0)` - // Minimum execution time: 242_379_000 picoseconds. - Weight::from_parts(261_355_525, 6717) - // Standard Error: 18_862 - .saturating_add(Weight::from_parts(37_603_073, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Estimated: `6716 + r * (77 ±0)` + // Minimum execution time: 242_331_000 picoseconds. + Weight::from_parts(254_816_298, 6716) + // Standard Error: 17_941 + .saturating_add(Weight::from_parts(37_725_489, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1574,14 +1778,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 241_270_000 picoseconds. - Weight::from_parts(245_135_291, 6731) - // Standard Error: 10_757 - .saturating_add(Weight::from_parts(9_344_876, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 242_951_000 picoseconds. + Weight::from_parts(246_055_289, 6731) + // Standard Error: 10_074 + .saturating_add(Weight::from_parts(9_421_877, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1599,16 +1805,18 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` // Estimated: `8190 + r * (3090 ±7)` - // Minimum execution time: 240_506_000 picoseconds. - Weight::from_parts(241_653_000, 8190) - // Standard Error: 46_785 - .saturating_add(Weight::from_parts(22_107_816, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 245_310_000 picoseconds. + Weight::from_parts(245_703_000, 8190) + // Standard Error: 45_813 + .saturating_add(Weight::from_parts(21_837_058, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1624,14 +1832,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 241_539_000 picoseconds. - Weight::from_parts(245_471_045, 6723) - // Standard Error: 416 - .saturating_add(Weight::from_parts(159_577, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 241_955_000 picoseconds. + Weight::from_parts(246_148_234, 6723) + // Standard Error: 384 + .saturating_add(Weight::from_parts(162_123, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1647,14 +1857,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 242_702_000 picoseconds. - Weight::from_parts(274_518_595, 7805) - // Standard Error: 1_138 - .saturating_add(Weight::from_parts(256_973, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6_u64)) + // Minimum execution time: 243_928_000 picoseconds. + Weight::from_parts(276_404_668, 7805) + // Standard Error: 1_263 + .saturating_add(Weight::from_parts(262_830, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -1672,11 +1884,11 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 239_360_000 picoseconds. - Weight::from_parts(245_990_810, 6723) - // Standard Error: 3_188 - .saturating_add(Weight::from_parts(143_408, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Minimum execution time: 242_853_000 picoseconds. + Weight::from_parts(250_429_787, 6723) + // Standard Error: 433 + .saturating_add(Weight::from_parts(139_180, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } @@ -1685,510 +1897,508 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_617_000 picoseconds. - Weight::from_parts(1_900_268, 0) + // Minimum execution time: 1_620_000 picoseconds. + Weight::from_parts(1_894_980, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(2_950, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_995, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_739_000 picoseconds. - Weight::from_parts(2_109_373, 0) - // Standard Error: 43 - .saturating_add(Weight::from_parts(6_586, 0).saturating_mul(r.into())) + // Minimum execution time: 1_716_000 picoseconds. + Weight::from_parts(2_353_783, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_414, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_726_000 picoseconds. - Weight::from_parts(2_268_507, 0) + // Minimum execution time: 1_735_000 picoseconds. + Weight::from_parts(2_266_096, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(6_022, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_015, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_628_000 picoseconds. - Weight::from_parts(2_042_521, 0) + // Minimum execution time: 1_698_000 picoseconds. + Weight::from_parts(2_080_936, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(7_935, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(7_921, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_648_000 picoseconds. - Weight::from_parts(1_902_691, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(10_572, 0).saturating_mul(r.into())) + // Minimum execution time: 1_636_000 picoseconds. + Weight::from_parts(1_913_876, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(10_836, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_626_000 picoseconds. - Weight::from_parts(1_891_843, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(4_612, 0).saturating_mul(r.into())) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(1_838_470, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(4_613, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_581_000 picoseconds. - Weight::from_parts(1_139_823, 0) - // Standard Error: 74 - .saturating_add(Weight::from_parts(8_008, 0).saturating_mul(r.into())) + // Minimum execution time: 1_662_000 picoseconds. + Weight::from_parts(1_744_254, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(7_020, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_591_000 picoseconds. - Weight::from_parts(1_258_400, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(9_706, 0).saturating_mul(r.into())) + // Minimum execution time: 1_621_000 picoseconds. + Weight::from_parts(1_511_579, 0) + // Standard Error: 33 + .saturating_add(Weight::from_parts(9_479, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { + fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_701_000 picoseconds. - Weight::from_parts(1_876_118, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(e.into())) + // Minimum execution time: 1_758_000 picoseconds. + Weight::from_parts(2_066_494, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_617_000 picoseconds. - Weight::from_parts(1_565_613, 0) - // Standard Error: 629 - .saturating_add(Weight::from_parts(19_575, 0).saturating_mul(r.into())) + // Minimum execution time: 1_690_000 picoseconds. + Weight::from_parts(2_029_755, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(17_946, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_875_000 picoseconds. - Weight::from_parts(4_549_584, 0) - // Standard Error: 278 - .saturating_add(Weight::from_parts(24_336, 0).saturating_mul(r.into())) + // Minimum execution time: 1_894_000 picoseconds. + Weight::from_parts(5_533_643, 0) + // Standard Error: 176 + .saturating_add(Weight::from_parts(23_511, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_742_000 picoseconds. - Weight::from_parts(2_087_387, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(1_041, 0).saturating_mul(l.into())) + // Minimum execution time: 1_756_000 picoseconds. + Weight::from_parts(1_978_038, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_176, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_861_000 picoseconds. - Weight::from_parts(3_552_428, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(2_339, 0).saturating_mul(r.into())) + // Minimum execution time: 2_889_000 picoseconds. + Weight::from_parts(3_181_705, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(2_516, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_866_000 picoseconds. - Weight::from_parts(3_151_948, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) + // Minimum execution time: 2_871_000 picoseconds. + Weight::from_parts(3_186_198, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_619, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_919_000 picoseconds. - Weight::from_parts(3_214_587, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(3_867, 0).saturating_mul(r.into())) + // Minimum execution time: 2_890_000 picoseconds. + Weight::from_parts(3_237_380, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_963, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_764_000 picoseconds. - Weight::from_parts(1_815_683, 0) - // Standard Error: 123 - .saturating_add(Weight::from_parts(8_733, 0).saturating_mul(r.into())) + // Minimum execution time: 1_756_000 picoseconds. + Weight::from_parts(2_180_563, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(8_400, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_783_000 picoseconds. - Weight::from_parts(2_437_152, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(8_839, 0).saturating_mul(r.into())) + // Minimum execution time: 1_807_000 picoseconds. + Weight::from_parts(2_247_402, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(8_798, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_745_000 picoseconds. - Weight::from_parts(2_018_078, 0) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(2_050_199, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_756, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_833, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_648_000 picoseconds. - Weight::from_parts(648_059, 0) - // Standard Error: 142_299 - .saturating_add(Weight::from_parts(13_313_060, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(720_378, 0) + // Standard Error: 141_036 + .saturating_add(Weight::from_parts(13_193_405, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_953_179, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_828, 0).saturating_mul(r.into())) + // Minimum execution time: 1_654_000 picoseconds. + Weight::from_parts(1_934_279, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(4_049, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_607_000 picoseconds. - Weight::from_parts(1_924_759, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) + // Minimum execution time: 1_609_000 picoseconds. + Weight::from_parts(1_938_511, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(3_780, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_687_000 picoseconds. - Weight::from_parts(1_959_683, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_634_000 picoseconds. + Weight::from_parts(1_941_109, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_770, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_641_000 picoseconds. - Weight::from_parts(1_975_838, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_939_447, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_681, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_666, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(1_980_109, 0) + // Minimum execution time: 1_637_000 picoseconds. + Weight::from_parts(1_921_355, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_880, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_977, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_912_089, 0) - // Standard Error: 29 - .saturating_add(Weight::from_parts(3_896, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(1_993_872, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_809, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(1_951_485, 0) + // Minimum execution time: 1_657_000 picoseconds. + Weight::from_parts(1_954_737, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_725, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_734, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_649_000 picoseconds. - Weight::from_parts(1_937_598, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(6_045, 0).saturating_mul(r.into())) + // Minimum execution time: 1_688_000 picoseconds. + Weight::from_parts(1_993_611, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_651_000 picoseconds. - Weight::from_parts(2_202_977, 0) - // Standard Error: 313 - .saturating_add(Weight::from_parts(6_299, 0).saturating_mul(r.into())) + // Minimum execution time: 1_662_000 picoseconds. + Weight::from_parts(1_965_361, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_589_000 picoseconds. - Weight::from_parts(1_946_304, 0) + // Minimum execution time: 1_679_000 picoseconds. + Weight::from_parts(1_946_910, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(6_019, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_614_000 picoseconds. - Weight::from_parts(1_933_375, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_020, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_925_830, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_001, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_678_000 picoseconds. - Weight::from_parts(2_003_850, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_984_702, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_817, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_651_000 picoseconds. - Weight::from_parts(1_971_321, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_114, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(1_978_370, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(6_115, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_647_000 picoseconds. - Weight::from_parts(2_017_232, 0) + // Minimum execution time: 1_655_000 picoseconds. + Weight::from_parts(2_008_659, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_990, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_985, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_635_000 picoseconds. - Weight::from_parts(3_232_848, 0) - // Standard Error: 105 - .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) + // Minimum execution time: 1_608_000 picoseconds. + Weight::from_parts(1_912_542, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(6_084, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_623_000 picoseconds. - Weight::from_parts(1_996_165, 0) + // Minimum execution time: 1_644_000 picoseconds. + Weight::from_parts(1_959_896, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(5_964, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_968, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_668_000 picoseconds. - Weight::from_parts(1_973_238, 0) - // Standard Error: 20 - .saturating_add(Weight::from_parts(6_021, 0).saturating_mul(r.into())) + // Minimum execution time: 1_653_000 picoseconds. + Weight::from_parts(1_984_715, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_674_000 picoseconds. - Weight::from_parts(1_981_762, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_898, 0).saturating_mul(r.into())) + // Minimum execution time: 1_610_000 picoseconds. + Weight::from_parts(1_919_305, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_877, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_632_000 picoseconds. - Weight::from_parts(1_935_700, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_154, 0).saturating_mul(r.into())) + // Minimum execution time: 1_691_000 picoseconds. + Weight::from_parts(2_284_292, 0) + // Standard Error: 16 + .saturating_add(Weight::from_parts(6_027, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_607_000 picoseconds. - Weight::from_parts(1_942_734, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_797, 0).saturating_mul(r.into())) + // Minimum execution time: 1_644_000 picoseconds. + Weight::from_parts(1_960_370, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(5_760, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_611_000 picoseconds. - Weight::from_parts(2_960_454, 0) - // Standard Error: 177 - .saturating_add(Weight::from_parts(11_666, 0).saturating_mul(r.into())) + // Minimum execution time: 1_656_000 picoseconds. + Weight::from_parts(1_915_002, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(11_896, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_641_000 picoseconds. - Weight::from_parts(2_104_200, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(10_540, 0).saturating_mul(r.into())) + // Minimum execution time: 1_645_000 picoseconds. + Weight::from_parts(2_952_497, 0) + // Standard Error: 122 + .saturating_add(Weight::from_parts(10_646, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(2_602_908, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(11_900, 0).saturating_mul(r.into())) + // Minimum execution time: 1_669_000 picoseconds. + Weight::from_parts(1_661_488, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(12_330, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_584_000 picoseconds. - Weight::from_parts(2_056_817, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(10_722, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_989_633, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(10_649, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_988_892, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_683, 0).saturating_mul(r.into())) + // Minimum execution time: 1_715_000 picoseconds. + Weight::from_parts(1_994_636, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_660_000 picoseconds. - Weight::from_parts(2_148_537, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(5_756, 0).saturating_mul(r.into())) + // Minimum execution time: 1_685_000 picoseconds. + Weight::from_parts(2_075_238, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_743, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_629_000 picoseconds. - Weight::from_parts(1_955_010, 0) + // Minimum execution time: 1_649_000 picoseconds. + Weight::from_parts(1_911_373, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(5_931, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_894, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_569_000 picoseconds. - Weight::from_parts(1_982_403, 0) + // Minimum execution time: 1_682_000 picoseconds. + Weight::from_parts(2_000_076, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_867, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_932, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_615_000 picoseconds. - Weight::from_parts(1_989_920, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_137, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(1_999_600, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_129, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_646_000 picoseconds. - Weight::from_parts(2_020_935, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_863, 0).saturating_mul(r.into())) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(1_893_440, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(5_938, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_661_000 picoseconds. - Weight::from_parts(2_320_710, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(5_922, 0).saturating_mul(r.into())) + // Minimum execution time: 1_721_000 picoseconds. + Weight::from_parts(1_982_227, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_674_000 picoseconds. - Weight::from_parts(2_044_188, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_855, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(2_003_359, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_875, 0).saturating_mul(r.into())) } } @@ -2200,8 +2410,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_627_000 picoseconds. - Weight::from_parts(2_748_000, 1594) + // Minimum execution time: 2_630_000 picoseconds. + Weight::from_parts(2_778_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2211,10 +2421,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_607_000 picoseconds. - Weight::from_parts(8_026_118, 478) - // Standard Error: 1_323 - .saturating_add(Weight::from_parts(980_583, 0).saturating_mul(k.into())) + // Minimum execution time: 13_453_000 picoseconds. + Weight::from_parts(10_904_078, 478) + // Standard Error: 931 + .saturating_add(Weight::from_parts(982_122, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -2230,14 +2440,121 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_563_000 picoseconds. - Weight::from_parts(22_292_544, 3708) - // Standard Error: 60 - .saturating_add(Weight::from_parts(54_541, 0).saturating_mul(c.into())) + // Minimum execution time: 30_972_000 picoseconds. + Weight::from_parts(31_129_287, 3708) + // Standard Error: 52 + .saturating_add(Weight::from_parts(54_996, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts CodeStorage (r:2 w:1) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// The range of component `c` is `[0, 61717]`. + fn v9_migration_step(c: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `178 + c * (1 ±0)` + // Estimated: `6114 + c * (1 ±0)` + // Minimum execution time: 9_696_000 picoseconds. + Weight::from_parts(10_697_026, 6114) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_307, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: Contracts ContractInfoOf (r:2 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + /// Storage: System Account (r:1 w:0) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) + fn v10_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `544` + // Estimated: `6484` + // Minimum execution time: 18_132_000 picoseconds. + Weight::from_parts(18_842_000, 6484) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Contracts DeletionQueue (r:1 w:1025) + /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: Contracts DeletionQueueCounter (r:0 w:1) + /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// The range of component `k` is `[0, 1024]`. + fn v11_migration_step(k: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `138 + k * (1 ±0)` + // Estimated: `3602 + k * (1 ±0)` + // Minimum execution time: 3_952_000 picoseconds. + Weight::from_parts(4_129_000, 3602) + // Standard Error: 1_521 + .saturating_add(Weight::from_parts(1_013_657, 0).saturating_mul(k.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn migration_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `1594` + // Minimum execution time: 3_528_000 picoseconds. + Weight::from_parts(3_641_000, 1594) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + fn migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `133` + // Estimated: `3598` + // Minimum execution time: 13_433_000 picoseconds. + Weight::from_parts(13_710_000, 3598) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + fn on_runtime_upgrade_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 5_502_000 picoseconds. + Weight::from_parts(5_689_000, 3574) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn on_runtime_upgrade_in_progress() -> Weight { + // Proof Size summary in bytes: + // Measured: `134` + // Estimated: `3599` + // Minimum execution time: 7_846_000 picoseconds. + Weight::from_parts(8_078_000, 3599) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + } + /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: Contracts MigrationInProgress (r:1 w:1) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + fn on_runtime_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `109` + // Estimated: `3574` + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_602_000, 3574) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -2253,14 +2570,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 268_884_000 picoseconds. - Weight::from_parts(277_799_331, 6656) - // Standard Error: 23 - .saturating_add(Weight::from_parts(37_876, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 280_993_000 picoseconds. + Weight::from_parts(289_622_441, 6656) + // Standard Error: 26 + .saturating_add(Weight::from_parts(38_061, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -2284,17 +2603,19 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_159_921_000 picoseconds. - Weight::from_parts(594_826_134, 8659) - // Standard Error: 290 - .saturating_add(Weight::from_parts(106_471, 0).saturating_mul(c.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_160, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_417, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Minimum execution time: 3_136_130_000 picoseconds. + Weight::from_parts(568_808_049, 8659) + // Standard Error: 288 + .saturating_add(Weight::from_parts(108_649, 0).saturating_mul(c.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_103, 0).saturating_mul(i.into())) + // Standard Error: 16 + .saturating_add(Weight::from_parts(1_502, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) @@ -2315,15 +2636,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_653_811_000 picoseconds. - Weight::from_parts(296_038_081, 6408) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_461, 0).saturating_mul(i.into())) - // Standard Error: 9 - .saturating_add(Weight::from_parts(1_430, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Minimum execution time: 1_655_107_000 picoseconds. + Weight::from_parts(266_843_437, 6408) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_463, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_458, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -2338,11 +2661,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 195_916_000 picoseconds. - Weight::from_parts(196_706_000, 6699) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 197_684_000 picoseconds. + Weight::from_parts(199_222_000, 6699) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -2356,13 +2681,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 251_137_000 picoseconds. - Weight::from_parts(252_985_435, 3574) - // Standard Error: 88 - .saturating_add(Weight::from_parts(108_141, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Minimum execution time: 254_766_000 picoseconds. + Weight::from_parts(247_865_224, 3574) + // Standard Error: 146 + .saturating_add(Weight::from_parts(108_830, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:1 w:1) /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:1 w:1) @@ -2375,11 +2702,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_521_000 picoseconds. - Weight::from_parts(34_039_000, 3720) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Minimum execution time: 36_038_000 picoseconds. + Weight::from_parts(36_503_000, 3720) + .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts OwnerInfoOf (r:2 w:2) @@ -2390,11 +2719,13 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_477_000 picoseconds. - Weight::from_parts(33_890_000, 8985) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 35_312_000 picoseconds. + Weight::from_parts(35_852_000, 8985) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2410,14 +2741,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 239_374_000 picoseconds. - Weight::from_parts(246_017_099, 6722) - // Standard Error: 539 - .saturating_add(Weight::from_parts(323_826, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_668_000 picoseconds. + Weight::from_parts(256_167_627, 6722) + // Standard Error: 2_447 + .saturating_add(Weight::from_parts(328_424, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -2433,15 +2766,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 240_656_000 picoseconds. - Weight::from_parts(87_361_934, 6743) - // Standard Error: 5_912 - .saturating_add(Weight::from_parts(3_329_840, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_353_000 picoseconds. + Weight::from_parts(82_743_116, 6743) + // Standard Error: 6_271 + .saturating_add(Weight::from_parts(3_331_316, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1601 w:1) @@ -2457,15 +2792,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 243_026_000 picoseconds. - Weight::from_parts(76_953_007, 6747) - // Standard Error: 6_640 - .saturating_add(Weight::from_parts(4_132_521, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 243_370_000 picoseconds. + Weight::from_parts(77_198_453, 6747) + // Standard Error: 6_968 + .saturating_add(Weight::from_parts(4_162_946, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2481,14 +2818,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 242_736_000 picoseconds. - Weight::from_parts(243_136_007, 6730) - // Standard Error: 912 - .saturating_add(Weight::from_parts(414_717, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 244_083_000 picoseconds. + Weight::from_parts(239_899_316, 6730) + // Standard Error: 5_254 + .saturating_add(Weight::from_parts(423_863, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2504,14 +2843,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 240_130_000 picoseconds. - Weight::from_parts(244_517_187, 6723) - // Standard Error: 384 - .saturating_add(Weight::from_parts(167_431, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_835_000 picoseconds. + Weight::from_parts(247_929_454, 6723) + // Standard Error: 2_309 + .saturating_add(Weight::from_parts(169_642, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) /// Storage: Contracts CodeStorage (r:1 w:0) @@ -2525,14 +2866,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `668 + r * (3 ±0)` // Estimated: `6608 + r * (3 ±0)` - // Minimum execution time: 228_022_000 picoseconds. - Weight::from_parts(232_385_198, 6608) - // Standard Error: 300 - .saturating_add(Weight::from_parts(145_143, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(5_u64)) + // Minimum execution time: 229_091_000 picoseconds. + Weight::from_parts(235_369_797, 6608) + // Standard Error: 283 + .saturating_add(Weight::from_parts(146_485, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2548,14 +2891,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 240_250_000 picoseconds. - Weight::from_parts(240_268_824, 6724) - // Standard Error: 945 - .saturating_add(Weight::from_parts(329_577, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_638_000 picoseconds. + Weight::from_parts(245_890_126, 6724) + // Standard Error: 508 + .saturating_add(Weight::from_parts(323_232, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2571,14 +2916,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6719 + r * (6 ±0)` - // Minimum execution time: 242_370_000 picoseconds. - Weight::from_parts(242_389_500, 6719) - // Standard Error: 712 - .saturating_add(Weight::from_parts(518_380, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_740_000 picoseconds. + Weight::from_parts(244_490_855, 6719) + // Standard Error: 1_872 + .saturating_add(Weight::from_parts(543_651, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:2 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2594,14 +2941,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 238_563_000 picoseconds. - Weight::from_parts(253_511_314, 6846) - // Standard Error: 1_571 - .saturating_add(Weight::from_parts(1_454_089, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 241_787_000 picoseconds. + Weight::from_parts(243_819_464, 6846) + // Standard Error: 5_017 + .saturating_add(Weight::from_parts(1_496_444, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2617,14 +2966,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 242_995_000 picoseconds. - Weight::from_parts(240_061_456, 6741) - // Standard Error: 2_650 - .saturating_add(Weight::from_parts(326_813, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 243_498_000 picoseconds. + Weight::from_parts(251_019_668, 6741) + // Standard Error: 1_479 + .saturating_add(Weight::from_parts(318_979, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2640,14 +2991,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 241_342_000 picoseconds. - Weight::from_parts(240_875_314, 6739) - // Standard Error: 669 - .saturating_add(Weight::from_parts(324_519, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_572_000 picoseconds. + Weight::from_parts(246_453_396, 6739) + // Standard Error: 978 + .saturating_add(Weight::from_parts(320_095, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2663,14 +3016,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 238_954_000 picoseconds. - Weight::from_parts(242_269_896, 6737) - // Standard Error: 1_453 - .saturating_add(Weight::from_parts(317_998, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_872_000 picoseconds. + Weight::from_parts(257_272_904, 6737) + // Standard Error: 4_146 + .saturating_add(Weight::from_parts(314_645, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2686,14 +3041,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 240_935_000 picoseconds. - Weight::from_parts(242_938_271, 6723) - // Standard Error: 792 - .saturating_add(Weight::from_parts(316_782, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_139_000 picoseconds. + Weight::from_parts(244_667_764, 6723) + // Standard Error: 580 + .saturating_add(Weight::from_parts(323_005, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2711,14 +3068,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `852 + r * (14 ±0)` // Estimated: `6785 + r * (14 ±0)` - // Minimum execution time: 240_142_000 picoseconds. - Weight::from_parts(241_386_730, 6785) - // Standard Error: 2_116 - .saturating_add(Weight::from_parts(1_387_202, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 242_370_000 picoseconds. + Weight::from_parts(247_330_421, 6785) + // Standard Error: 1_832 + .saturating_add(Weight::from_parts(1_396_737, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2734,14 +3093,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 165_617_000 picoseconds. - Weight::from_parts(170_794_127, 6687) - // Standard Error: 209 - .saturating_add(Weight::from_parts(127_931, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 167_583_000 picoseconds. + Weight::from_parts(173_694_884, 6687) + // Standard Error: 2_880 + .saturating_add(Weight::from_parts(133_811, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2757,14 +3118,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 238_832_000 picoseconds. - Weight::from_parts(237_110_694, 6724) - // Standard Error: 539 - .saturating_add(Weight::from_parts(280_610, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_932_000 picoseconds. + Weight::from_parts(246_356_239, 6724) + // Standard Error: 479 + .saturating_add(Weight::from_parts(268_456, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2780,13 +3143,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 241_070_000 picoseconds. - Weight::from_parts(242_162_279, 6724) + // Minimum execution time: 245_611_000 picoseconds. + Weight::from_parts(246_102_856, 6724) // Standard Error: 1 - .saturating_add(Weight::from_parts(595, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(596, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2802,14 +3167,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 236_337_000 picoseconds. - Weight::from_parts(238_883_828, 6708) - // Standard Error: 188_978 - .saturating_add(Weight::from_parts(926_671, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 238_764_000 picoseconds. + Weight::from_parts(241_225_075, 6708) + // Standard Error: 196_899 + .saturating_add(Weight::from_parts(3_361_624, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2825,13 +3192,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 239_103_000 picoseconds. - Weight::from_parts(240_382_910, 6731) + // Minimum execution time: 243_075_000 picoseconds. + Weight::from_parts(244_139_227, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(181, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(178, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2853,16 +3222,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 238_739_000 picoseconds. - Weight::from_parts(241_041_330, 6750) - // Standard Error: 176_820 - .saturating_add(Weight::from_parts(115_332_869, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_330_000 picoseconds. + Weight::from_parts(244_187_673, 6750) + // Standard Error: 473_741 + .saturating_add(Weight::from_parts(117_358_926, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((8_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 7781).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2880,14 +3251,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 240_888_000 picoseconds. - Weight::from_parts(259_901_113, 6769) - // Standard Error: 5_935 - .saturating_add(Weight::from_parts(1_764_269, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 243_298_000 picoseconds. + Weight::from_parts(246_393_253, 6769) + // Standard Error: 4_125 + .saturating_add(Weight::from_parts(1_876_317, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2903,14 +3276,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 237_478_000 picoseconds. - Weight::from_parts(264_915_436, 6723) - // Standard Error: 4_644 - .saturating_add(Weight::from_parts(3_452_918, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 240_477_000 picoseconds. + Weight::from_parts(252_579_330, 6723) + // Standard Error: 1_993 + .saturating_add(Weight::from_parts(3_510_388, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2927,18 +3302,20 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 255_720_000 picoseconds. - Weight::from_parts(247_945_758, 6744) - // Standard Error: 73_390 - .saturating_add(Weight::from_parts(2_483_239, 0).saturating_mul(t.into())) - // Standard Error: 20 - .saturating_add(Weight::from_parts(756, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 259_029_000 picoseconds. + Weight::from_parts(252_262_484, 6744) + // Standard Error: 35_710 + .saturating_add(Weight::from_parts(2_236_764, 0).saturating_mul(t.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(648, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2954,14 +3331,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 172_214_000 picoseconds. - Weight::from_parts(177_306_567, 6721) - // Standard Error: 839 - .saturating_add(Weight::from_parts(230_558, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 170_544_000 picoseconds. + Weight::from_parts(174_555_287, 6721) + // Standard Error: 320 + .saturating_add(Weight::from_parts(233_911, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2977,11 +3356,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 354_105_000 picoseconds. - Weight::from_parts(360_649_854, 131670) - // Standard Error: 2 - .saturating_add(Weight::from_parts(737, 0).saturating_mul(i.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 357_160_000 picoseconds. + Weight::from_parts(359_930_328, 131670) + // Standard Error: 1 + .saturating_add(Weight::from_parts(738, 0).saturating_mul(i.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2991,11 +3370,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 239_637_000 picoseconds. - Weight::from_parts(136_431_436, 843) - // Standard Error: 10_238 - .saturating_add(Weight::from_parts(6_070_221, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_846_000 picoseconds. + Weight::from_parts(135_611_732, 843) + // Standard Error: 10_708 + .saturating_add(Weight::from_parts(6_146_995, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -3008,11 +3387,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 256_198_000 picoseconds. - Weight::from_parts(289_972_802, 1280) - // Standard Error: 54 - .saturating_add(Weight::from_parts(438, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Minimum execution time: 258_885_000 picoseconds. + Weight::from_parts(292_699_689, 1280) + // Standard Error: 47 + .saturating_add(Weight::from_parts(433, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -3022,11 +3401,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 255_519_000 picoseconds. - Weight::from_parts(257_668_217, 1167) - // Standard Error: 19 - .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 258_297_000 picoseconds. + Weight::from_parts(262_380_805, 1167) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3037,11 +3414,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 239_461_000 picoseconds. - Weight::from_parts(131_630_528, 845) - // Standard Error: 10_483 - .saturating_add(Weight::from_parts(5_910_066, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_945_000 picoseconds. + Weight::from_parts(126_721_339, 845) + // Standard Error: 11_891 + .saturating_add(Weight::from_parts(6_134_319, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -3054,11 +3431,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 254_904_000 picoseconds. - Weight::from_parts(261_213_399, 1163) - // Standard Error: 178 - .saturating_add(Weight::from_parts(125, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 259_872_000 picoseconds. + Weight::from_parts(259_910_037, 1163) + // Standard Error: 142 + .saturating_add(Weight::from_parts(629, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3069,11 +3446,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 239_995_000 picoseconds. - Weight::from_parts(151_326_508, 840) - // Standard Error: 8_960 - .saturating_add(Weight::from_parts(4_937_728, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 245_005_000 picoseconds. + Weight::from_parts(155_891_939, 840) + // Standard Error: 9_938 + .saturating_add(Weight::from_parts(4_992_231, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) @@ -3085,11 +3462,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 254_515_000 picoseconds. - Weight::from_parts(256_728_817, 1179) - // Standard Error: 22 - .saturating_add(Weight::from_parts(706, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 257_926_000 picoseconds. + Weight::from_parts(261_438_340, 1179) + // Standard Error: 24 + .saturating_add(Weight::from_parts(659, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3100,11 +3477,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 240_601_000 picoseconds. - Weight::from_parts(154_476_561, 857) - // Standard Error: 8_872 - .saturating_add(Weight::from_parts(4_805_043, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 244_392_000 picoseconds. + Weight::from_parts(156_243_434, 857) + // Standard Error: 8_716 + .saturating_add(Weight::from_parts(4_813_682, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) @@ -3116,9 +3493,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 253_654_000 picoseconds. - Weight::from_parts(257_288_586, 1166) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 255_731_000 picoseconds. + Weight::from_parts(258_937_245, 1166) + // Standard Error: 26 + .saturating_add(Weight::from_parts(61, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -3129,11 +3508,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 239_869_000 picoseconds. - Weight::from_parts(135_258_204, 836) - // Standard Error: 10_378 - .saturating_add(Weight::from_parts(6_144_770, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_902_000 picoseconds. + Weight::from_parts(140_670_703, 836) + // Standard Error: 10_042 + .saturating_add(Weight::from_parts(6_206_728, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) @@ -3146,14 +3525,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 258_153_000 picoseconds. - Weight::from_parts(260_068_186, 1180) - // Standard Error: 25 - .saturating_add(Weight::from_parts(744, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 258_425_000 picoseconds. + Weight::from_parts(266_011_498, 1180) + // Standard Error: 137 + .saturating_add(Weight::from_parts(383, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1601) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3169,16 +3550,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 243_189_000 picoseconds. - Weight::from_parts(243_465_000, 7270) - // Standard Error: 30_961 - .saturating_add(Weight::from_parts(35_376_623, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 243_533_000 picoseconds. + Weight::from_parts(67_275_548, 7270) + // Standard Error: 29_687 + .saturating_add(Weight::from_parts(36_086_917, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -3194,16 +3577,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1140 + r * (276 ±0)` // Estimated: `9332 + r * (2752 ±0)` - // Minimum execution time: 243_656_000 picoseconds. - Weight::from_parts(244_221_000, 9332) - // Standard Error: 69_762 - .saturating_add(Weight::from_parts(216_905_619, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Minimum execution time: 246_206_000 picoseconds. + Weight::from_parts(246_946_000, 9332) + // Standard Error: 74_648 + .saturating_add(Weight::from_parts(217_429_651, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3219,16 +3604,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 242_632_000 picoseconds. - Weight::from_parts(243_068_000, 6727) - // Standard Error: 126_218 - .saturating_add(Weight::from_parts(213_096_291, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 245_170_000 picoseconds. + Weight::from_parts(245_460_000, 6727) + // Standard Error: 110_429 + .saturating_add(Weight::from_parts(212_316_013, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2572).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:3 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -3245,18 +3632,20 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` // Estimated: `12044 + t * (5154 ±0)` - // Minimum execution time: 421_691_000 picoseconds. - Weight::from_parts(394_587_369, 12044) - // Standard Error: 1_104_014 - .saturating_add(Weight::from_parts(30_461_758, 0).saturating_mul(t.into())) + // Minimum execution time: 424_523_000 picoseconds. + Weight::from_parts(392_267_161, 12044) + // Standard Error: 956_686 + .saturating_add(Weight::from_parts(36_399_297, 0).saturating_mul(t.into())) // Standard Error: 1 - .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(10_u64)) + .saturating_add(Weight::from_parts(600, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1602 w:1602) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:801 w:801) @@ -3276,16 +3665,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1322 + r * (254 ±0)` // Estimated: `7146 + r * (5205 ±0)` - // Minimum execution time: 581_252_000 picoseconds. - Weight::from_parts(582_275_000, 7146) - // Standard Error: 279_771 - .saturating_add(Weight::from_parts(349_770_967, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(8_u64)) + // Minimum execution time: 582_323_000 picoseconds. + Weight::from_parts(584_276_000, 7146) + // Standard Error: 280_418 + .saturating_add(Weight::from_parts(349_510_405, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((5_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 5205).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:4 w:4) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:2 w:2) @@ -3307,20 +3698,22 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_623_241_000 picoseconds. - Weight::from_parts(317_076_173, 9492) - // Standard Error: 4_549_416 - .saturating_add(Weight::from_parts(125_360_446, 0).saturating_mul(t.into())) + // Minimum execution time: 1_627_228_000 picoseconds. + Weight::from_parts(358_838_236, 9492) + // Standard Error: 4_785_521 + .saturating_add(Weight::from_parts(114_920_186, 0).saturating_mul(t.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_163, 0).saturating_mul(i.into())) // Standard Error: 7 - .saturating_add(Weight::from_parts(1_352, 0).saturating_mul(s.into())) - .saturating_add(RocksDbWeight::get().reads(13_u64)) + .saturating_add(Weight::from_parts(1_336, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(14_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2634).saturating_mul(t.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3336,14 +3729,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 238_262_000 picoseconds. - Weight::from_parts(243_093_288, 6718) - // Standard Error: 870 - .saturating_add(Weight::from_parts(573_939, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_228_000 picoseconds. + Weight::from_parts(245_525_858, 6718) + // Standard Error: 1_774 + .saturating_add(Weight::from_parts(578_001, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3359,13 +3754,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 239_888_000 picoseconds. - Weight::from_parts(242_849_333, 6725) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_949, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_876_000 picoseconds. + Weight::from_parts(240_629_797, 6725) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_947, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3381,14 +3778,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 237_288_000 picoseconds. - Weight::from_parts(242_510_631, 6721) - // Standard Error: 977 - .saturating_add(Weight::from_parts(742_726, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_345_000 picoseconds. + Weight::from_parts(245_512_118, 6721) + // Standard Error: 771 + .saturating_add(Weight::from_parts(735_528, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3404,13 +3803,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 240_006_000 picoseconds. - Weight::from_parts(233_802_510, 6729) + // Minimum execution time: 242_741_000 picoseconds. + Weight::from_parts(232_209_398, 6729) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_161, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(Weight::from_parts(3_099, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3426,14 +3827,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 237_532_000 picoseconds. - Weight::from_parts(243_087_565, 6724) - // Standard Error: 656 - .saturating_add(Weight::from_parts(417_850, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 239_254_000 picoseconds. + Weight::from_parts(244_250_047, 6724) + // Standard Error: 2_223 + .saturating_add(Weight::from_parts(421_533, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3449,13 +3852,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 241_429_000 picoseconds. - Weight::from_parts(233_528_258, 6733) - // Standard Error: 1 - .saturating_add(Weight::from_parts(913, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 240_848_000 picoseconds. + Weight::from_parts(239_049_162, 6733) + // Standard Error: 3 + .saturating_add(Weight::from_parts(914, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3471,14 +3876,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 237_622_000 picoseconds. - Weight::from_parts(240_476_401, 6725) - // Standard Error: 795 - .saturating_add(Weight::from_parts(416_869, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 240_496_000 picoseconds. + Weight::from_parts(245_279_278, 6725) + // Standard Error: 1_047 + .saturating_add(Weight::from_parts(414_108, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3494,13 +3901,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 241_134_000 picoseconds. - Weight::from_parts(234_043_271, 6727) - // Standard Error: 3 - .saturating_add(Weight::from_parts(919, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_529_000 picoseconds. + Weight::from_parts(234_715_148, 6727) + // Standard Error: 1 + .saturating_add(Weight::from_parts(914, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3516,14 +3925,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` // Estimated: `6849 + n * (1 ±0)` - // Minimum execution time: 292_699_000 picoseconds. - Weight::from_parts(301_523_608, 6849) - // Standard Error: 14 - .saturating_add(Weight::from_parts(4_676, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 294_982_000 picoseconds. + Weight::from_parts(299_613_855, 6849) + // Standard Error: 7 + .saturating_add(Weight::from_parts(4_668, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3537,16 +3948,18 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `727 + r * (112 ±0)` + // Measured: `726 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 241_126_000 picoseconds. - Weight::from_parts(248_796_458, 6666) - // Standard Error: 21_501 - .saturating_add(Weight::from_parts(48_091_265, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_583_000 picoseconds. + Weight::from_parts(251_860_767, 6666) + // Standard Error: 24_034 + .saturating_add(Weight::from_parts(48_144_071, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3561,15 +3974,17 @@ impl WeightInfo for () { fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `822 + r * (76 ±0)` - // Estimated: `6717 + r * (77 ±0)` - // Minimum execution time: 242_379_000 picoseconds. - Weight::from_parts(261_355_525, 6717) - // Standard Error: 18_862 - .saturating_add(Weight::from_parts(37_603_073, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Estimated: `6716 + r * (77 ±0)` + // Minimum execution time: 242_331_000 picoseconds. + Weight::from_parts(254_816_298, 6716) + // Standard Error: 17_941 + .saturating_add(Weight::from_parts(37_725_489, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3585,14 +4000,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 241_270_000 picoseconds. - Weight::from_parts(245_135_291, 6731) - // Standard Error: 10_757 - .saturating_add(Weight::from_parts(9_344_876, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 242_951_000 picoseconds. + Weight::from_parts(246_055_289, 6731) + // Standard Error: 10_074 + .saturating_add(Weight::from_parts(9_421_877, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3610,16 +4027,18 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` // Estimated: `8190 + r * (3090 ±7)` - // Minimum execution time: 240_506_000 picoseconds. - Weight::from_parts(241_653_000, 8190) - // Standard Error: 46_785 - .saturating_add(Weight::from_parts(22_107_816, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 245_310_000 picoseconds. + Weight::from_parts(245_703_000, 8190) + // Standard Error: 45_813 + .saturating_add(Weight::from_parts(21_837_058, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3635,14 +4054,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 241_539_000 picoseconds. - Weight::from_parts(245_471_045, 6723) - // Standard Error: 416 - .saturating_add(Weight::from_parts(159_577, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 241_955_000 picoseconds. + Weight::from_parts(246_148_234, 6723) + // Standard Error: 384 + .saturating_add(Weight::from_parts(162_123, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3658,14 +4079,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 242_702_000 picoseconds. - Weight::from_parts(274_518_595, 7805) - // Standard Error: 1_138 - .saturating_add(Weight::from_parts(256_973, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(6_u64)) + // Minimum execution time: 243_928_000 picoseconds. + Weight::from_parts(276_404_668, 7805) + // Standard Error: 1_263 + .saturating_add(Weight::from_parts(262_830, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } + /// Storage: Contracts MigrationInProgress (r:1 w:0) + /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -3683,11 +4106,11 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 239_360_000 picoseconds. - Weight::from_parts(245_990_810, 6723) - // Standard Error: 3_188 - .saturating_add(Weight::from_parts(143_408, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Minimum execution time: 242_853_000 picoseconds. + Weight::from_parts(250_429_787, 6723) + // Standard Error: 433 + .saturating_add(Weight::from_parts(139_180, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } @@ -3696,509 +4119,507 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_617_000 picoseconds. - Weight::from_parts(1_900_268, 0) + // Minimum execution time: 1_620_000 picoseconds. + Weight::from_parts(1_894_980, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(2_950, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_995, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_739_000 picoseconds. - Weight::from_parts(2_109_373, 0) - // Standard Error: 43 - .saturating_add(Weight::from_parts(6_586, 0).saturating_mul(r.into())) + // Minimum execution time: 1_716_000 picoseconds. + Weight::from_parts(2_353_783, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_414, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_726_000 picoseconds. - Weight::from_parts(2_268_507, 0) + // Minimum execution time: 1_735_000 picoseconds. + Weight::from_parts(2_266_096, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(6_022, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_015, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_628_000 picoseconds. - Weight::from_parts(2_042_521, 0) + // Minimum execution time: 1_698_000 picoseconds. + Weight::from_parts(2_080_936, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(7_935, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(7_921, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_648_000 picoseconds. - Weight::from_parts(1_902_691, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(10_572, 0).saturating_mul(r.into())) + // Minimum execution time: 1_636_000 picoseconds. + Weight::from_parts(1_913_876, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(10_836, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_626_000 picoseconds. - Weight::from_parts(1_891_843, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(4_612, 0).saturating_mul(r.into())) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(1_838_470, 0) + // Standard Error: 11 + .saturating_add(Weight::from_parts(4_613, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_581_000 picoseconds. - Weight::from_parts(1_139_823, 0) - // Standard Error: 74 - .saturating_add(Weight::from_parts(8_008, 0).saturating_mul(r.into())) + // Minimum execution time: 1_662_000 picoseconds. + Weight::from_parts(1_744_254, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(7_020, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_591_000 picoseconds. - Weight::from_parts(1_258_400, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(9_706, 0).saturating_mul(r.into())) + // Minimum execution time: 1_621_000 picoseconds. + Weight::from_parts(1_511_579, 0) + // Standard Error: 33 + .saturating_add(Weight::from_parts(9_479, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32, ) -> Weight { + fn instr_br_table_per_entry(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_701_000 picoseconds. - Weight::from_parts(1_876_118, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(e.into())) + // Minimum execution time: 1_758_000 picoseconds. + Weight::from_parts(2_066_494, 0) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_617_000 picoseconds. - Weight::from_parts(1_565_613, 0) - // Standard Error: 629 - .saturating_add(Weight::from_parts(19_575, 0).saturating_mul(r.into())) + // Minimum execution time: 1_690_000 picoseconds. + Weight::from_parts(2_029_755, 0) + // Standard Error: 9 + .saturating_add(Weight::from_parts(17_946, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_875_000 picoseconds. - Weight::from_parts(4_549_584, 0) - // Standard Error: 278 - .saturating_add(Weight::from_parts(24_336, 0).saturating_mul(r.into())) + // Minimum execution time: 1_894_000 picoseconds. + Weight::from_parts(5_533_643, 0) + // Standard Error: 176 + .saturating_add(Weight::from_parts(23_511, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_742_000 picoseconds. - Weight::from_parts(2_087_387, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(1_041, 0).saturating_mul(l.into())) + // Minimum execution time: 1_756_000 picoseconds. + Weight::from_parts(1_978_038, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_176, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_861_000 picoseconds. - Weight::from_parts(3_552_428, 0) - // Standard Error: 23 - .saturating_add(Weight::from_parts(2_339, 0).saturating_mul(r.into())) + // Minimum execution time: 2_889_000 picoseconds. + Weight::from_parts(3_181_705, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(2_516, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_866_000 picoseconds. - Weight::from_parts(3_151_948, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) + // Minimum execution time: 2_871_000 picoseconds. + Weight::from_parts(3_186_198, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_619, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_919_000 picoseconds. - Weight::from_parts(3_214_587, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(3_867, 0).saturating_mul(r.into())) + // Minimum execution time: 2_890_000 picoseconds. + Weight::from_parts(3_237_380, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_963, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_764_000 picoseconds. - Weight::from_parts(1_815_683, 0) - // Standard Error: 123 - .saturating_add(Weight::from_parts(8_733, 0).saturating_mul(r.into())) + // Minimum execution time: 1_756_000 picoseconds. + Weight::from_parts(2_180_563, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(8_400, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_783_000 picoseconds. - Weight::from_parts(2_437_152, 0) - // Standard Error: 13 - .saturating_add(Weight::from_parts(8_839, 0).saturating_mul(r.into())) + // Minimum execution time: 1_807_000 picoseconds. + Weight::from_parts(2_247_402, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(8_798, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_745_000 picoseconds. - Weight::from_parts(2_018_078, 0) + // Minimum execution time: 1_703_000 picoseconds. + Weight::from_parts(2_050_199, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_756, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_833, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_648_000 picoseconds. - Weight::from_parts(648_059, 0) - // Standard Error: 142_299 - .saturating_add(Weight::from_parts(13_313_060, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(720_378, 0) + // Standard Error: 141_036 + .saturating_add(Weight::from_parts(13_193_405, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_953_179, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_828, 0).saturating_mul(r.into())) + // Minimum execution time: 1_654_000 picoseconds. + Weight::from_parts(1_934_279, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(4_049, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_607_000 picoseconds. - Weight::from_parts(1_924_759, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) + // Minimum execution time: 1_609_000 picoseconds. + Weight::from_parts(1_938_511, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(3_780, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_687_000 picoseconds. - Weight::from_parts(1_959_683, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) + // Minimum execution time: 1_634_000 picoseconds. + Weight::from_parts(1_941_109, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_770, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_641_000 picoseconds. - Weight::from_parts(1_975_838, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_939_447, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_681, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_666, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_689_000 picoseconds. - Weight::from_parts(1_980_109, 0) + // Minimum execution time: 1_637_000 picoseconds. + Weight::from_parts(1_921_355, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_880, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_977, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_912_089, 0) - // Standard Error: 29 - .saturating_add(Weight::from_parts(3_896, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(1_993_872, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_809, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(1_951_485, 0) + // Minimum execution time: 1_657_000 picoseconds. + Weight::from_parts(1_954_737, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_725, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_734, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_649_000 picoseconds. - Weight::from_parts(1_937_598, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(6_045, 0).saturating_mul(r.into())) + // Minimum execution time: 1_688_000 picoseconds. + Weight::from_parts(1_993_611, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(5_962, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_651_000 picoseconds. - Weight::from_parts(2_202_977, 0) - // Standard Error: 313 - .saturating_add(Weight::from_parts(6_299, 0).saturating_mul(r.into())) + // Minimum execution time: 1_662_000 picoseconds. + Weight::from_parts(1_965_361, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_589_000 picoseconds. - Weight::from_parts(1_946_304, 0) + // Minimum execution time: 1_679_000 picoseconds. + Weight::from_parts(1_946_910, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(6_019, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_614_000 picoseconds. - Weight::from_parts(1_933_375, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_020, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_925_830, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_001, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_678_000 picoseconds. - Weight::from_parts(2_003_850, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_984_702, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_817, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_651_000 picoseconds. - Weight::from_parts(1_971_321, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_114, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(1_978_370, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(6_115, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_647_000 picoseconds. - Weight::from_parts(2_017_232, 0) + // Minimum execution time: 1_655_000 picoseconds. + Weight::from_parts(2_008_659, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_990, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_985, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_635_000 picoseconds. - Weight::from_parts(3_232_848, 0) - // Standard Error: 105 - .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) + // Minimum execution time: 1_608_000 picoseconds. + Weight::from_parts(1_912_542, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(6_084, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_623_000 picoseconds. - Weight::from_parts(1_996_165, 0) + // Minimum execution time: 1_644_000 picoseconds. + Weight::from_parts(1_959_896, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(5_964, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_968, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_668_000 picoseconds. - Weight::from_parts(1_973_238, 0) - // Standard Error: 20 - .saturating_add(Weight::from_parts(6_021, 0).saturating_mul(r.into())) + // Minimum execution time: 1_653_000 picoseconds. + Weight::from_parts(1_984_715, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_674_000 picoseconds. - Weight::from_parts(1_981_762, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(5_898, 0).saturating_mul(r.into())) + // Minimum execution time: 1_610_000 picoseconds. + Weight::from_parts(1_919_305, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_877, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_632_000 picoseconds. - Weight::from_parts(1_935_700, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_154, 0).saturating_mul(r.into())) + // Minimum execution time: 1_691_000 picoseconds. + Weight::from_parts(2_284_292, 0) + // Standard Error: 16 + .saturating_add(Weight::from_parts(6_027, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_607_000 picoseconds. - Weight::from_parts(1_942_734, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_797, 0).saturating_mul(r.into())) + // Minimum execution time: 1_644_000 picoseconds. + Weight::from_parts(1_960_370, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(5_760, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_611_000 picoseconds. - Weight::from_parts(2_960_454, 0) - // Standard Error: 177 - .saturating_add(Weight::from_parts(11_666, 0).saturating_mul(r.into())) + // Minimum execution time: 1_656_000 picoseconds. + Weight::from_parts(1_915_002, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(11_896, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_641_000 picoseconds. - Weight::from_parts(2_104_200, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(10_540, 0).saturating_mul(r.into())) + // Minimum execution time: 1_645_000 picoseconds. + Weight::from_parts(2_952_497, 0) + // Standard Error: 122 + .saturating_add(Weight::from_parts(10_646, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(2_602_908, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(11_900, 0).saturating_mul(r.into())) + // Minimum execution time: 1_669_000 picoseconds. + Weight::from_parts(1_661_488, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(12_330, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_584_000 picoseconds. - Weight::from_parts(2_056_817, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(10_722, 0).saturating_mul(r.into())) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_989_633, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(10_649, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_988_892, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_683, 0).saturating_mul(r.into())) + // Minimum execution time: 1_715_000 picoseconds. + Weight::from_parts(1_994_636, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_660_000 picoseconds. - Weight::from_parts(2_148_537, 0) - // Standard Error: 38 - .saturating_add(Weight::from_parts(5_756, 0).saturating_mul(r.into())) + // Minimum execution time: 1_685_000 picoseconds. + Weight::from_parts(2_075_238, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_743, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_629_000 picoseconds. - Weight::from_parts(1_955_010, 0) + // Minimum execution time: 1_649_000 picoseconds. + Weight::from_parts(1_911_373, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(5_931, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_894, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_569_000 picoseconds. - Weight::from_parts(1_982_403, 0) + // Minimum execution time: 1_682_000 picoseconds. + Weight::from_parts(2_000_076, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_867, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_932, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_615_000 picoseconds. - Weight::from_parts(1_989_920, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_137, 0).saturating_mul(r.into())) + // Minimum execution time: 1_686_000 picoseconds. + Weight::from_parts(1_999_600, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_129, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_646_000 picoseconds. - Weight::from_parts(2_020_935, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_863, 0).saturating_mul(r.into())) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(1_893_440, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(5_938, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_661_000 picoseconds. - Weight::from_parts(2_320_710, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(5_922, 0).saturating_mul(r.into())) + // Minimum execution time: 1_721_000 picoseconds. + Weight::from_parts(1_982_227, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_674_000 picoseconds. - Weight::from_parts(2_044_188, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_855, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(2_003_359, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_875, 0).saturating_mul(r.into())) } } From 2081eaea3042daccf25b3075d2702e15c6f1838a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 16 May 2023 15:49:04 +0200 Subject: [PATCH 68/74] fix clippy --- frame/contracts/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 44b86e446be9f..e0c0d2b6c8bfa 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -576,11 +576,11 @@ fn migration_in_progress_works() { Error::::MigrationInProgress, ); assert_err!( - Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash.clone()), + Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash), Error::::MigrationInProgress, ); assert_err!( - Contracts::set_code(RuntimeOrigin::signed(ALICE), BOB.clone(), code_hash.clone()), + Contracts::set_code(RuntimeOrigin::signed(ALICE), BOB.clone(), code_hash), Error::::MigrationInProgress, ); assert_err_ignore_postinfo!( From aaac76835725e3572d7f7aee5ee82579ecdf36ac Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 16 May 2023 22:17:03 +0200 Subject: [PATCH 69/74] PR review --- frame/contracts/src/benchmarking/mod.rs | 2 ++ frame/contracts/src/lib.rs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 772c5538e2c98..b98c05f2503c2 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -1,3 +1,5 @@ +// This file is part of Substrate. + // Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 5c460ec53cb81..e5750893f4ca5 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -735,6 +735,10 @@ pub mod pallet { ) } + /// When a migration is in progress, this dispatchable can be used to run migration steps. + /// Calls that contribute to advancing the migration have their fees waived, as it's helpful + /// for the chain. Note that while the migration is in progress, the pallet will also + /// leverage the `on_idle` hooks to run migration steps. #[pallet::call_index(9)] #[pallet::weight(T::WeightInfo::migrate().saturating_add(*weight_limit))] pub fn migrate(origin: OriginFor, weight_limit: Weight) -> DispatchResultWithPostInfo { @@ -913,8 +917,6 @@ pub mod pallet { MigrationInProgress, /// Migrate dispatch call was attempted but no migration was performed. NoMigrationPerformed, - /// The weight limit for a migration dispatch call was too low. - MigrateWeightLimitTooLow, } /// A mapping from an original code hash to the original code, untouched by instrumentation. From c2e587da7d847438bbc1e4f6562944f8e4a7f69d Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Tue, 16 May 2023 22:41:04 +0200 Subject: [PATCH 70/74] Update frame/contracts/src/lib.rs Co-authored-by: Sasha Gryaznov --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e5750893f4ca5..779b713795b64 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1433,7 +1433,7 @@ impl Pallet { /// Query storage of a specified contract under a specified key. pub fn get_storage(address: T::AccountId, key: Vec) -> GetStorageResult { - if let Err(_) = Migration::::ensure_migrated() { + if Migration::::in_progress() { return Err(ContractAccessError::MigrationInProgress) } let contract_info = From 1fc403508ff555e2b18d29c98cc823655b2ad7b5 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 26 May 2023 14:05:04 +0200 Subject: [PATCH 71/74] Fix master merge --- frame/contracts/src/migration.rs | 16 ++++++++-------- frame/contracts/src/migration/v10.rs | 24 ++++++++++++------------ frame/contracts/src/migration/v11.rs | 8 ++++---- frame/contracts/src/migration/v9.rs | 14 +++++++------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 946f848c3892a..f31497dd59b0c 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -106,13 +106,13 @@ pub trait Migrate: Codec + MaxEncodedLen + Default { /// Execute some pre-checks prior to running the first step of this migration. #[cfg(feature = "try-runtime")] - fn pre_upgrade_step() -> Result, &'static str> { + fn pre_upgrade_step() -> Result, TryRuntimeError> { Ok(Vec::new()) } /// Execute some post-checks after running the last step of this migration. #[cfg(feature = "try-runtime")] - fn post_upgrade_step(_state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(_state: Vec) -> Result<(), TryRuntimeError> { Ok(()) } } @@ -166,12 +166,12 @@ pub trait MigrateSequence: private::Sealed { fn new(version: StorageVersion) -> Cursor; #[cfg(feature = "try-runtime")] - fn pre_upgrade_step(_version: StorageVersion) -> Result, &'static str> { + fn pre_upgrade_step(_version: StorageVersion) -> Result, TryRuntimeError> { Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(_version: StorageVersion, _state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(_version: StorageVersion, _state: Vec) -> Result<(), TryRuntimeError> { Ok(()) } @@ -214,7 +214,7 @@ pub struct Migration, NoopMigr #[cfg(feature = "try-runtime")] impl Migration { - fn run_all_steps() -> Result<(), &'static str> { + fn run_all_steps() -> Result<(), TryRuntimeError> { let mut weight = Weight::zero(); let name = >::name(); loop { @@ -281,7 +281,7 @@ impl OnRuntimeUpgrade for Migration { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { // We can't really do much here as our migrations do not happen during the runtime upgrade. // Instead, we call the migrations `pre_upgrade` and `post_upgrade` hooks when we iterate // over our migrations. @@ -434,7 +434,7 @@ impl MigrateSequence for Tuple { #[cfg(feature = "try-runtime")] /// Execute the pre-checks of the step associated with this version. - fn pre_upgrade_step(version: StorageVersion) -> Result, &'static str> { + fn pre_upgrade_step(version: StorageVersion) -> Result, TryRuntimeError> { for_tuples!( #( if version == Tuple::VERSION { @@ -447,7 +447,7 @@ impl MigrateSequence for Tuple { #[cfg(feature = "try-runtime")] /// Execute the post-checks of the step associated with this version. - fn post_upgrade_step(version: StorageVersion, state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(version: StorageVersion, state: Vec) -> Result<(), TryRuntimeError> { for_tuples!( #( if version == Tuple::VERSION { diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 2fb8dc4585f3f..734d156070ba8 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -229,7 +229,7 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn pre_upgrade_step() -> Result, &'static str> { + fn pre_upgrade_step() -> Result, TryRuntimeError> { let sample: Vec<_> = old::ContractInfoOf::::iter().take(10).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contracts", sample.len()); @@ -237,7 +237,7 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let sample = )> as Decode>::decode(&mut &state[..]).unwrap(); @@ -246,21 +246,21 @@ impl Migrate for Migration { log::debug!(target: LOG_TARGET, "==="); log::debug!(target: LOG_TARGET, "Account: 0x{} ", HexDisplay::from(&account.encode())); let contract = ContractInfoOf::::get(&account).unwrap(); - assert_eq!(old_contract.trie_id, contract.trie_id); - assert_eq!(old_contract.code_hash, contract.code_hash); - assert_eq!(old_contract.storage_bytes, contract.storage_bytes); - assert_eq!(old_contract.storage_items, contract.storage_items); + ensure!(old_contract.trie_id == contract.trie_id); + ensure!(old_contract.code_hash == contract.code_hash); + ensure!(old_contract.storage_bytes == contract.storage_bytes); + ensure!(old_contract.storage_items == contract.storage_items); let deposit = <::Currency as frame_support::traits::Currency<_>>::total_balance( &contract.deposit_account, ); - assert_eq!( - deposit, - contract - .storage_base_deposit - .saturating_add(contract.storage_item_deposit) - .saturating_add(contract.storage_byte_deposit), + ensure!( + deposit == + contract + .storage_base_deposit + .saturating_add(contract.storage_item_deposit) + .saturating_add(contract.storage_byte_deposit), "deposit mismatch" ); } diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index f4c74b4329630..1f6b170b4ad75 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -101,7 +101,7 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn pre_upgrade_step() -> Result, &'static str> { + fn pre_upgrade_step() -> Result, TryRuntimeError> { let old_queue = old::DeletionQueue::::take().unwrap_or_default(); if old_queue.is_empty() { @@ -118,11 +118,11 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let len = ::decode(&mut &state[..]).unwrap(); let counter = >::get(); - assert_eq!(counter.insert_counter, len); - assert_eq!(counter.delete_counter, 0); + ensure!(counter.insert_counter == len); + ensure!(counter.delete_counter == 0); Ok(()) } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index e2a6bd17008dc..f7078d699d0bb 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -115,7 +115,7 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn pre_upgrade_step() -> Result, &'static str> { + fn pre_upgrade_step() -> Result, TryRuntimeError> { let sample: Vec<_> = old::CodeStorage::::iter().take(100).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contract codes", sample.len()); @@ -123,18 +123,18 @@ impl Migrate for Migration { } #[cfg(feature = "try-runtime")] - fn post_upgrade_step(state: Vec) -> Result<(), &'static str> { + fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let sample = , old::PrefabWasmModule)> as Decode>::decode(&mut &state[..]).unwrap(); log::debug!(target: LOG_TARGET, "Validating sample of {} contract codes", sample.len()); for (code_hash, old) in sample { let module = CodeStorage::::get(&code_hash).unwrap(); - assert_eq!(module.instruction_weights_version, old.instruction_weights_version); - assert_eq!(module.determinism, Determinism::Enforced); - assert_eq!(module.initial, old.initial); - assert_eq!(module.maximum, old.maximum); - assert_eq!(module.code, old.code); + ensure!(module.instruction_weights_version == old.instruction_weights_version); + ensure!(module.determinism == Determinism::Enforced); + ensure!(module.initial == old.initial); + ensure!(module.maximum == old.maximum); + ensure!(module.code == old.code); } Ok(()) From 0b9c16cc4da4ea2d973ed0f783c2804b281af06c Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 26 May 2023 16:05:02 +0200 Subject: [PATCH 72/74] fix merge 2 --- frame/support/src/traits/hooks.rs | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/frame/support/src/traits/hooks.rs b/frame/support/src/traits/hooks.rs index bcf1b3d573ec2..8e8b12d0817c4 100644 --- a/frame/support/src/traits/hooks.rs +++ b/frame/support/src/traits/hooks.rs @@ -22,6 +22,9 @@ use impl_trait_for_tuples::impl_for_tuples; use sp_runtime::traits::AtLeast32BitUnsigned; use sp_std::prelude::*; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; + /// The block initialization trait. /// /// Implementing this lets you express what should happen for your pallet when the block is @@ -136,7 +139,7 @@ pub trait OnRuntimeUpgrade { /// Same as `on_runtime_upgrade`, but perform the optional `pre_upgrade` and `post_upgrade` as /// well. #[cfg(feature = "try-runtime")] - fn try_on_runtime_upgrade(checks: bool) -> Result { + fn try_on_runtime_upgrade(checks: bool) -> Result { let maybe_state = if checks { let _guard = frame_support::StorageNoopGuard::default(); let state = Self::pre_upgrade()?; @@ -167,7 +170,7 @@ pub trait OnRuntimeUpgrade { /// This hook must not write to any state, as it would make the main `on_runtime_upgrade` path /// inaccurate. #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { Ok(Vec::new()) } @@ -182,7 +185,7 @@ pub trait OnRuntimeUpgrade { /// This hook must not write to any state, as it would make the main `on_runtime_upgrade` path /// inaccurate. #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { Ok(()) } } @@ -201,7 +204,7 @@ impl OnRuntimeUpgrade for Tuple { /// consecutive migrations for the same pallet without errors. Therefore pre and post upgrade /// hooks for tuples are a noop. #[cfg(feature = "try-runtime")] - fn try_on_runtime_upgrade(checks: bool) -> Result { + fn try_on_runtime_upgrade(checks: bool) -> Result { let mut weight = Weight::zero(); let mut errors = Vec::new(); @@ -224,12 +227,12 @@ impl OnRuntimeUpgrade for Tuple { errors.iter().for_each(|err| { log::error!( target: "try-runtime", - "{}", + "{:?}", err ); }); - return Err("Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!"); + return Err("Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!".into()) } Ok(weight) @@ -305,7 +308,7 @@ pub trait Hooks { /// /// This hook should not alter any storage. #[cfg(feature = "try-runtime")] - fn try_state(_n: BlockNumber) -> Result<(), &'static str> { + fn try_state(_n: BlockNumber) -> Result<(), TryRuntimeError> { Ok(()) } @@ -317,7 +320,7 @@ pub trait Hooks { /// /// This hook is never meant to be executed on-chain but is meant to be used by testing tools. #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { Ok(Vec::new()) } @@ -329,7 +332,7 @@ pub trait Hooks { /// /// This hook is never meant to be executed on-chain but is meant to be used by testing tools. #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { Ok(()) } @@ -358,13 +361,13 @@ pub trait Hooks { /// A trait to define the build function of a genesis config, T and I are placeholder for pallet /// trait and pallet instance. -#[cfg(feature = "std")] pub trait GenesisBuild: Default + sp_runtime::traits::MaybeSerializeDeserialize { /// The build function is called within an externalities allowing storage APIs. /// Thus one can write to storage using regular pallet storages. fn build(&self); /// Build the storage using `build` inside default storage. + #[cfg(feature = "std")] fn build_storage(&self) -> Result { let mut storage = Default::default(); self.assimilate_storage(&mut storage)?; @@ -372,6 +375,7 @@ pub trait GenesisBuild: Default + sp_runtime::traits::MaybeSerializeD } /// Assimilate the storage for this module into pre-existing overlays. + #[cfg(feature = "std")] fn assimilate_storage(&self, storage: &mut sp_runtime::Storage) -> Result<(), String> { sp_state_machine::BasicExternalities::execute_with_storage(storage, || { self.build(); @@ -411,13 +415,13 @@ mod tests { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { Pre::mutate(|s| s.push(stringify!($name))); Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade(_: Vec) -> Result<(), &'static str> { + fn post_upgrade(_: Vec) -> Result<(), TryRuntimeError> { Post::mutate(|s| s.push(stringify!($name))); Ok(()) } @@ -525,3 +529,4 @@ mod tests { } } } + From 25ada0f53e66f7bd8f7093c854702ca793a11e71 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Sun, 28 May 2023 21:55:22 +0200 Subject: [PATCH 73/74] fix tryruntime --- frame/contracts/src/migration.rs | 26 ++++++++++++++------------ frame/contracts/src/migration/v10.rs | 10 ++++++---- frame/contracts/src/migration/v11.rs | 6 ++++-- frame/contracts/src/migration/v9.rs | 17 ++++++++++++----- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index f31497dd59b0c..a75d5cc1a1f4d 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -44,6 +44,9 @@ use sp_std::marker::PhantomData; #[cfg(feature = "try-runtime")] use sp_std::prelude::*; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; + const PROOF_ENCODE: &str = "Tuple::max_encoded_len() < Cursor::max_encoded_len()` is verified in `Self::integrity_test()`; qed"; const PROOF_DECODE: &str = "We encode to the same type in this trait only. No other code touches this item; qed"; @@ -287,18 +290,17 @@ impl OnRuntimeUpgrade for Migration { // over our migrations. let storage_version = >::on_chain_storage_version(); let target_version = >::current_storage_version(); - if M::is_upgrade_supported(storage_version, target_version) { - Ok(Vec::new()) - } else { - let name = >::name(); - log::error!( - target: LOG_TARGET, - "{name}: Range supported {:?}, range requested {:?}", - M::VERSION_RANGE, - (storage_version, target_version) - ); - Err("New runtime does not contain the required migrations to perform this upgrade.") - } + + log::debug!( + target: LOG_TARGET, + "{}: Range supported {:?}, range requested {:?}", + >::name(), + M::VERSION_RANGE, + (storage_version, target_version) + ); + + ensure!(M::is_upgrade_supported(storage_version, target_version), "Unsupported upgrade"); + Ok(Default::default()) } } diff --git a/frame/contracts/src/migration/v10.rs b/frame/contracts/src/migration/v10.rs index 734d156070ba8..cddf67a53c4f8 100644 --- a/frame/contracts/src/migration/v10.rs +++ b/frame/contracts/src/migration/v10.rs @@ -39,6 +39,8 @@ use frame_support::{ DefaultNoBound, }; use sp_core::hexdisplay::HexDisplay; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; use sp_runtime::{traits::Zero, Perbill, Saturating}; use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; @@ -246,10 +248,10 @@ impl Migrate for Migration { log::debug!(target: LOG_TARGET, "==="); log::debug!(target: LOG_TARGET, "Account: 0x{} ", HexDisplay::from(&account.encode())); let contract = ContractInfoOf::::get(&account).unwrap(); - ensure!(old_contract.trie_id == contract.trie_id); - ensure!(old_contract.code_hash == contract.code_hash); - ensure!(old_contract.storage_bytes == contract.storage_bytes); - ensure!(old_contract.storage_items == contract.storage_items); + ensure!(old_contract.trie_id == contract.trie_id, "invalid trie_id"); + ensure!(old_contract.code_hash == contract.code_hash, "invalid code_hash"); + ensure!(old_contract.storage_bytes == contract.storage_bytes, "invalid storage_bytes"); + ensure!(old_contract.storage_items == contract.storage_items, "invalid storage_items"); let deposit = <::Currency as frame_support::traits::Currency<_>>::total_balance( diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 1f6b170b4ad75..27a4b96431e06 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -23,6 +23,8 @@ use crate::{ weights::WeightInfo, Config, Pallet, TrieId, Weight, LOG_TARGET, }; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; use codec::{Decode, Encode}; use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; @@ -121,8 +123,8 @@ impl Migrate for Migration { fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let len = ::decode(&mut &state[..]).unwrap(); let counter = >::get(); - ensure!(counter.insert_counter == len); - ensure!(counter.delete_counter == 0); + ensure!(counter.insert_counter == len, "invalid insert counter"); + ensure!(counter.delete_counter == 0, "invalid delete counter"); Ok(()) } } diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v9.rs index f7078d699d0bb..3dd86a89cf06d 100644 --- a/frame/contracts/src/migration/v9.rs +++ b/frame/contracts/src/migration/v9.rs @@ -26,6 +26,8 @@ use codec::{Decode, Encode}; use frame_support::{ codec, pallet_prelude::*, storage_alias, BoundedVec, DefaultNoBound, Identity, }; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; use sp_std::{marker::PhantomData, prelude::*}; mod old { @@ -130,11 +132,16 @@ impl Migrate for Migration { log::debug!(target: LOG_TARGET, "Validating sample of {} contract codes", sample.len()); for (code_hash, old) in sample { let module = CodeStorage::::get(&code_hash).unwrap(); - ensure!(module.instruction_weights_version == old.instruction_weights_version); - ensure!(module.determinism == Determinism::Enforced); - ensure!(module.initial == old.initial); - ensure!(module.maximum == old.maximum); - ensure!(module.code == old.code); + ensure!( + module.instruction_weights_version == old.instruction_weights_version, + "invalid isntruction weights version" + ); + ensure!(module.determinism == Determinism::Enforced, "invalid determinism"); + ensure!(module.initial == old.initial, "invalid initial"); + ensure!(module.maximum == old.maximum, "invalid maximum"); + ensure!(module.code == old.code, "invalid code"); + ensure!(module.maximum == old.maximum, "invalid maximum"); + ensure!(module.code == old.code, "invalid code"); } Ok(()) From 7d5e934b7eac9cc112c0343307842c23feac2d6e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 29 May 2023 10:02:20 +0200 Subject: [PATCH 74/74] fix lint --- frame/support/src/traits/hooks.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/support/src/traits/hooks.rs b/frame/support/src/traits/hooks.rs index 8e8b12d0817c4..7dda6624ffe65 100644 --- a/frame/support/src/traits/hooks.rs +++ b/frame/support/src/traits/hooks.rs @@ -529,4 +529,3 @@ mod tests { } } } -