diff --git a/bin/node/executor/tests/basic.rs b/bin/node/executor/tests/basic.rs index fc4e138faafc2..c88703b929e6b 100644 --- a/bin/node/executor/tests/basic.rs +++ b/bin/node/executor/tests/basic.rs @@ -654,7 +654,8 @@ fn deploying_wasm_contract_should_work() { let transfer_code = wat::parse_str(CODE_TRANSFER).unwrap(); let transfer_ch = ::Hashing::hash(&transfer_code); - let addr = pallet_contracts::Pallet::::contract_address(&charlie(), &transfer_ch, &[]); + let addr = + pallet_contracts::Pallet::::contract_address(&charlie(), &transfer_ch, &[], &[]); let time = 42 * 1000; let b = construct_block( diff --git a/frame/contracts/proc-macro/src/lib.rs b/frame/contracts/proc-macro/src/lib.rs index a8f95bd10cff8..ded5880a2df4d 100644 --- a/frame/contracts/proc-macro/src/lib.rs +++ b/frame/contracts/proc-macro/src/lib.rs @@ -404,11 +404,7 @@ fn expand_impls(def: &mut EnvDef) -> TokenStream2 { let dummy_impls = expand_functions(def, false, quote! { () }); quote! { - impl<'a, E> crate::wasm::Environment> for Env - where - E: Ext, - ::AccountId: - ::sp_core::crypto::UncheckedFrom<::Hash> + ::core::convert::AsRef<[::core::primitive::u8]>, + impl<'a, E: Ext> crate::wasm::Environment> for Env { fn define(store: &mut ::wasmi::Store>, linker: &mut ::wasmi::Linker>, allow_unstable: bool) -> Result<(), ::wasmi::errors::LinkerError> { #impls diff --git a/frame/contracts/src/benchmarking/code.rs b/frame/contracts/src/benchmarking/code.rs index 2074e1867d506..0b09726214260 100644 --- a/frame/contracts/src/benchmarking/code.rs +++ b/frame/contracts/src/benchmarking/code.rs @@ -26,7 +26,6 @@ use crate::{Config, Determinism}; use frame_support::traits::Get; -use sp_core::crypto::UncheckedFrom; use sp_runtime::traits::Hash; use sp_std::{borrow::ToOwned, prelude::*}; use wasm_instrument::{ @@ -105,11 +104,7 @@ pub struct ImportedMemory { } impl ImportedMemory { - pub fn max() -> Self - where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, - { + pub fn max() -> Self { let pages = max_pages::(); Self { min_pages: pages, max_pages: pages } } @@ -130,11 +125,7 @@ pub struct WasmModule { pub memory: Option, } -impl From for WasmModule -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl From for WasmModule { fn from(def: ModuleDefinition) -> Self { // internal functions start at that offset. let func_offset = u32::try_from(def.imported_functions.len()).unwrap(); @@ -259,11 +250,7 @@ where } } -impl WasmModule -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl WasmModule { /// Uses the supplied wasm module and instruments it when requested. pub fn instrumented(code: &[u8], inject_gas: bool, inject_stack: bool) -> Self { let module = { @@ -533,11 +520,7 @@ pub mod body { } /// The maximum amount of pages any contract is allowed to have according to the current `Schedule`. -pub fn max_pages() -> u32 -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +pub fn max_pages() -> u32 { T::Schedule::get().limits.memory_pages } diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 6b8701ac84d96..da9b53495d077 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -63,8 +63,6 @@ struct Contract { impl Contract where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, as HasCompact>::Type: Clone + Eq + PartialEq + Debug + TypeInfo + Encode, { /// Create new contract and use a default account id as instantiator. @@ -90,7 +88,7 @@ where let value = Pallet::::min_balance(); T::Currency::make_free_balance_be(&caller, caller_funding::()); let salt = vec![0xff]; - let addr = Contracts::::contract_address(&caller, &module.hash, &salt); + let addr = Contracts::::contract_address(&caller, &module.hash, &data, &salt); Contracts::::store_code_raw(module.code, caller.clone())?; Contracts::::instantiate( @@ -203,8 +201,6 @@ macro_rules! load_benchmark { benchmarks! { where_clause { where - T::AccountId: UncheckedFrom, - T::AccountId: AsRef<[u8]>, as codec::HasCompact>::Type: Clone + Eq + PartialEq + sp_std::fmt::Debug + scale_info::TypeInfo + codec::Encode, } @@ -270,6 +266,7 @@ benchmarks! { // a code of that size into the sandbox. // // `c`: Size of the code in kilobytes. + // `i`: Size of the input in kilobytes. // `s`: Size of the salt in kilobytes. // // # Note @@ -278,15 +275,17 @@ benchmarks! { // to be larger than the maximum size **after instrumentation**. instantiate_with_code { let c in 0 .. Perbill::from_percent(49).mul_ceil(T::MaxCodeLen::get()); + let i in 0 .. code::max_pages::() * 64 * 1024; let s in 0 .. code::max_pages::() * 64 * 1024; + let input = vec![42u8; i as usize]; let salt = vec![42u8; s as usize]; let value = Pallet::::min_balance(); let caller = whitelisted_caller(); T::Currency::make_free_balance_be(&caller, caller_funding::()); let WasmModule { code, hash, .. } = WasmModule::::sized(c, Location::Call); let origin = RawOrigin::Signed(caller.clone()); - let addr = Contracts::::contract_address(&caller, &hash, &salt); - }: _(origin, value, Weight::MAX, None, code, vec![], salt) + let addr = Contracts::::contract_address(&caller, &hash, &input, &salt); + }: _(origin, value, Weight::MAX, None, code, input, salt) verify { // the contract itself does not trigger any reserves let deposit = T::Currency::reserved_balance(&addr); @@ -303,18 +302,21 @@ benchmarks! { } // Instantiate uses a dummy contract constructor to measure the overhead of the instantiate. + // `i`: Size of the input in kilobytes. // `s`: Size of the salt in kilobytes. instantiate { + let i in 0 .. code::max_pages::() * 64 * 1024; let s in 0 .. code::max_pages::() * 64 * 1024; + let input = vec![42u8; i as usize]; let salt = vec![42u8; s as usize]; let value = Pallet::::min_balance(); let caller = whitelisted_caller(); T::Currency::make_free_balance_be(&caller, caller_funding::()); let WasmModule { code, hash, .. } = WasmModule::::dummy(); let origin = RawOrigin::Signed(caller.clone()); - let addr = Contracts::::contract_address(&caller, &hash, &salt); + let addr = Contracts::::contract_address(&caller, &hash, &input, &salt); Contracts::::store_code_raw(code, caller.clone())?; - }: _(origin, value, Weight::MAX, None, hash, vec![], salt) + }: _(origin, value, Weight::MAX, None, hash, input, salt) verify { // the contract itself does not trigger any reserves let deposit = T::Currency::reserved_balance(&addr); @@ -1779,7 +1781,7 @@ benchmarks! { let addresses = hashes .iter() .map(|hash| Contracts::::contract_address( - &instance.account_id, hash, &[], + &instance.account_id, hash, &[], &[], )) .collect::>(); @@ -1796,8 +1798,9 @@ benchmarks! { } } - seal_instantiate_per_transfer_salt_kb { + seal_instantiate_per_transfer_input_salt_kb { let t in 0 .. 1; + let i in 0 .. (code::max_pages::() - 1) * 64; let s in 0 .. (code::max_pages::() - 1) * 64; let callee_code = WasmModule::::dummy(); let hash = callee_code.hash; @@ -1865,14 +1868,14 @@ benchmarks! { Regular(Instruction::I64Const(0)), // gas Regular(Instruction::I32Const(value_offset as i32)), // value_ptr Regular(Instruction::I32Const(value_len as i32)), // value_len - Regular(Instruction::I32Const(0)), // input_data_ptr - Regular(Instruction::I32Const(0)), // input_data_len + Counter(salt_offset as u32, salt_len as u32), // input_data_ptr + Regular(Instruction::I32Const((i * 1024) as i32)), // input_data_len Regular(Instruction::I32Const((addr_len_offset + addr_len) as i32)), // address_ptr Regular(Instruction::I32Const(addr_len_offset as i32)), // address_len_ptr Regular(Instruction::I32Const(SENTINEL as i32)), // output_ptr Regular(Instruction::I32Const(0)), // output_len_ptr Counter(salt_offset as u32, salt_len as u32), // salt_ptr - Regular(Instruction::I32Const((s * 1024).max(salt_len as u32) as i32)), // salt_len + Regular(Instruction::I32Const((s * 1024) as i32)), // salt_len Regular(Instruction::Call(0)), Regular(Instruction::I32Eqz), Regular(Instruction::If(BlockType::NoResult)), diff --git a/frame/contracts/src/benchmarking/sandbox.rs b/frame/contracts/src/benchmarking/sandbox.rs index a35aad3500109..5d080bad92516 100644 --- a/frame/contracts/src/benchmarking/sandbox.rs +++ b/frame/contracts/src/benchmarking/sandbox.rs @@ -20,7 +20,6 @@ /// ! environment that provides the seal interface as imported functions. use super::{code::WasmModule, Config}; use crate::wasm::{Environment, PrefabWasmModule}; -use sp_core::crypto::UncheckedFrom; use wasmi::{errors::LinkerError, Func, Linker, StackLimits, Store}; /// Minimal execution environment without any imported functions. @@ -36,11 +35,7 @@ impl Sandbox { } } -impl From<&WasmModule> for Sandbox -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl From<&WasmModule> for Sandbox { /// Creates an instance from the supplied module and supplies as much memory /// to the instance as the module declares as imported. fn from(module: &WasmModule) -> Self { diff --git a/frame/contracts/src/chain_extension.rs b/frame/contracts/src/chain_extension.rs index 3c3e9b1ef0f59..dfa9c7c2de268 100644 --- a/frame/contracts/src/chain_extension.rs +++ b/frame/contracts/src/chain_extension.rs @@ -83,7 +83,6 @@ use sp_std::{marker::PhantomData, vec::Vec}; pub use crate::{exec::Ext, Config}; pub use frame_system::Config as SysConfig; pub use pallet_contracts_primitives::ReturnFlags; -pub use sp_core::crypto::UncheckedFrom; /// Result that returns a [`DispatchError`] on error. pub type Result = sp_std::result::Result; @@ -114,10 +113,7 @@ pub trait ChainExtension { /// In case of `Err` the contract execution is immediately suspended and the passed error /// is returned to the caller. Otherwise the value of [`RetVal`] determines the exit /// behaviour. - fn call(&mut self, env: Environment) -> Result - where - E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>; + fn call>(&mut self, env: Environment) -> Result; /// Determines whether chain extensions are enabled for this chain. /// @@ -153,11 +149,7 @@ pub trait RegisteredChainExtension: ChainExtension { #[impl_trait_for_tuples::impl_for_tuples(10)] #[tuple_types_custom_trait_bound(RegisteredChainExtension)] impl ChainExtension for Tuple { - fn call(&mut self, mut env: Environment) -> Result - where - E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, - { + fn call>(&mut self, mut env: Environment) -> Result { for_tuples!( #( if (Tuple::ID == env.ext_id()) && Tuple::enabled() { @@ -205,10 +197,7 @@ pub struct Environment<'a, 'b, E: Ext, S: State> { } /// Functions that are available in every state of this type. -impl<'a, 'b, E: Ext, S: State> Environment<'a, 'b, E, S> -where - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, -{ +impl<'a, 'b, E: Ext, S: State> Environment<'a, 'b, E, S> { /// The function id within the `id` passed by a contract. /// /// It returns the two least significant bytes of the `id` passed by a contract as the other @@ -326,10 +315,7 @@ impl<'a, 'b, E: Ext, S: PrimOut> Environment<'a, 'b, E, S> { } /// Functions to use the input arguments as pointer to a buffer. -impl<'a, 'b, E: Ext, S: BufIn> Environment<'a, 'b, E, S> -where - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, -{ +impl<'a, 'b, E: Ext, S: BufIn> Environment<'a, 'b, E, S> { /// Reads `min(max_len, in_len)` from contract memory. /// /// This does **not** charge any weight. The caller must make sure that the an @@ -401,10 +387,7 @@ where } /// Functions to use the output arguments as pointer to a buffer. -impl<'a, 'b, E: Ext, S: BufOut> Environment<'a, 'b, E, S> -where - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, -{ +impl<'a, 'b, E: Ext, S: BufOut> Environment<'a, 'b, E, S> { /// Write the supplied buffer to contract memory. /// /// If the contract supplied buffer is smaller than the passed `buffer` an `Err` is returned. diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 945095dc20329..f4dc3a0ec0250 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -32,7 +32,7 @@ use frame_support::{ use frame_system::RawOrigin; use pallet_contracts_primitives::ExecReturnValue; use smallvec::{Array, SmallVec}; -use sp_core::{crypto::UncheckedFrom, ecdsa::Public as ECDSAPublic}; +use sp_core::ecdsa::Public as ECDSAPublic; use sp_io::{crypto::secp256k1_ecdsa_recover_compressed, hashing::blake2_256}; use sp_runtime::traits::{Convert, Hash}; use sp_std::{marker::PhantomData, mem, prelude::*}; @@ -475,6 +475,8 @@ enum FrameArgs<'a, T: Config, E> { executable: E, /// A salt used in the contract address deriviation of the new contract. salt: &'a [u8], + /// The input data is used in the contract address deriviation of the new contract. + input_data: &'a [u8], }, } @@ -596,7 +598,6 @@ impl CachedContract { impl<'a, T, E> Stack<'a, T, E> where T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, E: Executable, { /// Create and run a new call stack by calling into `dest`. @@ -660,6 +661,7 @@ where nonce: >::get().wrapping_add(1), executable, salt, + input_data: input_data.as_ref(), }, origin, gas_meter, @@ -742,9 +744,13 @@ where (dest, contract, executable, delegate_caller, ExportedFunction::Call, None) }, - FrameArgs::Instantiate { sender, nonce, executable, salt } => { - let account_id = - >::contract_address(&sender, executable.code_hash(), salt); + FrameArgs::Instantiate { sender, nonce, executable, salt, input_data } => { + let account_id = Contracts::::contract_address( + &sender, + executable.code_hash(), + input_data, + salt, + ); let trie_id = Storage::::generate_trie_id(&account_id, nonce); let contract = Storage::::new_contract(&account_id, trie_id, *executable.code_hash())?; @@ -1080,7 +1086,6 @@ where impl<'a, T, E> Ext for Stack<'a, T, E> where T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, E: Executable, { type T = T; @@ -1167,6 +1172,7 @@ where nonce, executable, salt, + input_data: input_data.as_ref(), }, value, gas_limit, diff --git a/frame/contracts/src/gas.rs b/frame/contracts/src/gas.rs index c0cc2db2aa3eb..ccbe680b2f767 100644 --- a/frame/contracts/src/gas.rs +++ b/frame/contracts/src/gas.rs @@ -23,7 +23,6 @@ use frame_support::{ weights::Weight, DefaultNoBound, }; -use sp_core::crypto::UncheckedFrom; use sp_runtime::traits::Zero; use sp_std::marker::PhantomData; @@ -86,10 +85,7 @@ pub struct GasMeter { tokens: Vec, } -impl GasMeter -where - T::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, -{ +impl GasMeter { pub fn new(gas_limit: Weight) -> Self { GasMeter { gas_limit, diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index b76acf9d1db08..39626e43f4653 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -105,7 +105,7 @@ use crate::{ wasm::{OwnerInfo, PrefabWasmModule, TryInstantiate}, weights::WeightInfo, }; -use codec::{Codec, Encode, HasCompact}; +use codec::{Codec, Decode, Encode, HasCompact}; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo}, ensure, @@ -123,8 +123,7 @@ use pallet_contracts_primitives::{ StorageDeposit, }; use scale_info::TypeInfo; -use sp_core::crypto::UncheckedFrom; -use sp_runtime::traits::{Convert, Hash, Saturating, StaticLookup}; +use sp_runtime::traits::{Convert, Hash, Saturating, StaticLookup, TrailingZeroInput}; use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; pub use crate::{ @@ -155,7 +154,7 @@ const SENTINEL: u32 = u32::MAX; /// Provides the contract address generation method. /// /// See [`DefaultAddressGenerator`] for the default implementation. -pub trait AddressGenerator { +pub trait AddressGenerator { /// Generate the address of a contract based on the given instantiate parameters. /// /// # Note for implementors @@ -166,6 +165,7 @@ pub trait AddressGenerator { fn generate_address( deploying_address: &T::AccountId, code_hash: &CodeHash, + input_data: &[u8], salt: &[u8], ) -> T::AccountId; } @@ -176,28 +176,21 @@ pub trait AddressGenerator { /// is only dependant on its inputs. It can therefore be used to reliably predict the /// address of a contract. This is akin to the formula of eth's CREATE2 opcode. There /// is no CREATE equivalent because CREATE2 is strictly more powerful. -/// -/// Formula: `hash(deploying_address ++ code_hash ++ salt)` +/// Formula: +/// `hash("contract_addr_v1" ++ deploying_address ++ code_hash ++ input_data ++ salt)` pub struct DefaultAddressGenerator; -impl AddressGenerator for DefaultAddressGenerator -where - T: frame_system::Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl AddressGenerator for DefaultAddressGenerator { fn generate_address( deploying_address: &T::AccountId, code_hash: &CodeHash, + input_data: &[u8], salt: &[u8], ) -> T::AccountId { - let buf: Vec<_> = deploying_address - .as_ref() - .iter() - .chain(code_hash.as_ref()) - .chain(salt) - .cloned() - .collect(); - UncheckedFrom::unchecked_from(T::Hashing::hash(&buf)) + let entropy = (b"contract_addr_v1", deploying_address, code_hash, input_data, salt) + .using_encoded(T::Hashing::hash); + Decode::decode(&mut TrailingZeroInput::new(entropy.as_ref())) + .expect("infinite length input; no invalid inputs for type; qed") } } @@ -352,11 +345,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks> for Pallet - where - T::AccountId: UncheckedFrom, - T::AccountId: AsRef<[u8]>, - { + impl Hooks> for Pallet { fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { Storage::::process_deletion_queue_batch(remaining_weight) .saturating_add(T::WeightInfo::on_process_deletion_queue_batch()) @@ -385,8 +374,6 @@ pub mod pallet { #[pallet::call] impl Pallet where - T::AccountId: UncheckedFrom, - T::AccountId: AsRef<[u8]>, as HasCompact>::Type: Clone + Eq + PartialEq + Debug + TypeInfo + Encode, { /// Deprecated version if [`Self::call`] for use in an in-storage `Call`. @@ -415,7 +402,7 @@ pub mod pallet { /// Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`. #[pallet::call_index(1)] #[pallet::weight( - T::WeightInfo::instantiate_with_code(code.len() as u32, salt.len() as u32) + T::WeightInfo::instantiate_with_code(code.len() as u32, data.len() as u32, salt.len() as u32) .saturating_add(>::compat_weight(*gas_limit)) )] #[allow(deprecated)] @@ -445,7 +432,7 @@ pub mod pallet { /// Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`. #[pallet::call_index(2)] #[pallet::weight( - T::WeightInfo::instantiate(salt.len() as u32).saturating_add(>::compat_weight(*gas_limit)) + T::WeightInfo::instantiate(data.len() as u32, salt.len() as u32).saturating_add(>::compat_weight(*gas_limit)) )] #[allow(deprecated)] #[deprecated(note = "1D weight is used in this extrinsic, please migrate to `instantiate`")] @@ -633,7 +620,7 @@ pub mod pallet { /// - The `deploy` function is executed in the context of the newly-created account. #[pallet::call_index(7)] #[pallet::weight( - T::WeightInfo::instantiate_with_code(code.len() as u32, salt.len() as u32) + T::WeightInfo::instantiate_with_code(code.len() as u32, data.len() as u32, salt.len() as u32) .saturating_add(*gas_limit) )] pub fn instantiate_with_code( @@ -647,6 +634,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { 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; let mut output = Self::internal_instantiate( origin, @@ -665,7 +653,7 @@ pub mod pallet { } output.gas_meter.into_dispatch_result( output.result.map(|(_address, result)| result), - T::WeightInfo::instantiate_with_code(code_len, salt_len), + T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), ) } @@ -676,7 +664,7 @@ pub mod pallet { /// must be supplied. #[pallet::call_index(8)] #[pallet::weight( - T::WeightInfo::instantiate(salt.len() as u32).saturating_add(*gas_limit) + T::WeightInfo::instantiate(data.len() as u32, salt.len() as u32).saturating_add(*gas_limit) )] pub fn instantiate( origin: OriginFor, @@ -688,6 +676,7 @@ pub mod pallet { salt: Vec, ) -> DispatchResultWithPostInfo { let origin = ensure_signed(origin)?; + let data_len = data.len() as u32; let salt_len = salt.len() as u32; let mut output = Self::internal_instantiate( origin, @@ -706,7 +695,7 @@ pub mod pallet { } output.gas_meter.into_dispatch_result( output.result.map(|(_address, output)| output), - T::WeightInfo::instantiate(salt_len), + T::WeightInfo::instantiate(data_len, salt_len), ) } } @@ -943,10 +932,7 @@ struct InternalOutput { result: Result, } -impl Pallet -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl Pallet { /// Perform a call to a specified contract. /// /// This function is similar to [`Self::call`], but doesn't perform any address lookups @@ -1081,9 +1067,10 @@ where pub fn contract_address( deploying_address: &T::AccountId, code_hash: &CodeHash, + input_data: &[u8], salt: &[u8], ) -> T::AccountId { - T::AddressGenerator::generate_address(deploying_address, code_hash, salt) + T::AddressGenerator::generate_address(deploying_address, code_hash, input_data, salt) } /// Returns the code hash of the contract specified by `account` ID. diff --git a/frame/contracts/src/schedule.rs b/frame/contracts/src/schedule.rs index 4f2d3b61d0176..e7a6b16e23a2b 100644 --- a/frame/contracts/src/schedule.rs +++ b/frame/contracts/src/schedule.rs @@ -397,6 +397,9 @@ pub struct HostFnWeights { /// Weight surcharge that is claimed if `seal_instantiate` does a balance transfer. pub instantiate_transfer_surcharge: u64, + /// Weight per input byte supplied to `seal_instantiate`. + pub instantiate_per_input_byte: u64, + /// Weight per salt byte supplied to `seal_instantiate`. pub instantiate_per_salt_byte: u64, @@ -658,12 +661,20 @@ impl Default for HostFnWeights { call_per_cloned_byte: cost_batched_args!(seal_call_per_transfer_clone_kb, 0, 1), instantiate: cost_batched!(seal_instantiate), instantiate_transfer_surcharge: cost_byte_batched_args!( - seal_instantiate_per_transfer_salt_kb, + seal_instantiate_per_transfer_input_salt_kb, + 1, + 0, + 0 + ), + instantiate_per_input_byte: cost_byte_batched_args!( + seal_instantiate_per_transfer_input_salt_kb, + 0, 1, 0 ), instantiate_per_salt_byte: cost_byte_batched_args!( - seal_instantiate_per_transfer_salt_kb, + seal_instantiate_per_transfer_input_salt_kb, + 0, 0, 1 ), diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index c7644e696196f..d40cc755c315e 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -31,7 +31,6 @@ use frame_support::{ weights::Weight, }; use scale_info::TypeInfo; -use sp_core::crypto::UncheckedFrom; use sp_io::KillStorageResult; use sp_runtime::{ traits::{Hash, Saturating, Zero}, @@ -135,11 +134,7 @@ impl WriteOutcome { pub struct Storage(PhantomData); -impl Storage -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl Storage { /// Reads a storage kv pair of a contract. /// /// The read is performed from the `trie_id` only. The `address` is not necessary. If the @@ -317,11 +312,10 @@ where Weight::from_ref_time(ref_time_weight) } - /// Generates a unique trie id by returning `hash(account_id ++ nonce)`. + /// Generates a unique trie id by returning `hash(account_id ++ nonce)`. pub fn generate_trie_id(account_id: &AccountIdOf, nonce: u64) -> TrieId { - let buf: Vec<_> = account_id.as_ref().iter().chain(&nonce.to_le_bytes()).cloned().collect(); - T::Hashing::hash(&buf) - .as_ref() + let buf = (account_id, nonce).using_encoded(T::Hashing::hash); + buf.as_ref() .to_vec() .try_into() .expect("Runtime uses a reasonable hash size. Hence sizeof(T::Hash) <= 128; qed") diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 0a63eb42b86cb..94bca741af661 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -29,7 +29,6 @@ use frame_support::{ DefaultNoBound, RuntimeDebugNoBound, }; use pallet_contracts_primitives::StorageDeposit as Deposit; -use sp_core::crypto::UncheckedFrom; use sp_runtime::{ traits::{Saturating, Zero}, FixedPointNumber, FixedU128, @@ -255,7 +254,6 @@ impl Default for Contribution { impl RawMeter where T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, E: Ext, S: State, { @@ -325,7 +323,6 @@ where impl RawMeter where T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, E: Ext, { /// Create new storage meter for the specified `origin` and `limit`. @@ -361,7 +358,6 @@ where impl RawMeter where T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, E: Ext, { /// Try to charge the `diff` from the meter. Fails if this would exceed the original limit. @@ -441,11 +437,7 @@ where } } -impl Ext for ReservingExt -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl Ext for ReservingExt { fn check_limit( origin: &T::AccountId, limit: Option>, diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 6121d880ca8c5..85fe22ab9a19b 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -19,7 +19,7 @@ use self::test_utils::hash; use crate::{ chain_extension::{ ChainExtension, Environment, Ext, InitState, RegisteredChainExtension, - Result as ExtensionResult, RetVal, ReturnFlags, SysConfig, UncheckedFrom, + Result as ExtensionResult, RetVal, ReturnFlags, SysConfig, }, exec::{FixSizedKey, Frame}, storage::Storage, @@ -174,7 +174,6 @@ impl ChainExtension for TestExtension { fn call(&mut self, env: Environment) -> ExtensionResult where E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, { let func_id = env.func_id(); let id = env.ext_id() as u32 | func_id as u32; @@ -219,7 +218,6 @@ impl ChainExtension for RevertingExtension { fn call(&mut self, _env: Environment) -> ExtensionResult where E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, { Ok(RetVal::Diverging { flags: ReturnFlags::REVERT, data: vec![0x4B, 0x1D] }) } @@ -237,7 +235,6 @@ impl ChainExtension for DisabledExtension { fn call(&mut self, _env: Environment) -> ExtensionResult where E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, { panic!("Disabled chain extensions are never called") } @@ -255,7 +252,6 @@ impl ChainExtension for TempStorageExtension { fn call(&mut self, env: Environment) -> ExtensionResult where E: Ext, - ::AccountId: UncheckedFrom<::Hash> + AsRef<[u8]>, { let func_id = env.func_id(); match func_id { @@ -543,16 +539,19 @@ fn instantiate_and_call_and_deposit_event() { initialize_block(2); // Check at the end to get hash on error easily - assert_ok!(Contracts::instantiate( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, value, GAS_LIMIT, None, - code_hash, + Code::Existing(code_hash), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; assert!(ContractInfoOf::::contains_key(&addr)); assert_eq!( @@ -622,21 +621,24 @@ fn instantiate_and_call_and_deposit_event() { #[test] fn deposit_event_max_value_limit() { - let (wasm, code_hash) = compile_module::("event_size").unwrap(); + let (wasm, _code_hash) = compile_module::("event_size").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { // Create let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 30_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Call contract with allowed storage value. assert_ok!(Contracts::call( @@ -665,21 +667,24 @@ fn deposit_event_max_value_limit() { #[test] fn run_out_of_gas() { - let (wasm, code_hash) = compile_module::("run_out_of_gas").unwrap(); + let (wasm, _code_hash) = compile_module::("run_out_of_gas").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 100 * min_balance, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Call the contract with a fixed gas limit. It must run out of gas because it just // loops forever. @@ -712,18 +717,21 @@ fn instantiate_unique_trie_id() { Determinism::Deterministic, ) .unwrap(); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); // Instantiate the contract and store its trie id for later comparison. - assert_ok!(Contracts::instantiate( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - code_hash, + Code::Existing(code_hash), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; let trie_id = get_contract(&addr).trie_id; // Try to instantiate it again without termination should yield an error. @@ -768,21 +776,24 @@ fn instantiate_unique_trie_id() { #[test] fn storage_max_value_limit() { - let (wasm, code_hash) = compile_module::("storage_size").unwrap(); + let (wasm, _code_hash) = compile_module::("storage_size").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { // Create let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 30_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; get_contract(&addr); // Call contract with allowed storage value. @@ -812,34 +823,46 @@ fn storage_max_value_limit() { #[test] fn deploy_and_call_other_contract() { - let (caller_wasm, caller_code_hash) = compile_module::("caller_contract").unwrap(); + let (caller_wasm, _caller_code_hash) = compile_module::("caller_contract").unwrap(); let (callee_wasm, callee_code_hash) = compile_module::("return_with_data").unwrap(); - let caller_addr = Contracts::contract_address(&ALICE, &caller_code_hash, &[]); - let callee_addr = Contracts::contract_address(&caller_addr, &callee_code_hash, &[]); ExtBuilder::default().existential_deposit(500).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); // Create let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let caller_addr = Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - caller_wasm, + Code::Upload(caller_wasm), vec![], vec![], - )); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + false, + ) + .result + .unwrap() + .account_id; + Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - callee_wasm, + Code::Upload(callee_wasm), 0u32.to_le_bytes().encode(), vec![42], - )); + false, + ) + .result + .unwrap(); + + let callee_addr = Contracts::contract_address( + &caller_addr, + &callee_code_hash, + &[0, 1, 34, 51, 68, 85, 102, 119], // hard coded in wasm + &[], + ); // Drop previous events initialize_block(2); @@ -939,23 +962,26 @@ fn deploy_and_call_other_contract() { #[test] fn delegate_call() { - let (caller_wasm, caller_code_hash) = compile_module::("delegate_call").unwrap(); + let (caller_wasm, _caller_code_hash) = compile_module::("delegate_call").unwrap(); let (callee_wasm, callee_code_hash) = compile_module::("delegate_call_lib").unwrap(); - let caller_addr = Contracts::contract_address(&ALICE, &caller_code_hash, &[]); ExtBuilder::default().existential_deposit(500).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the 'caller' - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let caller_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - caller_wasm, + Code::Upload(caller_wasm), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; // Only upload 'callee' code assert_ok!(Contracts::upload_code( RuntimeOrigin::signed(ALICE), @@ -977,21 +1003,24 @@ fn delegate_call() { #[test] fn cannot_self_destruct_through_draning() { - let (wasm, code_hash) = compile_module::("drain").unwrap(); + let (wasm, _code_hash) = compile_module::("drain").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 1_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated. get_contract(&addr); @@ -1017,22 +1046,25 @@ fn cannot_self_destruct_through_draning() { #[test] fn cannot_self_destruct_through_storage_refund_after_price_change() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let min_balance = ::Currency::minimum_balance(); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated and has the minimum balance assert_eq!(get_contract(&addr).total_deposit(), min_balance); @@ -1073,21 +1105,24 @@ fn cannot_self_destruct_through_storage_refund_after_price_change() { #[test] fn cannot_self_destruct_by_refund_after_slash() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(500).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let min_balance = ::Currency::minimum_balance(); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // create 100 more reserved balance assert_ok!(Contracts::call( @@ -1156,21 +1191,24 @@ fn cannot_self_destruct_by_refund_after_slash() { #[test] fn cannot_self_destruct_while_live() { - let (wasm, code_hash) = compile_module::("self_destruct").unwrap(); + let (wasm, _code_hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated. get_contract(&addr); @@ -1202,16 +1240,19 @@ fn self_destruct_works() { let _ = Balances::deposit_creating(&DJANGO, 1_000_000); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated. get_contract(&addr); @@ -1290,36 +1331,32 @@ fn self_destruct_works() { #[test] fn destroy_contract_and_transfer_funds() { let (callee_wasm, callee_code_hash) = compile_module::("self_destruct").unwrap(); - let (caller_wasm, caller_code_hash) = compile_module::("destroy_and_transfer").unwrap(); + let (caller_wasm, _caller_code_hash) = compile_module::("destroy_and_transfer").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - // Create + // Create code hash for bob to instantiate let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), - 200_000, - GAS_LIMIT, - None, - callee_wasm, - vec![], - vec![42] - )); + Contracts::bare_upload_code(ALICE, callee_wasm, None, Determinism::Deterministic).unwrap(); // This deploys the BOB contract, which in turn deploys the CHARLIE contract during // construction. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_bob = Contracts::bare_instantiate( + ALICE, 200_000, GAS_LIMIT, None, - caller_wasm, + Code::Upload(caller_wasm), callee_code_hash.as_ref().to_vec(), vec![], - )); - let addr_bob = Contracts::contract_address(&ALICE, &caller_code_hash, &[]); - let addr_charlie = Contracts::contract_address(&addr_bob, &callee_code_hash, &[0x47, 0x11]); + false, + ) + .result + .unwrap() + .account_id; // Check that the CHARLIE contract has been instantiated. + let addr_charlie = + Contracts::contract_address(&addr_bob, &callee_code_hash, &[], &[0x47, 0x11]); get_contract(&addr_charlie); // Call BOB, which calls CHARLIE, forcing CHARLIE to self-destruct. @@ -1361,22 +1398,25 @@ fn cannot_self_destruct_in_constructor() { #[test] fn crypto_hashes() { - let (wasm, code_hash) = compile_module::("crypto_hashes").unwrap(); + let (wasm, _code_hash) = compile_module::("crypto_hashes").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the CRYPTO_HASHES contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Perform the call. let input = b"_DEAD_BEEF"; use sp_io::hashing::*; @@ -1419,21 +1459,24 @@ fn crypto_hashes() { #[test] fn transfer_return_code() { - let (wasm, code_hash) = compile_module::("transfer_return_code").unwrap(); + let (wasm, _code_hash) = compile_module::("transfer_return_code").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Contract has only the minimal balance so any transfer will fail. Balances::make_free_balance_be(&addr, min_balance); @@ -1474,23 +1517,26 @@ fn transfer_return_code() { #[test] fn call_return_code() { - let (caller_code, caller_hash) = compile_module::("call_return_code").unwrap(); - let (callee_code, callee_hash) = compile_module::("ok_trap_revert").unwrap(); + let (caller_code, _caller_hash) = compile_module::("call_return_code").unwrap(); + let (callee_code, _callee_hash) = compile_module::("ok_trap_revert").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); let _ = Balances::deposit_creating(&CHARLIE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_bob = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - caller_code, + Code::Upload(caller_code), vec![0], vec![], - ),); - let addr_bob = Contracts::contract_address(&ALICE, &caller_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; Balances::make_free_balance_be(&addr_bob, min_balance); // Contract calls into Django which is no valid contract @@ -1508,16 +1554,19 @@ fn call_return_code() { .unwrap(); assert_return_code!(result, RuntimeReturnCode::NotCallable); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(CHARLIE), + let addr_django = Contracts::bare_instantiate( + CHARLIE, min_balance * 100, GAS_LIMIT, None, - callee_code, + Code::Upload(callee_code), vec![0], vec![], - ),); - let addr_django = Contracts::contract_address(&CHARLIE, &callee_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; Balances::make_free_balance_be(&addr_django, min_balance); // Contract has only the minimal balance so any transfer will fail. @@ -1605,7 +1654,7 @@ fn call_return_code() { #[test] fn instantiate_return_code() { - let (caller_code, caller_hash) = compile_module::("instantiate_return_code").unwrap(); + let (caller_code, _caller_hash) = compile_module::("instantiate_return_code").unwrap(); let (callee_code, callee_hash) = compile_module::("ok_trap_revert").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); @@ -1621,18 +1670,21 @@ fn instantiate_return_code() { callee_code, vec![], vec![], - ),); + )); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - caller_code, + Code::Upload(caller_code), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &caller_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Contract has only the minimal balance so any transfer will fail. Balances::make_free_balance_be(&addr, min_balance); @@ -1741,20 +1793,23 @@ fn disabled_chain_extension_wont_deploy() { #[test] fn disabled_chain_extension_errors_on_call() { - let (code, hash) = compile_module::("chain_extension").unwrap(); + let (code, _hash) = compile_module::("chain_extension").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &hash, &[]); + false, + ) + .result + .unwrap() + .account_id; TestExtension::disable(); assert_err_ignore_postinfo!( Contracts::call(RuntimeOrigin::signed(ALICE), addr.clone(), 0, GAS_LIMIT, None, vec![],), @@ -1765,20 +1820,23 @@ fn disabled_chain_extension_errors_on_call() { #[test] fn chain_extension_works() { - let (code, hash) = compile_module::("chain_extension").unwrap(); + let (code, _hash) = compile_module::("chain_extension").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // 0 = read input buffer and pass it through as output let input: Vec = ExtensionInput { extension_id: 0, func_id: 0, extra: &[99] }.into(); @@ -1901,20 +1959,23 @@ fn chain_extension_works() { #[test] fn chain_extension_temp_storage_works() { - let (code, hash) = compile_module::("chain_extension_temp_storage").unwrap(); + let (code, _hash) = compile_module::("chain_extension_temp_storage").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Call func 0 and func 1 back to back. let stop_recursion = 0u8; @@ -1943,22 +2004,25 @@ fn chain_extension_temp_storage_works() { #[test] fn lazy_removal_works() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); + false, + ) + .result + .unwrap() + .account_id; - let addr = Contracts::contract_address(&ALICE, &hash, &[]); let info = get_contract(&addr); let trie = &info.child_trie_info(); @@ -2010,24 +2074,27 @@ fn lazy_removal_on_full_queue_works_on_initialize() { #[test] fn lazy_batch_removal_works() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); let mut tries: Vec = vec![]; for i in 0..3u8 { - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code.clone(), + Code::Upload(code.clone()), vec![], vec![i], - ),); + false, + ) + .result + .unwrap() + .account_id; - let addr = Contracts::contract_address(&ALICE, &hash, &[i]); let info = get_contract(&addr); let trie = &info.child_trie_info(); @@ -2063,7 +2130,7 @@ fn lazy_batch_removal_works() { #[test] fn lazy_removal_partial_remove_works() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); // We create a contract with some extra keys above the weight limit let extra_keys = 7u32; @@ -2079,17 +2146,20 @@ fn lazy_removal_partial_remove_works() { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); + false, + ) + .result + .unwrap() + .account_id; - let addr = Contracts::contract_address(&ALICE, &hash, &[]); let info = get_contract(&addr); // Put value into the contracts child trie @@ -2186,22 +2256,25 @@ fn lazy_removal_does_no_run_on_full_queue_and_full_block() { #[test] fn lazy_removal_does_no_run_on_low_remaining_weight() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); + false, + ) + .result + .unwrap() + .account_id; - let addr = Contracts::contract_address(&ALICE, &hash, &[]); let info = get_contract(&addr); let trie = &info.child_trie_info(); @@ -2250,7 +2323,7 @@ fn lazy_removal_does_no_run_on_low_remaining_weight() { #[test] fn lazy_removal_does_not_use_all_weight() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); let weight_limit = Weight::from_ref_time(5_000_000_000); let mut ext = ExtBuilder::default().existential_deposit(50).build(); @@ -2259,17 +2332,20 @@ fn lazy_removal_does_not_use_all_weight() { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); + false, + ) + .result + .unwrap() + .account_id; - let addr = Contracts::contract_address(&ALICE, &hash, &[]); let info = get_contract(&addr); let (weight_per_key, max_keys) = Storage::::deletion_budget(1, weight_limit); @@ -2334,22 +2410,24 @@ fn lazy_removal_does_not_use_all_weight() { #[test] fn deletion_queue_full() { - let (code, hash) = compile_module::("self_destruct").unwrap(); + let (code, _hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code, + Code::Upload(code), vec![], vec![], - ),); - - let addr = Contracts::contract_address(&ALICE, &hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // fill the deletion queue up until its limit Storage::::fill_queue_with_dummies(); @@ -2373,43 +2451,50 @@ fn refcounter() { let min_balance = ::Currency::minimum_balance(); // Create two contracts with the same code and check that they do in fact share it. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr0 = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - wasm.clone(), + Code::Upload(wasm.clone()), vec![], vec![0], - )); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + false, + ) + .result + .unwrap() + .account_id; + let addr1 = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - wasm.clone(), + Code::Upload(wasm.clone()), vec![], vec![1], - )); + false, + ) + .result + .unwrap() + .account_id; assert_refcount!(code_hash, 2); // Sharing should also work with the usual instantiate call - assert_ok!(Contracts::instantiate( - RuntimeOrigin::signed(ALICE), + let addr2 = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - code_hash, + Code::Existing(code_hash), vec![], vec![2], - )); + false, + ) + .result + .unwrap() + .account_id; assert_refcount!(code_hash, 3); - // addresses of all three existing contracts - let addr0 = Contracts::contract_address(&ALICE, &code_hash, &[0]); - let addr1 = Contracts::contract_address(&ALICE, &code_hash, &[1]); - let addr2 = Contracts::contract_address(&ALICE, &code_hash, &[2]); - // Terminating one contract should decrement the refcount assert_ok!(Contracts::call( RuntimeOrigin::signed(ALICE), @@ -2461,17 +2546,19 @@ fn reinstrument_does_charge() { let zero = 0u32.to_le_bytes().encode(); let code_len = wasm.len() as u32; - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), zero.clone(), vec![], - )); - - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Call the contract two times without reinstrument @@ -2531,20 +2618,23 @@ fn reinstrument_does_charge() { #[test] fn debug_message_works() { - let (wasm, code_hash) = compile_module::("debug_message_works").unwrap(); + let (wasm, _code_hash) = compile_module::("debug_message_works").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 30_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; let result = Contracts::bare_call( ALICE, addr, @@ -2563,20 +2653,23 @@ fn debug_message_works() { #[test] fn debug_message_logging_disabled() { - let (wasm, code_hash) = compile_module::("debug_message_logging_disabled").unwrap(); + let (wasm, _code_hash) = compile_module::("debug_message_logging_disabled").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 30_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // disable logging by passing `false` let result = Contracts::bare_call( ALICE, @@ -2597,20 +2690,23 @@ fn debug_message_logging_disabled() { #[test] fn debug_message_invalid_utf8() { - let (wasm, code_hash) = compile_module::("debug_message_invalid_utf8").unwrap(); + let (wasm, _code_hash) = compile_module::("debug_message_invalid_utf8").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 30_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - ),); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; let result = Contracts::bare_call( ALICE, addr, @@ -2627,34 +2723,40 @@ fn debug_message_invalid_utf8() { #[test] fn gas_estimation_nested_call_fixed_limit() { - let (caller_code, caller_hash) = compile_module::("call_with_limit").unwrap(); - let (callee_code, callee_hash) = compile_module::("dummy").unwrap(); + let (caller_code, _caller_hash) = compile_module::("call_with_limit").unwrap(); + let (callee_code, _callee_hash) = compile_module::("dummy").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); let _ = Balances::deposit_creating(&CHARLIE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_caller = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - caller_code, + Code::Upload(caller_code), vec![], vec![0], - ),); - let addr_caller = Contracts::contract_address(&ALICE, &caller_hash, &[0]); + false, + ) + .result + .unwrap() + .account_id; - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_callee = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - callee_code, + Code::Upload(callee_code), vec![], vec![1], - ),); - let addr_callee = Contracts::contract_address(&ALICE, &callee_hash, &[1]); + false, + ) + .result + .unwrap() + .account_id; let input: Vec = AsRef::<[u8]>::as_ref(&addr_callee) .iter() @@ -2698,34 +2800,40 @@ fn gas_estimation_nested_call_fixed_limit() { #[test] fn gas_estimation_call_runtime() { use codec::Decode; - let (caller_code, caller_hash) = compile_module::("call_runtime").unwrap(); - let (callee_code, callee_hash) = compile_module::("dummy").unwrap(); + let (caller_code, _caller_hash) = compile_module::("call_runtime").unwrap(); + let (callee_code, _callee_hash) = compile_module::("dummy").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let min_balance = ::Currency::minimum_balance(); let _ = Balances::deposit_creating(&ALICE, 1000 * min_balance); let _ = Balances::deposit_creating(&CHARLIE, 1000 * min_balance); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_caller = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - caller_code, + Code::Upload(caller_code), vec![], vec![0], - ),); - let addr_caller = Contracts::contract_address(&ALICE, &caller_hash, &[0]); + false, + ) + .result + .unwrap() + .account_id; - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_callee = Contracts::bare_instantiate( + ALICE, min_balance * 100, GAS_LIMIT, None, - callee_code, + Code::Upload(callee_code), vec![], vec![1], - ),); - let addr_callee = Contracts::contract_address(&ALICE, &callee_hash, &[1]); + false, + ) + .result + .unwrap() + .account_id; // Call something trivial with a huge gas limit so that we can observe the effects // of pre-charging. This should create a difference between consumed and required. @@ -2770,22 +2878,25 @@ fn gas_estimation_call_runtime() { #[test] fn ecdsa_recover() { - let (wasm, code_hash) = compile_module::("ecdsa_recover").unwrap(); + let (wasm, _code_hash) = compile_module::("ecdsa_recover").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the ecdsa_recover contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 100_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; #[rustfmt::skip] let signature: [u8; 65] = [ @@ -3072,16 +3183,19 @@ fn instantiate_with_zero_balance_works() { initialize_block(2); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated. get_contract(&addr); @@ -3165,16 +3279,19 @@ fn instantiate_with_below_existential_deposit_works() { initialize_block(2); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 50, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated. get_contract(&addr); @@ -3258,21 +3375,24 @@ fn instantiate_with_below_existential_deposit_works() { #[test] fn storage_deposit_works() { - let (wasm, code_hash) = compile_module::("multi_store").unwrap(); + let (wasm, _code_hash) = compile_module::("multi_store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let mut deposit = ::Currency::minimum_balance(); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Drop previous events initialize_block(2); @@ -3413,16 +3533,19 @@ fn set_code_extrinsic() { ExtBuilder::default().existential_deposit(100).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; assert_ok!(Contracts::upload_code( RuntimeOrigin::signed(ALICE), @@ -3490,21 +3613,24 @@ fn set_code_extrinsic() { #[test] fn call_after_killed_account_needs_funding() { - let (wasm, code_hash) = compile_module::("dummy").unwrap(); + let (wasm, _code_hash) = compile_module::("dummy").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let min_balance = ::Currency::minimum_balance(); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 700, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Drop previous events initialize_block(2); @@ -3791,21 +3917,23 @@ fn set_code_hash() { let (wasm, code_hash) = compile_module::("set_code_hash").unwrap(); let (new_wasm, new_code_hash) = compile_module::("new_set_code_hash_contract").unwrap(); - let contract_addr = Contracts::contract_address(&ALICE, &code_hash, &[]); - ExtBuilder::default().existential_deposit(100).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Instantiate the 'caller' - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let contract_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; // upload new code assert_ok!(Contracts::upload_code( RuntimeOrigin::signed(ALICE), @@ -3882,22 +4010,25 @@ fn set_code_hash() { #[test] fn storage_deposit_limit_is_enforced() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let min_balance = ::Currency::minimum_balance(); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the BOB contract has been instantiated and has the minimum balance assert_eq!(get_contract(&addr).total_deposit(), min_balance); @@ -3920,33 +4051,39 @@ fn storage_deposit_limit_is_enforced() { #[test] fn storage_deposit_limit_is_enforced_late() { - let (wasm_caller, code_hash_caller) = + let (wasm_caller, _code_hash_caller) = compile_module::("create_storage_and_call").unwrap(); - let (wasm_callee, code_hash_callee) = compile_module::("store").unwrap(); + let (wasm_callee, _code_hash_callee) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); // Create both contracts: Constructors do nothing. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr_caller = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm_caller, + Code::Upload(wasm_caller), vec![], vec![], - )); - let addr_caller = Contracts::contract_address(&ALICE, &code_hash_caller, &[]); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + false, + ) + .result + .unwrap() + .account_id; + let addr_callee = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm_callee, + Code::Upload(wasm_callee), vec![], vec![], - )); - let addr_callee = Contracts::contract_address(&ALICE, &code_hash_callee, &[]); + false, + ) + .result + .unwrap() + .account_id; // Create 100 bytes of storage with a price of per byte // This is 100 Balance + 2 Balance for the item @@ -4059,23 +4196,26 @@ fn storage_deposit_limit_is_enforced_late() { #[test] fn deposit_limit_honors_liquidity_restrictions() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let _ = Balances::deposit_creating(&BOB, 1_000); let min_balance = ::Currency::minimum_balance(); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the contract has been instantiated and has the minimum balance assert_eq!(get_contract(&addr).total_deposit(), min_balance); @@ -4100,23 +4240,26 @@ fn deposit_limit_honors_liquidity_restrictions() { #[test] fn deposit_limit_honors_existential_deposit() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let _ = Balances::deposit_creating(&BOB, 1_000); let min_balance = ::Currency::minimum_balance(); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the contract has been instantiated and has the minimum balance assert_eq!(get_contract(&addr).total_deposit(), min_balance); @@ -4140,23 +4283,26 @@ fn deposit_limit_honors_existential_deposit() { #[test] fn deposit_limit_honors_min_leftover() { - let (wasm, code_hash) = compile_module::("store").unwrap(); + let (wasm, _code_hash) = compile_module::("store").unwrap(); ExtBuilder::default().existential_deposit(200).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let _ = Balances::deposit_creating(&BOB, 1_000); let min_balance = ::Currency::minimum_balance(); // Instantiate the BOB contract. - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let addr = Contracts::bare_instantiate( + ALICE, 0, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); - let addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + false, + ) + .result + .unwrap() + .account_id; // Check that the contract has been instantiated and has the minimum balance assert_eq!(get_contract(&addr).total_deposit(), min_balance); @@ -4420,21 +4566,24 @@ fn delegate_call_indeterministic_code() { #[test] fn reentrance_count_works_with_call() { - let (wasm, code_hash) = compile_module::("reentrance_count_call").unwrap(); - let contract_addr = Contracts::contract_address(&ALICE, &code_hash, &[]); + let (wasm, _code_hash) = compile_module::("reentrance_count_call").unwrap(); ExtBuilder::default().existential_deposit(100).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let contract_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; // passing reentrant count to the input let input = 0.encode(); @@ -4457,20 +4606,23 @@ fn reentrance_count_works_with_call() { #[test] fn reentrance_count_works_with_delegated_call() { let (wasm, code_hash) = compile_module::("reentrance_count_delegated_call").unwrap(); - let contract_addr = Contracts::contract_address(&ALICE, &code_hash, &[]); ExtBuilder::default().existential_deposit(100).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let contract_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; // adding a callstack height to the input let input = (code_hash, 1).encode(); @@ -4492,36 +4644,40 @@ fn reentrance_count_works_with_delegated_call() { #[test] fn account_reentrance_count_works() { - let (wasm, code_hash) = compile_module::("account_reentrance_count_call").unwrap(); - let (wasm_reentrance_count, code_hash_reentrance_count) = + let (wasm, _code_hash) = compile_module::("account_reentrance_count_call").unwrap(); + let (wasm_reentrance_count, _code_hash_reentrance_count) = compile_module::("reentrance_count_call").unwrap(); ExtBuilder::default().existential_deposit(100).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let contract_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - wasm, + Code::Upload(wasm), vec![], vec![], - )); + false, + ) + .result + .unwrap() + .account_id; - assert_ok!(Contracts::instantiate_with_code( - RuntimeOrigin::signed(ALICE), + let another_contract_addr = Contracts::bare_instantiate( + ALICE, 300_000, GAS_LIMIT, None, - wasm_reentrance_count, + Code::Upload(wasm_reentrance_count), vec![], - vec![] - )); - - let contract_addr = Contracts::contract_address(&ALICE, &code_hash, &[]); - let another_contract_addr = - Contracts::contract_address(&ALICE, &code_hash_reentrance_count, &[]); + vec![], + false, + ) + .result + .unwrap() + .account_id; let result1 = Contracts::bare_call( ALICE, diff --git a/frame/contracts/src/wasm/code_cache.rs b/frame/contracts/src/wasm/code_cache.rs index eb337ac682860..410d26921543d 100644 --- a/frame/contracts/src/wasm/code_cache.rs +++ b/frame/contracts/src/wasm/code_cache.rs @@ -41,7 +41,6 @@ use frame_support::{ traits::{Get, ReservableCurrency}, WeakBoundedVec, }; -use sp_core::crypto::UncheckedFrom; use sp_runtime::traits::BadOrigin; use sp_std::vec; @@ -49,10 +48,7 @@ use sp_std::vec; /// /// Increments the refcount of the in-storage `prefab_module` if it already exists in storage /// under the specified `code_hash`. -pub fn store(mut module: PrefabWasmModule, instantiated: bool) -> DispatchResult -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +pub fn store(mut module: PrefabWasmModule, instantiated: bool) -> DispatchResult { let code_hash = sp_std::mem::take(&mut module.code_hash); >::mutate(&code_hash, |existing| match existing { Some(existing) => { @@ -135,10 +131,7 @@ pub fn increment_refcount(code_hash: CodeHash) -> Result<(), Dispa } /// Try to remove code together with all associated information. -pub fn try_remove(origin: &T::AccountId, code_hash: CodeHash) -> DispatchResult -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +pub fn try_remove(origin: &T::AccountId, code_hash: CodeHash) -> DispatchResult { >::try_mutate_exists(&code_hash, |existing| { if let Some(owner_info) = existing { ensure!(owner_info.refcount == 0, >::CodeInUse); @@ -164,10 +157,7 @@ pub fn load( code_hash: CodeHash, schedule: &Schedule, gas_meter: &mut GasMeter, -) -> Result, DispatchError> -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +) -> Result, DispatchError> { let max_code_len = T::MaxCodeLen::get(); let charged = gas_meter.charge(CodeToken::Load(max_code_len))?; @@ -192,10 +182,7 @@ where pub fn reinstrument( prefab_module: &mut PrefabWasmModule, schedule: &Schedule, -) -> Result -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +) -> Result { let original_code = >::get(&prefab_module.code_hash).ok_or(Error::::CodeNotFound)?; let original_code_len = original_code.len(); diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index d85dac95cc712..903ca0abb5e06 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -36,7 +36,7 @@ use crate::{ }; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::dispatch::{DispatchError, DispatchResult}; -use sp_core::{crypto::UncheckedFrom, Get}; +use sp_core::Get; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; #[cfg(test)] @@ -140,10 +140,7 @@ impl ExportedFunction { } } -impl PrefabWasmModule -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl PrefabWasmModule { /// Create the module by checking and instrumenting `original_code`. /// /// This does **not** store the module. For this one need to either call [`Self::store`] @@ -263,10 +260,7 @@ impl OwnerInfo { } } -impl Executable for PrefabWasmModule -where - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl Executable for PrefabWasmModule { fn from_storage( code_hash: CodeHash, schedule: &Schedule, @@ -476,7 +470,7 @@ mod tests { salt: salt.to_vec(), }); Ok(( - Contracts::::contract_address(&ALICE, &code_hash, salt), + Contracts::::contract_address(&ALICE, &code_hash, &data, salt), ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() }, )) } diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index c63a5b1e135d9..9bb58bb02b5ea 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -26,7 +26,6 @@ use crate::{ AccountIdOf, CodeVec, Config, Error, Schedule, }; use codec::{Encode, MaxEncodedLen}; -use sp_core::crypto::UncheckedFrom; use sp_runtime::{traits::Hash, DispatchError}; use sp_std::prelude::*; use wasm_instrument::{ @@ -396,7 +395,6 @@ fn instrument( where E: Environment<()>, T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, { // Do not enable any features here. Any additional feature needs to be carefully // checked for potential security issues. For example, enabling multi value could lead @@ -500,7 +498,6 @@ pub fn prepare( where E: Environment<()>, T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, { let (code, (initial, maximum)) = instrument::(original_code.as_ref(), schedule, determinism, try_instantiate)?; @@ -547,7 +544,6 @@ pub fn reinstrument( where E: Environment<()>, T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, { instrument::(original_code, schedule, determinism, TryInstantiate::Skip) .map_err(|(err, msg)| { diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 066c1d71ea444..aaacb9e5f80e6 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -29,7 +29,6 @@ use codec::{Decode, DecodeLimit, Encode, MaxEncodedLen}; use frame_support::{dispatch::DispatchError, ensure, traits::Get, weights::Weight, RuntimeDebug}; use pallet_contracts_primitives::{ExecReturnValue, ReturnFlags}; use pallet_contracts_proc_macro::define_env; -use sp_core::crypto::UncheckedFrom; use sp_io::hashing::{blake2_128, blake2_256, keccak_256, sha2_256}; use sp_runtime::traits::{Bounded, Zero}; use sp_std::{fmt, prelude::*}; @@ -270,11 +269,7 @@ pub enum RuntimeCosts { } impl RuntimeCosts { - fn token(&self, s: &HostFnWeights) -> RuntimeToken - where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, - { + fn token(&self, s: &HostFnWeights) -> RuntimeToken { use self::RuntimeCosts::*; let weight = match *self { MeteringBlock(amount) => s.gas.saturating_add(amount), @@ -324,7 +319,7 @@ impl RuntimeCosts { CallInputCloned(len) => s.call_per_cloned_byte.saturating_mul(len.into()), InstantiateBase { input_data_len, salt_len } => s .instantiate - .saturating_add(s.return_per_byte.saturating_mul(input_data_len.into())) + .saturating_add(s.instantiate_per_input_byte.saturating_mul(input_data_len.into())) .saturating_add(s.instantiate_per_salt_byte.saturating_mul(salt_len.into())), InstantiateSurchargeTransfer => s.instantiate_transfer_surcharge, HashSha256(len) => s @@ -375,11 +370,7 @@ struct RuntimeToken { weight: Weight, } -impl Token for RuntimeToken -where - T: Config, - T::AccountId: UncheckedFrom + AsRef<[u8]>, -{ +impl Token for RuntimeToken { fn weight(&self) -> Weight { self.weight } @@ -463,12 +454,7 @@ pub struct Runtime<'a, E: Ext + 'a> { chain_extension: Option::ChainExtension>>, } -impl<'a, E> Runtime<'a, E> -where - E: Ext + 'a, - ::AccountId: - UncheckedFrom<::Hash> + AsRef<[u8]>, -{ +impl<'a, E: Ext + 'a> Runtime<'a, E> { pub fn new(ext: &'a mut E, input_data: Vec) -> Self { Runtime { ext, diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index c3f3b50097278..69fcbd6eec983 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: 2022-12-01, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-12-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! 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,8 +53,8 @@ pub trait WeightInfo { fn on_initialize_per_queue_item(q: u32, ) -> Weight; fn reinstrument(c: u32, ) -> Weight; fn call_with_code_per_byte(c: u32, ) -> Weight; - fn instantiate_with_code(c: u32, s: u32, ) -> Weight; - fn instantiate(s: u32, ) -> Weight; + fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight; + fn instantiate(i: u32, s: u32, ) -> Weight; fn call() -> Weight; fn upload_code(c: u32, ) -> Weight; fn remove_code() -> Weight; @@ -98,7 +98,7 @@ pub trait WeightInfo { fn seal_delegate_call(r: u32, ) -> Weight; fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight; fn seal_instantiate(r: u32, ) -> Weight; - fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight; + fn seal_instantiate_per_transfer_input_salt_kb(t: u32, i: u32, s: u32, ) -> Weight; fn seal_hash_sha2_256(r: u32, ) -> Weight; fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight; fn seal_hash_keccak_256(r: u32, ) -> Weight; @@ -172,17 +172,17 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_process_deletion_queue_batch() -> Weight { - // Minimum execution time: 3_148 nanoseconds. - Weight::from_ref_time(3_326_000) + // Minimum execution time: 3_196 nanoseconds. + Weight::from_ref_time(3_293_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { - // Minimum execution time: 15_318 nanoseconds. - Weight::from_ref_time(14_905_070) - // Standard Error: 1_055 - .saturating_add(Weight::from_ref_time(941_176).saturating_mul(k.into())) + // Minimum execution time: 14_857 nanoseconds. + Weight::from_ref_time(14_957_593) + // Standard Error: 1_015 + .saturating_add(Weight::from_ref_time(935_359).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -190,10 +190,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts DeletionQueue (r:1 w:0) /// The range of component `q` is `[0, 128]`. fn on_initialize_per_queue_item(q: u32, ) -> Weight { - // Minimum execution time: 3_182 nanoseconds. - Weight::from_ref_time(14_837_078) - // Standard Error: 3_423 - .saturating_add(Weight::from_ref_time(1_203_909).saturating_mul(q.into())) + // Minimum execution time: 3_231 nanoseconds. + Weight::from_ref_time(14_859_580) + // Standard Error: 3_479 + .saturating_add(Weight::from_ref_time(1_185_600).saturating_mul(q.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -201,10 +201,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:0 w:1) /// The range of component `c` is `[0, 64226]`. fn reinstrument(c: u32, ) -> Weight { - // Minimum execution time: 34_272 nanoseconds. - Weight::from_ref_time(33_159_915) - // Standard Error: 60 - .saturating_add(Weight::from_ref_time(46_967).saturating_mul(c.into())) + // Minimum execution time: 34_565 nanoseconds. + Weight::from_ref_time(29_199_016) + // Standard Error: 70 + .saturating_add(Weight::from_ref_time(47_107).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -215,10 +215,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `c` is `[0, 131072]`. fn call_with_code_per_byte(c: u32, ) -> Weight { - // Minimum execution time: 395_141 nanoseconds. - Weight::from_ref_time(413_672_628) - // Standard Error: 25 - .saturating_add(Weight::from_ref_time(30_570).saturating_mul(c.into())) + // Minimum execution time: 392_074 nanoseconds. + Weight::from_ref_time(404_090_909) + // Standard Error: 24 + .saturating_add(Weight::from_ref_time(30_454).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -231,14 +231,17 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) /// The range of component `c` is `[0, 64226]`. + /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. - fn instantiate_with_code(c: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_259_439 nanoseconds. - Weight::from_ref_time(407_506_250) - // Standard Error: 79 - .saturating_add(Weight::from_ref_time(89_557).saturating_mul(c.into())) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_804).saturating_mul(s.into())) + fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { + // Minimum execution time: 3_785_934 nanoseconds. + Weight::from_ref_time(683_143_843) + // Standard Error: 272 + .saturating_add(Weight::from_ref_time(87_620).saturating_mul(c.into())) + // Standard Error: 16 + .saturating_add(Weight::from_ref_time(1_363).saturating_mul(i.into())) + // Standard Error: 16 + .saturating_add(Weight::from_ref_time(1_778).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(9)) } @@ -249,12 +252,15 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) // Storage: System EventTopics (r:2 w:2) + /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. - fn instantiate(s: u32, ) -> Weight { - // Minimum execution time: 185_950 nanoseconds. - Weight::from_ref_time(173_152_122) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_559).saturating_mul(s.into())) + fn instantiate(i: u32, s: u32, ) -> Weight { + // Minimum execution time: 1_935_310 nanoseconds. + Weight::from_ref_time(203_531_122) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_674).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_789).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -264,8 +270,8 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: System EventTopics (r:2 w:2) fn call() -> Weight { - // Minimum execution time: 154_738 nanoseconds. - Weight::from_ref_time(159_212_000) + // Minimum execution time: 151_999 nanoseconds. + Weight::from_ref_time(153_527_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -275,10 +281,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:0 w:1) /// The range of component `c` is `[0, 64226]`. fn upload_code(c: u32, ) -> Weight { - // Minimum execution time: 392_302 nanoseconds. - Weight::from_ref_time(402_889_681) - // Standard Error: 84 - .saturating_add(Weight::from_ref_time(89_393).saturating_mul(c.into())) + // Minimum execution time: 391_165 nanoseconds. + Weight::from_ref_time(394_519_487) + // Standard Error: 75 + .saturating_add(Weight::from_ref_time(89_736).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -287,8 +293,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - // Minimum execution time: 39_892 nanoseconds. - Weight::from_ref_time(40_258_000) + // Minimum execution time: 39_354 nanoseconds. + Weight::from_ref_time(39_855_000) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -296,8 +302,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:2 w:2) // Storage: System EventTopics (r:3 w:3) fn set_code() -> Weight { - // Minimum execution time: 41_441 nanoseconds. - Weight::from_ref_time(42_011_000) + // Minimum execution time: 40_909 nanoseconds. + Weight::from_ref_time(41_275_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -308,10 +314,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_caller(r: u32, ) -> Weight { - // Minimum execution time: 383_919 nanoseconds. - Weight::from_ref_time(387_844_956) - // Standard Error: 38_460 - .saturating_add(Weight::from_ref_time(16_014_536).saturating_mul(r.into())) + // Minimum execution time: 380_150 nanoseconds. + Weight::from_ref_time(384_429_035) + // Standard Error: 34_740 + .saturating_add(Weight::from_ref_time(15_582_218).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -322,10 +328,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_is_contract(r: u32, ) -> Weight { - // Minimum execution time: 384_047 nanoseconds. - Weight::from_ref_time(316_828_665) - // Standard Error: 571_260 - .saturating_add(Weight::from_ref_time(197_635_022).saturating_mul(r.into())) + // Minimum execution time: 380_608 nanoseconds. + Weight::from_ref_time(326_544_805) + // Standard Error: 475_381 + .saturating_add(Weight::from_ref_time(190_717_772).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -337,10 +343,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 385_259 nanoseconds. - Weight::from_ref_time(338_849_650) - // Standard Error: 447_004 - .saturating_add(Weight::from_ref_time(235_734_380).saturating_mul(r.into())) + // Minimum execution time: 382_780 nanoseconds. + Weight::from_ref_time(333_775_113) + // Standard Error: 446_086 + .saturating_add(Weight::from_ref_time(232_531_042).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -352,10 +358,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_own_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 385_528 nanoseconds. - Weight::from_ref_time(388_332_749) - // Standard Error: 43_017 - .saturating_add(Weight::from_ref_time(20_406_602).saturating_mul(r.into())) + // Minimum execution time: 381_815 nanoseconds. + Weight::from_ref_time(390_931_793) + // Standard Error: 61_918 + .saturating_add(Weight::from_ref_time(18_798_438).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -366,10 +372,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_caller_is_origin(r: u32, ) -> Weight { - // Minimum execution time: 382_243 nanoseconds. - Weight::from_ref_time(387_692_764) - // Standard Error: 32_726 - .saturating_add(Weight::from_ref_time(10_753_573).saturating_mul(r.into())) + // Minimum execution time: 379_162 nanoseconds. + Weight::from_ref_time(383_796_363) + // Standard Error: 25_555 + .saturating_add(Weight::from_ref_time(10_843_721).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -380,10 +386,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_address(r: u32, ) -> Weight { - // Minimum execution time: 383_993 nanoseconds. - Weight::from_ref_time(389_189_394) - // Standard Error: 55_885 - .saturating_add(Weight::from_ref_time(15_943_739).saturating_mul(r.into())) + // Minimum execution time: 380_307 nanoseconds. + Weight::from_ref_time(390_211_779) + // Standard Error: 53_326 + .saturating_add(Weight::from_ref_time(15_311_171).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -394,10 +400,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_gas_left(r: u32, ) -> Weight { - // Minimum execution time: 383_057 nanoseconds. - Weight::from_ref_time(387_466_678) - // Standard Error: 38_570 - .saturating_add(Weight::from_ref_time(15_739_675).saturating_mul(r.into())) + // Minimum execution time: 380_230 nanoseconds. + Weight::from_ref_time(383_470_453) + // Standard Error: 45_007 + .saturating_add(Weight::from_ref_time(15_582_472).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -408,10 +414,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_balance(r: u32, ) -> Weight { - // Minimum execution time: 383_688 nanoseconds. - Weight::from_ref_time(394_708_428) - // Standard Error: 101_035 - .saturating_add(Weight::from_ref_time(89_822_613).saturating_mul(r.into())) + // Minimum execution time: 380_244 nanoseconds. + Weight::from_ref_time(388_092_461) + // Standard Error: 98_199 + .saturating_add(Weight::from_ref_time(97_339_528).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -422,10 +428,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_value_transferred(r: u32, ) -> Weight { - // Minimum execution time: 383_511 nanoseconds. - Weight::from_ref_time(387_270_075) - // Standard Error: 33_383 - .saturating_add(Weight::from_ref_time(15_672_963).saturating_mul(r.into())) + // Minimum execution time: 380_242 nanoseconds. + Weight::from_ref_time(384_078_258) + // Standard Error: 28_510 + .saturating_add(Weight::from_ref_time(15_423_359).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -436,10 +442,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_minimum_balance(r: u32, ) -> Weight { - // Minimum execution time: 383_483 nanoseconds. - Weight::from_ref_time(386_995_457) - // Standard Error: 28_781 - .saturating_add(Weight::from_ref_time(15_632_597).saturating_mul(r.into())) + // Minimum execution time: 379_890 nanoseconds. + Weight::from_ref_time(383_658_430) + // Standard Error: 44_976 + .saturating_add(Weight::from_ref_time(15_451_905).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -450,10 +456,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_block_number(r: u32, ) -> Weight { - // Minimum execution time: 383_630 nanoseconds. - Weight::from_ref_time(387_801_190) - // Standard Error: 41_234 - .saturating_add(Weight::from_ref_time(15_531_236).saturating_mul(r.into())) + // Minimum execution time: 380_269 nanoseconds. + Weight::from_ref_time(383_580_481) + // Standard Error: 31_862 + .saturating_add(Weight::from_ref_time(15_230_473).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -464,10 +470,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_now(r: u32, ) -> Weight { - // Minimum execution time: 383_668 nanoseconds. - Weight::from_ref_time(387_490_160) - // Standard Error: 28_070 - .saturating_add(Weight::from_ref_time(15_639_764).saturating_mul(r.into())) + // Minimum execution time: 380_308 nanoseconds. + Weight::from_ref_time(383_732_372) + // Standard Error: 38_359 + .saturating_add(Weight::from_ref_time(15_358_775).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -479,10 +485,10 @@ impl WeightInfo for SubstrateWeight { // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) /// The range of component `r` is `[0, 20]`. fn seal_weight_to_fee(r: u32, ) -> Weight { - // Minimum execution time: 383_401 nanoseconds. - Weight::from_ref_time(393_140_360) - // Standard Error: 95_092 - .saturating_add(Weight::from_ref_time(83_864_160).saturating_mul(r.into())) + // Minimum execution time: 380_834 nanoseconds. + Weight::from_ref_time(388_999_459) + // Standard Error: 96_447 + .saturating_add(Weight::from_ref_time(86_714_414).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -493,10 +499,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_gas(r: u32, ) -> Weight { - // Minimum execution time: 142_684 nanoseconds. - Weight::from_ref_time(145_540_019) - // Standard Error: 18_177 - .saturating_add(Weight::from_ref_time(8_061_360).saturating_mul(r.into())) + // Minimum execution time: 140_955 nanoseconds. + Weight::from_ref_time(144_716_423) + // Standard Error: 11_370 + .saturating_add(Weight::from_ref_time(7_858_807).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -507,10 +513,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_input(r: u32, ) -> Weight { - // Minimum execution time: 383_472 nanoseconds. - Weight::from_ref_time(386_518_915) - // Standard Error: 46_174 - .saturating_add(Weight::from_ref_time(14_052_552).saturating_mul(r.into())) + // Minimum execution time: 380_210 nanoseconds. + Weight::from_ref_time(384_185_776) + // Standard Error: 49_038 + .saturating_add(Weight::from_ref_time(13_649_793).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -521,10 +527,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_input_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 398_912 nanoseconds. - Weight::from_ref_time(426_793_015) - // Standard Error: 5_524 - .saturating_add(Weight::from_ref_time(9_645_931).saturating_mul(n.into())) + // Minimum execution time: 396_209 nanoseconds. + Weight::from_ref_time(424_522_611) + // Standard Error: 3_917 + .saturating_add(Weight::from_ref_time(9_627_216).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -535,10 +541,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { - // Minimum execution time: 380_288 nanoseconds. - Weight::from_ref_time(382_064_302) - // Standard Error: 274_854 - .saturating_add(Weight::from_ref_time(5_341_497).saturating_mul(r.into())) + // Minimum execution time: 378_412 nanoseconds. + Weight::from_ref_time(380_502_085) + // Standard Error: 201_552 + .saturating_add(Weight::from_ref_time(1_434_214).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -549,10 +555,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_return_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 382_104 nanoseconds. - Weight::from_ref_time(383_966_376) - // Standard Error: 668 - .saturating_add(Weight::from_ref_time(230_898).saturating_mul(n.into())) + // Minimum execution time: 381_463 nanoseconds. + Weight::from_ref_time(383_955_553) + // Standard Error: 998 + .saturating_add(Weight::from_ref_time(230_512).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -565,10 +571,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:1 w:1) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { - // Minimum execution time: 382_423 nanoseconds. - Weight::from_ref_time(384_162_748) - // Standard Error: 403_637 - .saturating_add(Weight::from_ref_time(57_465_451).saturating_mul(r.into())) + // Minimum execution time: 379_877 nanoseconds. + Weight::from_ref_time(381_729_546) + // Standard Error: 214_004 + .saturating_add(Weight::from_ref_time(52_528_353).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -582,10 +588,10 @@ impl WeightInfo for SubstrateWeight { // Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) /// The range of component `r` is `[0, 20]`. fn seal_random(r: u32, ) -> Weight { - // Minimum execution time: 382_853 nanoseconds. - Weight::from_ref_time(391_962_017) - // Standard Error: 102_169 - .saturating_add(Weight::from_ref_time(108_325_188).saturating_mul(r.into())) + // Minimum execution time: 380_275 nanoseconds. + Weight::from_ref_time(386_495_777) + // Standard Error: 94_674 + .saturating_add(Weight::from_ref_time(108_432_929).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -596,10 +602,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_deposit_event(r: u32, ) -> Weight { - // Minimum execution time: 380_999 nanoseconds. - Weight::from_ref_time(392_336_632) - // Standard Error: 168_846 - .saturating_add(Weight::from_ref_time(218_950_403).saturating_mul(r.into())) + // Minimum execution time: 379_095 nanoseconds. + Weight::from_ref_time(393_997_924) + // Standard Error: 141_916 + .saturating_add(Weight::from_ref_time(212_937_170).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -611,12 +617,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16]`. fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - // Minimum execution time: 1_276_841 nanoseconds. - Weight::from_ref_time(587_558_952) - // Standard Error: 504_583 - .saturating_add(Weight::from_ref_time(178_141_140).saturating_mul(t.into())) - // Standard Error: 138_583 - .saturating_add(Weight::from_ref_time(71_194_319).saturating_mul(n.into())) + // Minimum execution time: 1_241_001 nanoseconds. + Weight::from_ref_time(548_526_917) + // Standard Error: 496_807 + .saturating_add(Weight::from_ref_time(177_087_769).saturating_mul(t.into())) + // Standard Error: 136_447 + .saturating_add(Weight::from_ref_time(71_558_402).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -629,20 +635,20 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_debug_message(r: u32, ) -> Weight { - // Minimum execution time: 161_230 nanoseconds. - Weight::from_ref_time(168_508_241) - // Standard Error: 31_112 - .saturating_add(Weight::from_ref_time(12_496_531).saturating_mul(r.into())) + // Minimum execution time: 159_158 nanoseconds. + Weight::from_ref_time(163_427_712) + // Standard Error: 22_442 + .saturating_add(Weight::from_ref_time(12_647_838).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_set_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_055 nanoseconds. - Weight::from_ref_time(339_358_786) - // Standard Error: 486_941 - .saturating_add(Weight::from_ref_time(412_066_056).saturating_mul(r.into())) + // Minimum execution time: 381_068 nanoseconds. + Weight::from_ref_time(341_041_230) + // Standard Error: 464_053 + .saturating_add(Weight::from_ref_time(402_677_314).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -651,10 +657,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { - // Minimum execution time: 512_301 nanoseconds. - Weight::from_ref_time(670_220_816) - // Standard Error: 1_460_983 - .saturating_add(Weight::from_ref_time(97_308_816).saturating_mul(n.into())) + // Minimum execution time: 508_695 nanoseconds. + Weight::from_ref_time(663_159_695) + // Standard Error: 1_419_342 + .saturating_add(Weight::from_ref_time(96_558_570).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(52)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(50)) @@ -663,10 +669,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { - // Minimum execution time: 510_820 nanoseconds. - Weight::from_ref_time(638_537_372) - // Standard Error: 1_195_632 - .saturating_add(Weight::from_ref_time(65_979_491).saturating_mul(n.into())) + // Minimum execution time: 508_542 nanoseconds. + Weight::from_ref_time(634_146_978) + // Standard Error: 1_168_252 + .saturating_add(Weight::from_ref_time(64_231_947).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(49)) @@ -675,10 +681,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_clear_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_596 nanoseconds. - Weight::from_ref_time(341_575_167) - // Standard Error: 478_894 - .saturating_add(Weight::from_ref_time(407_044_103).saturating_mul(r.into())) + // Minimum execution time: 381_743 nanoseconds. + Weight::from_ref_time(337_309_674) + // Standard Error: 527_407 + .saturating_add(Weight::from_ref_time(395_767_068).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -687,10 +693,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_clear_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 481_757 nanoseconds. - Weight::from_ref_time(628_126_550) - // Standard Error: 1_363_017 - .saturating_add(Weight::from_ref_time(67_242_851).saturating_mul(n.into())) + // Minimum execution time: 478_283 nanoseconds. + Weight::from_ref_time(616_673_245) + // Standard Error: 1_290_784 + .saturating_add(Weight::from_ref_time(66_534_552).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(48)) @@ -699,10 +705,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_get_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_868 nanoseconds. - Weight::from_ref_time(359_800_153) - // Standard Error: 338_998 - .saturating_add(Weight::from_ref_time(323_351_220).saturating_mul(r.into())) + // Minimum execution time: 381_916 nanoseconds. + Weight::from_ref_time(349_150_912) + // Standard Error: 443_388 + .saturating_add(Weight::from_ref_time(316_975_558).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -710,10 +716,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_get_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 462_237 nanoseconds. - Weight::from_ref_time(585_809_405) - // Standard Error: 1_181_517 - .saturating_add(Weight::from_ref_time(160_905_409).saturating_mul(n.into())) + // Minimum execution time: 459_294 nanoseconds. + Weight::from_ref_time(579_698_524) + // Standard Error: 1_111_681 + .saturating_add(Weight::from_ref_time(159_276_087).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -721,10 +727,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_contains_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_794 nanoseconds. - Weight::from_ref_time(355_233_888) - // Standard Error: 416_492 - .saturating_add(Weight::from_ref_time(317_857_887).saturating_mul(r.into())) + // Minimum execution time: 381_700 nanoseconds. + Weight::from_ref_time(352_544_675) + // Standard Error: 401_504 + .saturating_add(Weight::from_ref_time(304_380_106).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -732,10 +738,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_contains_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 462_530 nanoseconds. - Weight::from_ref_time(571_276_165) - // Standard Error: 1_035_339 - .saturating_add(Weight::from_ref_time(63_481_618).saturating_mul(n.into())) + // Minimum execution time: 455_595 nanoseconds. + Weight::from_ref_time(560_428_166) + // Standard Error: 991_088 + .saturating_add(Weight::from_ref_time(61_810_610).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -743,10 +749,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_take_storage(r: u32, ) -> Weight { - // Minimum execution time: 385_343 nanoseconds. - Weight::from_ref_time(341_897_876) - // Standard Error: 451_948 - .saturating_add(Weight::from_ref_time(417_987_655).saturating_mul(r.into())) + // Minimum execution time: 382_000 nanoseconds. + Weight::from_ref_time(336_164_219) + // Standard Error: 601_744 + .saturating_add(Weight::from_ref_time(406_198_079).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -755,10 +761,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_take_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 485_507 nanoseconds. - Weight::from_ref_time(646_265_325) - // Standard Error: 1_495_172 - .saturating_add(Weight::from_ref_time(166_973_554).saturating_mul(n.into())) + // Minimum execution time: 482_335 nanoseconds. + Weight::from_ref_time(634_245_177) + // Standard Error: 1_418_845 + .saturating_add(Weight::from_ref_time(164_352_113).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(51)) .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(48)) @@ -771,10 +777,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_transfer(r: u32, ) -> Weight { - // Minimum execution time: 384_834 nanoseconds. - Weight::from_ref_time(348_341_375) - // Standard Error: 792_708 - .saturating_add(Weight::from_ref_time(1_336_691_822).saturating_mul(r.into())) + // Minimum execution time: 382_142 nanoseconds. + Weight::from_ref_time(317_581_708) + // Standard Error: 682_156 + .saturating_add(Weight::from_ref_time(1_305_289_569).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -787,10 +793,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_call(r: u32, ) -> Weight { - // Minimum execution time: 386_112 nanoseconds. - Weight::from_ref_time(386_971_000) - // Standard Error: 5_920_386 - .saturating_add(Weight::from_ref_time(28_051_657_660).saturating_mul(r.into())) + // Minimum execution time: 383_580 nanoseconds. + Weight::from_ref_time(384_176_000) + // Standard Error: 6_483_482 + .saturating_add(Weight::from_ref_time(28_047_685_517).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().reads((160_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -803,10 +809,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_delegate_call(r: u32, ) -> Weight { - // Minimum execution time: 385_776 nanoseconds. - Weight::from_ref_time(387_017_000) - // Standard Error: 6_680_801 - .saturating_add(Weight::from_ref_time(27_761_537_154).saturating_mul(r.into())) + // Minimum execution time: 384_523 nanoseconds. + Weight::from_ref_time(385_105_000) + // Standard Error: 6_156_142 + .saturating_add(Weight::from_ref_time(27_780_652_513).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((150_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -820,12 +826,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1024]`. fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { - // Minimum execution time: 9_623_952 nanoseconds. - Weight::from_ref_time(8_552_923_566) - // Standard Error: 6_582_866 - .saturating_add(Weight::from_ref_time(1_283_786_003).saturating_mul(t.into())) - // Standard Error: 9_870 - .saturating_add(Weight::from_ref_time(9_833_844).saturating_mul(c.into())) + // Minimum execution time: 9_509_961 nanoseconds. + Weight::from_ref_time(8_509_991_348) + // Standard Error: 6_614_757 + .saturating_add(Weight::from_ref_time(1_244_514_376).saturating_mul(t.into())) + // Standard Error: 9_918 + .saturating_add(Weight::from_ref_time(9_856_517).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(167)) .saturating_add(T::DbWeight::get().reads((81_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(163)) @@ -840,10 +846,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:80 w:80) /// The range of component `r` is `[0, 20]`. fn seal_instantiate(r: u32, ) -> Weight { - // Minimum execution time: 386_667 nanoseconds. - Weight::from_ref_time(387_559_000) - // Standard Error: 18_953_118 - .saturating_add(Weight::from_ref_time(33_188_342_429).saturating_mul(r.into())) + // Minimum execution time: 384_604 nanoseconds. + Weight::from_ref_time(385_278_000) + // Standard Error: 21_140_468 + .saturating_add(Weight::from_ref_time(33_100_726_150).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((400_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -857,14 +863,15 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:1 w:1) // Storage: System EventTopics (r:82 w:82) /// The range of component `t` is `[0, 1]`. + /// The range of component `i` is `[0, 960]`. /// The range of component `s` is `[0, 960]`. - fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { - // Minimum execution time: 11_664_478 nanoseconds. - Weight::from_ref_time(11_359_540_086) - // Standard Error: 45_626_277 - .saturating_add(Weight::from_ref_time(19_120_579).saturating_mul(t.into())) - // Standard Error: 72_976 - .saturating_add(Weight::from_ref_time(125_731_953).saturating_mul(s.into())) + fn seal_instantiate_per_transfer_input_salt_kb(t: u32, i: u32, s: u32, ) -> Weight { + // Minimum execution time: 129_699_480 nanoseconds. + Weight::from_ref_time(10_187_699_005) + // Standard Error: 155_040 + .saturating_add(Weight::from_ref_time(125_284_310).saturating_mul(i.into())) + // Standard Error: 155_040 + .saturating_add(Weight::from_ref_time(125_850_564).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(249)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(247)) @@ -877,10 +884,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { - // Minimum execution time: 384_826 nanoseconds. - Weight::from_ref_time(387_293_630) - // Standard Error: 437_875 - .saturating_add(Weight::from_ref_time(48_464_369).saturating_mul(r.into())) + // Minimum execution time: 380_397 nanoseconds. + Weight::from_ref_time(382_881_855) + // Standard Error: 290_948 + .saturating_add(Weight::from_ref_time(41_017_644).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -891,10 +898,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 426_531 nanoseconds. - Weight::from_ref_time(427_315_000) - // Standard Error: 48_058 - .saturating_add(Weight::from_ref_time(327_318_884).saturating_mul(n.into())) + // Minimum execution time: 422_439 nanoseconds. + Weight::from_ref_time(423_480_000) + // Standard Error: 56_072 + .saturating_add(Weight::from_ref_time(329_103_825).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -905,10 +912,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { - // Minimum execution time: 384_084 nanoseconds. - Weight::from_ref_time(386_354_628) - // Standard Error: 195_951 - .saturating_add(Weight::from_ref_time(52_991_271).saturating_mul(r.into())) + // Minimum execution time: 380_433 nanoseconds. + Weight::from_ref_time(382_325_624) + // Standard Error: 139_248 + .saturating_add(Weight::from_ref_time(53_159_175).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -919,10 +926,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 438_319 nanoseconds. - Weight::from_ref_time(439_001_000) - // Standard Error: 53_445 - .saturating_add(Weight::from_ref_time(251_353_803).saturating_mul(n.into())) + // Minimum execution time: 434_834 nanoseconds. + Weight::from_ref_time(435_383_000) + // Standard Error: 59_824 + .saturating_add(Weight::from_ref_time(251_297_967).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -933,10 +940,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { - // Minimum execution time: 384_397 nanoseconds. - Weight::from_ref_time(386_532_859) - // Standard Error: 141_195 - .saturating_add(Weight::from_ref_time(31_116_440).saturating_mul(r.into())) + // Minimum execution time: 379_088 nanoseconds. + Weight::from_ref_time(381_627_077) + // Standard Error: 152_561 + .saturating_add(Weight::from_ref_time(31_696_922).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -947,10 +954,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 416_504 nanoseconds. - Weight::from_ref_time(417_686_000) - // Standard Error: 47_003 - .saturating_add(Weight::from_ref_time(103_095_636).saturating_mul(n.into())) + // Minimum execution time: 411_630 nanoseconds. + Weight::from_ref_time(412_354_000) + // Standard Error: 50_788 + .saturating_add(Weight::from_ref_time(103_105_715).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -961,10 +968,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { - // Minimum execution time: 382_479 nanoseconds. - Weight::from_ref_time(384_623_057) - // Standard Error: 243_054 - .saturating_add(Weight::from_ref_time(37_025_542).saturating_mul(r.into())) + // Minimum execution time: 379_549 nanoseconds. + Weight::from_ref_time(382_406_346) + // Standard Error: 701_449 + .saturating_add(Weight::from_ref_time(31_066_353).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -975,10 +982,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 414_863 nanoseconds. - Weight::from_ref_time(415_728_000) - // Standard Error: 48_764 - .saturating_add(Weight::from_ref_time(103_050_672).saturating_mul(n.into())) + // Minimum execution time: 412_112 nanoseconds. + Weight::from_ref_time(412_710_000) + // Standard Error: 54_875 + .saturating_add(Weight::from_ref_time(103_169_035).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -989,10 +996,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { - // Minimum execution time: 384_418 nanoseconds. - Weight::from_ref_time(387_283_069) - // Standard Error: 526_301 - .saturating_add(Weight::from_ref_time(2_993_987_030).saturating_mul(r.into())) + // Minimum execution time: 381_994 nanoseconds. + Weight::from_ref_time(383_832_551) + // Standard Error: 676_656 + .saturating_add(Weight::from_ref_time(3_020_035_748).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1003,10 +1010,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { - // Minimum execution time: 383_686 nanoseconds. - Weight::from_ref_time(385_812_638) - // Standard Error: 539_029 - .saturating_add(Weight::from_ref_time(2_098_063_561).saturating_mul(r.into())) + // Minimum execution time: 381_472 nanoseconds. + Weight::from_ref_time(383_590_834) + // Standard Error: 538_574 + .saturating_add(Weight::from_ref_time(2_077_926_265).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1018,10 +1025,10 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:16 w:16) /// The range of component `r` is `[0, 20]`. fn seal_set_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 384_399 nanoseconds. - Weight::from_ref_time(385_337_000) - // Standard Error: 2_827_655 - .saturating_add(Weight::from_ref_time(1_383_659_432).saturating_mul(r.into())) + // Minimum execution time: 381_527 nanoseconds. + Weight::from_ref_time(382_291_000) + // Standard Error: 2_760_840 + .saturating_add(Weight::from_ref_time(1_356_115_009).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().reads((225_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -1034,10 +1041,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 385_165 nanoseconds. - Weight::from_ref_time(389_255_026) - // Standard Error: 25_918 - .saturating_add(Weight::from_ref_time(10_716_905).saturating_mul(r.into())) + // Minimum execution time: 382_722 nanoseconds. + Weight::from_ref_time(387_231_409) + // Standard Error: 28_817 + .saturating_add(Weight::from_ref_time(11_349_809).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1048,10 +1055,10 @@ impl WeightInfo for SubstrateWeight { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 386_959 nanoseconds. - Weight::from_ref_time(423_364_524) - // Standard Error: 127_096 - .saturating_add(Weight::from_ref_time(25_552_186).saturating_mul(r.into())) + // Minimum execution time: 383_568 nanoseconds. + Weight::from_ref_time(419_835_108) + // Standard Error: 125_982 + .saturating_add(Weight::from_ref_time(25_241_800).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -1063,376 +1070,376 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts Nonce (r:1 w:1) /// The range of component `r` is `[0, 20]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { - // Minimum execution time: 293_987 nanoseconds. - Weight::from_ref_time(307_154_849) - // Standard Error: 27_486 - .saturating_add(Weight::from_ref_time(8_759_333).saturating_mul(r.into())) + // Minimum execution time: 382_084 nanoseconds. + Weight::from_ref_time(388_155_568) + // Standard Error: 29_161 + .saturating_add(Weight::from_ref_time(9_015_217).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } /// The range of component `r` is `[0, 50]`. fn instr_i64const(r: u32, ) -> Weight { - // Minimum execution time: 688 nanoseconds. - Weight::from_ref_time(914_830) - // Standard Error: 222 - .saturating_add(Weight::from_ref_time(343_835).saturating_mul(r.into())) + // Minimum execution time: 593 nanoseconds. + Weight::from_ref_time(816_706) + // Standard Error: 173 + .saturating_add(Weight::from_ref_time(344_732).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64load(r: u32, ) -> Weight { - // Minimum execution time: 775 nanoseconds. - Weight::from_ref_time(1_286_008) - // Standard Error: 391 - .saturating_add(Weight::from_ref_time(984_759).saturating_mul(r.into())) + // Minimum execution time: 705 nanoseconds. + Weight::from_ref_time(1_191_205) + // Standard Error: 600 + .saturating_add(Weight::from_ref_time(986_102).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64store(r: u32, ) -> Weight { - // Minimum execution time: 779 nanoseconds. - Weight::from_ref_time(1_162_588) - // Standard Error: 694 - .saturating_add(Weight::from_ref_time(883_828).saturating_mul(r.into())) + // Minimum execution time: 717 nanoseconds. + Weight::from_ref_time(1_019_448) + // Standard Error: 421 + .saturating_add(Weight::from_ref_time(882_531).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_select(r: u32, ) -> Weight { - // Minimum execution time: 687 nanoseconds. - Weight::from_ref_time(965_966) - // Standard Error: 290 - .saturating_add(Weight::from_ref_time(955_392).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(917_880) + // Standard Error: 362 + .saturating_add(Weight::from_ref_time(957_235).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_if(r: u32, ) -> Weight { - // Minimum execution time: 681 nanoseconds. - Weight::from_ref_time(778_970) - // Standard Error: 670 - .saturating_add(Weight::from_ref_time(1_265_116).saturating_mul(r.into())) + // Minimum execution time: 630 nanoseconds. + Weight::from_ref_time(694_427) + // Standard Error: 1_506 + .saturating_add(Weight::from_ref_time(1_298_411).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br(r: u32, ) -> Weight { - // Minimum execution time: 673 nanoseconds. - Weight::from_ref_time(1_125_562) - // Standard Error: 818 - .saturating_add(Weight::from_ref_time(528_126).saturating_mul(r.into())) + // Minimum execution time: 634 nanoseconds. + Weight::from_ref_time(1_101_754) + // Standard Error: 840 + .saturating_add(Weight::from_ref_time(526_433).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_if(r: u32, ) -> Weight { - // Minimum execution time: 649 nanoseconds. - Weight::from_ref_time(780_802) - // Standard Error: 943 - .saturating_add(Weight::from_ref_time(800_988).saturating_mul(r.into())) + // Minimum execution time: 651 nanoseconds. + Weight::from_ref_time(790_908) + // Standard Error: 849 + .saturating_add(Weight::from_ref_time(800_188).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_table(r: u32, ) -> Weight { - // Minimum execution time: 662 nanoseconds. - Weight::from_ref_time(555_078) - // Standard Error: 1_540 - .saturating_add(Weight::from_ref_time(1_078_705).saturating_mul(r.into())) + // Minimum execution time: 622 nanoseconds. + Weight::from_ref_time(416_266) + // Standard Error: 1_574 + .saturating_add(Weight::from_ref_time(1_080_225).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Minimum execution time: 2_177 nanoseconds. - Weight::from_ref_time(2_581_121) - // Standard Error: 67 - .saturating_add(Weight::from_ref_time(5_001).saturating_mul(e.into())) + // Minimum execution time: 2_131 nanoseconds. + Weight::from_ref_time(2_540_446) + // Standard Error: 75 + .saturating_add(Weight::from_ref_time(4_997).saturating_mul(e.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call(r: u32, ) -> Weight { - // Minimum execution time: 702 nanoseconds. - Weight::from_ref_time(1_570_695) - // Standard Error: 1_524 - .saturating_add(Weight::from_ref_time(2_192_040).saturating_mul(r.into())) + // Minimum execution time: 650 nanoseconds. + Weight::from_ref_time(1_577_978) + // Standard Error: 2_696 + .saturating_add(Weight::from_ref_time(2_204_044).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call_indirect(r: u32, ) -> Weight { - // Minimum execution time: 745 nanoseconds. - Weight::from_ref_time(1_694_451) - // Standard Error: 4_170 - .saturating_add(Weight::from_ref_time(2_813_621).saturating_mul(r.into())) + // Minimum execution time: 742 nanoseconds. + Weight::from_ref_time(1_947_575) + // Standard Error: 1_651 + .saturating_add(Weight::from_ref_time(2_799_445).saturating_mul(r.into())) } /// The range of component `p` is `[0, 128]`. fn instr_call_indirect_per_param(p: u32, ) -> Weight { - // Minimum execution time: 4_255 nanoseconds. - Weight::from_ref_time(5_064_243) - // Standard Error: 289 - .saturating_add(Weight::from_ref_time(178_868).saturating_mul(p.into())) + // Minimum execution time: 4_230 nanoseconds. + Weight::from_ref_time(5_079_432) + // Standard Error: 315 + .saturating_add(Weight::from_ref_time(179_278).saturating_mul(p.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { - // Minimum execution time: 2_802 nanoseconds. - Weight::from_ref_time(3_474_642) - // Standard Error: 28 - .saturating_add(Weight::from_ref_time(92_517).saturating_mul(l.into())) + // Minimum execution time: 2_830 nanoseconds. + Weight::from_ref_time(3_601_633) + // Standard Error: 31 + .saturating_add(Weight::from_ref_time(92_499).saturating_mul(l.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_get(r: u32, ) -> Weight { - // Minimum execution time: 2_973 nanoseconds. - Weight::from_ref_time(3_218_977) - // Standard Error: 183 - .saturating_add(Weight::from_ref_time(364_688).saturating_mul(r.into())) + // Minimum execution time: 2_896 nanoseconds. + Weight::from_ref_time(3_137_247) + // Standard Error: 245 + .saturating_add(Weight::from_ref_time(364_431).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_set(r: u32, ) -> Weight { - // Minimum execution time: 2_912 nanoseconds. - Weight::from_ref_time(3_173_203) - // Standard Error: 260 - .saturating_add(Weight::from_ref_time(381_853).saturating_mul(r.into())) + // Minimum execution time: 2_795 nanoseconds. + Weight::from_ref_time(3_199_878) + // Standard Error: 549 + .saturating_add(Weight::from_ref_time(380_524).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_tee(r: u32, ) -> Weight { - // Minimum execution time: 2_916 nanoseconds. - Weight::from_ref_time(3_228_548) - // Standard Error: 311 - .saturating_add(Weight::from_ref_time(526_008).saturating_mul(r.into())) + // Minimum execution time: 2_807 nanoseconds. + Weight::from_ref_time(3_130_120) + // Standard Error: 319 + .saturating_add(Weight::from_ref_time(525_857).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_get(r: u32, ) -> Weight { - // Minimum execution time: 739 nanoseconds. - Weight::from_ref_time(1_128_919) - // Standard Error: 479 - .saturating_add(Weight::from_ref_time(810_765).saturating_mul(r.into())) + // Minimum execution time: 678 nanoseconds. + Weight::from_ref_time(1_013_348) + // Standard Error: 362 + .saturating_add(Weight::from_ref_time(810_232).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_set(r: u32, ) -> Weight { - // Minimum execution time: 724 nanoseconds. - Weight::from_ref_time(1_044_382) - // Standard Error: 371 - .saturating_add(Weight::from_ref_time(828_530).saturating_mul(r.into())) + // Minimum execution time: 624 nanoseconds. + Weight::from_ref_time(973_583) + // Standard Error: 373 + .saturating_add(Weight::from_ref_time(829_360).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_memory_current(r: u32, ) -> Weight { - // Minimum execution time: 770 nanoseconds. - Weight::from_ref_time(988_307) - // Standard Error: 587 - .saturating_add(Weight::from_ref_time(699_091).saturating_mul(r.into())) + // Minimum execution time: 698 nanoseconds. + Weight::from_ref_time(904_862) + // Standard Error: 360 + .saturating_add(Weight::from_ref_time(694_614).saturating_mul(r.into())) } /// The range of component `r` is `[0, 1]`. fn instr_memory_grow(r: u32, ) -> Weight { - // Minimum execution time: 688 nanoseconds. - Weight::from_ref_time(747_995) - // Standard Error: 3_894 - .saturating_add(Weight::from_ref_time(234_512_504).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(735_085) + // Standard Error: 105_815 + .saturating_add(Weight::from_ref_time(233_816_514).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64clz(r: u32, ) -> Weight { - // Minimum execution time: 643 nanoseconds. - Weight::from_ref_time(946_893) - // Standard Error: 188 - .saturating_add(Weight::from_ref_time(505_004).saturating_mul(r.into())) + // Minimum execution time: 606 nanoseconds. + Weight::from_ref_time(850_590) + // Standard Error: 262 + .saturating_add(Weight::from_ref_time(507_721).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ctz(r: u32, ) -> Weight { // Minimum execution time: 663 nanoseconds. - Weight::from_ref_time(965_194) - // Standard Error: 343 - .saturating_add(Weight::from_ref_time(505_213).saturating_mul(r.into())) + Weight::from_ref_time(853_060) + // Standard Error: 250 + .saturating_add(Weight::from_ref_time(514_225).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64popcnt(r: u32, ) -> Weight { - // Minimum execution time: 675 nanoseconds. - Weight::from_ref_time(903_705) - // Standard Error: 425 - .saturating_add(Weight::from_ref_time(507_749).saturating_mul(r.into())) + // Minimum execution time: 605 nanoseconds. + Weight::from_ref_time(849_563) + // Standard Error: 275 + .saturating_add(Weight::from_ref_time(511_494).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eqz(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(946_419) - // Standard Error: 301 - .saturating_add(Weight::from_ref_time(522_387).saturating_mul(r.into())) + // Minimum execution time: 618 nanoseconds. + Weight::from_ref_time(839_855) + // Standard Error: 228 + .saturating_add(Weight::from_ref_time(524_614).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendsi32(r: u32, ) -> Weight { - // Minimum execution time: 674 nanoseconds. - Weight::from_ref_time(963_566) - // Standard Error: 952 - .saturating_add(Weight::from_ref_time(504_528).saturating_mul(r.into())) + // Minimum execution time: 637 nanoseconds. + Weight::from_ref_time(860_326) + // Standard Error: 240 + .saturating_add(Weight::from_ref_time(504_847).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendui32(r: u32, ) -> Weight { - // Minimum execution time: 663 nanoseconds. - Weight::from_ref_time(927_099) - // Standard Error: 336 - .saturating_add(Weight::from_ref_time(505_200).saturating_mul(r.into())) + // Minimum execution time: 623 nanoseconds. + Weight::from_ref_time(844_585) + // Standard Error: 235 + .saturating_add(Weight::from_ref_time(505_821).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i32wrapi64(r: u32, ) -> Weight { - // Minimum execution time: 660 nanoseconds. - Weight::from_ref_time(901_114) - // Standard Error: 255 - .saturating_add(Weight::from_ref_time(503_803).saturating_mul(r.into())) + // Minimum execution time: 672 nanoseconds. + Weight::from_ref_time(826_784) + // Standard Error: 225 + .saturating_add(Weight::from_ref_time(504_632).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eq(r: u32, ) -> Weight { - // Minimum execution time: 636 nanoseconds. - Weight::from_ref_time(906_526) - // Standard Error: 246 - .saturating_add(Weight::from_ref_time(730_299).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(867_080) + // Standard Error: 231 + .saturating_add(Weight::from_ref_time(732_430).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ne(r: u32, ) -> Weight { - // Minimum execution time: 659 nanoseconds. - Weight::from_ref_time(947_772) - // Standard Error: 312 - .saturating_add(Weight::from_ref_time(729_463).saturating_mul(r.into())) + // Minimum execution time: 639 nanoseconds. + Weight::from_ref_time(866_094) + // Standard Error: 272 + .saturating_add(Weight::from_ref_time(732_560).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64lts(r: u32, ) -> Weight { - // Minimum execution time: 646 nanoseconds. - Weight::from_ref_time(923_694) - // Standard Error: 243 - .saturating_add(Weight::from_ref_time(738_995).saturating_mul(r.into())) + // Minimum execution time: 619 nanoseconds. + Weight::from_ref_time(928_672) + // Standard Error: 484 + .saturating_add(Weight::from_ref_time(739_523).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ltu(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(955_453) - // Standard Error: 1_430 - .saturating_add(Weight::from_ref_time(741_624).saturating_mul(r.into())) + // Minimum execution time: 612 nanoseconds. + Weight::from_ref_time(863_312) + // Standard Error: 328 + .saturating_add(Weight::from_ref_time(743_687).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gts(r: u32, ) -> Weight { - // Minimum execution time: 642 nanoseconds. - Weight::from_ref_time(900_107) - // Standard Error: 376 - .saturating_add(Weight::from_ref_time(740_016).saturating_mul(r.into())) + // Minimum execution time: 648 nanoseconds. + Weight::from_ref_time(931_331) + // Standard Error: 612 + .saturating_add(Weight::from_ref_time(747_653).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gtu(r: u32, ) -> Weight { - // Minimum execution time: 625 nanoseconds. - Weight::from_ref_time(946_744) - // Standard Error: 252 - .saturating_add(Weight::from_ref_time(743_532).saturating_mul(r.into())) + // Minimum execution time: 632 nanoseconds. + Weight::from_ref_time(868_901) + // Standard Error: 276 + .saturating_add(Weight::from_ref_time(744_778).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64les(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(918_551) - // Standard Error: 313 - .saturating_add(Weight::from_ref_time(731_451).saturating_mul(r.into())) + // Minimum execution time: 629 nanoseconds. + Weight::from_ref_time(898_516) + // Standard Error: 288 + .saturating_add(Weight::from_ref_time(734_393).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64leu(r: u32, ) -> Weight { - // Minimum execution time: 651 nanoseconds. - Weight::from_ref_time(923_475) - // Standard Error: 341 - .saturating_add(Weight::from_ref_time(738_353).saturating_mul(r.into())) + // Minimum execution time: 603 nanoseconds. + Weight::from_ref_time(853_744) + // Standard Error: 204 + .saturating_add(Weight::from_ref_time(739_499).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ges(r: u32, ) -> Weight { - // Minimum execution time: 666 nanoseconds. - Weight::from_ref_time(1_136_987) - // Standard Error: 1_482 - .saturating_add(Weight::from_ref_time(727_254).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(885_174) + // Standard Error: 238 + .saturating_add(Weight::from_ref_time(734_010).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64geu(r: u32, ) -> Weight { - // Minimum execution time: 633 nanoseconds. - Weight::from_ref_time(934_201) - // Standard Error: 332 - .saturating_add(Weight::from_ref_time(731_804).saturating_mul(r.into())) + // Minimum execution time: 602 nanoseconds. + Weight::from_ref_time(915_329) + // Standard Error: 273 + .saturating_add(Weight::from_ref_time(738_209).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64add(r: u32, ) -> Weight { - // Minimum execution time: 673 nanoseconds. - Weight::from_ref_time(983_317) - // Standard Error: 492 - .saturating_add(Weight::from_ref_time(718_126).saturating_mul(r.into())) + // Minimum execution time: 585 nanoseconds. + Weight::from_ref_time(862_239) + // Standard Error: 294 + .saturating_add(Weight::from_ref_time(719_000).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64sub(r: u32, ) -> Weight { - // Minimum execution time: 647 nanoseconds. - Weight::from_ref_time(925_490) - // Standard Error: 1_799 - .saturating_add(Weight::from_ref_time(711_178).saturating_mul(r.into())) + // Minimum execution time: 633 nanoseconds. + Weight::from_ref_time(881_696) + // Standard Error: 195 + .saturating_add(Weight::from_ref_time(713_153).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64mul(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(955_546) - // Standard Error: 283 - .saturating_add(Weight::from_ref_time(710_844).saturating_mul(r.into())) + // Minimum execution time: 629 nanoseconds. + Weight::from_ref_time(856_238) + // Standard Error: 269 + .saturating_add(Weight::from_ref_time(715_451).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divs(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(982_314) - // Standard Error: 267 - .saturating_add(Weight::from_ref_time(1_344_080).saturating_mul(r.into())) + // Minimum execution time: 633 nanoseconds. + Weight::from_ref_time(880_804) + // Standard Error: 725 + .saturating_add(Weight::from_ref_time(1_349_577).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divu(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(913_421) - // Standard Error: 737 - .saturating_add(Weight::from_ref_time(1_285_749).saturating_mul(r.into())) + // Minimum execution time: 639 nanoseconds. + Weight::from_ref_time(867_528) + // Standard Error: 1_940 + .saturating_add(Weight::from_ref_time(1_287_959).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rems(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(939_041) - // Standard Error: 354 - .saturating_add(Weight::from_ref_time(1_391_470).saturating_mul(r.into())) + // Minimum execution time: 595 nanoseconds. + Weight::from_ref_time(851_253) + // Standard Error: 503 + .saturating_add(Weight::from_ref_time(1_398_668).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64remu(r: u32, ) -> Weight { - // Minimum execution time: 656 nanoseconds. - Weight::from_ref_time(951_030) - // Standard Error: 342 - .saturating_add(Weight::from_ref_time(1_287_904).saturating_mul(r.into())) + // Minimum execution time: 604 nanoseconds. + Weight::from_ref_time(804_977) + // Standard Error: 812 + .saturating_add(Weight::from_ref_time(1_288_816).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64and(r: u32, ) -> Weight { - // Minimum execution time: 682 nanoseconds. - Weight::from_ref_time(940_975) - // Standard Error: 195 - .saturating_add(Weight::from_ref_time(717_132).saturating_mul(r.into())) + // Minimum execution time: 609 nanoseconds. + Weight::from_ref_time(890_945) + // Standard Error: 1_645 + .saturating_add(Weight::from_ref_time(719_770).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64or(r: u32, ) -> Weight { - // Minimum execution time: 704 nanoseconds. - Weight::from_ref_time(941_860) - // Standard Error: 200 - .saturating_add(Weight::from_ref_time(717_696).saturating_mul(r.into())) + // Minimum execution time: 628 nanoseconds. + Weight::from_ref_time(897_973) + // Standard Error: 1_641 + .saturating_add(Weight::from_ref_time(718_838).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64xor(r: u32, ) -> Weight { - // Minimum execution time: 648 nanoseconds. - Weight::from_ref_time(917_135) - // Standard Error: 237 - .saturating_add(Weight::from_ref_time(717_979).saturating_mul(r.into())) + // Minimum execution time: 634 nanoseconds. + Weight::from_ref_time(848_440) + // Standard Error: 249 + .saturating_add(Weight::from_ref_time(718_206).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shl(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(1_031_822) - // Standard Error: 937 - .saturating_add(Weight::from_ref_time(730_965).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(881_579) + // Standard Error: 273 + .saturating_add(Weight::from_ref_time(736_934).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shrs(r: u32, ) -> Weight { - // Minimum execution time: 671 nanoseconds. - Weight::from_ref_time(935_833) - // Standard Error: 184 - .saturating_add(Weight::from_ref_time(732_227).saturating_mul(r.into())) + // Minimum execution time: 630 nanoseconds. + Weight::from_ref_time(897_813) + // Standard Error: 249 + .saturating_add(Weight::from_ref_time(734_657).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shru(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(962_491) - // Standard Error: 488 - .saturating_add(Weight::from_ref_time(733_218).saturating_mul(r.into())) + // Minimum execution time: 607 nanoseconds. + Weight::from_ref_time(871_660) + // Standard Error: 312 + .saturating_add(Weight::from_ref_time(735_377).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotl(r: u32, ) -> Weight { - // Minimum execution time: 643 nanoseconds. - Weight::from_ref_time(951_949) - // Standard Error: 321 - .saturating_add(Weight::from_ref_time(732_212).saturating_mul(r.into())) + // Minimum execution time: 610 nanoseconds. + Weight::from_ref_time(861_640) + // Standard Error: 293 + .saturating_add(Weight::from_ref_time(735_524).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotr(r: u32, ) -> Weight { - // Minimum execution time: 665 nanoseconds. - Weight::from_ref_time(951_447) - // Standard Error: 346 - .saturating_add(Weight::from_ref_time(732_549).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(880_203) + // Standard Error: 373 + .saturating_add(Weight::from_ref_time(737_354).saturating_mul(r.into())) } } @@ -1440,17 +1447,17 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_process_deletion_queue_batch() -> Weight { - // Minimum execution time: 3_148 nanoseconds. - Weight::from_ref_time(3_326_000) + // Minimum execution time: 3_196 nanoseconds. + Weight::from_ref_time(3_293_000) .saturating_add(RocksDbWeight::get().reads(1)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { - // Minimum execution time: 15_318 nanoseconds. - Weight::from_ref_time(14_905_070) - // Standard Error: 1_055 - .saturating_add(Weight::from_ref_time(941_176).saturating_mul(k.into())) + // Minimum execution time: 14_857 nanoseconds. + Weight::from_ref_time(14_957_593) + // Standard Error: 1_015 + .saturating_add(Weight::from_ref_time(935_359).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -1458,10 +1465,10 @@ impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:0) /// The range of component `q` is `[0, 128]`. fn on_initialize_per_queue_item(q: u32, ) -> Weight { - // Minimum execution time: 3_182 nanoseconds. - Weight::from_ref_time(14_837_078) - // Standard Error: 3_423 - .saturating_add(Weight::from_ref_time(1_203_909).saturating_mul(q.into())) + // Minimum execution time: 3_231 nanoseconds. + Weight::from_ref_time(14_859_580) + // Standard Error: 3_479 + .saturating_add(Weight::from_ref_time(1_185_600).saturating_mul(q.into())) .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } @@ -1469,10 +1476,10 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:0 w:1) /// The range of component `c` is `[0, 64226]`. fn reinstrument(c: u32, ) -> Weight { - // Minimum execution time: 34_272 nanoseconds. - Weight::from_ref_time(33_159_915) - // Standard Error: 60 - .saturating_add(Weight::from_ref_time(46_967).saturating_mul(c.into())) + // Minimum execution time: 34_565 nanoseconds. + Weight::from_ref_time(29_199_016) + // Standard Error: 70 + .saturating_add(Weight::from_ref_time(47_107).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } @@ -1483,10 +1490,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `c` is `[0, 131072]`. fn call_with_code_per_byte(c: u32, ) -> Weight { - // Minimum execution time: 395_141 nanoseconds. - Weight::from_ref_time(413_672_628) - // Standard Error: 25 - .saturating_add(Weight::from_ref_time(30_570).saturating_mul(c.into())) + // Minimum execution time: 392_074 nanoseconds. + Weight::from_ref_time(404_090_909) + // Standard Error: 24 + .saturating_add(Weight::from_ref_time(30_454).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(4)) } @@ -1499,14 +1506,17 @@ impl WeightInfo for () { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) /// The range of component `c` is `[0, 64226]`. + /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. - fn instantiate_with_code(c: u32, s: u32, ) -> Weight { - // Minimum execution time: 2_259_439 nanoseconds. - Weight::from_ref_time(407_506_250) - // Standard Error: 79 - .saturating_add(Weight::from_ref_time(89_557).saturating_mul(c.into())) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_804).saturating_mul(s.into())) + fn instantiate_with_code(c: u32, i: u32, s: u32, ) -> Weight { + // Minimum execution time: 3_785_934 nanoseconds. + Weight::from_ref_time(683_143_843) + // Standard Error: 272 + .saturating_add(Weight::from_ref_time(87_620).saturating_mul(c.into())) + // Standard Error: 16 + .saturating_add(Weight::from_ref_time(1_363).saturating_mul(i.into())) + // Standard Error: 16 + .saturating_add(Weight::from_ref_time(1_778).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(8)) .saturating_add(RocksDbWeight::get().writes(9)) } @@ -1517,12 +1527,15 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) // Storage: System EventTopics (r:2 w:2) + /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. - fn instantiate(s: u32, ) -> Weight { - // Minimum execution time: 185_950 nanoseconds. - Weight::from_ref_time(173_152_122) - // Standard Error: 4 - .saturating_add(Weight::from_ref_time(1_559).saturating_mul(s.into())) + fn instantiate(i: u32, s: u32, ) -> Weight { + // Minimum execution time: 1_935_310 nanoseconds. + Weight::from_ref_time(203_531_122) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_674).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_ref_time(1_789).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(8)) .saturating_add(RocksDbWeight::get().writes(7)) } @@ -1532,8 +1545,8 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: System EventTopics (r:2 w:2) fn call() -> Weight { - // Minimum execution time: 154_738 nanoseconds. - Weight::from_ref_time(159_212_000) + // Minimum execution time: 151_999 nanoseconds. + Weight::from_ref_time(153_527_000) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(4)) } @@ -1543,10 +1556,10 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:0 w:1) /// The range of component `c` is `[0, 64226]`. fn upload_code(c: u32, ) -> Weight { - // Minimum execution time: 392_302 nanoseconds. - Weight::from_ref_time(402_889_681) - // Standard Error: 84 - .saturating_add(Weight::from_ref_time(89_393).saturating_mul(c.into())) + // Minimum execution time: 391_165 nanoseconds. + Weight::from_ref_time(394_519_487) + // Standard Error: 75 + .saturating_add(Weight::from_ref_time(89_736).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(4)) } @@ -1555,8 +1568,8 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - // Minimum execution time: 39_892 nanoseconds. - Weight::from_ref_time(40_258_000) + // Minimum execution time: 39_354 nanoseconds. + Weight::from_ref_time(39_855_000) .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(4)) } @@ -1564,8 +1577,8 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:2 w:2) // Storage: System EventTopics (r:3 w:3) fn set_code() -> Weight { - // Minimum execution time: 41_441 nanoseconds. - Weight::from_ref_time(42_011_000) + // Minimum execution time: 40_909 nanoseconds. + Weight::from_ref_time(41_275_000) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(6)) } @@ -1576,10 +1589,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_caller(r: u32, ) -> Weight { - // Minimum execution time: 383_919 nanoseconds. - Weight::from_ref_time(387_844_956) - // Standard Error: 38_460 - .saturating_add(Weight::from_ref_time(16_014_536).saturating_mul(r.into())) + // Minimum execution time: 380_150 nanoseconds. + Weight::from_ref_time(384_429_035) + // Standard Error: 34_740 + .saturating_add(Weight::from_ref_time(15_582_218).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1590,10 +1603,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_is_contract(r: u32, ) -> Weight { - // Minimum execution time: 384_047 nanoseconds. - Weight::from_ref_time(316_828_665) - // Standard Error: 571_260 - .saturating_add(Weight::from_ref_time(197_635_022).saturating_mul(r.into())) + // Minimum execution time: 380_608 nanoseconds. + Weight::from_ref_time(326_544_805) + // Standard Error: 475_381 + .saturating_add(Weight::from_ref_time(190_717_772).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1605,10 +1618,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 385_259 nanoseconds. - Weight::from_ref_time(338_849_650) - // Standard Error: 447_004 - .saturating_add(Weight::from_ref_time(235_734_380).saturating_mul(r.into())) + // Minimum execution time: 382_780 nanoseconds. + Weight::from_ref_time(333_775_113) + // Standard Error: 446_086 + .saturating_add(Weight::from_ref_time(232_531_042).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1620,10 +1633,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_own_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 385_528 nanoseconds. - Weight::from_ref_time(388_332_749) - // Standard Error: 43_017 - .saturating_add(Weight::from_ref_time(20_406_602).saturating_mul(r.into())) + // Minimum execution time: 381_815 nanoseconds. + Weight::from_ref_time(390_931_793) + // Standard Error: 61_918 + .saturating_add(Weight::from_ref_time(18_798_438).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1634,10 +1647,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_caller_is_origin(r: u32, ) -> Weight { - // Minimum execution time: 382_243 nanoseconds. - Weight::from_ref_time(387_692_764) - // Standard Error: 32_726 - .saturating_add(Weight::from_ref_time(10_753_573).saturating_mul(r.into())) + // Minimum execution time: 379_162 nanoseconds. + Weight::from_ref_time(383_796_363) + // Standard Error: 25_555 + .saturating_add(Weight::from_ref_time(10_843_721).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1648,10 +1661,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_address(r: u32, ) -> Weight { - // Minimum execution time: 383_993 nanoseconds. - Weight::from_ref_time(389_189_394) - // Standard Error: 55_885 - .saturating_add(Weight::from_ref_time(15_943_739).saturating_mul(r.into())) + // Minimum execution time: 380_307 nanoseconds. + Weight::from_ref_time(390_211_779) + // Standard Error: 53_326 + .saturating_add(Weight::from_ref_time(15_311_171).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1662,10 +1675,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_gas_left(r: u32, ) -> Weight { - // Minimum execution time: 383_057 nanoseconds. - Weight::from_ref_time(387_466_678) - // Standard Error: 38_570 - .saturating_add(Weight::from_ref_time(15_739_675).saturating_mul(r.into())) + // Minimum execution time: 380_230 nanoseconds. + Weight::from_ref_time(383_470_453) + // Standard Error: 45_007 + .saturating_add(Weight::from_ref_time(15_582_472).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1676,10 +1689,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_balance(r: u32, ) -> Weight { - // Minimum execution time: 383_688 nanoseconds. - Weight::from_ref_time(394_708_428) - // Standard Error: 101_035 - .saturating_add(Weight::from_ref_time(89_822_613).saturating_mul(r.into())) + // Minimum execution time: 380_244 nanoseconds. + Weight::from_ref_time(388_092_461) + // Standard Error: 98_199 + .saturating_add(Weight::from_ref_time(97_339_528).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1690,10 +1703,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_value_transferred(r: u32, ) -> Weight { - // Minimum execution time: 383_511 nanoseconds. - Weight::from_ref_time(387_270_075) - // Standard Error: 33_383 - .saturating_add(Weight::from_ref_time(15_672_963).saturating_mul(r.into())) + // Minimum execution time: 380_242 nanoseconds. + Weight::from_ref_time(384_078_258) + // Standard Error: 28_510 + .saturating_add(Weight::from_ref_time(15_423_359).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1704,10 +1717,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_minimum_balance(r: u32, ) -> Weight { - // Minimum execution time: 383_483 nanoseconds. - Weight::from_ref_time(386_995_457) - // Standard Error: 28_781 - .saturating_add(Weight::from_ref_time(15_632_597).saturating_mul(r.into())) + // Minimum execution time: 379_890 nanoseconds. + Weight::from_ref_time(383_658_430) + // Standard Error: 44_976 + .saturating_add(Weight::from_ref_time(15_451_905).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1718,10 +1731,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_block_number(r: u32, ) -> Weight { - // Minimum execution time: 383_630 nanoseconds. - Weight::from_ref_time(387_801_190) - // Standard Error: 41_234 - .saturating_add(Weight::from_ref_time(15_531_236).saturating_mul(r.into())) + // Minimum execution time: 380_269 nanoseconds. + Weight::from_ref_time(383_580_481) + // Standard Error: 31_862 + .saturating_add(Weight::from_ref_time(15_230_473).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1732,10 +1745,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_now(r: u32, ) -> Weight { - // Minimum execution time: 383_668 nanoseconds. - Weight::from_ref_time(387_490_160) - // Standard Error: 28_070 - .saturating_add(Weight::from_ref_time(15_639_764).saturating_mul(r.into())) + // Minimum execution time: 380_308 nanoseconds. + Weight::from_ref_time(383_732_372) + // Standard Error: 38_359 + .saturating_add(Weight::from_ref_time(15_358_775).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1747,10 +1760,10 @@ impl WeightInfo for () { // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) /// The range of component `r` is `[0, 20]`. fn seal_weight_to_fee(r: u32, ) -> Weight { - // Minimum execution time: 383_401 nanoseconds. - Weight::from_ref_time(393_140_360) - // Standard Error: 95_092 - .saturating_add(Weight::from_ref_time(83_864_160).saturating_mul(r.into())) + // Minimum execution time: 380_834 nanoseconds. + Weight::from_ref_time(388_999_459) + // Standard Error: 96_447 + .saturating_add(Weight::from_ref_time(86_714_414).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1761,10 +1774,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_gas(r: u32, ) -> Weight { - // Minimum execution time: 142_684 nanoseconds. - Weight::from_ref_time(145_540_019) - // Standard Error: 18_177 - .saturating_add(Weight::from_ref_time(8_061_360).saturating_mul(r.into())) + // Minimum execution time: 140_955 nanoseconds. + Weight::from_ref_time(144_716_423) + // Standard Error: 11_370 + .saturating_add(Weight::from_ref_time(7_858_807).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1775,10 +1788,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_input(r: u32, ) -> Weight { - // Minimum execution time: 383_472 nanoseconds. - Weight::from_ref_time(386_518_915) - // Standard Error: 46_174 - .saturating_add(Weight::from_ref_time(14_052_552).saturating_mul(r.into())) + // Minimum execution time: 380_210 nanoseconds. + Weight::from_ref_time(384_185_776) + // Standard Error: 49_038 + .saturating_add(Weight::from_ref_time(13_649_793).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1789,10 +1802,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_input_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 398_912 nanoseconds. - Weight::from_ref_time(426_793_015) - // Standard Error: 5_524 - .saturating_add(Weight::from_ref_time(9_645_931).saturating_mul(n.into())) + // Minimum execution time: 396_209 nanoseconds. + Weight::from_ref_time(424_522_611) + // Standard Error: 3_917 + .saturating_add(Weight::from_ref_time(9_627_216).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1803,10 +1816,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { - // Minimum execution time: 380_288 nanoseconds. - Weight::from_ref_time(382_064_302) - // Standard Error: 274_854 - .saturating_add(Weight::from_ref_time(5_341_497).saturating_mul(r.into())) + // Minimum execution time: 378_412 nanoseconds. + Weight::from_ref_time(380_502_085) + // Standard Error: 201_552 + .saturating_add(Weight::from_ref_time(1_434_214).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1817,10 +1830,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_return_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 382_104 nanoseconds. - Weight::from_ref_time(383_966_376) - // Standard Error: 668 - .saturating_add(Weight::from_ref_time(230_898).saturating_mul(n.into())) + // Minimum execution time: 381_463 nanoseconds. + Weight::from_ref_time(383_955_553) + // Standard Error: 998 + .saturating_add(Weight::from_ref_time(230_512).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1833,10 +1846,10 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:1 w:1) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { - // Minimum execution time: 382_423 nanoseconds. - Weight::from_ref_time(384_162_748) - // Standard Error: 403_637 - .saturating_add(Weight::from_ref_time(57_465_451).saturating_mul(r.into())) + // Minimum execution time: 379_877 nanoseconds. + Weight::from_ref_time(381_729_546) + // Standard Error: 214_004 + .saturating_add(Weight::from_ref_time(52_528_353).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1850,10 +1863,10 @@ impl WeightInfo for () { // Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) /// The range of component `r` is `[0, 20]`. fn seal_random(r: u32, ) -> Weight { - // Minimum execution time: 382_853 nanoseconds. - Weight::from_ref_time(391_962_017) - // Standard Error: 102_169 - .saturating_add(Weight::from_ref_time(108_325_188).saturating_mul(r.into())) + // Minimum execution time: 380_275 nanoseconds. + Weight::from_ref_time(386_495_777) + // Standard Error: 94_674 + .saturating_add(Weight::from_ref_time(108_432_929).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1864,10 +1877,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_deposit_event(r: u32, ) -> Weight { - // Minimum execution time: 380_999 nanoseconds. - Weight::from_ref_time(392_336_632) - // Standard Error: 168_846 - .saturating_add(Weight::from_ref_time(218_950_403).saturating_mul(r.into())) + // Minimum execution time: 379_095 nanoseconds. + Weight::from_ref_time(393_997_924) + // Standard Error: 141_916 + .saturating_add(Weight::from_ref_time(212_937_170).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -1879,12 +1892,12 @@ impl WeightInfo for () { /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16]`. fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - // Minimum execution time: 1_276_841 nanoseconds. - Weight::from_ref_time(587_558_952) - // Standard Error: 504_583 - .saturating_add(Weight::from_ref_time(178_141_140).saturating_mul(t.into())) - // Standard Error: 138_583 - .saturating_add(Weight::from_ref_time(71_194_319).saturating_mul(n.into())) + // Minimum execution time: 1_241_001 nanoseconds. + Weight::from_ref_time(548_526_917) + // Standard Error: 496_807 + .saturating_add(Weight::from_ref_time(177_087_769).saturating_mul(t.into())) + // Standard Error: 136_447 + .saturating_add(Weight::from_ref_time(71_558_402).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1897,20 +1910,20 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_debug_message(r: u32, ) -> Weight { - // Minimum execution time: 161_230 nanoseconds. - Weight::from_ref_time(168_508_241) - // Standard Error: 31_112 - .saturating_add(Weight::from_ref_time(12_496_531).saturating_mul(r.into())) + // Minimum execution time: 159_158 nanoseconds. + Weight::from_ref_time(163_427_712) + // Standard Error: 22_442 + .saturating_add(Weight::from_ref_time(12_647_838).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_set_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_055 nanoseconds. - Weight::from_ref_time(339_358_786) - // Standard Error: 486_941 - .saturating_add(Weight::from_ref_time(412_066_056).saturating_mul(r.into())) + // Minimum execution time: 381_068 nanoseconds. + Weight::from_ref_time(341_041_230) + // Standard Error: 464_053 + .saturating_add(Weight::from_ref_time(402_677_314).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1919,10 +1932,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { - // Minimum execution time: 512_301 nanoseconds. - Weight::from_ref_time(670_220_816) - // Standard Error: 1_460_983 - .saturating_add(Weight::from_ref_time(97_308_816).saturating_mul(n.into())) + // Minimum execution time: 508_695 nanoseconds. + Weight::from_ref_time(663_159_695) + // Standard Error: 1_419_342 + .saturating_add(Weight::from_ref_time(96_558_570).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(52)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(50)) @@ -1931,10 +1944,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { - // Minimum execution time: 510_820 nanoseconds. - Weight::from_ref_time(638_537_372) - // Standard Error: 1_195_632 - .saturating_add(Weight::from_ref_time(65_979_491).saturating_mul(n.into())) + // Minimum execution time: 508_542 nanoseconds. + Weight::from_ref_time(634_146_978) + // Standard Error: 1_168_252 + .saturating_add(Weight::from_ref_time(64_231_947).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(51)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(49)) @@ -1943,10 +1956,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_clear_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_596 nanoseconds. - Weight::from_ref_time(341_575_167) - // Standard Error: 478_894 - .saturating_add(Weight::from_ref_time(407_044_103).saturating_mul(r.into())) + // Minimum execution time: 381_743 nanoseconds. + Weight::from_ref_time(337_309_674) + // Standard Error: 527_407 + .saturating_add(Weight::from_ref_time(395_767_068).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1955,10 +1968,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_clear_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 481_757 nanoseconds. - Weight::from_ref_time(628_126_550) - // Standard Error: 1_363_017 - .saturating_add(Weight::from_ref_time(67_242_851).saturating_mul(n.into())) + // Minimum execution time: 478_283 nanoseconds. + Weight::from_ref_time(616_673_245) + // Standard Error: 1_290_784 + .saturating_add(Weight::from_ref_time(66_534_552).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(51)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(48)) @@ -1967,10 +1980,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_get_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_868 nanoseconds. - Weight::from_ref_time(359_800_153) - // Standard Error: 338_998 - .saturating_add(Weight::from_ref_time(323_351_220).saturating_mul(r.into())) + // Minimum execution time: 381_916 nanoseconds. + Weight::from_ref_time(349_150_912) + // Standard Error: 443_388 + .saturating_add(Weight::from_ref_time(316_975_558).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1978,10 +1991,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_get_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 462_237 nanoseconds. - Weight::from_ref_time(585_809_405) - // Standard Error: 1_181_517 - .saturating_add(Weight::from_ref_time(160_905_409).saturating_mul(n.into())) + // Minimum execution time: 459_294 nanoseconds. + Weight::from_ref_time(579_698_524) + // Standard Error: 1_111_681 + .saturating_add(Weight::from_ref_time(159_276_087).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(51)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -1989,10 +2002,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_contains_storage(r: u32, ) -> Weight { - // Minimum execution time: 383_794 nanoseconds. - Weight::from_ref_time(355_233_888) - // Standard Error: 416_492 - .saturating_add(Weight::from_ref_time(317_857_887).saturating_mul(r.into())) + // Minimum execution time: 381_700 nanoseconds. + Weight::from_ref_time(352_544_675) + // Standard Error: 401_504 + .saturating_add(Weight::from_ref_time(304_380_106).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2000,10 +2013,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_contains_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 462_530 nanoseconds. - Weight::from_ref_time(571_276_165) - // Standard Error: 1_035_339 - .saturating_add(Weight::from_ref_time(63_481_618).saturating_mul(n.into())) + // Minimum execution time: 455_595 nanoseconds. + Weight::from_ref_time(560_428_166) + // Standard Error: 991_088 + .saturating_add(Weight::from_ref_time(61_810_610).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(51)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2011,10 +2024,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `r` is `[0, 10]`. fn seal_take_storage(r: u32, ) -> Weight { - // Minimum execution time: 385_343 nanoseconds. - Weight::from_ref_time(341_897_876) - // Standard Error: 451_948 - .saturating_add(Weight::from_ref_time(417_987_655).saturating_mul(r.into())) + // Minimum execution time: 382_000 nanoseconds. + Weight::from_ref_time(336_164_219) + // Standard Error: 601_744 + .saturating_add(Weight::from_ref_time(406_198_079).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2023,10 +2036,10 @@ impl WeightInfo for () { // Storage: Skipped Metadata (r:0 w:0) /// The range of component `n` is `[0, 8]`. fn seal_take_storage_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 485_507 nanoseconds. - Weight::from_ref_time(646_265_325) - // Standard Error: 1_495_172 - .saturating_add(Weight::from_ref_time(166_973_554).saturating_mul(n.into())) + // Minimum execution time: 482_335 nanoseconds. + Weight::from_ref_time(634_245_177) + // Standard Error: 1_418_845 + .saturating_add(Weight::from_ref_time(164_352_113).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(51)) .saturating_add(RocksDbWeight::get().reads((7_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(48)) @@ -2039,10 +2052,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_transfer(r: u32, ) -> Weight { - // Minimum execution time: 384_834 nanoseconds. - Weight::from_ref_time(348_341_375) - // Standard Error: 792_708 - .saturating_add(Weight::from_ref_time(1_336_691_822).saturating_mul(r.into())) + // Minimum execution time: 382_142 nanoseconds. + Weight::from_ref_time(317_581_708) + // Standard Error: 682_156 + .saturating_add(Weight::from_ref_time(1_305_289_569).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().reads((80_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4)) @@ -2055,10 +2068,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_call(r: u32, ) -> Weight { - // Minimum execution time: 386_112 nanoseconds. - Weight::from_ref_time(386_971_000) - // Standard Error: 5_920_386 - .saturating_add(Weight::from_ref_time(28_051_657_660).saturating_mul(r.into())) + // Minimum execution time: 383_580 nanoseconds. + Weight::from_ref_time(384_176_000) + // Standard Error: 6_483_482 + .saturating_add(Weight::from_ref_time(28_047_685_517).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().reads((160_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2071,10 +2084,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_delegate_call(r: u32, ) -> Weight { - // Minimum execution time: 385_776 nanoseconds. - Weight::from_ref_time(387_017_000) - // Standard Error: 6_680_801 - .saturating_add(Weight::from_ref_time(27_761_537_154).saturating_mul(r.into())) + // Minimum execution time: 384_523 nanoseconds. + Weight::from_ref_time(385_105_000) + // Standard Error: 6_156_142 + .saturating_add(Weight::from_ref_time(27_780_652_513).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((150_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2088,12 +2101,12 @@ impl WeightInfo for () { /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1024]`. fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { - // Minimum execution time: 9_623_952 nanoseconds. - Weight::from_ref_time(8_552_923_566) - // Standard Error: 6_582_866 - .saturating_add(Weight::from_ref_time(1_283_786_003).saturating_mul(t.into())) - // Standard Error: 9_870 - .saturating_add(Weight::from_ref_time(9_833_844).saturating_mul(c.into())) + // Minimum execution time: 9_509_961 nanoseconds. + Weight::from_ref_time(8_509_991_348) + // Standard Error: 6_614_757 + .saturating_add(Weight::from_ref_time(1_244_514_376).saturating_mul(t.into())) + // Standard Error: 9_918 + .saturating_add(Weight::from_ref_time(9_856_517).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(167)) .saturating_add(RocksDbWeight::get().reads((81_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(163)) @@ -2108,10 +2121,10 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:80 w:80) /// The range of component `r` is `[0, 20]`. fn seal_instantiate(r: u32, ) -> Weight { - // Minimum execution time: 386_667 nanoseconds. - Weight::from_ref_time(387_559_000) - // Standard Error: 18_953_118 - .saturating_add(Weight::from_ref_time(33_188_342_429).saturating_mul(r.into())) + // Minimum execution time: 384_604 nanoseconds. + Weight::from_ref_time(385_278_000) + // Standard Error: 21_140_468 + .saturating_add(Weight::from_ref_time(33_100_726_150).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8)) .saturating_add(RocksDbWeight::get().reads((400_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(5)) @@ -2125,14 +2138,15 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:1 w:1) // Storage: System EventTopics (r:82 w:82) /// The range of component `t` is `[0, 1]`. + /// The range of component `i` is `[0, 960]`. /// The range of component `s` is `[0, 960]`. - fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { - // Minimum execution time: 11_664_478 nanoseconds. - Weight::from_ref_time(11_359_540_086) - // Standard Error: 45_626_277 - .saturating_add(Weight::from_ref_time(19_120_579).saturating_mul(t.into())) - // Standard Error: 72_976 - .saturating_add(Weight::from_ref_time(125_731_953).saturating_mul(s.into())) + fn seal_instantiate_per_transfer_input_salt_kb(t: u32, i: u32, s: u32, ) -> Weight { + // Minimum execution time: 129_699_480 nanoseconds. + Weight::from_ref_time(10_187_699_005) + // Standard Error: 155_040 + .saturating_add(Weight::from_ref_time(125_284_310).saturating_mul(i.into())) + // Standard Error: 155_040 + .saturating_add(Weight::from_ref_time(125_850_564).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(249)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(247)) @@ -2145,10 +2159,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { - // Minimum execution time: 384_826 nanoseconds. - Weight::from_ref_time(387_293_630) - // Standard Error: 437_875 - .saturating_add(Weight::from_ref_time(48_464_369).saturating_mul(r.into())) + // Minimum execution time: 380_397 nanoseconds. + Weight::from_ref_time(382_881_855) + // Standard Error: 290_948 + .saturating_add(Weight::from_ref_time(41_017_644).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2159,10 +2173,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 426_531 nanoseconds. - Weight::from_ref_time(427_315_000) - // Standard Error: 48_058 - .saturating_add(Weight::from_ref_time(327_318_884).saturating_mul(n.into())) + // Minimum execution time: 422_439 nanoseconds. + Weight::from_ref_time(423_480_000) + // Standard Error: 56_072 + .saturating_add(Weight::from_ref_time(329_103_825).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2173,10 +2187,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { - // Minimum execution time: 384_084 nanoseconds. - Weight::from_ref_time(386_354_628) - // Standard Error: 195_951 - .saturating_add(Weight::from_ref_time(52_991_271).saturating_mul(r.into())) + // Minimum execution time: 380_433 nanoseconds. + Weight::from_ref_time(382_325_624) + // Standard Error: 139_248 + .saturating_add(Weight::from_ref_time(53_159_175).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2187,10 +2201,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 438_319 nanoseconds. - Weight::from_ref_time(439_001_000) - // Standard Error: 53_445 - .saturating_add(Weight::from_ref_time(251_353_803).saturating_mul(n.into())) + // Minimum execution time: 434_834 nanoseconds. + Weight::from_ref_time(435_383_000) + // Standard Error: 59_824 + .saturating_add(Weight::from_ref_time(251_297_967).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2201,10 +2215,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { - // Minimum execution time: 384_397 nanoseconds. - Weight::from_ref_time(386_532_859) - // Standard Error: 141_195 - .saturating_add(Weight::from_ref_time(31_116_440).saturating_mul(r.into())) + // Minimum execution time: 379_088 nanoseconds. + Weight::from_ref_time(381_627_077) + // Standard Error: 152_561 + .saturating_add(Weight::from_ref_time(31_696_922).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2215,10 +2229,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 416_504 nanoseconds. - Weight::from_ref_time(417_686_000) - // Standard Error: 47_003 - .saturating_add(Weight::from_ref_time(103_095_636).saturating_mul(n.into())) + // Minimum execution time: 411_630 nanoseconds. + Weight::from_ref_time(412_354_000) + // Standard Error: 50_788 + .saturating_add(Weight::from_ref_time(103_105_715).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2229,10 +2243,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { - // Minimum execution time: 382_479 nanoseconds. - Weight::from_ref_time(384_623_057) - // Standard Error: 243_054 - .saturating_add(Weight::from_ref_time(37_025_542).saturating_mul(r.into())) + // Minimum execution time: 379_549 nanoseconds. + Weight::from_ref_time(382_406_346) + // Standard Error: 701_449 + .saturating_add(Weight::from_ref_time(31_066_353).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2243,10 +2257,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `n` is `[0, 1024]`. fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - // Minimum execution time: 414_863 nanoseconds. - Weight::from_ref_time(415_728_000) - // Standard Error: 48_764 - .saturating_add(Weight::from_ref_time(103_050_672).saturating_mul(n.into())) + // Minimum execution time: 412_112 nanoseconds. + Weight::from_ref_time(412_710_000) + // Standard Error: 54_875 + .saturating_add(Weight::from_ref_time(103_169_035).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2257,10 +2271,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { - // Minimum execution time: 384_418 nanoseconds. - Weight::from_ref_time(387_283_069) - // Standard Error: 526_301 - .saturating_add(Weight::from_ref_time(2_993_987_030).saturating_mul(r.into())) + // Minimum execution time: 381_994 nanoseconds. + Weight::from_ref_time(383_832_551) + // Standard Error: 676_656 + .saturating_add(Weight::from_ref_time(3_020_035_748).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2271,10 +2285,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 1]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { - // Minimum execution time: 383_686 nanoseconds. - Weight::from_ref_time(385_812_638) - // Standard Error: 539_029 - .saturating_add(Weight::from_ref_time(2_098_063_561).saturating_mul(r.into())) + // Minimum execution time: 381_472 nanoseconds. + Weight::from_ref_time(383_590_834) + // Standard Error: 538_574 + .saturating_add(Weight::from_ref_time(2_077_926_265).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2286,10 +2300,10 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:16 w:16) /// The range of component `r` is `[0, 20]`. fn seal_set_code_hash(r: u32, ) -> Weight { - // Minimum execution time: 384_399 nanoseconds. - Weight::from_ref_time(385_337_000) - // Standard Error: 2_827_655 - .saturating_add(Weight::from_ref_time(1_383_659_432).saturating_mul(r.into())) + // Minimum execution time: 381_527 nanoseconds. + Weight::from_ref_time(382_291_000) + // Standard Error: 2_760_840 + .saturating_add(Weight::from_ref_time(1_356_115_009).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().reads((225_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3)) @@ -2302,10 +2316,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 385_165 nanoseconds. - Weight::from_ref_time(389_255_026) - // Standard Error: 25_918 - .saturating_add(Weight::from_ref_time(10_716_905).saturating_mul(r.into())) + // Minimum execution time: 382_722 nanoseconds. + Weight::from_ref_time(387_231_409) + // Standard Error: 28_817 + .saturating_add(Weight::from_ref_time(11_349_809).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2316,10 +2330,10 @@ impl WeightInfo for () { // Storage: System EventTopics (r:2 w:2) /// The range of component `r` is `[0, 20]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { - // Minimum execution time: 386_959 nanoseconds. - Weight::from_ref_time(423_364_524) - // Standard Error: 127_096 - .saturating_add(Weight::from_ref_time(25_552_186).saturating_mul(r.into())) + // Minimum execution time: 383_568 nanoseconds. + Weight::from_ref_time(419_835_108) + // Standard Error: 125_982 + .saturating_add(Weight::from_ref_time(25_241_800).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(3)) } @@ -2331,375 +2345,375 @@ impl WeightInfo for () { // Storage: Contracts Nonce (r:1 w:1) /// The range of component `r` is `[0, 20]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { - // Minimum execution time: 293_987 nanoseconds. - Weight::from_ref_time(307_154_849) - // Standard Error: 27_486 - .saturating_add(Weight::from_ref_time(8_759_333).saturating_mul(r.into())) + // Minimum execution time: 382_084 nanoseconds. + Weight::from_ref_time(388_155_568) + // Standard Error: 29_161 + .saturating_add(Weight::from_ref_time(9_015_217).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(4)) } /// The range of component `r` is `[0, 50]`. fn instr_i64const(r: u32, ) -> Weight { - // Minimum execution time: 688 nanoseconds. - Weight::from_ref_time(914_830) - // Standard Error: 222 - .saturating_add(Weight::from_ref_time(343_835).saturating_mul(r.into())) + // Minimum execution time: 593 nanoseconds. + Weight::from_ref_time(816_706) + // Standard Error: 173 + .saturating_add(Weight::from_ref_time(344_732).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64load(r: u32, ) -> Weight { - // Minimum execution time: 775 nanoseconds. - Weight::from_ref_time(1_286_008) - // Standard Error: 391 - .saturating_add(Weight::from_ref_time(984_759).saturating_mul(r.into())) + // Minimum execution time: 705 nanoseconds. + Weight::from_ref_time(1_191_205) + // Standard Error: 600 + .saturating_add(Weight::from_ref_time(986_102).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64store(r: u32, ) -> Weight { - // Minimum execution time: 779 nanoseconds. - Weight::from_ref_time(1_162_588) - // Standard Error: 694 - .saturating_add(Weight::from_ref_time(883_828).saturating_mul(r.into())) + // Minimum execution time: 717 nanoseconds. + Weight::from_ref_time(1_019_448) + // Standard Error: 421 + .saturating_add(Weight::from_ref_time(882_531).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_select(r: u32, ) -> Weight { - // Minimum execution time: 687 nanoseconds. - Weight::from_ref_time(965_966) - // Standard Error: 290 - .saturating_add(Weight::from_ref_time(955_392).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(917_880) + // Standard Error: 362 + .saturating_add(Weight::from_ref_time(957_235).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_if(r: u32, ) -> Weight { - // Minimum execution time: 681 nanoseconds. - Weight::from_ref_time(778_970) - // Standard Error: 670 - .saturating_add(Weight::from_ref_time(1_265_116).saturating_mul(r.into())) + // Minimum execution time: 630 nanoseconds. + Weight::from_ref_time(694_427) + // Standard Error: 1_506 + .saturating_add(Weight::from_ref_time(1_298_411).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br(r: u32, ) -> Weight { - // Minimum execution time: 673 nanoseconds. - Weight::from_ref_time(1_125_562) - // Standard Error: 818 - .saturating_add(Weight::from_ref_time(528_126).saturating_mul(r.into())) + // Minimum execution time: 634 nanoseconds. + Weight::from_ref_time(1_101_754) + // Standard Error: 840 + .saturating_add(Weight::from_ref_time(526_433).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_if(r: u32, ) -> Weight { - // Minimum execution time: 649 nanoseconds. - Weight::from_ref_time(780_802) - // Standard Error: 943 - .saturating_add(Weight::from_ref_time(800_988).saturating_mul(r.into())) + // Minimum execution time: 651 nanoseconds. + Weight::from_ref_time(790_908) + // Standard Error: 849 + .saturating_add(Weight::from_ref_time(800_188).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_br_table(r: u32, ) -> Weight { - // Minimum execution time: 662 nanoseconds. - Weight::from_ref_time(555_078) - // Standard Error: 1_540 - .saturating_add(Weight::from_ref_time(1_078_705).saturating_mul(r.into())) + // Minimum execution time: 622 nanoseconds. + Weight::from_ref_time(416_266) + // Standard Error: 1_574 + .saturating_add(Weight::from_ref_time(1_080_225).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { - // Minimum execution time: 2_177 nanoseconds. - Weight::from_ref_time(2_581_121) - // Standard Error: 67 - .saturating_add(Weight::from_ref_time(5_001).saturating_mul(e.into())) + // Minimum execution time: 2_131 nanoseconds. + Weight::from_ref_time(2_540_446) + // Standard Error: 75 + .saturating_add(Weight::from_ref_time(4_997).saturating_mul(e.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call(r: u32, ) -> Weight { - // Minimum execution time: 702 nanoseconds. - Weight::from_ref_time(1_570_695) - // Standard Error: 1_524 - .saturating_add(Weight::from_ref_time(2_192_040).saturating_mul(r.into())) + // Minimum execution time: 650 nanoseconds. + Weight::from_ref_time(1_577_978) + // Standard Error: 2_696 + .saturating_add(Weight::from_ref_time(2_204_044).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_call_indirect(r: u32, ) -> Weight { - // Minimum execution time: 745 nanoseconds. - Weight::from_ref_time(1_694_451) - // Standard Error: 4_170 - .saturating_add(Weight::from_ref_time(2_813_621).saturating_mul(r.into())) + // Minimum execution time: 742 nanoseconds. + Weight::from_ref_time(1_947_575) + // Standard Error: 1_651 + .saturating_add(Weight::from_ref_time(2_799_445).saturating_mul(r.into())) } /// The range of component `p` is `[0, 128]`. fn instr_call_indirect_per_param(p: u32, ) -> Weight { - // Minimum execution time: 4_255 nanoseconds. - Weight::from_ref_time(5_064_243) - // Standard Error: 289 - .saturating_add(Weight::from_ref_time(178_868).saturating_mul(p.into())) + // Minimum execution time: 4_230 nanoseconds. + Weight::from_ref_time(5_079_432) + // Standard Error: 315 + .saturating_add(Weight::from_ref_time(179_278).saturating_mul(p.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { - // Minimum execution time: 2_802 nanoseconds. - Weight::from_ref_time(3_474_642) - // Standard Error: 28 - .saturating_add(Weight::from_ref_time(92_517).saturating_mul(l.into())) + // Minimum execution time: 2_830 nanoseconds. + Weight::from_ref_time(3_601_633) + // Standard Error: 31 + .saturating_add(Weight::from_ref_time(92_499).saturating_mul(l.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_get(r: u32, ) -> Weight { - // Minimum execution time: 2_973 nanoseconds. - Weight::from_ref_time(3_218_977) - // Standard Error: 183 - .saturating_add(Weight::from_ref_time(364_688).saturating_mul(r.into())) + // Minimum execution time: 2_896 nanoseconds. + Weight::from_ref_time(3_137_247) + // Standard Error: 245 + .saturating_add(Weight::from_ref_time(364_431).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_set(r: u32, ) -> Weight { - // Minimum execution time: 2_912 nanoseconds. - Weight::from_ref_time(3_173_203) - // Standard Error: 260 - .saturating_add(Weight::from_ref_time(381_853).saturating_mul(r.into())) + // Minimum execution time: 2_795 nanoseconds. + Weight::from_ref_time(3_199_878) + // Standard Error: 549 + .saturating_add(Weight::from_ref_time(380_524).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_local_tee(r: u32, ) -> Weight { - // Minimum execution time: 2_916 nanoseconds. - Weight::from_ref_time(3_228_548) - // Standard Error: 311 - .saturating_add(Weight::from_ref_time(526_008).saturating_mul(r.into())) + // Minimum execution time: 2_807 nanoseconds. + Weight::from_ref_time(3_130_120) + // Standard Error: 319 + .saturating_add(Weight::from_ref_time(525_857).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_get(r: u32, ) -> Weight { - // Minimum execution time: 739 nanoseconds. - Weight::from_ref_time(1_128_919) - // Standard Error: 479 - .saturating_add(Weight::from_ref_time(810_765).saturating_mul(r.into())) + // Minimum execution time: 678 nanoseconds. + Weight::from_ref_time(1_013_348) + // Standard Error: 362 + .saturating_add(Weight::from_ref_time(810_232).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_global_set(r: u32, ) -> Weight { - // Minimum execution time: 724 nanoseconds. - Weight::from_ref_time(1_044_382) - // Standard Error: 371 - .saturating_add(Weight::from_ref_time(828_530).saturating_mul(r.into())) + // Minimum execution time: 624 nanoseconds. + Weight::from_ref_time(973_583) + // Standard Error: 373 + .saturating_add(Weight::from_ref_time(829_360).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_memory_current(r: u32, ) -> Weight { - // Minimum execution time: 770 nanoseconds. - Weight::from_ref_time(988_307) - // Standard Error: 587 - .saturating_add(Weight::from_ref_time(699_091).saturating_mul(r.into())) + // Minimum execution time: 698 nanoseconds. + Weight::from_ref_time(904_862) + // Standard Error: 360 + .saturating_add(Weight::from_ref_time(694_614).saturating_mul(r.into())) } /// The range of component `r` is `[0, 1]`. fn instr_memory_grow(r: u32, ) -> Weight { - // Minimum execution time: 688 nanoseconds. - Weight::from_ref_time(747_995) - // Standard Error: 3_894 - .saturating_add(Weight::from_ref_time(234_512_504).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(735_085) + // Standard Error: 105_815 + .saturating_add(Weight::from_ref_time(233_816_514).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64clz(r: u32, ) -> Weight { - // Minimum execution time: 643 nanoseconds. - Weight::from_ref_time(946_893) - // Standard Error: 188 - .saturating_add(Weight::from_ref_time(505_004).saturating_mul(r.into())) + // Minimum execution time: 606 nanoseconds. + Weight::from_ref_time(850_590) + // Standard Error: 262 + .saturating_add(Weight::from_ref_time(507_721).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ctz(r: u32, ) -> Weight { // Minimum execution time: 663 nanoseconds. - Weight::from_ref_time(965_194) - // Standard Error: 343 - .saturating_add(Weight::from_ref_time(505_213).saturating_mul(r.into())) + Weight::from_ref_time(853_060) + // Standard Error: 250 + .saturating_add(Weight::from_ref_time(514_225).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64popcnt(r: u32, ) -> Weight { - // Minimum execution time: 675 nanoseconds. - Weight::from_ref_time(903_705) - // Standard Error: 425 - .saturating_add(Weight::from_ref_time(507_749).saturating_mul(r.into())) + // Minimum execution time: 605 nanoseconds. + Weight::from_ref_time(849_563) + // Standard Error: 275 + .saturating_add(Weight::from_ref_time(511_494).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eqz(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(946_419) - // Standard Error: 301 - .saturating_add(Weight::from_ref_time(522_387).saturating_mul(r.into())) + // Minimum execution time: 618 nanoseconds. + Weight::from_ref_time(839_855) + // Standard Error: 228 + .saturating_add(Weight::from_ref_time(524_614).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendsi32(r: u32, ) -> Weight { - // Minimum execution time: 674 nanoseconds. - Weight::from_ref_time(963_566) - // Standard Error: 952 - .saturating_add(Weight::from_ref_time(504_528).saturating_mul(r.into())) + // Minimum execution time: 637 nanoseconds. + Weight::from_ref_time(860_326) + // Standard Error: 240 + .saturating_add(Weight::from_ref_time(504_847).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendui32(r: u32, ) -> Weight { - // Minimum execution time: 663 nanoseconds. - Weight::from_ref_time(927_099) - // Standard Error: 336 - .saturating_add(Weight::from_ref_time(505_200).saturating_mul(r.into())) + // Minimum execution time: 623 nanoseconds. + Weight::from_ref_time(844_585) + // Standard Error: 235 + .saturating_add(Weight::from_ref_time(505_821).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i32wrapi64(r: u32, ) -> Weight { - // Minimum execution time: 660 nanoseconds. - Weight::from_ref_time(901_114) - // Standard Error: 255 - .saturating_add(Weight::from_ref_time(503_803).saturating_mul(r.into())) + // Minimum execution time: 672 nanoseconds. + Weight::from_ref_time(826_784) + // Standard Error: 225 + .saturating_add(Weight::from_ref_time(504_632).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64eq(r: u32, ) -> Weight { - // Minimum execution time: 636 nanoseconds. - Weight::from_ref_time(906_526) - // Standard Error: 246 - .saturating_add(Weight::from_ref_time(730_299).saturating_mul(r.into())) + // Minimum execution time: 642 nanoseconds. + Weight::from_ref_time(867_080) + // Standard Error: 231 + .saturating_add(Weight::from_ref_time(732_430).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ne(r: u32, ) -> Weight { - // Minimum execution time: 659 nanoseconds. - Weight::from_ref_time(947_772) - // Standard Error: 312 - .saturating_add(Weight::from_ref_time(729_463).saturating_mul(r.into())) + // Minimum execution time: 639 nanoseconds. + Weight::from_ref_time(866_094) + // Standard Error: 272 + .saturating_add(Weight::from_ref_time(732_560).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64lts(r: u32, ) -> Weight { - // Minimum execution time: 646 nanoseconds. - Weight::from_ref_time(923_694) - // Standard Error: 243 - .saturating_add(Weight::from_ref_time(738_995).saturating_mul(r.into())) + // Minimum execution time: 619 nanoseconds. + Weight::from_ref_time(928_672) + // Standard Error: 484 + .saturating_add(Weight::from_ref_time(739_523).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ltu(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(955_453) - // Standard Error: 1_430 - .saturating_add(Weight::from_ref_time(741_624).saturating_mul(r.into())) + // Minimum execution time: 612 nanoseconds. + Weight::from_ref_time(863_312) + // Standard Error: 328 + .saturating_add(Weight::from_ref_time(743_687).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gts(r: u32, ) -> Weight { - // Minimum execution time: 642 nanoseconds. - Weight::from_ref_time(900_107) - // Standard Error: 376 - .saturating_add(Weight::from_ref_time(740_016).saturating_mul(r.into())) + // Minimum execution time: 648 nanoseconds. + Weight::from_ref_time(931_331) + // Standard Error: 612 + .saturating_add(Weight::from_ref_time(747_653).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64gtu(r: u32, ) -> Weight { - // Minimum execution time: 625 nanoseconds. - Weight::from_ref_time(946_744) - // Standard Error: 252 - .saturating_add(Weight::from_ref_time(743_532).saturating_mul(r.into())) + // Minimum execution time: 632 nanoseconds. + Weight::from_ref_time(868_901) + // Standard Error: 276 + .saturating_add(Weight::from_ref_time(744_778).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64les(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(918_551) - // Standard Error: 313 - .saturating_add(Weight::from_ref_time(731_451).saturating_mul(r.into())) + // Minimum execution time: 629 nanoseconds. + Weight::from_ref_time(898_516) + // Standard Error: 288 + .saturating_add(Weight::from_ref_time(734_393).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64leu(r: u32, ) -> Weight { - // Minimum execution time: 651 nanoseconds. - Weight::from_ref_time(923_475) - // Standard Error: 341 - .saturating_add(Weight::from_ref_time(738_353).saturating_mul(r.into())) + // Minimum execution time: 603 nanoseconds. + Weight::from_ref_time(853_744) + // Standard Error: 204 + .saturating_add(Weight::from_ref_time(739_499).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64ges(r: u32, ) -> Weight { - // Minimum execution time: 666 nanoseconds. - Weight::from_ref_time(1_136_987) - // Standard Error: 1_482 - .saturating_add(Weight::from_ref_time(727_254).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(885_174) + // Standard Error: 238 + .saturating_add(Weight::from_ref_time(734_010).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64geu(r: u32, ) -> Weight { - // Minimum execution time: 633 nanoseconds. - Weight::from_ref_time(934_201) - // Standard Error: 332 - .saturating_add(Weight::from_ref_time(731_804).saturating_mul(r.into())) + // Minimum execution time: 602 nanoseconds. + Weight::from_ref_time(915_329) + // Standard Error: 273 + .saturating_add(Weight::from_ref_time(738_209).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64add(r: u32, ) -> Weight { - // Minimum execution time: 673 nanoseconds. - Weight::from_ref_time(983_317) - // Standard Error: 492 - .saturating_add(Weight::from_ref_time(718_126).saturating_mul(r.into())) + // Minimum execution time: 585 nanoseconds. + Weight::from_ref_time(862_239) + // Standard Error: 294 + .saturating_add(Weight::from_ref_time(719_000).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64sub(r: u32, ) -> Weight { - // Minimum execution time: 647 nanoseconds. - Weight::from_ref_time(925_490) - // Standard Error: 1_799 - .saturating_add(Weight::from_ref_time(711_178).saturating_mul(r.into())) + // Minimum execution time: 633 nanoseconds. + Weight::from_ref_time(881_696) + // Standard Error: 195 + .saturating_add(Weight::from_ref_time(713_153).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64mul(r: u32, ) -> Weight { - // Minimum execution time: 652 nanoseconds. - Weight::from_ref_time(955_546) - // Standard Error: 283 - .saturating_add(Weight::from_ref_time(710_844).saturating_mul(r.into())) + // Minimum execution time: 629 nanoseconds. + Weight::from_ref_time(856_238) + // Standard Error: 269 + .saturating_add(Weight::from_ref_time(715_451).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divs(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(982_314) - // Standard Error: 267 - .saturating_add(Weight::from_ref_time(1_344_080).saturating_mul(r.into())) + // Minimum execution time: 633 nanoseconds. + Weight::from_ref_time(880_804) + // Standard Error: 725 + .saturating_add(Weight::from_ref_time(1_349_577).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64divu(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(913_421) - // Standard Error: 737 - .saturating_add(Weight::from_ref_time(1_285_749).saturating_mul(r.into())) + // Minimum execution time: 639 nanoseconds. + Weight::from_ref_time(867_528) + // Standard Error: 1_940 + .saturating_add(Weight::from_ref_time(1_287_959).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rems(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(939_041) - // Standard Error: 354 - .saturating_add(Weight::from_ref_time(1_391_470).saturating_mul(r.into())) + // Minimum execution time: 595 nanoseconds. + Weight::from_ref_time(851_253) + // Standard Error: 503 + .saturating_add(Weight::from_ref_time(1_398_668).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64remu(r: u32, ) -> Weight { - // Minimum execution time: 656 nanoseconds. - Weight::from_ref_time(951_030) - // Standard Error: 342 - .saturating_add(Weight::from_ref_time(1_287_904).saturating_mul(r.into())) + // Minimum execution time: 604 nanoseconds. + Weight::from_ref_time(804_977) + // Standard Error: 812 + .saturating_add(Weight::from_ref_time(1_288_816).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64and(r: u32, ) -> Weight { - // Minimum execution time: 682 nanoseconds. - Weight::from_ref_time(940_975) - // Standard Error: 195 - .saturating_add(Weight::from_ref_time(717_132).saturating_mul(r.into())) + // Minimum execution time: 609 nanoseconds. + Weight::from_ref_time(890_945) + // Standard Error: 1_645 + .saturating_add(Weight::from_ref_time(719_770).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64or(r: u32, ) -> Weight { - // Minimum execution time: 704 nanoseconds. - Weight::from_ref_time(941_860) - // Standard Error: 200 - .saturating_add(Weight::from_ref_time(717_696).saturating_mul(r.into())) + // Minimum execution time: 628 nanoseconds. + Weight::from_ref_time(897_973) + // Standard Error: 1_641 + .saturating_add(Weight::from_ref_time(718_838).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64xor(r: u32, ) -> Weight { - // Minimum execution time: 648 nanoseconds. - Weight::from_ref_time(917_135) - // Standard Error: 237 - .saturating_add(Weight::from_ref_time(717_979).saturating_mul(r.into())) + // Minimum execution time: 634 nanoseconds. + Weight::from_ref_time(848_440) + // Standard Error: 249 + .saturating_add(Weight::from_ref_time(718_206).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shl(r: u32, ) -> Weight { - // Minimum execution time: 653 nanoseconds. - Weight::from_ref_time(1_031_822) - // Standard Error: 937 - .saturating_add(Weight::from_ref_time(730_965).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(881_579) + // Standard Error: 273 + .saturating_add(Weight::from_ref_time(736_934).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shrs(r: u32, ) -> Weight { - // Minimum execution time: 671 nanoseconds. - Weight::from_ref_time(935_833) - // Standard Error: 184 - .saturating_add(Weight::from_ref_time(732_227).saturating_mul(r.into())) + // Minimum execution time: 630 nanoseconds. + Weight::from_ref_time(897_813) + // Standard Error: 249 + .saturating_add(Weight::from_ref_time(734_657).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64shru(r: u32, ) -> Weight { - // Minimum execution time: 637 nanoseconds. - Weight::from_ref_time(962_491) - // Standard Error: 488 - .saturating_add(Weight::from_ref_time(733_218).saturating_mul(r.into())) + // Minimum execution time: 607 nanoseconds. + Weight::from_ref_time(871_660) + // Standard Error: 312 + .saturating_add(Weight::from_ref_time(735_377).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotl(r: u32, ) -> Weight { - // Minimum execution time: 643 nanoseconds. - Weight::from_ref_time(951_949) - // Standard Error: 321 - .saturating_add(Weight::from_ref_time(732_212).saturating_mul(r.into())) + // Minimum execution time: 610 nanoseconds. + Weight::from_ref_time(861_640) + // Standard Error: 293 + .saturating_add(Weight::from_ref_time(735_524).saturating_mul(r.into())) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotr(r: u32, ) -> Weight { - // Minimum execution time: 665 nanoseconds. - Weight::from_ref_time(951_447) - // Standard Error: 346 - .saturating_add(Weight::from_ref_time(732_549).saturating_mul(r.into())) + // Minimum execution time: 625 nanoseconds. + Weight::from_ref_time(880_203) + // Standard Error: 373 + .saturating_add(Weight::from_ref_time(737_354).saturating_mul(r.into())) } }