diff --git a/substrate/frame/contracts/src/benchmarking/mod.rs b/substrate/frame/contracts/src/benchmarking/mod.rs index 6d4ae959f3..3537af3d0c 100644 --- a/substrate/frame/contracts/src/benchmarking/mod.rs +++ b/substrate/frame/contracts/src/benchmarking/mod.rs @@ -35,7 +35,7 @@ use crate::{ storage::Storage, Pallet as Contracts, *, }; -use codec::Encode; +use codec::{Encode, MaxEncodedLen}; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_support::weights::Weight; use frame_system::RawOrigin; @@ -778,9 +778,10 @@ benchmarks! { seal_set_storage { let r in 0 .. API_BENCHMARK_BATCHES; let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE) - .flat_map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), imported_functions: vec![ImportedFunction { @@ -792,7 +793,7 @@ benchmarks! { data_segments: vec![ DataSegment { offset: 0, - value: keys, + value: key_bytes, }, ], call_body: Some(body::repeated_dyn(r * API_BENCHMARK_BATCH_SIZE, vec![ @@ -805,13 +806,28 @@ benchmarks! { .. Default::default() }); let instance = Contract::::new(code, vec![])?; + let info = instance.info()?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) - seal_set_storage_per_kb { + #[skip_meta] + seal_set_storage_per_new_kb { let n in 0 .. T::Schedule::get().limits.payload_len / 1024; - let key = T::Hashing::hash_of(&1u32).as_ref().to_vec(); - let key_len = key.len(); + let keys = (0 .. API_BENCHMARK_BATCH_SIZE) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .collect::>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), imported_functions: vec![ImportedFunction { @@ -823,19 +839,76 @@ benchmarks! { data_segments: vec![ DataSegment { offset: 0, - value: key, + value: key_bytes, }, ], - call_body: Some(body::repeated(API_BENCHMARK_BATCH_SIZE, &[ - Instruction::I32Const(0), // key_ptr - Instruction::I32Const(0), // value_ptr - Instruction::I32Const((n * 1024) as i32), // value_len - Instruction::Call(0), - Instruction::Drop, + call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Counter(0, key_len as u32), // key_ptr + Regular(Instruction::I32Const(0)), // value_ptr + Regular(Instruction::I32Const((n * 1024) as i32)), // value_len + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), ])), .. Default::default() }); let instance = Contract::::new(code, vec![])?; + let info = instance.info()?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } + let origin = RawOrigin::Signed(instance.caller.clone()); + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + + #[skip_meta] + seal_set_storage_per_old_kb { + let n in 0 .. T::Schedule::get().limits.payload_len / 1024; + let keys = (0 .. API_BENCHMARK_BATCH_SIZE) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .collect::>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "__unstable__", + name: "seal_set_storage", + params: vec![ValueType::I32, ValueType::I32, ValueType::I32], + return_type: Some(ValueType::I32), + }], + data_segments: vec![ + DataSegment { + offset: 0, + value: key_bytes, + }, + ], + call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Counter(0, key_len as u32), // key_ptr + Regular(Instruction::I32Const(0)), // value_ptr + Regular(Instruction::I32Const(0)), // value_len + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let info = instance.info()?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![42u8; (n * 1024) as usize]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) @@ -849,7 +922,7 @@ benchmarks! { .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); let key_bytes = keys.iter().flatten().cloned().collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), imported_functions: vec![ImportedFunction { @@ -877,7 +950,7 @@ benchmarks! { Storage::::write( &info.trie_id, key.as_slice().try_into().map_err(|e| "Key has wrong length")?, - Some(vec![42; T::Schedule::get().limits.payload_len as usize]), + Some(vec![]), None, false, ) @@ -887,6 +960,50 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[skip_meta] + seal_clear_storage_per_kb { + let n in 0 .. T::Schedule::get().limits.payload_len / 1024; + let keys = (0 .. API_BENCHMARK_BATCH_SIZE) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .collect::>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "__unstable__", + name: "seal_clear_storage", + params: vec![ValueType::I32], + return_type: Some(ValueType::I32), + }], + data_segments: vec![ + DataSegment { + offset: 0, + value: key_bytes, + }, + ], + call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Counter(0, key_len as u32), // key_ptr + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let info = instance.info()?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![42u8; (n * 1024) as usize]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } + let origin = RawOrigin::Signed(instance.caller.clone()); + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + // We make sure that all storage accesses are to unique keys. #[skip_meta] seal_get_storage { @@ -894,7 +1011,7 @@ benchmarks! { let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE) .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); let key_bytes = keys.iter().flatten().cloned().collect::>(); let key_bytes_len = key_bytes.len(); let code = WasmModule::::from(ModuleDefinition { @@ -940,6 +1057,58 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[skip_meta] + seal_get_storage_per_kb { + let n in 0 .. T::Schedule::get().limits.payload_len / 1024; + let keys = (0 .. API_BENCHMARK_BATCH_SIZE) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .collect::>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); + let key_bytes_len = key_bytes.len(); + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "seal0", + name: "seal_get_storage", + params: vec![ValueType::I32, ValueType::I32, ValueType::I32], + return_type: Some(ValueType::I32), + }], + data_segments: vec![ + DataSegment { + offset: 0, + value: key_bytes, + }, + DataSegment { + offset: key_bytes_len as u32, + value: T::Schedule::get().limits.payload_len.to_le_bytes().into(), + }, + ], + call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Counter(0, key_len as u32), // key_ptr + Regular(Instruction::I32Const((key_bytes_len + 4) as i32)), // out_ptr + Regular(Instruction::I32Const(key_bytes_len as i32)), // out_len_ptr + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let info = instance.info()?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![42u8; (n * 1024) as usize]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } + >::insert(&instance.account_id, info.clone()); + let origin = RawOrigin::Signed(instance.caller.clone()); + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + // We make sure that all storage accesses are to unique keys. #[skip_meta] seal_contains_storage { @@ -947,7 +1116,7 @@ benchmarks! { let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE) .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); let key_bytes = keys.iter().flatten().cloned().collect::>(); let key_bytes_len = key_bytes.len(); let code = WasmModule::::from(ModuleDefinition { @@ -977,7 +1146,7 @@ benchmarks! { Storage::::write( &info.trie_id, key.as_slice().try_into().map_err(|e| "Key has wrong length")?, - Some(vec![42; T::Schedule::get().limits.payload_len as usize]), + Some(vec![]), None, false, ) @@ -987,48 +1156,47 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) - seal_get_storage_per_kb { + #[skip_meta] + seal_contains_storage_per_kb { let n in 0 .. T::Schedule::get().limits.payload_len / 1024; - let key = T::Hashing::hash_of(&1u32).as_ref().to_vec(); - let key_len = key.len(); + let keys = (0 .. API_BENCHMARK_BATCH_SIZE) + .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) + .collect::>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); + let key_bytes = keys.iter().flatten().cloned().collect::>(); let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), imported_functions: vec![ImportedFunction { - module: "seal0", - name: "seal_get_storage", - params: vec![ValueType::I32, ValueType::I32, ValueType::I32], + module: "__unstable__", + name: "seal_contains_storage", + params: vec![ValueType::I32], return_type: Some(ValueType::I32), }], data_segments: vec![ DataSegment { offset: 0, - value: key.clone(), - }, - DataSegment { - offset: key_len as u32, - value: T::Schedule::get().limits.payload_len.to_le_bytes().into(), + value: key_bytes, }, ], - call_body: Some(body::repeated(API_BENCHMARK_BATCH_SIZE, &[ - // call at key_ptr - Instruction::I32Const(0), // key_ptr - Instruction::I32Const((key_len + 4) as i32), // out_ptr - Instruction::I32Const(key_len as i32), // out_len_ptr - Instruction::Call(0), - Instruction::Drop, + call_body: Some(body::repeated_dyn(API_BENCHMARK_BATCH_SIZE, vec![ + Counter(0, key_len as u32), // key_ptr + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), ])), .. Default::default() }); let instance = Contract::::new(code, vec![])?; let info = instance.info()?; - Storage::::write( - &info.trie_id, - key.as_slice().try_into().map_err(|e| "Key has wrong length")?, - Some(vec![42u8; (n * 1024) as usize]), - None, - false, - ) - .map_err(|_| "Failed to write to storage during setup.")?; + for key in keys { + Storage::::write( + &info.trie_id, + key.as_slice().try_into().map_err(|e| "Key has wrong length")?, + Some(vec![42u8; (n * 1024) as usize]), + None, + false, + ) + .map_err(|_| "Failed to write to storage during setup.")?; + } >::insert(&instance.account_id, info.clone()); let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) @@ -1039,7 +1207,7 @@ benchmarks! { let keys = (0 .. r * API_BENCHMARK_BATCH_SIZE) .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); let key_bytes = keys.iter().flatten().cloned().collect::>(); let key_bytes_len = key_bytes.len(); let code = WasmModule::::from(ModuleDefinition { @@ -1091,7 +1259,7 @@ benchmarks! { let keys = (0 .. API_BENCHMARK_BATCH_SIZE) .map(|n| T::Hashing::hash_of(&n).as_ref().to_vec()) .collect::>(); - let key_len = sp_std::mem::size_of::<::Output>(); + let key_len = keys.get(0).map(|i| i.len() as u32).unwrap_or(0); let key_bytes = keys.iter().flatten().cloned().collect::>(); let key_bytes_len = key_bytes.len(); let code = WasmModule::::from(ModuleDefinition { @@ -1238,7 +1406,7 @@ benchmarks! { Regular(Instruction::I32Const(value_len as i32)), // value_len Regular(Instruction::I32Const(0)), // input_data_ptr Regular(Instruction::I32Const(0)), // input_data_len - Regular(Instruction::I32Const(u32::max_value() as i32)), // output_ptr + Regular(Instruction::I32Const(SENTINEL as i32)), // output_ptr Regular(Instruction::I32Const(0)), // output_len_ptr Regular(Instruction::Call(0)), Regular(Instruction::Drop), @@ -1361,7 +1529,7 @@ benchmarks! { assert!(value > 0u32.into()); let value_bytes = value.encode(); let value_len = value_bytes.len(); - let addr_len = sp_std::mem::size_of::(); + let addr_len = T::AccountId::max_encoded_len(); // offsets where to place static data in contract memory let value_offset = 0; @@ -1415,7 +1583,7 @@ benchmarks! { Regular(Instruction::I32Const(0)), // input_data_len Regular(Instruction::I32Const(addr_offset as i32)), // address_ptr Regular(Instruction::I32Const(addr_len_offset as i32)), // address_len_ptr - Regular(Instruction::I32Const(u32::max_value() as i32)), // output_ptr + Regular(Instruction::I32Const(SENTINEL as i32)), // output_ptr Regular(Instruction::I32Const(0)), // output_len_ptr Regular(Instruction::I32Const(0)), // salt_ptr Regular(Instruction::I32Const(0)), // salt_ptr_len @@ -1485,7 +1653,7 @@ benchmarks! { assert!(value > 0u32.into()); let value_bytes = value.encode(); let value_len = value_bytes.len(); - let addr_len = sp_std::mem::size_of::(); + let addr_len = T::AccountId::max_encoded_len(); // offsets where to place static data in contract memory let input_offset = 0; diff --git a/substrate/frame/contracts/src/chain_extension.rs b/substrate/frame/contracts/src/chain_extension.rs index b0e08df3ad..ed44771993 100644 --- a/substrate/frame/contracts/src/chain_extension.rs +++ b/substrate/frame/contracts/src/chain_extension.rs @@ -329,7 +329,7 @@ where /// /// If the contract supplied buffer is smaller than the passed `buffer` an `Err` is returned. /// If `allow_skip` is set to true the contract is allowed to skip the copying of the buffer - /// by supplying the guard value of `u32::MAX` as `out_ptr`. The + /// by supplying the guard value of `pallet-contracts::SENTINEL` as `out_ptr`. The /// `weight_per_byte` is only charged when the write actually happens and is not skipped or /// failed due to a too small output buffer. pub fn write( diff --git a/substrate/frame/contracts/src/exec.rs b/substrate/frame/contracts/src/exec.rs index 679a6adde9..e4988eea51 100644 --- a/substrate/frame/contracts/src/exec.rs +++ b/substrate/frame/contracts/src/exec.rs @@ -24,7 +24,7 @@ use crate::{ use frame_support::{ dispatch::{DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable}, storage::{with_transaction, TransactionOutcome}, - traits::{Contains, Currency, ExistenceRequirement, Get, OriginTrait, Randomness, Time}, + traits::{Contains, Currency, ExistenceRequirement, OriginTrait, Randomness, Time}, weights::Weight, }; use frame_system::RawOrigin; @@ -140,11 +140,11 @@ pub trait Ext: sealing::Sealed { /// was deleted. fn get_storage(&mut self, key: &StorageKey) -> Option>; - /// Returns true iff some storage entry exists under the supplied `key` + /// Returns `Some(len)` (in bytes) if a storage item exists at `key`. /// - /// Returns `false` if the `key` wasn't previously set by `set_storage` or + /// Returns `None` if the `key` wasn't previously set by `set_storage` or /// was deleted. - fn contains_storage(&mut self, key: &StorageKey) -> bool; + fn get_storage_size(&mut self, key: &StorageKey) -> Option; /// Sets the storage entry by the given key to the specified value. If `value` is `None` then /// the storage entry is deleted. @@ -996,8 +996,8 @@ where Storage::::read(&self.top_frame_mut().contract_info().trie_id, key) } - fn contains_storage(&mut self, key: &StorageKey) -> bool { - Storage::::contains(&self.top_frame_mut().contract_info().trie_id, key) + fn get_storage_size(&mut self, key: &StorageKey) -> Option { + Storage::::size(&self.top_frame_mut().contract_info().trie_id, key) } fn set_storage( @@ -1056,7 +1056,7 @@ where } fn max_value_size(&self) -> u32 { - T::Schedule::get().limits.payload_len + self.schedule.limits.payload_len } fn get_weight_price(&self, weight: Weight) -> BalanceOf { @@ -2432,16 +2432,16 @@ mod tests { } #[test] - fn contains_storage_works() { + fn get_storage_size_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { assert_eq!( ctx.ext.set_storage([1; 32], Some(vec![1, 2, 3]), false), Ok(WriteOutcome::New) ); assert_eq!(ctx.ext.set_storage([2; 32], Some(vec![]), false), Ok(WriteOutcome::New)); - assert_eq!(ctx.ext.contains_storage(&[1; 32]), true); - assert_eq!(ctx.ext.contains_storage(&[1; 32]), true); - assert_eq!(ctx.ext.contains_storage(&[3; 32]), false); + assert_eq!(ctx.ext.get_storage_size(&[1; 32]), Some(3)); + assert_eq!(ctx.ext.get_storage_size(&[2; 32]), Some(0)); + assert_eq!(ctx.ext.get_storage_size(&[3; 32]), None); exec_success() }); diff --git a/substrate/frame/contracts/src/lib.rs b/substrate/frame/contracts/src/lib.rs index e57b88c5d0..9f9cc09f64 100644 --- a/substrate/frame/contracts/src/lib.rs +++ b/substrate/frame/contracts/src/lib.rs @@ -136,6 +136,14 @@ type BalanceOf = /// The current storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(6); +/// Used as a sentinel value when reading and writing contract memory. +/// +/// It is usually used to signal `None` to a contract when only a primitive is allowed +/// and we don't want to go through encoding a full Rust type. Using `u32::Max` is a safe +/// sentinel because contracts are never allowed to use such a large amount of resources +/// that this value makes sense for a memory location or length. +const SENTINEL: u32 = u32::MAX; + /// Provides the contract address generation method. /// /// See [`DefaultAddressGenerator`] for the default implementation. @@ -831,7 +839,7 @@ where module: &mut PrefabWasmModule, schedule: &Schedule, ) -> frame_support::dispatch::DispatchResult { - self::wasm::reinstrument(module, schedule) + self::wasm::reinstrument(module, schedule).map(|_| ()) } /// Internal function that does the actual call. diff --git a/substrate/frame/contracts/src/schedule.rs b/substrate/frame/contracts/src/schedule.rs index 459bd950ce..f8ca182aea 100644 --- a/substrate/frame/contracts/src/schedule.rs +++ b/substrate/frame/contracts/src/schedule.rs @@ -316,15 +316,24 @@ pub struct HostFnWeights { /// Weight of calling `seal_set_storage`. pub set_storage: Weight, - /// Weight per byte of an item stored with `seal_set_storage`. - pub set_storage_per_byte: Weight, + /// Weight per written byten of an item stored with `seal_set_storage`. + pub set_storage_per_new_byte: Weight, + + /// Weight per overwritten byte of an item stored with `seal_set_storage`. + pub set_storage_per_old_byte: Weight, /// Weight of calling `seal_clear_storage`. pub clear_storage: Weight, + /// Weight of calling `seal_clear_storage` per byte of the stored item. + pub clear_storage_per_byte: Weight, + /// Weight of calling `seal_contains_storage`. pub contains_storage: Weight, + /// Weight of calling `seal_contains_storage` per byte of the stored item. + pub contains_storage_per_byte: Weight, + /// Weight of calling `seal_get_storage`. pub get_storage: Weight, @@ -586,9 +595,12 @@ impl Default for HostFnWeights { ), debug_message: cost_batched!(seal_debug_message), set_storage: cost_batched!(seal_set_storage), - set_storage_per_byte: cost_byte_batched!(seal_set_storage_per_kb), + set_storage_per_new_byte: cost_byte_batched!(seal_set_storage_per_new_kb), + set_storage_per_old_byte: cost_byte_batched!(seal_set_storage_per_old_kb), clear_storage: cost_batched!(seal_clear_storage), + clear_storage_per_byte: cost_byte_batched!(seal_clear_storage_per_kb), contains_storage: cost_batched!(seal_contains_storage), + contains_storage_per_byte: cost_byte_batched!(seal_contains_storage_per_kb), get_storage: cost_batched!(seal_get_storage), get_storage_per_byte: cost_byte_batched!(seal_get_storage_per_kb), take_storage: cost_batched!(seal_take_storage), diff --git a/substrate/frame/contracts/src/storage.rs b/substrate/frame/contracts/src/storage.rs index b84cd1d253..de65059b5b 100644 --- a/substrate/frame/contracts/src/storage.rs +++ b/substrate/frame/contracts/src/storage.rs @@ -22,7 +22,7 @@ pub mod meter; use crate::{ exec::{AccountIdOf, StorageKey}, weights::WeightInfo, - BalanceOf, CodeHash, Config, ContractInfoOf, DeletionQueue, Error, TrieId, + BalanceOf, CodeHash, Config, ContractInfoOf, DeletionQueue, Error, TrieId, SENTINEL, }; use codec::{Decode, Encode}; use frame_support::{ @@ -87,6 +87,33 @@ pub enum WriteOutcome { Taken(Vec), } +impl WriteOutcome { + /// Extracts the size of the overwritten value or `0` if there + /// was no value in storage. + pub fn old_len(&self) -> u32 { + match self { + Self::New => 0, + Self::Overwritten(len) => *len, + Self::Taken(value) => value.len() as u32, + } + } + + /// Extracts the size of the overwritten value or `SENTINEL` if there + /// was no value in storage. + /// + /// # Note + /// + /// We cannot use `0` as sentinel value because there could be a zero sized + /// storage entry which is different from a non existing one. + pub fn old_len_with_sentinel(&self) -> u32 { + match self { + Self::New => SENTINEL, + Self::Overwritten(len) => *len, + Self::Taken(value) => value.len() as u32, + } + } +} + pub struct Storage(PhantomData); impl Storage @@ -102,9 +129,12 @@ where child::get_raw(&child_trie_info(trie_id), &blake2_256(key)) } - /// Returns `true` iff the `key` exists in storage. - pub fn contains(trie_id: &TrieId, key: &StorageKey) -> bool { - child::exists(&child_trie_info(trie_id), &blake2_256(key)) + /// Returns `Some(len)` (in bytes) if a storage item exists at `key`. + /// + /// Returns `None` if the `key` wasn't previously set by `set_storage` or + /// was deleted. + pub fn size(trie_id: &TrieId, key: &StorageKey) -> Option { + child::len(&child_trie_info(trie_id), &blake2_256(key)) } /// Update a storage entry into a contract's kv storage. diff --git a/substrate/frame/contracts/src/tests.rs b/substrate/frame/contracts/src/tests.rs index fd5c8cfd34..3d39bc6d78 100644 --- a/substrate/frame/contracts/src/tests.rs +++ b/substrate/frame/contracts/src/tests.rs @@ -294,7 +294,7 @@ pub const BOB: AccountId32 = AccountId32::new([2u8; 32]); pub const CHARLIE: AccountId32 = AccountId32::new([3u8; 32]); pub const DJANGO: AccountId32 = AccountId32::new([4u8; 32]); -pub const GAS_LIMIT: Weight = 10_000_000_000; +pub const GAS_LIMIT: Weight = 100_000_000_000; pub struct ExtBuilder { existential_deposit: u64, diff --git a/substrate/frame/contracts/src/wasm/code_cache.rs b/substrate/frame/contracts/src/wasm/code_cache.rs index e3fe48ac12..a48f983883 100644 --- a/substrate/frame/contracts/src/wasm/code_cache.rs +++ b/substrate/frame/contracts/src/wasm/code_cache.rs @@ -38,7 +38,6 @@ use crate::{ use frame_support::{ dispatch::{DispatchError, DispatchResult}, ensure, - storage::StorageMap, traits::ReservableCurrency, }; use sp_core::crypto::UncheckedFrom; @@ -149,52 +148,38 @@ pub fn load( where T::AccountId: UncheckedFrom + AsRef<[u8]>, { - gas_meter.charge(CodeToken::Load(estimate_code_size::, _>(&code_hash)?))?; + let charged = gas_meter.charge(CodeToken::Load(schedule.limits.code_len))?; let mut prefab_module = >::get(code_hash).ok_or_else(|| Error::::CodeNotFound)?; + gas_meter.adjust_gas(charged, CodeToken::Load(prefab_module.code.len() as u32)); prefab_module.code_hash = code_hash; if prefab_module.instruction_weights_version < schedule.instruction_weights.version { // The instruction weights have changed. // We need to re-instrument the code with the new instruction weights. - gas_meter.charge(CodeToken::Reinstrument(estimate_code_size::, _>( - &code_hash, - )?))?; - reinstrument(&mut prefab_module, schedule)?; + let charged = gas_meter.charge(CodeToken::Reinstrument(schedule.limits.code_len))?; + let code_size = reinstrument(&mut prefab_module, schedule)?; + gas_meter.adjust_gas(charged, CodeToken::Reinstrument(code_size)); } Ok(prefab_module) } /// Instruments the passed prefab wasm module with the supplied schedule. +/// +/// Returns the size in bytes of the uninstrumented code. pub fn reinstrument( prefab_module: &mut PrefabWasmModule, schedule: &Schedule, -) -> Result<(), DispatchError> { +) -> Result { let original_code = >::get(&prefab_module.code_hash).ok_or_else(|| Error::::CodeNotFound)?; + let original_code_len = original_code.len(); prefab_module.code = prepare::reinstrument_contract::(original_code, schedule)?; prefab_module.instruction_weights_version = schedule.instruction_weights.version; >::insert(&prefab_module.code_hash, &*prefab_module); - Ok(()) -} - -/// Get the size of the code stored at `code_hash` without loading it. -/// -/// The returned value is slightly too large when using it for the [`PrefabWasmModule`] -/// because it has other fields in addition to the code itself. However, those are negligible -/// when compared to the code size. Additionally, charging too much weight is completely safe. -fn estimate_code_size(code_hash: &CodeHash) -> Result -where - T: Config, - M: StorageMap, V>, - V: codec::FullCodec, -{ - let key = M::hashed_key_for(code_hash); - let mut data = [0u8; 0]; - let len = sp_io::storage::read(&key, &mut data, 0).ok_or_else(|| Error::::CodeNotFound)?; - Ok(len) + Ok(original_code_len as u32) } /// Costs for operations that are related to code handling. diff --git a/substrate/frame/contracts/src/wasm/mod.rs b/substrate/frame/contracts/src/wasm/mod.rs index ee778982cd..41e940bcd9 100644 --- a/substrate/frame/contracts/src/wasm/mod.rs +++ b/substrate/frame/contracts/src/wasm/mod.rs @@ -385,8 +385,8 @@ mod tests { fn get_storage(&mut self, key: &StorageKey) -> Option> { self.storage.get(key).cloned() } - fn contains_storage(&mut self, key: &StorageKey) -> bool { - self.storage.contains_key(key) + fn get_storage_size(&mut self, key: &StorageKey) -> Option { + self.storage.get(key).map(|val| val.len() as u32) } fn set_storage( &mut self, @@ -2023,7 +2023,7 @@ mod tests { // value did not exist before -> sentinel returned let input = ([1u8; 32], [42u8, 48]).encode(); let result = execute(CODE, input, &mut ext).unwrap(); - assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), u32::MAX); + assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), crate::SENTINEL); assert_eq!(ext.storage.get(&[1u8; 32]).unwrap(), &[42u8, 48]); // value do exist -> length of old value returned @@ -2083,7 +2083,7 @@ mod tests { // value does not exist -> sentinel returned let result = execute(CODE, [3u8; 32].encode(), &mut ext).unwrap(); - assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), u32::MAX); + assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), crate::SENTINEL); assert_eq!(ext.storage.get(&[3u8; 32]), None); // value did exist -> length returned @@ -2228,25 +2228,16 @@ mod tests { ext.storage.insert([1u8; 32], vec![42u8]); ext.storage.insert([2u8; 32], vec![]); - // value does not exist -> error returned + // value does not exist -> sentinel value returned let result = execute(CODE, [3u8; 32].encode(), &mut ext).unwrap(); - assert_eq!( - u32::from_le_bytes(result.data.0.try_into().unwrap()), - ReturnCode::KeyNotFound as u32 - ); + assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), crate::SENTINEL); // value did exist -> success let result = execute(CODE, [1u8; 32].encode(), &mut ext).unwrap(); - assert_eq!( - u32::from_le_bytes(result.data.0.try_into().unwrap()), - ReturnCode::Success as u32 - ); + assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), 1,); // value did exist -> success (zero sized type) let result = execute(CODE, [2u8; 32].encode(), &mut ext).unwrap(); - assert_eq!( - u32::from_le_bytes(result.data.0.try_into().unwrap()), - ReturnCode::Success as u32 - ); + assert_eq!(u32::from_le_bytes(result.data.0.try_into().unwrap()), 0,); } } diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs index 98d9d9a40c..13aa934306 100644 --- a/substrate/frame/contracts/src/wasm/runtime.rs +++ b/substrate/frame/contracts/src/wasm/runtime.rs @@ -21,9 +21,8 @@ use crate::{ exec::{ExecError, ExecResult, Ext, StorageKey, TopicOf}, gas::{ChargedAmount, Token}, schedule::HostFnWeights, - storage::WriteOutcome, wasm::env_def::ConvertibleToWasm, - BalanceOf, CodeHash, Config, Error, + BalanceOf, CodeHash, Config, Error, SENTINEL, }; use bitflags::bitflags; use codec::{Decode, DecodeAll, Encode, MaxEncodedLen}; @@ -169,23 +168,18 @@ pub enum RuntimeCosts { DepositEvent { num_topic: u32, len: u32 }, /// Weight of calling `seal_debug_message`. DebugMessage, - /// Weight of calling `seal_set_storage` for the given storage item size. - SetStorage(u32), - /// Weight of calling `seal_clear_storage`. - ClearStorage, - /// Weight of calling `seal_contains_storage`. + /// Weight of calling `seal_set_storage` for the given storage item sizes. + SetStorage { old_bytes: u32, new_bytes: u32 }, + /// Weight of calling `seal_clear_storage` per cleared byte. + ClearStorage(u32), + /// Weight of calling `seal_contains_storage` per byte of the checked item. #[cfg(feature = "unstable-interface")] - ContainsStorage, - /// Weight of calling `seal_get_storage` without output weight. - GetStorageBase, - /// Weight of an item received via `seal_get_storage` for the given size. - GetStorageCopyOut(u32), - /// Weight of calling `seal_take_storage` without output weight. + ContainsStorage(u32), + /// Weight of calling `seal_get_storage` with the specified size in storage. + GetStorage(u32), + /// Weight of calling `seal_take_storage` for the given size. #[cfg(feature = "unstable-interface")] - TakeStorageBase, - /// Weight of an item received via `seal_take_storage` for the given size. - #[cfg(feature = "unstable-interface")] - TakeStorageCopyOut(u32), + TakeStorage(u32), /// Weight of calling `seal_transfer`. Transfer, /// Weight of calling `seal_call` for the given input size. @@ -249,17 +243,23 @@ impl RuntimeCosts { .saturating_add(s.deposit_event_per_topic.saturating_mul(num_topic.into())) .saturating_add(s.deposit_event_per_byte.saturating_mul(len.into())), DebugMessage => s.debug_message, - SetStorage(len) => - s.set_storage.saturating_add(s.set_storage_per_byte.saturating_mul(len.into())), - ClearStorage => s.clear_storage, + SetStorage { new_bytes, old_bytes } => s + .set_storage + .saturating_add(s.set_storage_per_new_byte.saturating_mul(new_bytes.into())) + .saturating_add(s.set_storage_per_old_byte.saturating_mul(old_bytes.into())), + ClearStorage(len) => s + .clear_storage + .saturating_add(s.clear_storage_per_byte.saturating_mul(len.into())), #[cfg(feature = "unstable-interface")] - ContainsStorage => s.contains_storage, - GetStorageBase => s.get_storage, - GetStorageCopyOut(len) => s.get_storage_per_byte.saturating_mul(len.into()), + ContainsStorage(len) => s + .contains_storage + .saturating_add(s.contains_storage_per_byte.saturating_mul(len.into())), + GetStorage(len) => + s.get_storage.saturating_add(s.get_storage_per_byte.saturating_mul(len.into())), #[cfg(feature = "unstable-interface")] - TakeStorageBase => s.take_storage, - #[cfg(feature = "unstable-interface")] - TakeStorageCopyOut(len) => s.take_storage_per_byte.saturating_mul(len.into()), + TakeStorage(len) => s + .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())), @@ -534,7 +534,7 @@ where /// length of the buffer located at `out_ptr`. If that buffer is large enough the actual /// `buf.len()` is written to this location. /// - /// If `out_ptr` is set to the sentinel value of `u32::MAX` and `allow_skip` is true the + /// If `out_ptr` is set to the sentinel value of `SENTINEL` and `allow_skip` is true the /// operation is skipped and `Ok` is returned. This is supposed to help callers to make copying /// output optional. For example to skip copying back the output buffer of an `seal_call` /// when the caller is not interested in the result. @@ -553,7 +553,7 @@ where allow_skip: bool, create_token: impl FnOnce(u32) -> Option, ) -> Result<(), DispatchError> { - if allow_skip && out_ptr == u32::MAX { + if allow_skip && out_ptr == SENTINEL { return Ok(()) } @@ -648,48 +648,36 @@ where } } - /// Extracts the size of the overwritten value or `u32::MAX` if there - /// was no value in storage. - /// - /// # Note - /// - /// We cannot use `0` as sentinel value because there could be a zero sized - /// storage entry which is different from a non existing one. - fn overwritten_len(outcome: WriteOutcome) -> u32 { - match outcome { - WriteOutcome::New => u32::MAX, - WriteOutcome::Overwritten(len) => len, - WriteOutcome::Taken(value) => value.len() as u32, - } - } - fn set_storage( &mut self, key_ptr: u32, value_ptr: u32, value_len: u32, ) -> Result { - self.charge_gas(RuntimeCosts::SetStorage(value_len))?; - if value_len > self.ext.max_value_size() { + let max_size = self.ext.max_value_size(); + let charged = self + .charge_gas(RuntimeCosts::SetStorage { new_bytes: value_len, old_bytes: max_size })?; + if value_len > max_size { Err(Error::::ValueTooLarge)?; } let mut key: StorageKey = [0; 32]; self.read_sandbox_memory_into_buf(key_ptr, &mut key)?; let value = Some(self.read_sandbox_memory(value_ptr, value_len)?); - self.ext - .set_storage(key, value, false) - .map(Self::overwritten_len) - .map_err(Into::into) + let write_outcome = self.ext.set_storage(key, value, false)?; + self.adjust_gas( + charged, + RuntimeCosts::SetStorage { new_bytes: value_len, old_bytes: write_outcome.old_len() }, + ); + Ok(write_outcome.old_len_with_sentinel()) } fn clear_storage(&mut self, key_ptr: u32) -> Result { - self.charge_gas(RuntimeCosts::ClearStorage)?; + let charged = self.charge_gas(RuntimeCosts::ClearStorage(self.ext.max_value_size()))?; let mut key: StorageKey = [0; 32]; self.read_sandbox_memory_into_buf(key_ptr, &mut key)?; - self.ext - .set_storage(key, None, false) - .map(Self::overwritten_len) - .map_err(Into::into) + let outcome = self.ext.set_storage(key, None, false)?; + self.adjust_gas(charged, RuntimeCosts::ClearStorage(outcome.old_len())); + Ok(outcome.old_len_with_sentinel()) } fn call( @@ -827,7 +815,7 @@ define_env!(Env, , // # Return Value // // Returns the size of the pre-existing value at the specified key if any. Otherwise - // `u32::MAX` is returned as a sentinel value. + // `SENTINEL` is returned as a sentinel value. [__unstable__] seal_set_storage(ctx, key_ptr: u32, value_ptr: u32, value_len: u32) -> u32 => { ctx.set_storage(key_ptr, value_ptr, value_len) }, @@ -849,7 +837,7 @@ define_env!(Env, , // # Return Value // // Returns the size of the pre-existing value at the specified key if any. Otherwise - // `u32::MAX` is returned as a sentinel value. + // `SENTINEL` is returned as a sentinel value. [__unstable__] seal_clear_storage(ctx, key_ptr: u32) -> u32 => { ctx.clear_storage(key_ptr).map_err(Into::into) }, @@ -867,39 +855,39 @@ define_env!(Env, , // // `ReturnCode::KeyNotFound` [seal0] seal_get_storage(ctx, key_ptr: u32, out_ptr: u32, out_len_ptr: u32) -> ReturnCode => { - ctx.charge_gas(RuntimeCosts::GetStorageBase)?; + let charged = ctx.charge_gas(RuntimeCosts::GetStorage(ctx.ext.max_value_size()))?; let mut key: StorageKey = [0; 32]; ctx.read_sandbox_memory_into_buf(key_ptr, &mut key)?; if let Some(value) = ctx.ext.get_storage(&key) { - ctx.write_sandbox_output(out_ptr, out_len_ptr, &value, false, |len| { - Some(RuntimeCosts::GetStorageCopyOut(len)) - })?; + ctx.adjust_gas(charged, RuntimeCosts::GetStorage(value.len() as u32)); + ctx.write_sandbox_output(out_ptr, out_len_ptr, &value, false, already_charged)?; Ok(ReturnCode::Success) } else { + ctx.adjust_gas(charged, RuntimeCosts::GetStorage(0)); Ok(ReturnCode::KeyNotFound) } }, // Checks whether there is a value stored under the given key. // - // Returns `ReturnCode::Success` if there is a key in storage. Otherwise an error - // is returned. - // // # Parameters // // - `key_ptr`: pointer into the linear memory where the key of the requested value is placed. // - // # Errors + // # Return Value // - // `ReturnCode::KeyNotFound` - [__unstable__] seal_contains_storage(ctx, key_ptr: u32) -> ReturnCode => { - ctx.charge_gas(RuntimeCosts::ContainsStorage)?; + // Returns the size of the pre-existing value at the specified key if any. Otherwise + // `SENTINEL` is returned as a sentinel value. + [__unstable__] seal_contains_storage(ctx, key_ptr: u32) -> u32 => { + let charged = ctx.charge_gas(RuntimeCosts::ContainsStorage(ctx.ext.max_value_size()))?; let mut key: StorageKey = [0; 32]; ctx.read_sandbox_memory_into_buf(key_ptr, &mut key)?; - if ctx.ext.contains_storage(&key) { - Ok(ReturnCode::Success) + if let Some(len) = ctx.ext.get_storage_size(&key) { + ctx.adjust_gas(charged, RuntimeCosts::ContainsStorage(len)); + Ok(len) } else { - Ok(ReturnCode::KeyNotFound) + ctx.adjust_gas(charged, RuntimeCosts::ContainsStorage(0)); + Ok(SENTINEL) } }, @@ -916,15 +904,15 @@ define_env!(Env, , // // `ReturnCode::KeyNotFound` [__unstable__] seal_take_storage(ctx, key_ptr: u32, out_ptr: u32, out_len_ptr: u32) -> ReturnCode => { - ctx.charge_gas(RuntimeCosts::TakeStorageBase)?; + let charged = ctx.charge_gas(RuntimeCosts::TakeStorage(ctx.ext.max_value_size()))?; let mut key: StorageKey = [0; 32]; ctx.read_sandbox_memory_into_buf(key_ptr, &mut key)?; - if let WriteOutcome::Taken(value) = ctx.ext.set_storage(key, None, true)? { - ctx.write_sandbox_output(out_ptr, out_len_ptr, &value, false, |len| { - Some(RuntimeCosts::TakeStorageCopyOut(len)) - })?; + if let crate::storage::WriteOutcome::Taken(value) = ctx.ext.set_storage(key, None, true)? { + ctx.adjust_gas(charged, RuntimeCosts::TakeStorage(value.len() as u32)); + ctx.write_sandbox_output(out_ptr, out_len_ptr, &value, false, already_charged)?; Ok(ReturnCode::Success) } else { + ctx.adjust_gas(charged, RuntimeCosts::TakeStorage(0)); Ok(ReturnCode::KeyNotFound) } }, @@ -1006,7 +994,7 @@ define_env!(Env, , // // The callees output buffer is copied to `output_ptr` and its length to `output_len_ptr`. // The copy of the output buffer can be skipped by supplying the sentinel value - // of `u32::MAX` to `output_ptr`. + // of `SENTINEL` to `output_ptr`. // // # Parameters // @@ -1103,7 +1091,7 @@ define_env!(Env, , // by the code hash. The address of this new account is copied to `address_ptr` and its length // to `address_len_ptr`. The constructors output buffer is copied to `output_ptr` and its // length to `output_len_ptr`. The copy of the output buffer and address can be skipped by - // supplying the sentinel value of `u32::MAX` to `output_ptr` or `address_ptr`. + // supplying the sentinel value of `SENTINEL` to `output_ptr` or `address_ptr`. // // `value` must be at least the minimum balance. Otherwise the instantiation fails and the // contract is not created. diff --git a/substrate/frame/contracts/src/weights.rs b/substrate/frame/contracts/src/weights.rs index 655cba5d3b..2d74df9627 100644 --- a/substrate/frame/contracts/src/weights.rs +++ b/substrate/frame/contracts/src/weights.rs @@ -18,11 +18,11 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-01-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/lto-fat-cg1/substrate +// target/production/substrate // benchmark // --chain=dev // --steps=50 @@ -33,9 +33,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --output=./frame/contracts/src/weights.rs -// --template=.maintain/frame-weight-template.hbs -// --header=LICENSE-APACHE2 -// --raw +// --template=./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -76,11 +74,14 @@ pub trait WeightInfo { fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight; fn seal_debug_message(r: u32, ) -> Weight; fn seal_set_storage(r: u32, ) -> Weight; - fn seal_set_storage_per_kb(n: u32, ) -> Weight; + fn seal_set_storage_per_new_kb(n: u32, ) -> Weight; + fn seal_set_storage_per_old_kb(n: u32, ) -> Weight; fn seal_clear_storage(r: u32, ) -> Weight; + fn seal_clear_storage_per_kb(n: u32, ) -> Weight; fn seal_get_storage(r: u32, ) -> Weight; - fn seal_contains_storage(r: u32, ) -> Weight; fn seal_get_storage_per_kb(n: u32, ) -> Weight; + fn seal_contains_storage(r: u32, ) -> Weight; + fn seal_contains_storage_per_kb(n: u32, ) -> Weight; fn seal_take_storage(r: u32, ) -> Weight; fn seal_take_storage_per_kb(n: u32, ) -> Weight; fn seal_transfer(r: u32, ) -> Weight; @@ -155,32 +156,32 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize() -> Weight { - (1_585_000 as Weight) + (1_636_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 { - (7_902_000 as Weight) + (7_840_000 as Weight) // Standard Error: 0 - .saturating_add((751_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((752_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 { - (31_473_000 as Weight) + (31_915_000 as Weight) // Standard Error: 1_000 - .saturating_add((104_000 as Weight).saturating_mul(q as Weight)) + .saturating_add((98_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 { - (15_462_000 as Weight) - // Standard Error: 35_000 - .saturating_add((81_710_000 as Weight).saturating_mul(c as Weight)) + (18_897_000 as Weight) + // Standard Error: 32_000 + .saturating_add((69_663_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)) } @@ -189,9 +190,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 { - (169_561_000 as Weight) - // Standard Error: 56_000 - .saturating_add((60_037_000 as Weight).saturating_mul(c as Weight)) + (204_947_000 as Weight) + // Standard Error: 54_000 + .saturating_add((58_293_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)) } @@ -203,11 +204,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 { - (169_885_000 as Weight) - // Standard Error: 127_000 - .saturating_add((170_680_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 8_000 - .saturating_add((1_788_000 as Weight).saturating_mul(s as Weight)) + (211_187_000 as Weight) + // Standard Error: 114_000 + .saturating_add((156_529_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 7_000 + .saturating_add((1_830_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)) } @@ -218,9 +219,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn instantiate(s: u32, ) -> Weight { - (150_265_000 as Weight) + (150_485_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_722_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_769_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)) } @@ -229,7 +230,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call() -> Weight { - (114_784_000 as Weight) + (117_274_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -237,9 +238,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 { - (48_072_000 as Weight) - // Standard Error: 36_000 - .saturating_add((83_578_000 as Weight).saturating_mul(c as Weight)) + (51_126_000 as Weight) + // Standard Error: 49_000 + .saturating_add((72_622_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)) } @@ -247,7 +248,7 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - (24_739_000 as Weight) + (24_221_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -256,9 +257,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 { - (174_123_000 as Weight) - // Standard Error: 127_000 - .saturating_add((56_078_000 as Weight).saturating_mul(r as Weight)) + (219_790_000 as Weight) + // Standard Error: 126_000 + .saturating_add((56_383_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)) } @@ -267,9 +268,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 { - (180_168_000 as Weight) - // Standard Error: 122_000 - .saturating_add((56_154_000 as Weight).saturating_mul(r as Weight)) + (218_377_000 as Weight) + // Standard Error: 117_000 + .saturating_add((57_243_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)) } @@ -278,9 +279,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 { - (179_464_000 as Weight) - // Standard Error: 96_000 - .saturating_add((55_350_000 as Weight).saturating_mul(r as Weight)) + (217_999_000 as Weight) + // Standard Error: 104_000 + .saturating_add((56_674_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)) } @@ -289,9 +290,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 { - (181_031_000 as Weight) - // Standard Error: 154_000 - .saturating_add((149_508_000 as Weight).saturating_mul(r as Weight)) + (226_932_000 as Weight) + // Standard Error: 155_000 + .saturating_add((147_401_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)) } @@ -300,9 +301,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 { - (178_709_000 as Weight) - // Standard Error: 107_000 - .saturating_add((56_326_000 as Weight).saturating_mul(r as Weight)) + (233_107_000 as Weight) + // Standard Error: 110_000 + .saturating_add((55_334_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)) } @@ -311,9 +312,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 { - (175_715_000 as Weight) - // Standard Error: 116_000 - .saturating_add((56_755_000 as Weight).saturating_mul(r as Weight)) + (235_364_000 as Weight) + // Standard Error: 122_000 + .saturating_add((54_700_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)) } @@ -322,9 +323,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 { - (178_552_000 as Weight) - // Standard Error: 121_000 - .saturating_add((55_756_000 as Weight).saturating_mul(r as Weight)) + (232_875_000 as Weight) + // Standard Error: 108_000 + .saturating_add((54_510_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)) } @@ -333,9 +334,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 { - (186_172_000 as Weight) - // Standard Error: 106_000 - .saturating_add((55_311_000 as Weight).saturating_mul(r as Weight)) + (226_089_000 as Weight) + // Standard Error: 126_000 + .saturating_add((54_899_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)) } @@ -345,9 +346,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 { - (183_750_000 as Weight) - // Standard Error: 140_000 - .saturating_add((131_877_000 as Weight).saturating_mul(r as Weight)) + (234_746_000 as Weight) + // Standard Error: 146_000 + .saturating_add((132_861_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)) } @@ -356,9 +357,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 { - (97_350_000 as Weight) - // Standard Error: 54_000 - .saturating_add((27_606_000 as Weight).saturating_mul(r as Weight)) + (96_247_000 as Weight) + // Standard Error: 70_000 + .saturating_add((27_918_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)) } @@ -367,9 +368,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 { - (179_058_000 as Weight) - // Standard Error: 106_000 - .saturating_add((53_258_000 as Weight).saturating_mul(r as Weight)) + (221_631_000 as Weight) + // Standard Error: 139_000 + .saturating_add((54_382_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)) } @@ -378,9 +379,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 { - (248_562_000 as Weight) - // Standard Error: 5_000 - .saturating_add((10_515_000 as Weight).saturating_mul(n as Weight)) + (306_449_000 as Weight) + // Standard Error: 3_000 + .saturating_add((11_919_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)) } @@ -389,9 +390,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 { - (161_228_000 as Weight) - // Standard Error: 90_000 - .saturating_add((14_539_000 as Weight).saturating_mul(r as Weight)) + (222_176_000 as Weight) + // Standard Error: 72_000 + .saturating_add((3_223_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)) } @@ -400,9 +401,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 { - (177_866_000 as Weight) + (211_079_000 as Weight) // Standard Error: 0 - .saturating_add((188_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((237_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)) } @@ -413,9 +414,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 { - (164_572_000 as Weight) - // Standard Error: 1_817_000 - .saturating_add((68_480_000 as Weight).saturating_mul(r as Weight)) + (213_994_000 as Weight) + // Standard Error: 104_000 + .saturating_add((64_453_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)) @@ -427,9 +428,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 { - (168_658_000 as Weight) - // Standard Error: 189_000 - .saturating_add((166_190_000 as Weight).saturating_mul(r as Weight)) + (228_281_000 as Weight) + // Standard Error: 150_000 + .saturating_add((166_949_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)) } @@ -438,9 +439,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 { - (185_391_000 as Weight) - // Standard Error: 191_000 - .saturating_add((292_609_000 as Weight).saturating_mul(r as Weight)) + (230_348_000 as Weight) + // Standard Error: 163_000 + .saturating_add((288_679_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)) } @@ -450,11 +451,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 { - (507_994_000 as Weight) - // Standard Error: 1_569_000 - .saturating_add((276_852_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 309_000 - .saturating_add((79_461_000 as Weight).saturating_mul(n as Weight)) + (601_613_000 as Weight) + // Standard Error: 1_566_000 + .saturating_add((279_038_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 308_000 + .saturating_add((84_818_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)) @@ -465,79 +466,95 @@ 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 { - (99_048_000 as Weight) - // Standard Error: 87_000 - .saturating_add((46_088_000 as Weight).saturating_mul(r as Weight)) + (113_578_000 as Weight) + // Standard Error: 67_000 + .saturating_add((44_899_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 { - (142_559_000 as Weight) - // Standard Error: 603_000 - .saturating_add((269_723_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + (59_019_000 as Weight) + // Standard Error: 995_000 + .saturating_add((414_759_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(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } - // Storage: System Account (r:2 w:2) - // Storage: Contracts ContractInfoOf (r:1 w:1) - // Storage: Contracts CodeStorage (r:1 w:0) - // Storage: Timestamp Now (r:1 w:0) - // Storage: unknown [0x7afa01283080ef247df84e0ba38ea5a587d25ce6633a6bfbba02068c14023441] (r:1 w:1) - fn seal_set_storage_per_kb(n: u32, ) -> Weight { - (346_704_000 as Weight) - // Standard Error: 200_000 - .saturating_add((29_907_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { + (620_483_000 as Weight) + // Standard Error: 242_000 + .saturating_add((30_945_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 { + (632_391_000 as Weight) + // Standard Error: 317_000 + .saturating_add((11_431_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 { - (0 as Weight) - // Standard Error: 1_963_000 - .saturating_add((746_581_000 as Weight).saturating_mul(r as Weight)) + (96_628_000 as Weight) + // Standard Error: 878_000 + .saturating_add((387_212_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)) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + fn seal_clear_storage_per_kb(n: u32, ) -> Weight { + (625_960_000 as Weight) + // Standard Error: 270_000 + .saturating_add((11_170_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 { - (69_873_000 as Weight) - // Standard Error: 722_000 - .saturating_add((338_292_000 as Weight).saturating_mul(r as Weight)) + (115_155_000 as Weight) + // Standard Error: 741_000 + .saturating_add((331_711_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 { + (582_560_000 as Weight) + // Standard Error: 360_000 + .saturating_add((68_427_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 { - (0 as Weight) - // Standard Error: 1_169_000 - .saturating_add((480_500_000 as Weight).saturating_mul(r as Weight)) + (130_096_000 as Weight) + // Standard Error: 555_000 + .saturating_add((294_514_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: 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) - // Storage: unknown [0x7afa01283080ef247df84e0ba38ea5a587d25ce6633a6bfbba02068c14023441] (r:1 w:0) - fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (327_625_000 as Weight) - // Standard Error: 146_000 - .saturating_add((55_028_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn seal_contains_storage_per_kb(n: u32, ) -> Weight { + (528_701_000 as Weight) + // Standard Error: 246_000 + .saturating_add((10_375_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 { - (41_931_000 as Weight) - // Standard Error: 933_000 - .saturating_add((433_619_000 as Weight).saturating_mul(r as Weight)) + (95_349_000 as Weight) + // Standard Error: 906_000 + .saturating_add((430_051_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)) @@ -545,9 +562,9 @@ impl WeightInfo for SubstrateWeight { } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage_per_kb(n: u32, ) -> Weight { - (639_259_000 as Weight) - // Standard Error: 365_000 - .saturating_add((64_588_000 as Weight).saturating_mul(n as Weight)) + (676_606_000 as Weight) + // Standard Error: 389_000 + .saturating_add((70_517_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)) } @@ -556,9 +573,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 { - (71_335_000 as Weight) - // Standard Error: 1_489_000 - .saturating_add((1_765_321_000 as Weight).saturating_mul(r as Weight)) + (131_194_000 as Weight) + // Standard Error: 1_256_000 + .saturating_add((1_772_590_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)) @@ -569,9 +586,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_call(r: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 9_243_000 - .saturating_add((16_121_990_000 as Weight).saturating_mul(r as Weight)) + (2_463_174_000 as Weight) + // Standard Error: 19_404_000 + .saturating_add((19_548_986_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)) @@ -582,13 +599,13 @@ impl WeightInfo for SubstrateWeight { // 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 { - (15_978_164_000 as Weight) - // Standard Error: 57_271_000 - .saturating_add((1_179_479_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 20_000 - .saturating_add((17_389_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 21_000 - .saturating_add((28_660_000 as Weight).saturating_mul(o as Weight)) + (21_356_548_000 as Weight) + // Standard Error: 31_719_000 + .saturating_add((1_874_230_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 11_000 + .saturating_add((23_243_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 12_000 + .saturating_add((34_825_000 as Weight).saturating_mul(o 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)) @@ -602,8 +619,8 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts OwnerInfoOf (r:100 w:100) fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 115_056_000 - .saturating_add((23_312_565_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 49_981_000 + .saturating_add((28_988_348_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)) @@ -616,13 +633,13 @@ impl WeightInfo for SubstrateWeight { // 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 { - (18_724_034_000 as Weight) - // Standard Error: 66_000 - .saturating_add((18_363_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 66_000 - .saturating_add((29_093_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 66_000 - .saturating_add((158_645_000 as Weight).saturating_mul(s as Weight)) + (24_726_887_000 as Weight) + // Standard Error: 32_000 + .saturating_add((23_702_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 32_000 + .saturating_add((35_841_000 as Weight).saturating_mul(o as Weight)) + // Standard Error: 32_000 + .saturating_add((161_159_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)) } @@ -631,9 +648,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256(r: u32, ) -> Weight { - (179_769_000 as Weight) - // Standard Error: 121_000 - .saturating_add((80_706_000 as Weight).saturating_mul(r as Weight)) + (221_804_000 as Weight) + // Standard Error: 150_000 + .saturating_add((84_131_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)) } @@ -642,9 +659,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 { - (279_632_000 as Weight) - // Standard Error: 17_000 - .saturating_add((372_618_000 as Weight).saturating_mul(n as Weight)) + (357_186_000 as Weight) + // Standard Error: 23_000 + .saturating_add((469_081_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)) } @@ -653,9 +670,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 { - (182_040_000 as Weight) - // Standard Error: 119_000 - .saturating_add((88_916_000 as Weight).saturating_mul(r as Weight)) + (220_729_000 as Weight) + // Standard Error: 166_000 + .saturating_add((101_538_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)) } @@ -664,9 +681,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 { - (253_225_000 as Weight) - // Standard Error: 16_000 - .saturating_add((247_883_000 as Weight).saturating_mul(n as Weight)) + (272_756_000 as Weight) + // Standard Error: 18_000 + .saturating_add((311_130_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)) } @@ -675,9 +692,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 { - (179_945_000 as Weight) - // Standard Error: 96_000 - .saturating_add((68_362_000 as Weight).saturating_mul(r as Weight)) + (215_784_000 as Weight) + // Standard Error: 150_000 + .saturating_add((68_809_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)) } @@ -686,9 +703,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 { - (191_286_000 as Weight) - // Standard Error: 38_000 - .saturating_add((121_358_000 as Weight).saturating_mul(n as Weight)) + (256_009_000 as Weight) + // Standard Error: 12_000 + .saturating_add((124_552_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)) } @@ -697,9 +714,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 { - (179_381_000 as Weight) - // Standard Error: 101_000 - .saturating_add((68_158_000 as Weight).saturating_mul(r as Weight)) + (216_413_000 as Weight) + // Standard Error: 134_000 + .saturating_add((68_281_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)) } @@ -708,9 +725,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 { - (135_478_000 as Weight) - // Standard Error: 41_000 - .saturating_add((121_422_000 as Weight).saturating_mul(n as Weight)) + (254_477_000 as Weight) + // Standard Error: 13_000 + .saturating_add((124_483_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)) } @@ -719,266 +736,266 @@ 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 { - (123_468_000 as Weight) - // Standard Error: 1_017_000 - .saturating_add((15_542_677_000 as Weight).saturating_mul(r as Weight)) + (179_001_000 as Weight) + // Standard Error: 1_674_000 + .saturating_add((15_397_995_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)) } fn instr_i64const(r: u32, ) -> Weight { - (52_702_000 as Weight) + (46_905_000 as Weight) // Standard Error: 12_000 - .saturating_add((844_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((794_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (47_295_000 as Weight) - // Standard Error: 10_000 - .saturating_add((3_045_000 as Weight).saturating_mul(r as Weight)) + (53_636_000 as Weight) + // Standard Error: 12_000 + .saturating_add((2_476_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (46_353_000 as Weight) - // Standard Error: 9_000 - .saturating_add((3_047_000 as Weight).saturating_mul(r as Weight)) + (53_199_000 as Weight) + // Standard Error: 12_000 + .saturating_add((2_547_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (49_811_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_408_000 as Weight).saturating_mul(r as Weight)) + (37_268_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_987_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (47_054_000 as Weight) - // Standard Error: 12_000 - .saturating_add((2_504_000 as Weight).saturating_mul(r as Weight)) + (37_138_000 as Weight) + // Standard Error: 16_000 + .saturating_add((3_057_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (49_912_000 as Weight) - // Standard Error: 16_000 - .saturating_add((1_460_000 as Weight).saturating_mul(r as Weight)) + (39_353_000 as Weight) + // Standard Error: 17_000 + .saturating_add((1_939_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (43_860_000 as Weight) + (38_883_000 as Weight) // Standard Error: 17_000 - .saturating_add((2_150_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((2_495_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (37_009_000 as Weight) - // Standard Error: 16_000 - .saturating_add((2_762_000 as Weight).saturating_mul(r as Weight)) + (45_030_000 as Weight) + // Standard Error: 21_000 + .saturating_add((2_398_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (45_776_000 as Weight) + (47_281_000 as Weight) // Standard Error: 3_000 - .saturating_add((17_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((29_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (39_611_000 as Weight) - // Standard Error: 17_000 - .saturating_add((20_805_000 as Weight).saturating_mul(r as Weight)) + (49_074_000 as Weight) + // Standard Error: 20_000 + .saturating_add((19_991_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (45_523_000 as Weight) - // Standard Error: 27_000 - .saturating_add((31_622_000 as Weight).saturating_mul(r as Weight)) + (50_071_000 as Weight) + // Standard Error: 29_000 + .saturating_add((30_156_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (79_764_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_198_000 as Weight).saturating_mul(p as Weight)) + (84_902_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_124_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (46_510_000 as Weight) - // Standard Error: 11_000 - .saturating_add((810_000 as Weight).saturating_mul(r as Weight)) + (39_054_000 as Weight) + // Standard Error: 14_000 + .saturating_add((1_352_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (46_567_000 as Weight) - // Standard Error: 11_000 - .saturating_add((833_000 as Weight).saturating_mul(r as Weight)) + (39_190_000 as Weight) + // Standard Error: 14_000 + .saturating_add((1_370_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (43_439_000 as Weight) - // Standard Error: 10_000 - .saturating_add((1_463_000 as Weight).saturating_mul(r as Weight)) + (41_830_000 as Weight) + // Standard Error: 13_000 + .saturating_add((1_878_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (46_201_000 as Weight) - // Standard Error: 19_000 - .saturating_add((1_635_000 as Weight).saturating_mul(r as Weight)) + (40_764_000 as Weight) + // Standard Error: 13_000 + .saturating_add((1_931_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (42_639_000 as Weight) - // Standard Error: 18_000 - .saturating_add((1_652_000 as Weight).saturating_mul(r as Weight)) + (46_309_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_745_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (51_159_000 as Weight) - // Standard Error: 14_000 - .saturating_add((917_000 as Weight).saturating_mul(r as Weight)) + (47_071_000 as Weight) + // Standard Error: 12_000 + .saturating_add((797_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (36_462_000 as Weight) - // Standard Error: 867_000 - .saturating_add((187_724_000 as Weight).saturating_mul(r as Weight)) + (49_773_000 as Weight) + // Standard Error: 1_442_000 + .saturating_add((227_666_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (53_776_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_307_000 as Weight).saturating_mul(r as Weight)) + (43_879_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_486_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (53_674_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_304_000 as Weight).saturating_mul(r as Weight)) + (43_883_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_484_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (53_654_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_299_000 as Weight).saturating_mul(r as Weight)) + (43_415_000 as Weight) + // Standard Error: 11_000 + .saturating_add((1_495_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (53_493_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_299_000 as Weight).saturating_mul(r as Weight)) + (43_567_000 as Weight) + // Standard Error: 11_000 + .saturating_add((1_493_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (43_373_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_492_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64extendui32(r: u32, ) -> Weight { - (43_222_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_498_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i32wrapi64(r: u32, ) -> Weight { - (53_706_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_292_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64eq(r: u32, ) -> Weight { - (48_994_000 as Weight) - // Standard Error: 10_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ne(r: u32, ) -> Weight { - (49_464_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_876_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64lts(r: u32, ) -> Weight { - (49_194_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_884_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (49_291_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_883_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gts(r: u32, ) -> Weight { - (49_227_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_886_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gtu(r: u32, ) -> Weight { - (49_219_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_885_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64les(r: u32, ) -> Weight { - (49_263_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64leu(r: u32, ) -> Weight { - (49_251_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ges(r: u32, ) -> Weight { - (49_257_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64geu(r: u32, ) -> Weight { - (49_219_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_885_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64add(r: u32, ) -> Weight { - (49_221_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64sub(r: u32, ) -> Weight { - (48_936_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64mul(r: u32, ) -> Weight { - (49_266_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divs(r: u32, ) -> Weight { - (49_246_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_565_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divu(r: u32, ) -> Weight { - (49_181_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_211_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64rems(r: u32, ) -> Weight { - (49_337_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_525_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64remu(r: u32, ) -> Weight { - (49_387_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_241_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64and(r: u32, ) -> Weight { - (49_137_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64or(r: u32, ) -> Weight { - (49_366_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64xor(r: u32, ) -> Weight { - (49_143_000 as Weight) - // Standard Error: 11_000 + (41_332_000 as Weight) + // Standard Error: 12_000 .saturating_add((1_912_000 as Weight).saturating_mul(r as Weight)) } - fn instr_i64shl(r: u32, ) -> Weight { - (49_195_000 as Weight) + fn instr_i64extendui32(r: u32, ) -> Weight { + (41_331_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_911_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i32wrapi64(r: u32, ) -> Weight { + (43_704_000 as Weight) // Standard Error: 11_000 - .saturating_add((1_891_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64eq(r: u32, ) -> Weight { + (37_103_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_467_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ne(r: u32, ) -> Weight { + (36_680_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64lts(r: u32, ) -> Weight { + (36_659_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_494_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ltu(r: u32, ) -> Weight { + (36_491_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_495_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gts(r: u32, ) -> Weight { + (36_440_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_499_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gtu(r: u32, ) -> Weight { + (36_477_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_500_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64les(r: u32, ) -> Weight { + (36_561_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_498_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64leu(r: u32, ) -> Weight { + (36_418_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_501_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ges(r: u32, ) -> Weight { + (36_835_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_484_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64geu(r: u32, ) -> Weight { + (36_873_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64add(r: u32, ) -> Weight { + (37_013_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_466_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64sub(r: u32, ) -> Weight { + (36_885_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64mul(r: u32, ) -> Weight { + (36_696_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divs(r: u32, ) -> Weight { + (36_924_000 as Weight) + // Standard Error: 16_000 + .saturating_add((3_118_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divu(r: u32, ) -> Weight { + (36_819_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_784_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64rems(r: u32, ) -> Weight { + (36_855_000 as Weight) + // Standard Error: 17_000 + .saturating_add((3_047_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64remu(r: u32, ) -> Weight { + (36_890_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_816_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64and(r: u32, ) -> Weight { + (36_749_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_475_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64or(r: u32, ) -> Weight { + (36_928_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64xor(r: u32, ) -> Weight { + (36_868_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_470_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64shl(r: u32, ) -> Weight { + (36_919_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_470_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shrs(r: u32, ) -> Weight { - (49_228_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) + (36_934_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_471_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (49_279_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) + (36_705_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_492_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (49_091_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_909_000 as Weight).saturating_mul(r as Weight)) + (36_684_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_477_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (49_436_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_883_000 as Weight).saturating_mul(r as Weight)) + (36_844_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_477_000 as Weight).saturating_mul(r as Weight)) } } @@ -986,32 +1003,32 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:0) fn on_initialize() -> Weight { - (1_585_000 as Weight) + (1_636_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 { - (7_902_000 as Weight) + (7_840_000 as Weight) // Standard Error: 0 - .saturating_add((751_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((752_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 { - (31_473_000 as Weight) + (31_915_000 as Weight) // Standard Error: 1_000 - .saturating_add((104_000 as Weight).saturating_mul(q as Weight)) + .saturating_add((98_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 { - (15_462_000 as Weight) - // Standard Error: 35_000 - .saturating_add((81_710_000 as Weight).saturating_mul(c as Weight)) + (18_897_000 as Weight) + // Standard Error: 32_000 + .saturating_add((69_663_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1020,9 +1037,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 { - (169_561_000 as Weight) - // Standard Error: 56_000 - .saturating_add((60_037_000 as Weight).saturating_mul(c as Weight)) + (204_947_000 as Weight) + // Standard Error: 54_000 + .saturating_add((58_293_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -1034,11 +1051,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 { - (169_885_000 as Weight) - // Standard Error: 127_000 - .saturating_add((170_680_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 8_000 - .saturating_add((1_788_000 as Weight).saturating_mul(s as Weight)) + (211_187_000 as Weight) + // Standard Error: 114_000 + .saturating_add((156_529_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 7_000 + .saturating_add((1_830_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } @@ -1049,9 +1066,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn instantiate(s: u32, ) -> Weight { - (150_265_000 as Weight) + (150_485_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_722_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_769_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(5 as Weight)) } @@ -1060,7 +1077,7 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: System Account (r:1 w:1) fn call() -> Weight { - (114_784_000 as Weight) + (117_274_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -1068,9 +1085,9 @@ impl WeightInfo for () { // Storage: Contracts PristineCode (r:0 w:1) // Storage: Contracts OwnerInfoOf (r:0 w:1) fn upload_code(c: u32, ) -> Weight { - (48_072_000 as Weight) - // Standard Error: 36_000 - .saturating_add((83_578_000 as Weight).saturating_mul(c as Weight)) + (51_126_000 as Weight) + // Standard Error: 49_000 + .saturating_add((72_622_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -1078,7 +1095,7 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:0 w:1) // Storage: Contracts PristineCode (r:0 w:1) fn remove_code() -> Weight { - (24_739_000 as Weight) + (24_221_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -1087,9 +1104,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_caller(r: u32, ) -> Weight { - (174_123_000 as Weight) - // Standard Error: 127_000 - .saturating_add((56_078_000 as Weight).saturating_mul(r as Weight)) + (219_790_000 as Weight) + // Standard Error: 126_000 + .saturating_add((56_383_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1098,9 +1115,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_address(r: u32, ) -> Weight { - (180_168_000 as Weight) - // Standard Error: 122_000 - .saturating_add((56_154_000 as Weight).saturating_mul(r as Weight)) + (218_377_000 as Weight) + // Standard Error: 117_000 + .saturating_add((57_243_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1109,9 +1126,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 { - (179_464_000 as Weight) - // Standard Error: 96_000 - .saturating_add((55_350_000 as Weight).saturating_mul(r as Weight)) + (217_999_000 as Weight) + // Standard Error: 104_000 + .saturating_add((56_674_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1120,9 +1137,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_balance(r: u32, ) -> Weight { - (181_031_000 as Weight) - // Standard Error: 154_000 - .saturating_add((149_508_000 as Weight).saturating_mul(r as Weight)) + (226_932_000 as Weight) + // Standard Error: 155_000 + .saturating_add((147_401_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1131,9 +1148,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 { - (178_709_000 as Weight) - // Standard Error: 107_000 - .saturating_add((56_326_000 as Weight).saturating_mul(r as Weight)) + (233_107_000 as Weight) + // Standard Error: 110_000 + .saturating_add((55_334_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1142,9 +1159,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 { - (175_715_000 as Weight) - // Standard Error: 116_000 - .saturating_add((56_755_000 as Weight).saturating_mul(r as Weight)) + (235_364_000 as Weight) + // Standard Error: 122_000 + .saturating_add((54_700_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1153,9 +1170,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 { - (178_552_000 as Weight) - // Standard Error: 121_000 - .saturating_add((55_756_000 as Weight).saturating_mul(r as Weight)) + (232_875_000 as Weight) + // Standard Error: 108_000 + .saturating_add((54_510_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1164,9 +1181,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_now(r: u32, ) -> Weight { - (186_172_000 as Weight) - // Standard Error: 106_000 - .saturating_add((55_311_000 as Weight).saturating_mul(r as Weight)) + (226_089_000 as Weight) + // Standard Error: 126_000 + .saturating_add((54_899_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1176,9 +1193,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 { - (183_750_000 as Weight) - // Standard Error: 140_000 - .saturating_add((131_877_000 as Weight).saturating_mul(r as Weight)) + (234_746_000 as Weight) + // Standard Error: 146_000 + .saturating_add((132_861_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1187,9 +1204,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_gas(r: u32, ) -> Weight { - (97_350_000 as Weight) - // Standard Error: 54_000 - .saturating_add((27_606_000 as Weight).saturating_mul(r as Weight)) + (96_247_000 as Weight) + // Standard Error: 70_000 + .saturating_add((27_918_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1198,9 +1215,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_input(r: u32, ) -> Weight { - (179_058_000 as Weight) - // Standard Error: 106_000 - .saturating_add((53_258_000 as Weight).saturating_mul(r as Weight)) + (221_631_000 as Weight) + // Standard Error: 139_000 + .saturating_add((54_382_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1209,9 +1226,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 { - (248_562_000 as Weight) - // Standard Error: 5_000 - .saturating_add((10_515_000 as Weight).saturating_mul(n as Weight)) + (306_449_000 as Weight) + // Standard Error: 3_000 + .saturating_add((11_919_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1220,9 +1237,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_return(r: u32, ) -> Weight { - (161_228_000 as Weight) - // Standard Error: 90_000 - .saturating_add((14_539_000 as Weight).saturating_mul(r as Weight)) + (222_176_000 as Weight) + // Standard Error: 72_000 + .saturating_add((3_223_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1231,9 +1248,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 { - (177_866_000 as Weight) + (211_079_000 as Weight) // Standard Error: 0 - .saturating_add((188_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((237_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1244,9 +1261,9 @@ impl WeightInfo for () { // Storage: Contracts DeletionQueue (r:1 w:1) // Storage: Contracts OwnerInfoOf (r:1 w:1) fn seal_terminate(r: u32, ) -> Weight { - (164_572_000 as Weight) - // Standard Error: 1_817_000 - .saturating_add((68_480_000 as Weight).saturating_mul(r as Weight)) + (213_994_000 as Weight) + // Standard Error: 104_000 + .saturating_add((64_453_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)) @@ -1258,9 +1275,9 @@ impl WeightInfo for () { // Storage: Timestamp Now (r:1 w:0) // Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) fn seal_random(r: u32, ) -> Weight { - (168_658_000 as Weight) - // Standard Error: 189_000 - .saturating_add((166_190_000 as Weight).saturating_mul(r as Weight)) + (228_281_000 as Weight) + // Standard Error: 150_000 + .saturating_add((166_949_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1269,9 +1286,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 { - (185_391_000 as Weight) - // Standard Error: 191_000 - .saturating_add((292_609_000 as Weight).saturating_mul(r as Weight)) + (230_348_000 as Weight) + // Standard Error: 163_000 + .saturating_add((288_679_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1281,11 +1298,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 { - (507_994_000 as Weight) - // Standard Error: 1_569_000 - .saturating_add((276_852_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 309_000 - .saturating_add((79_461_000 as Weight).saturating_mul(n as Weight)) + (601_613_000 as Weight) + // Standard Error: 1_566_000 + .saturating_add((279_038_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 308_000 + .saturating_add((84_818_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)) @@ -1296,79 +1313,95 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_debug_message(r: u32, ) -> Weight { - (99_048_000 as Weight) - // Standard Error: 87_000 - .saturating_add((46_088_000 as Weight).saturating_mul(r as Weight)) + (113_578_000 as Weight) + // Standard Error: 67_000 + .saturating_add((44_899_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 { - (142_559_000 as Weight) - // Standard Error: 603_000 - .saturating_add((269_723_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + (59_019_000 as Weight) + // Standard Error: 995_000 + .saturating_add((414_759_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(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } - // Storage: System Account (r:2 w:2) - // Storage: Contracts ContractInfoOf (r:1 w:1) - // Storage: Contracts CodeStorage (r:1 w:0) - // Storage: Timestamp Now (r:1 w:0) - // Storage: unknown [0x7afa01283080ef247df84e0ba38ea5a587d25ce6633a6bfbba02068c14023441] (r:1 w:1) - fn seal_set_storage_per_kb(n: u32, ) -> Weight { - (346_704_000 as Weight) - // Standard Error: 200_000 - .saturating_add((29_907_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { + (620_483_000 as Weight) + // Standard Error: 242_000 + .saturating_add((30_945_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 { + (632_391_000 as Weight) + // Standard Error: 317_000 + .saturating_add((11_431_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 { - (0 as Weight) - // Standard Error: 1_963_000 - .saturating_add((746_581_000 as Weight).saturating_mul(r as Weight)) + (96_628_000 as Weight) + // Standard Error: 878_000 + .saturating_add((387_212_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)) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } // Storage: Skipped Metadata (r:0 w:0) + fn seal_clear_storage_per_kb(n: u32, ) -> Weight { + (625_960_000 as Weight) + // Standard Error: 270_000 + .saturating_add((11_170_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 { - (69_873_000 as Weight) - // Standard Error: 722_000 - .saturating_add((338_292_000 as Weight).saturating_mul(r as Weight)) + (115_155_000 as Weight) + // Standard Error: 741_000 + .saturating_add((331_711_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 { + (582_560_000 as Weight) + // Standard Error: 360_000 + .saturating_add((68_427_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 { - (0 as Weight) - // Standard Error: 1_169_000 - .saturating_add((480_500_000 as Weight).saturating_mul(r as Weight)) + (130_096_000 as Weight) + // Standard Error: 555_000 + .saturating_add((294_514_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: 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) - // Storage: unknown [0x7afa01283080ef247df84e0ba38ea5a587d25ce6633a6bfbba02068c14023441] (r:1 w:0) - fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (327_625_000 as Weight) - // Standard Error: 146_000 - .saturating_add((55_028_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + // Storage: Skipped Metadata (r:0 w:0) + fn seal_contains_storage_per_kb(n: u32, ) -> Weight { + (528_701_000 as Weight) + // Standard Error: 246_000 + .saturating_add((10_375_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 { - (41_931_000 as Weight) - // Standard Error: 933_000 - .saturating_add((433_619_000 as Weight).saturating_mul(r as Weight)) + (95_349_000 as Weight) + // Standard Error: 906_000 + .saturating_add((430_051_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)) @@ -1376,9 +1409,9 @@ impl WeightInfo for () { } // Storage: Skipped Metadata (r:0 w:0) fn seal_take_storage_per_kb(n: u32, ) -> Weight { - (639_259_000 as Weight) - // Standard Error: 365_000 - .saturating_add((64_588_000 as Weight).saturating_mul(n as Weight)) + (676_606_000 as Weight) + // Standard Error: 389_000 + .saturating_add((70_517_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(105 as Weight)) .saturating_add(RocksDbWeight::get().writes(103 as Weight)) } @@ -1387,9 +1420,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_transfer(r: u32, ) -> Weight { - (71_335_000 as Weight) - // Standard Error: 1_489_000 - .saturating_add((1_765_321_000 as Weight).saturating_mul(r as Weight)) + (131_194_000 as Weight) + // Standard Error: 1_256_000 + .saturating_add((1_772_590_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)) @@ -1400,9 +1433,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_call(r: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 9_243_000 - .saturating_add((16_121_990_000 as Weight).saturating_mul(r as Weight)) + (2_463_174_000 as Weight) + // Standard Error: 19_404_000 + .saturating_add((19_548_986_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)) @@ -1413,13 +1446,13 @@ impl WeightInfo for () { // 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 { - (15_978_164_000 as Weight) - // Standard Error: 57_271_000 - .saturating_add((1_179_479_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 20_000 - .saturating_add((17_389_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 21_000 - .saturating_add((28_660_000 as Weight).saturating_mul(o as Weight)) + (21_356_548_000 as Weight) + // Standard Error: 31_719_000 + .saturating_add((1_874_230_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 11_000 + .saturating_add((23_243_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 12_000 + .saturating_add((34_825_000 as Weight).saturating_mul(o 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)) @@ -1433,8 +1466,8 @@ impl WeightInfo for () { // Storage: Contracts OwnerInfoOf (r:100 w:100) fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 115_056_000 - .saturating_add((23_312_565_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 49_981_000 + .saturating_add((28_988_348_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)) @@ -1447,13 +1480,13 @@ impl WeightInfo for () { // 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 { - (18_724_034_000 as Weight) - // Standard Error: 66_000 - .saturating_add((18_363_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 66_000 - .saturating_add((29_093_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 66_000 - .saturating_add((158_645_000 as Weight).saturating_mul(s as Weight)) + (24_726_887_000 as Weight) + // Standard Error: 32_000 + .saturating_add((23_702_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 32_000 + .saturating_add((35_841_000 as Weight).saturating_mul(o as Weight)) + // Standard Error: 32_000 + .saturating_add((161_159_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(208 as Weight)) .saturating_add(RocksDbWeight::get().writes(206 as Weight)) } @@ -1462,9 +1495,9 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_hash_sha2_256(r: u32, ) -> Weight { - (179_769_000 as Weight) - // Standard Error: 121_000 - .saturating_add((80_706_000 as Weight).saturating_mul(r as Weight)) + (221_804_000 as Weight) + // Standard Error: 150_000 + .saturating_add((84_131_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1473,9 +1506,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 { - (279_632_000 as Weight) - // Standard Error: 17_000 - .saturating_add((372_618_000 as Weight).saturating_mul(n as Weight)) + (357_186_000 as Weight) + // Standard Error: 23_000 + .saturating_add((469_081_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1484,9 +1517,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 { - (182_040_000 as Weight) - // Standard Error: 119_000 - .saturating_add((88_916_000 as Weight).saturating_mul(r as Weight)) + (220_729_000 as Weight) + // Standard Error: 166_000 + .saturating_add((101_538_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1495,9 +1528,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 { - (253_225_000 as Weight) - // Standard Error: 16_000 - .saturating_add((247_883_000 as Weight).saturating_mul(n as Weight)) + (272_756_000 as Weight) + // Standard Error: 18_000 + .saturating_add((311_130_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1506,9 +1539,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 { - (179_945_000 as Weight) - // Standard Error: 96_000 - .saturating_add((68_362_000 as Weight).saturating_mul(r as Weight)) + (215_784_000 as Weight) + // Standard Error: 150_000 + .saturating_add((68_809_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1517,9 +1550,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 { - (191_286_000 as Weight) - // Standard Error: 38_000 - .saturating_add((121_358_000 as Weight).saturating_mul(n as Weight)) + (256_009_000 as Weight) + // Standard Error: 12_000 + .saturating_add((124_552_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1528,9 +1561,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 { - (179_381_000 as Weight) - // Standard Error: 101_000 - .saturating_add((68_158_000 as Weight).saturating_mul(r as Weight)) + (216_413_000 as Weight) + // Standard Error: 134_000 + .saturating_add((68_281_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1539,9 +1572,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 { - (135_478_000 as Weight) - // Standard Error: 41_000 - .saturating_add((121_422_000 as Weight).saturating_mul(n as Weight)) + (254_477_000 as Weight) + // Standard Error: 13_000 + .saturating_add((124_483_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -1550,265 +1583,265 @@ impl WeightInfo for () { // Storage: Contracts CodeStorage (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) fn seal_ecdsa_recover(r: u32, ) -> Weight { - (123_468_000 as Weight) - // Standard Error: 1_017_000 - .saturating_add((15_542_677_000 as Weight).saturating_mul(r as Weight)) + (179_001_000 as Weight) + // Standard Error: 1_674_000 + .saturating_add((15_397_995_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn instr_i64const(r: u32, ) -> Weight { - (52_702_000 as Weight) + (46_905_000 as Weight) // Standard Error: 12_000 - .saturating_add((844_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((794_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (47_295_000 as Weight) - // Standard Error: 10_000 - .saturating_add((3_045_000 as Weight).saturating_mul(r as Weight)) + (53_636_000 as Weight) + // Standard Error: 12_000 + .saturating_add((2_476_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (46_353_000 as Weight) - // Standard Error: 9_000 - .saturating_add((3_047_000 as Weight).saturating_mul(r as Weight)) + (53_199_000 as Weight) + // Standard Error: 12_000 + .saturating_add((2_547_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (49_811_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_408_000 as Weight).saturating_mul(r as Weight)) + (37_268_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_987_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (47_054_000 as Weight) - // Standard Error: 12_000 - .saturating_add((2_504_000 as Weight).saturating_mul(r as Weight)) + (37_138_000 as Weight) + // Standard Error: 16_000 + .saturating_add((3_057_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (49_912_000 as Weight) - // Standard Error: 16_000 - .saturating_add((1_460_000 as Weight).saturating_mul(r as Weight)) + (39_353_000 as Weight) + // Standard Error: 17_000 + .saturating_add((1_939_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (43_860_000 as Weight) + (38_883_000 as Weight) // Standard Error: 17_000 - .saturating_add((2_150_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((2_495_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (37_009_000 as Weight) - // Standard Error: 16_000 - .saturating_add((2_762_000 as Weight).saturating_mul(r as Weight)) + (45_030_000 as Weight) + // Standard Error: 21_000 + .saturating_add((2_398_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (45_776_000 as Weight) + (47_281_000 as Weight) // Standard Error: 3_000 - .saturating_add((17_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((29_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (39_611_000 as Weight) - // Standard Error: 17_000 - .saturating_add((20_805_000 as Weight).saturating_mul(r as Weight)) + (49_074_000 as Weight) + // Standard Error: 20_000 + .saturating_add((19_991_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (45_523_000 as Weight) - // Standard Error: 27_000 - .saturating_add((31_622_000 as Weight).saturating_mul(r as Weight)) + (50_071_000 as Weight) + // Standard Error: 29_000 + .saturating_add((30_156_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (79_764_000 as Weight) - // Standard Error: 6_000 - .saturating_add((1_198_000 as Weight).saturating_mul(p as Weight)) + (84_902_000 as Weight) + // Standard Error: 5_000 + .saturating_add((1_124_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (46_510_000 as Weight) - // Standard Error: 11_000 - .saturating_add((810_000 as Weight).saturating_mul(r as Weight)) + (39_054_000 as Weight) + // Standard Error: 14_000 + .saturating_add((1_352_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (46_567_000 as Weight) - // Standard Error: 11_000 - .saturating_add((833_000 as Weight).saturating_mul(r as Weight)) + (39_190_000 as Weight) + // Standard Error: 14_000 + .saturating_add((1_370_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (43_439_000 as Weight) - // Standard Error: 10_000 - .saturating_add((1_463_000 as Weight).saturating_mul(r as Weight)) + (41_830_000 as Weight) + // Standard Error: 13_000 + .saturating_add((1_878_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (46_201_000 as Weight) - // Standard Error: 19_000 - .saturating_add((1_635_000 as Weight).saturating_mul(r as Weight)) + (40_764_000 as Weight) + // Standard Error: 13_000 + .saturating_add((1_931_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (42_639_000 as Weight) - // Standard Error: 18_000 - .saturating_add((1_652_000 as Weight).saturating_mul(r as Weight)) + (46_309_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_745_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (51_159_000 as Weight) - // Standard Error: 14_000 - .saturating_add((917_000 as Weight).saturating_mul(r as Weight)) + (47_071_000 as Weight) + // Standard Error: 12_000 + .saturating_add((797_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (36_462_000 as Weight) - // Standard Error: 867_000 - .saturating_add((187_724_000 as Weight).saturating_mul(r as Weight)) + (49_773_000 as Weight) + // Standard Error: 1_442_000 + .saturating_add((227_666_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (53_776_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_307_000 as Weight).saturating_mul(r as Weight)) + (43_879_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_486_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (53_674_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_304_000 as Weight).saturating_mul(r as Weight)) + (43_883_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_484_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (53_654_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_299_000 as Weight).saturating_mul(r as Weight)) + (43_415_000 as Weight) + // Standard Error: 11_000 + .saturating_add((1_495_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (53_493_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_299_000 as Weight).saturating_mul(r as Weight)) + (43_567_000 as Weight) + // Standard Error: 11_000 + .saturating_add((1_493_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (43_373_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_492_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64extendui32(r: u32, ) -> Weight { - (43_222_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_498_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i32wrapi64(r: u32, ) -> Weight { - (53_706_000 as Weight) - // Standard Error: 9_000 - .saturating_add((1_292_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64eq(r: u32, ) -> Weight { - (48_994_000 as Weight) - // Standard Error: 10_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ne(r: u32, ) -> Weight { - (49_464_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_876_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64lts(r: u32, ) -> Weight { - (49_194_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_884_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (49_291_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_883_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gts(r: u32, ) -> Weight { - (49_227_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_886_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gtu(r: u32, ) -> Weight { - (49_219_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_885_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64les(r: u32, ) -> Weight { - (49_263_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64leu(r: u32, ) -> Weight { - (49_251_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ges(r: u32, ) -> Weight { - (49_257_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64geu(r: u32, ) -> Weight { - (49_219_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_885_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64add(r: u32, ) -> Weight { - (49_221_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64sub(r: u32, ) -> Weight { - (48_936_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64mul(r: u32, ) -> Weight { - (49_266_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divs(r: u32, ) -> Weight { - (49_246_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_565_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divu(r: u32, ) -> Weight { - (49_181_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_211_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64rems(r: u32, ) -> Weight { - (49_337_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_525_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64remu(r: u32, ) -> Weight { - (49_387_000 as Weight) - // Standard Error: 11_000 - .saturating_add((2_241_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64and(r: u32, ) -> Weight { - (49_137_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64or(r: u32, ) -> Weight { - (49_366_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_882_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64xor(r: u32, ) -> Weight { - (49_143_000 as Weight) - // Standard Error: 11_000 + (41_332_000 as Weight) + // Standard Error: 12_000 .saturating_add((1_912_000 as Weight).saturating_mul(r as Weight)) } - fn instr_i64shl(r: u32, ) -> Weight { - (49_195_000 as Weight) + fn instr_i64extendui32(r: u32, ) -> Weight { + (41_331_000 as Weight) + // Standard Error: 12_000 + .saturating_add((1_911_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i32wrapi64(r: u32, ) -> Weight { + (43_704_000 as Weight) // Standard Error: 11_000 - .saturating_add((1_891_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64eq(r: u32, ) -> Weight { + (37_103_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_467_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ne(r: u32, ) -> Weight { + (36_680_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64lts(r: u32, ) -> Weight { + (36_659_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_494_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ltu(r: u32, ) -> Weight { + (36_491_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_495_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gts(r: u32, ) -> Weight { + (36_440_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_499_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gtu(r: u32, ) -> Weight { + (36_477_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_500_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64les(r: u32, ) -> Weight { + (36_561_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_498_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64leu(r: u32, ) -> Weight { + (36_418_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_501_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ges(r: u32, ) -> Weight { + (36_835_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_484_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64geu(r: u32, ) -> Weight { + (36_873_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64add(r: u32, ) -> Weight { + (37_013_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_466_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64sub(r: u32, ) -> Weight { + (36_885_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64mul(r: u32, ) -> Weight { + (36_696_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_487_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divs(r: u32, ) -> Weight { + (36_924_000 as Weight) + // Standard Error: 16_000 + .saturating_add((3_118_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divu(r: u32, ) -> Weight { + (36_819_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_784_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64rems(r: u32, ) -> Weight { + (36_855_000 as Weight) + // Standard Error: 17_000 + .saturating_add((3_047_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64remu(r: u32, ) -> Weight { + (36_890_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_816_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64and(r: u32, ) -> Weight { + (36_749_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_475_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64or(r: u32, ) -> Weight { + (36_928_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_469_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64xor(r: u32, ) -> Weight { + (36_868_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_470_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64shl(r: u32, ) -> Weight { + (36_919_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_470_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shrs(r: u32, ) -> Weight { - (49_228_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_900_000 as Weight).saturating_mul(r as Weight)) + (36_934_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_471_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (49_279_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_888_000 as Weight).saturating_mul(r as Weight)) + (36_705_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_492_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (49_091_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_909_000 as Weight).saturating_mul(r as Weight)) + (36_684_000 as Weight) + // Standard Error: 16_000 + .saturating_add((2_477_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (49_436_000 as Weight) - // Standard Error: 11_000 - .saturating_add((1_883_000 as Weight).saturating_mul(r as Weight)) + (36_844_000 as Weight) + // Standard Error: 17_000 + .saturating_add((2_477_000 as Weight).saturating_mul(r as Weight)) } }