diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index b18b40d0b3345..3a749095b955e 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -33,6 +33,7 @@ use crate::{ exec::{AccountIdOf, StorageKey}, schedule::{API_BENCHMARK_BATCH_SIZE, INSTR_BENCHMARK_BATCH_SIZE}, storage::Storage, + wasm::CallFlags, Pallet as Contracts, *, }; use codec::{Encode, MaxEncodedLen}; @@ -1526,44 +1527,21 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, callee, 0u32.into(), Weight::MAX, None, vec![]) - seal_call_per_transfer_input_output_kb { + seal_call_per_transfer_clone_kb { let t in 0 .. 1; - let i in 0 .. code::max_pages::() * 64; - let o in 0 .. (code::max_pages::() - 1) * 64; - let callee_code = WasmModule::::from(ModuleDefinition { - memory: Some(ImportedMemory::max::()), - imported_functions: vec![ImportedFunction { - module: "seal0", - name: "seal_return", - params: vec![ - ValueType::I32, - ValueType::I32, - ValueType::I32, - ], - return_type: None, - }], - call_body: Some(body::plain(vec![ - Instruction::I32Const(0), // flags - Instruction::I32Const(0), // data_ptr - Instruction::I32Const((o * 1024) as i32), // data_len - Instruction::Call(0), - Instruction::End, - ])), - .. Default::default() - }); + let c in 0 .. code::max_pages::() * 64; let callees = (0..API_BENCHMARK_BATCH_SIZE) - .map(|i| Contract::with_index(i + 1, callee_code.clone(), vec![])) + .map(|i| Contract::with_index(i + 1, >::dummy(), vec![])) .collect::, _>>()?; let callee_len = callees.get(0).map(|i| i.account_id.encode().len()).unwrap_or(0); let callee_bytes = callees.iter().flat_map(|x| x.account_id.encode()).collect::>(); - let callees_len = callee_bytes.len(); let value: BalanceOf = t.into(); let value_bytes = value.encode(); let value_len = value_bytes.len(); let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), imported_functions: vec![ImportedFunction { - module: "seal0", + module: "seal1", name: "seal_call", params: vec![ ValueType::I32, @@ -1574,7 +1552,6 @@ benchmarks! { ValueType::I32, ValueType::I32, ValueType::I32, - ValueType::I32, ], return_type: Some(ValueType::I32), }], @@ -1587,21 +1564,16 @@ benchmarks! { offset: value_len as u32, value: callee_bytes, }, - DataSegment { - offset: (value_len + callees_len) as u32, - value: (o * 1024).to_le_bytes().into(), - }, ], call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Regular(Instruction::I32Const(CallFlags::CLONE_INPUT.bits() as i32)), // flags Counter(value_len as u32, callee_len as u32), // callee_ptr - Regular(Instruction::I32Const(callee_len as i32)), // callee_len Regular(Instruction::I64Const(0)), // gas Regular(Instruction::I32Const(0)), // value_ptr - Regular(Instruction::I32Const(value_len as i32)), // value_len Regular(Instruction::I32Const(0)), // input_data_ptr - Regular(Instruction::I32Const((i * 1024) as i32)), // input_data_len - Regular(Instruction::I32Const((value_len + callees_len + 4) as i32)), // output_ptr - Regular(Instruction::I32Const((value_len + callees_len) as i32)), // output_len_ptr + Regular(Instruction::I32Const(0)), // input_data_len + Regular(Instruction::I32Const(SENTINEL as i32)), // output_ptr + Regular(Instruction::I32Const(0)), // output_len_ptr Regular(Instruction::Call(0)), Regular(Instruction::Drop), ])), @@ -1609,7 +1581,8 @@ benchmarks! { }); let instance = Contract::::new(code, vec![])?; let origin = RawOrigin::Signed(instance.caller.clone()); - }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + let bytes = vec![42; (c * 1024) as usize]; + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, bytes) // We assume that every instantiate sends at least the minimum balance. seal_instantiate { @@ -1725,52 +1698,28 @@ benchmarks! { } } - seal_instantiate_per_input_output_salt_kb { - let i in 0 .. (code::max_pages::() - 1) * 64; - let o in 0 .. (code::max_pages::() - 1) * 64; + seal_instantiate_per_transfer_salt_kb { + let t in 0 .. 1; let s in 0 .. (code::max_pages::() - 1) * 64; - let callee_code = WasmModule::::from(ModuleDefinition { - memory: Some(ImportedMemory::max::()), - imported_functions: vec![ImportedFunction { - module: "seal0", - name: "seal_return", - params: vec![ - ValueType::I32, - ValueType::I32, - ValueType::I32, - ], - return_type: None, - }], - deploy_body: Some(body::plain(vec![ - Instruction::I32Const(0), // flags - Instruction::I32Const(0), // data_ptr - Instruction::I32Const((o * 1024) as i32), // data_len - Instruction::Call(0), - Instruction::End, - ])), - .. Default::default() - }); + let callee_code = WasmModule::::dummy(); let hash = callee_code.hash.clone(); let hash_bytes = callee_code.hash.encode(); let hash_len = hash_bytes.len(); Contracts::::store_code_raw(callee_code.code, whitelisted_caller())?; - let inputs = (0..API_BENCHMARK_BATCH_SIZE).map(|x| x.encode()).collect::>(); - let input_len = inputs.get(0).map(|x| x.len()).unwrap_or(0); - let input_bytes = inputs.iter().cloned().flatten().collect::>(); - let inputs_len = input_bytes.len(); - let value = T::Currency::minimum_balance(); - assert!(value > 0u32.into()); + let salts = (0..API_BENCHMARK_BATCH_SIZE).map(|x| x.encode()).collect::>(); + let salt_len = salts.get(0).map(|x| x.len()).unwrap_or(0); + let salt_bytes = salts.iter().cloned().flatten().collect::>(); + let salts_len = salt_bytes.len(); + let value: BalanceOf = t.into(); let value_bytes = value.encode(); let value_len = value_bytes.len(); let addr_len = T::AccountId::max_encoded_len(); // offsets where to place static data in contract memory - let input_offset = 0; - let value_offset = inputs_len; + let salt_offset = 0; + let value_offset = salts_len; let hash_offset = value_offset + value_len; let addr_len_offset = hash_offset + hash_len; - let output_len_offset = addr_len_offset + 4; - let output_offset = output_len_offset + 4; let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), @@ -1796,8 +1745,8 @@ benchmarks! { }], data_segments: vec![ DataSegment { - offset: input_offset as u32, - value: input_bytes, + offset: salt_offset as u32, + value: salt_bytes, }, DataSegment { offset: value_offset as u32, @@ -1811,10 +1760,6 @@ benchmarks! { offset: addr_len_offset as u32, value: (addr_len as u32).to_le_bytes().into(), }, - DataSegment { - offset: output_len_offset as u32, - value: (o * 1024).to_le_bytes().into(), - }, ], call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ Regular(Instruction::I32Const(hash_offset as i32)), // code_hash_ptr @@ -1822,14 +1767,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 - Counter(input_offset as u32, input_len as u32), // input_data_ptr - Regular(Instruction::I32Const((i * 1024).max(input_len as u32) as i32)), // input_data_len + Regular(Instruction::I32Const(0)), // input_data_ptr + Regular(Instruction::I32Const(0)), // 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(output_offset as i32)), // output_ptr - Regular(Instruction::I32Const(output_len_offset as i32)), // output_len_ptr - Counter(input_offset as u32, input_len as u32), // salt_ptr - Regular(Instruction::I32Const((s * 1024).max(input_len as u32) as i32)), // salt_len + 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::Call(0)), Regular(Instruction::I32Eqz), Regular(Instruction::If(BlockType::NoResult)), diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index bca74cd66ced7..eb7a68d81ad50 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -18,7 +18,6 @@ use crate::{ gas::GasMeter, storage::{self, Storage, WriteOutcome}, - wasm::{decrement_refcount, increment_refcount}, AccountCounter, BalanceOf, CodeHash, Config, ContractInfo, ContractInfoOf, Error, Event, Pallet as Contracts, Schedule, }; @@ -92,10 +91,6 @@ pub trait Ext: sealing::Sealed { /// Call (possibly transferring some amount of funds) into the specified account. /// /// Returns the original code size of the called contract. - /// - /// # Return Value - /// - /// Result<(ExecReturnValue, CodeSize), (ExecError, CodeSize)> fn call( &mut self, gas_limit: Weight, @@ -108,10 +103,6 @@ pub trait Ext: sealing::Sealed { /// Execute code in the current frame. /// /// Returns the original code size of the called contract. - /// - /// # Return Value - /// - /// Result fn delegate_call( &mut self, code: CodeHash, @@ -123,10 +114,6 @@ pub trait Ext: sealing::Sealed { /// Returns the original code size of the called contract. /// The newly created account will be associated with `code`. `value` specifies the amount of /// value transferred from this to the newly created account. - /// - /// # Return Value - /// - /// Result<(AccountId, ExecReturnValue, CodeSize), (ExecError, CodeSize)> fn instantiate( &mut self, gas_limit: Weight, @@ -269,12 +256,17 @@ pub trait Executable: Sized { gas_meter: &mut GasMeter, ) -> Result; - /// Decrement the refcount by one if the code exists. + /// Increment the refcount of a code in-storage by one. /// - /// # Note + /// This is needed when the code is not set via instantiate but `seal_set_code_hash`. /// - /// Charges weight proportional to the code size from the gas meter. - fn remove_user(code_hash: CodeHash) -> Result<(), DispatchError>; + /// # Errors + /// + /// [`Error::CodeNotFound`] is returned if the specified `code_hash` does not exist. + fn add_user(code_hash: CodeHash) -> Result<(), DispatchError>; + + /// Decrement the refcount by one if the code exists. + fn remove_user(code_hash: CodeHash); /// Execute the specified exported function and return the result. /// @@ -1058,7 +1050,7 @@ where T::Currency::free_balance(&frame.account_id), )?; ContractInfoOf::::remove(&frame.account_id); - E::remove_user(info.code_hash)?; + E::remove_user(info.code_hash); Contracts::::deposit_event(Event::Terminated { contract: frame.account_id.clone(), beneficiary: beneficiary.clone(), @@ -1188,10 +1180,10 @@ where } fn set_code_hash(&mut self, hash: CodeHash) -> Result<(), DispatchError> { - increment_refcount::(hash)?; + E::add_user(hash)?; let top_frame = self.top_frame_mut(); let prev_hash = top_frame.contract_info().code_hash.clone(); - decrement_refcount::(prev_hash.clone())?; + E::remove_user(prev_hash.clone()); top_frame.contract_info().code_hash = hash; Contracts::::deposit_event(Event::ContractCodeUpdated { contract: top_frame.account_id.clone(), @@ -1249,7 +1241,11 @@ mod tests { use pretty_assertions::assert_eq; use sp_core::Bytes; use sp_runtime::{traits::Hash, DispatchError}; - use std::{cell::RefCell, collections::HashMap, rc::Rc}; + use std::{ + cell::RefCell, + collections::hash_map::{Entry, HashMap}, + rc::Rc, + }; type System = frame_system::Pallet; @@ -1311,15 +1307,15 @@ mod tests { }) } - fn increment_refcount(code_hash: CodeHash) { + fn increment_refcount(code_hash: CodeHash) -> Result<(), DispatchError> { LOADER.with(|loader| { let mut loader = loader.borrow_mut(); - loader - .map - .entry(code_hash) - .and_modify(|executable| executable.refcount += 1) - .or_insert_with(|| panic!("code_hash does not exist")); - }); + match loader.map.entry(code_hash) { + Entry::Vacant(_) => Err(>::CodeNotFound)?, + Entry::Occupied(mut entry) => entry.get_mut().refcount += 1, + } + Ok(()) + }) } fn decrement_refcount(code_hash: CodeHash) { @@ -1355,9 +1351,12 @@ mod tests { }) } - fn remove_user(code_hash: CodeHash) -> Result<(), DispatchError> { + fn add_user(code_hash: CodeHash) -> Result<(), DispatchError> { + MockLoader::increment_refcount(code_hash) + } + + fn remove_user(code_hash: CodeHash) { MockLoader::decrement_refcount(code_hash); - Ok(()) } fn execute>( @@ -1367,7 +1366,7 @@ mod tests { input_data: Vec, ) -> ExecResult { if let &Constructor = function { - MockLoader::increment_refcount(self.code_hash); + Self::add_user(self.code_hash).unwrap(); } if function == &self.func_type { (self.func)(MockCtx { ext, input_data }, &self) diff --git a/frame/contracts/src/schedule.rs b/frame/contracts/src/schedule.rs index c92d2dd616106..d6bdf85a4d68e 100644 --- a/frame/contracts/src/schedule.rs +++ b/frame/contracts/src/schedule.rs @@ -367,20 +367,14 @@ pub struct HostFnWeights { /// Weight surcharge that is claimed if `seal_call` does a balance transfer. pub call_transfer_surcharge: Weight, - /// Weight per input byte supplied to `seal_call`. - pub call_per_input_byte: Weight, - - /// Weight per output byte received through `seal_call`. - pub call_per_output_byte: Weight, + /// Weight per byte that is cloned by supplying the `CLONE_INPUT` flag. + pub call_per_cloned_byte: Weight, /// Weight of calling `seal_instantiate`. pub instantiate: Weight, - /// Weight per input byte supplied to `seal_instantiate`. - pub instantiate_per_input_byte: Weight, - - /// Weight per output byte received through `seal_instantiate`. - pub instantiate_per_output_byte: Weight, + /// Weight surcharge that is claimed if `seal_instantiate` does a balance transfer. + pub instantiate_transfer_surcharge: Weight, /// Weight per salt byte supplied to `seal_instantiate`. pub instantiate_per_salt_byte: Weight, @@ -623,40 +617,16 @@ impl Default for HostFnWeights { transfer: cost_batched!(seal_transfer), call: cost_batched!(seal_call), delegate_call: cost_batched!(seal_delegate_call), - call_transfer_surcharge: cost_batched_args!( - seal_call_per_transfer_input_output_kb, - 1, - 0, - 0 - ), - call_per_input_byte: cost_byte_batched_args!( - seal_call_per_transfer_input_output_kb, - 0, - 1, - 0 - ), - call_per_output_byte: cost_byte_batched_args!( - seal_call_per_transfer_input_output_kb, - 0, - 0, - 1 - ), + call_transfer_surcharge: cost_batched_args!(seal_call_per_transfer_clone_kb, 1, 0), + call_per_cloned_byte: cost_batched_args!(seal_call_per_transfer_clone_kb, 0, 1), instantiate: cost_batched!(seal_instantiate), - instantiate_per_input_byte: cost_byte_batched_args!( - seal_instantiate_per_input_output_salt_kb, - 1, - 0, - 0 - ), - instantiate_per_output_byte: cost_byte_batched_args!( - seal_instantiate_per_input_output_salt_kb, - 0, + instantiate_transfer_surcharge: cost_byte_batched_args!( + seal_instantiate_per_transfer_salt_kb, 1, 0 ), instantiate_per_salt_byte: cost_byte_batched_args!( - seal_instantiate_per_input_output_salt_kb, - 0, + seal_instantiate_per_transfer_salt_kb, 0, 1 ), diff --git a/frame/contracts/src/wasm/code_cache.rs b/frame/contracts/src/wasm/code_cache.rs index 9a447066667bd..9fc49ac9a502d 100644 --- a/frame/contracts/src/wasm/code_cache.rs +++ b/frame/contracts/src/wasm/code_cache.rs @@ -108,13 +108,12 @@ where /// /// A contract whose refcount dropped to zero isn't automatically removed. A `remove_code` /// transaction must be submitted by the original uploader to do so. -pub fn decrement_refcount(code_hash: CodeHash) -> Result<(), DispatchError> { +pub fn decrement_refcount(code_hash: CodeHash) { >::mutate(code_hash, |existing| { if let Some(info) = existing { info.refcount = info.refcount.saturating_sub(1); } }); - Ok(()) } /// Increment the refcount of a code in-storage by one. diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 3053f33ff033a..2dbaad0d79324 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -25,11 +25,8 @@ mod prepare; mod runtime; #[cfg(feature = "runtime-benchmarks")] -pub use self::code_cache::reinstrument; -pub use self::{ - code_cache::{decrement_refcount, increment_refcount}, - runtime::{ReturnCode, Runtime, RuntimeCosts}, -}; +pub use crate::wasm::code_cache::reinstrument; +pub use crate::wasm::runtime::{CallFlags, ReturnCode, Runtime, RuntimeCosts}; use crate::{ exec::{ExecResult, Executable, ExportedFunction, Ext}, gas::GasMeter, @@ -201,7 +198,11 @@ where code_cache::load(code_hash, schedule, gas_meter) } - fn remove_user(code_hash: CodeHash) -> Result<(), DispatchError> { + fn add_user(code_hash: CodeHash) -> Result<(), DispatchError> { + code_cache::increment_refcount::(code_hash) + } + + fn remove_user(code_hash: CodeHash) { code_cache::decrement_refcount::(code_hash) } diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 384fbff9809b7..bb188e10e8fa0 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -136,6 +136,10 @@ pub enum RuntimeCosts { /// Charge the gas meter with the cost of a metering block. The charged costs are /// the supplied cost of the block plus the overhead of the metering itself. MeteringBlock(u32), + /// Weight charged for copying data from the sandbox. + CopyFromContract(u32), + /// Weight charged for copying data to the sandbox. + CopyToContract(u32), /// Weight of calling `seal_caller`. Caller, /// Weight of calling `seal_is_contract`. @@ -162,8 +166,6 @@ pub enum RuntimeCosts { WeightToFee, /// Weight of calling `seal_input` without the weight of copying the input. InputBase, - /// Weight of copying the input data for the given size. - InputCopyOut(u32), /// Weight of calling `seal_return` for the given output size. Return(u32), /// Weight of calling `seal_terminate`. @@ -188,21 +190,19 @@ pub enum RuntimeCosts { TakeStorage(u32), /// Weight of calling `seal_transfer`. Transfer, - /// Weight of calling `seal_call` for the given input size. - CallBase(u32), + /// Base weight of calling `seal_call`. + CallBase, /// Weight of calling `seal_delegate_call` for the given input size. #[cfg(feature = "unstable-interface")] - DelegateCallBase(u32), + DelegateCallBase, /// Weight of the transfer performed during a call. CallSurchargeTransfer, - /// Weight of output received through `seal_call` for the given size. - CallCopyOut(u32), - /// Weight of calling `seal_instantiate` for the given input and salt without output weight. - /// This includes the transfer as an instantiate without a value will always be below - /// the existential deposit and is disregarded as corner case. + /// Weight per byte that is cloned by supplying the `CLONE_INPUT` flag. + CallInputCloned(u32), + /// Weight of calling `seal_instantiate` for the given input length and salt. InstantiateBase { input_data_len: u32, salt_len: u32 }, - /// Weight of output received through `seal_instantiate` for the given size. - InstantiateCopyOut(u32), + /// Weight of the transfer performed during an instantiate. + InstantiateSurchargeTransfer, /// Weight of calling `seal_hash_sha_256` for the given input size. HashSha256(u32), /// Weight of calling `seal_hash_keccak_256` for the given input size. @@ -216,9 +216,6 @@ pub enum RuntimeCosts { EcdsaRecovery, /// Weight charged by a chain extension through `seal_call_chain_extension`. ChainExtension(u64), - /// Weight charged for copying data from the sandbox. - #[cfg(feature = "unstable-interface")] - CopyIn(u32), /// Weight charged for calling into the runtime. #[cfg(feature = "unstable-interface")] CallRuntime(Weight), @@ -236,6 +233,8 @@ impl RuntimeCosts { use self::RuntimeCosts::*; let weight = match *self { MeteringBlock(amount) => s.gas.saturating_add(amount.into()), + CopyFromContract(len) => s.return_per_byte.saturating_mul(len.into()), + CopyToContract(len) => s.input_per_byte.saturating_mul(len.into()), Caller => s.caller, #[cfg(feature = "unstable-interface")] IsContract => s.is_contract, @@ -250,7 +249,6 @@ impl RuntimeCosts { Now => s.now, WeightToFee => s.weight_to_fee, InputBase => s.input, - InputCopyOut(len) => s.input_per_byte.saturating_mul(len.into()), Return(len) => s.r#return.saturating_add(s.return_per_byte.saturating_mul(len.into())), Terminate => s.terminate, Random => s.random, @@ -277,18 +275,16 @@ impl RuntimeCosts { .take_storage .saturating_add(s.take_storage_per_byte.saturating_mul(len.into())), Transfer => s.transfer, - CallBase(len) => - s.call.saturating_add(s.call_per_input_byte.saturating_mul(len.into())), - CallSurchargeTransfer => s.call_transfer_surcharge, - CallCopyOut(len) => s.call_per_output_byte.saturating_mul(len.into()), + CallBase => s.call, #[cfg(feature = "unstable-interface")] - DelegateCallBase(len) => - s.delegate_call.saturating_add(s.call_per_input_byte.saturating_mul(len.into())), + DelegateCallBase => s.delegate_call, + CallSurchargeTransfer => s.call_transfer_surcharge, + CallInputCloned(len) => s.call_per_cloned_byte.saturating_mul(len.into()), InstantiateBase { input_data_len, salt_len } => s .instantiate - .saturating_add(s.instantiate_per_input_byte.saturating_mul(input_data_len.into())) + .saturating_add(s.return_per_byte.saturating_mul(input_data_len.into())) .saturating_add(s.instantiate_per_salt_byte.saturating_mul(salt_len.into())), - InstantiateCopyOut(len) => s.instantiate_per_output_byte.saturating_mul(len.into()), + InstantiateSurchargeTransfer => s.instantiate_transfer_surcharge, HashSha256(len) => s .hash_sha2_256 .saturating_add(s.hash_sha2_256_per_byte.saturating_mul(len.into())), @@ -304,8 +300,7 @@ impl RuntimeCosts { #[cfg(feature = "unstable-interface")] EcdsaRecovery => s.ecdsa_recover, ChainExtension(amount) => amount, - #[cfg(feature = "unstable-interface")] - CopyIn(len) => s.return_per_byte.saturating_mul(len.into()), + #[cfg(feature = "unstable-interface")] CallRuntime(weight) => weight, #[cfg(feature = "unstable-interface")] @@ -319,6 +314,17 @@ impl RuntimeCosts { } } +/// Same as [`Runtime::charge_gas`]. +/// +/// We need this access as a macro because sometimes hiding the lifetimes behind +/// a function won't work out. +macro_rules! charge_gas { + ($runtime:expr, $costs:expr) => {{ + let token = $costs.token(&$runtime.ext.schedule().host_fn_weights); + $runtime.ext.gas_meter().charge(token) + }}; +} + #[cfg_attr(test, derive(Debug, PartialEq, Eq))] #[derive(Copy, Clone)] struct RuntimeToken { @@ -339,7 +345,7 @@ where bitflags! { /// Flags used to change the behaviour of `seal_call` and `seal_delegate_call`. - struct CallFlags: u32 { + pub struct CallFlags: u32 { /// Forward the input of current function to the callee. /// /// Supplied input pointers are ignored when set. @@ -393,11 +399,11 @@ enum CallType { } impl CallType { - fn cost(&self, input_data_len: u32) -> RuntimeCosts { + fn cost(&self) -> RuntimeCosts { match self { - CallType::Call { .. } => RuntimeCosts::CallBase(input_data_len), + CallType::Call { .. } => RuntimeCosts::CallBase, #[cfg(feature = "unstable-interface")] - CallType::DelegateCall { .. } => RuntimeCosts::DelegateCallBase(input_data_len), + CallType::DelegateCall { .. } => RuntimeCosts::DelegateCallBase, } } } @@ -493,8 +499,7 @@ where /// /// Returns `Err(HostError)` if there is not enough gas. pub fn charge_gas(&mut self, costs: RuntimeCosts) -> Result { - let token = costs.token(&self.ext.schedule().host_fn_weights); - self.ext.gas_meter().charge(token) + charge_gas!(self, costs) } /// Adjust a previously charged amount down to its actual amount. @@ -734,12 +739,15 @@ where output_ptr: u32, output_len_ptr: u32, ) -> Result { - self.charge_gas(call_type.cost(input_data_len))?; + self.charge_gas(call_type.cost())?; let input_data = if flags.contains(CallFlags::CLONE_INPUT) { - self.input_data.as_ref().ok_or_else(|| Error::::InputForwarded)?.clone() + let input = self.input_data.as_ref().ok_or_else(|| Error::::InputForwarded)?; + charge_gas!(self, RuntimeCosts::CallInputCloned(input.len() as u32))?; + input.clone() } else if flags.contains(CallFlags::FORWARD_INPUT) { self.input_data.take().ok_or_else(|| Error::::InputForwarded)? } else { + self.charge_gas(RuntimeCosts::CopyFromContract(input_data_len))?; self.read_sandbox_memory(input_data_ptr, input_data_len)? }; @@ -782,7 +790,7 @@ where if let Ok(output) = &call_outcome { self.write_sandbox_output(output_ptr, output_len_ptr, &output.data, true, |len| { - Some(RuntimeCosts::CallCopyOut(len)) + Some(RuntimeCosts::CopyToContract(len)) })?; } Ok(Runtime::::exec_into_return_code(call_outcome)?) @@ -803,8 +811,11 @@ where salt_len: u32, ) -> Result { self.charge_gas(RuntimeCosts::InstantiateBase { input_data_len, salt_len })?; - let code_hash: CodeHash<::T> = self.read_sandbox_memory_as(code_hash_ptr)?; let value: BalanceOf<::T> = self.read_sandbox_memory_as(value_ptr)?; + if value > 0u32.into() { + self.charge_gas(RuntimeCosts::InstantiateSurchargeTransfer)?; + } + let code_hash: CodeHash<::T> = self.read_sandbox_memory_as(code_hash_ptr)?; let input_data = self.read_sandbox_memory(input_data_ptr, input_data_len)?; let salt = self.read_sandbox_memory(salt_ptr, salt_len)?; let instantiate_outcome = self.ext.instantiate(gas, code_hash, value, input_data, &salt); @@ -819,7 +830,7 @@ where )?; } self.write_sandbox_output(output_ptr, output_len_ptr, &output.data, true, |len| { - Some(RuntimeCosts::InstantiateCopyOut(len)) + Some(RuntimeCosts::CopyToContract(len)) })?; } Ok(Runtime::::exec_into_return_code(instantiate_outcome.map(|(_, retval)| retval))?) @@ -1302,7 +1313,7 @@ define_env!(Env, , ctx.charge_gas(RuntimeCosts::InputBase)?; if let Some(input) = ctx.input_data.take() { ctx.write_sandbox_output(out_ptr, out_len_ptr, &input, false, |len| { - Some(RuntimeCosts::InputCopyOut(len)) + Some(RuntimeCosts::CopyToContract(len)) })?; ctx.input_data = Some(input); Ok(()) @@ -1911,7 +1922,7 @@ define_env!(Env, , // deploy a contract using it to a production chain. [__unstable__] seal_call_runtime(ctx, call_ptr: u32, call_len: u32) -> ReturnCode => { use frame_support::{dispatch::GetDispatchInfo, weights::extract_actual_weight}; - ctx.charge_gas(RuntimeCosts::CopyIn(call_len))?; + ctx.charge_gas(RuntimeCosts::CopyFromContract(call_len))?; let call: ::Call = ctx.read_sandbox_memory_as_unbounded( call_ptr, call_len )?; diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index bf35ce511ab26..c43e98bb8ac4b 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-02-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-02-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -89,9 +89,9 @@ pub trait WeightInfo { fn seal_transfer(r: u32, ) -> Weight; fn seal_call(r: u32, ) -> Weight; fn seal_delegate_call(r: u32, ) -> Weight; - fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight; + fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight; fn seal_instantiate(r: u32, ) -> Weight; - fn seal_instantiate_per_input_output_salt_kb(i: u32, o: u32, s: u32, ) -> Weight; + fn seal_instantiate_per_transfer_salt_kb(t: 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; @@ -160,32 +160,32 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize() -> Weight { - (1_590_000 as Weight) + (1_560_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn on_initialize_per_trie_key(k: u32, ) -> Weight { - (9_975_000 as Weight) + (7_843_000 as Weight) // Standard Error: 0 - .saturating_add((724_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((749_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize_per_queue_item(q: u32, ) -> Weight { - (7_415_000 as Weight) - // Standard Error: 4_000 - .saturating_add((2_303_000 as Weight).saturating_mul(q as Weight)) + (3_228_000 as Weight) + // Standard Error: 5_000 + .saturating_add((2_257_000 as Weight).saturating_mul(q as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Contracts PristineCode (r:1 w:0) // Storage: Contracts CodeStorage (r:0 w:1) fn reinstrument(c: u32, ) -> Weight { - (18_519_000 as Weight) - // Standard Error: 36_000 - .saturating_add((66_661_000 as Weight).saturating_mul(c as Weight)) + (20_531_000 as Weight) + // Standard Error: 34_000 + .saturating_add((66_014_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -194,9 +194,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call_with_code_kb(c: u32, ) -> Weight { - (210_319_000 as Weight) - // Standard Error: 41_000 - .saturating_add((54_802_000 as Weight).saturating_mul(c as Weight)) + (295_703_000 as Weight) + // Standard Error: 53_000 + .saturating_add((57_661_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -208,11 +208,11 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) fn instantiate_with_code(c: u32, s: u32, ) -> Weight { - (220_394_000 as Weight) - // Standard Error: 129_000 - .saturating_add((145_155_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 8_000 - .saturating_add((1_741_000 as Weight).saturating_mul(s as Weight)) + (332_572_000 as Weight) + // Standard Error: 125_000 + .saturating_add((149_095_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 7_000 + .saturating_add((1_779_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } @@ -223,9 +223,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn instantiate(s: u32, ) -> Weight { - (171_438_000 as Weight) + (222_992_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_721_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_759_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } @@ -234,7 +234,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call() -> Weight { - (139_529_000 as Weight) + (189_003_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -242,9 +242,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) fn upload_code(c: u32, ) -> Weight { - (51_040_000 as Weight) - // Standard Error: 38_000 - .saturating_add((65_886_000 as Weight).saturating_mul(c as Weight)) + (52_521_000 as Weight) + // Standard Error: 36_000 + .saturating_add((66_486_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -252,7 +252,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - (24_347_000 as Weight) + (24_705_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -261,9 +261,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_caller(r: u32, ) -> Weight { - (217_164_000 as Weight) - // Standard Error: 89_000 - .saturating_add((48_023_000 as Weight).saturating_mul(r as Weight)) + (300_165_000 as Weight) + // Standard Error: 125_000 + .saturating_add((49_828_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -272,9 +272,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_is_contract(r: u32, ) -> Weight { - (81_537_000 as Weight) - // Standard Error: 847_000 - .saturating_add((367_429_000 as Weight).saturating_mul(r as Weight)) + (179_488_000 as Weight) + // Standard Error: 718_000 + .saturating_add((375_855_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -284,9 +284,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_caller_is_origin(r: u32, ) -> Weight { - (214_798_000 as Weight) - // Standard Error: 56_000 - .saturating_add((21_100_000 as Weight).saturating_mul(r as Weight)) + (295_198_000 as Weight) + // Standard Error: 79_000 + .saturating_add((21_948_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -295,9 +295,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_address(r: u32, ) -> Weight { - (216_615_000 as Weight) - // Standard Error: 75_000 - .saturating_add((48_054_000 as Weight).saturating_mul(r as Weight)) + (300_366_000 as Weight) + // Standard Error: 111_000 + .saturating_add((49_435_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -306,9 +306,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_gas_left(r: u32, ) -> Weight { - (218_034_000 as Weight) + (299_800_000 as Weight) // Standard Error: 87_000 - .saturating_add((47_594_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((49_002_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -317,9 +317,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_balance(r: u32, ) -> Weight { - (221_980_000 as Weight) - // Standard Error: 135_000 - .saturating_add((135_618_000 as Weight).saturating_mul(r as Weight)) + (303_057_000 as Weight) + // Standard Error: 175_000 + .saturating_add((139_293_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -328,9 +328,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_value_transferred(r: u32, ) -> Weight { - (217_623_000 as Weight) - // Standard Error: 86_000 - .saturating_add((47_656_000 as Weight).saturating_mul(r as Weight)) + (299_754_000 as Weight) + // Standard Error: 93_000 + .saturating_add((48_945_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -339,9 +339,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_minimum_balance(r: u32, ) -> Weight { - (216_826_000 as Weight) - // Standard Error: 88_000 - .saturating_add((47_644_000 as Weight).saturating_mul(r as Weight)) + (302_229_000 as Weight) + // Standard Error: 128_000 + .saturating_add((49_007_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -350,9 +350,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_block_number(r: u32, ) -> Weight { - (219_487_000 as Weight) - // Standard Error: 90_000 - .saturating_add((47_167_000 as Weight).saturating_mul(r as Weight)) + (300_772_000 as Weight) + // Standard Error: 114_000 + .saturating_add((48_794_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -361,9 +361,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_now(r: u32, ) -> Weight { - (218_953_000 as Weight) - // Standard Error: 95_000 - .saturating_add((47_458_000 as Weight).saturating_mul(r as Weight)) + (301_936_000 as Weight) + // Standard Error: 119_000 + .saturating_add((48_839_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -373,9 +373,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) fn seal_weight_to_fee(r: u32, ) -> Weight { - (220_132_000 as Weight) - // Standard Error: 144_000 - .saturating_add((120_373_000 as Weight).saturating_mul(r as Weight)) + (304_935_000 as Weight) + // Standard Error: 146_000 + .saturating_add((121_871_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -384,9 +384,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_gas(r: u32, ) -> Weight { - (127_458_000 as Weight) - // Standard Error: 56_000 - .saturating_add((24_015_000 as Weight).saturating_mul(r as Weight)) + (178_176_000 as Weight) + // Standard Error: 52_000 + .saturating_add((24_960_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -395,9 +395,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_input(r: u32, ) -> Weight { - (220_304_000 as Weight) - // Standard Error: 112_000 - .saturating_add((46_804_000 as Weight).saturating_mul(r as Weight)) + (297_394_000 as Weight) + // Standard Error: 140_000 + .saturating_add((49_199_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -406,9 +406,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_input_per_kb(n: u32, ) -> Weight { - (300_916_000 as Weight) - // Standard Error: 8_000 - .saturating_add((10_552_000 as Weight).saturating_mul(n as Weight)) + (374_409_000 as Weight) + // Standard Error: 3_000 + .saturating_add((11_924_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -417,9 +417,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_return(r: u32, ) -> Weight { - (211_812_000 as Weight) - // Standard Error: 138_000 - .saturating_add((1_698_000 as Weight).saturating_mul(r as Weight)) + (292_278_000 as Weight) + // Standard Error: 114_000 + .saturating_add((1_474_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -428,9 +428,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_return_per_kb(n: u32, ) -> Weight { - (213_994_000 as Weight) + (294_714_000 as Weight) // Standard Error: 0 - .saturating_add((176_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((230_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -441,9 +441,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts DeletionQueue (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn seal_terminate(r: u32, ) -> Weight { - (215_173_000 as Weight) - // Standard Error: 708_000 - .saturating_add((52_509_000 as Weight).saturating_mul(r as Weight)) + (297_589_000 as Weight) + // Standard Error: 2_835_000 + .saturating_add((53_498_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -455,9 +455,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) fn seal_random(r: u32, ) -> Weight { - (219_521_000 as Weight) - // Standard Error: 171_000 - .saturating_add((156_228_000 as Weight).saturating_mul(r as Weight)) + (296_371_000 as Weight) + // Standard Error: 220_000 + .saturating_add((160_881_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -466,9 +466,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_deposit_event(r: u32, ) -> Weight { - (227_624_000 as Weight) - // Standard Error: 193_000 - .saturating_add((285_058_000 as Weight).saturating_mul(r as Weight)) + (308_401_000 as Weight) + // Standard Error: 202_000 + .saturating_add((277_771_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -478,11 +478,11 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: System EventTopics (r:100 w:100) fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - (503_312_000 as Weight) - // Standard Error: 1_729_000 - .saturating_add((288_009_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 340_000 - .saturating_add((80_936_000 as Weight).saturating_mul(n as Weight)) + (625_100_000 as Weight) + // Standard Error: 2_053_000 + .saturating_add((284_765_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 404_000 + .saturating_add((85_893_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(t as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -493,17 +493,17 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_debug_message(r: u32, ) -> Weight { - (132_096_000 as Weight) - // Standard Error: 73_000 - .saturating_add((40_337_000 as Weight).saturating_mul(r as Weight)) + (182_141_000 as Weight) + // Standard Error: 134_000 + .saturating_add((41_928_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage(r: u32, ) -> Weight { - (52_622_000 as Weight) - // Standard Error: 1_006_000 - .saturating_add((404_716_000 as Weight).saturating_mul(r as Weight)) + (139_030_000 as Weight) + // Standard Error: 1_038_000 + .saturating_add((405_168_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -511,25 +511,25 @@ impl WeightInfo for SubstrateWeight { } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { - (601_324_000 as Weight) - // Standard Error: 264_000 - .saturating_add((27_943_000 as Weight).saturating_mul(n as Weight)) + (689_591_000 as Weight) + // Standard Error: 275_000 + .saturating_add((31_438_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(105 as Weight)) .saturating_add(T::DbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { - (626_752_000 as Weight) - // Standard Error: 292_000 - .saturating_add((10_616_000 as Weight).saturating_mul(n as Weight)) + (709_965_000 as Weight) + // Standard Error: 340_000 + .saturating_add((11_182_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(105 as Weight)) .saturating_add(T::DbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_clear_storage(r: u32, ) -> Weight { - (80_138_000 as Weight) - // Standard Error: 933_000 - .saturating_add((382_949_000 as Weight).saturating_mul(r as Weight)) + (169_937_000 as Weight) + // Standard Error: 883_000 + .saturating_add((389_090_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) @@ -537,51 +537,51 @@ impl WeightInfo for SubstrateWeight { } // Storage: Skipped Metadata (r:0 w:0) fn seal_clear_storage_per_kb(n: u32, ) -> Weight { - (603_984_000 as Weight) - // Standard Error: 242_000 - .saturating_add((10_712_000 as Weight).saturating_mul(n as Weight)) + (695_589_000 as Weight) + // Standard Error: 268_000 + .saturating_add((10_530_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(105 as Weight)) .saturating_add(T::DbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_get_storage(r: u32, ) -> Weight { - (113_136_000 as Weight) - // Standard Error: 635_000 - .saturating_add((324_706_000 as Weight).saturating_mul(r as Weight)) + (195_080_000 as Weight) + // Standard Error: 607_000 + .saturating_add((328_903_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (562_781_000 as Weight) - // Standard Error: 354_000 - .saturating_add((63_275_000 as Weight).saturating_mul(n as Weight)) + (647_422_000 as Weight) + // Standard Error: 361_000 + .saturating_add((68_849_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(104 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_contains_storage(r: u32, ) -> Weight { - (112_237_000 as Weight) - // Standard Error: 655_000 - .saturating_add((296_653_000 as Weight).saturating_mul(r as Weight)) + (198_907_000 as Weight) + // Standard Error: 658_000 + .saturating_add((295_368_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_contains_storage_per_kb(n: u32, ) -> Weight { - (520_002_000 as Weight) - // Standard Error: 232_000 - .saturating_add((9_726_000 as Weight).saturating_mul(n as Weight)) + (599_284_000 as Weight) + // Standard Error: 243_000 + .saturating_add((9_923_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(104 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage(r: u32, ) -> Weight { - (87_232_000 as Weight) - // Standard Error: 920_000 - .saturating_add((415_305_000 as Weight).saturating_mul(r as Weight)) + (170_700_000 as Weight) + // Standard Error: 887_000 + .saturating_add((422_448_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) @@ -589,9 +589,9 @@ impl WeightInfo for SubstrateWeight { } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage_per_kb(n: u32, ) -> Weight { - (648_862_000 as Weight) - // Standard Error: 319_000 - .saturating_add((63_991_000 as Weight).saturating_mul(n as Weight)) + (743_584_000 as Weight) + // Standard Error: 403_000 + .saturating_add((69_763_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(105 as Weight)) .saturating_add(T::DbWeight::get().writes(103 as Weight)) } @@ -600,9 +600,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_transfer(r: u32, ) -> Weight { - (99_621_000 as Weight) - // Standard Error: 1_154_000 - .saturating_add((1_732_052_000 as Weight).saturating_mul(r as Weight)) + (208_815_000 as Weight) + // Standard Error: 1_078_000 + .saturating_add((1_719_660_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -614,8 +614,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) fn seal_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 6_293_000 - .saturating_add((19_410_115_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 3_471_000 + .saturating_add((27_917_429_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -627,8 +627,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) fn seal_delegate_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 7_155_000 - .saturating_add((19_793_614_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 13_012_000 + .saturating_add((28_044_371_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads((99 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -636,14 +636,12 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts ContractInfoOf (r:101 w:101) // Storage: Contracts CodeStorage (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) - fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight { - (19_711_861_000 as Weight) - // Standard Error: 55_158_000 - .saturating_add((2_509_755_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 19_000 - .saturating_add((17_808_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 21_000 - .saturating_add((28_104_000 as Weight).saturating_mul(o as Weight)) + fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { + (15_964_304_000 as Weight) + // Standard Error: 19_327_000 + .saturating_add((1_629_626_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 8_000 + .saturating_add((11_992_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(105 as Weight)) .saturating_add(T::DbWeight::get().reads((101 as Weight).saturating_mul(t as Weight))) .saturating_add(T::DbWeight::get().writes(101 as Weight)) @@ -657,38 +655,38 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:100 w:100) fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 47_294_000 - .saturating_add((26_664_406_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 50_849_000 + .saturating_add((35_608_311_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((400 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((400 as Weight).saturating_mul(r as Weight))) } - // Storage: System Account (r:102 w:102) + // Storage: System Account (r:101 w:101) // Storage: Contracts ContractInfoOf (r:101 w:101) // Storage: Contracts CodeStorage (r:2 w:1) // Storage: Timestamp Now (r:1 w:0) // Storage: Contracts AccountCounter (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) - fn seal_instantiate_per_input_output_salt_kb(i: u32, o: u32, s: u32, ) -> Weight { - (24_447_236_000 as Weight) - // Standard Error: 36_000 - .saturating_add((18_822_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 36_000 - .saturating_add((28_618_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 36_000 - .saturating_add((156_535_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(208 as Weight)) - .saturating_add(T::DbWeight::get().writes(206 as Weight)) + fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { + (19_455_191_000 as Weight) + // Standard Error: 57_478_000 + .saturating_add((786_148_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 27_000 + .saturating_add((160_385_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(T::DbWeight::get().reads(207 as Weight)) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(t as Weight))) + .saturating_add(T::DbWeight::get().writes(205 as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(t as Weight))) } // Storage: System Account (r:1 w:0) // Storage: Contracts ContractInfoOf (r:1 w:1) // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256(r: u32, ) -> Weight { - (216_091_000 as Weight) + (294_686_000 as Weight) // Standard Error: 123_000 - .saturating_add((79_416_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((81_172_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -697,9 +695,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - (223_253_000 as Weight) - // Standard Error: 43_000 - .saturating_add((462_629_000 as Weight).saturating_mul(n as Weight)) + (276_895_000 as Weight) + // Standard Error: 35_000 + .saturating_add((469_007_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -708,9 +706,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_keccak_256(r: u32, ) -> Weight { - (217_285_000 as Weight) - // Standard Error: 147_000 - .saturating_add((91_020_000 as Weight).saturating_mul(r as Weight)) + (295_476_000 as Weight) + // Standard Error: 127_000 + .saturating_add((91_822_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -719,9 +717,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - (364_402_000 as Weight) - // Standard Error: 27_000 - .saturating_add((305_342_000 as Weight).saturating_mul(n as Weight)) + (402_456_000 as Weight) + // Standard Error: 19_000 + .saturating_add((311_103_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -730,9 +728,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_256(r: u32, ) -> Weight { - (214_309_000 as Weight) - // Standard Error: 107_000 - .saturating_add((63_668_000 as Weight).saturating_mul(r as Weight)) + (296_702_000 as Weight) + // Standard Error: 142_000 + .saturating_add((64_431_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -741,9 +739,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - (306_968_000 as Weight) - // Standard Error: 13_000 - .saturating_add((118_373_000 as Weight).saturating_mul(n as Weight)) + (375_322_000 as Weight) + // Standard Error: 14_000 + .saturating_add((124_338_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -752,9 +750,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_128(r: u32, ) -> Weight { - (215_434_000 as Weight) - // Standard Error: 115_000 - .saturating_add((62_560_000 as Weight).saturating_mul(r as Weight)) + (294_158_000 as Weight) + // Standard Error: 148_000 + .saturating_add((64_474_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -763,9 +761,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - (226_690_000 as Weight) - // Standard Error: 17_000 - .saturating_add((118_871_000 as Weight).saturating_mul(n as Weight)) + (390_049_000 as Weight) + // Standard Error: 16_000 + .saturating_add((124_330_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -774,9 +772,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_ecdsa_recover(r: u32, ) -> Weight { - (187_068_000 as Weight) - // Standard Error: 1_354_000 - .saturating_add((15_409_805_000 as Weight).saturating_mul(r as Weight)) + (233_346_000 as Weight) + // Standard Error: 1_355_000 + .saturating_add((15_405_070_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -793,259 +791,259 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().writes((99 as Weight).saturating_mul(r as Weight))) } fn instr_i64const(r: u32, ) -> Weight { - (74_317_000 as Weight) - // Standard Error: 1_000 - .saturating_add((597_000 as Weight).saturating_mul(r as Weight)) + (119_148_000 as Weight) + // Standard Error: 2_000 + .saturating_add((585_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (74_303_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_311_000 as Weight).saturating_mul(r as Weight)) + (118_413_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_324_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (74_024_000 as Weight) - // Standard Error: 0 - .saturating_add((1_431_000 as Weight).saturating_mul(r as Weight)) + (118_700_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_415_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (74_108_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_778_000 as Weight).saturating_mul(r as Weight)) + (118_736_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_777_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (73_966_000 as Weight) - // Standard Error: 0 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) + (118_277_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_909_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (73_839_000 as Weight) - // Standard Error: 2_000 - .saturating_add((907_000 as Weight).saturating_mul(r as Weight)) + (118_360_000 as Weight) + // Standard Error: 0 + .saturating_add((895_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (73_624_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_446_000 as Weight).saturating_mul(r as Weight)) + (118_142_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_439_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (73_169_000 as Weight) + (118_239_000 as Weight) // Standard Error: 5_000 - .saturating_add((1_602_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_553_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (76_328_000 as Weight) + (120_801_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((4_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (74_771_000 as Weight) - // Standard Error: 22_000 - .saturating_add((17_044_000 as Weight).saturating_mul(r as Weight)) + (118_536_000 as Weight) + // Standard Error: 16_000 + .saturating_add((17_082_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (90_179_000 as Weight) - // Standard Error: 31_000 - .saturating_add((27_305_000 as Weight).saturating_mul(r as Weight)) + (130_467_000 as Weight) + // Standard Error: 30_000 + .saturating_add((28_199_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (117_977_000 as Weight) - // Standard Error: 2_000 - .saturating_add((928_000 as Weight).saturating_mul(p as Weight)) + (164_624_000 as Weight) + // Standard Error: 3_000 + .saturating_add((901_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (75_093_000 as Weight) - // Standard Error: 1_000 - .saturating_add((610_000 as Weight).saturating_mul(r as Weight)) + (119_422_000 as Weight) + // Standard Error: 2_000 + .saturating_add((617_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (74_793_000 as Weight) - // Standard Error: 1_000 - .saturating_add((676_000 as Weight).saturating_mul(r as Weight)) + (119_747_000 as Weight) + // Standard Error: 2_000 + .saturating_add((668_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (74_183_000 as Weight) - // Standard Error: 2_000 - .saturating_add((913_000 as Weight).saturating_mul(r as Weight)) + (119_410_000 as Weight) + // Standard Error: 3_000 + .saturating_add((898_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (77_079_000 as Weight) + (121_657_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_156_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_160_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (77_063_000 as Weight) + (121_531_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_367_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (74_314_000 as Weight) + (118_340_000 as Weight) // Standard Error: 2_000 - .saturating_add((662_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((674_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (73_585_000 as Weight) - // Standard Error: 2_291_000 - .saturating_add((174_749_000 as Weight).saturating_mul(r as Weight)) + (118_114_000 as Weight) + // Standard Error: 194_000 + .saturating_add((229_474_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (74_062_000 as Weight) + (119_160_000 as Weight) // Standard Error: 2_000 - .saturating_add((905_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((890_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (74_121_000 as Weight) - // Standard Error: 1_000 - .saturating_add((903_000 as Weight).saturating_mul(r as Weight)) + (119_199_000 as Weight) + // Standard Error: 3_000 + .saturating_add((893_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (74_519_000 as Weight) - // Standard Error: 2_000 + (119_103_000 as Weight) + // Standard Error: 4_000 .saturating_add((885_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (74_357_000 as Weight) - // Standard Error: 1_000 - .saturating_add((914_000 as Weight).saturating_mul(r as Weight)) + (119_033_000 as Weight) + // Standard Error: 3_000 + .saturating_add((917_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (74_101_000 as Weight) - // Standard Error: 1_000 - .saturating_add((885_000 as Weight).saturating_mul(r as Weight)) + (118_950_000 as Weight) + // Standard Error: 4_000 + .saturating_add((879_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendui32(r: u32, ) -> Weight { - (74_442_000 as Weight) - // Standard Error: 1_000 - .saturating_add((875_000 as Weight).saturating_mul(r as Weight)) + (118_534_000 as Weight) + // Standard Error: 2_000 + .saturating_add((888_000 as Weight).saturating_mul(r as Weight)) } fn instr_i32wrapi64(r: u32, ) -> Weight { - (74_247_000 as Weight) - // Standard Error: 1_000 - .saturating_add((891_000 as Weight).saturating_mul(r as Weight)) + (119_108_000 as Weight) + // Standard Error: 2_000 + .saturating_add((881_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eq(r: u32, ) -> Weight { - (74_091_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) + (118_677_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_360_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ne(r: u32, ) -> Weight { - (74_178_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_358_000 as Weight).saturating_mul(r as Weight)) + (118_769_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64lts(r: u32, ) -> Weight { - (74_370_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_353_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (74_180_000 as Weight) + (118_690_000 as Weight) // Standard Error: 1_000 .saturating_add((1_356_000 as Weight).saturating_mul(r as Weight)) } + fn instr_i64ltu(r: u32, ) -> Weight { + (118_899_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_350_000 as Weight).saturating_mul(r as Weight)) + } fn instr_i64gts(r: u32, ) -> Weight { - (74_035_000 as Weight) - // Standard Error: 3_000 - .saturating_add((1_365_000 as Weight).saturating_mul(r as Weight)) + (118_519_000 as Weight) + // Standard Error: 6_000 + .saturating_add((1_376_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64gtu(r: u32, ) -> Weight { - (74_538_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_357_000 as Weight).saturating_mul(r as Weight)) + (119_315_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_347_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64les(r: u32, ) -> Weight { - (74_035_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_368_000 as Weight).saturating_mul(r as Weight)) + (118_171_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_377_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64leu(r: u32, ) -> Weight { - (74_399_000 as Weight) - // Standard Error: 8_000 - .saturating_add((1_362_000 as Weight).saturating_mul(r as Weight)) + (118_581_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_367_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ges(r: u32, ) -> Weight { - (73_987_000 as Weight) + (118_673_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_364_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64geu(r: u32, ) -> Weight { - (74_017_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_366_000 as Weight).saturating_mul(r as Weight)) + (118_618_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_357_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64add(r: u32, ) -> Weight { - (74_271_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_330_000 as Weight).saturating_mul(r as Weight)) + (118_569_000 as Weight) + // Standard Error: 1_000 + .saturating_add((1_335_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64sub(r: u32, ) -> Weight { - (74_016_000 as Weight) - // Standard Error: 0 - .saturating_add((1_345_000 as Weight).saturating_mul(r as Weight)) + (118_261_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64mul(r: u32, ) -> Weight { - (74_063_000 as Weight) - // Standard Error: 1_000 + (118_542_000 as Weight) + // Standard Error: 2_000 .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64divs(r: u32, ) -> Weight { - (74_094_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_002_000 as Weight).saturating_mul(r as Weight)) + (118_648_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_993_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64divu(r: u32, ) -> Weight { - (73_957_000 as Weight) - // Standard Error: 2_000 - .saturating_add((2_045_000 as Weight).saturating_mul(r as Weight)) + (118_378_000 as Weight) + // Standard Error: 0 + .saturating_add((2_057_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rems(r: u32, ) -> Weight { - (74_067_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_975_000 as Weight).saturating_mul(r as Weight)) + (118_813_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_995_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64remu(r: u32, ) -> Weight { - (74_092_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_035_000 as Weight).saturating_mul(r as Weight)) + (118_697_000 as Weight) + // Standard Error: 2_000 + .saturating_add((2_025_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64and(r: u32, ) -> Weight { - (74_059_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) + (118_838_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_332_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64or(r: u32, ) -> Weight { - (74_122_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_335_000 as Weight).saturating_mul(r as Weight)) + (118_641_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_347_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64xor(r: u32, ) -> Weight { - (74_296_000 as Weight) + (118_551_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_333_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shl(r: u32, ) -> Weight { - (73_810_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_368_000 as Weight).saturating_mul(r as Weight)) + (118_603_000 as Weight) + // Standard Error: 1_000 + .saturating_add((1_352_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shrs(r: u32, ) -> Weight { - (74_101_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_407_000 as Weight).saturating_mul(r as Weight)) + (118_885_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_345_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (74_076_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_353_000 as Weight).saturating_mul(r as Weight)) + (118_602_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_354_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (74_082_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_354_000 as Weight).saturating_mul(r as Weight)) + (118_733_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_349_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (74_054_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) + (118_920_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_348_000 as Weight).saturating_mul(r as Weight)) } } @@ -1053,32 +1051,32 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize() -> Weight { - (1_590_000 as Weight) + (1_560_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn on_initialize_per_trie_key(k: u32, ) -> Weight { - (9_975_000 as Weight) + (7_843_000 as Weight) // Standard Error: 0 - .saturating_add((724_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((749_000 as Weight).saturating_mul(k as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize_per_queue_item(q: u32, ) -> Weight { - (7_415_000 as Weight) - // Standard Error: 4_000 - .saturating_add((2_303_000 as Weight).saturating_mul(q as Weight)) + (3_228_000 as Weight) + // Standard Error: 5_000 + .saturating_add((2_257_000 as Weight).saturating_mul(q as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Contracts PristineCode (r:1 w:0) // Storage: Contracts CodeStorage (r:0 w:1) fn reinstrument(c: u32, ) -> Weight { - (18_519_000 as Weight) - // Standard Error: 36_000 - .saturating_add((66_661_000 as Weight).saturating_mul(c as Weight)) + (20_531_000 as Weight) + // Standard Error: 34_000 + .saturating_add((66_014_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1087,9 +1085,9 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call_with_code_kb(c: u32, ) -> Weight { - (210_319_000 as Weight) - // Standard Error: 41_000 - .saturating_add((54_802_000 as Weight).saturating_mul(c as Weight)) + (295_703_000 as Weight) + // Standard Error: 53_000 + .saturating_add((57_661_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -1101,11 +1099,11 @@ impl WeightInfo for () { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) fn instantiate_with_code(c: u32, s: u32, ) -> Weight { - (220_394_000 as Weight) - // Standard Error: 129_000 - .saturating_add((145_155_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 8_000 - .saturating_add((1_741_000 as Weight).saturating_mul(s as Weight)) + (332_572_000 as Weight) + // Standard Error: 125_000 + .saturating_add((149_095_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 7_000 + .saturating_add((1_779_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } @@ -1116,9 +1114,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn instantiate(s: u32, ) -> Weight { - (171_438_000 as Weight) + (222_992_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_721_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_759_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(5 as Weight)) } @@ -1127,7 +1125,7 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call() -> Weight { - (139_529_000 as Weight) + (189_003_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -1135,9 +1133,9 @@ impl WeightInfo for () { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) fn upload_code(c: u32, ) -> Weight { - (51_040_000 as Weight) - // Standard Error: 38_000 - .saturating_add((65_886_000 as Weight).saturating_mul(c as Weight)) + (52_521_000 as Weight) + // Standard Error: 36_000 + .saturating_add((66_486_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -1145,7 +1143,7 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - (24_347_000 as Weight) + (24_705_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -1154,9 +1152,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_caller(r: u32, ) -> Weight { - (217_164_000 as Weight) - // Standard Error: 89_000 - .saturating_add((48_023_000 as Weight).saturating_mul(r as Weight)) + (300_165_000 as Weight) + // Standard Error: 125_000 + .saturating_add((49_828_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1165,9 +1163,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_is_contract(r: u32, ) -> Weight { - (81_537_000 as Weight) - // Standard Error: 847_000 - .saturating_add((367_429_000 as Weight).saturating_mul(r as Weight)) + (179_488_000 as Weight) + // Standard Error: 718_000 + .saturating_add((375_855_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -1177,9 +1175,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_caller_is_origin(r: u32, ) -> Weight { - (214_798_000 as Weight) - // Standard Error: 56_000 - .saturating_add((21_100_000 as Weight).saturating_mul(r as Weight)) + (295_198_000 as Weight) + // Standard Error: 79_000 + .saturating_add((21_948_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1188,9 +1186,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_address(r: u32, ) -> Weight { - (216_615_000 as Weight) - // Standard Error: 75_000 - .saturating_add((48_054_000 as Weight).saturating_mul(r as Weight)) + (300_366_000 as Weight) + // Standard Error: 111_000 + .saturating_add((49_435_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1199,9 +1197,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_gas_left(r: u32, ) -> Weight { - (218_034_000 as Weight) + (299_800_000 as Weight) // Standard Error: 87_000 - .saturating_add((47_594_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((49_002_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1210,9 +1208,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_balance(r: u32, ) -> Weight { - (221_980_000 as Weight) - // Standard Error: 135_000 - .saturating_add((135_618_000 as Weight).saturating_mul(r as Weight)) + (303_057_000 as Weight) + // Standard Error: 175_000 + .saturating_add((139_293_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1221,9 +1219,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_value_transferred(r: u32, ) -> Weight { - (217_623_000 as Weight) - // Standard Error: 86_000 - .saturating_add((47_656_000 as Weight).saturating_mul(r as Weight)) + (299_754_000 as Weight) + // Standard Error: 93_000 + .saturating_add((48_945_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1232,9 +1230,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_minimum_balance(r: u32, ) -> Weight { - (216_826_000 as Weight) - // Standard Error: 88_000 - .saturating_add((47_644_000 as Weight).saturating_mul(r as Weight)) + (302_229_000 as Weight) + // Standard Error: 128_000 + .saturating_add((49_007_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1243,9 +1241,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_block_number(r: u32, ) -> Weight { - (219_487_000 as Weight) - // Standard Error: 90_000 - .saturating_add((47_167_000 as Weight).saturating_mul(r as Weight)) + (300_772_000 as Weight) + // Standard Error: 114_000 + .saturating_add((48_794_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1254,9 +1252,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_now(r: u32, ) -> Weight { - (218_953_000 as Weight) - // Standard Error: 95_000 - .saturating_add((47_458_000 as Weight).saturating_mul(r as Weight)) + (301_936_000 as Weight) + // Standard Error: 119_000 + .saturating_add((48_839_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1266,9 +1264,9 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) fn seal_weight_to_fee(r: u32, ) -> Weight { - (220_132_000 as Weight) - // Standard Error: 144_000 - .saturating_add((120_373_000 as Weight).saturating_mul(r as Weight)) + (304_935_000 as Weight) + // Standard Error: 146_000 + .saturating_add((121_871_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1277,9 +1275,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_gas(r: u32, ) -> Weight { - (127_458_000 as Weight) - // Standard Error: 56_000 - .saturating_add((24_015_000 as Weight).saturating_mul(r as Weight)) + (178_176_000 as Weight) + // Standard Error: 52_000 + .saturating_add((24_960_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1288,9 +1286,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_input(r: u32, ) -> Weight { - (220_304_000 as Weight) - // Standard Error: 112_000 - .saturating_add((46_804_000 as Weight).saturating_mul(r as Weight)) + (297_394_000 as Weight) + // Standard Error: 140_000 + .saturating_add((49_199_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1299,9 +1297,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_input_per_kb(n: u32, ) -> Weight { - (300_916_000 as Weight) - // Standard Error: 8_000 - .saturating_add((10_552_000 as Weight).saturating_mul(n as Weight)) + (374_409_000 as Weight) + // Standard Error: 3_000 + .saturating_add((11_924_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1310,9 +1308,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_return(r: u32, ) -> Weight { - (211_812_000 as Weight) - // Standard Error: 138_000 - .saturating_add((1_698_000 as Weight).saturating_mul(r as Weight)) + (292_278_000 as Weight) + // Standard Error: 114_000 + .saturating_add((1_474_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1321,9 +1319,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_return_per_kb(n: u32, ) -> Weight { - (213_994_000 as Weight) + (294_714_000 as Weight) // Standard Error: 0 - .saturating_add((176_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((230_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1334,9 +1332,9 @@ impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn seal_terminate(r: u32, ) -> Weight { - (215_173_000 as Weight) - // Standard Error: 708_000 - .saturating_add((52_509_000 as Weight).saturating_mul(r as Weight)) + (297_589_000 as Weight) + // Standard Error: 2_835_000 + .saturating_add((53_498_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -1348,9 +1346,9 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) fn seal_random(r: u32, ) -> Weight { - (219_521_000 as Weight) - // Standard Error: 171_000 - .saturating_add((156_228_000 as Weight).saturating_mul(r as Weight)) + (296_371_000 as Weight) + // Standard Error: 220_000 + .saturating_add((160_881_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1359,9 +1357,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_deposit_event(r: u32, ) -> Weight { - (227_624_000 as Weight) - // Standard Error: 193_000 - .saturating_add((285_058_000 as Weight).saturating_mul(r as Weight)) + (308_401_000 as Weight) + // Standard Error: 202_000 + .saturating_add((277_771_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1371,11 +1369,11 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: System EventTopics (r:100 w:100) fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - (503_312_000 as Weight) - // Standard Error: 1_729_000 - .saturating_add((288_009_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 340_000 - .saturating_add((80_936_000 as Weight).saturating_mul(n as Weight)) + (625_100_000 as Weight) + // Standard Error: 2_053_000 + .saturating_add((284_765_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 404_000 + .saturating_add((85_893_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(t as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -1386,17 +1384,17 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_debug_message(r: u32, ) -> Weight { - (132_096_000 as Weight) - // Standard Error: 73_000 - .saturating_add((40_337_000 as Weight).saturating_mul(r as Weight)) + (182_141_000 as Weight) + // Standard Error: 134_000 + .saturating_add((41_928_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage(r: u32, ) -> Weight { - (52_622_000 as Weight) - // Standard Error: 1_006_000 - .saturating_add((404_716_000 as Weight).saturating_mul(r as Weight)) + (139_030_000 as Weight) + // Standard Error: 1_038_000 + .saturating_add((405_168_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -1404,25 +1402,25 @@ impl WeightInfo for () { } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { - (601_324_000 as Weight) - // Standard Error: 264_000 - .saturating_add((27_943_000 as Weight).saturating_mul(n as Weight)) + (689_591_000 as Weight) + // Standard Error: 275_000 + .saturating_add((31_438_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { - (626_752_000 as Weight) - // Standard Error: 292_000 - .saturating_add((10_616_000 as Weight).saturating_mul(n as Weight)) + (709_965_000 as Weight) + // Standard Error: 340_000 + .saturating_add((11_182_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_clear_storage(r: u32, ) -> Weight { - (80_138_000 as Weight) - // Standard Error: 933_000 - .saturating_add((382_949_000 as Weight).saturating_mul(r as Weight)) + (169_937_000 as Weight) + // Standard Error: 883_000 + .saturating_add((389_090_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) @@ -1430,51 +1428,51 @@ impl WeightInfo for () { } // Storage: Skipped Metadata (r:0 w:0) fn seal_clear_storage_per_kb(n: u32, ) -> Weight { - (603_984_000 as Weight) - // Standard Error: 242_000 - .saturating_add((10_712_000 as Weight).saturating_mul(n as Weight)) + (695_589_000 as Weight) + // Standard Error: 268_000 + .saturating_add((10_530_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().writes(103 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_get_storage(r: u32, ) -> Weight { - (113_136_000 as Weight) - // Standard Error: 635_000 - .saturating_add((324_706_000 as Weight).saturating_mul(r as Weight)) + (195_080_000 as Weight) + // Standard Error: 607_000 + .saturating_add((328_903_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (562_781_000 as Weight) - // Standard Error: 354_000 - .saturating_add((63_275_000 as Weight).saturating_mul(n as Weight)) + (647_422_000 as Weight) + // Standard Error: 361_000 + .saturating_add((68_849_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(104 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_contains_storage(r: u32, ) -> Weight { - (112_237_000 as Weight) - // Standard Error: 655_000 - .saturating_add((296_653_000 as Weight).saturating_mul(r as Weight)) + (198_907_000 as Weight) + // Standard Error: 658_000 + .saturating_add((295_368_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_contains_storage_per_kb(n: u32, ) -> Weight { - (520_002_000 as Weight) - // Standard Error: 232_000 - .saturating_add((9_726_000 as Weight).saturating_mul(n as Weight)) + (599_284_000 as Weight) + // Standard Error: 243_000 + .saturating_add((9_923_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(104 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage(r: u32, ) -> Weight { - (87_232_000 as Weight) - // Standard Error: 920_000 - .saturating_add((415_305_000 as Weight).saturating_mul(r as Weight)) + (170_700_000 as Weight) + // Standard Error: 887_000 + .saturating_add((422_448_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) @@ -1482,9 +1480,9 @@ impl WeightInfo for () { } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage_per_kb(n: u32, ) -> Weight { - (648_862_000 as Weight) - // Standard Error: 319_000 - .saturating_add((63_991_000 as Weight).saturating_mul(n as Weight)) + (743_584_000 as Weight) + // Standard Error: 403_000 + .saturating_add((69_763_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().writes(103 as Weight)) } @@ -1493,9 +1491,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_transfer(r: u32, ) -> Weight { - (99_621_000 as Weight) - // Standard Error: 1_154_000 - .saturating_add((1_732_052_000 as Weight).saturating_mul(r as Weight)) + (208_815_000 as Weight) + // Standard Error: 1_078_000 + .saturating_add((1_719_660_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) @@ -1507,8 +1505,8 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) fn seal_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 6_293_000 - .saturating_add((19_410_115_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 3_471_000 + .saturating_add((27_917_429_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -1520,8 +1518,8 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) fn seal_delegate_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 7_155_000 - .saturating_add((19_793_614_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 13_012_000 + .saturating_add((28_044_371_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads((99 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1529,14 +1527,12 @@ impl WeightInfo for () { // Storage: Contracts ContractInfoOf (r:101 w:101) // Storage: Contracts CodeStorage (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) - fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight { - (19_711_861_000 as Weight) - // Standard Error: 55_158_000 - .saturating_add((2_509_755_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 19_000 - .saturating_add((17_808_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 21_000 - .saturating_add((28_104_000 as Weight).saturating_mul(o as Weight)) + fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { + (15_964_304_000 as Weight) + // Standard Error: 19_327_000 + .saturating_add((1_629_626_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 8_000 + .saturating_add((11_992_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().reads((101 as Weight).saturating_mul(t as Weight))) .saturating_add(RocksDbWeight::get().writes(101 as Weight)) @@ -1550,38 +1546,38 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:100 w:100) fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 47_294_000 - .saturating_add((26_664_406_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 50_849_000 + .saturating_add((35_608_311_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().reads((400 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) .saturating_add(RocksDbWeight::get().writes((400 as Weight).saturating_mul(r as Weight))) } - // Storage: System Account (r:102 w:102) + // Storage: System Account (r:101 w:101) // Storage: Contracts ContractInfoOf (r:101 w:101) // Storage: Contracts CodeStorage (r:2 w:1) // Storage: Timestamp Now (r:1 w:0) // Storage: Contracts AccountCounter (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) - fn seal_instantiate_per_input_output_salt_kb(i: u32, o: u32, s: u32, ) -> Weight { - (24_447_236_000 as Weight) - // Standard Error: 36_000 - .saturating_add((18_822_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 36_000 - .saturating_add((28_618_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 36_000 - .saturating_add((156_535_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(RocksDbWeight::get().reads(208 as Weight)) - .saturating_add(RocksDbWeight::get().writes(206 as Weight)) + fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { + (19_455_191_000 as Weight) + // Standard Error: 57_478_000 + .saturating_add((786_148_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 27_000 + .saturating_add((160_385_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(RocksDbWeight::get().reads(207 as Weight)) + .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(t as Weight))) + .saturating_add(RocksDbWeight::get().writes(205 as Weight)) + .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(t as Weight))) } // Storage: System Account (r:1 w:0) // Storage: Contracts ContractInfoOf (r:1 w:1) // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256(r: u32, ) -> Weight { - (216_091_000 as Weight) + (294_686_000 as Weight) // Standard Error: 123_000 - .saturating_add((79_416_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((81_172_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1590,9 +1586,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - (223_253_000 as Weight) - // Standard Error: 43_000 - .saturating_add((462_629_000 as Weight).saturating_mul(n as Weight)) + (276_895_000 as Weight) + // Standard Error: 35_000 + .saturating_add((469_007_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1601,9 +1597,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_keccak_256(r: u32, ) -> Weight { - (217_285_000 as Weight) - // Standard Error: 147_000 - .saturating_add((91_020_000 as Weight).saturating_mul(r as Weight)) + (295_476_000 as Weight) + // Standard Error: 127_000 + .saturating_add((91_822_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1612,9 +1608,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - (364_402_000 as Weight) - // Standard Error: 27_000 - .saturating_add((305_342_000 as Weight).saturating_mul(n as Weight)) + (402_456_000 as Weight) + // Standard Error: 19_000 + .saturating_add((311_103_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1623,9 +1619,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_256(r: u32, ) -> Weight { - (214_309_000 as Weight) - // Standard Error: 107_000 - .saturating_add((63_668_000 as Weight).saturating_mul(r as Weight)) + (296_702_000 as Weight) + // Standard Error: 142_000 + .saturating_add((64_431_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1634,9 +1630,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - (306_968_000 as Weight) - // Standard Error: 13_000 - .saturating_add((118_373_000 as Weight).saturating_mul(n as Weight)) + (375_322_000 as Weight) + // Standard Error: 14_000 + .saturating_add((124_338_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1645,9 +1641,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_128(r: u32, ) -> Weight { - (215_434_000 as Weight) - // Standard Error: 115_000 - .saturating_add((62_560_000 as Weight).saturating_mul(r as Weight)) + (294_158_000 as Weight) + // Standard Error: 148_000 + .saturating_add((64_474_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1656,9 +1652,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - (226_690_000 as Weight) - // Standard Error: 17_000 - .saturating_add((118_871_000 as Weight).saturating_mul(n as Weight)) + (390_049_000 as Weight) + // Standard Error: 16_000 + .saturating_add((124_330_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1667,9 +1663,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_ecdsa_recover(r: u32, ) -> Weight { - (187_068_000 as Weight) - // Standard Error: 1_354_000 - .saturating_add((15_409_805_000 as Weight).saturating_mul(r as Weight)) + (233_346_000 as Weight) + // Standard Error: 1_355_000 + .saturating_add((15_405_070_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1686,258 +1682,258 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes((99 as Weight).saturating_mul(r as Weight))) } fn instr_i64const(r: u32, ) -> Weight { - (74_317_000 as Weight) - // Standard Error: 1_000 - .saturating_add((597_000 as Weight).saturating_mul(r as Weight)) + (119_148_000 as Weight) + // Standard Error: 2_000 + .saturating_add((585_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (74_303_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_311_000 as Weight).saturating_mul(r as Weight)) + (118_413_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_324_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (74_024_000 as Weight) - // Standard Error: 0 - .saturating_add((1_431_000 as Weight).saturating_mul(r as Weight)) + (118_700_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_415_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (74_108_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_778_000 as Weight).saturating_mul(r as Weight)) + (118_736_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_777_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (73_966_000 as Weight) - // Standard Error: 0 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) + (118_277_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_909_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (73_839_000 as Weight) - // Standard Error: 2_000 - .saturating_add((907_000 as Weight).saturating_mul(r as Weight)) + (118_360_000 as Weight) + // Standard Error: 0 + .saturating_add((895_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (73_624_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_446_000 as Weight).saturating_mul(r as Weight)) + (118_142_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_439_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (73_169_000 as Weight) + (118_239_000 as Weight) // Standard Error: 5_000 - .saturating_add((1_602_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_553_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (76_328_000 as Weight) + (120_801_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((4_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (74_771_000 as Weight) - // Standard Error: 22_000 - .saturating_add((17_044_000 as Weight).saturating_mul(r as Weight)) + (118_536_000 as Weight) + // Standard Error: 16_000 + .saturating_add((17_082_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (90_179_000 as Weight) - // Standard Error: 31_000 - .saturating_add((27_305_000 as Weight).saturating_mul(r as Weight)) + (130_467_000 as Weight) + // Standard Error: 30_000 + .saturating_add((28_199_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (117_977_000 as Weight) - // Standard Error: 2_000 - .saturating_add((928_000 as Weight).saturating_mul(p as Weight)) + (164_624_000 as Weight) + // Standard Error: 3_000 + .saturating_add((901_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (75_093_000 as Weight) - // Standard Error: 1_000 - .saturating_add((610_000 as Weight).saturating_mul(r as Weight)) + (119_422_000 as Weight) + // Standard Error: 2_000 + .saturating_add((617_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (74_793_000 as Weight) - // Standard Error: 1_000 - .saturating_add((676_000 as Weight).saturating_mul(r as Weight)) + (119_747_000 as Weight) + // Standard Error: 2_000 + .saturating_add((668_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (74_183_000 as Weight) - // Standard Error: 2_000 - .saturating_add((913_000 as Weight).saturating_mul(r as Weight)) + (119_410_000 as Weight) + // Standard Error: 3_000 + .saturating_add((898_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (77_079_000 as Weight) + (121_657_000 as Weight) // Standard Error: 2_000 - .saturating_add((1_156_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_160_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (77_063_000 as Weight) + (121_531_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_367_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (74_314_000 as Weight) + (118_340_000 as Weight) // Standard Error: 2_000 - .saturating_add((662_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((674_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (73_585_000 as Weight) - // Standard Error: 2_291_000 - .saturating_add((174_749_000 as Weight).saturating_mul(r as Weight)) + (118_114_000 as Weight) + // Standard Error: 194_000 + .saturating_add((229_474_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (74_062_000 as Weight) + (119_160_000 as Weight) // Standard Error: 2_000 - .saturating_add((905_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((890_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (74_121_000 as Weight) - // Standard Error: 1_000 - .saturating_add((903_000 as Weight).saturating_mul(r as Weight)) + (119_199_000 as Weight) + // Standard Error: 3_000 + .saturating_add((893_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (74_519_000 as Weight) - // Standard Error: 2_000 + (119_103_000 as Weight) + // Standard Error: 4_000 .saturating_add((885_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (74_357_000 as Weight) - // Standard Error: 1_000 - .saturating_add((914_000 as Weight).saturating_mul(r as Weight)) + (119_033_000 as Weight) + // Standard Error: 3_000 + .saturating_add((917_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (74_101_000 as Weight) - // Standard Error: 1_000 - .saturating_add((885_000 as Weight).saturating_mul(r as Weight)) + (118_950_000 as Weight) + // Standard Error: 4_000 + .saturating_add((879_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendui32(r: u32, ) -> Weight { - (74_442_000 as Weight) - // Standard Error: 1_000 - .saturating_add((875_000 as Weight).saturating_mul(r as Weight)) + (118_534_000 as Weight) + // Standard Error: 2_000 + .saturating_add((888_000 as Weight).saturating_mul(r as Weight)) } fn instr_i32wrapi64(r: u32, ) -> Weight { - (74_247_000 as Weight) - // Standard Error: 1_000 - .saturating_add((891_000 as Weight).saturating_mul(r as Weight)) + (119_108_000 as Weight) + // Standard Error: 2_000 + .saturating_add((881_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eq(r: u32, ) -> Weight { - (74_091_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) + (118_677_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_360_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ne(r: u32, ) -> Weight { - (74_178_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_358_000 as Weight).saturating_mul(r as Weight)) + (118_769_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64lts(r: u32, ) -> Weight { - (74_370_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_353_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (74_180_000 as Weight) + (118_690_000 as Weight) // Standard Error: 1_000 .saturating_add((1_356_000 as Weight).saturating_mul(r as Weight)) } + fn instr_i64ltu(r: u32, ) -> Weight { + (118_899_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_350_000 as Weight).saturating_mul(r as Weight)) + } fn instr_i64gts(r: u32, ) -> Weight { - (74_035_000 as Weight) - // Standard Error: 3_000 - .saturating_add((1_365_000 as Weight).saturating_mul(r as Weight)) + (118_519_000 as Weight) + // Standard Error: 6_000 + .saturating_add((1_376_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64gtu(r: u32, ) -> Weight { - (74_538_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_357_000 as Weight).saturating_mul(r as Weight)) + (119_315_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_347_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64les(r: u32, ) -> Weight { - (74_035_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_368_000 as Weight).saturating_mul(r as Weight)) + (118_171_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_377_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64leu(r: u32, ) -> Weight { - (74_399_000 as Weight) - // Standard Error: 8_000 - .saturating_add((1_362_000 as Weight).saturating_mul(r as Weight)) + (118_581_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_367_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ges(r: u32, ) -> Weight { - (73_987_000 as Weight) + (118_673_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_364_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64geu(r: u32, ) -> Weight { - (74_017_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_366_000 as Weight).saturating_mul(r as Weight)) + (118_618_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_357_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64add(r: u32, ) -> Weight { - (74_271_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_330_000 as Weight).saturating_mul(r as Weight)) + (118_569_000 as Weight) + // Standard Error: 1_000 + .saturating_add((1_335_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64sub(r: u32, ) -> Weight { - (74_016_000 as Weight) - // Standard Error: 0 - .saturating_add((1_345_000 as Weight).saturating_mul(r as Weight)) + (118_261_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_363_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64mul(r: u32, ) -> Weight { - (74_063_000 as Weight) - // Standard Error: 1_000 + (118_542_000 as Weight) + // Standard Error: 2_000 .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64divs(r: u32, ) -> Weight { - (74_094_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_002_000 as Weight).saturating_mul(r as Weight)) + (118_648_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_993_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64divu(r: u32, ) -> Weight { - (73_957_000 as Weight) - // Standard Error: 2_000 - .saturating_add((2_045_000 as Weight).saturating_mul(r as Weight)) + (118_378_000 as Weight) + // Standard Error: 0 + .saturating_add((2_057_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rems(r: u32, ) -> Weight { - (74_067_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_975_000 as Weight).saturating_mul(r as Weight)) + (118_813_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_995_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64remu(r: u32, ) -> Weight { - (74_092_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_035_000 as Weight).saturating_mul(r as Weight)) + (118_697_000 as Weight) + // Standard Error: 2_000 + .saturating_add((2_025_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64and(r: u32, ) -> Weight { - (74_059_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) + (118_838_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_332_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64or(r: u32, ) -> Weight { - (74_122_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_335_000 as Weight).saturating_mul(r as Weight)) + (118_641_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_347_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64xor(r: u32, ) -> Weight { - (74_296_000 as Weight) + (118_551_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_333_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_338_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shl(r: u32, ) -> Weight { - (73_810_000 as Weight) - // Standard Error: 2_000 - .saturating_add((1_368_000 as Weight).saturating_mul(r as Weight)) + (118_603_000 as Weight) + // Standard Error: 1_000 + .saturating_add((1_352_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shrs(r: u32, ) -> Weight { - (74_101_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_407_000 as Weight).saturating_mul(r as Weight)) + (118_885_000 as Weight) + // Standard Error: 2_000 + .saturating_add((1_345_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (74_076_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_353_000 as Weight).saturating_mul(r as Weight)) + (118_602_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_354_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (74_082_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_354_000 as Weight).saturating_mul(r as Weight)) + (118_733_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_349_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (74_054_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_355_000 as Weight).saturating_mul(r as Weight)) + (118_920_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_348_000 as Weight).saturating_mul(r as Weight)) } }