From 0c017fd3f7222b8a743fce659c38f2bdc1d783cf Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 5 Dec 2025 19:42:33 +0100 Subject: [PATCH 01/19] prototype new state_load storage host fn --- substrate/frame/revive/src/benchmarking.rs | 81 +++++++++++-- substrate/frame/revive/src/exec.rs | 12 +- substrate/frame/revive/src/exec/tests.rs | 12 +- substrate/frame/revive/src/lib.rs | 13 +- .../revive/src/precompiles/builtin/storage.rs | 32 ++--- substrate/frame/revive/src/primitives.rs | 4 +- substrate/frame/revive/src/storage.rs | 65 ++++++---- .../frame/revive/src/transient_storage.rs | 70 +++++------ .../revive/src/vm/evm/instructions/host.rs | 55 ++++----- substrate/frame/revive/src/vm/pvm.rs | 48 ++++---- .../frame/revive/src/vm/runtime_costs.rs | 47 ++++++-- substrate/frame/revive/src/weights.rs | 40 ++++--- substrate/frame/support/src/storage/child.rs | 11 ++ substrate/primitives/externalities/src/lib.rs | 33 +++++ substrate/primitives/io/src/lib.rs | 113 ++++++++++++++++++ .../primitives/state-machine/src/basic.rs | 14 +++ substrate/primitives/state-machine/src/ext.rs | 47 ++++++++ 17 files changed, 516 insertions(+), 181 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 46ff22907aac6..92d8fea557332 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1407,10 +1407,12 @@ mod benchmarks { // n: new byte size // o: old byte size + // c: is_cold (0 = hot, 1 = cold) #[benchmark(skip_meta, pov_mode = Measured)] fn seal_set_storage( n: Linear<0, { limits::STORAGE_BYTES }>, o: Linear<0, { limits::STORAGE_BYTES }>, + c: Linear<0, 1>, ) -> Result<(), BenchmarkError> { let max_key_len = limits::STORAGE_KEY_BYTES; let key = Key::try_from_var(vec![0u8; max_key_len as usize]) @@ -1423,6 +1425,18 @@ mod benchmarks { info.write(&key, Some(vec![42u8; o as usize]), None, false) .map_err(|_| "Failed to write to storage during setup.")?; + // Warm up storage if c=0 (hot) + if c == 0 { + let _ = runtime.bench_set_storage( + memory.as_mut_slice(), + StorageFlags::empty().bits(), + 0, // key_ptr + max_key_len, // key_len + max_key_len, // value_ptr + n, // value_len + ); + } + let result; #[block] { @@ -1442,7 +1456,10 @@ mod benchmarks { } #[benchmark(skip_meta, pov_mode = Measured)] - fn clear_storage(n: Linear<0, { limits::STORAGE_BYTES }>) -> Result<(), BenchmarkError> { + fn clear_storage( + n: Linear<0, { limits::STORAGE_BYTES }>, + c: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { let max_key_len = limits::STORAGE_KEY_BYTES; let key = Key::try_from_var(vec![0u8; max_key_len as usize]) .map_err(|_| "Key has wrong length")?; @@ -1459,23 +1476,32 @@ mod benchmarks { ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) .map_err(|_| "Failed to write to storage during setup.")?; + // Warm up storage if c=0 (hot) + if c == 0 { + let _ = ext.get_storage(&key); + } + let result; #[block] { result = run_builtin_precompile( &mut ext, H160(BenchmarkStorage::::MATCHER.base_address()).as_fixed_bytes(), - input_bytes, + input_bytes.clone(), ); } assert_ok!(result); - assert!(ext.get_storage(&key).is_none()); + assert!(ext.get_storage(&key).data.is_none()); Ok(()) } + // c: is_cold (0 = hot, 1 = cold) #[benchmark(skip_meta, pov_mode = Measured)] - fn seal_get_storage(n: Linear<0, { limits::STORAGE_BYTES }>) -> Result<(), BenchmarkError> { + fn seal_get_storage( + n: Linear<0, { limits::STORAGE_BYTES }>, + c: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { let max_key_len = limits::STORAGE_KEY_BYTES; let key = Key::try_from_var(vec![0u8; max_key_len as usize]) .map_err(|_| "Key has wrong length")?; @@ -1486,6 +1512,19 @@ mod benchmarks { .map_err(|_| "Failed to write to storage during setup.")?; let out_ptr = max_key_len + 4; + + // Warm up storage if c=0 (hot) + if c == 0 { + let _ = runtime.bench_get_storage( + memory.as_mut_slice(), + StorageFlags::empty().bits(), + 0, // key_ptr + max_key_len, // key_len + out_ptr, // out_ptr + max_key_len, // out_len_ptr + ); + } + let result; #[block] { @@ -1504,8 +1543,12 @@ mod benchmarks { Ok(()) } + // c: is_cold (0 = hot, 1 = cold) #[benchmark(skip_meta, pov_mode = Measured)] - fn contains_storage(n: Linear<0, { limits::STORAGE_BYTES }>) -> Result<(), BenchmarkError> { + fn contains_storage( + n: Linear<0, { limits::STORAGE_BYTES }>, + c: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { let max_key_len = limits::STORAGE_KEY_BYTES; let key = Key::try_from_var(vec![0u8; max_key_len as usize]) .map_err(|_| "Key has wrong length")?; @@ -1521,23 +1564,32 @@ mod benchmarks { ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) .map_err(|_| "Failed to write to storage during setup.")?; + // Warm up storage if c=0 (hot) + if c == 0 { + let _ = ext.get_storage(&key); + } + let result; #[block] { result = run_builtin_precompile( &mut ext, H160(BenchmarkStorage::::MATCHER.base_address()).as_fixed_bytes(), - input_bytes, + input_bytes.clone(), ); } assert_ok!(result); - assert!(ext.get_storage(&key).is_some()); + assert!(ext.get_storage(&key).data.is_some()); Ok(()) } + // c: is_cold (0 = hot, 1 = cold) #[benchmark(skip_meta, pov_mode = Measured)] - fn take_storage(n: Linear<0, { limits::STORAGE_BYTES }>) -> Result<(), BenchmarkError> { + fn take_storage( + n: Linear<0, { limits::STORAGE_BYTES }>, + c: Linear<0, 1>, + ) -> Result<(), BenchmarkError> { let max_key_len = limits::STORAGE_KEY_BYTES; let key = Key::try_from_var(vec![3u8; max_key_len as usize]) .map_err(|_| "Key has wrong length")?; @@ -1554,17 +1606,22 @@ mod benchmarks { ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) .map_err(|_| "Failed to write to storage during setup.")?; + // Warm up storage if c=0 (hot) + if c == 0 { + let _ = ext.get_storage(&key); + } + let result; #[block] { result = run_builtin_precompile( &mut ext, H160(BenchmarkStorage::::MATCHER.base_address()).as_fixed_bytes(), - input_bytes, + input_bytes.clone(), ); } assert_ok!(result); - assert!(ext.get_storage(&key).is_none()); + assert!(ext.get_storage(&key).data.is_none()); Ok(()) } @@ -1590,7 +1647,7 @@ mod benchmarks { result = runtime.ext().set_transient_storage(&key, value, false); } - assert_eq!(result, Ok(WriteOutcome::New)); + assert_eq!(result, Ok(WriteOutcome::New { is_cold: false })); assert_eq!(runtime.ext().get_transient_storage(&key), Some(vec![42u8; max_value_len as _])); Ok(()) } @@ -1613,7 +1670,7 @@ mod benchmarks { result = runtime.ext().set_transient_storage(&key, value, false); } - assert_eq!(result, Ok(WriteOutcome::New)); + assert_eq!(result, Ok(WriteOutcome::New { is_cold: false })); assert_eq!(runtime.ext().get_transient_storage(&key), Some(vec![42u8; max_value_len as _])); Ok(()) } diff --git a/substrate/frame/revive/src/exec.rs b/substrate/frame/revive/src/exec.rs index 53613a393ba99..46aca8768238d 100644 --- a/substrate/frame/revive/src/exec.rs +++ b/substrate/frame/revive/src/exec.rs @@ -527,9 +527,9 @@ pub trait PrecompileExt: sealing::Sealed { /// Returns the storage entry of the executing account by the given `key`. /// - /// Returns `None` if the `key` wasn't previously set by `set_storage` or - /// was deleted. - fn get_storage(&mut self, key: &Key) -> Option>; + /// Returns a `StateLoad` containing the value (or `None` if the key wasn't previously set + /// or was deleted) and whether it was a cold or hot load. + fn get_storage(&mut self, key: &Key) -> sp_io::StateLoad>>; /// Returns `Some(len)` (in bytes) if a storage item exists at `key`. /// @@ -544,7 +544,7 @@ pub trait PrecompileExt: sealing::Sealed { key: &Key, value: Option>, take_old: bool, - ) -> Result; + ) -> Result, DispatchError>; /// Charges `diff` from the meter. fn charge_storage(&mut self, diff: &Diff) -> DispatchResult; @@ -2461,7 +2461,7 @@ where frame.frame_meter.eth_gas_left().unwrap_or_default().saturated_into::() } - fn get_storage(&mut self, key: &Key) -> Option> { + fn get_storage(&mut self, key: &Key) -> sp_io::StateLoad>> { assert!(self.has_contract_info()); self.top_frame_mut().contract_info().read(key) } @@ -2476,7 +2476,7 @@ where key: &Key, value: Option>, take_old: bool, - ) -> Result { + ) -> Result, DispatchError> { assert!(self.has_contract_info()); let frame = self.top_frame_mut(); frame.contract_info.get(&frame.account_id).write( diff --git a/substrate/frame/revive/src/exec/tests.rs b/substrate/frame/revive/src/exec/tests.rs index 90e2f6e7b0420..2d9d9fcac8334 100644 --- a/substrate/frame/revive/src/exec/tests.rs +++ b/substrate/frame/revive/src/exec/tests.rs @@ -1952,9 +1952,9 @@ fn get_storage_works() { ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false), Ok(WriteOutcome::New) ); - assert_eq!(ctx.ext.get_storage(&Key::Fix([1; 32])), Some(vec![1, 2, 3])); - assert_eq!(ctx.ext.get_storage(&Key::Fix([2; 32])), Some(vec![])); - assert_eq!(ctx.ext.get_storage(&Key::Fix([3; 32])), None); + assert_eq!(ctx.ext.get_storage(&Key::Fix([1; 32])).data, Some(vec![1, 2, 3])); + assert_eq!(ctx.ext.get_storage(&Key::Fix([2; 32])).data, Some(vec![])); + assert_eq!(ctx.ext.get_storage(&Key::Fix([3; 32])).data, None); exec_success() }); @@ -2034,14 +2034,14 @@ fn get_storage_varsized_key_works() { Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.get_storage(&Key::try_from_var([1; 19].to_vec()).unwrap()), + ctx.ext.get_storage(&Key::try_from_var([1; 19].to_vec()).unwrap()).data, Some(vec![1, 2, 3]) ); assert_eq!( - ctx.ext.get_storage(&Key::try_from_var([2; 16].to_vec()).unwrap()), + ctx.ext.get_storage(&Key::try_from_var([2; 16].to_vec()).unwrap()).data, Some(vec![]) ); - assert_eq!(ctx.ext.get_storage(&Key::try_from_var([3; 8].to_vec()).unwrap()), None); + assert_eq!(ctx.ext.get_storage(&Key::try_from_var([3; 8].to_vec()).unwrap()).data, None); exec_success() }); diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs index b47caf6f98aff..b8b305ce26c9a 100644 --- a/substrate/frame/revive/src/lib.rs +++ b/substrate/frame/revive/src/lib.rs @@ -1049,6 +1049,7 @@ pub mod pallet { &>::weight(&RuntimeCosts::SetStorage { new_bytes: limits::STORAGE_BYTES, old_bytes: 0, + is_cold: true, }) .saturating_mul(u64::from(limits::STORAGE_BYTES).saturating_add(max_key_size)), ) @@ -2650,7 +2651,7 @@ sp_api::decl_runtime_apis! { fn get_storage( address: H160, key: [u8; 32], - ) -> GetStorageResult; + ) -> GetStorageResult>>; /// Query a given variable-sized storage key in a given contract. /// @@ -2660,7 +2661,7 @@ sp_api::decl_runtime_apis! { fn get_storage_var_key( address: H160, key: Vec, - ) -> GetStorageResult; + ) -> GetStorageResult>>; /// Traces the execution of an entire block and returns call traces. /// @@ -2885,12 +2886,12 @@ macro_rules! impl_runtime_apis_plus_revive_traits { fn get_storage_var_key( address: $crate::H160, key: Vec, - ) -> $crate::GetStorageResult { - $crate::Pallet::::get_storage_var_key(address, key) + ) -> $crate::GetStorageResult>> { + $crate::Pallet::::get_storage_var_key(address, key).map(|s| s.data) } - fn get_storage(address: $crate::H160, key: [u8; 32]) -> $crate::GetStorageResult { - $crate::Pallet::::get_storage(address, key) + fn get_storage(address: $crate::H160, key: [u8; 32]) -> $crate::GetStorageResult>> { + $crate::Pallet::::get_storage(address, key).map(|s| s.data) } fn trace_block( diff --git a/substrate/frame/revive/src/precompiles/builtin/storage.rs b/substrate/frame/revive/src/precompiles/builtin/storage.rs index 6049fcdcec0c8..d09bf602f9ea2 100644 --- a/substrate/frame/revive/src/precompiles/builtin/storage.rs +++ b/substrate/frame/revive/src/precompiles/builtin/storage.rs @@ -61,26 +61,28 @@ impl BuiltinPrecompile for Storage { IStorageCalls::clearStorage(IStorage::clearStorageCall { flags, key, isFixedKey }) => { let transient = is_transient(*flags) .map_err(|_| Error::Revert("invalid storage flag".into()))?; - let costs = |len| { + let costs = |len, is_cold: bool| { if transient { RuntimeCosts::ClearTransientStorage(len) } else { - RuntimeCosts::ClearStorage(len) + RuntimeCosts::ClearStorage { len, is_cold } } }; - let charged = env.frame_meter_mut().charge_weight_token(costs(max_size))?; + let charged = env.frame_meter_mut().charge_weight_token(costs(max_size, true))?; let key = decode_key(key.as_bytes_ref(), *isFixedKey) .map_err(|_| Error::Revert("failed decoding key".into()))?; let outcome = if transient { env.set_transient_storage(&key, None, false) + .map(|data| sp_io::StateLoad { data, is_cold: false }) .map_err(|_| Error::Revert("failed setting transient storage".into()))? } else { env.set_storage(&key, None, false) .map_err(|_| Error::Revert("failed setting storage".into()))? }; - let contained_key = outcome != WriteOutcome::New; - let ret = (contained_key, outcome.old_len()); - env.frame_meter_mut().adjust_weight(charged, costs(outcome.old_len())); + let contained_key = !matches!(outcome.data, WriteOutcome::New { .. }); + let ret = (contained_key, outcome.data.old_len()); + env.frame_meter_mut() + .adjust_weight(charged, costs(outcome.data.old_len(), outcome.is_cold)); Ok(ret.abi_encode()) }, IStorageCalls::containsStorage(IStorage::containsStorageCall { @@ -94,7 +96,7 @@ impl BuiltinPrecompile for Storage { if transient { RuntimeCosts::ContainsTransientStorage(len) } else { - RuntimeCosts::ContainsStorage(len) + RuntimeCosts::ContainsStorage { len, is_cold: false } } }; let charged = env.frame_meter_mut().charge_weight_token(costs(max_size))?; @@ -113,27 +115,29 @@ impl BuiltinPrecompile for Storage { IStorageCalls::takeStorage(IStorage::takeStorageCall { flags, key, isFixedKey }) => { let transient = is_transient(*flags) .map_err(|_| Error::Revert("invalid storage flag".into()))?; - let costs = |len| { + let costs = |len, is_cold: bool| { if transient { RuntimeCosts::TakeTransientStorage(len) } else { - RuntimeCosts::TakeStorage(len) + RuntimeCosts::TakeStorage { len, is_cold } } }; - let charged = env.frame_meter_mut().charge_weight_token(costs(max_size))?; + let charged = env.frame_meter_mut().charge_weight_token(costs(max_size, true))?; let key = decode_key(key.as_bytes_ref(), *isFixedKey) .map_err(|_| Error::Revert("failed decoding key".into()))?; let outcome = if transient { - env.set_transient_storage(&key, None, true)? + env.set_transient_storage(&key, None, true) + .map(|data| sp_io::StateLoad { data, is_cold: false })? } else { env.set_storage(&key, None, true)? }; - if let crate::storage::WriteOutcome::Taken(value) = outcome { - env.frame_meter_mut().adjust_weight(charged, costs(value.len() as u32)); + if let crate::storage::WriteOutcome::Taken { value, .. } = outcome.data { + env.frame_meter_mut() + .adjust_weight(charged, costs(value.len() as u32, outcome.is_cold)); Ok(value.abi_encode()) } else { - env.frame_meter_mut().adjust_weight(charged, costs(0)); + env.frame_meter_mut().adjust_weight(charged, costs(0, outcome.is_cold)); Ok(Vec::::new().abi_encode()) } }, diff --git a/substrate/frame/revive/src/primitives.rs b/substrate/frame/revive/src/primitives.rs index c5154d7055aea..b1370ff1b7205 100644 --- a/substrate/frame/revive/src/primitives.rs +++ b/substrate/frame/revive/src/primitives.rs @@ -183,10 +183,10 @@ impl BalanceWithDust { pub type CodeUploadResult = Result, DispatchError>; /// Result type of a `get_storage` call. -pub type GetStorageResult = Result>, ContractAccessError>; +pub type GetStorageResult>>> = Result; /// Result type of a `set_storage` call. -pub type SetStorageResult = Result; +pub type SetStorageResult> = Result; /// The possible errors that can happen querying the storage of a contract. #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, MaxEncodedLen, RuntimeDebug, TypeInfo)] diff --git a/substrate/frame/revive/src/storage.rs b/substrate/frame/revive/src/storage.rs index 77110178c9d3e..4baa5977cb71c 100644 --- a/substrate/frame/revive/src/storage.rs +++ b/substrate/frame/revive/src/storage.rs @@ -263,13 +263,15 @@ impl ContractInfo { /// /// The read is performed from the `trie_id` only. The `address` is not necessary. If the /// contract doesn't store under the given `key` `None` is returned. - pub fn read(&self, key: &Key) -> Option> { - let value = child::get_raw(&self.child_trie_info(), key.hash().as_slice()); - log::trace!(target: crate::LOG_TARGET, "contract storage: read value {:?} for key {:x?}", value, key); + /// + /// Returns a `StateLoad` containing the value and whether it was a cold or hot load. + pub fn read(&self, key: &Key) -> sp_io::StateLoad>> { + let result = child::get_raw_with_status(&self.child_trie_info(), key.hash().as_slice()); + log::trace!(target: crate::LOG_TARGET, "contract storage: read value {:?} for key {:x?}", result.data, key); if_tracing(|t| { - t.storage_read(key, value.as_deref()); + t.storage_read(key, result.data.as_deref()); }); - return value + result } /// Returns `Some(len)` (in bytes) if a storage item exists at `key`. @@ -293,7 +295,7 @@ impl ContractInfo { new_value: Option>, frame_meter: Option<&mut FrameMeter>, take: bool, - ) -> Result { + ) -> Result, DispatchError> { log::trace!(target: crate::LOG_TARGET, "contract storage: writing value {:?} for key {:x?}", new_value, key); let hashed_key = key.hash(); if_tracing(|t| { @@ -313,7 +315,7 @@ impl ContractInfo { new_value: Option>, take: bool, ) -> Result { - self.write_raw(key, new_value.as_deref(), None, take) + self.write_raw(key, new_value.as_deref(), None, take).map(|state_load| state_load.data) } fn write_raw( @@ -322,13 +324,14 @@ impl ContractInfo { new_value: Option<&[u8]>, frame_meter: Option<&mut FrameMeter>, take: bool, - ) -> Result { + ) -> Result, DispatchError> { let child_trie_info = &self.child_trie_info(); - let (old_len, old_value) = if take { - let val = child::get_raw(child_trie_info, key); - (val.as_ref().map(|v| v.len() as u32), val) + let (old_len, old_value, is_cold) = if take { + let state_load = child::get_raw_with_status(child_trie_info, key); + (state_load.data.as_ref().map(|v| v.len() as u32), state_load.data, state_load.is_cold) } else { - (child::len(child_trie_info, key), None) + let state_load = child::get_raw_with_status(child_trie_info, key); + (state_load.data.as_ref().map(|v| v.len() as u32), None, state_load.is_cold) }; if let Some(frame_meter) = frame_meter { @@ -359,11 +362,12 @@ impl ContractInfo { None => child::kill(child_trie_info, key), } - Ok(match (old_len, old_value) { - (None, _) => WriteOutcome::New, - (Some(old_len), None) => WriteOutcome::Overwritten(old_len), - (Some(_), Some(old_value)) => WriteOutcome::Taken(old_value), - }) + let outcome = match (old_len, old_value) { + (None, _) => WriteOutcome::New { is_cold }, + (Some(old_len), None) => WriteOutcome::Overwritten { len: old_len, is_cold }, + (Some(_), Some(old_value)) => WriteOutcome::Taken { value: old_value, is_cold }, + }; + Ok(sp_io::StateLoad { data: outcome, is_cold }) } /// Sets and returns the contract base deposit. @@ -476,15 +480,15 @@ impl ContractInfo { #[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum WriteOutcome { /// No value existed at the specified key. - New, + New { is_cold: bool }, /// A value of the returned length was overwritten. - Overwritten(u32), + Overwritten { len: u32, is_cold: bool }, /// The returned value was taken out of storage before being overwritten. /// /// This is only returned when specifically requested because it causes additional work /// depending on the size of the pre-existing value. When not requested [`Self::Overwritten`] /// is returned instead. - Taken(Vec), + Taken { value: Vec, is_cold: bool }, } impl WriteOutcome { @@ -492,9 +496,9 @@ impl WriteOutcome { /// 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, + Self::New { .. } => 0, + Self::Overwritten { len, .. } => *len, + Self::Taken { value, .. } => value.len() as u32, } } @@ -507,9 +511,18 @@ impl WriteOutcome { /// 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, + Self::New { .. } => SENTINEL, + Self::Overwritten { len, .. } => *len, + Self::Taken { value, .. } => value.len() as u32, + } + } + + /// Returns whether this was a cold storage access. + pub fn is_cold(&self) -> bool { + match self { + Self::New { is_cold } => *is_cold, + Self::Overwritten { is_cold, .. } => *is_cold, + Self::Taken { is_cold, .. } => *is_cold, } } } diff --git a/substrate/frame/revive/src/transient_storage.rs b/substrate/frame/revive/src/transient_storage.rs index d88adc4373590..252d147d52183 100644 --- a/substrate/frame/revive/src/transient_storage.rs +++ b/substrate/frame/revive/src/transient_storage.rs @@ -271,9 +271,9 @@ impl TransientStorage { } Ok(match (take, prev_value) { - (_, None) => WriteOutcome::New, - (false, Some(prev_value)) => WriteOutcome::Overwritten(prev_value.len() as _), - (true, Some(prev_value)) => WriteOutcome::Taken(prev_value), + (_, None) => WriteOutcome::New { is_cold: false }, + (false, Some(prev_value)) => WriteOutcome::Overwritten { len: prev_value.len() as _, is_cold: false }, + (true, Some(prev_value)) => WriteOutcome::Taken { value: prev_value, is_cold: false }, }) } @@ -357,15 +357,15 @@ mod tests { let mut storage: TransientStorage = TransientStorage::::new(2048); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![2]), true), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])); assert_eq!(storage.read(&ALICE, &Key::Fix([2; 32])), Some(vec![2])); @@ -373,11 +373,11 @@ mod tests { // Overwrite values. assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![4, 5]), false), - Ok(WriteOutcome::Overwritten(1)) + Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) ); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![6, 7]), true), - Ok(WriteOutcome::Taken(vec![3])) + Ok(WriteOutcome::Taken { value: vec![3], is_cold: false }) ); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])); assert_eq!(storage.read(&ALICE, &Key::Fix([2; 32])), Some(vec![4, 5])); @@ -386,13 +386,13 @@ mod tests { // Check for an empty value. assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![]), true), - Ok(WriteOutcome::Taken(vec![6, 7])) + Ok(WriteOutcome::Taken { value: vec![6, 7], is_cold: false }) ); assert_eq!(storage.read(&BOB, &Key::Fix([3; 32])), Some(vec![])); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), None, true), - Ok(WriteOutcome::Taken(vec![])) + Ok(WriteOutcome::Taken { value: vec![], is_cold: false }) ); assert_eq!(storage.read(&BOB, &Key::Fix([3; 32])), None); } @@ -407,7 +407,7 @@ mod tests { Some(vec![1]), false ), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!( storage.write( @@ -416,7 +416,7 @@ mod tests { Some(vec![2, 3]), false ), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!( storage.read(&ALICE, &Key::try_from_var([1; 64].to_vec()).unwrap()), @@ -434,7 +434,7 @@ mod tests { Some(vec![4, 5]), false ), - Ok(WriteOutcome::Overwritten(1)) + Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) ); assert_eq!( storage.read(&ALICE, &Key::try_from_var([1; 64].to_vec()).unwrap()), @@ -449,7 +449,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.rollback_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), None) @@ -462,7 +462,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.commit_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])) @@ -474,11 +474,11 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1, 2]), false), - Ok(WriteOutcome::Overwritten(1)) + Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) ); storage.commit_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1, 2])) @@ -490,12 +490,12 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.rollback_transaction(); storage.commit_transaction(); @@ -509,17 +509,17 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![2]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&CHARLIE, &Key::Fix([1; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.commit_transaction(); storage.commit_transaction(); @@ -535,17 +535,17 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![2]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&CHARLIE, &Key::Fix([1; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.commit_transaction(); storage.commit_transaction(); @@ -562,7 +562,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); let limit = storage.meter().current().limit; storage.commit_transaction(); @@ -572,7 +572,7 @@ mod tests { assert_eq!(storage.meter().current().limit - storage.meter().current().amount, size); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); assert_eq!(storage.meter().current().amount, size); storage.commit_transaction(); @@ -588,14 +588,14 @@ mod tests { let limit = storage.meter().current().limit; assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!(storage.meter().total_amount(), size); assert!(storage.meter().current().limit < limit - size); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.commit_transaction(); assert_eq!(storage.meter().current().limit, limit); @@ -625,7 +625,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( @@ -647,7 +647,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.rollback_transaction(); @@ -655,7 +655,7 @@ mod tests { assert_eq!(storage.meter.current().limit, limit); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); let amount = storage.meter().current().amount; assert_eq!(storage.meter().total_amount(), amount); @@ -670,18 +670,18 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); let amount = storage.meter.total_amount(); storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New) + Ok(WriteOutcome::New { is_cold: false }) ); storage.commit_transaction(); storage.rollback_transaction(); diff --git a/substrate/frame/revive/src/vm/evm/instructions/host.rs b/substrate/frame/revive/src/vm/evm/instructions/host.rs index d3cb9c77a5462..cffd37db1c5fa 100644 --- a/substrate/frame/revive/src/vm/evm/instructions/host.rs +++ b/substrate/frame/revive/src/vm/evm/instructions/host.rs @@ -111,12 +111,11 @@ pub fn blockhash(interpreter: &mut Interpreter) -> ControlFlow /// Loads a word from storage. pub fn sload(interpreter: &mut Interpreter) -> ControlFlow { let ([], index) = interpreter.stack.popn_top()?; - // NB: SLOAD loads 32 bytes from storage (i.e. U256). - interpreter.ext.charge_or_halt(RuntimeCosts::GetStorage(32))?; let key = Key::Fix(index.to_big_endian()); - let value = interpreter.ext.get_storage(&key); + let sp_io::StateLoad { data, is_cold } = interpreter.ext.get_storage(&key); + interpreter.ext.charge_or_halt(RuntimeCosts::GetStorage { len: 32, is_cold })?; - *index = if let Some(storage_value) = value { + *index = if let Some(storage_value) = data { // sload always reads a word let Ok::<[u8; 32], _>(bytes) = storage_value.try_into() else { log::debug!(target: crate::LOG_TARGET, "sload read invalid storage value length. Expected 32."); @@ -132,31 +131,27 @@ pub fn sload(interpreter: &mut Interpreter) -> ControlFlow { fn store_helper<'ext, E: Ext>( interpreter: &mut Interpreter<'ext, E>, - cost_before: RuntimeCosts, - set_function: fn(&mut E, &Key, Option>, bool) -> Result, - adjust_cost: fn(new_bytes: u32, old_bytes: u32) -> RuntimeCosts, + set_function: fn( + &mut E, + &Key, + Option>, + ) -> Result, DispatchError>, + cost: fn(new_bytes: u32, sp_io::StateLoad) -> RuntimeCosts, ) -> ControlFlow { if interpreter.ext.is_read_only() { return ControlFlow::Break(Error::::StateChangeDenied.into()); } let [index, value] = interpreter.stack.popn()?; - - // Charge gas before set_storage and later adjust it down to the true gas cost - let charged_amount = interpreter.ext.charge_or_halt(cost_before)?; let key = Key::Fix(index.to_big_endian()); - let take_old = false; - let value_to_store = if value.is_zero() { None } else { Some(value.to_big_endian().to_vec()) }; - let Ok(write_outcome) = set_function(interpreter.ext, &key, value_to_store.clone(), take_old) - else { + let (value_to_store, len) = + if value.is_zero() { (None, 0) } else { (Some(value.to_big_endian().to_vec()), 32) }; + + let Ok(write_outcome) = set_function(interpreter.ext, &key, value_to_store) else { return ControlFlow::Break(Error::::ContractTrapped.into()); }; - interpreter.ext.frame_meter_mut().adjust_weight( - charged_amount, - adjust_cost(value_to_store.unwrap_or_default().len() as u32, write_outcome.old_len()), - ); - + interpreter.ext.charge_or_halt(cost(len, write_outcome))?; ControlFlow::Continue(()) } @@ -164,24 +159,30 @@ fn store_helper<'ext, E: Ext>( /// /// Stores a word to storage. pub fn sstore(interpreter: &mut Interpreter) -> ControlFlow { - let old_bytes = limits::STORAGE_BYTES; store_helper( interpreter, - RuntimeCosts::SetStorage { new_bytes: 32, old_bytes }, - |ext, key, value, take_old| ext.set_storage(key, value, take_old), - |new_bytes, old_bytes| RuntimeCosts::SetStorage { new_bytes, old_bytes }, + |ext, key, value| ext.set_storage(key, value, false), + |new_bytes, outcome| RuntimeCosts::SetStorage { + new_bytes, + old_bytes: outcome.data.old_len(), + is_cold: outcome.is_cold, + }, ) } /// EIP-1153: Transient storage opcodes /// Store value to transient storage pub fn tstore(interpreter: &mut Interpreter) -> ControlFlow { - let old_bytes = limits::STORAGE_BYTES; store_helper( interpreter, - RuntimeCosts::SetTransientStorage { new_bytes: 32, old_bytes }, - |ext, key, value, take_old| ext.set_transient_storage(key, value, take_old), - |new_bytes, old_bytes| RuntimeCosts::SetTransientStorage { new_bytes, old_bytes }, + |ext, key, value| { + ext.set_transient_storage(key, value, false) + .map(|data| sp_io::StateLoad { data, is_cold: false }) + }, + |new_bytes, outcome| RuntimeCosts::SetTransientStorage { + new_bytes, + old_bytes: outcome.data.old_len(), + }, ) } diff --git a/substrate/frame/revive/src/vm/pvm.rs b/substrate/frame/revive/src/vm/pvm.rs index 73a6c712ed3b2..9f774661935d4 100644 --- a/substrate/frame/revive/src/vm/pvm.rs +++ b/substrate/frame/revive/src/vm/pvm.rs @@ -489,11 +489,11 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { value: StorageValue, ) -> Result { let transient = Self::is_transient(flags)?; - let costs = |new_bytes: u32, old_bytes: u32| { + let costs = |new_bytes: u32, old_bytes: u32, is_cold: bool| { if transient { RuntimeCosts::SetTransientStorage { new_bytes, old_bytes } } else { - RuntimeCosts::SetStorage { new_bytes, old_bytes } + RuntimeCosts::SetStorage { new_bytes, old_bytes, is_cold } } }; @@ -503,7 +503,7 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { }; let max_size = limits::STORAGE_BYTES; - let charged = self.charge_gas(costs(value_len, max_size))?; + let charged = self.charge_gas(costs(value_len, max_size, true))?; if value_len > max_size { return Err(Error::::ValueTooLarge.into()); } @@ -516,13 +516,18 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { }; let write_outcome = if transient { - self.ext.set_transient_storage(&key, value, false)? + self.ext + .set_transient_storage(&key, value, false) + .map(|data| sp_io::StateLoad { data, is_cold: false })? } else { self.ext.set_storage(&key, value, false)? }; - self.adjust_gas(charged, costs(value_len, write_outcome.old_len())); - Ok(write_outcome.old_len_with_sentinel()) + self.adjust_gas( + charged, + costs(value_len, write_outcome.data.old_len(), write_outcome.is_cold), + ); + Ok(write_outcome.data.old_len_with_sentinel()) } fn clear_storage( @@ -533,22 +538,24 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { key_len: u32, ) -> Result { let transient = Self::is_transient(flags)?; - let costs = |len| { + let costs = |len, is_cold: bool| { if transient { RuntimeCosts::ClearTransientStorage(len) } else { - RuntimeCosts::ClearStorage(len) + RuntimeCosts::ClearStorage { len, is_cold } } }; - let charged = self.charge_gas(costs(limits::STORAGE_BYTES))?; + let charged = self.charge_gas(costs(limits::STORAGE_BYTES, true))?; let key = self.decode_key(memory, key_ptr, key_len)?; let outcome = if transient { - self.ext.set_transient_storage(&key, None, false)? + self.ext + .set_transient_storage(&key, None, false) + .map(|data| sp_io::StateLoad { data, is_cold: false })? } else { self.ext.set_storage(&key, None, false)? }; - self.adjust_gas(charged, costs(outcome.old_len())); - Ok(outcome.old_len_with_sentinel()) + self.adjust_gas(charged, costs(outcome.data.old_len(), outcome.is_cold)); + Ok(outcome.data.old_len_with_sentinel()) } fn get_storage( @@ -561,23 +568,24 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { read_mode: StorageReadMode, ) -> Result { let transient = Self::is_transient(flags)?; - let costs = |len| { + let costs = |len, is_cold: bool| { if transient { RuntimeCosts::GetTransientStorage(len) } else { - RuntimeCosts::GetStorage(len) + RuntimeCosts::GetStorage { len, is_cold } } }; - let charged = self.charge_gas(costs(limits::STORAGE_BYTES))?; + let charged = self.charge_gas(costs(limits::STORAGE_BYTES, true))?; let key = self.decode_key(memory, key_ptr, key_len)?; - let outcome = if transient { - self.ext.get_transient_storage(&key) + let (outcome, is_cold) = if transient { + (self.ext.get_transient_storage(&key), false) } else { - self.ext.get_storage(&key) + let state_load = self.ext.get_storage(&key); + (state_load.data, state_load.is_cold) }; if let Some(value) = outcome { - self.adjust_gas(charged, costs(value.len() as u32)); + self.adjust_gas(charged, costs(value.len() as u32, is_cold)); match read_mode { StorageReadMode::FixedOutput32 => { @@ -607,7 +615,7 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { }, } } else { - self.adjust_gas(charged, costs(0)); + self.adjust_gas(charged, costs(0, is_cold)); match read_mode { StorageReadMode::FixedOutput32 => { diff --git a/substrate/frame/revive/src/vm/runtime_costs.rs b/substrate/frame/revive/src/vm/runtime_costs.rs index cf4e782cd245f..55538bb9adf0b 100644 --- a/substrate/frame/revive/src/vm/runtime_costs.rs +++ b/substrate/frame/revive/src/vm/runtime_costs.rs @@ -100,18 +100,18 @@ pub enum RuntimeCosts { /// Weight of calling `seal_deposit_event` with the given number of topics and event size. DepositEvent { num_topic: u32, len: u32 }, /// Weight of calling `seal_set_storage` for the given storage item sizes. - SetStorage { old_bytes: u32, new_bytes: u32 }, + SetStorage { old_bytes: u32, new_bytes: u32, is_cold: bool }, /// Weight of calling the `clearStorage` function of the `Storage` pre-compile /// per cleared byte. - ClearStorage(u32), + ClearStorage { len: u32, is_cold: bool }, /// Weight of calling the `containsStorage` function of the `Storage` pre-compile /// per byte of the checked item. - ContainsStorage(u32), + ContainsStorage { len: u32, is_cold: bool }, /// Weight of calling `seal_get_storage` with the specified size in storage. - GetStorage(u32), + GetStorage { len: u32, is_cold: bool }, /// Weight of calling the `takeStorage` function of the `Storage` pre-compile /// for the given size. - TakeStorage(u32), + TakeStorage { len: u32, is_cold: bool }, /// Weight of calling `seal_set_transient_storage` for the given storage item sizes. SetTransientStorage { old_bytes: u32, new_bytes: u32 }, /// Weight of calling `seal_clear_transient_storage` per cleared byte. @@ -279,13 +279,36 @@ impl Token for RuntimeCosts { limits::EXTRA_EVENT_CHARGE_PER_BYTE.saturating_mul(len.into()).into(), 0, )), - SetStorage { new_bytes, old_bytes } => { - cost_storage!(write, seal_set_storage, new_bytes, old_bytes) - }, - ClearStorage(len) => cost_storage!(write, clear_storage, len), - ContainsStorage(len) => cost_storage!(read, contains_storage, len), - GetStorage(len) => cost_storage!(read, seal_get_storage, len), - TakeStorage(len) => cost_storage!(write, take_storage, len), + SetStorage { new_bytes, old_bytes, is_cold } => + if is_cold { + cost_storage!(write, seal_set_storage, new_bytes, old_bytes, is_cold as u32) + } else { + T::WeightInfo::seal_set_storage(new_bytes, old_bytes, 0) + }, + ClearStorage { len, is_cold } => + if is_cold { + cost_storage!(write, clear_storage, len, is_cold as u32) + } else { + T::WeightInfo::clear_storage(len, 0) + }, + ContainsStorage { len, is_cold } => + if is_cold { + cost_storage!(read, contains_storage, len, is_cold as u32) + } else { + T::WeightInfo::contains_storage(len, 0) + }, + GetStorage { len, is_cold } => + if is_cold { + cost_storage!(read, seal_get_storage, len, is_cold as u32) + } else { + T::WeightInfo::seal_get_storage(len, 0) + }, + TakeStorage { len, is_cold } => + if is_cold { + cost_storage!(write, take_storage, len, is_cold as u32) + } else { + T::WeightInfo::take_storage(len, 0) + }, SetTransientStorage { new_bytes, old_bytes } => { cost_storage!(write_transient, seal_set_transient_storage, new_bytes, old_bytes) }, diff --git a/substrate/frame/revive/src/weights.rs b/substrate/frame/revive/src/weights.rs index e13b67edc4fd8..6d805a383cc5b 100644 --- a/substrate/frame/revive/src/weights.rs +++ b/substrate/frame/revive/src/weights.rs @@ -127,11 +127,11 @@ pub trait WeightInfo { fn get_storage_full() -> Weight; fn set_storage_empty() -> Weight; fn set_storage_full() -> Weight; - fn seal_set_storage(n: u32, o: u32, ) -> Weight; - fn clear_storage(n: u32, ) -> Weight; - fn seal_get_storage(n: u32, ) -> Weight; - fn contains_storage(n: u32, ) -> Weight; - fn take_storage(n: u32, ) -> Weight; + fn seal_set_storage(n: u32, o: u32, c: u32, ) -> Weight; + fn clear_storage(n: u32, c: u32, ) -> Weight; + fn seal_get_storage(n: u32, c: u32, ) -> Weight; + fn contains_storage(n: u32, c: u32, ) -> Weight; + fn take_storage(n: u32, c: u32, ) -> Weight; fn set_transient_storage_empty() -> Weight; fn set_transient_storage_full() -> Weight; fn get_transient_storage_empty() -> Weight; @@ -896,7 +896,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. - fn seal_set_storage(n: u32, o: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn seal_set_storage(n: u32, o: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `247 + o * (1 ±0)` @@ -913,7 +914,8 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn clear_storage(_n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn clear_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` @@ -925,7 +927,8 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn seal_get_storage(n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn seal_get_storage(n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` @@ -939,7 +942,8 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn contains_storage(_n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn contains_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -949,7 +953,8 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn take_storage(n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn take_storage(n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` @@ -2208,7 +2213,8 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. - fn seal_set_storage(n: u32, o: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn seal_set_storage(n: u32, o: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `247 + o * (1 ±0)` @@ -2225,7 +2231,8 @@ impl WeightInfo for () { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn clear_storage(_n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn clear_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` @@ -2237,7 +2244,8 @@ impl WeightInfo for () { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn seal_get_storage(n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn seal_get_storage(n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `247 + n * (1 ±0)` @@ -2251,7 +2259,8 @@ impl WeightInfo for () { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn contains_storage(_n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn contains_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -2261,7 +2270,8 @@ impl WeightInfo for () { /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. - fn take_storage(n: u32, ) -> Weight { + /// The range of component `c` is `[0, 1]`. + fn take_storage(n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` diff --git a/substrate/frame/support/src/storage/child.rs b/substrate/frame/support/src/storage/child.rs index 7109e9213b0f6..0fb0055db2e3d 100644 --- a/substrate/frame/support/src/storage/child.rs +++ b/substrate/frame/support/src/storage/child.rs @@ -212,6 +212,17 @@ pub fn get_raw(child_info: &ChildInfo, key: &[u8]) -> Option> { } } +/// Get a Vec of bytes from storage, tracking whether it was a cold load. +/// +/// Similar to [`get_raw`], but returns a [`sp_io::StateLoad`] that indicates whether the value +/// was loaded from the database backend (cold load) or from the storage overlay (hot load). +pub fn get_raw_with_status(child_info: &ChildInfo, key: &[u8]) -> sp_io::StateLoad>> { + match child_info.child_type() { + ChildType::ParentKeyId => + sp_io::default_child_storage::get_with_status(child_info.storage_key(), key), + } +} + /// Put a raw byte slice into storage. pub fn put_raw(child_info: &ChildInfo, key: &[u8], value: &[u8]) { match child_info.child_type() { diff --git a/substrate/primitives/externalities/src/lib.rs b/substrate/primitives/externalities/src/lib.rs index a543b6758ee4f..b9905302539bc 100644 --- a/substrate/primitives/externalities/src/lib.rs +++ b/substrate/primitives/externalities/src/lib.rs @@ -38,6 +38,17 @@ pub use scope_limited::{set_and_run_with_externalities, with_externalities}; mod extensions; mod scope_limited; +/// Result of a storage load operation that tracks whether the value was loaded from +/// the storage overlay (hot/cached) or from the database backend (cold). +#[derive(Debug, Clone, PartialEq, Eq, codec::Encode, codec::Decode)] +pub struct StateLoad { + /// The returned data + pub data: T, + /// `true` if the value was loaded from the database backend (cold load), + /// `false` if it was loaded from the storage overlay (hot/cached load) + pub is_cold: bool, +} + /// Externalities error. #[derive(Debug)] pub enum Error { @@ -85,6 +96,15 @@ pub trait Externalities: ExtensionStore { /// Read runtime storage. fn storage(&mut self, key: &[u8]) -> Option>; + /// Read runtime storage, tracking whether it was a cold load. + /// + /// Returns a `StateLoad` containing the value and whether it was loaded + /// from the database backend (cold) or storage overlay (hot). + fn storage_with_status(&mut self, key: &[u8]) -> StateLoad>> { + // Default implementation: just call storage() and assume it's cold + StateLoad { data: self.storage(key), is_cold: true } + } + /// Get storage value hash. /// /// This may be optimized for large values. @@ -102,6 +122,19 @@ pub trait Externalities: ExtensionStore { /// Returns an `Option` that holds the SCALE encoded hash. fn child_storage(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option>; + /// Read child runtime storage, tracking whether it was a cold load. + /// + /// Returns a `StateLoad` containing the value and whether it was loaded + /// from the database backend (cold) or storage overlay (hot). + fn child_storage_with_status( + &mut self, + child_info: &ChildInfo, + key: &[u8], + ) -> StateLoad>> { + // Default implementation: just call child_storage() and assume it's cold + StateLoad { data: self.child_storage(child_info, key), is_cold: true } + } + /// Set storage entry `key` of current contract being called (effective immediately). fn set_storage(&mut self, key: Vec, value: Vec) { self.place_storage(key, Some(value)); diff --git a/substrate/primitives/io/src/lib.rs b/substrate/primitives/io/src/lib.rs index 3c42c2672f609..58de619e4e07e 100644 --- a/substrate/primitives/io/src/lib.rs +++ b/substrate/primitives/io/src/lib.rs @@ -148,6 +148,9 @@ mod global_alloc_riscv; #[cfg(not(substrate_runtime))] const LOG_TARGET: &str = "runtime::io"; +/// Re-export StateLoad from sp_externalities +pub use sp_externalities::StateLoad; + /// Error verifying ECDSA signature #[derive(Encode, Decode)] pub enum EcdsaVerifyError { @@ -194,6 +197,18 @@ pub trait Storage { self.storage(key).map(|s| bytes::Bytes::from(s.to_vec())) } + /// Returns the data for `key` in the storage, tracking whether it was a cold load. + /// + /// Similar to `get`, but returns a `StateLoad` that indicates whether the value was loaded + /// from the database backend (cold load) or from the storage overlay (hot load). + fn get_with_status( + &mut self, + key: PassFatPointerAndRead<&[u8]>, + ) -> AllocateAndReturnByCodec>> { + let StateLoad { data, is_cold } = self.storage_with_status(key); + StateLoad { data: data.map(|s| bytes::Bytes::from(s.to_vec())), is_cold } + } + /// Get `key` from storage, placing the value into `value_out` and return the number of /// bytes that the entry in storage has beyond the offset or `None` if the storage entry /// doesn't exist at all. @@ -421,6 +436,24 @@ pub trait DefaultChildStorage { self.child_storage(&child_info, key).map(|s| s.to_vec()) } + /// Get a default child storage value for a given key, tracking whether it was a cold load. + /// + /// Similar to `get`, but returns a `StateLoad` that indicates whether the value was loaded + /// from the database backend (cold load) or from the storage overlay (hot load). + /// + /// Parameter `storage_key` is the unprefixed location of the root of the child trie in the + /// parent trie. Result contains `None` if the value for `key` in the child storage can not be + /// found. + fn get_with_status( + &mut self, + storage_key: PassFatPointerAndRead<&[u8]>, + key: PassFatPointerAndRead<&[u8]>, + ) -> AllocateAndReturnByCodec>>> { + let child_info = ChildInfo::new_default(storage_key); + let StateLoad { data, is_cold } = self.child_storage_with_status(&child_info, key); + StateLoad { data: data.map(|s| s.to_vec()), is_cold } + } + /// Allocation efficient variant of `get`. /// /// Get `key` from child storage, placing the value into `value_out` and return the number @@ -2057,6 +2090,86 @@ mod tests { }); } + #[test] + fn storage_with_status_tracking_works() { + let mut t = BasicExternalities::new(Storage { + top: map![b"existing".to_vec() => b"value".to_vec()], + children_default: map![], + }); + + t.execute_with(|| { + // Note: BasicExternalities doesn't have a real backend, so all reads + // are considered "cold" as there's no hot/cold distinction. + // This test mainly verifies the API works correctly. + + // Read existing value + let result = storage::get_with_status(b"existing"); + assert_eq!(result.data, Some(b"value".to_vec().into())); + assert_eq!(result.is_cold, true); + + // Write to overlay + storage::set(b"new_key", b"new_value"); + + // Read the newly written value + let result = storage::get_with_status(b"new_key"); + assert_eq!(result.data, Some(b"new_value".to_vec().into())); + // BasicExternalities treats all reads as cold + assert_eq!(result.is_cold, true); + + // Read non-existent key + let result = storage::get_with_status(b"non_existent"); + assert_eq!(result.data, None); + assert_eq!(result.is_cold, true); + + // Overwrite existing key + storage::set(b"existing", b"updated"); + let result = storage::get_with_status(b"existing"); + assert_eq!(result.data, Some(b"updated".to_vec().into())); + assert_eq!(result.is_cold, true); + }); + } + + #[test] + fn child_storage_with_status_tracking_works() { + use sp_core::storage::ChildInfo; + + let child_info = ChildInfo::new_default(b"child_storage_key"); + let mut t = BasicExternalities::new(Storage { + top: map![], + children_default: map![ + child_info.storage_key().to_vec() => sp_core::storage::StorageChild { + data: map![b"existing_child".to_vec() => b"child_value".to_vec()], + child_info: child_info.clone(), + } + ], + }); + + t.execute_with(|| { + // Note: BasicExternalities doesn't have a real backend, so all reads + // are considered "cold" as there's no hot/cold distinction. + // This test mainly verifies the API works correctly. + + // Read existing child value + let result = default_child_storage::get_with_status(b"child_storage_key", b"existing_child"); + assert_eq!(result.data, Some(b"child_value".to_vec())); + assert_eq!(result.is_cold, true); + + // Write to child storage + default_child_storage::set(b"child_storage_key", b"new_child_key", b"new_child_value"); + + // Read the newly written value + let result = default_child_storage::get_with_status(b"child_storage_key", b"new_child_key"); + assert_eq!(result.data, Some(b"new_child_value".to_vec())); + // BasicExternalities treats all reads as cold + assert_eq!(result.is_cold, true); + + // Read non-existent child key + let result = default_child_storage::get_with_status(b"child_storage_key", b"non_existent_child"); + assert_eq!(result.data, None); + assert_eq!(result.is_cold, true); + }); + } + #[test] fn read_storage_works() { let value = b"\x0b\0\0\0Hello world".to_vec(); diff --git a/substrate/primitives/state-machine/src/basic.rs b/substrate/primitives/state-machine/src/basic.rs index 7edf9b6f96823..e1063e0546ca0 100644 --- a/substrate/primitives/state-machine/src/basic.rs +++ b/substrate/primitives/state-machine/src/basic.rs @@ -184,6 +184,11 @@ impl Externalities for BasicExternalities { self.overlay.storage(key).and_then(|v| v.map(|v| v.to_vec())) } + fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { + let data = self.overlay.storage(key).and_then(|v| v.map(|v| v.to_vec())); + sp_externalities::StateLoad { data, is_cold: true } + } + fn storage_hash(&mut self, key: &[u8]) -> Option> { self.storage(key).map(|v| Blake2Hasher::hash(&v).encode()) } @@ -192,6 +197,15 @@ impl Externalities for BasicExternalities { self.overlay.child_storage(child_info, key).and_then(|v| v.map(|v| v.to_vec())) } + fn child_storage_with_status( + &mut self, + child_info: &ChildInfo, + key: &[u8], + ) -> sp_externalities::StateLoad> { + let data = self.overlay.child_storage(child_info, key).and_then(|v| v.map(|v| v.to_vec())); + sp_externalities::StateLoad { data, is_cold: true } + } + fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { self.child_storage(child_info, key).map(|v| Blake2Hasher::hash(&v).encode()) } diff --git a/substrate/primitives/state-machine/src/ext.rs b/substrate/primitives/state-machine/src/ext.rs index 62f76124a9564..b799281132822 100644 --- a/substrate/primitives/state-machine/src/ext.rs +++ b/substrate/primitives/state-machine/src/ext.rs @@ -160,6 +160,27 @@ where result } + fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { + let _guard = guard(); + let overlay_result = self.overlay.storage(key); + let (data, is_cold) = if let Some(value) = overlay_result { + (value.map(|x| x.to_vec()), false) + } else { + (self.backend.storage(key).expect(EXT_NOT_ALLOWED_TO_FAIL), true) + }; + + trace!( + target: "state", + method = "GetWithStatus", + ext_id = %HexDisplay::from(&self.id.to_le_bytes()), + key = %HexDisplay::from(&key), + result = ?data.as_ref().map(HexDisplay::from), + is_cold = %is_cold, + ); + + sp_externalities::StateLoad { data, is_cold } + } + fn storage_hash(&mut self, key: &[u8]) -> Option> { let _guard = guard(); let result = self @@ -200,6 +221,32 @@ where result } + fn child_storage_with_status( + &mut self, + child_info: &ChildInfo, + key: &[u8], + ) -> sp_externalities::StateLoad> { + let _guard = guard(); + let overlay_result = self.overlay.child_storage(child_info, key); + let (data, is_cold) = if let Some(value) = overlay_result { + (value.map(|x| x.to_vec()), false) + } else { + (self.backend.child_storage(child_info, key).expect(EXT_NOT_ALLOWED_TO_FAIL), true) + }; + + trace!( + target: "state", + method = "ChildGetWithStatus", + ext_id = %HexDisplay::from(&self.id.to_le_bytes()), + child_info = %HexDisplay::from(&child_info.storage_key()), + key = %HexDisplay::from(&key), + result = ?data.as_ref().map(HexDisplay::from), + is_cold = %is_cold, + ); + + sp_externalities::StateLoad { data, is_cold } + } + fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { let _guard = guard(); let result = self From c5e141f77a90bd6814d08cfdccde5bd5e596725d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 5 Dec 2025 20:41:26 +0100 Subject: [PATCH 02/19] fix tests --- substrate/frame/revive/src/benchmarking.rs | 4 +- substrate/frame/revive/src/exec/mock_ext.rs | 4 +- substrate/frame/revive/src/exec/tests.rs | 76 +++++++++---------- substrate/frame/revive/src/storage.rs | 33 +++----- substrate/frame/revive/src/tests.rs | 2 +- substrate/frame/revive/src/tests/pvm.rs | 24 +++--- substrate/frame/revive/src/tests/sol/host.rs | 2 +- .../frame/revive/src/transient_storage.rs | 70 ++++++++--------- 8 files changed, 103 insertions(+), 112 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 92d8fea557332..bfff7593539bb 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1647,7 +1647,7 @@ mod benchmarks { result = runtime.ext().set_transient_storage(&key, value, false); } - assert_eq!(result, Ok(WriteOutcome::New { is_cold: false })); + assert_eq!(result, Ok(WriteOutcome::New)); assert_eq!(runtime.ext().get_transient_storage(&key), Some(vec![42u8; max_value_len as _])); Ok(()) } @@ -1670,7 +1670,7 @@ mod benchmarks { result = runtime.ext().set_transient_storage(&key, value, false); } - assert_eq!(result, Ok(WriteOutcome::New { is_cold: false })); + assert_eq!(result, Ok(WriteOutcome::New)); assert_eq!(runtime.ext().get_transient_storage(&key), Some(vec![42u8; max_value_len as _])); Ok(()) } diff --git a/substrate/frame/revive/src/exec/mock_ext.rs b/substrate/frame/revive/src/exec/mock_ext.rs index bfe8b4cd159e8..3d7b007932243 100644 --- a/substrate/frame/revive/src/exec/mock_ext.rs +++ b/substrate/frame/revive/src/exec/mock_ext.rs @@ -239,7 +239,7 @@ impl PrecompileExt for MockExt { panic!("MockExt::gas_left") } - fn get_storage(&mut self, _key: &Key) -> Option> { + fn get_storage(&mut self, _key: &Key) -> sp_io::StateLoad>> { panic!("MockExt::get_storage") } @@ -252,7 +252,7 @@ impl PrecompileExt for MockExt { _key: &Key, _value: Option>, _take_old: bool, - ) -> Result { + ) -> Result, DispatchError> { panic!("MockExt::set_storage") } diff --git a/substrate/frame/revive/src/exec/tests.rs b/substrate/frame/revive/src/exec/tests.rs index 2d9d9fcac8334..0e0a9c2db353a 100644 --- a/substrate/frame/revive/src/exec/tests.rs +++ b/substrate/frame/revive/src/exec/tests.rs @@ -1782,41 +1782,41 @@ fn set_storage_works() { // Write assert_eq!( ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![4, 5, 6]), true), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); - assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(WriteOutcome::New)); - assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(WriteOutcome::New)); + assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true })); + assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true })); assert_eq!( ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); // Overwrite assert_eq!( ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![42]), false), - Ok(WriteOutcome::Overwritten(3)) + Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 3 }, is_cold: false }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![48]), true), - Ok(WriteOutcome::Taken(vec![4, 5, 6])) + Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![4, 5, 6] }, is_cold: false }) ); - assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(WriteOutcome::New)); - assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(WriteOutcome::New)); + assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false })); + assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false })); assert_eq!( ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false), - Ok(WriteOutcome::Overwritten(0)) + Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 0 }, is_cold: false }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true), - Ok(WriteOutcome::Taken(vec![])) + Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![] }, is_cold: false }) ); exec_success() @@ -1853,7 +1853,7 @@ fn set_storage_varsized_key_works() { Some(vec![1, 2, 3]), false ), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage( @@ -1861,25 +1861,25 @@ fn set_storage_varsized_key_works() { Some(vec![4, 5, 6]), true ), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); // Overwrite @@ -1889,7 +1889,7 @@ fn set_storage_varsized_key_works() { Some(vec![42, 43, 44]), false ), - Ok(WriteOutcome::Overwritten(3)) + Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 3 }, is_cold: false }) ); assert_eq!( ctx.ext.set_storage( @@ -1897,25 +1897,25 @@ fn set_storage_varsized_key_works() { Some(vec![48]), true ), - Ok(WriteOutcome::Taken(vec![4, 5, 6])) + Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![4, 5, 6] }, is_cold: false }) ); assert_eq!( ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false }) ); assert_eq!( ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false), - Ok(WriteOutcome::Overwritten(0)) + Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 0 }, is_cold: false }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true), - Ok(WriteOutcome::Taken(vec![])) + Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![] }, is_cold: false }) ); exec_success() @@ -1946,11 +1946,11 @@ fn get_storage_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { assert_eq!( ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!(ctx.ext.get_storage(&Key::Fix([1; 32])).data, Some(vec![1, 2, 3])); assert_eq!(ctx.ext.get_storage(&Key::Fix([2; 32])).data, Some(vec![])); @@ -1984,11 +1984,11 @@ fn get_storage_size_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { assert_eq!( ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!(ctx.ext.get_storage_size(&Key::Fix([1; 32])), Some(3)); assert_eq!(ctx.ext.get_storage_size(&Key::Fix([2; 32])), Some(0)); @@ -2026,12 +2026,12 @@ fn get_storage_varsized_key_works() { Some(vec![1, 2, 3]), false ), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.get_storage(&Key::try_from_var([1; 19].to_vec()).unwrap()).data, @@ -2075,12 +2075,12 @@ fn get_storage_size_varsized_key_works() { Some(vec![1, 2, 3]), false ), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false), - Ok(WriteOutcome::New) + Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) ); assert_eq!( ctx.ext.get_storage_size(&Key::try_from_var([1; 19].to_vec()).unwrap()), @@ -2147,11 +2147,11 @@ fn set_transient_storage_works() { // Overwrite assert_eq!( ctx.ext.set_transient_storage(&Key::Fix([1; 32]), Some(vec![42]), false), - Ok(WriteOutcome::Overwritten(3)) + Ok(WriteOutcome::Overwritten { len: 3 }) ); assert_eq!( ctx.ext.set_transient_storage(&Key::Fix([2; 32]), Some(vec![48]), true), - Ok(WriteOutcome::Taken(vec![4, 5, 6])) + Ok(WriteOutcome::Taken { value: vec![4, 5, 6] }) ); assert_eq!( ctx.ext.set_transient_storage(&Key::Fix([3; 32]), None, false), @@ -2163,11 +2163,11 @@ fn set_transient_storage_works() { ); assert_eq!( ctx.ext.set_transient_storage(&Key::Fix([5; 32]), Some(vec![]), false), - Ok(WriteOutcome::Overwritten(0)) + Ok(WriteOutcome::Overwritten { len: 0 }) ); assert_eq!( ctx.ext.set_transient_storage(&Key::Fix([6; 32]), Some(vec![]), true), - Ok(WriteOutcome::Taken(vec![])) + Ok(WriteOutcome::Taken { value: vec![] }) ); exec_success() @@ -2221,7 +2221,7 @@ fn get_transient_storage_works() { } else { assert_eq!( ctx.ext.set_transient_storage(storage_key_1, Some(vec![3]), true), - Ok(WriteOutcome::Taken(vec![1, 2])) + Ok(WriteOutcome::Taken { value: vec![1, 2] }) ); assert_eq!( ctx.ext.set_transient_storage(storage_key_2, Some(vec![]), false), @@ -2330,7 +2330,7 @@ fn rollback_transient_storage_works() { let overwritten_length = ctx.ext.get_transient_storage_size(storage_key).unwrap(); assert_eq!( ctx.ext.set_transient_storage(storage_key, Some(vec![3]), false), - Ok(WriteOutcome::Overwritten(overwritten_length)) + Ok(WriteOutcome::Overwritten { len: overwritten_length }) ); assert_eq!(ctx.ext.get_transient_storage(storage_key), Some(vec![3])); } diff --git a/substrate/frame/revive/src/storage.rs b/substrate/frame/revive/src/storage.rs index 4baa5977cb71c..5739fa0030ada 100644 --- a/substrate/frame/revive/src/storage.rs +++ b/substrate/frame/revive/src/storage.rs @@ -363,9 +363,9 @@ impl ContractInfo { } let outcome = match (old_len, old_value) { - (None, _) => WriteOutcome::New { is_cold }, - (Some(old_len), None) => WriteOutcome::Overwritten { len: old_len, is_cold }, - (Some(_), Some(old_value)) => WriteOutcome::Taken { value: old_value, is_cold }, + (None, _) => WriteOutcome::New, + (Some(old_len), None) => WriteOutcome::Overwritten { len: old_len }, + (Some(_), Some(old_value)) => WriteOutcome::Taken { value: old_value }, }; Ok(sp_io::StateLoad { data: outcome, is_cold }) } @@ -480,15 +480,15 @@ impl ContractInfo { #[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub enum WriteOutcome { /// No value existed at the specified key. - New { is_cold: bool }, + New, /// A value of the returned length was overwritten. - Overwritten { len: u32, is_cold: bool }, + Overwritten { len: u32 }, /// The returned value was taken out of storage before being overwritten. /// /// This is only returned when specifically requested because it causes additional work /// depending on the size of the pre-existing value. When not requested [`Self::Overwritten`] /// is returned instead. - Taken { value: Vec, is_cold: bool }, + Taken { value: Vec }, } impl WriteOutcome { @@ -496,9 +496,9 @@ impl WriteOutcome { /// 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, + Self::New => 0, + Self::Overwritten { len } => *len, + Self::Taken { value } => value.len() as u32, } } @@ -511,18 +511,9 @@ impl WriteOutcome { /// 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, - } - } - - /// Returns whether this was a cold storage access. - pub fn is_cold(&self) -> bool { - match self { - Self::New { is_cold } => *is_cold, - Self::Overwritten { is_cold, .. } => *is_cold, - Self::Taken { is_cold, .. } => *is_cold, + Self::New => SENTINEL, + Self::Overwritten { len } => *len, + Self::Taken { value } => value.len() as u32, } } } diff --git a/substrate/frame/revive/src/tests.rs b/substrate/frame/revive/src/tests.rs index 0af794f6ec7e3..d859a4a9eb601 100644 --- a/substrate/frame/revive/src/tests.rs +++ b/substrate/frame/revive/src/tests.rs @@ -641,7 +641,7 @@ fn ext_builder_with_genesis_config_works() { for (key, value) in contract_data.storage.iter() { assert_eq!( Pallet::::get_storage(contract.address, key.0), - Ok(Some(value.0.to_vec())) + Ok(sp_io::StateLoad { data: Some(value.0.to_vec()), is_cold: true }) ); } diff --git a/substrate/frame/revive/src/tests/pvm.rs b/substrate/frame/revive/src/tests/pvm.rs index dbeffcab840fb..90f14dff676ef 100644 --- a/substrate/frame/revive/src/tests/pvm.rs +++ b/substrate/frame/revive/src/tests/pvm.rs @@ -5181,15 +5181,15 @@ fn get_set_storage_key_works() { let contract_key_to_test = [1; 32]; // Checking non-existing keys gets created. let storage_value = Pallet::::get_storage(addr, contract_key_to_test).unwrap(); - assert_eq!(storage_value, None); + assert_eq!(storage_value.data, None); let value_to_write = Some(vec![1, 2, 3]); let write_result = Pallet::::set_storage(addr, contract_key_to_test, value_to_write.clone()) .unwrap(); - assert_eq!(write_result, WriteOutcome::New); + assert_eq!(write_result.data, WriteOutcome::New); let storage_value = Pallet::::get_storage(addr, contract_key_to_test).unwrap(); - assert_eq!(storage_value, value_to_write); + assert_eq!(storage_value.data, value_to_write); // Check existing keys overwrite @@ -5198,11 +5198,11 @@ fn get_set_storage_key_works() { Pallet::::set_storage(addr, contract_key_to_test, new_value_to_write.clone()) .unwrap(); assert_eq!( - write_result, - WriteOutcome::Overwritten(value_to_write.map(|v| v.len()).unwrap_or_default() as u32) + write_result.data, + WriteOutcome::Overwritten { len: value_to_write.map(|v| v.len()).unwrap_or_default() as u32 } ); let storage_value = Pallet::::get_storage(addr, contract_key_to_test).unwrap(); - assert_eq!(storage_value, new_value_to_write); + assert_eq!(storage_value.data, new_value_to_write); }); } @@ -5220,7 +5220,7 @@ fn get_set_storage_var_key_works() { // Checking non-existing keys gets created. let storage_value = Pallet::::get_storage_var_key(addr, contract_key_to_test.clone()).unwrap(); - assert_eq!(storage_value, None); + assert_eq!(storage_value.data, None); let value_to_write = Some(vec![1, 2, 3]); let write_result = Pallet::::set_storage_var_key( @@ -5229,10 +5229,10 @@ fn get_set_storage_var_key_works() { value_to_write.clone(), ) .unwrap(); - assert_eq!(write_result, WriteOutcome::New); + assert_eq!(write_result.data, WriteOutcome::New); let storage_value = Pallet::::get_storage_var_key(addr, contract_key_to_test.clone()).unwrap(); - assert_eq!(storage_value, value_to_write); + assert_eq!(storage_value.data, value_to_write); // Check existing keys overwrite @@ -5244,12 +5244,12 @@ fn get_set_storage_var_key_works() { ) .unwrap(); assert_eq!( - write_result, - WriteOutcome::Overwritten(value_to_write.map(|v| v.len()).unwrap_or_default() as u32) + write_result.data, + WriteOutcome::Overwritten { len: value_to_write.map(|v| v.len()).unwrap_or_default() as u32 } ); let storage_value = Pallet::::get_storage_var_key(addr, contract_key_to_test.clone()).unwrap(); - assert_eq!(storage_value, new_value_to_write); + assert_eq!(storage_value.data, new_value_to_write); }); } diff --git a/substrate/frame/revive/src/tests/sol/host.rs b/substrate/frame/revive/src/tests/sol/host.rs index f6a54e6b0a364..22bff0b7b780a 100644 --- a/substrate/frame/revive/src/tests/sol/host.rs +++ b/substrate/frame/revive/src/tests/sol/host.rs @@ -443,7 +443,7 @@ fn sstore_works(fixture_type: FixtureType) { let written_value = { let contract_info = test_utils::get_contract(&addr); let key = Key::Fix(U256::from(index).to_big_endian()); - let result = contract_info.read(&key).unwrap(); + let result = contract_info.read(&key).data.unwrap(); U256::from_big_endian(&result) }; assert_eq!( diff --git a/substrate/frame/revive/src/transient_storage.rs b/substrate/frame/revive/src/transient_storage.rs index 252d147d52183..249cf20c4d26e 100644 --- a/substrate/frame/revive/src/transient_storage.rs +++ b/substrate/frame/revive/src/transient_storage.rs @@ -271,9 +271,9 @@ impl TransientStorage { } Ok(match (take, prev_value) { - (_, None) => WriteOutcome::New { is_cold: false }, - (false, Some(prev_value)) => WriteOutcome::Overwritten { len: prev_value.len() as _, is_cold: false }, - (true, Some(prev_value)) => WriteOutcome::Taken { value: prev_value, is_cold: false }, + (_, None) => WriteOutcome::New, + (false, Some(prev_value)) => WriteOutcome::Overwritten { len: prev_value.len() as _ }, + (true, Some(prev_value)) => WriteOutcome::Taken { value: prev_value }, }) } @@ -357,15 +357,15 @@ mod tests { let mut storage: TransientStorage = TransientStorage::::new(2048); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![2]), true), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])); assert_eq!(storage.read(&ALICE, &Key::Fix([2; 32])), Some(vec![2])); @@ -373,11 +373,11 @@ mod tests { // Overwrite values. assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![4, 5]), false), - Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) + Ok(WriteOutcome::Overwritten { len: 1 }) ); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![6, 7]), true), - Ok(WriteOutcome::Taken { value: vec![3], is_cold: false }) + Ok(WriteOutcome::Taken { value: vec![3] }) ); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])); assert_eq!(storage.read(&ALICE, &Key::Fix([2; 32])), Some(vec![4, 5])); @@ -386,13 +386,13 @@ mod tests { // Check for an empty value. assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), Some(vec![]), true), - Ok(WriteOutcome::Taken { value: vec![6, 7], is_cold: false }) + Ok(WriteOutcome::Taken { value: vec![6, 7] }) ); assert_eq!(storage.read(&BOB, &Key::Fix([3; 32])), Some(vec![])); assert_eq!( storage.write(&BOB, &Key::Fix([3; 32]), None, true), - Ok(WriteOutcome::Taken { value: vec![], is_cold: false }) + Ok(WriteOutcome::Taken { value: vec![] }) ); assert_eq!(storage.read(&BOB, &Key::Fix([3; 32])), None); } @@ -407,7 +407,7 @@ mod tests { Some(vec![1]), false ), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!( storage.write( @@ -416,7 +416,7 @@ mod tests { Some(vec![2, 3]), false ), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!( storage.read(&ALICE, &Key::try_from_var([1; 64].to_vec()).unwrap()), @@ -434,7 +434,7 @@ mod tests { Some(vec![4, 5]), false ), - Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) + Ok(WriteOutcome::Overwritten { len: 1 }) ); assert_eq!( storage.read(&ALICE, &Key::try_from_var([1; 64].to_vec()).unwrap()), @@ -449,7 +449,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.rollback_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), None) @@ -462,7 +462,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.commit_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1])) @@ -474,11 +474,11 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1, 2]), false), - Ok(WriteOutcome::Overwritten { len: 1, is_cold: false }) + Ok(WriteOutcome::Overwritten { len: 1 }) ); storage.commit_transaction(); assert_eq!(storage.read(&ALICE, &Key::Fix([1; 32])), Some(vec![1, 2])) @@ -490,12 +490,12 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.rollback_transaction(); storage.commit_transaction(); @@ -509,17 +509,17 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![2]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&CHARLIE, &Key::Fix([1; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.commit_transaction(); storage.commit_transaction(); @@ -535,17 +535,17 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![2]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&CHARLIE, &Key::Fix([1; 32]), Some(vec![3]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.commit_transaction(); storage.commit_transaction(); @@ -562,7 +562,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); let limit = storage.meter().current().limit; storage.commit_transaction(); @@ -572,7 +572,7 @@ mod tests { assert_eq!(storage.meter().current().limit - storage.meter().current().amount, size); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); assert_eq!(storage.meter().current().amount, size); storage.commit_transaction(); @@ -588,14 +588,14 @@ mod tests { let limit = storage.meter().current().limit; assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!(storage.meter().total_amount(), size); assert!(storage.meter().current().limit < limit - size); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.commit_transaction(); assert_eq!(storage.meter().current().limit, limit); @@ -625,7 +625,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( @@ -647,7 +647,7 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.rollback_transaction(); @@ -655,7 +655,7 @@ mod tests { assert_eq!(storage.meter.current().limit, limit); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); let amount = storage.meter().current().amount; assert_eq!(storage.meter().total_amount(), amount); @@ -670,18 +670,18 @@ mod tests { storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); let amount = storage.meter.total_amount(); storage.start_transaction(); assert_eq!( storage.write(&ALICE, &Key::Fix([2; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.start_transaction(); assert_eq!( storage.write(&BOB, &Key::Fix([1; 32]), Some(vec![1u8; 4096]), false), - Ok(WriteOutcome::New { is_cold: false }) + Ok(WriteOutcome::New) ); storage.commit_transaction(); storage.rollback_transaction(); From 624c6fc77bf64ae49ce44aeefbea4e26ab236e06 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 5 Dec 2025 21:41:20 +0100 Subject: [PATCH 03/19] nit --- .../core/pvf/common/src/executor_interface.rs | 12 ++++++++++++ substrate/primitives/externalities/src/lib.rs | 10 ++-------- .../primitives/state-machine/src/read_only.rs | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/polkadot/node/core/pvf/common/src/executor_interface.rs b/polkadot/node/core/pvf/common/src/executor_interface.rs index f2e98f79a2276..e27e392e41c17 100644 --- a/polkadot/node/core/pvf/common/src/executor_interface.rs +++ b/polkadot/node/core/pvf/common/src/executor_interface.rs @@ -219,6 +219,10 @@ impl sp_externalities::Externalities for ValidationExternalities { panic!("storage: unsupported feature for parachain validation") } + fn storage_with_status(&mut self, _: &[u8]) -> sp_externalities::StateLoad>> { + panic!("storage_with_status: unsupported feature for parachain validation") + } + fn storage_hash(&mut self, _: &[u8]) -> Option> { panic!("storage_hash: unsupported feature for parachain validation") } @@ -231,6 +235,14 @@ impl sp_externalities::Externalities for ValidationExternalities { panic!("child_storage: unsupported feature for parachain validation") } + fn child_storage_with_status( + &mut self, + _: &ChildInfo, + _: &[u8], + ) -> sp_externalities::StateLoad>> { + panic!("child_storage_with_status: unsupported feature for parachain validation") + } + fn kill_child_storage( &mut self, _child_info: &ChildInfo, diff --git a/substrate/primitives/externalities/src/lib.rs b/substrate/primitives/externalities/src/lib.rs index b9905302539bc..d1385af0fd1fa 100644 --- a/substrate/primitives/externalities/src/lib.rs +++ b/substrate/primitives/externalities/src/lib.rs @@ -100,10 +100,7 @@ pub trait Externalities: ExtensionStore { /// /// Returns a `StateLoad` containing the value and whether it was loaded /// from the database backend (cold) or storage overlay (hot). - fn storage_with_status(&mut self, key: &[u8]) -> StateLoad>> { - // Default implementation: just call storage() and assume it's cold - StateLoad { data: self.storage(key), is_cold: true } - } + fn storage_with_status(&mut self, key: &[u8]) -> StateLoad>>; /// Get storage value hash. /// @@ -130,10 +127,7 @@ pub trait Externalities: ExtensionStore { &mut self, child_info: &ChildInfo, key: &[u8], - ) -> StateLoad>> { - // Default implementation: just call child_storage() and assume it's cold - StateLoad { data: self.child_storage(child_info, key), is_cold: true } - } + ) -> StateLoad>>; /// Set storage entry `key` of current contract being called (effective immediately). fn set_storage(&mut self, key: Vec, value: Vec) { diff --git a/substrate/primitives/state-machine/src/read_only.rs b/substrate/primitives/state-machine/src/read_only.rs index e5da2fde1fd55..ddd49e0497906 100644 --- a/substrate/primitives/state-machine/src/read_only.rs +++ b/substrate/primitives/state-machine/src/read_only.rs @@ -95,6 +95,13 @@ where .expect("Backed failed for storage in ReadOnlyExternalities") } + fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { + let data = self.backend + .storage(key) + .expect("Backed failed for storage_with_status in ReadOnlyExternalities"); + sp_externalities::StateLoad { data, is_cold: true } + } + fn storage_hash(&mut self, key: &[u8]) -> Option> { self.backend .storage_hash(key) @@ -108,6 +115,17 @@ where .expect("Backed failed for child_storage in ReadOnlyExternalities") } + fn child_storage_with_status( + &mut self, + child_info: &ChildInfo, + key: &[u8], + ) -> sp_externalities::StateLoad> { + let data = self.backend + .child_storage(child_info, key) + .expect("Backed failed for child_storage_with_status in ReadOnlyExternalities"); + sp_externalities::StateLoad { data, is_cold: true } + } + fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { self.backend .child_storage_hash(child_info, key) From 49d6a9b6b3fd6f13297aabed3b88b291b4336959 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 5 Dec 2025 21:54:56 +0100 Subject: [PATCH 04/19] fix benchmarking --- substrate/frame/revive/src/benchmarking.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index bfff7593539bb..472a8e9a9c337 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1451,7 +1451,7 @@ mod benchmarks { } assert_ok!(result); - assert_eq!(info.read(&key).unwrap(), value); + assert_eq!(info.read(&key).data.unwrap(), value); Ok(()) } @@ -1539,7 +1539,7 @@ mod benchmarks { } assert_ok!(result); - assert_eq!(&info.read(&key).unwrap(), &memory[out_ptr as usize..]); + assert_eq!(&info.read(&key).data.unwrap(), &memory[out_ptr as usize..]); Ok(()) } From af7e03d8a1987e42b396393c2b4fc64d404ea7d2 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 5 Dec 2025 22:08:17 +0100 Subject: [PATCH 05/19] simplify tests --- substrate/frame/revive/src/exec/tests.rs | 120 +++++++++++------------ 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/substrate/frame/revive/src/exec/tests.rs b/substrate/frame/revive/src/exec/tests.rs index 0e0a9c2db353a..5e87ccfca3d8e 100644 --- a/substrate/frame/revive/src/exec/tests.rs +++ b/substrate/frame/revive/src/exec/tests.rs @@ -1781,42 +1781,42 @@ fn set_storage_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { // Write assert_eq!( - ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![4, 5, 6]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![4, 5, 6]), true).map(|sl| sl.data), + Ok(WriteOutcome::New) ); - assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true })); - assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true })); + assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false).map(|sl| sl.data), Ok(WriteOutcome::New)); + assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true).map(|sl| sl.data), Ok(WriteOutcome::New)); assert_eq!( - ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true).map(|sl| sl.data), + Ok(WriteOutcome::New) ); // Overwrite assert_eq!( - ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![42]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 3 }, is_cold: false }) + ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![42]), false).map(|sl| sl.data), + Ok(WriteOutcome::Overwritten { len: 3 }) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![48]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![4, 5, 6] }, is_cold: false }) + ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![48]), true).map(|sl| sl.data), + Ok(WriteOutcome::Taken { value: vec![4, 5, 6] }) ); - assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false })); - assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true), Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false })); + assert_eq!(ctx.ext.set_storage(&Key::Fix([3; 32]), None, false).map(|sl| sl.data), Ok(WriteOutcome::New)); + assert_eq!(ctx.ext.set_storage(&Key::Fix([4; 32]), None, true).map(|sl| sl.data), Ok(WriteOutcome::New)); assert_eq!( - ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 0 }, is_cold: false }) + ctx.ext.set_storage(&Key::Fix([5; 32]), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::Overwritten { len: 0 }) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![] }, is_cold: false }) + ctx.ext.set_storage(&Key::Fix([6; 32]), Some(vec![]), true).map(|sl| sl.data), + Ok(WriteOutcome::Taken { value: vec![] }) ); exec_success() @@ -1852,34 +1852,34 @@ fn set_storage_varsized_key_works() { &Key::try_from_var([1; 64].to_vec()).unwrap(), Some(vec![1, 2, 3]), false - ), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext.set_storage( &Key::try_from_var([2; 19].to_vec()).unwrap(), Some(vec![4, 5, 6]), true - ), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true).map(|sl| sl.data), + Ok(WriteOutcome::New) ); // Overwrite @@ -1888,34 +1888,34 @@ fn set_storage_varsized_key_works() { &Key::try_from_var([1; 64].to_vec()).unwrap(), Some(vec![42, 43, 44]), false - ), - Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 3 }, is_cold: false }) + ).map(|sl| sl.data), + Ok(WriteOutcome::Overwritten { len: 3 }) ); assert_eq!( ctx.ext.set_storage( &Key::try_from_var([2; 19].to_vec()).unwrap(), Some(vec![48]), true - ), - Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![4, 5, 6] }, is_cold: false }) + ).map(|sl| sl.data), + Ok(WriteOutcome::Taken { value: vec![4, 5, 6] }) ); assert_eq!( - ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false }) + ctx.ext.set_storage(&Key::try_from_var([3; 19].to_vec()).unwrap(), None, false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: false }) + ctx.ext.set_storage(&Key::try_from_var([4; 64].to_vec()).unwrap(), None, true).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::Overwritten { len: 0 }, is_cold: false }) + .set_storage(&Key::try_from_var([5; 30].to_vec()).unwrap(), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::Overwritten { len: 0 }) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true), - Ok(sp_io::StateLoad { data: WriteOutcome::Taken { value: vec![] }, is_cold: false }) + .set_storage(&Key::try_from_var([6; 128].to_vec()).unwrap(), Some(vec![]), true).map(|sl| sl.data), + Ok(WriteOutcome::Taken { value: vec![] }) ); exec_success() @@ -1945,12 +1945,12 @@ fn set_storage_varsized_key_works() { fn get_storage_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { assert_eq!( - ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!(ctx.ext.get_storage(&Key::Fix([1; 32])).data, Some(vec![1, 2, 3])); assert_eq!(ctx.ext.get_storage(&Key::Fix([2; 32])).data, Some(vec![])); @@ -1983,12 +1983,12 @@ fn get_storage_works() { fn get_storage_size_works() { let code_hash = MockLoader::insert(Call, |ctx, _| { assert_eq!( - ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([1; 32]), Some(vec![1, 2, 3]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( - ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ctx.ext.set_storage(&Key::Fix([2; 32]), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!(ctx.ext.get_storage_size(&Key::Fix([1; 32])), Some(3)); assert_eq!(ctx.ext.get_storage_size(&Key::Fix([2; 32])), Some(0)); @@ -2025,13 +2025,13 @@ fn get_storage_varsized_key_works() { &Key::try_from_var([1; 19].to_vec()).unwrap(), Some(vec![1, 2, 3]), false - ), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext.get_storage(&Key::try_from_var([1; 19].to_vec()).unwrap()).data, @@ -2074,13 +2074,13 @@ fn get_storage_size_varsized_key_works() { &Key::try_from_var([1; 19].to_vec()).unwrap(), Some(vec![1, 2, 3]), false - ), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + ).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext - .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false), - Ok(sp_io::StateLoad { data: WriteOutcome::New, is_cold: true }) + .set_storage(&Key::try_from_var([2; 16].to_vec()).unwrap(), Some(vec![]), false).map(|sl| sl.data), + Ok(WriteOutcome::New) ); assert_eq!( ctx.ext.get_storage_size(&Key::try_from_var([1; 19].to_vec()).unwrap()), From 688cccc9c1d46761736127fc33881ec0b41e60b9 Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:48:19 +0000 Subject: [PATCH 06/19] Update from github-actions[bot] running command 'bench --runtime dev --pallet pallet_revive' --- substrate/frame/revive/src/weights.rs | 1358 +++++++++++++------------ 1 file changed, 686 insertions(+), 672 deletions(-) diff --git a/substrate/frame/revive/src/weights.rs b/substrate/frame/revive/src/weights.rs index 6d805a383cc5b..d321e5c49c03e 100644 --- a/substrate/frame/revive/src/weights.rs +++ b/substrate/frame/revive/src/weights.rs @@ -35,9 +35,9 @@ //! Autogenerated weights for `pallet_revive` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-11-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `44a3520f326f`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `8575c9bc47de`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: @@ -183,8 +183,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `213` // Estimated: `1698` - // Minimum execution time: 3_325_000 picoseconds. - Weight::from_parts(3_509_000, 1698) + // Minimum execution time: 3_154_000 picoseconds. + Weight::from_parts(3_405_000, 1698) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -194,10 +194,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `491 + k * (69 ±0)` // Estimated: `481 + k * (70 ±0)` - // Minimum execution time: 14_389_000 picoseconds. - Weight::from_parts(15_127_000, 481) - // Standard Error: 1_039 - .saturating_add(Weight::from_parts(1_209_966, 0).saturating_mul(k.into())) + // Minimum execution time: 14_582_000 picoseconds. + Weight::from_parts(14_895_000, 481) + // Standard Error: 1_943 + .saturating_add(Weight::from_parts(1_250_682, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -221,10 +221,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1265 + c * (1 ±0)` // Estimated: `7200 + c * (1 ±0)` - // Minimum execution time: 100_357_000 picoseconds. - Weight::from_parts(143_652_444, 7200) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_441, 0).saturating_mul(c.into())) + // Minimum execution time: 99_711_000 picoseconds. + Weight::from_parts(152_217_303, 7200) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_382, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -242,14 +242,12 @@ impl WeightInfo for SubstrateWeight { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) /// The range of component `c` is `[1, 10240]`. - fn call_with_evm_code_per_byte(c: u32, ) -> Weight { + fn call_with_evm_code_per_byte(_c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1205` // Estimated: `7144` - // Minimum execution time: 92_748_000 picoseconds. - Weight::from_parts(97_747_165, 7144) - // Standard Error: 24 - .saturating_add(Weight::from_parts(46, 0).saturating_mul(c.into())) + // Minimum execution time: 94_712_000 picoseconds. + Weight::from_parts(99_302_408, 7144) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -270,10 +268,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `4609` // Estimated: `10549` - // Minimum execution time: 144_014_000 picoseconds. - Weight::from_parts(149_812_683, 10549) - // Standard Error: 724_905 - .saturating_add(Weight::from_parts(1_749_116, 0).saturating_mul(b.into())) + // Minimum execution time: 150_260_000 picoseconds. + Weight::from_parts(155_718_240, 10549) + // Standard Error: 621_625 + .saturating_add(Weight::from_parts(2_843_759, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -297,12 +295,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6924` - // Minimum execution time: 773_080_000 picoseconds. - Weight::from_parts(70_290_148, 6924) - // Standard Error: 37 - .saturating_add(Weight::from_parts(20_365, 0).saturating_mul(c.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(5_006, 0).saturating_mul(i.into())) + // Minimum execution time: 779_431_000 picoseconds. + Weight::from_parts(74_223_269, 6924) + // Standard Error: 39 + .saturating_add(Weight::from_parts(20_177, 0).saturating_mul(c.into())) + // Standard Error: 31 + .saturating_add(Weight::from_parts(5_066, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -331,14 +329,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6934` - // Minimum execution time: 405_718_000 picoseconds. - Weight::from_parts(270_737_149, 6934) - // Standard Error: 44 - .saturating_add(Weight::from_parts(15_826, 0).saturating_mul(c.into())) - // Standard Error: 34 - .saturating_add(Weight::from_parts(660, 0).saturating_mul(i.into())) - // Standard Error: 2_902_398 - .saturating_add(Weight::from_parts(8_450_702, 0).saturating_mul(d.into())) + // Minimum execution time: 392_839_000 picoseconds. + Weight::from_parts(306_119_258, 6934) + // Standard Error: 41 + .saturating_add(Weight::from_parts(15_749, 0).saturating_mul(c.into())) + // Standard Error: 32 + .saturating_add(Weight::from_parts(456, 0).saturating_mul(i.into())) + // Standard Error: 2_738_762 + .saturating_add(Weight::from_parts(2_532_218, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } @@ -346,8 +344,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_011_000 picoseconds. - Weight::from_parts(3_274_000, 0) + // Minimum execution time: 3_082_000 picoseconds. + Weight::from_parts(3_298_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:2 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -367,11 +365,11 @@ impl WeightInfo for SubstrateWeight { fn instantiate(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1735` - // Estimated: `7665` - // Minimum execution time: 187_515_000 picoseconds. - Weight::from_parts(194_934_584, 7665) + // Estimated: `7668` + // Minimum execution time: 196_938_000 picoseconds. + Weight::from_parts(199_086_558, 7668) // Standard Error: 11 - .saturating_add(Weight::from_parts(4_151, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_155, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -391,8 +389,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 104_210_000 picoseconds. - Weight::from_parts(110_220_000, 7887) + // Minimum execution time: 104_369_000 picoseconds. + Weight::from_parts(106_866_000, 7887) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -417,10 +415,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 179_230_000 picoseconds. - Weight::from_parts(189_040_259, 7887) - // Standard Error: 869_758 - .saturating_add(Weight::from_parts(4_172_840, 0).saturating_mul(d.into())) + // Minimum execution time: 182_578_000 picoseconds. + Weight::from_parts(191_542_185, 7887) + // Standard Error: 879_036 + .saturating_add(Weight::from_parts(1_872_614, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -437,10 +435,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `358` // Estimated: `3823` - // Minimum execution time: 28_233_000 picoseconds. - Weight::from_parts(22_905_261, 3823) + // Minimum execution time: 28_267_000 picoseconds. + Weight::from_parts(24_047_092, 3823) // Standard Error: 12 - .saturating_add(Weight::from_parts(6_274, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(6_227, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -457,10 +455,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `392` // Estimated: `3857` - // Minimum execution time: 59_732_000 picoseconds. - Weight::from_parts(53_002_061, 3857) + // Minimum execution time: 61_639_000 picoseconds. + Weight::from_parts(53_876_810, 3857) // Standard Error: 17 - .saturating_add(Weight::from_parts(14_107, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(14_193, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -474,8 +472,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 53_247_000 picoseconds. - Weight::from_parts(54_239_000, 3989) + // Minimum execution time: 55_130_000 picoseconds. + Weight::from_parts(56_847_000, 3989) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -491,10 +489,10 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `833` - // Estimated: `6773` - // Minimum execution time: 67_638_000 picoseconds. - Weight::from_parts(69_822_000, 6773) + // Measured: `867` + // Estimated: `6807` + // Minimum execution time: 69_290_000 picoseconds. + Weight::from_parts(70_060_000, 6807) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -508,8 +506,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 60_308_000 picoseconds. - Weight::from_parts(61_865_000, 4088) + // Minimum execution time: 62_337_000 picoseconds. + Weight::from_parts(63_539_000, 4088) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -521,8 +519,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `3558` - // Minimum execution time: 40_748_000 picoseconds. - Weight::from_parts(41_916_000, 3558) + // Minimum execution time: 41_961_000 picoseconds. + Weight::from_parts(42_796_000, 3558) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -536,8 +534,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `381` // Estimated: `3846` - // Minimum execution time: 19_441_000 picoseconds. - Weight::from_parts(19_775_000, 3846) + // Minimum execution time: 19_133_000 picoseconds. + Weight::from_parts(20_044_000, 3846) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -545,24 +543,24 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_031_000 picoseconds. - Weight::from_parts(9_266_076, 0) - // Standard Error: 205 - .saturating_add(Weight::from_parts(186_444, 0).saturating_mul(r.into())) + // Minimum execution time: 8_104_000 picoseconds. + Weight::from_parts(8_259_820, 0) + // Standard Error: 302 + .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 377_000 picoseconds. - Weight::from_parts(403_000, 0) + // Minimum execution time: 371_000 picoseconds. + Weight::from_parts(422_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 351_000 picoseconds. - Weight::from_parts(395_000, 0) + // Minimum execution time: 368_000 picoseconds. + Weight::from_parts(416_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -570,8 +568,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 11_287_000 picoseconds. - Weight::from_parts(12_022_000, 4088) + // Minimum execution time: 11_535_000 picoseconds. + Weight::from_parts(12_145_000, 4088) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) @@ -580,16 +578,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 9_933_000 picoseconds. - Weight::from_parts(10_470_000, 3938) + // Minimum execution time: 10_152_000 picoseconds. + Weight::from_parts(10_428_000, 3938) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `436` // Estimated: `0` - // Minimum execution time: 9_614_000 picoseconds. - Weight::from_parts(10_109_000, 0) + // Minimum execution time: 9_710_000 picoseconds. + Weight::from_parts(10_570_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -599,51 +597,51 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `545` // Estimated: `4010` - // Minimum execution time: 13_599_000 picoseconds. - Weight::from_parts(14_148_000, 4010) + // Minimum execution time: 13_438_000 picoseconds. + Weight::from_parts(14_006_000, 4010) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_161_000 picoseconds. - Weight::from_parts(1_257_000, 0) + // Minimum execution time: 1_169_000 picoseconds. + Weight::from_parts(1_324_000, 0) } fn caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_061_000 picoseconds. - Weight::from_parts(1_188_000, 0) + // Minimum execution time: 1_243_000 picoseconds. + Weight::from_parts(1_338_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 303_000 picoseconds. - Weight::from_parts(349_000, 0) + // Minimum execution time: 345_000 picoseconds. + Weight::from_parts(401_000, 0) } fn weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_143_000 picoseconds. - Weight::from_parts(1_283_000, 0) + // Minimum execution time: 1_216_000 picoseconds. + Weight::from_parts(1_378_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_827_000 picoseconds. - Weight::from_parts(1_929_000, 0) + // Minimum execution time: 1_939_000 picoseconds. + Weight::from_parts(2_037_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `610` + // Measured: `576` // Estimated: `0` - // Minimum execution time: 13_541_000 picoseconds. - Weight::from_parts(14_240_000, 0) + // Minimum execution time: 13_539_000 picoseconds. + Weight::from_parts(14_072_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -655,8 +653,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `884` // Estimated: `4349` - // Minimum execution time: 20_559_000 picoseconds. - Weight::from_parts(21_367_000, 4349) + // Minimum execution time: 20_505_000 picoseconds. + Weight::from_parts(21_180_000, 4349) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -666,10 +664,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `304 + n * (1 ±0)` // Estimated: `3769 + n * (1 ±0)` - // Minimum execution time: 5_923_000 picoseconds. - Weight::from_parts(6_753_149, 3769) - // Standard Error: 5 - .saturating_add(Weight::from_parts(523, 0).saturating_mul(n.into())) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_743_885, 3769) + // Standard Error: 4 + .saturating_add(Weight::from_parts(524, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -680,67 +678,67 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_101_000 picoseconds. - Weight::from_parts(2_465_888, 0) + // Minimum execution time: 2_219_000 picoseconds. + Weight::from_parts(2_464_264, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(472, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(487, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 293_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 308_000 picoseconds. + Weight::from_parts(340_000, 0) } fn minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_322_000 picoseconds. - Weight::from_parts(1_476_000, 0) + // Minimum execution time: 1_481_000 picoseconds. + Weight::from_parts(1_647_000, 0) } fn seal_return_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 324_000 picoseconds. + Weight::from_parts(348_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(330_000, 0) + // Minimum execution time: 284_000 picoseconds. + Weight::from_parts(318_000, 0) } fn seal_gas_limit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 293_000 picoseconds. - Weight::from_parts(339_000, 0) + // Minimum execution time: 287_000 picoseconds. + Weight::from_parts(337_000, 0) } fn seal_gas_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 986_000 picoseconds. - Weight::from_parts(1_085_000, 0) + // Minimum execution time: 1_094_000 picoseconds. + Weight::from_parts(1_239_000, 0) } fn seal_base_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 974_000 picoseconds. - Weight::from_parts(1_057_000, 0) + // Minimum execution time: 1_091_000 picoseconds. + Weight::from_parts(1_182_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 285_000 picoseconds. - Weight::from_parts(330_000, 0) + // Minimum execution time: 311_000 picoseconds. + Weight::from_parts(358_000, 0) } /// Storage: `Session::Validators` (r:1 w:0) /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -748,8 +746,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `141` // Estimated: `1626` - // Minimum execution time: 21_803_000 picoseconds. - Weight::from_parts(22_360_000, 1626) + // Minimum execution time: 21_954_000 picoseconds. + Weight::from_parts(22_476_000, 1626) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::BlockHash` (r:1 w:0) @@ -758,24 +756,24 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `318` // Estimated: `3783` - // Minimum execution time: 5_906_000 picoseconds. - Weight::from_parts(6_201_000, 3783) + // Minimum execution time: 5_659_000 picoseconds. + Weight::from_parts(6_107_000, 3783) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 307_000 picoseconds. - Weight::from_parts(347_000, 0) + // Minimum execution time: 281_000 picoseconds. + Weight::from_parts(324_000, 0) } /// The range of component `n` is `[0, 1048572]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 453_000 picoseconds. - Weight::from_parts(489_000, 0) + // Minimum execution time: 475_000 picoseconds. + Weight::from_parts(65_586, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(203, 0).saturating_mul(n.into())) } @@ -783,47 +781,50 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 289_000 picoseconds. - Weight::from_parts(343_000, 0) + // Minimum execution time: 304_000 picoseconds. + Weight::from_parts(339_000, 0) } /// The range of component `n` is `[0, 1048576]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 280_000 picoseconds. - Weight::from_parts(496_576, 0) + // Minimum execution time: 299_000 picoseconds. + Weight::from_parts(319_000, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(114, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 131072]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 305_000 picoseconds. - Weight::from_parts(529_465, 0) + // Minimum execution time: 332_000 picoseconds. + Weight::from_parts(639_720, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(200, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(198, 0).saturating_mul(n.into())) } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// The range of component `r` is `[0, 1]`. - fn seal_terminate(r: u32, ) -> Weight { + fn seal_terminate(_r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 927_000 picoseconds. - Weight::from_parts(1_059_312, 0) - // Standard Error: 6_858 - .saturating_add(Weight::from_parts(13_287, 0).saturating_mul(r.into())) + // Measured: `924` + // Estimated: `6864` + // Minimum execution time: 20_463_000 picoseconds. + Weight::from_parts(21_695_959, 6864) + .saturating_add(T::DbWeight::get().reads(2_u64)) } - /// Storage: `Revive::DeletionQueueCounter` (r:1 w:1) - /// Proof: `Revive::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) - /// Storage: `Revive::CodeInfoOf` (r:1 w:1) - /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) - /// Storage: `Balances::Holds` (r:1 w:1) + /// Storage: `Balances::Holds` (r:2 w:2) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(463), added: 2938, mode: `Measured`) + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Revive::CodeInfoOf` (r:1 w:1) + /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) + /// Storage: `Revive::DeletionQueueCounter` (r:1 w:1) + /// Proof: `Revive::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) /// Storage: `Revive::DeletionQueue` (r:0 w:1) /// Proof: `Revive::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) /// Storage: `Revive::PristineCode` (r:0 w:1) @@ -832,12 +833,12 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Revive::ImmutableDataOf` (`max_values`: None, `max_size`: Some(4118), added: 6593, mode: `Measured`) fn seal_terminate_logic() -> Weight { // Proof Size summary in bytes: - // Measured: `1050` - // Estimated: `6990` - // Minimum execution time: 118_234_000 picoseconds. - Weight::from_parts(122_191_000, 6990) - .saturating_add(T::DbWeight::get().reads(5_u64)) - .saturating_add(T::DbWeight::get().writes(8_u64)) + // Measured: `1440` + // Estimated: `7380` + // Minimum execution time: 256_587_000 picoseconds. + Weight::from_parts(261_722_000, 7380) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 65536]`. @@ -845,10 +846,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_221_000 picoseconds. - Weight::from_parts(5_319_000, 0) + // Minimum execution time: 5_346_000 picoseconds. + Weight::from_parts(5_415_000, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(1_209, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_191, 0).saturating_mul(n.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -856,8 +857,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 7_453_000 picoseconds. - Weight::from_parts(7_862_000, 648) + // Minimum execution time: 7_570_000 picoseconds. + Weight::from_parts(7_788_000, 648) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -866,8 +867,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 41_255_000 picoseconds. - Weight::from_parts(42_397_000, 10658) + // Minimum execution time: 41_676_000 picoseconds. + Weight::from_parts(43_110_000, 10658) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -876,8 +877,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 8_727_000 picoseconds. - Weight::from_parts(9_104_000, 648) + // Minimum execution time: 8_455_000 picoseconds. + Weight::from_parts(8_988_000, 648) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -887,8 +888,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 43_313_000 picoseconds. - Weight::from_parts(44_570_000, 10658) + // Minimum execution time: 43_797_000 picoseconds. + Weight::from_parts(44_900_000, 10658) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -897,16 +898,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn seal_set_storage(n: u32, o: u32, _c: u32, ) -> Weight { + fn seal_set_storage(n: u32, o: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` - // Estimated: `247 + o * (1 ±0)` - // Minimum execution time: 9_291_000 picoseconds. - Weight::from_parts(10_116_310, 247) + // Estimated: `246 + o * (1 ±0)` + // Minimum execution time: 9_561_000 picoseconds. + Weight::from_parts(10_050_003, 246) // Standard Error: 56 - .saturating_add(Weight::from_parts(562, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(227, 0).saturating_mul(n.into())) // Standard Error: 56 - .saturating_add(Weight::from_parts(766, 0).saturating_mul(o.into())) + .saturating_add(Weight::from_parts(797, 0).saturating_mul(o.into())) + // Standard Error: 14_979 + .saturating_add(Weight::from_parts(563_324, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -915,12 +918,14 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn clear_storage(_n: u32, _c: u32, ) -> Weight { + fn clear_storage(_n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_317_000 picoseconds. - Weight::from_parts(12_313_550, 376) + // Minimum execution time: 11_381_000 picoseconds. + Weight::from_parts(12_358_640, 376) + // Standard Error: 16_536 + .saturating_add(Weight::from_parts(143_265, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -928,14 +933,16 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn seal_get_storage(n: u32, _c: u32, ) -> Weight { + fn seal_get_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` - // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_259_000 picoseconds. - Weight::from_parts(9_579_511, 247) - // Standard Error: 89 - .saturating_add(Weight::from_parts(1_569, 0).saturating_mul(n.into())) + // Estimated: `246 + n * (1 ±0)` + // Minimum execution time: 8_472_000 picoseconds. + Weight::from_parts(8_817_242, 246) + // Standard Error: 56 + .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(n.into())) + // Standard Error: 15_439 + .saturating_add(Weight::from_parts(572_818, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -943,25 +950,31 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn contains_storage(_n: u32, _c: u32, ) -> Weight { + fn contains_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_296_000 picoseconds. - Weight::from_parts(3_670_971, 0) + // Minimum execution time: 3_397_000 picoseconds. + Weight::from_parts(3_681_057, 0) + // Standard Error: 26 + .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) + // Standard Error: 7_208 + .saturating_add(Weight::from_parts(63_383, 0).saturating_mul(c.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn take_storage(n: u32, _c: u32, ) -> Weight { + fn take_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_660_000 picoseconds. - Weight::from_parts(12_798_428, 376) - // Standard Error: 94 - .saturating_add(Weight::from_parts(571, 0).saturating_mul(n.into())) + // Minimum execution time: 11_586_000 picoseconds. + Weight::from_parts(12_575_248, 376) + // Standard Error: 63 + .saturating_add(Weight::from_parts(172, 0).saturating_mul(n.into())) + // Standard Error: 17_323 + .saturating_add(Weight::from_parts(254_003, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -969,36 +982,36 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_749_000, 0) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(1_730_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_986_000 picoseconds. - Weight::from_parts(2_063_000, 0) + // Minimum execution time: 1_924_000 picoseconds. + Weight::from_parts(2_058_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_596_000 picoseconds. - Weight::from_parts(1_702_000, 0) + // Minimum execution time: 1_511_000 picoseconds. + Weight::from_parts(1_644_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_786_000 picoseconds. - Weight::from_parts(1_893_000, 0) + // Minimum execution time: 1_690_000 picoseconds. + Weight::from_parts(1_812_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_252_000 picoseconds. - Weight::from_parts(1_339_000, 0) + // Minimum execution time: 1_278_000 picoseconds. + Weight::from_parts(1_439_000, 0) } /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. @@ -1006,48 +1019,46 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_331_000 picoseconds. - Weight::from_parts(2_642_531, 0) + // Minimum execution time: 2_413_000 picoseconds. + Weight::from_parts(2_680_258, 0) // Standard Error: 17 - .saturating_add(Weight::from_parts(234, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into())) // Standard Error: 17 - .saturating_add(Weight::from_parts(356, 0).saturating_mul(o.into())) + .saturating_add(Weight::from_parts(378, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 416]`. - fn seal_clear_transient_storage(n: u32, ) -> Weight { + fn seal_clear_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_897_000 picoseconds. - Weight::from_parts(4_214_505, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(192, 0).saturating_mul(n.into())) + // Minimum execution time: 3_919_000 picoseconds. + Weight::from_parts(4_288_312, 0) } /// The range of component `n` is `[0, 416]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_008_000 picoseconds. - Weight::from_parts(2_260_857, 0) - // Standard Error: 19 - .saturating_add(Weight::from_parts(334, 0).saturating_mul(n.into())) + // Minimum execution time: 2_049_000 picoseconds. + Weight::from_parts(2_286_020, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(322, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 416]`. fn seal_contains_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_387_000 picoseconds. - Weight::from_parts(3_823_784, 0) + // Minimum execution time: 3_384_000 picoseconds. + Weight::from_parts(3_742_807, 0) } /// The range of component `n` is `[0, 416]`. fn seal_take_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_105_000 picoseconds. - Weight::from_parts(4_590_927, 0) + // Minimum execution time: 4_162_000 picoseconds. + Weight::from_parts(4_589_040, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1064,16 +1075,16 @@ impl WeightInfo for SubstrateWeight { /// The range of component `i` is `[0, 1048576]`. fn seal_call(t: u32, d: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2129` - // Estimated: `5594` - // Minimum execution time: 96_945_000 picoseconds. - Weight::from_parts(82_723_058, 5594) - // Standard Error: 197_185 - .saturating_add(Weight::from_parts(17_112_972, 0).saturating_mul(t.into())) - // Standard Error: 197_185 - .saturating_add(Weight::from_parts(23_554_105, 0).saturating_mul(d.into())) + // Measured: `2006` + // Estimated: `5471` + // Minimum execution time: 98_041_000 picoseconds. + Weight::from_parts(78_973_555, 5471) + // Standard Error: 190_245 + .saturating_add(Weight::from_parts(19_160_365, 0).saturating_mul(t.into())) + // Standard Error: 190_245 + .saturating_add(Weight::from_parts(24_103_133, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(1, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) @@ -1088,12 +1099,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `436 + d * (212 ±0)` // Estimated: `2056 + d * (2056 ±0)` - // Minimum execution time: 26_713_000 picoseconds. - Weight::from_parts(15_979_369, 2056) - // Standard Error: 53_691 - .saturating_add(Weight::from_parts(11_856_790, 0).saturating_mul(d.into())) + // Minimum execution time: 26_273_000 picoseconds. + Weight::from_parts(15_380_404, 2056) + // Standard Error: 61_413 + .saturating_add(Weight::from_parts(12_108_999, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(326, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(330, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(d.into()))) .saturating_add(Weight::from_parts(0, 2056).saturating_mul(d.into())) @@ -1108,8 +1119,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1434` // Estimated: `4899` - // Minimum execution time: 35_156_000 picoseconds. - Weight::from_parts(36_008_000, 4899) + // Minimum execution time: 35_262_000 picoseconds. + Weight::from_parts(36_904_000, 4899) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -1125,20 +1136,20 @@ impl WeightInfo for SubstrateWeight { /// The range of component `i` is `[0, 131072]`. fn seal_instantiate(t: u32, d: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1484` - // Estimated: `4921 + d * (31 ±1) + t * (31 ±1)` - // Minimum execution time: 158_623_000 picoseconds. - Weight::from_parts(119_635_514, 4921) - // Standard Error: 509_096 - .saturating_add(Weight::from_parts(17_183_470, 0).saturating_mul(t.into())) - // Standard Error: 509_096 - .saturating_add(Weight::from_parts(27_676_190, 0).saturating_mul(d.into())) - // Standard Error: 5 - .saturating_add(Weight::from_parts(3_929, 0).saturating_mul(i.into())) + // Measured: `1450` + // Estimated: `4900 + d * (27 ±1) + t * (27 ±1)` + // Minimum execution time: 161_202_000 picoseconds. + Weight::from_parts(118_049_370, 4900) + // Standard Error: 548_380 + .saturating_add(Weight::from_parts(21_408_479, 0).saturating_mul(t.into())) + // Standard Error: 548_380 + .saturating_add(Weight::from_parts(29_259_452, 0).saturating_mul(d.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(3_911, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(t.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(t.into())) } /// Storage: `Revive::AccountInfoOf` (r:1 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -1157,14 +1168,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `869` // Estimated: `6829` - // Minimum execution time: 375_311_000 picoseconds. - Weight::from_parts(238_984_394, 6829) - // Standard Error: 687_857 - .saturating_add(Weight::from_parts(21_371_046, 0).saturating_mul(t.into())) - // Standard Error: 687_857 - .saturating_add(Weight::from_parts(28_395_391, 0).saturating_mul(d.into())) - // Standard Error: 27 - .saturating_add(Weight::from_parts(8_472, 0).saturating_mul(i.into())) + // Minimum execution time: 382_446_000 picoseconds. + Weight::from_parts(261_013_451, 6829) + // Standard Error: 650_354 + .saturating_add(Weight::from_parts(13_883_476, 0).saturating_mul(t.into())) + // Standard Error: 650_354 + .saturating_add(Weight::from_parts(24_757_856, 0).saturating_mul(d.into())) + // Standard Error: 25 + .saturating_add(Weight::from_parts(8_095, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1173,125 +1184,125 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_346_000 picoseconds. - Weight::from_parts(9_536_684, 0) + // Minimum execution time: 1_363_000 picoseconds. + Weight::from_parts(13_026_953, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_239, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_231, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn identity(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 799_000 picoseconds. - Weight::from_parts(759_415, 0) + // Minimum execution time: 836_000 picoseconds. + Weight::from_parts(857_621, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(112, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn ripemd_160(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_377_000 picoseconds. - Weight::from_parts(6_797_388, 0) + // Minimum execution time: 1_350_000 picoseconds. + Weight::from_parts(4_141_101, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_733, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_743, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_129_000 picoseconds. - Weight::from_parts(14_992_965, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_543, 0).saturating_mul(n.into())) + // Minimum execution time: 1_211_000 picoseconds. + Weight::from_parts(11_345_193, 0) + // Standard Error: 0 + .saturating_add(Weight::from_parts(3_542, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_873_000 picoseconds. - Weight::from_parts(13_180_808, 0) + // Minimum execution time: 1_838_000 picoseconds. + Weight::from_parts(12_083_796, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_398, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_854_000 picoseconds. - Weight::from_parts(12_306_060, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) + // Minimum execution time: 1_888_000 picoseconds. + Weight::from_parts(13_484_713, 0) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_397, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048321]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 47_104_000 picoseconds. - Weight::from_parts(80_861_678, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(4_830, 0).saturating_mul(n.into())) + // Minimum execution time: 45_330_000 picoseconds. + Weight::from_parts(97_195_127, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(4_792, 0).saturating_mul(n.into())) } fn ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_698_000 picoseconds. - Weight::from_parts(47_673_000, 0) + // Minimum execution time: 46_259_000 picoseconds. + Weight::from_parts(47_123_000, 0) } fn p256_verify() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_791_033_000 picoseconds. - Weight::from_parts(1_801_147_000, 0) + // Minimum execution time: 1_785_460_000 picoseconds. + Weight::from_parts(1_792_839_000, 0) } fn bn128_add() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_836_000 picoseconds. - Weight::from_parts(16_004_000, 0) + // Minimum execution time: 15_037_000 picoseconds. + Weight::from_parts(16_276_000, 0) } fn bn128_mul() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 979_455_000 picoseconds. - Weight::from_parts(988_686_000, 0) + // Minimum execution time: 995_799_000 picoseconds. + Weight::from_parts(1_001_153_000, 0) } /// The range of component `n` is `[0, 20]`. fn bn128_pairing(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 938_000 picoseconds. - Weight::from_parts(4_848_308_436, 0) - // Standard Error: 10_255_035 - .saturating_add(Weight::from_parts(5_920_112_189, 0).saturating_mul(n.into())) + // Minimum execution time: 939_000 picoseconds. + Weight::from_parts(5_024_029_661, 0) + // Standard Error: 10_709_223 + .saturating_add(Weight::from_parts(6_097_358_170, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1200]`. fn blake2f(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_070_000 picoseconds. - Weight::from_parts(1_284_385, 0) - // Standard Error: 54 - .saturating_add(Weight::from_parts(28_398, 0).saturating_mul(n.into())) + // Minimum execution time: 1_081_000 picoseconds. + Weight::from_parts(1_400_190, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(28_307, 0).saturating_mul(n.into())) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_180_000 picoseconds. - Weight::from_parts(13_387_000, 0) + // Minimum execution time: 13_140_000 picoseconds. + Weight::from_parts(13_332_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:2 w:2) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) @@ -1304,47 +1315,47 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 1]`. fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `424 + r * (434 ±0)` - // Estimated: `6364 + r * (2162 ±0)` - // Minimum execution time: 14_799_000 picoseconds. - Weight::from_parts(15_922_167, 6364) - // Standard Error: 52_549 - .saturating_add(Weight::from_parts(47_258_332, 0).saturating_mul(r.into())) + // Measured: `420 + r * (401 ±0)` + // Estimated: `6360 + r * (2143 ±0)` + // Minimum execution time: 14_847_000 picoseconds. + Weight::from_parts(15_868_655, 6360) + // Standard Error: 57_150 + .saturating_add(Weight::from_parts(49_102_844, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2162).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2143).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn evm_opcode(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 550_000 picoseconds. - Weight::from_parts(1_050_932, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(15_280, 0).saturating_mul(r.into())) + // Minimum execution time: 640_000 picoseconds. + Weight::from_parts(722_843, 0) + // Standard Error: 22 + .saturating_add(Weight::from_parts(15_334, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_061_000 picoseconds. - Weight::from_parts(62_740_927, 0) - // Standard Error: 361 - .saturating_add(Weight::from_parts(123_285, 0).saturating_mul(r.into())) + // Minimum execution time: 13_904_000 picoseconds. + Weight::from_parts(67_713_763, 0) + // Standard Error: 412 + .saturating_add(Weight::from_parts(112_584, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr_empty_loop(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_326_000 picoseconds. - Weight::from_parts(3_151_099, 0) - // Standard Error: 50 - .saturating_add(Weight::from_parts(74_055, 0).saturating_mul(r.into())) + // Minimum execution time: 3_496_000 picoseconds. + Weight::from_parts(3_311_333, 0) + // Standard Error: 30 + .saturating_add(Weight::from_parts(72_707, 0).saturating_mul(r.into())) } /// Storage: `Revive::PristineCode` (r:1 w:0) /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1353,10 +1364,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `527 + n * (1 ±0)` // Estimated: `3992 + n * (1 ±0)` - // Minimum execution time: 14_656_000 picoseconds. - Weight::from_parts(14_686_037, 3992) - // Standard Error: 4 - .saturating_add(Weight::from_parts(724, 0).saturating_mul(n.into())) + // Minimum execution time: 14_441_000 picoseconds. + Weight::from_parts(14_702_114, 3992) + // Standard Error: 11 + .saturating_add(Weight::from_parts(716, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1368,8 +1379,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `6322` - // Minimum execution time: 12_331_000 picoseconds. - Weight::from_parts(12_868_000, 6322) + // Minimum execution time: 12_343_000 picoseconds. + Weight::from_parts(12_780_000, 6322) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1383,8 +1394,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6866` - // Minimum execution time: 63_102_000 picoseconds. - Weight::from_parts(65_300_000, 6866) + // Minimum execution time: 65_381_000 picoseconds. + Weight::from_parts(67_303_000, 6866) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -1405,10 +1416,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3012 + n * (97 ±0)` // Estimated: `6303 + n * (104 ±0)` - // Minimum execution time: 26_639_000 picoseconds. - Weight::from_parts(56_482_010, 6303) - // Standard Error: 4_704 - .saturating_add(Weight::from_parts(522_203, 0).saturating_mul(n.into())) + // Minimum execution time: 27_258_000 picoseconds. + Weight::from_parts(54_578_010, 6303) + // Standard Error: 4_419 + .saturating_add(Weight::from_parts(521_073, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 104).saturating_mul(n.into())) @@ -1430,10 +1441,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3577 + d * (3 ±0)` // Estimated: `7036 + d * (3 ±0)` - // Minimum execution time: 59_432_000 picoseconds. - Weight::from_parts(61_955_716, 7036) - // Standard Error: 157 - .saturating_add(Weight::from_parts(12_327, 0).saturating_mul(d.into())) + // Minimum execution time: 59_373_000 picoseconds. + Weight::from_parts(61_916_032, 7036) + // Standard Error: 133 + .saturating_add(Weight::from_parts(11_875, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(d.into())) @@ -1453,14 +1464,12 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `e` is `[0, 100]`. - fn on_finalize_per_event(e: u32, ) -> Weight { + fn on_finalize_per_event(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_652_000 picoseconds. - Weight::from_parts(46_489_107, 5011) - // Standard Error: 1_089 - .saturating_add(Weight::from_parts(4_596, 0).saturating_mul(e.into())) + // Minimum execution time: 44_149_000 picoseconds. + Weight::from_parts(46_414_395, 5011) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1479,14 +1488,12 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `d` is `[0, 16384]`. - fn on_finalize_per_event_data(d: u32, ) -> Weight { + fn on_finalize_per_event_data(_d: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_400_000 picoseconds. - Weight::from_parts(46_629_995, 5011) - // Standard Error: 6 - .saturating_add(Weight::from_parts(21, 0).saturating_mul(d.into())) + // Minimum execution time: 44_382_000 picoseconds. + Weight::from_parts(46_379_406, 5011) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1500,8 +1507,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `213` // Estimated: `1698` - // Minimum execution time: 3_325_000 picoseconds. - Weight::from_parts(3_509_000, 1698) + // Minimum execution time: 3_154_000 picoseconds. + Weight::from_parts(3_405_000, 1698) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -1511,10 +1518,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `491 + k * (69 ±0)` // Estimated: `481 + k * (70 ±0)` - // Minimum execution time: 14_389_000 picoseconds. - Weight::from_parts(15_127_000, 481) - // Standard Error: 1_039 - .saturating_add(Weight::from_parts(1_209_966, 0).saturating_mul(k.into())) + // Minimum execution time: 14_582_000 picoseconds. + Weight::from_parts(14_895_000, 481) + // Standard Error: 1_943 + .saturating_add(Weight::from_parts(1_250_682, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -1538,10 +1545,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1265 + c * (1 ±0)` // Estimated: `7200 + c * (1 ±0)` - // Minimum execution time: 100_357_000 picoseconds. - Weight::from_parts(143_652_444, 7200) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_441, 0).saturating_mul(c.into())) + // Minimum execution time: 99_711_000 picoseconds. + Weight::from_parts(152_217_303, 7200) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_382, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -1559,14 +1566,12 @@ impl WeightInfo for () { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) /// The range of component `c` is `[1, 10240]`. - fn call_with_evm_code_per_byte(c: u32, ) -> Weight { + fn call_with_evm_code_per_byte(_c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1205` // Estimated: `7144` - // Minimum execution time: 92_748_000 picoseconds. - Weight::from_parts(97_747_165, 7144) - // Standard Error: 24 - .saturating_add(Weight::from_parts(46, 0).saturating_mul(c.into())) + // Minimum execution time: 94_712_000 picoseconds. + Weight::from_parts(99_302_408, 7144) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1587,10 +1592,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `4609` // Estimated: `10549` - // Minimum execution time: 144_014_000 picoseconds. - Weight::from_parts(149_812_683, 10549) - // Standard Error: 724_905 - .saturating_add(Weight::from_parts(1_749_116, 0).saturating_mul(b.into())) + // Minimum execution time: 150_260_000 picoseconds. + Weight::from_parts(155_718_240, 10549) + // Standard Error: 621_625 + .saturating_add(Weight::from_parts(2_843_759, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1614,12 +1619,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6924` - // Minimum execution time: 773_080_000 picoseconds. - Weight::from_parts(70_290_148, 6924) - // Standard Error: 37 - .saturating_add(Weight::from_parts(20_365, 0).saturating_mul(c.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(5_006, 0).saturating_mul(i.into())) + // Minimum execution time: 779_431_000 picoseconds. + Weight::from_parts(74_223_269, 6924) + // Standard Error: 39 + .saturating_add(Weight::from_parts(20_177, 0).saturating_mul(c.into())) + // Standard Error: 31 + .saturating_add(Weight::from_parts(5_066, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1648,14 +1653,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6934` - // Minimum execution time: 405_718_000 picoseconds. - Weight::from_parts(270_737_149, 6934) - // Standard Error: 44 - .saturating_add(Weight::from_parts(15_826, 0).saturating_mul(c.into())) - // Standard Error: 34 - .saturating_add(Weight::from_parts(660, 0).saturating_mul(i.into())) - // Standard Error: 2_902_398 - .saturating_add(Weight::from_parts(8_450_702, 0).saturating_mul(d.into())) + // Minimum execution time: 392_839_000 picoseconds. + Weight::from_parts(306_119_258, 6934) + // Standard Error: 41 + .saturating_add(Weight::from_parts(15_749, 0).saturating_mul(c.into())) + // Standard Error: 32 + .saturating_add(Weight::from_parts(456, 0).saturating_mul(i.into())) + // Standard Error: 2_738_762 + .saturating_add(Weight::from_parts(2_532_218, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -1663,8 +1668,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_011_000 picoseconds. - Weight::from_parts(3_274_000, 0) + // Minimum execution time: 3_082_000 picoseconds. + Weight::from_parts(3_298_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:2 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -1684,11 +1689,11 @@ impl WeightInfo for () { fn instantiate(i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1735` - // Estimated: `7665` - // Minimum execution time: 187_515_000 picoseconds. - Weight::from_parts(194_934_584, 7665) + // Estimated: `7668` + // Minimum execution time: 196_938_000 picoseconds. + Weight::from_parts(199_086_558, 7668) // Standard Error: 11 - .saturating_add(Weight::from_parts(4_151, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_155, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -1708,8 +1713,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 104_210_000 picoseconds. - Weight::from_parts(110_220_000, 7887) + // Minimum execution time: 104_369_000 picoseconds. + Weight::from_parts(106_866_000, 7887) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1734,10 +1739,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 179_230_000 picoseconds. - Weight::from_parts(189_040_259, 7887) - // Standard Error: 869_758 - .saturating_add(Weight::from_parts(4_172_840, 0).saturating_mul(d.into())) + // Minimum execution time: 182_578_000 picoseconds. + Weight::from_parts(191_542_185, 7887) + // Standard Error: 879_036 + .saturating_add(Weight::from_parts(1_872_614, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -1754,10 +1759,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `358` // Estimated: `3823` - // Minimum execution time: 28_233_000 picoseconds. - Weight::from_parts(22_905_261, 3823) + // Minimum execution time: 28_267_000 picoseconds. + Weight::from_parts(24_047_092, 3823) // Standard Error: 12 - .saturating_add(Weight::from_parts(6_274, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(6_227, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1774,10 +1779,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `392` // Estimated: `3857` - // Minimum execution time: 59_732_000 picoseconds. - Weight::from_parts(53_002_061, 3857) + // Minimum execution time: 61_639_000 picoseconds. + Weight::from_parts(53_876_810, 3857) // Standard Error: 17 - .saturating_add(Weight::from_parts(14_107, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(14_193, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1791,8 +1796,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 53_247_000 picoseconds. - Weight::from_parts(54_239_000, 3989) + // Minimum execution time: 55_130_000 picoseconds. + Weight::from_parts(56_847_000, 3989) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1808,10 +1813,10 @@ impl WeightInfo for () { /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `833` - // Estimated: `6773` - // Minimum execution time: 67_638_000 picoseconds. - Weight::from_parts(69_822_000, 6773) + // Measured: `867` + // Estimated: `6807` + // Minimum execution time: 69_290_000 picoseconds. + Weight::from_parts(70_060_000, 6807) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1825,8 +1830,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 60_308_000 picoseconds. - Weight::from_parts(61_865_000, 4088) + // Minimum execution time: 62_337_000 picoseconds. + Weight::from_parts(63_539_000, 4088) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1838,8 +1843,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `3558` - // Minimum execution time: 40_748_000 picoseconds. - Weight::from_parts(41_916_000, 3558) + // Minimum execution time: 41_961_000 picoseconds. + Weight::from_parts(42_796_000, 3558) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1853,8 +1858,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `381` // Estimated: `3846` - // Minimum execution time: 19_441_000 picoseconds. - Weight::from_parts(19_775_000, 3846) + // Minimum execution time: 19_133_000 picoseconds. + Weight::from_parts(20_044_000, 3846) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -1862,24 +1867,24 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_031_000 picoseconds. - Weight::from_parts(9_266_076, 0) - // Standard Error: 205 - .saturating_add(Weight::from_parts(186_444, 0).saturating_mul(r.into())) + // Minimum execution time: 8_104_000 picoseconds. + Weight::from_parts(8_259_820, 0) + // Standard Error: 302 + .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 377_000 picoseconds. - Weight::from_parts(403_000, 0) + // Minimum execution time: 371_000 picoseconds. + Weight::from_parts(422_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 351_000 picoseconds. - Weight::from_parts(395_000, 0) + // Minimum execution time: 368_000 picoseconds. + Weight::from_parts(416_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1887,8 +1892,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 11_287_000 picoseconds. - Weight::from_parts(12_022_000, 4088) + // Minimum execution time: 11_535_000 picoseconds. + Weight::from_parts(12_145_000, 4088) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) @@ -1897,16 +1902,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 9_933_000 picoseconds. - Weight::from_parts(10_470_000, 3938) + // Minimum execution time: 10_152_000 picoseconds. + Weight::from_parts(10_428_000, 3938) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `436` // Estimated: `0` - // Minimum execution time: 9_614_000 picoseconds. - Weight::from_parts(10_109_000, 0) + // Minimum execution time: 9_710_000 picoseconds. + Weight::from_parts(10_570_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -1916,51 +1921,51 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `545` // Estimated: `4010` - // Minimum execution time: 13_599_000 picoseconds. - Weight::from_parts(14_148_000, 4010) + // Minimum execution time: 13_438_000 picoseconds. + Weight::from_parts(14_006_000, 4010) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_161_000 picoseconds. - Weight::from_parts(1_257_000, 0) + // Minimum execution time: 1_169_000 picoseconds. + Weight::from_parts(1_324_000, 0) } fn caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_061_000 picoseconds. - Weight::from_parts(1_188_000, 0) + // Minimum execution time: 1_243_000 picoseconds. + Weight::from_parts(1_338_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 303_000 picoseconds. - Weight::from_parts(349_000, 0) + // Minimum execution time: 345_000 picoseconds. + Weight::from_parts(401_000, 0) } fn weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_143_000 picoseconds. - Weight::from_parts(1_283_000, 0) + // Minimum execution time: 1_216_000 picoseconds. + Weight::from_parts(1_378_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_827_000 picoseconds. - Weight::from_parts(1_929_000, 0) + // Minimum execution time: 1_939_000 picoseconds. + Weight::from_parts(2_037_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: - // Measured: `610` + // Measured: `576` // Estimated: `0` - // Minimum execution time: 13_541_000 picoseconds. - Weight::from_parts(14_240_000, 0) + // Minimum execution time: 13_539_000 picoseconds. + Weight::from_parts(14_072_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1972,8 +1977,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `884` // Estimated: `4349` - // Minimum execution time: 20_559_000 picoseconds. - Weight::from_parts(21_367_000, 4349) + // Minimum execution time: 20_505_000 picoseconds. + Weight::from_parts(21_180_000, 4349) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -1983,10 +1988,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `304 + n * (1 ±0)` // Estimated: `3769 + n * (1 ±0)` - // Minimum execution time: 5_923_000 picoseconds. - Weight::from_parts(6_753_149, 3769) - // Standard Error: 5 - .saturating_add(Weight::from_parts(523, 0).saturating_mul(n.into())) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_743_885, 3769) + // Standard Error: 4 + .saturating_add(Weight::from_parts(524, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1997,67 +2002,67 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_101_000 picoseconds. - Weight::from_parts(2_465_888, 0) + // Minimum execution time: 2_219_000 picoseconds. + Weight::from_parts(2_464_264, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(472, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(487, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 293_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 308_000 picoseconds. + Weight::from_parts(340_000, 0) } fn minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_322_000 picoseconds. - Weight::from_parts(1_476_000, 0) + // Minimum execution time: 1_481_000 picoseconds. + Weight::from_parts(1_647_000, 0) } fn seal_return_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 324_000 picoseconds. + Weight::from_parts(348_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(330_000, 0) + // Minimum execution time: 284_000 picoseconds. + Weight::from_parts(318_000, 0) } fn seal_gas_limit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 293_000 picoseconds. - Weight::from_parts(339_000, 0) + // Minimum execution time: 287_000 picoseconds. + Weight::from_parts(337_000, 0) } fn seal_gas_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 986_000 picoseconds. - Weight::from_parts(1_085_000, 0) + // Minimum execution time: 1_094_000 picoseconds. + Weight::from_parts(1_239_000, 0) } fn seal_base_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 974_000 picoseconds. - Weight::from_parts(1_057_000, 0) + // Minimum execution time: 1_091_000 picoseconds. + Weight::from_parts(1_182_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 285_000 picoseconds. - Weight::from_parts(330_000, 0) + // Minimum execution time: 311_000 picoseconds. + Weight::from_parts(358_000, 0) } /// Storage: `Session::Validators` (r:1 w:0) /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -2065,8 +2070,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `141` // Estimated: `1626` - // Minimum execution time: 21_803_000 picoseconds. - Weight::from_parts(22_360_000, 1626) + // Minimum execution time: 21_954_000 picoseconds. + Weight::from_parts(22_476_000, 1626) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::BlockHash` (r:1 w:0) @@ -2075,24 +2080,24 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `318` // Estimated: `3783` - // Minimum execution time: 5_906_000 picoseconds. - Weight::from_parts(6_201_000, 3783) + // Minimum execution time: 5_659_000 picoseconds. + Weight::from_parts(6_107_000, 3783) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 307_000 picoseconds. - Weight::from_parts(347_000, 0) + // Minimum execution time: 281_000 picoseconds. + Weight::from_parts(324_000, 0) } /// The range of component `n` is `[0, 1048572]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 453_000 picoseconds. - Weight::from_parts(489_000, 0) + // Minimum execution time: 475_000 picoseconds. + Weight::from_parts(65_586, 0) // Standard Error: 0 .saturating_add(Weight::from_parts(203, 0).saturating_mul(n.into())) } @@ -2100,47 +2105,50 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 289_000 picoseconds. - Weight::from_parts(343_000, 0) + // Minimum execution time: 304_000 picoseconds. + Weight::from_parts(339_000, 0) } /// The range of component `n` is `[0, 1048576]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 280_000 picoseconds. - Weight::from_parts(496_576, 0) + // Minimum execution time: 299_000 picoseconds. + Weight::from_parts(319_000, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(114, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 131072]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 305_000 picoseconds. - Weight::from_parts(529_465, 0) + // Minimum execution time: 332_000 picoseconds. + Weight::from_parts(639_720, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(200, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(198, 0).saturating_mul(n.into())) } + /// Storage: `Revive::OriginalAccount` (r:2 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// The range of component `r` is `[0, 1]`. - fn seal_terminate(r: u32, ) -> Weight { + fn seal_terminate(_r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 927_000 picoseconds. - Weight::from_parts(1_059_312, 0) - // Standard Error: 6_858 - .saturating_add(Weight::from_parts(13_287, 0).saturating_mul(r.into())) + // Measured: `924` + // Estimated: `6864` + // Minimum execution time: 20_463_000 picoseconds. + Weight::from_parts(21_695_959, 6864) + .saturating_add(RocksDbWeight::get().reads(2_u64)) } - /// Storage: `Revive::DeletionQueueCounter` (r:1 w:1) - /// Proof: `Revive::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) - /// Storage: `Revive::CodeInfoOf` (r:1 w:1) - /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) - /// Storage: `Balances::Holds` (r:1 w:1) + /// Storage: `Balances::Holds` (r:2 w:2) /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(463), added: 2938, mode: `Measured`) + /// Storage: `Revive::OriginalAccount` (r:1 w:0) + /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Revive::CodeInfoOf` (r:1 w:1) + /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) + /// Storage: `Revive::DeletionQueueCounter` (r:1 w:1) + /// Proof: `Revive::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) /// Storage: `Revive::DeletionQueue` (r:0 w:1) /// Proof: `Revive::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) /// Storage: `Revive::PristineCode` (r:0 w:1) @@ -2149,12 +2157,12 @@ impl WeightInfo for () { /// Proof: `Revive::ImmutableDataOf` (`max_values`: None, `max_size`: Some(4118), added: 6593, mode: `Measured`) fn seal_terminate_logic() -> Weight { // Proof Size summary in bytes: - // Measured: `1050` - // Estimated: `6990` - // Minimum execution time: 118_234_000 picoseconds. - Weight::from_parts(122_191_000, 6990) - .saturating_add(RocksDbWeight::get().reads(5_u64)) - .saturating_add(RocksDbWeight::get().writes(8_u64)) + // Measured: `1440` + // Estimated: `7380` + // Minimum execution time: 256_587_000 picoseconds. + Weight::from_parts(261_722_000, 7380) + .saturating_add(RocksDbWeight::get().reads(7_u64)) + .saturating_add(RocksDbWeight::get().writes(9_u64)) } /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 65536]`. @@ -2162,10 +2170,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_221_000 picoseconds. - Weight::from_parts(5_319_000, 0) + // Minimum execution time: 5_346_000 picoseconds. + Weight::from_parts(5_415_000, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(1_209, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_191, 0).saturating_mul(n.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2173,8 +2181,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 7_453_000 picoseconds. - Weight::from_parts(7_862_000, 648) + // Minimum execution time: 7_570_000 picoseconds. + Weight::from_parts(7_788_000, 648) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -2183,8 +2191,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 41_255_000 picoseconds. - Weight::from_parts(42_397_000, 10658) + // Minimum execution time: 41_676_000 picoseconds. + Weight::from_parts(43_110_000, 10658) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -2193,8 +2201,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 8_727_000 picoseconds. - Weight::from_parts(9_104_000, 648) + // Minimum execution time: 8_455_000 picoseconds. + Weight::from_parts(8_988_000, 648) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2204,8 +2212,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 43_313_000 picoseconds. - Weight::from_parts(44_570_000, 10658) + // Minimum execution time: 43_797_000 picoseconds. + Weight::from_parts(44_900_000, 10658) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2214,16 +2222,18 @@ impl WeightInfo for () { /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn seal_set_storage(n: u32, o: u32, _c: u32, ) -> Weight { + fn seal_set_storage(n: u32, o: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` - // Estimated: `247 + o * (1 ±0)` - // Minimum execution time: 9_291_000 picoseconds. - Weight::from_parts(10_116_310, 247) + // Estimated: `246 + o * (1 ±0)` + // Minimum execution time: 9_561_000 picoseconds. + Weight::from_parts(10_050_003, 246) // Standard Error: 56 - .saturating_add(Weight::from_parts(562, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(227, 0).saturating_mul(n.into())) // Standard Error: 56 - .saturating_add(Weight::from_parts(766, 0).saturating_mul(o.into())) + .saturating_add(Weight::from_parts(797, 0).saturating_mul(o.into())) + // Standard Error: 14_979 + .saturating_add(Weight::from_parts(563_324, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -2232,12 +2242,14 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn clear_storage(_n: u32, _c: u32, ) -> Weight { + fn clear_storage(_n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_317_000 picoseconds. - Weight::from_parts(12_313_550, 376) + // Minimum execution time: 11_381_000 picoseconds. + Weight::from_parts(12_358_640, 376) + // Standard Error: 16_536 + .saturating_add(Weight::from_parts(143_265, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2245,14 +2257,16 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn seal_get_storage(n: u32, _c: u32, ) -> Weight { + fn seal_get_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` - // Estimated: `247 + n * (1 ±0)` - // Minimum execution time: 8_259_000 picoseconds. - Weight::from_parts(9_579_511, 247) - // Standard Error: 89 - .saturating_add(Weight::from_parts(1_569, 0).saturating_mul(n.into())) + // Estimated: `246 + n * (1 ±0)` + // Minimum execution time: 8_472_000 picoseconds. + Weight::from_parts(8_817_242, 246) + // Standard Error: 56 + .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(n.into())) + // Standard Error: 15_439 + .saturating_add(Weight::from_parts(572_818, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2260,25 +2274,31 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn contains_storage(_n: u32, _c: u32, ) -> Weight { + fn contains_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_296_000 picoseconds. - Weight::from_parts(3_670_971, 0) + // Minimum execution time: 3_397_000 picoseconds. + Weight::from_parts(3_681_057, 0) + // Standard Error: 26 + .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) + // Standard Error: 7_208 + .saturating_add(Weight::from_parts(63_383, 0).saturating_mul(c.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn take_storage(n: u32, _c: u32, ) -> Weight { + fn take_storage(n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_660_000 picoseconds. - Weight::from_parts(12_798_428, 376) - // Standard Error: 94 - .saturating_add(Weight::from_parts(571, 0).saturating_mul(n.into())) + // Minimum execution time: 11_586_000 picoseconds. + Weight::from_parts(12_575_248, 376) + // Standard Error: 63 + .saturating_add(Weight::from_parts(172, 0).saturating_mul(n.into())) + // Standard Error: 17_323 + .saturating_add(Weight::from_parts(254_003, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2286,36 +2306,36 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(1_749_000, 0) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(1_730_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_986_000 picoseconds. - Weight::from_parts(2_063_000, 0) + // Minimum execution time: 1_924_000 picoseconds. + Weight::from_parts(2_058_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_596_000 picoseconds. - Weight::from_parts(1_702_000, 0) + // Minimum execution time: 1_511_000 picoseconds. + Weight::from_parts(1_644_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_786_000 picoseconds. - Weight::from_parts(1_893_000, 0) + // Minimum execution time: 1_690_000 picoseconds. + Weight::from_parts(1_812_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_252_000 picoseconds. - Weight::from_parts(1_339_000, 0) + // Minimum execution time: 1_278_000 picoseconds. + Weight::from_parts(1_439_000, 0) } /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. @@ -2323,48 +2343,46 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_331_000 picoseconds. - Weight::from_parts(2_642_531, 0) + // Minimum execution time: 2_413_000 picoseconds. + Weight::from_parts(2_680_258, 0) // Standard Error: 17 - .saturating_add(Weight::from_parts(234, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into())) // Standard Error: 17 - .saturating_add(Weight::from_parts(356, 0).saturating_mul(o.into())) + .saturating_add(Weight::from_parts(378, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 416]`. - fn seal_clear_transient_storage(n: u32, ) -> Weight { + fn seal_clear_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_897_000 picoseconds. - Weight::from_parts(4_214_505, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(192, 0).saturating_mul(n.into())) + // Minimum execution time: 3_919_000 picoseconds. + Weight::from_parts(4_288_312, 0) } /// The range of component `n` is `[0, 416]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_008_000 picoseconds. - Weight::from_parts(2_260_857, 0) - // Standard Error: 19 - .saturating_add(Weight::from_parts(334, 0).saturating_mul(n.into())) + // Minimum execution time: 2_049_000 picoseconds. + Weight::from_parts(2_286_020, 0) + // Standard Error: 21 + .saturating_add(Weight::from_parts(322, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 416]`. fn seal_contains_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_387_000 picoseconds. - Weight::from_parts(3_823_784, 0) + // Minimum execution time: 3_384_000 picoseconds. + Weight::from_parts(3_742_807, 0) } /// The range of component `n` is `[0, 416]`. fn seal_take_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_105_000 picoseconds. - Weight::from_parts(4_590_927, 0) + // Minimum execution time: 4_162_000 picoseconds. + Weight::from_parts(4_589_040, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -2381,16 +2399,16 @@ impl WeightInfo for () { /// The range of component `i` is `[0, 1048576]`. fn seal_call(t: u32, d: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2129` - // Estimated: `5594` - // Minimum execution time: 96_945_000 picoseconds. - Weight::from_parts(82_723_058, 5594) - // Standard Error: 197_185 - .saturating_add(Weight::from_parts(17_112_972, 0).saturating_mul(t.into())) - // Standard Error: 197_185 - .saturating_add(Weight::from_parts(23_554_105, 0).saturating_mul(d.into())) + // Measured: `2006` + // Estimated: `5471` + // Minimum execution time: 98_041_000 picoseconds. + Weight::from_parts(78_973_555, 5471) + // Standard Error: 190_245 + .saturating_add(Weight::from_parts(19_160_365, 0).saturating_mul(t.into())) + // Standard Error: 190_245 + .saturating_add(Weight::from_parts(24_103_133, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(1, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) @@ -2405,12 +2423,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `436 + d * (212 ±0)` // Estimated: `2056 + d * (2056 ±0)` - // Minimum execution time: 26_713_000 picoseconds. - Weight::from_parts(15_979_369, 2056) - // Standard Error: 53_691 - .saturating_add(Weight::from_parts(11_856_790, 0).saturating_mul(d.into())) + // Minimum execution time: 26_273_000 picoseconds. + Weight::from_parts(15_380_404, 2056) + // Standard Error: 61_413 + .saturating_add(Weight::from_parts(12_108_999, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(326, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(330, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(d.into()))) .saturating_add(Weight::from_parts(0, 2056).saturating_mul(d.into())) @@ -2425,8 +2443,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1434` // Estimated: `4899` - // Minimum execution time: 35_156_000 picoseconds. - Weight::from_parts(36_008_000, 4899) + // Minimum execution time: 35_262_000 picoseconds. + Weight::from_parts(36_904_000, 4899) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -2442,20 +2460,20 @@ impl WeightInfo for () { /// The range of component `i` is `[0, 131072]`. fn seal_instantiate(t: u32, d: u32, i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1484` - // Estimated: `4921 + d * (31 ±1) + t * (31 ±1)` - // Minimum execution time: 158_623_000 picoseconds. - Weight::from_parts(119_635_514, 4921) - // Standard Error: 509_096 - .saturating_add(Weight::from_parts(17_183_470, 0).saturating_mul(t.into())) - // Standard Error: 509_096 - .saturating_add(Weight::from_parts(27_676_190, 0).saturating_mul(d.into())) - // Standard Error: 5 - .saturating_add(Weight::from_parts(3_929, 0).saturating_mul(i.into())) + // Measured: `1450` + // Estimated: `4900 + d * (27 ±1) + t * (27 ±1)` + // Minimum execution time: 161_202_000 picoseconds. + Weight::from_parts(118_049_370, 4900) + // Standard Error: 548_380 + .saturating_add(Weight::from_parts(21_408_479, 0).saturating_mul(t.into())) + // Standard Error: 548_380 + .saturating_add(Weight::from_parts(29_259_452, 0).saturating_mul(d.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(3_911, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(d.into())) - .saturating_add(Weight::from_parts(0, 31).saturating_mul(t.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(0, 27).saturating_mul(t.into())) } /// Storage: `Revive::AccountInfoOf` (r:1 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -2474,14 +2492,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `869` // Estimated: `6829` - // Minimum execution time: 375_311_000 picoseconds. - Weight::from_parts(238_984_394, 6829) - // Standard Error: 687_857 - .saturating_add(Weight::from_parts(21_371_046, 0).saturating_mul(t.into())) - // Standard Error: 687_857 - .saturating_add(Weight::from_parts(28_395_391, 0).saturating_mul(d.into())) - // Standard Error: 27 - .saturating_add(Weight::from_parts(8_472, 0).saturating_mul(i.into())) + // Minimum execution time: 382_446_000 picoseconds. + Weight::from_parts(261_013_451, 6829) + // Standard Error: 650_354 + .saturating_add(Weight::from_parts(13_883_476, 0).saturating_mul(t.into())) + // Standard Error: 650_354 + .saturating_add(Weight::from_parts(24_757_856, 0).saturating_mul(d.into())) + // Standard Error: 25 + .saturating_add(Weight::from_parts(8_095, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2490,125 +2508,125 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_346_000 picoseconds. - Weight::from_parts(9_536_684, 0) + // Minimum execution time: 1_363_000 picoseconds. + Weight::from_parts(13_026_953, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_239, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_231, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn identity(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 799_000 picoseconds. - Weight::from_parts(759_415, 0) + // Minimum execution time: 836_000 picoseconds. + Weight::from_parts(857_621, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(113, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(112, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn ripemd_160(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_377_000 picoseconds. - Weight::from_parts(6_797_388, 0) + // Minimum execution time: 1_350_000 picoseconds. + Weight::from_parts(4_141_101, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_733, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_743, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_129_000 picoseconds. - Weight::from_parts(14_992_965, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_543, 0).saturating_mul(n.into())) + // Minimum execution time: 1_211_000 picoseconds. + Weight::from_parts(11_345_193, 0) + // Standard Error: 0 + .saturating_add(Weight::from_parts(3_542, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_873_000 picoseconds. - Weight::from_parts(13_180_808, 0) + // Minimum execution time: 1_838_000 picoseconds. + Weight::from_parts(12_083_796, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_398, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_854_000 picoseconds. - Weight::from_parts(12_306_060, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) + // Minimum execution time: 1_888_000 picoseconds. + Weight::from_parts(13_484_713, 0) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_397, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048321]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 47_104_000 picoseconds. - Weight::from_parts(80_861_678, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(4_830, 0).saturating_mul(n.into())) + // Minimum execution time: 45_330_000 picoseconds. + Weight::from_parts(97_195_127, 0) + // Standard Error: 6 + .saturating_add(Weight::from_parts(4_792, 0).saturating_mul(n.into())) } fn ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_698_000 picoseconds. - Weight::from_parts(47_673_000, 0) + // Minimum execution time: 46_259_000 picoseconds. + Weight::from_parts(47_123_000, 0) } fn p256_verify() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_791_033_000 picoseconds. - Weight::from_parts(1_801_147_000, 0) + // Minimum execution time: 1_785_460_000 picoseconds. + Weight::from_parts(1_792_839_000, 0) } fn bn128_add() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 14_836_000 picoseconds. - Weight::from_parts(16_004_000, 0) + // Minimum execution time: 15_037_000 picoseconds. + Weight::from_parts(16_276_000, 0) } fn bn128_mul() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 979_455_000 picoseconds. - Weight::from_parts(988_686_000, 0) + // Minimum execution time: 995_799_000 picoseconds. + Weight::from_parts(1_001_153_000, 0) } /// The range of component `n` is `[0, 20]`. fn bn128_pairing(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 938_000 picoseconds. - Weight::from_parts(4_848_308_436, 0) - // Standard Error: 10_255_035 - .saturating_add(Weight::from_parts(5_920_112_189, 0).saturating_mul(n.into())) + // Minimum execution time: 939_000 picoseconds. + Weight::from_parts(5_024_029_661, 0) + // Standard Error: 10_709_223 + .saturating_add(Weight::from_parts(6_097_358_170, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1200]`. fn blake2f(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_070_000 picoseconds. - Weight::from_parts(1_284_385, 0) - // Standard Error: 54 - .saturating_add(Weight::from_parts(28_398, 0).saturating_mul(n.into())) + // Minimum execution time: 1_081_000 picoseconds. + Weight::from_parts(1_400_190, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(28_307, 0).saturating_mul(n.into())) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_180_000 picoseconds. - Weight::from_parts(13_387_000, 0) + // Minimum execution time: 13_140_000 picoseconds. + Weight::from_parts(13_332_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:2 w:2) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) @@ -2621,47 +2639,47 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 1]`. fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `424 + r * (434 ±0)` - // Estimated: `6364 + r * (2162 ±0)` - // Minimum execution time: 14_799_000 picoseconds. - Weight::from_parts(15_922_167, 6364) - // Standard Error: 52_549 - .saturating_add(Weight::from_parts(47_258_332, 0).saturating_mul(r.into())) + // Measured: `420 + r * (401 ±0)` + // Estimated: `6360 + r * (2143 ±0)` + // Minimum execution time: 14_847_000 picoseconds. + Weight::from_parts(15_868_655, 6360) + // Standard Error: 57_150 + .saturating_add(Weight::from_parts(49_102_844, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2162).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2143).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn evm_opcode(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 550_000 picoseconds. - Weight::from_parts(1_050_932, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(15_280, 0).saturating_mul(r.into())) + // Minimum execution time: 640_000 picoseconds. + Weight::from_parts(722_843, 0) + // Standard Error: 22 + .saturating_add(Weight::from_parts(15_334, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_061_000 picoseconds. - Weight::from_parts(62_740_927, 0) - // Standard Error: 361 - .saturating_add(Weight::from_parts(123_285, 0).saturating_mul(r.into())) + // Minimum execution time: 13_904_000 picoseconds. + Weight::from_parts(67_713_763, 0) + // Standard Error: 412 + .saturating_add(Weight::from_parts(112_584, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr_empty_loop(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_326_000 picoseconds. - Weight::from_parts(3_151_099, 0) - // Standard Error: 50 - .saturating_add(Weight::from_parts(74_055, 0).saturating_mul(r.into())) + // Minimum execution time: 3_496_000 picoseconds. + Weight::from_parts(3_311_333, 0) + // Standard Error: 30 + .saturating_add(Weight::from_parts(72_707, 0).saturating_mul(r.into())) } /// Storage: `Revive::PristineCode` (r:1 w:0) /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2670,10 +2688,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `527 + n * (1 ±0)` // Estimated: `3992 + n * (1 ±0)` - // Minimum execution time: 14_656_000 picoseconds. - Weight::from_parts(14_686_037, 3992) - // Standard Error: 4 - .saturating_add(Weight::from_parts(724, 0).saturating_mul(n.into())) + // Minimum execution time: 14_441_000 picoseconds. + Weight::from_parts(14_702_114, 3992) + // Standard Error: 11 + .saturating_add(Weight::from_parts(716, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2685,8 +2703,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `382` // Estimated: `6322` - // Minimum execution time: 12_331_000 picoseconds. - Weight::from_parts(12_868_000, 6322) + // Minimum execution time: 12_343_000 picoseconds. + Weight::from_parts(12_780_000, 6322) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2700,8 +2718,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6866` - // Minimum execution time: 63_102_000 picoseconds. - Weight::from_parts(65_300_000, 6866) + // Minimum execution time: 65_381_000 picoseconds. + Weight::from_parts(67_303_000, 6866) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2722,10 +2740,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3012 + n * (97 ±0)` // Estimated: `6303 + n * (104 ±0)` - // Minimum execution time: 26_639_000 picoseconds. - Weight::from_parts(56_482_010, 6303) - // Standard Error: 4_704 - .saturating_add(Weight::from_parts(522_203, 0).saturating_mul(n.into())) + // Minimum execution time: 27_258_000 picoseconds. + Weight::from_parts(54_578_010, 6303) + // Standard Error: 4_419 + .saturating_add(Weight::from_parts(521_073, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 104).saturating_mul(n.into())) @@ -2747,10 +2765,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3577 + d * (3 ±0)` // Estimated: `7036 + d * (3 ±0)` - // Minimum execution time: 59_432_000 picoseconds. - Weight::from_parts(61_955_716, 7036) - // Standard Error: 157 - .saturating_add(Weight::from_parts(12_327, 0).saturating_mul(d.into())) + // Minimum execution time: 59_373_000 picoseconds. + Weight::from_parts(61_916_032, 7036) + // Standard Error: 133 + .saturating_add(Weight::from_parts(11_875, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(d.into())) @@ -2770,14 +2788,12 @@ impl WeightInfo for () { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `e` is `[0, 100]`. - fn on_finalize_per_event(e: u32, ) -> Weight { + fn on_finalize_per_event(_e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_652_000 picoseconds. - Weight::from_parts(46_489_107, 5011) - // Standard Error: 1_089 - .saturating_add(Weight::from_parts(4_596, 0).saturating_mul(e.into())) + // Minimum execution time: 44_149_000 picoseconds. + Weight::from_parts(46_414_395, 5011) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -2796,14 +2812,12 @@ impl WeightInfo for () { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `d` is `[0, 16384]`. - fn on_finalize_per_event_data(d: u32, ) -> Weight { + fn on_finalize_per_event_data(_d: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_400_000 picoseconds. - Weight::from_parts(46_629_995, 5011) - // Standard Error: 6 - .saturating_add(Weight::from_parts(21, 0).saturating_mul(d.into())) + // Minimum execution time: 44_382_000 picoseconds. + Weight::from_parts(46_379_406, 5011) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } From 3d4d22acdcd43a970c5344cb8b51cc2946b9f319 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Sat, 6 Dec 2025 10:51:59 +0100 Subject: [PATCH 07/19] testing --- substrate/frame/revive/src/benchmarking.rs | 70 ++++++++++++---------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 472a8e9a9c337..3ff9ec52d1832 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1425,16 +1425,11 @@ mod benchmarks { info.write(&key, Some(vec![42u8; o as usize]), None, false) .map_err(|_| "Failed to write to storage during setup.")?; - // Warm up storage if c=0 (hot) + // Whitelist key if c=0 (hot) if c == 0 { - let _ = runtime.bench_set_storage( - memory.as_mut_slice(), - StorageFlags::empty().bits(), - 0, // key_ptr - max_key_len, // key_len - max_key_len, // value_ptr - n, // value_len - ); + let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); + full_key.extend_from_slice(&key.hash()); + frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); } let result; @@ -1472,15 +1467,20 @@ mod benchmarks { .abi_encode(); let mut call_setup = CallSetup::::default(); - let (mut ext, _) = call_setup.ext(); - ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) - .map_err(|_| "Failed to write to storage during setup.")?; - // Warm up storage if c=0 (hot) + // Whitelist child storage key if c=0 (hot) to exclude from PoV if c == 0 { - let _ = ext.get_storage(&key); + let info = call_setup.contract().info()?; + // Construct full key: prefixed child trie key + hashed storage key + let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); + full_key.extend_from_slice(&key.hash()); + frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); } + let (mut ext, _) = call_setup.ext(); + ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) + .map_err(|_| "Failed to write to storage during setup.")?; + let result; #[block] { @@ -1513,16 +1513,11 @@ mod benchmarks { let out_ptr = max_key_len + 4; - // Warm up storage if c=0 (hot) + // Whitelist key if c=0 (hot) if c == 0 { - let _ = runtime.bench_get_storage( - memory.as_mut_slice(), - StorageFlags::empty().bits(), - 0, // key_ptr - max_key_len, // key_len - out_ptr, // out_ptr - max_key_len, // out_len_ptr - ); + let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); + full_key.extend_from_slice(&key.hash()); + frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); } let result; @@ -1560,15 +1555,19 @@ mod benchmarks { .abi_encode(); let mut call_setup = CallSetup::::default(); - let (mut ext, _) = call_setup.ext(); - ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) - .map_err(|_| "Failed to write to storage during setup.")?; - // Warm up storage if c=0 (hot) + // Whitelist key if c=0 (hot) if c == 0 { - let _ = ext.get_storage(&key); + let info = call_setup.contract().info()?; + let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); + full_key.extend_from_slice(&key.hash()); + frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); } + let (mut ext, _) = call_setup.ext(); + ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) + .map_err(|_| "Failed to write to storage during setup.")?; + let result; #[block] { @@ -1602,15 +1601,20 @@ mod benchmarks { .abi_encode(); let mut call_setup = CallSetup::::default(); - let (mut ext, _) = call_setup.ext(); - ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) - .map_err(|_| "Failed to write to storage during setup.")?; - // Warm up storage if c=0 (hot) + // Whitelist child storage key if c=0 (hot) to exclude from PoV if c == 0 { - let _ = ext.get_storage(&key); + let info = call_setup.contract().info()?; + // Construct full key: prefixed child trie key + hashed storage key + let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); + full_key.extend_from_slice(&key.hash()); + frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); } + let (mut ext, _) = call_setup.ext(); + ext.set_storage(&key, Some(vec![42u8; max_key_len as usize]), false) + .map_err(|_| "Failed to write to storage during setup.")?; + let result; #[block] { From 7b24777ccfe08d7491278401c371357a866a616d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Sat, 6 Dec 2025 10:53:36 +0100 Subject: [PATCH 08/19] nit --- substrate/frame/revive/src/benchmarking.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 3ff9ec52d1832..8a9b79c787a8f 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1468,7 +1468,7 @@ mod benchmarks { let mut call_setup = CallSetup::::default(); - // Whitelist child storage key if c=0 (hot) to exclude from PoV + // Whitelist key if c=0 (hot) if c == 0 { let info = call_setup.contract().info()?; // Construct full key: prefixed child trie key + hashed storage key @@ -1602,7 +1602,7 @@ mod benchmarks { let mut call_setup = CallSetup::::default(); - // Whitelist child storage key if c=0 (hot) to exclude from PoV + // Whitelist key if c=0 (hot) if c == 0 { let info = call_setup.contract().info()?; // Construct full key: prefixed child trie key + hashed storage key From ebf5fd69f2d7ad7ea34d8b6653346a3282b6c066 Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:41:27 +0000 Subject: [PATCH 09/19] Update from github-actions[bot] running command 'bench --runtime dev --pallet pallet_revive' --- substrate/frame/revive/src/weights.rs | 1240 ++++++++++++------------- 1 file changed, 618 insertions(+), 622 deletions(-) diff --git a/substrate/frame/revive/src/weights.rs b/substrate/frame/revive/src/weights.rs index d321e5c49c03e..7508efc024fa2 100644 --- a/substrate/frame/revive/src/weights.rs +++ b/substrate/frame/revive/src/weights.rs @@ -35,9 +35,9 @@ //! Autogenerated weights for `pallet_revive` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-12-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-12-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `8575c9bc47de`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `09a5ffbc135a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024` // Executed Command: @@ -183,7 +183,7 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `213` // Estimated: `1698` - // Minimum execution time: 3_154_000 picoseconds. + // Minimum execution time: 3_172_000 picoseconds. Weight::from_parts(3_405_000, 1698) .saturating_add(T::DbWeight::get().reads(1_u64)) } @@ -194,10 +194,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `491 + k * (69 ±0)` // Estimated: `481 + k * (70 ±0)` - // Minimum execution time: 14_582_000 picoseconds. - Weight::from_parts(14_895_000, 481) - // Standard Error: 1_943 - .saturating_add(Weight::from_parts(1_250_682, 0).saturating_mul(k.into())) + // Minimum execution time: 14_342_000 picoseconds. + Weight::from_parts(14_928_000, 481) + // Standard Error: 1_398 + .saturating_add(Weight::from_parts(1_214_263, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -221,10 +221,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1265 + c * (1 ±0)` // Estimated: `7200 + c * (1 ±0)` - // Minimum execution time: 99_711_000 picoseconds. - Weight::from_parts(152_217_303, 7200) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_382, 0).saturating_mul(c.into())) + // Minimum execution time: 100_504_000 picoseconds. + Weight::from_parts(148_244_010, 7200) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_566, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -246,8 +246,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1205` // Estimated: `7144` - // Minimum execution time: 94_712_000 picoseconds. - Weight::from_parts(99_302_408, 7144) + // Minimum execution time: 92_006_000 picoseconds. + Weight::from_parts(97_368_589, 7144) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -268,10 +268,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `4609` // Estimated: `10549` - // Minimum execution time: 150_260_000 picoseconds. - Weight::from_parts(155_718_240, 10549) - // Standard Error: 621_625 - .saturating_add(Weight::from_parts(2_843_759, 0).saturating_mul(b.into())) + // Minimum execution time: 150_612_000 picoseconds. + Weight::from_parts(156_471_593, 10549) + // Standard Error: 666_004 + .saturating_add(Weight::from_parts(354_506, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -295,12 +295,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6924` - // Minimum execution time: 779_431_000 picoseconds. - Weight::from_parts(74_223_269, 6924) - // Standard Error: 39 - .saturating_add(Weight::from_parts(20_177, 0).saturating_mul(c.into())) - // Standard Error: 31 - .saturating_add(Weight::from_parts(5_066, 0).saturating_mul(i.into())) + // Minimum execution time: 785_616_000 picoseconds. + Weight::from_parts(53_380_306, 6924) + // Standard Error: 38 + .saturating_add(Weight::from_parts(20_886, 0).saturating_mul(c.into())) + // Standard Error: 29 + .saturating_add(Weight::from_parts(5_224, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -329,14 +329,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6934` - // Minimum execution time: 392_839_000 picoseconds. - Weight::from_parts(306_119_258, 6934) - // Standard Error: 41 - .saturating_add(Weight::from_parts(15_749, 0).saturating_mul(c.into())) + // Minimum execution time: 406_081_000 picoseconds. + Weight::from_parts(222_392_381, 6934) + // Standard Error: 42 + .saturating_add(Weight::from_parts(16_556, 0).saturating_mul(c.into())) // Standard Error: 32 - .saturating_add(Weight::from_parts(456, 0).saturating_mul(i.into())) - // Standard Error: 2_738_762 - .saturating_add(Weight::from_parts(2_532_218, 0).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(891, 0).saturating_mul(i.into())) + // Standard Error: 2_758_958 + .saturating_add(Weight::from_parts(34_243_932, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } @@ -344,8 +344,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_082_000 picoseconds. - Weight::from_parts(3_298_000, 0) + // Minimum execution time: 3_102_000 picoseconds. + Weight::from_parts(3_291_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:2 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -366,10 +366,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1735` // Estimated: `7668` - // Minimum execution time: 196_938_000 picoseconds. - Weight::from_parts(199_086_558, 7668) - // Standard Error: 11 - .saturating_add(Weight::from_parts(4_155, 0).saturating_mul(i.into())) + // Minimum execution time: 189_793_000 picoseconds. + Weight::from_parts(197_777_915, 7668) + // Standard Error: 12 + .saturating_add(Weight::from_parts(4_259, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -389,8 +389,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 104_369_000 picoseconds. - Weight::from_parts(106_866_000, 7887) + // Minimum execution time: 101_360_000 picoseconds. + Weight::from_parts(105_253_000, 7887) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -415,10 +415,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 182_578_000 picoseconds. - Weight::from_parts(191_542_185, 7887) - // Standard Error: 879_036 - .saturating_add(Weight::from_parts(1_872_614, 0).saturating_mul(d.into())) + // Minimum execution time: 179_650_000 picoseconds. + Weight::from_parts(188_389_730, 7887) + // Standard Error: 814_865 + .saturating_add(Weight::from_parts(1_969_669, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -435,10 +435,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `358` // Estimated: `3823` - // Minimum execution time: 28_267_000 picoseconds. - Weight::from_parts(24_047_092, 3823) - // Standard Error: 12 - .saturating_add(Weight::from_parts(6_227, 0).saturating_mul(c.into())) + // Minimum execution time: 28_012_000 picoseconds. + Weight::from_parts(22_159_986, 3823) + // Standard Error: 13 + .saturating_add(Weight::from_parts(6_433, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -455,10 +455,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `392` // Estimated: `3857` - // Minimum execution time: 61_639_000 picoseconds. - Weight::from_parts(53_876_810, 3857) - // Standard Error: 17 - .saturating_add(Weight::from_parts(14_193, 0).saturating_mul(c.into())) + // Minimum execution time: 62_487_000 picoseconds. + Weight::from_parts(50_869_690, 3857) + // Standard Error: 20 + .saturating_add(Weight::from_parts(14_688, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -472,8 +472,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 55_130_000 picoseconds. - Weight::from_parts(56_847_000, 3989) + // Minimum execution time: 53_252_000 picoseconds. + Weight::from_parts(54_982_000, 3989) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -491,8 +491,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `867` // Estimated: `6807` - // Minimum execution time: 69_290_000 picoseconds. - Weight::from_parts(70_060_000, 6807) + // Minimum execution time: 67_932_000 picoseconds. + Weight::from_parts(69_295_000, 6807) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -506,8 +506,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 62_337_000 picoseconds. - Weight::from_parts(63_539_000, 4088) + // Minimum execution time: 61_077_000 picoseconds. + Weight::from_parts(62_440_000, 4088) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -519,8 +519,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `93` // Estimated: `3558` - // Minimum execution time: 41_961_000 picoseconds. - Weight::from_parts(42_796_000, 3558) + // Minimum execution time: 39_997_000 picoseconds. + Weight::from_parts(40_977_000, 3558) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -534,8 +534,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `381` // Estimated: `3846` - // Minimum execution time: 19_133_000 picoseconds. - Weight::from_parts(20_044_000, 3846) + // Minimum execution time: 19_305_000 picoseconds. + Weight::from_parts(20_046_000, 3846) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -543,24 +543,24 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_104_000 picoseconds. - Weight::from_parts(8_259_820, 0) - // Standard Error: 302 - .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(r.into())) + // Minimum execution time: 7_715_000 picoseconds. + Weight::from_parts(9_010_748, 0) + // Standard Error: 236 + .saturating_add(Weight::from_parts(188_696, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 371_000 picoseconds. - Weight::from_parts(422_000, 0) + // Minimum execution time: 378_000 picoseconds. + Weight::from_parts(457_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 368_000 picoseconds. - Weight::from_parts(416_000, 0) + // Minimum execution time: 322_000 picoseconds. + Weight::from_parts(394_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -568,8 +568,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 11_535_000 picoseconds. - Weight::from_parts(12_145_000, 4088) + // Minimum execution time: 11_336_000 picoseconds. + Weight::from_parts(11_892_000, 4088) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) @@ -578,16 +578,16 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 10_152_000 picoseconds. - Weight::from_parts(10_428_000, 3938) + // Minimum execution time: 9_875_000 picoseconds. + Weight::from_parts(10_680_000, 3938) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `436` // Estimated: `0` - // Minimum execution time: 9_710_000 picoseconds. - Weight::from_parts(10_570_000, 0) + // Minimum execution time: 9_685_000 picoseconds. + Weight::from_parts(10_366_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -597,51 +597,51 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `545` // Estimated: `4010` - // Minimum execution time: 13_438_000 picoseconds. - Weight::from_parts(14_006_000, 4010) + // Minimum execution time: 13_680_000 picoseconds. + Weight::from_parts(14_225_000, 4010) .saturating_add(T::DbWeight::get().reads(2_u64)) } fn caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_169_000 picoseconds. - Weight::from_parts(1_324_000, 0) + // Minimum execution time: 1_161_000 picoseconds. + Weight::from_parts(1_305_000, 0) } fn caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_243_000 picoseconds. - Weight::from_parts(1_338_000, 0) + // Minimum execution time: 1_134_000 picoseconds. + Weight::from_parts(1_266_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 345_000 picoseconds. - Weight::from_parts(401_000, 0) + // Minimum execution time: 329_000 picoseconds. + Weight::from_parts(378_000, 0) } fn weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_216_000 picoseconds. - Weight::from_parts(1_378_000, 0) + // Minimum execution time: 1_124_000 picoseconds. + Weight::from_parts(1_206_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_939_000 picoseconds. - Weight::from_parts(2_037_000, 0) + // Minimum execution time: 1_929_000 picoseconds. + Weight::from_parts(2_086_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `576` // Estimated: `0` - // Minimum execution time: 13_539_000 picoseconds. - Weight::from_parts(14_072_000, 0) + // Minimum execution time: 13_400_000 picoseconds. + Weight::from_parts(13_848_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -653,8 +653,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `884` // Estimated: `4349` - // Minimum execution time: 20_505_000 picoseconds. - Weight::from_parts(21_180_000, 4349) + // Minimum execution time: 20_750_000 picoseconds. + Weight::from_parts(21_441_000, 4349) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -664,10 +664,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `304 + n * (1 ±0)` // Estimated: `3769 + n * (1 ±0)` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_743_885, 3769) - // Standard Error: 4 - .saturating_add(Weight::from_parts(524, 0).saturating_mul(n.into())) + // Minimum execution time: 6_166_000 picoseconds. + Weight::from_parts(6_765_990, 3769) + // Standard Error: 5 + .saturating_add(Weight::from_parts(585, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -678,67 +678,67 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_219_000 picoseconds. - Weight::from_parts(2_464_264, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(487, 0).saturating_mul(n.into())) + // Minimum execution time: 2_062_000 picoseconds. + Weight::from_parts(2_354_186, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 308_000 picoseconds. - Weight::from_parts(340_000, 0) + // Minimum execution time: 258_000 picoseconds. + Weight::from_parts(304_000, 0) } fn minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_481_000 picoseconds. - Weight::from_parts(1_647_000, 0) + // Minimum execution time: 1_265_000 picoseconds. + Weight::from_parts(1_399_000, 0) } fn seal_return_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 324_000 picoseconds. - Weight::from_parts(348_000, 0) + // Minimum execution time: 266_000 picoseconds. + Weight::from_parts(310_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 284_000 picoseconds. - Weight::from_parts(318_000, 0) + // Minimum execution time: 260_000 picoseconds. + Weight::from_parts(330_000, 0) } fn seal_gas_limit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(337_000, 0) + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(272_000, 0) } fn seal_gas_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_094_000 picoseconds. - Weight::from_parts(1_239_000, 0) + // Minimum execution time: 1_084_000 picoseconds. + Weight::from_parts(1_219_000, 0) } fn seal_base_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_091_000 picoseconds. - Weight::from_parts(1_182_000, 0) + // Minimum execution time: 967_000 picoseconds. + Weight::from_parts(1_080_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 311_000 picoseconds. - Weight::from_parts(358_000, 0) + // Minimum execution time: 285_000 picoseconds. + Weight::from_parts(331_000, 0) } /// Storage: `Session::Validators` (r:1 w:0) /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -746,8 +746,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `141` // Estimated: `1626` - // Minimum execution time: 21_954_000 picoseconds. - Weight::from_parts(22_476_000, 1626) + // Minimum execution time: 21_377_000 picoseconds. + Weight::from_parts(21_980_000, 1626) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Revive::BlockHash` (r:1 w:0) @@ -756,63 +756,65 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `318` // Estimated: `3783` - // Minimum execution time: 5_659_000 picoseconds. - Weight::from_parts(6_107_000, 3783) + // Minimum execution time: 5_605_000 picoseconds. + Weight::from_parts(6_164_000, 3783) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 281_000 picoseconds. - Weight::from_parts(324_000, 0) + // Minimum execution time: 285_000 picoseconds. + Weight::from_parts(330_000, 0) } /// The range of component `n` is `[0, 1048572]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 475_000 picoseconds. - Weight::from_parts(65_586, 0) + // Minimum execution time: 461_000 picoseconds. + Weight::from_parts(573_695, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(203, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(238, 0).saturating_mul(n.into())) } fn seal_call_data_load() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 304_000 picoseconds. - Weight::from_parts(339_000, 0) + // Minimum execution time: 268_000 picoseconds. + Weight::from_parts(305_000, 0) } /// The range of component `n` is `[0, 1048576]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 299_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 283_000 picoseconds. + Weight::from_parts(137_385, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(114, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(149, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 131072]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 332_000 picoseconds. - Weight::from_parts(639_720, 0) + // Minimum execution time: 309_000 picoseconds. + Weight::from_parts(546_911, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(198, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(234, 0).saturating_mul(n.into())) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// The range of component `r` is `[0, 1]`. - fn seal_terminate(_r: u32, ) -> Weight { + fn seal_terminate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `924` // Estimated: `6864` - // Minimum execution time: 20_463_000 picoseconds. - Weight::from_parts(21_695_959, 6864) + // Minimum execution time: 20_544_000 picoseconds. + Weight::from_parts(21_645_167, 6864) + // Standard Error: 67_218 + .saturating_add(Weight::from_parts(66_332, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `Balances::Holds` (r:2 w:2) @@ -835,8 +837,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1440` // Estimated: `7380` - // Minimum execution time: 256_587_000 picoseconds. - Weight::from_parts(261_722_000, 7380) + // Minimum execution time: 240_341_000 picoseconds. + Weight::from_parts(248_030_000, 7380) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } @@ -846,10 +848,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_346_000 picoseconds. - Weight::from_parts(5_415_000, 0) + // Minimum execution time: 5_424_000 picoseconds. + Weight::from_parts(5_668_000, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(1_191, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_290, 0).saturating_mul(n.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -857,8 +859,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 7_570_000 picoseconds. - Weight::from_parts(7_788_000, 648) + // Minimum execution time: 7_428_000 picoseconds. + Weight::from_parts(7_906_000, 648) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -867,8 +869,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 41_676_000 picoseconds. - Weight::from_parts(43_110_000, 10658) + // Minimum execution time: 41_352_000 picoseconds. + Weight::from_parts(42_064_000, 10658) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -877,8 +879,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 8_455_000 picoseconds. - Weight::from_parts(8_988_000, 648) + // Minimum execution time: 8_461_000 picoseconds. + Weight::from_parts(8_788_000, 648) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -888,8 +890,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 43_797_000 picoseconds. - Weight::from_parts(44_900_000, 10658) + // Minimum execution time: 43_054_000 picoseconds. + Weight::from_parts(43_904_000, 10658) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -902,14 +904,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `246 + o * (1 ±0)` - // Minimum execution time: 9_561_000 picoseconds. - Weight::from_parts(10_050_003, 246) - // Standard Error: 56 - .saturating_add(Weight::from_parts(227, 0).saturating_mul(n.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(797, 0).saturating_mul(o.into())) - // Standard Error: 14_979 - .saturating_add(Weight::from_parts(563_324, 0).saturating_mul(c.into())) + // Minimum execution time: 9_548_000 picoseconds. + Weight::from_parts(10_147_173, 246) + // Standard Error: 67 + .saturating_add(Weight::from_parts(474, 0).saturating_mul(n.into())) + // Standard Error: 67 + .saturating_add(Weight::from_parts(1_230, 0).saturating_mul(o.into())) + // Standard Error: 18_056 + .saturating_add(Weight::from_parts(190_232, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -918,14 +920,12 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn clear_storage(_n: u32, c: u32, ) -> Weight { + fn clear_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_381_000 picoseconds. - Weight::from_parts(12_358_640, 376) - // Standard Error: 16_536 - .saturating_add(Weight::from_parts(143_265, 0).saturating_mul(c.into())) + // Minimum execution time: 11_348_000 picoseconds. + Weight::from_parts(12_653_422, 376) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -937,12 +937,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `246 + n * (1 ±0)` - // Minimum execution time: 8_472_000 picoseconds. - Weight::from_parts(8_817_242, 246) - // Standard Error: 56 - .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(n.into())) - // Standard Error: 15_439 - .saturating_add(Weight::from_parts(572_818, 0).saturating_mul(c.into())) + // Minimum execution time: 8_523_000 picoseconds. + Weight::from_parts(9_259_930, 246) + // Standard Error: 59 + .saturating_add(Weight::from_parts(1_211, 0).saturating_mul(n.into())) + // Standard Error: 16_061 + .saturating_add(Weight::from_parts(122_836, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -950,31 +950,25 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn contains_storage(n: u32, c: u32, ) -> Weight { + fn contains_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_397_000 picoseconds. - Weight::from_parts(3_681_057, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) - // Standard Error: 7_208 - .saturating_add(Weight::from_parts(63_383, 0).saturating_mul(c.into())) + // Minimum execution time: 3_179_000 picoseconds. + Weight::from_parts(3_575_637, 0) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn take_storage(n: u32, c: u32, ) -> Weight { + fn take_storage(_n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_586_000 picoseconds. - Weight::from_parts(12_575_248, 376) - // Standard Error: 63 - .saturating_add(Weight::from_parts(172, 0).saturating_mul(n.into())) - // Standard Error: 17_323 - .saturating_add(Weight::from_parts(254_003, 0).saturating_mul(c.into())) + // Minimum execution time: 11_620_000 picoseconds. + Weight::from_parts(12_644_961, 376) + // Standard Error: 16_852 + .saturating_add(Weight::from_parts(31_531, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -982,36 +976,36 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_628_000 picoseconds. - Weight::from_parts(1_730_000, 0) + // Minimum execution time: 1_528_000 picoseconds. + Weight::from_parts(1_626_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 1_924_000 picoseconds. - Weight::from_parts(2_058_000, 0) + Weight::from_parts(2_060_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_511_000 picoseconds. - Weight::from_parts(1_644_000, 0) + // Minimum execution time: 1_544_000 picoseconds. + Weight::from_parts(1_636_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_690_000 picoseconds. - Weight::from_parts(1_812_000, 0) + // Minimum execution time: 1_681_000 picoseconds. + Weight::from_parts(1_792_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_278_000 picoseconds. - Weight::from_parts(1_439_000, 0) + // Minimum execution time: 1_230_000 picoseconds. + Weight::from_parts(1_351_000, 0) } /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. @@ -1019,46 +1013,48 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_413_000 picoseconds. - Weight::from_parts(2_680_258, 0) - // Standard Error: 17 - .saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(378, 0).saturating_mul(o.into())) + // Minimum execution time: 2_293_000 picoseconds. + Weight::from_parts(2_696_431, 0) + // Standard Error: 19 + .saturating_add(Weight::from_parts(281, 0).saturating_mul(n.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(319, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 416]`. fn seal_clear_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_919_000 picoseconds. - Weight::from_parts(4_288_312, 0) + // Minimum execution time: 3_700_000 picoseconds. + Weight::from_parts(4_092_551, 0) } /// The range of component `n` is `[0, 416]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_049_000 picoseconds. - Weight::from_parts(2_286_020, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(322, 0).saturating_mul(n.into())) + // Minimum execution time: 1_964_000 picoseconds. + Weight::from_parts(2_273_182, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(244, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 416]`. fn seal_contains_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_384_000 picoseconds. - Weight::from_parts(3_742_807, 0) + // Minimum execution time: 3_154_000 picoseconds. + Weight::from_parts(3_479_990, 0) } /// The range of component `n` is `[0, 416]`. - fn seal_take_transient_storage(_n: u32, ) -> Weight { + fn seal_take_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_162_000 picoseconds. - Weight::from_parts(4_589_040, 0) + // Minimum execution time: 3_937_000 picoseconds. + Weight::from_parts(4_306_712, 0) + // Standard Error: 62 + .saturating_add(Weight::from_parts(507, 0).saturating_mul(n.into())) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1077,14 +1073,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2006` // Estimated: `5471` - // Minimum execution time: 98_041_000 picoseconds. - Weight::from_parts(78_973_555, 5471) - // Standard Error: 190_245 - .saturating_add(Weight::from_parts(19_160_365, 0).saturating_mul(t.into())) - // Standard Error: 190_245 - .saturating_add(Weight::from_parts(24_103_133, 0).saturating_mul(d.into())) + // Minimum execution time: 98_806_000 picoseconds. + Weight::from_parts(81_854_063, 5471) + // Standard Error: 196_041 + .saturating_add(Weight::from_parts(19_063_085, 0).saturating_mul(t.into())) + // Standard Error: 196_041 + .saturating_add(Weight::from_parts(23_385_511, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(2, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) @@ -1099,12 +1095,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `436 + d * (212 ±0)` // Estimated: `2056 + d * (2056 ±0)` - // Minimum execution time: 26_273_000 picoseconds. - Weight::from_parts(15_380_404, 2056) - // Standard Error: 61_413 - .saturating_add(Weight::from_parts(12_108_999, 0).saturating_mul(d.into())) + // Minimum execution time: 26_166_000 picoseconds. + Weight::from_parts(15_522_272, 2056) + // Standard Error: 53_032 + .saturating_add(Weight::from_parts(12_019_439, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(330, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(401, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(d.into()))) .saturating_add(Weight::from_parts(0, 2056).saturating_mul(d.into())) @@ -1119,8 +1115,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1434` // Estimated: `4899` - // Minimum execution time: 35_262_000 picoseconds. - Weight::from_parts(36_904_000, 4899) + // Minimum execution time: 34_614_000 picoseconds. + Weight::from_parts(36_426_000, 4899) .saturating_add(T::DbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -1138,14 +1134,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1450` // Estimated: `4900 + d * (27 ±1) + t * (27 ±1)` - // Minimum execution time: 161_202_000 picoseconds. - Weight::from_parts(118_049_370, 4900) - // Standard Error: 548_380 - .saturating_add(Weight::from_parts(21_408_479, 0).saturating_mul(t.into())) - // Standard Error: 548_380 - .saturating_add(Weight::from_parts(29_259_452, 0).saturating_mul(d.into())) + // Minimum execution time: 161_763_000 picoseconds. + Weight::from_parts(115_993_493, 4900) + // Standard Error: 591_582 + .saturating_add(Weight::from_parts(22_154_256, 0).saturating_mul(t.into())) + // Standard Error: 591_582 + .saturating_add(Weight::from_parts(31_214_747, 0).saturating_mul(d.into())) // Standard Error: 6 - .saturating_add(Weight::from_parts(3_911, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_024, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 27).saturating_mul(d.into())) @@ -1168,14 +1164,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `869` // Estimated: `6829` - // Minimum execution time: 382_446_000 picoseconds. - Weight::from_parts(261_013_451, 6829) - // Standard Error: 650_354 - .saturating_add(Weight::from_parts(13_883_476, 0).saturating_mul(t.into())) - // Standard Error: 650_354 - .saturating_add(Weight::from_parts(24_757_856, 0).saturating_mul(d.into())) - // Standard Error: 25 - .saturating_add(Weight::from_parts(8_095, 0).saturating_mul(i.into())) + // Minimum execution time: 374_535_000 picoseconds. + Weight::from_parts(255_769_803, 6829) + // Standard Error: 683_204 + .saturating_add(Weight::from_parts(17_094_987, 0).saturating_mul(t.into())) + // Standard Error: 683_204 + .saturating_add(Weight::from_parts(24_517_603, 0).saturating_mul(d.into())) + // Standard Error: 27 + .saturating_add(Weight::from_parts(8_450, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1184,125 +1180,125 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_363_000 picoseconds. - Weight::from_parts(13_026_953, 0) + // Minimum execution time: 1_304_000 picoseconds. + Weight::from_parts(10_729_812, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_231, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_265, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn identity(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 836_000 picoseconds. - Weight::from_parts(857_621, 0) + // Minimum execution time: 849_000 picoseconds. + Weight::from_parts(794_629, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(112, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn ripemd_160(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_350_000 picoseconds. - Weight::from_parts(4_141_101, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(3_743, 0).saturating_mul(n.into())) + // Minimum execution time: 1_345_000 picoseconds. + Weight::from_parts(1_397_000, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(3_811, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_211_000 picoseconds. - Weight::from_parts(11_345_193, 0) + // Minimum execution time: 1_163_000 picoseconds. + Weight::from_parts(14_574_860, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_542, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_570, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_838_000 picoseconds. - Weight::from_parts(12_083_796, 0) + // Minimum execution time: 1_714_000 picoseconds. + Weight::from_parts(11_809_111, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_432, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_888_000 picoseconds. - Weight::from_parts(13_484_713, 0) + // Minimum execution time: 1_694_000 picoseconds. + Weight::from_parts(11_839_658, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_397, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_429, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048321]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 45_330_000 picoseconds. - Weight::from_parts(97_195_127, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(4_792, 0).saturating_mul(n.into())) + // Minimum execution time: 43_212_000 picoseconds. + Weight::from_parts(100_227_639, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(4_833, 0).saturating_mul(n.into())) } fn ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_259_000 picoseconds. - Weight::from_parts(47_123_000, 0) + // Minimum execution time: 46_760_000 picoseconds. + Weight::from_parts(47_635_000, 0) } fn p256_verify() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_785_460_000 picoseconds. - Weight::from_parts(1_792_839_000, 0) + // Minimum execution time: 1_794_747_000 picoseconds. + Weight::from_parts(1_803_009_000, 0) } fn bn128_add() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_037_000 picoseconds. - Weight::from_parts(16_276_000, 0) + // Minimum execution time: 15_061_000 picoseconds. + Weight::from_parts(16_030_000, 0) } fn bn128_mul() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 995_799_000 picoseconds. - Weight::from_parts(1_001_153_000, 0) + // Minimum execution time: 983_121_000 picoseconds. + Weight::from_parts(987_925_000, 0) } /// The range of component `n` is `[0, 20]`. fn bn128_pairing(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 939_000 picoseconds. - Weight::from_parts(5_024_029_661, 0) - // Standard Error: 10_709_223 - .saturating_add(Weight::from_parts(6_097_358_170, 0).saturating_mul(n.into())) + // Minimum execution time: 931_000 picoseconds. + Weight::from_parts(4_976_631_682, 0) + // Standard Error: 10_697_026 + .saturating_add(Weight::from_parts(5_989_624_807, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1200]`. fn blake2f(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_081_000 picoseconds. - Weight::from_parts(1_400_190, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(28_307, 0).saturating_mul(n.into())) + // Minimum execution time: 994_000 picoseconds. + Weight::from_parts(1_323_648, 0) + // Standard Error: 75 + .saturating_add(Weight::from_parts(28_891, 0).saturating_mul(n.into())) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_140_000 picoseconds. - Weight::from_parts(13_332_000, 0) + // Minimum execution time: 13_043_000 picoseconds. + Weight::from_parts(13_220_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:2 w:2) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) @@ -1317,10 +1313,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `420 + r * (401 ±0)` // Estimated: `6360 + r * (2143 ±0)` - // Minimum execution time: 14_847_000 picoseconds. - Weight::from_parts(15_868_655, 6360) - // Standard Error: 57_150 - .saturating_add(Weight::from_parts(49_102_844, 0).saturating_mul(r.into())) + // Minimum execution time: 14_503_000 picoseconds. + Weight::from_parts(15_601_979, 6360) + // Standard Error: 70_755 + .saturating_add(Weight::from_parts(46_884_220, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2_u64)) @@ -1333,29 +1329,29 @@ impl WeightInfo for SubstrateWeight { // Measured: `0` // Estimated: `0` // Minimum execution time: 640_000 picoseconds. - Weight::from_parts(722_843, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(15_334, 0).saturating_mul(r.into())) + Weight::from_parts(904_145, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(15_305, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_904_000 picoseconds. - Weight::from_parts(67_713_763, 0) - // Standard Error: 412 - .saturating_add(Weight::from_parts(112_584, 0).saturating_mul(r.into())) + // Minimum execution time: 14_538_000 picoseconds. + Weight::from_parts(61_845_182, 0) + // Standard Error: 949 + .saturating_add(Weight::from_parts(140_478, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr_empty_loop(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_496_000 picoseconds. - Weight::from_parts(3_311_333, 0) - // Standard Error: 30 - .saturating_add(Weight::from_parts(72_707, 0).saturating_mul(r.into())) + // Minimum execution time: 3_525_000 picoseconds. + Weight::from_parts(2_922_756, 0) + // Standard Error: 59 + .saturating_add(Weight::from_parts(72_777, 0).saturating_mul(r.into())) } /// Storage: `Revive::PristineCode` (r:1 w:0) /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1364,10 +1360,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `527 + n * (1 ±0)` // Estimated: `3992 + n * (1 ±0)` - // Minimum execution time: 14_441_000 picoseconds. - Weight::from_parts(14_702_114, 3992) - // Standard Error: 11 - .saturating_add(Weight::from_parts(716, 0).saturating_mul(n.into())) + // Minimum execution time: 14_735_000 picoseconds. + Weight::from_parts(14_539_156, 3992) + // Standard Error: 6 + .saturating_add(Weight::from_parts(844, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1379,8 +1375,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `382` // Estimated: `6322` - // Minimum execution time: 12_343_000 picoseconds. - Weight::from_parts(12_780_000, 6322) + // Minimum execution time: 12_387_000 picoseconds. + Weight::from_parts(13_088_000, 6322) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -1394,8 +1390,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6866` - // Minimum execution time: 65_381_000 picoseconds. - Weight::from_parts(67_303_000, 6866) + // Minimum execution time: 63_539_000 picoseconds. + Weight::from_parts(64_674_000, 6866) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -1416,10 +1412,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3012 + n * (97 ±0)` // Estimated: `6303 + n * (104 ±0)` - // Minimum execution time: 27_258_000 picoseconds. - Weight::from_parts(54_578_010, 6303) - // Standard Error: 4_419 - .saturating_add(Weight::from_parts(521_073, 0).saturating_mul(n.into())) + // Minimum execution time: 27_202_000 picoseconds. + Weight::from_parts(56_073_594, 6303) + // Standard Error: 4_495 + .saturating_add(Weight::from_parts(520_798, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 104).saturating_mul(n.into())) @@ -1441,10 +1437,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `3577 + d * (3 ±0)` // Estimated: `7036 + d * (3 ±0)` - // Minimum execution time: 59_373_000 picoseconds. - Weight::from_parts(61_916_032, 7036) - // Standard Error: 133 - .saturating_add(Weight::from_parts(11_875, 0).saturating_mul(d.into())) + // Minimum execution time: 60_326_000 picoseconds. + Weight::from_parts(62_065_323, 7036) + // Standard Error: 178 + .saturating_add(Weight::from_parts(12_721, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(d.into())) @@ -1464,12 +1460,14 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `e` is `[0, 100]`. - fn on_finalize_per_event(_e: u32, ) -> Weight { + fn on_finalize_per_event(e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_149_000 picoseconds. - Weight::from_parts(46_414_395, 5011) + // Minimum execution time: 44_920_000 picoseconds. + Weight::from_parts(47_159_031, 5011) + // Standard Error: 1_344 + .saturating_add(Weight::from_parts(1_022, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1492,8 +1490,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_382_000 picoseconds. - Weight::from_parts(46_379_406, 5011) + // Minimum execution time: 44_423_000 picoseconds. + Weight::from_parts(47_321_642, 5011) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -1507,7 +1505,7 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `213` // Estimated: `1698` - // Minimum execution time: 3_154_000 picoseconds. + // Minimum execution time: 3_172_000 picoseconds. Weight::from_parts(3_405_000, 1698) .saturating_add(RocksDbWeight::get().reads(1_u64)) } @@ -1518,10 +1516,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `491 + k * (69 ±0)` // Estimated: `481 + k * (70 ±0)` - // Minimum execution time: 14_582_000 picoseconds. - Weight::from_parts(14_895_000, 481) - // Standard Error: 1_943 - .saturating_add(Weight::from_parts(1_250_682, 0).saturating_mul(k.into())) + // Minimum execution time: 14_342_000 picoseconds. + Weight::from_parts(14_928_000, 481) + // Standard Error: 1_398 + .saturating_add(Weight::from_parts(1_214_263, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -1545,10 +1543,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1265 + c * (1 ±0)` // Estimated: `7200 + c * (1 ±0)` - // Minimum execution time: 99_711_000 picoseconds. - Weight::from_parts(152_217_303, 7200) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_382, 0).saturating_mul(c.into())) + // Minimum execution time: 100_504_000 picoseconds. + Weight::from_parts(148_244_010, 7200) + // Standard Error: 15 + .saturating_add(Weight::from_parts(1_566, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -1570,8 +1568,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1205` // Estimated: `7144` - // Minimum execution time: 94_712_000 picoseconds. - Weight::from_parts(99_302_408, 7144) + // Minimum execution time: 92_006_000 picoseconds. + Weight::from_parts(97_368_589, 7144) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1592,10 +1590,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `4609` // Estimated: `10549` - // Minimum execution time: 150_260_000 picoseconds. - Weight::from_parts(155_718_240, 10549) - // Standard Error: 621_625 - .saturating_add(Weight::from_parts(2_843_759, 0).saturating_mul(b.into())) + // Minimum execution time: 150_612_000 picoseconds. + Weight::from_parts(156_471_593, 10549) + // Standard Error: 666_004 + .saturating_add(Weight::from_parts(354_506, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1619,12 +1617,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6924` - // Minimum execution time: 779_431_000 picoseconds. - Weight::from_parts(74_223_269, 6924) - // Standard Error: 39 - .saturating_add(Weight::from_parts(20_177, 0).saturating_mul(c.into())) - // Standard Error: 31 - .saturating_add(Weight::from_parts(5_066, 0).saturating_mul(i.into())) + // Minimum execution time: 785_616_000 picoseconds. + Weight::from_parts(53_380_306, 6924) + // Standard Error: 38 + .saturating_add(Weight::from_parts(20_886, 0).saturating_mul(c.into())) + // Standard Error: 29 + .saturating_add(Weight::from_parts(5_224, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1653,14 +1651,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `994` // Estimated: `6934` - // Minimum execution time: 392_839_000 picoseconds. - Weight::from_parts(306_119_258, 6934) - // Standard Error: 41 - .saturating_add(Weight::from_parts(15_749, 0).saturating_mul(c.into())) + // Minimum execution time: 406_081_000 picoseconds. + Weight::from_parts(222_392_381, 6934) + // Standard Error: 42 + .saturating_add(Weight::from_parts(16_556, 0).saturating_mul(c.into())) // Standard Error: 32 - .saturating_add(Weight::from_parts(456, 0).saturating_mul(i.into())) - // Standard Error: 2_738_762 - .saturating_add(Weight::from_parts(2_532_218, 0).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(891, 0).saturating_mul(i.into())) + // Standard Error: 2_758_958 + .saturating_add(Weight::from_parts(34_243_932, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -1668,8 +1666,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_082_000 picoseconds. - Weight::from_parts(3_298_000, 0) + // Minimum execution time: 3_102_000 picoseconds. + Weight::from_parts(3_291_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:2 w:1) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -1690,10 +1688,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1735` // Estimated: `7668` - // Minimum execution time: 196_938_000 picoseconds. - Weight::from_parts(199_086_558, 7668) - // Standard Error: 11 - .saturating_add(Weight::from_parts(4_155, 0).saturating_mul(i.into())) + // Minimum execution time: 189_793_000 picoseconds. + Weight::from_parts(197_777_915, 7668) + // Standard Error: 12 + .saturating_add(Weight::from_parts(4_259, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -1713,8 +1711,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 104_369_000 picoseconds. - Weight::from_parts(106_866_000, 7887) + // Minimum execution time: 101_360_000 picoseconds. + Weight::from_parts(105_253_000, 7887) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1739,10 +1737,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1947` // Estimated: `7887` - // Minimum execution time: 182_578_000 picoseconds. - Weight::from_parts(191_542_185, 7887) - // Standard Error: 879_036 - .saturating_add(Weight::from_parts(1_872_614, 0).saturating_mul(d.into())) + // Minimum execution time: 179_650_000 picoseconds. + Weight::from_parts(188_389_730, 7887) + // Standard Error: 814_865 + .saturating_add(Weight::from_parts(1_969_669, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -1759,10 +1757,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `358` // Estimated: `3823` - // Minimum execution time: 28_267_000 picoseconds. - Weight::from_parts(24_047_092, 3823) - // Standard Error: 12 - .saturating_add(Weight::from_parts(6_227, 0).saturating_mul(c.into())) + // Minimum execution time: 28_012_000 picoseconds. + Weight::from_parts(22_159_986, 3823) + // Standard Error: 13 + .saturating_add(Weight::from_parts(6_433, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1779,10 +1777,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `392` // Estimated: `3857` - // Minimum execution time: 61_639_000 picoseconds. - Weight::from_parts(53_876_810, 3857) - // Standard Error: 17 - .saturating_add(Weight::from_parts(14_193, 0).saturating_mul(c.into())) + // Minimum execution time: 62_487_000 picoseconds. + Weight::from_parts(50_869_690, 3857) + // Standard Error: 20 + .saturating_add(Weight::from_parts(14_688, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1796,8 +1794,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `524` // Estimated: `3989` - // Minimum execution time: 55_130_000 picoseconds. - Weight::from_parts(56_847_000, 3989) + // Minimum execution time: 53_252_000 picoseconds. + Weight::from_parts(54_982_000, 3989) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1815,8 +1813,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `867` // Estimated: `6807` - // Minimum execution time: 69_290_000 picoseconds. - Weight::from_parts(70_060_000, 6807) + // Minimum execution time: 67_932_000 picoseconds. + Weight::from_parts(69_295_000, 6807) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -1830,8 +1828,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 62_337_000 picoseconds. - Weight::from_parts(63_539_000, 4088) + // Minimum execution time: 61_077_000 picoseconds. + Weight::from_parts(62_440_000, 4088) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1843,8 +1841,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `93` // Estimated: `3558` - // Minimum execution time: 41_961_000 picoseconds. - Weight::from_parts(42_796_000, 3558) + // Minimum execution time: 39_997_000 picoseconds. + Weight::from_parts(40_977_000, 3558) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1858,8 +1856,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `381` // Estimated: `3846` - // Minimum execution time: 19_133_000 picoseconds. - Weight::from_parts(20_044_000, 3846) + // Minimum execution time: 19_305_000 picoseconds. + Weight::from_parts(20_046_000, 3846) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// The range of component `r` is `[0, 1600]`. @@ -1867,24 +1865,24 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_104_000 picoseconds. - Weight::from_parts(8_259_820, 0) - // Standard Error: 302 - .saturating_add(Weight::from_parts(190_188, 0).saturating_mul(r.into())) + // Minimum execution time: 7_715_000 picoseconds. + Weight::from_parts(9_010_748, 0) + // Standard Error: 236 + .saturating_add(Weight::from_parts(188_696, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 371_000 picoseconds. - Weight::from_parts(422_000, 0) + // Minimum execution time: 378_000 picoseconds. + Weight::from_parts(457_000, 0) } fn seal_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 368_000 picoseconds. - Weight::from_parts(416_000, 0) + // Minimum execution time: 322_000 picoseconds. + Weight::from_parts(394_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1892,8 +1890,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `623` // Estimated: `4088` - // Minimum execution time: 11_535_000 picoseconds. - Weight::from_parts(12_145_000, 4088) + // Minimum execution time: 11_336_000 picoseconds. + Weight::from_parts(11_892_000, 4088) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) @@ -1902,16 +1900,16 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `473` // Estimated: `3938` - // Minimum execution time: 10_152_000 picoseconds. - Weight::from_parts(10_428_000, 3938) + // Minimum execution time: 9_875_000 picoseconds. + Weight::from_parts(10_680_000, 3938) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `436` // Estimated: `0` - // Minimum execution time: 9_710_000 picoseconds. - Weight::from_parts(10_570_000, 0) + // Minimum execution time: 9_685_000 picoseconds. + Weight::from_parts(10_366_000, 0) } /// Storage: `Revive::AccountInfoOf` (r:1 w:0) /// Proof: `Revive::AccountInfoOf` (`max_values`: None, `max_size`: Some(247), added: 2722, mode: `Measured`) @@ -1921,51 +1919,51 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `545` // Estimated: `4010` - // Minimum execution time: 13_438_000 picoseconds. - Weight::from_parts(14_006_000, 4010) + // Minimum execution time: 13_680_000 picoseconds. + Weight::from_parts(14_225_000, 4010) .saturating_add(RocksDbWeight::get().reads(2_u64)) } fn caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_169_000 picoseconds. - Weight::from_parts(1_324_000, 0) + // Minimum execution time: 1_161_000 picoseconds. + Weight::from_parts(1_305_000, 0) } fn caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_243_000 picoseconds. - Weight::from_parts(1_338_000, 0) + // Minimum execution time: 1_134_000 picoseconds. + Weight::from_parts(1_266_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 345_000 picoseconds. - Weight::from_parts(401_000, 0) + // Minimum execution time: 329_000 picoseconds. + Weight::from_parts(378_000, 0) } fn weight_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_216_000 picoseconds. - Weight::from_parts(1_378_000, 0) + // Minimum execution time: 1_124_000 picoseconds. + Weight::from_parts(1_206_000, 0) } fn seal_ref_time_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_939_000 picoseconds. - Weight::from_parts(2_037_000, 0) + // Minimum execution time: 1_929_000 picoseconds. + Weight::from_parts(2_086_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `576` // Estimated: `0` - // Minimum execution time: 13_539_000 picoseconds. - Weight::from_parts(14_072_000, 0) + // Minimum execution time: 13_400_000 picoseconds. + Weight::from_parts(13_848_000, 0) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -1977,8 +1975,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `884` // Estimated: `4349` - // Minimum execution time: 20_505_000 picoseconds. - Weight::from_parts(21_180_000, 4349) + // Minimum execution time: 20_750_000 picoseconds. + Weight::from_parts(21_441_000, 4349) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Revive::ImmutableDataOf` (r:1 w:0) @@ -1988,10 +1986,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `304 + n * (1 ±0)` // Estimated: `3769 + n * (1 ±0)` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_743_885, 3769) - // Standard Error: 4 - .saturating_add(Weight::from_parts(524, 0).saturating_mul(n.into())) + // Minimum execution time: 6_166_000 picoseconds. + Weight::from_parts(6_765_990, 3769) + // Standard Error: 5 + .saturating_add(Weight::from_parts(585, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2002,67 +2000,67 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_219_000 picoseconds. - Weight::from_parts(2_464_264, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(487, 0).saturating_mul(n.into())) + // Minimum execution time: 2_062_000 picoseconds. + Weight::from_parts(2_354_186, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(560, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 308_000 picoseconds. - Weight::from_parts(340_000, 0) + // Minimum execution time: 258_000 picoseconds. + Weight::from_parts(304_000, 0) } fn minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_481_000 picoseconds. - Weight::from_parts(1_647_000, 0) + // Minimum execution time: 1_265_000 picoseconds. + Weight::from_parts(1_399_000, 0) } fn seal_return_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 324_000 picoseconds. - Weight::from_parts(348_000, 0) + // Minimum execution time: 266_000 picoseconds. + Weight::from_parts(310_000, 0) } fn seal_call_data_size() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 284_000 picoseconds. - Weight::from_parts(318_000, 0) + // Minimum execution time: 260_000 picoseconds. + Weight::from_parts(330_000, 0) } fn seal_gas_limit() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 287_000 picoseconds. - Weight::from_parts(337_000, 0) + // Minimum execution time: 242_000 picoseconds. + Weight::from_parts(272_000, 0) } fn seal_gas_price() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_094_000 picoseconds. - Weight::from_parts(1_239_000, 0) + // Minimum execution time: 1_084_000 picoseconds. + Weight::from_parts(1_219_000, 0) } fn seal_base_fee() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_091_000 picoseconds. - Weight::from_parts(1_182_000, 0) + // Minimum execution time: 967_000 picoseconds. + Weight::from_parts(1_080_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 311_000 picoseconds. - Weight::from_parts(358_000, 0) + // Minimum execution time: 285_000 picoseconds. + Weight::from_parts(331_000, 0) } /// Storage: `Session::Validators` (r:1 w:0) /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -2070,8 +2068,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `141` // Estimated: `1626` - // Minimum execution time: 21_954_000 picoseconds. - Weight::from_parts(22_476_000, 1626) + // Minimum execution time: 21_377_000 picoseconds. + Weight::from_parts(21_980_000, 1626) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Revive::BlockHash` (r:1 w:0) @@ -2080,63 +2078,65 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `318` // Estimated: `3783` - // Minimum execution time: 5_659_000 picoseconds. - Weight::from_parts(6_107_000, 3783) + // Minimum execution time: 5_605_000 picoseconds. + Weight::from_parts(6_164_000, 3783) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 281_000 picoseconds. - Weight::from_parts(324_000, 0) + // Minimum execution time: 285_000 picoseconds. + Weight::from_parts(330_000, 0) } /// The range of component `n` is `[0, 1048572]`. fn seal_copy_to_contract(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 475_000 picoseconds. - Weight::from_parts(65_586, 0) + // Minimum execution time: 461_000 picoseconds. + Weight::from_parts(573_695, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(203, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(238, 0).saturating_mul(n.into())) } fn seal_call_data_load() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 304_000 picoseconds. - Weight::from_parts(339_000, 0) + // Minimum execution time: 268_000 picoseconds. + Weight::from_parts(305_000, 0) } /// The range of component `n` is `[0, 1048576]`. fn seal_call_data_copy(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 299_000 picoseconds. - Weight::from_parts(319_000, 0) + // Minimum execution time: 283_000 picoseconds. + Weight::from_parts(137_385, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(114, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(149, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 131072]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 332_000 picoseconds. - Weight::from_parts(639_720, 0) + // Minimum execution time: 309_000 picoseconds. + Weight::from_parts(546_911, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(198, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(234, 0).saturating_mul(n.into())) } /// Storage: `Revive::OriginalAccount` (r:2 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) /// The range of component `r` is `[0, 1]`. - fn seal_terminate(_r: u32, ) -> Weight { + fn seal_terminate(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `924` // Estimated: `6864` - // Minimum execution time: 20_463_000 picoseconds. - Weight::from_parts(21_695_959, 6864) + // Minimum execution time: 20_544_000 picoseconds. + Weight::from_parts(21_645_167, 6864) + // Standard Error: 67_218 + .saturating_add(Weight::from_parts(66_332, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Balances::Holds` (r:2 w:2) @@ -2159,8 +2159,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1440` // Estimated: `7380` - // Minimum execution time: 256_587_000 picoseconds. - Weight::from_parts(261_722_000, 7380) + // Minimum execution time: 240_341_000 picoseconds. + Weight::from_parts(248_030_000, 7380) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -2170,10 +2170,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_346_000 picoseconds. - Weight::from_parts(5_415_000, 0) + // Minimum execution time: 5_424_000 picoseconds. + Weight::from_parts(5_668_000, 0) // Standard Error: 4 - .saturating_add(Weight::from_parts(1_191, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_290, 0).saturating_mul(n.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2181,8 +2181,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 7_570_000 picoseconds. - Weight::from_parts(7_788_000, 648) + // Minimum execution time: 7_428_000 picoseconds. + Weight::from_parts(7_906_000, 648) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -2191,8 +2191,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 41_676_000 picoseconds. - Weight::from_parts(43_110_000, 10658) + // Minimum execution time: 41_352_000 picoseconds. + Weight::from_parts(42_064_000, 10658) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -2201,8 +2201,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `648` // Estimated: `648` - // Minimum execution time: 8_455_000 picoseconds. - Weight::from_parts(8_988_000, 648) + // Minimum execution time: 8_461_000 picoseconds. + Weight::from_parts(8_788_000, 648) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2212,8 +2212,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `10658` // Estimated: `10658` - // Minimum execution time: 43_797_000 picoseconds. - Weight::from_parts(44_900_000, 10658) + // Minimum execution time: 43_054_000 picoseconds. + Weight::from_parts(43_904_000, 10658) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2226,14 +2226,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + o * (1 ±0)` // Estimated: `246 + o * (1 ±0)` - // Minimum execution time: 9_561_000 picoseconds. - Weight::from_parts(10_050_003, 246) - // Standard Error: 56 - .saturating_add(Weight::from_parts(227, 0).saturating_mul(n.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(797, 0).saturating_mul(o.into())) - // Standard Error: 14_979 - .saturating_add(Weight::from_parts(563_324, 0).saturating_mul(c.into())) + // Minimum execution time: 9_548_000 picoseconds. + Weight::from_parts(10_147_173, 246) + // Standard Error: 67 + .saturating_add(Weight::from_parts(474, 0).saturating_mul(n.into())) + // Standard Error: 67 + .saturating_add(Weight::from_parts(1_230, 0).saturating_mul(o.into())) + // Standard Error: 18_056 + .saturating_add(Weight::from_parts(190_232, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -2242,14 +2242,12 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn clear_storage(_n: u32, c: u32, ) -> Weight { + fn clear_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_381_000 picoseconds. - Weight::from_parts(12_358_640, 376) - // Standard Error: 16_536 - .saturating_add(Weight::from_parts(143_265, 0).saturating_mul(c.into())) + // Minimum execution time: 11_348_000 picoseconds. + Weight::from_parts(12_653_422, 376) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2261,12 +2259,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `246 + n * (1 ±0)` - // Minimum execution time: 8_472_000 picoseconds. - Weight::from_parts(8_817_242, 246) - // Standard Error: 56 - .saturating_add(Weight::from_parts(1_434, 0).saturating_mul(n.into())) - // Standard Error: 15_439 - .saturating_add(Weight::from_parts(572_818, 0).saturating_mul(c.into())) + // Minimum execution time: 8_523_000 picoseconds. + Weight::from_parts(9_259_930, 246) + // Standard Error: 59 + .saturating_add(Weight::from_parts(1_211, 0).saturating_mul(n.into())) + // Standard Error: 16_061 + .saturating_add(Weight::from_parts(122_836, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2274,31 +2272,25 @@ impl WeightInfo for () { /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn contains_storage(n: u32, c: u32, ) -> Weight { + fn contains_storage(_n: u32, _c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_397_000 picoseconds. - Weight::from_parts(3_681_057, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) - // Standard Error: 7_208 - .saturating_add(Weight::from_parts(63_383, 0).saturating_mul(c.into())) + // Minimum execution time: 3_179_000 picoseconds. + Weight::from_parts(3_575_637, 0) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 416]`. /// The range of component `c` is `[0, 1]`. - fn take_storage(n: u32, c: u32, ) -> Weight { + fn take_storage(_n: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `376` // Estimated: `376` - // Minimum execution time: 11_586_000 picoseconds. - Weight::from_parts(12_575_248, 376) - // Standard Error: 63 - .saturating_add(Weight::from_parts(172, 0).saturating_mul(n.into())) - // Standard Error: 17_323 - .saturating_add(Weight::from_parts(254_003, 0).saturating_mul(c.into())) + // Minimum execution time: 11_620_000 picoseconds. + Weight::from_parts(12_644_961, 376) + // Standard Error: 16_852 + .saturating_add(Weight::from_parts(31_531, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2306,36 +2298,36 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_628_000 picoseconds. - Weight::from_parts(1_730_000, 0) + // Minimum execution time: 1_528_000 picoseconds. + Weight::from_parts(1_626_000, 0) } fn set_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 1_924_000 picoseconds. - Weight::from_parts(2_058_000, 0) + Weight::from_parts(2_060_000, 0) } fn get_transient_storage_empty() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_511_000 picoseconds. - Weight::from_parts(1_644_000, 0) + // Minimum execution time: 1_544_000 picoseconds. + Weight::from_parts(1_636_000, 0) } fn get_transient_storage_full() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_690_000 picoseconds. - Weight::from_parts(1_812_000, 0) + // Minimum execution time: 1_681_000 picoseconds. + Weight::from_parts(1_792_000, 0) } fn rollback_transient_storage() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_278_000 picoseconds. - Weight::from_parts(1_439_000, 0) + // Minimum execution time: 1_230_000 picoseconds. + Weight::from_parts(1_351_000, 0) } /// The range of component `n` is `[0, 416]`. /// The range of component `o` is `[0, 416]`. @@ -2343,46 +2335,48 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_413_000 picoseconds. - Weight::from_parts(2_680_258, 0) - // Standard Error: 17 - .saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(378, 0).saturating_mul(o.into())) + // Minimum execution time: 2_293_000 picoseconds. + Weight::from_parts(2_696_431, 0) + // Standard Error: 19 + .saturating_add(Weight::from_parts(281, 0).saturating_mul(n.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(319, 0).saturating_mul(o.into())) } /// The range of component `n` is `[0, 416]`. fn seal_clear_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_919_000 picoseconds. - Weight::from_parts(4_288_312, 0) + // Minimum execution time: 3_700_000 picoseconds. + Weight::from_parts(4_092_551, 0) } /// The range of component `n` is `[0, 416]`. fn seal_get_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_049_000 picoseconds. - Weight::from_parts(2_286_020, 0) - // Standard Error: 21 - .saturating_add(Weight::from_parts(322, 0).saturating_mul(n.into())) + // Minimum execution time: 1_964_000 picoseconds. + Weight::from_parts(2_273_182, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(244, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 416]`. fn seal_contains_transient_storage(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_384_000 picoseconds. - Weight::from_parts(3_742_807, 0) + // Minimum execution time: 3_154_000 picoseconds. + Weight::from_parts(3_479_990, 0) } /// The range of component `n` is `[0, 416]`. - fn seal_take_transient_storage(_n: u32, ) -> Weight { + fn seal_take_transient_storage(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_162_000 picoseconds. - Weight::from_parts(4_589_040, 0) + // Minimum execution time: 3_937_000 picoseconds. + Weight::from_parts(4_306_712, 0) + // Standard Error: 62 + .saturating_add(Weight::from_parts(507, 0).saturating_mul(n.into())) } /// Storage: `Revive::OriginalAccount` (r:1 w:0) /// Proof: `Revive::OriginalAccount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`) @@ -2401,14 +2395,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2006` // Estimated: `5471` - // Minimum execution time: 98_041_000 picoseconds. - Weight::from_parts(78_973_555, 5471) - // Standard Error: 190_245 - .saturating_add(Weight::from_parts(19_160_365, 0).saturating_mul(t.into())) - // Standard Error: 190_245 - .saturating_add(Weight::from_parts(24_103_133, 0).saturating_mul(d.into())) + // Minimum execution time: 98_806_000 picoseconds. + Weight::from_parts(81_854_063, 5471) + // Standard Error: 196_041 + .saturating_add(Weight::from_parts(19_063_085, 0).saturating_mul(t.into())) + // Standard Error: 196_041 + .saturating_add(Weight::from_parts(23_385_511, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(2, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) @@ -2423,12 +2417,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `436 + d * (212 ±0)` // Estimated: `2056 + d * (2056 ±0)` - // Minimum execution time: 26_273_000 picoseconds. - Weight::from_parts(15_380_404, 2056) - // Standard Error: 61_413 - .saturating_add(Weight::from_parts(12_108_999, 0).saturating_mul(d.into())) + // Minimum execution time: 26_166_000 picoseconds. + Weight::from_parts(15_522_272, 2056) + // Standard Error: 53_032 + .saturating_add(Weight::from_parts(12_019_439, 0).saturating_mul(d.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(330, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(401, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(d.into()))) .saturating_add(Weight::from_parts(0, 2056).saturating_mul(d.into())) @@ -2443,8 +2437,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1434` // Estimated: `4899` - // Minimum execution time: 35_262_000 picoseconds. - Weight::from_parts(36_904_000, 4899) + // Minimum execution time: 34_614_000 picoseconds. + Weight::from_parts(36_426_000, 4899) .saturating_add(RocksDbWeight::get().reads(3_u64)) } /// Storage: `Revive::CodeInfoOf` (r:1 w:1) @@ -2462,14 +2456,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1450` // Estimated: `4900 + d * (27 ±1) + t * (27 ±1)` - // Minimum execution time: 161_202_000 picoseconds. - Weight::from_parts(118_049_370, 4900) - // Standard Error: 548_380 - .saturating_add(Weight::from_parts(21_408_479, 0).saturating_mul(t.into())) - // Standard Error: 548_380 - .saturating_add(Weight::from_parts(29_259_452, 0).saturating_mul(d.into())) + // Minimum execution time: 161_763_000 picoseconds. + Weight::from_parts(115_993_493, 4900) + // Standard Error: 591_582 + .saturating_add(Weight::from_parts(22_154_256, 0).saturating_mul(t.into())) + // Standard Error: 591_582 + .saturating_add(Weight::from_parts(31_214_747, 0).saturating_mul(d.into())) // Standard Error: 6 - .saturating_add(Weight::from_parts(3_911, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(4_024, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 27).saturating_mul(d.into())) @@ -2492,14 +2486,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `869` // Estimated: `6829` - // Minimum execution time: 382_446_000 picoseconds. - Weight::from_parts(261_013_451, 6829) - // Standard Error: 650_354 - .saturating_add(Weight::from_parts(13_883_476, 0).saturating_mul(t.into())) - // Standard Error: 650_354 - .saturating_add(Weight::from_parts(24_757_856, 0).saturating_mul(d.into())) - // Standard Error: 25 - .saturating_add(Weight::from_parts(8_095, 0).saturating_mul(i.into())) + // Minimum execution time: 374_535_000 picoseconds. + Weight::from_parts(255_769_803, 6829) + // Standard Error: 683_204 + .saturating_add(Weight::from_parts(17_094_987, 0).saturating_mul(t.into())) + // Standard Error: 683_204 + .saturating_add(Weight::from_parts(24_517_603, 0).saturating_mul(d.into())) + // Standard Error: 27 + .saturating_add(Weight::from_parts(8_450, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2508,125 +2502,125 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_363_000 picoseconds. - Weight::from_parts(13_026_953, 0) + // Minimum execution time: 1_304_000 picoseconds. + Weight::from_parts(10_729_812, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_231, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_265, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn identity(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 836_000 picoseconds. - Weight::from_parts(857_621, 0) + // Minimum execution time: 849_000 picoseconds. + Weight::from_parts(794_629, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(112, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn ripemd_160(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_350_000 picoseconds. - Weight::from_parts(4_141_101, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(3_743, 0).saturating_mul(n.into())) + // Minimum execution time: 1_345_000 picoseconds. + Weight::from_parts(1_397_000, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(3_811, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_211_000 picoseconds. - Weight::from_parts(11_345_193, 0) + // Minimum execution time: 1_163_000 picoseconds. + Weight::from_parts(14_574_860, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_542, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_570, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_838_000 picoseconds. - Weight::from_parts(12_083_796, 0) + // Minimum execution time: 1_714_000 picoseconds. + Weight::from_parts(11_809_111, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_432, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_888_000 picoseconds. - Weight::from_parts(13_484_713, 0) + // Minimum execution time: 1_694_000 picoseconds. + Weight::from_parts(11_839_658, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_397, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_429, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048321]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 45_330_000 picoseconds. - Weight::from_parts(97_195_127, 0) - // Standard Error: 6 - .saturating_add(Weight::from_parts(4_792, 0).saturating_mul(n.into())) + // Minimum execution time: 43_212_000 picoseconds. + Weight::from_parts(100_227_639, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(4_833, 0).saturating_mul(n.into())) } fn ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_259_000 picoseconds. - Weight::from_parts(47_123_000, 0) + // Minimum execution time: 46_760_000 picoseconds. + Weight::from_parts(47_635_000, 0) } fn p256_verify() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_785_460_000 picoseconds. - Weight::from_parts(1_792_839_000, 0) + // Minimum execution time: 1_794_747_000 picoseconds. + Weight::from_parts(1_803_009_000, 0) } fn bn128_add() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 15_037_000 picoseconds. - Weight::from_parts(16_276_000, 0) + // Minimum execution time: 15_061_000 picoseconds. + Weight::from_parts(16_030_000, 0) } fn bn128_mul() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 995_799_000 picoseconds. - Weight::from_parts(1_001_153_000, 0) + // Minimum execution time: 983_121_000 picoseconds. + Weight::from_parts(987_925_000, 0) } /// The range of component `n` is `[0, 20]`. fn bn128_pairing(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 939_000 picoseconds. - Weight::from_parts(5_024_029_661, 0) - // Standard Error: 10_709_223 - .saturating_add(Weight::from_parts(6_097_358_170, 0).saturating_mul(n.into())) + // Minimum execution time: 931_000 picoseconds. + Weight::from_parts(4_976_631_682, 0) + // Standard Error: 10_697_026 + .saturating_add(Weight::from_parts(5_989_624_807, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1200]`. fn blake2f(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_081_000 picoseconds. - Weight::from_parts(1_400_190, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(28_307, 0).saturating_mul(n.into())) + // Minimum execution time: 994_000 picoseconds. + Weight::from_parts(1_323_648, 0) + // Standard Error: 75 + .saturating_add(Weight::from_parts(28_891, 0).saturating_mul(n.into())) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_140_000 picoseconds. - Weight::from_parts(13_332_000, 0) + // Minimum execution time: 13_043_000 picoseconds. + Weight::from_parts(13_220_000, 0) } /// Storage: `Revive::CodeInfoOf` (r:2 w:2) /// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `Measured`) @@ -2641,10 +2635,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `420 + r * (401 ±0)` // Estimated: `6360 + r * (2143 ±0)` - // Minimum execution time: 14_847_000 picoseconds. - Weight::from_parts(15_868_655, 6360) - // Standard Error: 57_150 - .saturating_add(Weight::from_parts(49_102_844, 0).saturating_mul(r.into())) + // Minimum execution time: 14_503_000 picoseconds. + Weight::from_parts(15_601_979, 6360) + // Standard Error: 70_755 + .saturating_add(Weight::from_parts(46_884_220, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(2_u64)) @@ -2657,29 +2651,29 @@ impl WeightInfo for () { // Measured: `0` // Estimated: `0` // Minimum execution time: 640_000 picoseconds. - Weight::from_parts(722_843, 0) - // Standard Error: 22 - .saturating_add(Weight::from_parts(15_334, 0).saturating_mul(r.into())) + Weight::from_parts(904_145, 0) + // Standard Error: 15 + .saturating_add(Weight::from_parts(15_305, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 13_904_000 picoseconds. - Weight::from_parts(67_713_763, 0) - // Standard Error: 412 - .saturating_add(Weight::from_parts(112_584, 0).saturating_mul(r.into())) + // Minimum execution time: 14_538_000 picoseconds. + Weight::from_parts(61_845_182, 0) + // Standard Error: 949 + .saturating_add(Weight::from_parts(140_478, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 10000]`. fn instr_empty_loop(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_496_000 picoseconds. - Weight::from_parts(3_311_333, 0) - // Standard Error: 30 - .saturating_add(Weight::from_parts(72_707, 0).saturating_mul(r.into())) + // Minimum execution time: 3_525_000 picoseconds. + Weight::from_parts(2_922_756, 0) + // Standard Error: 59 + .saturating_add(Weight::from_parts(72_777, 0).saturating_mul(r.into())) } /// Storage: `Revive::PristineCode` (r:1 w:0) /// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -2688,10 +2682,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `527 + n * (1 ±0)` // Estimated: `3992 + n * (1 ±0)` - // Minimum execution time: 14_441_000 picoseconds. - Weight::from_parts(14_702_114, 3992) - // Standard Error: 11 - .saturating_add(Weight::from_parts(716, 0).saturating_mul(n.into())) + // Minimum execution time: 14_735_000 picoseconds. + Weight::from_parts(14_539_156, 3992) + // Standard Error: 6 + .saturating_add(Weight::from_parts(844, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -2703,8 +2697,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `382` // Estimated: `6322` - // Minimum execution time: 12_343_000 picoseconds. - Weight::from_parts(12_780_000, 6322) + // Minimum execution time: 12_387_000 picoseconds. + Weight::from_parts(13_088_000, 6322) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2718,8 +2712,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `505` // Estimated: `6866` - // Minimum execution time: 65_381_000 picoseconds. - Weight::from_parts(67_303_000, 6866) + // Minimum execution time: 63_539_000 picoseconds. + Weight::from_parts(64_674_000, 6866) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2740,10 +2734,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3012 + n * (97 ±0)` // Estimated: `6303 + n * (104 ±0)` - // Minimum execution time: 27_258_000 picoseconds. - Weight::from_parts(54_578_010, 6303) - // Standard Error: 4_419 - .saturating_add(Weight::from_parts(521_073, 0).saturating_mul(n.into())) + // Minimum execution time: 27_202_000 picoseconds. + Weight::from_parts(56_073_594, 6303) + // Standard Error: 4_495 + .saturating_add(Weight::from_parts(520_798, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 104).saturating_mul(n.into())) @@ -2765,10 +2759,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `3577 + d * (3 ±0)` // Estimated: `7036 + d * (3 ±0)` - // Minimum execution time: 59_373_000 picoseconds. - Weight::from_parts(61_916_032, 7036) - // Standard Error: 133 - .saturating_add(Weight::from_parts(11_875, 0).saturating_mul(d.into())) + // Minimum execution time: 60_326_000 picoseconds. + Weight::from_parts(62_065_323, 7036) + // Standard Error: 178 + .saturating_add(Weight::from_parts(12_721, 0).saturating_mul(d.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(d.into())) @@ -2788,12 +2782,14 @@ impl WeightInfo for () { /// Storage: `Revive::ReceiptInfoData` (r:0 w:1) /// Proof: `Revive::ReceiptInfoData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `e` is `[0, 100]`. - fn on_finalize_per_event(_e: u32, ) -> Weight { + fn on_finalize_per_event(e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_149_000 picoseconds. - Weight::from_parts(46_414_395, 5011) + // Minimum execution time: 44_920_000 picoseconds. + Weight::from_parts(47_159_031, 5011) + // Standard Error: 1_344 + .saturating_add(Weight::from_parts(1_022, 0).saturating_mul(e.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -2816,8 +2812,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1546` // Estimated: `5011` - // Minimum execution time: 44_382_000 picoseconds. - Weight::from_parts(46_379_406, 5011) + // Minimum execution time: 44_423_000 picoseconds. + Weight::from_parts(47_321_642, 5011) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } From 92b33b45121f5132b96a5c394320ed7fb4f6b8d3 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 18:21:11 +0100 Subject: [PATCH 10/19] wip --- Cargo.lock | 2 + substrate/client/db/Cargo.toml | 1 + substrate/client/db/src/bench.rs | 23 ++++++++ substrate/client/db/src/lib.rs | 13 +++++ substrate/client/db/src/record_stats_state.rs | 21 +++++++ .../revive/src/vm/evm/instructions/host.rs | 6 ++ substrate/frame/revive/src/vm/pvm.rs | 7 +++ substrate/primitives/io/src/lib.rs | 14 ++--- .../primitives/state-machine/src/backend.rs | 16 +++++ substrate/primitives/state-machine/src/ext.rs | 58 ++++++++++++------- .../state-machine/src/trie_backend.rs | 12 ++++ .../state-machine/src/trie_backend_essence.rs | 51 +++++++++++++++- substrate/primitives/trie/Cargo.toml | 1 + substrate/primitives/trie/src/lib.rs | 56 ++++++++++++++++++ 14 files changed, 253 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d129f4eea452c..75418606fa124 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19926,6 +19926,7 @@ dependencies = [ "sp-blockchain", "sp-core 28.0.0", "sp-database", + "sp-externalities 0.25.0", "sp-runtime", "sp-state-machine", "sp-tracing 16.0.0", @@ -23854,6 +23855,7 @@ dependencies = [ "foldhash", "hash-db", "hashbrown 0.15.3", + "log", "memory-db", "nohash-hasher", "parity-scale-codec", diff --git a/substrate/client/db/Cargo.toml b/substrate/client/db/Cargo.toml index 2a8e2a78e11a1..7b3594fec39bc 100644 --- a/substrate/client/db/Cargo.toml +++ b/substrate/client/db/Cargo.toml @@ -40,6 +40,7 @@ sp-arithmetic = { workspace = true, default-features = true } sp-blockchain = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-database = { workspace = true, default-features = true } +sp-externalities = { workspace = true, default-features = true } sp-runtime = { workspace = true, default-features = true } sp-state-machine = { workspace = true, default-features = true } sp-trie = { workspace = true, default-features = true } diff --git a/substrate/client/db/src/bench.rs b/substrate/client/db/src/bench.rs index 61b93a9a2314d..25703d1a3f042 100644 --- a/substrate/client/db/src/bench.rs +++ b/substrate/client/db/src/bench.rs @@ -353,6 +353,15 @@ impl StateBackend for BenchmarkingState { self.state.borrow().as_ref().ok_or_else(state_err)?.storage(key) } + fn storage_with_status( + &self, + key: &[u8], + ) -> Result>>, Self::Error> { + // Only if cold load ? + self.add_read_key(None, key); + self.state.borrow().as_ref().ok_or_else(state_err)?.storage_with_status(key) + } + fn storage_hash(&self, key: &[u8]) -> Result, Self::Error> { self.add_read_key(None, key); self.state.borrow().as_ref().ok_or_else(state_err)?.storage_hash(key) @@ -371,6 +380,20 @@ impl StateBackend for BenchmarkingState { .child_storage(child_info, key) } + fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>>, Self::Error> { + // Only if cold load ? + self.add_read_key(Some(child_info.storage_key()), key); + self.state + .borrow() + .as_ref() + .ok_or_else(state_err)? + .child_storage_with_status(child_info, key) + } + fn child_storage_hash( &self, child_info: &ChildInfo, diff --git a/substrate/client/db/src/lib.rs b/substrate/client/db/src/lib.rs index d86b722963b5b..ab7a30cab2974 100644 --- a/substrate/client/db/src/lib.rs +++ b/substrate/client/db/src/lib.rs @@ -78,6 +78,7 @@ use sp_core::{ storage::{well_known_keys, ChildInfo}, }; use sp_database::Transaction; +use sp_externalities::StateLoad; use sp_runtime::{ generic::BlockId, traits::{ @@ -199,6 +200,10 @@ impl StateBackend> for RefTrackingState { self.state.storage(key) } + fn storage_with_status(&self, key: &[u8]) -> Result>>, Self::Error> { + self.state.storage_with_status(key) + } + fn storage_hash(&self, key: &[u8]) -> Result, Self::Error> { self.state.storage_hash(key) } @@ -211,6 +216,14 @@ impl StateBackend> for RefTrackingState { self.state.child_storage(child_info, key) } + fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>>, Self::Error> { + self.state.child_storage_with_status(child_info, key) + } + fn child_storage_hash( &self, child_info: &ChildInfo, diff --git a/substrate/client/db/src/record_stats_state.rs b/substrate/client/db/src/record_stats_state.rs index d9a35c075d794..2d2d172b68cb5 100644 --- a/substrate/client/db/src/record_stats_state.rs +++ b/substrate/client/db/src/record_stats_state.rs @@ -20,6 +20,7 @@ use crate::stats::StateUsageStats; use sp_core::storage::ChildInfo; +use sp_externalities::StateLoad; use sp_runtime::{ traits::{Block as BlockT, HashingFor}, StateVersion, @@ -119,6 +120,12 @@ impl>, B: BlockT> StateBackend> Ok(value) } + fn storage_with_status(&self, key: &[u8]) -> Result>>, Self::Error> { + let result = self.state.storage_with_status(key)?; + self.usage.tally_key_read(key, result.data.as_ref(), false); + Ok(result) + } + fn storage_hash(&self, key: &[u8]) -> Result, Self::Error> { self.state.storage_hash(key) } @@ -137,6 +144,20 @@ impl>, B: BlockT> StateBackend> Ok(value) } + fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>>, Self::Error> { + let key_tuple = (child_info.storage_key().to_vec(), key.to_vec()); + let result = self.state.child_storage_with_status(child_info, &key_tuple.1)?; + + // just pass it through the usage counter + let value = self.usage.tally_child_key_read(&key_tuple, result.data, false); + + Ok(StateLoad { is_cold: result.is_cold, data: value }) + } + fn child_storage_hash( &self, child_info: &ChildInfo, diff --git a/substrate/frame/revive/src/vm/evm/instructions/host.rs b/substrate/frame/revive/src/vm/evm/instructions/host.rs index cffd37db1c5fa..eabf22a7517df 100644 --- a/substrate/frame/revive/src/vm/evm/instructions/host.rs +++ b/substrate/frame/revive/src/vm/evm/instructions/host.rs @@ -115,6 +115,12 @@ pub fn sload(interpreter: &mut Interpreter) -> ControlFlow { let sp_io::StateLoad { data, is_cold } = interpreter.ext.get_storage(&key); interpreter.ext.charge_or_halt(RuntimeCosts::GetStorage { len: 32, is_cold })?; + log::info!( + target: LOG_TARGET, + "sload key={} is_cold={is_cold}", + sp_core::hexdisplay::HexDisplay::from(&key.hash()), + ); + *index = if let Some(storage_value) = data { // sload always reads a word let Ok::<[u8; 32], _>(bytes) = storage_value.try_into() else { diff --git a/substrate/frame/revive/src/vm/pvm.rs b/substrate/frame/revive/src/vm/pvm.rs index 9f774661935d4..5e3b41e2b72a1 100644 --- a/substrate/frame/revive/src/vm/pvm.rs +++ b/substrate/frame/revive/src/vm/pvm.rs @@ -581,6 +581,13 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { (self.ext.get_transient_storage(&key), false) } else { let state_load = self.ext.get_storage(&key); + log::info!( + target: LOG_TARGET, + "get_storage: key={} is_cold={} has_data={}", + sp_core::hexdisplay::HexDisplay::from(&key.hash()), + state_load.is_cold, + state_load.data.is_some() + ); (state_load.data, state_load.is_cold) }; diff --git a/substrate/primitives/io/src/lib.rs b/substrate/primitives/io/src/lib.rs index 58de619e4e07e..a94955ef6d395 100644 --- a/substrate/primitives/io/src/lib.rs +++ b/substrate/primitives/io/src/lib.rs @@ -133,7 +133,7 @@ use secp256k1::{ #[cfg(not(substrate_runtime))] use sp_externalities::{Externalities, ExternalitiesExt}; -pub use sp_externalities::MultiRemovalResults; +pub use sp_externalities::{MultiRemovalResults, StateLoad}; #[cfg(all(not(feature = "disable_allocator"), substrate_runtime, target_family = "wasm"))] mod global_alloc_wasm; @@ -148,9 +148,6 @@ mod global_alloc_riscv; #[cfg(not(substrate_runtime))] const LOG_TARGET: &str = "runtime::io"; -/// Re-export StateLoad from sp_externalities -pub use sp_externalities::StateLoad; - /// Error verifying ECDSA signature #[derive(Encode, Decode)] pub enum EcdsaVerifyError { @@ -2150,7 +2147,8 @@ mod tests { // This test mainly verifies the API works correctly. // Read existing child value - let result = default_child_storage::get_with_status(b"child_storage_key", b"existing_child"); + let result = + default_child_storage::get_with_status(b"child_storage_key", b"existing_child"); assert_eq!(result.data, Some(b"child_value".to_vec())); assert_eq!(result.is_cold, true); @@ -2158,13 +2156,15 @@ mod tests { default_child_storage::set(b"child_storage_key", b"new_child_key", b"new_child_value"); // Read the newly written value - let result = default_child_storage::get_with_status(b"child_storage_key", b"new_child_key"); + let result = + default_child_storage::get_with_status(b"child_storage_key", b"new_child_key"); assert_eq!(result.data, Some(b"new_child_value".to_vec())); // BasicExternalities treats all reads as cold assert_eq!(result.is_cold, true); // Read non-existent child key - let result = default_child_storage::get_with_status(b"child_storage_key", b"non_existent_child"); + let result = + default_child_storage::get_with_status(b"child_storage_key", b"non_existent_child"); assert_eq!(result.data, None); assert_eq!(result.is_cold, true); }); diff --git a/substrate/primitives/state-machine/src/backend.rs b/substrate/primitives/state-machine/src/backend.rs index 734fc60251dac..adfc7bd5eb8c5 100644 --- a/substrate/primitives/state-machine/src/backend.rs +++ b/substrate/primitives/state-machine/src/backend.rs @@ -192,6 +192,12 @@ pub trait Backend: core::fmt::Debug { /// Get keyed storage or None if there is nothing associated. fn storage(&self, key: &[u8]) -> Result, Self::Error>; + /// Get keyed storage with status tracking (cold/warm) or None if there is nothing associated. + /// + /// Returns `is_cold: true` if the value was read from the database (cache miss), + /// `is_cold: false` if the value was read from the cache (cache hit). + fn storage_with_status(&self, key: &[u8]) -> Result>, Self::Error>; + /// Get keyed storage value hash or None if there is nothing associated. fn storage_hash(&self, key: &[u8]) -> Result, Self::Error>; @@ -212,6 +218,16 @@ pub trait Backend: core::fmt::Debug { key: &[u8], ) -> Result, Self::Error>; + /// Get child keyed storage with status tracking (cold/warm) or None if there is nothing associated. + /// + /// Returns `is_cold: true` if the value was read from the database (cache miss), + /// `is_cold: false` if the value was read from the cache (cache hit). + fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>, Self::Error>; + /// Get child keyed storage value hash or None if there is nothing associated. fn child_storage_hash( &self, diff --git a/substrate/primitives/state-machine/src/ext.rs b/substrate/primitives/state-machine/src/ext.rs index b799281132822..3d6bbd1d7e704 100644 --- a/substrate/primitives/state-machine/src/ext.rs +++ b/substrate/primitives/state-machine/src/ext.rs @@ -31,7 +31,7 @@ use sp_core::storage::{ }; #[cfg(feature = "std")] use sp_externalities::TransactionType; -use sp_externalities::{Extension, ExtensionStore, Externalities, MultiRemovalResults}; +use sp_externalities::{Extension, ExtensionStore, Externalities, MultiRemovalResults, StateLoad}; use crate::{trace, warn}; use alloc::{boxed::Box, vec::Vec}; @@ -160,25 +160,31 @@ where result } - fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { + fn storage_with_status(&mut self, key: &[u8]) -> StateLoad> { let _guard = guard(); - let overlay_result = self.overlay.storage(key); - let (data, is_cold) = if let Some(value) = overlay_result { - (value.map(|x| x.to_vec()), false) - } else { - (self.backend.storage(key).expect(EXT_NOT_ALLOWED_TO_FAIL), true) - }; + let result = self.overlay.storage(key).map(|x| x.map(|x| x.to_vec())).map_or_else( + || self.backend.storage_with_status(key).expect(EXT_NOT_ALLOWED_TO_FAIL), + |data| StateLoad { is_cold: false, data }, + ); + // NOTE: be careful about touching the key names – used outside substrate! trace!( target: "state", method = "GetWithStatus", ext_id = %HexDisplay::from(&self.id.to_le_bytes()), key = %HexDisplay::from(&key), - result = ?data.as_ref().map(HexDisplay::from), - is_cold = %is_cold, + is_cold = %result.is_cold, + result = ?result.data.as_ref().map(HexDisplay::from), + result_encoded = %HexDisplay::from( + &result + .data.as_ref() + .map(|v| EncodeOpaqueValue(v.clone())) + .encode() + ), ); - sp_externalities::StateLoad { data, is_cold } + log::debug!(target: "runtim::revive", "storage_with_status key={:?} is_cold={}", sp_core::hexdisplay::HexDisplay::from(&key), result.is_cold); + result } fn storage_hash(&mut self, key: &[u8]) -> Option> { @@ -225,14 +231,25 @@ where &mut self, child_info: &ChildInfo, key: &[u8], - ) -> sp_externalities::StateLoad> { + ) -> StateLoad> { let _guard = guard(); let overlay_result = self.overlay.child_storage(child_info, key); - let (data, is_cold) = if let Some(value) = overlay_result { - (value.map(|x| x.to_vec()), false) - } else { - (self.backend.child_storage(child_info, key).expect(EXT_NOT_ALLOWED_TO_FAIL), true) - }; + log::debug!(target: "runtime::revive", "ext.child_storage_with_status: overlay returned {:?}", overlay_result.is_some()); + + let result = overlay_result + .map(|x| x.map(|x| x.to_vec())) + .map_or_else( + || { + log::debug!(target: "runtime::revive", "ext.child_storage_with_status: calling backend"); + self.backend + .child_storage_with_status(child_info, key) + .expect(EXT_NOT_ALLOWED_TO_FAIL) + }, + |data| { + log::debug!(target: "runtime::revive", "ext.child_storage_with_status: using overlay data, returning is_cold=false"); + StateLoad { is_cold: false, data } + }, + ); trace!( target: "state", @@ -240,11 +257,12 @@ where ext_id = %HexDisplay::from(&self.id.to_le_bytes()), child_info = %HexDisplay::from(&child_info.storage_key()), key = %HexDisplay::from(&key), - result = ?data.as_ref().map(HexDisplay::from), - is_cold = %is_cold, + is_cold = %result.is_cold, + result = ?result.data.as_ref().map(HexDisplay::from), ); - sp_externalities::StateLoad { data, is_cold } + log::debug!(target: "runtime::revive", "child_storage_with_status key={:?} is_cold={}", sp_core::hexdisplay::HexDisplay::from(&child_info.storage_key()), result.is_cold); + result } fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { diff --git a/substrate/primitives/state-machine/src/trie_backend.rs b/substrate/primitives/state-machine/src/trie_backend.rs index f7bfa72c575aa..d89f092c8d40d 100644 --- a/substrate/primitives/state-machine/src/trie_backend.rs +++ b/substrate/primitives/state-machine/src/trie_backend.rs @@ -430,6 +430,10 @@ where self.essence.storage(key) } + fn storage_with_status(&self, key: &[u8]) -> Result>, Self::Error> { + self.essence.storage_with_status(key) + } + fn child_storage_hash( &self, child_info: &ChildInfo, @@ -446,6 +450,14 @@ where self.essence.child_storage(child_info, key) } + fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>, Self::Error> { + self.essence.child_storage_with_status(child_info, key) + } + fn closest_merkle_value(&self, key: &[u8]) -> Result>, Self::Error> { self.essence.closest_merkle_value(key) } diff --git a/substrate/primitives/state-machine/src/trie_backend_essence.rs b/substrate/primitives/state-machine/src/trie_backend_essence.rs index 4ecfca0c85ad0..f7957e1040146 100644 --- a/substrate/primitives/state-machine/src/trie_backend_essence.rs +++ b/substrate/primitives/state-machine/src/trie_backend_essence.rs @@ -35,7 +35,8 @@ use sp_core::storage::{ChildInfo, ChildType, StateVersion}; use sp_trie::{ child_delta_trie_root, delta_trie_root, empty_child_trie_root, read_child_trie_first_descendant_value, read_child_trie_hash, read_child_trie_value, - read_trie_first_descendant_value, read_trie_value, + read_child_trie_value_with_status, read_trie_first_descendant_value, read_trie_value, + read_trie_value_with_status, trie_types::{TrieDBBuilder, TrieError}, DBValue, KeySpacedDB, MerkleValue, NodeCodec, PrefixedMemoryDB, RandomState, Trie, TrieCache, TrieDBRawIterator, TrieRecorder, TrieRecorderProvider, @@ -501,6 +502,25 @@ where }) } + /// Get the value of storage at given key with cache status tracking. + /// + /// Returns `is_cold: true` if the value was not in the cache (cache miss), + /// `is_cold: false` if the value was in the cache (cache hit). + pub fn storage_with_status(&self, key: &[u8]) -> Result>> { + let map_e = |e| format!("Trie lookup error: {}", e); + + self.with_recorder_and_cache(None, |recorder, cache| { + read_trie_value_with_status::, _>( + self, + &self.root, + key, + recorder, + cache, + ) + .map_err(map_e) + }) + } + /// Returns the hash value pub fn child_storage_hash(&self, child_info: &ChildInfo, key: &[u8]) -> Result> { let child_root = match self.child_root(child_info)? { @@ -549,6 +569,35 @@ where }) } + /// Get the value of child storage at given key with cache status tracking. + /// + /// Returns `is_cold: true` if the value was not in the cache (cache miss), + /// `is_cold: false` if the value was in the cache (cache hit). + pub fn child_storage_with_status( + &self, + child_info: &ChildInfo, + key: &[u8], + ) -> Result>> { + let child_root = match self.child_root(child_info)? { + Some(root) => root, + None => return Ok(sp_externalities::StateLoad { is_cold: true, data: None }), + }; + + let map_e = |e| format!("Trie lookup error: {}", e); + + self.with_recorder_and_cache(Some(child_root), |recorder, cache| { + read_child_trie_value_with_status::, _>( + child_info.keyspace(), + self, + &child_root, + key, + recorder, + cache, + ) + .map_err(map_e) + }) + } + /// Get the closest merkle value at given key. pub fn closest_merkle_value(&self, key: &[u8]) -> Result>> { let map_e = |e| format!("Trie lookup error: {}", e); diff --git a/substrate/primitives/trie/Cargo.toml b/substrate/primitives/trie/Cargo.toml index 1d34f0fce0329..b891eb6fe174d 100644 --- a/substrate/primitives/trie/Cargo.toml +++ b/substrate/primitives/trie/Cargo.toml @@ -23,6 +23,7 @@ harness = false [dependencies] ahash = { optional = true, workspace = true } codec = { workspace = true } +log = { workspace = true } foldhash = { workspace = true } hash-db = { workspace = true } hashbrown = { workspace = true } diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index 46d4f4cde41c4..133d69d6f6e02 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -56,6 +56,7 @@ use hash_db::{Hasher, Prefix}; pub use memory_db::{prefixed_key, HashKey, KeyFunction, PrefixedKey}; /// The Substrate format implementation of `NodeCodec`. pub use node_codec::NodeCodec; +use sp_externalities::StateLoad; pub use storage_proof::{CompactProof, StorageProof, StorageProofError}; /// Trie codec reexport, mainly child trie support /// for trie compact proof. @@ -367,6 +368,32 @@ pub fn read_trie_value, +>( + db: &DB, + root: &TrieHash, + key: &[u8], + recorder: Option<&mut dyn TrieRecorder>>, + mut cache: Option<&mut dyn TrieCache>, +) -> Result>>, Box>> { + // Check if the value is in the cache before reading + let is_cold = cache.as_mut().and_then(|c| c.lookup_value_for_key(key)).is_none(); + + let data = TrieDBBuilder::::new(db, root) + .with_optional_cache(cache) + .with_optional_recorder(recorder) + .build() + .get(key)?; + + Ok(StateLoad { is_cold, data }) +} + /// Read the [`trie_db::MerkleValue`] of the node that is the closest descendant for /// the provided key. pub fn read_trie_first_descendant_value( @@ -468,6 +495,35 @@ where .map(|x| x.map(|val| val.to_vec())) } +/// Read a value from a child trie with cache status tracking. +/// +/// Returns a `StateLoad` containing the value and whether it was loaded +/// from the database backend (cold) or cache (hot). +pub fn read_child_trie_value_with_status( + keyspace: &[u8], + db: &DB, + root: &TrieHash, + key: &[u8], + recorder: Option<&mut dyn TrieRecorder>>, + mut cache: Option<&mut dyn TrieCache>, +) -> Result>>, Box>> +where + DB: hash_db::HashDBRef, +{ + // Check if the value is in the cache before reading + let is_cold = cache.as_mut().and_then(|c| c.lookup_value_for_key(key)).is_none(); + + let db = KeySpacedDB::new(db, keyspace); + let data = TrieDBBuilder::::new(&db, &root) + .with_optional_recorder(recorder) + .with_optional_cache(cache) + .build() + .get(key)? + .map(|val| val.to_vec()); + + Ok(StateLoad { is_cold, data }) +} + /// Read a hash from the child trie. pub fn read_child_trie_hash( keyspace: &[u8], From c51cfa23a9b6586b6fe9b8c548c211db4b06d786 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 18:47:05 +0100 Subject: [PATCH 11/19] wip --- .../primitives/state-machine/src/backend.rs | 11 ++++++++--- substrate/primitives/state-machine/src/basic.rs | 10 +++++----- .../state-machine/src/trie_backend.rs | 8 ++++++-- .../state-machine/src/trie_backend_essence.rs | 17 ++++++----------- substrate/primitives/trie/src/lib.rs | 4 ++-- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/substrate/primitives/state-machine/src/backend.rs b/substrate/primitives/state-machine/src/backend.rs index adfc7bd5eb8c5..085f00cf8c68d 100644 --- a/substrate/primitives/state-machine/src/backend.rs +++ b/substrate/primitives/state-machine/src/backend.rs @@ -30,6 +30,7 @@ use hash_db::Hasher; use sp_core::storage::{ChildInfo, StateVersion, TrackedStorageKey}; #[cfg(feature = "std")] use sp_core::traits::RuntimeCode; +use sp_externalities::StateLoad; use sp_trie::{MerkleValue, PrefixedMemoryDB, RandomState}; /// A struct containing arguments for iterating over the storage. @@ -196,7 +197,10 @@ pub trait Backend: core::fmt::Debug { /// /// Returns `is_cold: true` if the value was read from the database (cache miss), /// `is_cold: false` if the value was read from the cache (cache hit). - fn storage_with_status(&self, key: &[u8]) -> Result>, Self::Error>; + fn storage_with_status( + &self, + key: &[u8], + ) -> Result>, Self::Error>; /// Get keyed storage value hash or None if there is nothing associated. fn storage_hash(&self, key: &[u8]) -> Result, Self::Error>; @@ -218,7 +222,8 @@ pub trait Backend: core::fmt::Debug { key: &[u8], ) -> Result, Self::Error>; - /// Get child keyed storage with status tracking (cold/warm) or None if there is nothing associated. + /// Get child keyed storage with status tracking (cold/warm) or None if there is nothing + /// associated. /// /// Returns `is_cold: true` if the value was read from the database (cache miss), /// `is_cold: false` if the value was read from the cache (cache hit). @@ -226,7 +231,7 @@ pub trait Backend: core::fmt::Debug { &self, child_info: &ChildInfo, key: &[u8], - ) -> Result>, Self::Error>; + ) -> Result>, Self::Error>; /// Get child keyed storage value hash or None if there is nothing associated. fn child_storage_hash( diff --git a/substrate/primitives/state-machine/src/basic.rs b/substrate/primitives/state-machine/src/basic.rs index e1063e0546ca0..159f938416f25 100644 --- a/substrate/primitives/state-machine/src/basic.rs +++ b/substrate/primitives/state-machine/src/basic.rs @@ -33,7 +33,7 @@ use sp_core::{ traits::Externalities, Blake2Hasher, }; -use sp_externalities::{Extension, Extensions, MultiRemovalResults}; +use sp_externalities::{Extension, Extensions, MultiRemovalResults, StateLoad}; use sp_trie::{empty_child_trie_root, LayoutV0, LayoutV1, TrieConfiguration}; /// Simple Map-based Externalities impl. @@ -184,9 +184,9 @@ impl Externalities for BasicExternalities { self.overlay.storage(key).and_then(|v| v.map(|v| v.to_vec())) } - fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { + fn storage_with_status(&mut self, key: &[u8]) -> StateLoad> { let data = self.overlay.storage(key).and_then(|v| v.map(|v| v.to_vec())); - sp_externalities::StateLoad { data, is_cold: true } + StateLoad { data, is_cold: true } } fn storage_hash(&mut self, key: &[u8]) -> Option> { @@ -201,9 +201,9 @@ impl Externalities for BasicExternalities { &mut self, child_info: &ChildInfo, key: &[u8], - ) -> sp_externalities::StateLoad> { + ) -> StateLoad> { let data = self.overlay.child_storage(child_info, key).and_then(|v| v.map(|v| v.to_vec())); - sp_externalities::StateLoad { data, is_cold: true } + StateLoad { data, is_cold: true } } fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { diff --git a/substrate/primitives/state-machine/src/trie_backend.rs b/substrate/primitives/state-machine/src/trie_backend.rs index d89f092c8d40d..5107204899378 100644 --- a/substrate/primitives/state-machine/src/trie_backend.rs +++ b/substrate/primitives/state-machine/src/trie_backend.rs @@ -30,6 +30,7 @@ use codec::Codec; use hash_db::HashDB; use hash_db::Hasher; use sp_core::storage::{ChildInfo, StateVersion}; +use sp_externalities::StateLoad; #[cfg(feature = "std")] use sp_trie::{ cache::{LocalTrieCache, TrieCache}, @@ -430,7 +431,10 @@ where self.essence.storage(key) } - fn storage_with_status(&self, key: &[u8]) -> Result>, Self::Error> { + fn storage_with_status( + &self, + key: &[u8], + ) -> Result>, Self::Error> { self.essence.storage_with_status(key) } @@ -454,7 +458,7 @@ where &self, child_info: &ChildInfo, key: &[u8], - ) -> Result>, Self::Error> { + ) -> Result>, Self::Error> { self.essence.child_storage_with_status(child_info, key) } diff --git a/substrate/primitives/state-machine/src/trie_backend_essence.rs b/substrate/primitives/state-machine/src/trie_backend_essence.rs index f7957e1040146..ec9731a0d1732 100644 --- a/substrate/primitives/state-machine/src/trie_backend_essence.rs +++ b/substrate/primitives/state-machine/src/trie_backend_essence.rs @@ -32,6 +32,7 @@ use hash_db::{self, AsHashDB, HashDB, HashDBRef, Hasher, Prefix}; #[cfg(feature = "std")] use parking_lot::RwLock; use sp_core::storage::{ChildInfo, ChildType, StateVersion}; +use sp_externalities::StateLoad; use sp_trie::{ child_delta_trie_root, delta_trie_root, empty_child_trie_root, read_child_trie_first_descendant_value, read_child_trie_hash, read_child_trie_value, @@ -506,18 +507,12 @@ where /// /// Returns `is_cold: true` if the value was not in the cache (cache miss), /// `is_cold: false` if the value was in the cache (cache hit). - pub fn storage_with_status(&self, key: &[u8]) -> Result>> { + pub fn storage_with_status(&self, key: &[u8]) -> Result>> { let map_e = |e| format!("Trie lookup error: {}", e); self.with_recorder_and_cache(None, |recorder, cache| { - read_trie_value_with_status::, _>( - self, - &self.root, - key, - recorder, - cache, - ) - .map_err(map_e) + read_trie_value_with_status::, _>(self, &self.root, key, recorder, cache) + .map_err(map_e) }) } @@ -577,10 +572,10 @@ where &self, child_info: &ChildInfo, key: &[u8], - ) -> Result>> { + ) -> Result>> { let child_root = match self.child_root(child_info)? { Some(root) => root, - None => return Ok(sp_externalities::StateLoad { is_cold: true, data: None }), + None => return Ok(StateLoad { data: None, is_cold: true }), }; let map_e = |e| format!("Trie lookup error: {}", e); diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index 133d69d6f6e02..29bcb206da840 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -391,7 +391,7 @@ pub fn read_trie_value_with_status< .build() .get(key)?; - Ok(StateLoad { is_cold, data }) + Ok(StateLoad { data, is_cold }) } /// Read the [`trie_db::MerkleValue`] of the node that is the closest descendant for @@ -521,7 +521,7 @@ where .get(key)? .map(|val| val.to_vec()); - Ok(StateLoad { is_cold, data }) + Ok(StateLoad { data, is_cold }) } /// Read a hash from the child trie. From 8405cbab7153966270cb624fc98fa17e3530a60f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 18:47:22 +0100 Subject: [PATCH 12/19] wip --- .../primitives/state-machine/src/read_only.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/substrate/primitives/state-machine/src/read_only.rs b/substrate/primitives/state-machine/src/read_only.rs index ddd49e0497906..557126af443e6 100644 --- a/substrate/primitives/state-machine/src/read_only.rs +++ b/substrate/primitives/state-machine/src/read_only.rs @@ -29,7 +29,7 @@ use sp_core::{ storage::{ChildInfo, StateVersion, TrackedStorageKey}, traits::Externalities, }; -use sp_externalities::MultiRemovalResults; +use sp_externalities::{MultiRemovalResults, StateLoad}; /// Trait for inspecting state in any backend. /// @@ -95,11 +95,12 @@ where .expect("Backed failed for storage in ReadOnlyExternalities") } - fn storage_with_status(&mut self, key: &[u8]) -> sp_externalities::StateLoad> { - let data = self.backend + fn storage_with_status(&mut self, key: &[u8]) -> StateLoad> { + let data = self + .backend .storage(key) .expect("Backed failed for storage_with_status in ReadOnlyExternalities"); - sp_externalities::StateLoad { data, is_cold: true } + StateLoad { data, is_cold: true } } fn storage_hash(&mut self, key: &[u8]) -> Option> { @@ -119,11 +120,12 @@ where &mut self, child_info: &ChildInfo, key: &[u8], - ) -> sp_externalities::StateLoad> { - let data = self.backend + ) -> StateLoad> { + let data = self + .backend .child_storage(child_info, key) .expect("Backed failed for child_storage_with_status in ReadOnlyExternalities"); - sp_externalities::StateLoad { data, is_cold: true } + StateLoad { data, is_cold: true } } fn child_storage_hash(&mut self, child_info: &ChildInfo, key: &[u8]) -> Option> { From 5d50a6b329d61808ec24cc41c2fbdfeca8bf9f95 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 18:49:41 +0100 Subject: [PATCH 13/19] wip --- substrate/frame/revive/src/benchmarking.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 8a9b79c787a8f..2446e69527dae 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1518,6 +1518,7 @@ mod benchmarks { let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); full_key.extend_from_slice(&key.hash()); frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); + let _ = info.read(&key); } let result; From 7939aeb0e8bb4b6986f6f7c4d1a477cfe571ad59 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 18:53:27 +0100 Subject: [PATCH 14/19] wip --- substrate/frame/revive/src/vm/evm/instructions/host.rs | 2 +- substrate/frame/revive/src/vm/pvm.rs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/substrate/frame/revive/src/vm/evm/instructions/host.rs b/substrate/frame/revive/src/vm/evm/instructions/host.rs index eabf22a7517df..44e2cd78a4a61 100644 --- a/substrate/frame/revive/src/vm/evm/instructions/host.rs +++ b/substrate/frame/revive/src/vm/evm/instructions/host.rs @@ -115,7 +115,7 @@ pub fn sload(interpreter: &mut Interpreter) -> ControlFlow { let sp_io::StateLoad { data, is_cold } = interpreter.ext.get_storage(&key); interpreter.ext.charge_or_halt(RuntimeCosts::GetStorage { len: 32, is_cold })?; - log::info!( + log::trace!( target: LOG_TARGET, "sload key={} is_cold={is_cold}", sp_core::hexdisplay::HexDisplay::from(&key.hash()), diff --git a/substrate/frame/revive/src/vm/pvm.rs b/substrate/frame/revive/src/vm/pvm.rs index 5e3b41e2b72a1..9f774661935d4 100644 --- a/substrate/frame/revive/src/vm/pvm.rs +++ b/substrate/frame/revive/src/vm/pvm.rs @@ -581,13 +581,6 @@ impl<'a, E: Ext, M: ?Sized + Memory> Runtime<'a, E, M> { (self.ext.get_transient_storage(&key), false) } else { let state_load = self.ext.get_storage(&key); - log::info!( - target: LOG_TARGET, - "get_storage: key={} is_cold={} has_data={}", - sp_core::hexdisplay::HexDisplay::from(&key.hash()), - state_load.is_cold, - state_load.data.is_some() - ); (state_load.data, state_load.is_cold) }; From 69f3e0e89c4116068d184b981abaac208490e754 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 21:02:29 +0100 Subject: [PATCH 15/19] nit --- substrate/frame/revive/src/benchmarking.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/substrate/frame/revive/src/benchmarking.rs b/substrate/frame/revive/src/benchmarking.rs index 2446e69527dae..cc2c2c7b07edb 100644 --- a/substrate/frame/revive/src/benchmarking.rs +++ b/substrate/frame/revive/src/benchmarking.rs @@ -1471,7 +1471,6 @@ mod benchmarks { // Whitelist key if c=0 (hot) if c == 0 { let info = call_setup.contract().info()?; - // Construct full key: prefixed child trie key + hashed storage key let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); full_key.extend_from_slice(&key.hash()); frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); @@ -1606,7 +1605,6 @@ mod benchmarks { // Whitelist key if c=0 (hot) if c == 0 { let info = call_setup.contract().info()?; - // Construct full key: prefixed child trie key + hashed storage key let mut full_key = info.child_trie_info().prefixed_storage_key().into_inner(); full_key.extend_from_slice(&key.hash()); frame_benchmarking::benchmarking::add_to_whitelist(full_key.into()); From f19a98e341e31d1b9753b268861fa17768f9bb54 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 21:15:01 +0100 Subject: [PATCH 16/19] wip --- .../frame/revive/src/vm/evm/instructions/host.rs | 2 +- substrate/primitives/state-machine/src/ext.rs | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/substrate/frame/revive/src/vm/evm/instructions/host.rs b/substrate/frame/revive/src/vm/evm/instructions/host.rs index 44e2cd78a4a61..34960335aec6a 100644 --- a/substrate/frame/revive/src/vm/evm/instructions/host.rs +++ b/substrate/frame/revive/src/vm/evm/instructions/host.rs @@ -115,7 +115,7 @@ pub fn sload(interpreter: &mut Interpreter) -> ControlFlow { let sp_io::StateLoad { data, is_cold } = interpreter.ext.get_storage(&key); interpreter.ext.charge_or_halt(RuntimeCosts::GetStorage { len: 32, is_cold })?; - log::trace!( + log::debug!( target: LOG_TARGET, "sload key={} is_cold={is_cold}", sp_core::hexdisplay::HexDisplay::from(&key.hash()), diff --git a/substrate/primitives/state-machine/src/ext.rs b/substrate/primitives/state-machine/src/ext.rs index 3d6bbd1d7e704..dae9193f08d60 100644 --- a/substrate/primitives/state-machine/src/ext.rs +++ b/substrate/primitives/state-machine/src/ext.rs @@ -233,22 +233,18 @@ where key: &[u8], ) -> StateLoad> { let _guard = guard(); - let overlay_result = self.overlay.child_storage(child_info, key); - log::debug!(target: "runtime::revive", "ext.child_storage_with_status: overlay returned {:?}", overlay_result.is_some()); - let result = overlay_result + let result = self + .overlay + .child_storage(child_info, key) .map(|x| x.map(|x| x.to_vec())) .map_or_else( || { - log::debug!(target: "runtime::revive", "ext.child_storage_with_status: calling backend"); self.backend .child_storage_with_status(child_info, key) .expect(EXT_NOT_ALLOWED_TO_FAIL) }, - |data| { - log::debug!(target: "runtime::revive", "ext.child_storage_with_status: using overlay data, returning is_cold=false"); - StateLoad { is_cold: false, data } - }, + |data| StateLoad { is_cold: false, data }, ); trace!( @@ -261,7 +257,6 @@ where result = ?result.data.as_ref().map(HexDisplay::from), ); - log::debug!(target: "runtime::revive", "child_storage_with_status key={:?} is_cold={}", sp_core::hexdisplay::HexDisplay::from(&child_info.storage_key()), result.is_cold); result } From 43c6525608ad7131e71ed480b8b9ce0b41329c26 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 8 Dec 2025 21:56:10 +0100 Subject: [PATCH 17/19] wip --- substrate/primitives/trie/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index 29bcb206da840..092cfa4dc0406 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -382,8 +382,10 @@ pub fn read_trie_value_with_status< recorder: Option<&mut dyn TrieRecorder>>, mut cache: Option<&mut dyn TrieCache>, ) -> Result>>, Box>> { - // Check if the value is in the cache before reading - let is_cold = cache.as_mut().and_then(|c| c.lookup_value_for_key(key)).is_none(); + let is_cold = cache + .as_mut() + .map(|c| c.lookup_value_for_key(key).is_none()) + .unwrap_or_else(|| true); let data = TrieDBBuilder::::new(db, root) .with_optional_cache(cache) @@ -510,8 +512,10 @@ pub fn read_child_trie_value_with_status( where DB: hash_db::HashDBRef, { - // Check if the value is in the cache before reading - let is_cold = cache.as_mut().and_then(|c| c.lookup_value_for_key(key)).is_none(); + let is_cold = cache + .as_mut() + .map(|c| c.lookup_value_for_key(key).is_none()) + .unwrap_or_else(|| true); let db = KeySpacedDB::new(db, keyspace); let data = TrieDBBuilder::::new(&db, &root) From d17d02f7206da741b76a4cb8b3c0c59e074552e2 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 Dec 2025 09:37:25 +0100 Subject: [PATCH 18/19] wip --- substrate/primitives/trie/src/lib.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index 092cfa4dc0406..8c05975705b0f 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -379,13 +379,14 @@ pub fn read_trie_value_with_status< db: &DB, root: &TrieHash, key: &[u8], - recorder: Option<&mut dyn TrieRecorder>>, - mut cache: Option<&mut dyn TrieCache>, + mut recorder: Option<&mut dyn TrieRecorder>>, + cache: Option<&mut dyn TrieCache>, ) -> Result>>, Box>> { - let is_cold = cache + log::debug!(target: "revive::runtime", "has_recorder: {}", recorder.is_some()); + let is_cold = recorder .as_mut() - .map(|c| c.lookup_value_for_key(key).is_none()) - .unwrap_or_else(|| true); + .and_then(|r| Some(r.trie_nodes_recorded_for_key(key).is_none())) + .unwrap_or(true); let data = TrieDBBuilder::::new(db, root) .with_optional_cache(cache) @@ -506,16 +507,17 @@ pub fn read_child_trie_value_with_status( db: &DB, root: &TrieHash, key: &[u8], - recorder: Option<&mut dyn TrieRecorder>>, - mut cache: Option<&mut dyn TrieCache>, + mut recorder: Option<&mut dyn TrieRecorder>>, + cache: Option<&mut dyn TrieCache>, ) -> Result>>, Box>> where DB: hash_db::HashDBRef, { - let is_cold = cache + log::debug!(target: "revive::runtime", "has_recorder: {}", recorder.is_some()); + let is_cold = recorder .as_mut() - .map(|c| c.lookup_value_for_key(key).is_none()) - .unwrap_or_else(|| true); + .and_then(|r| Some(r.trie_nodes_recorded_for_key(key).is_none())) + .unwrap_or(true); let db = KeySpacedDB::new(db, keyspace); let data = TrieDBBuilder::::new(&db, &root) From 950aa9a3f37714840f2228e0de3ad289800c85f2 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 9 Dec 2025 13:13:48 +0100 Subject: [PATCH 19/19] nit --- substrate/primitives/trie/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index 8c05975705b0f..65470b00a0b48 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -382,7 +382,6 @@ pub fn read_trie_value_with_status< mut recorder: Option<&mut dyn TrieRecorder>>, cache: Option<&mut dyn TrieCache>, ) -> Result>>, Box>> { - log::debug!(target: "revive::runtime", "has_recorder: {}", recorder.is_some()); let is_cold = recorder .as_mut() .and_then(|r| Some(r.trie_nodes_recorded_for_key(key).is_none()))