From 304d84b34a5ed535917f677250f875160c1a8d32 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 3 Jul 2023 21:22:26 +0200 Subject: [PATCH 01/70] wip --- frame/contracts/primitives/src/lib.rs | 7 -- frame/contracts/src/lib.rs | 107 ++++++++++++++------------ frame/contracts/src/wasm/mod.rs | 11 +-- frame/contracts/src/wasm/prepare.rs | 50 ++++-------- 4 files changed, 78 insertions(+), 97 deletions(-) diff --git a/frame/contracts/primitives/src/lib.rs b/frame/contracts/primitives/src/lib.rs index 3f830ca92486d..8da148b334e74 100644 --- a/frame/contracts/primitives/src/lib.rs +++ b/frame/contracts/primitives/src/lib.rs @@ -160,13 +160,6 @@ pub enum Code { /// The code hash of an on-chain wasm blob. Existing(Hash), } - -impl>, Hash> From for Code { - fn from(from: T) -> Self { - Code::Upload(from.into()) - } -} - /// The amount of balance that was either charged or refunded in order to pay for storage. #[derive(Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, Clone, TypeInfo)] pub enum StorageDeposit { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index bf6fd6309c822..78a1e81e82f28 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -105,7 +105,7 @@ use crate::{ exec::{AccountIdOf, ErrorOrigin, ExecError, Executable, Key, Stack as ExecStack}, gas::GasMeter, storage::{meter::Meter as StorageMeter, ContractInfo, DeletionQueueManager}, - wasm::{CodeInfo, TryInstantiate, WasmBlob}, + wasm::{CodeInfo, WasmBlob}, }; use codec::{Codec, Decode, Encode, HasCompact}; use environmental::*; @@ -695,27 +695,37 @@ pub mod pallet { salt: Vec, ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; - let code_len = code.len() as u32; + let origin = ensure_signed(origin)?; + + let CodeUploadReturnValue { code_hash, deposit } = Self::bare_upload_code( + origin.clone(), + code, + storage_deposit_limit.clone().map(Into::into), + Determinism::Enforced, + )?; + let data_len = data.len() as u32; let salt_len = salt.len() as u32; let common = CommonInput { - origin: Origin::from_runtime_origin(origin)?, + origin: Origin::from_account_id(origin), value, data, gas_limit, - storage_deposit_limit: storage_deposit_limit.map(Into::into), + storage_deposit_limit: storage_deposit_limit + .map(|limit| limit.into().saturating_sub(deposit)), debug_message: None, }; - let mut output = - InstantiateInput:: { code: Code::Upload(code), salt }.run_guarded(common); + + let mut output = InstantiateInput:: { code_hash, salt }.run_guarded(common); if let Ok(retval) = &output.result { if retval.1.did_revert() { output.result = Err(>::ContractReverted.into()); } } + output.gas_meter.into_dispatch_result( - output.result.map(|(_address, result)| result), - T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), + output.result.map(|(_address, output)| output), + T::WeightInfo::instantiate(data_len, salt_len), ) } @@ -748,8 +758,7 @@ pub mod pallet { storage_deposit_limit: storage_deposit_limit.map(Into::into), debug_message: None, }; - let mut output = - InstantiateInput:: { code: Code::Existing(code_hash), salt }.run_guarded(common); + let mut output = InstantiateInput:: { code_hash, salt }.run_guarded(common); if let Ok(retval) = &output.result { if retval.1.did_revert() { output.result = Err(>::ContractReverted.into()); @@ -1054,7 +1063,7 @@ struct CallInput { /// Input specific to a contract instantiation invocation. struct InstantiateInput { - code: Code>, + code_hash: CodeHash, salt: Vec, } @@ -1224,7 +1233,7 @@ impl Invokable for InstantiateInput { fn run( &self, - mut common: CommonInput, + common: CommonInput, mut gas_meter: GasMeter, ) -> InternalOutput { let mut storage_deposit = Default::default(); @@ -1233,37 +1242,10 @@ impl Invokable for InstantiateInput { let InstantiateInput { salt, .. } = self; let CommonInput { origin: contract_origin, .. } = common; let origin = contract_origin.account_id()?; - let (extra_deposit, executable) = match &self.code { - Code::Upload(binary) => { - let executable = WasmBlob::from_code( - binary.clone(), - &schedule, - origin.clone(), - Determinism::Enforced, - TryInstantiate::Skip, - ) - .map_err(|(err, msg)| { - common - .debug_message - .as_mut() - .map(|buffer| buffer.try_extend(&mut msg.bytes())); - err - })?; - // The open deposit will be charged during execution when the - // uploaded module does not already exist. This deposit is not part of the - // storage meter because it is not transferred to the contract but - // reserved on the uploading account. - (executable.open_deposit(&executable.code_info()), executable) - }, - Code::Existing(hash) => - (Default::default(), WasmBlob::from_storage(*hash, &mut gas_meter)?), - }; + let executable = WasmBlob::from_storage(self.code_hash, &mut gas_meter)?; let contract_origin = Origin::from_account_id(origin.clone()); - let mut storage_meter = StorageMeter::new( - &contract_origin, - common.storage_deposit_limit, - common.value.saturating_add(extra_deposit), - )?; + let mut storage_meter = + StorageMeter::new(&contract_origin, common.storage_deposit_limit, common.value)?; let CommonInput { value, data, debug_message, .. } = common; let result = ExecStack::>::run_instantiate( origin.clone(), @@ -1277,9 +1259,7 @@ impl Invokable for InstantiateInput { debug_message, ); - storage_deposit = storage_meter - .try_into_deposit(&contract_origin)? - .saturating_add(&StorageDeposit::Charge(extra_deposit)); + storage_deposit = storage_meter.try_into_deposit(&contract_origin)?; result }; InternalOutput { result: try_exec(), gas_meter, storage_deposit } @@ -1397,6 +1377,37 @@ impl Pallet { } else { None }; + + let (code_hash, storage_deposit_limit): (CodeHash, Option>) = match code { + Code::Upload(code) => { + let result = Self::bare_upload_code( + origin.clone(), + code, + storage_deposit_limit.clone().map(Into::into), + Determinism::Enforced, + ); + + let Ok(CodeUploadReturnValue { code_hash, deposit }) = result else { + return ContractResult { + gas_consumed: Zero::zero(), + gas_required: Zero::zero(), + storage_deposit: Default::default(), + debug_message: Vec::new(), + result: Err(Error::::MigrationInProgress.into()), + events: None, + } + }; + + let storage_deposit_limit = storage_deposit_limit.map(|limit| { + let limit: BalanceOf = limit.into(); + limit.saturating_sub(deposit) + }); + + (code_hash, storage_deposit_limit) + }, + Code::Existing(code_hash) => (code_hash, storage_deposit_limit), + }; + let common = CommonInput { origin: Origin::from_account_id(origin), value, @@ -1405,7 +1416,8 @@ impl Pallet { storage_deposit_limit, debug_message: debug_message.as_mut(), }; - let output = InstantiateInput:: { code, salt }.run_guarded(common); + + let output = InstantiateInput:: { code_hash, salt }.run_guarded(common); // collect events if CollectEvents is UnsafeCollect let events = if collect_events == CollectEvents::UnsafeCollect { Some(System::::read_events_no_consensus().map(|e| *e).collect()) @@ -1438,8 +1450,7 @@ impl Pallet { Migration::::ensure_migrated()?; let schedule = T::Schedule::get(); let module = - WasmBlob::from_code(code, &schedule, origin, determinism, TryInstantiate::Instantiate) - .map_err(|(err, _)| err)?; + WasmBlob::from_code(code, &schedule, origin, determinism).map_err(|(err, _)| err)?; let deposit = module.open_deposit(&module.code_info()); if let Some(storage_deposit_limit) = storage_deposit_limit { ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 04f1ecfb5a6f3..7d0fac74c4d1d 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -27,12 +27,9 @@ pub use crate::wasm::runtime::api_doc; #[cfg(test)] pub use tests::MockExt; -pub use crate::wasm::{ - prepare::TryInstantiate, - runtime::{ - AllowDeprecatedInterface, AllowUnstableInterface, CallFlags, Environment, ReturnCode, - Runtime, RuntimeCosts, - }, +pub use crate::wasm::runtime::{ + AllowDeprecatedInterface, AllowUnstableInterface, CallFlags, Environment, ReturnCode, Runtime, + RuntimeCosts, }; use crate::{ @@ -155,14 +152,12 @@ impl WasmBlob { schedule: &Schedule, owner: AccountIdOf, determinism: Determinism, - try_instantiate: TryInstantiate, ) -> Result { prepare::prepare::( code.try_into().map_err(|_| (>::CodeTooLarge.into(), ""))?, schedule, owner, determinism, - try_instantiate, ) } diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index 5647d5458e659..d91f7d6abc340 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -41,20 +41,6 @@ use wasmi::{ /// compiler toolchains might not support specifying other modules than "env" for memory imports. pub const IMPORT_MODULE_MEMORY: &str = "env"; -/// Determines whether a module should be instantiated during preparation. -pub enum TryInstantiate { - /// Do the instantiation to make sure that the module is valid. - /// - /// This should be used if a module is only uploaded but not executed. We need - /// to make sure that it can be actually instantiated. - Instantiate, - /// Skip the instantiation during preparation. - /// - /// This makes sense when the preparation takes place as part of an instantiation. Then - /// this instantiation would fail the whole transaction and an extra check is not - /// necessary. - Skip, -} /// The inner deserialized module is valid and contains only allowed WebAssembly features. /// This is checked by loading it into wasmi interpreter `engine`. @@ -237,7 +223,6 @@ fn validate( code: &[u8], schedule: &Schedule, determinism: Determinism, - try_instantiate: TryInstantiate, ) -> Result<(), (DispatchError, &'static str)> where E: Environment<()>, @@ -261,23 +246,21 @@ where // // - It doesn't use any unknown imports. // - It doesn't explode the wasmi bytecode generation. - if matches!(try_instantiate, TryInstantiate::Instantiate) { - // We don't actually ever run any code so we can get away with a minimal stack which - // reduces the amount of memory that needs to be zeroed. - let stack_limits = StackLimits::new(1, 1, 0).expect("initial <= max; qed"); - WasmBlob::::instantiate::( - &code, - (), - schedule, - determinism, - stack_limits, - AllowDeprecatedInterface::No, - ) - .map_err(|err| { - log::debug!(target: LOG_TARGET, "{}", err); - (Error::::CodeRejected.into(), "New code rejected on wasmi instantiation!") - })?; - } + // We don't actually ever run any code so we can get away with a minimal stack which + // reduces the amount of memory that needs to be zeroed. + let stack_limits = StackLimits::new(1, 1, 0).expect("initial <= max; qed"); + WasmBlob::::instantiate::( + &code, + (), + schedule, + determinism, + stack_limits, + AllowDeprecatedInterface::No, + ) + .map_err(|err| { + log::debug!(target: LOG_TARGET, "{}", err); + (Error::::CodeRejected.into(), "New code rejected on wasmi instantiation!") + })?; Ok(()) } @@ -295,13 +278,12 @@ pub fn prepare( schedule: &Schedule, owner: AccountIdOf, determinism: Determinism, - try_instantiate: TryInstantiate, ) -> Result, (DispatchError, &'static str)> where E: Environment<()>, T: Config, { - validate::(code.as_ref(), schedule, determinism, try_instantiate)?; + validate::(code.as_ref(), schedule, determinism)?; // Calculate deposit for storing contract code and `code_info` in two different storage items. let bytes_added = code.len().saturating_add(>::max_encoded_len()) as u32; From 4e80ea6b42ad6d1a2c2465d38501f0c6970ab979 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 3 Jul 2023 22:51:59 +0200 Subject: [PATCH 02/70] fixes --- frame/contracts/src/lib.rs | 71 +++++++++++++++++++---------- frame/contracts/src/tests.rs | 54 +++++++++++----------- frame/contracts/src/wasm/mod.rs | 1 - frame/contracts/src/wasm/prepare.rs | 1 - 4 files changed, 74 insertions(+), 53 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 78a1e81e82f28..360052c3b89b5 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -696,6 +696,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; + let code_len = code.len() as u32; let CodeUploadReturnValue { code_hash, deposit } = Self::bare_upload_code( origin.clone(), @@ -725,7 +726,7 @@ pub mod pallet { output.gas_meter.into_dispatch_result( output.result.map(|(_address, output)| output), - T::WeightInfo::instantiate(data_len, salt_len), + T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), ) } @@ -1377,25 +1378,53 @@ impl Pallet { } else { None }; + // collect events if CollectEvents is UnsafeCollect + let events = || { + if collect_events == CollectEvents::UnsafeCollect { + Some(System::::read_events_no_consensus().map(|e| *e).collect()) + } else { + None + } + }; + + let mut try_upload = |code| -> Result<_, DispatchError> { + let schedule = T::Schedule::get(); + let module = + WasmBlob::from_code(code, &schedule, origin.clone(), Determinism::Enforced) + .map_err(|(err, msg)| { + debug_message.as_mut().map(|d| d.try_extend(msg.bytes())); + err + })?; + + let deposit = module.open_deposit(&module.code_info()); + if let Some(storage_deposit_limit) = storage_deposit_limit { + ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); + } + let result = CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }; + module.store()?; + Ok(result) + }; let (code_hash, storage_deposit_limit): (CodeHash, Option>) = match code { Code::Upload(code) => { - let result = Self::bare_upload_code( - origin.clone(), - code, - storage_deposit_limit.clone().map(Into::into), - Determinism::Enforced, - ); - - let Ok(CodeUploadReturnValue { code_hash, deposit }) = result else { - return ContractResult { - gas_consumed: Zero::zero(), - gas_required: Zero::zero(), - storage_deposit: Default::default(), - debug_message: Vec::new(), - result: Err(Error::::MigrationInProgress.into()), - events: None, - } + // let result = Self::bare_upload_code( + // origin.clone(), + // code, + // storage_deposit_limit.clone().map(Into::into), + // Determinism::Enforced, + // ); + + let (code_hash, deposit) = match try_upload(code) { + Ok(CodeUploadReturnValue { code_hash, deposit }) => (code_hash, deposit), + Err(error) => + return ContractResult { + gas_consumed: Zero::zero(), + gas_required: Zero::zero(), + storage_deposit: Default::default(), + debug_message: debug_message.unwrap_or(Default::default()).into(), + result: Err(error), + events: events(), + }, }; let storage_deposit_limit = storage_deposit_limit.map(|limit| { @@ -1418,12 +1447,6 @@ impl Pallet { }; let output = InstantiateInput:: { code_hash, salt }.run_guarded(common); - // collect events if CollectEvents is UnsafeCollect - let events = if collect_events == CollectEvents::UnsafeCollect { - Some(System::::read_events_no_consensus().map(|e| *e).collect()) - } else { - None - }; ContractInstantiateResult { result: output .result @@ -1433,7 +1456,7 @@ impl Pallet { gas_required: output.gas_meter.gas_required(), storage_deposit: output.storage_deposit, debug_message: debug_message.unwrap_or_default().to_vec(), - events, + events: events(), } } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 2e9d1176213ee..4f8de4db2ce57 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -3753,6 +3753,19 @@ fn instantiate_with_zero_balance_works() { assert_eq!( System::events(), vec![ + EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::Balances(pallet_balances::Event::Reserved { + who: ALICE, + amount: deposit_expected, + }), + topics: vec![], + }, + EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::Contracts(crate::Event::CodeStored { code_hash }), + topics: vec![code_hash], + }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::System(frame_system::Event::NewAccount { @@ -3801,19 +3814,6 @@ fn instantiate_with_zero_balance_works() { }), topics: vec![], }, - EventRecord { - phase: Phase::Initialization, - event: RuntimeEvent::Balances(pallet_balances::Event::Reserved { - who: ALICE, - amount: deposit_expected, - }), - topics: vec![], - }, - EventRecord { - phase: Phase::Initialization, - event: RuntimeEvent::Contracts(crate::Event::CodeStored { code_hash }), - topics: vec![code_hash], - }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Instantiated { @@ -3865,6 +3865,19 @@ fn instantiate_with_below_existential_deposit_works() { assert_eq!( System::events(), vec![ + EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::Balances(pallet_balances::Event::Reserved { + who: ALICE, + amount: deposit_expected, + }), + topics: vec![], + }, + EventRecord { + phase: Phase::Initialization, + event: RuntimeEvent::Contracts(crate::Event::CodeStored { code_hash }), + topics: vec![code_hash], + }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::System(frame_system::Event::NewAccount { @@ -3922,19 +3935,6 @@ fn instantiate_with_below_existential_deposit_works() { }), topics: vec![], }, - EventRecord { - phase: Phase::Initialization, - event: RuntimeEvent::Balances(pallet_balances::Event::Reserved { - who: ALICE, - amount: deposit_expected, - }), - topics: vec![], - }, - EventRecord { - phase: Phase::Initialization, - event: RuntimeEvent::Contracts(crate::Event::CodeStored { code_hash }), - topics: vec![code_hash], - }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Instantiated { @@ -5591,7 +5591,7 @@ fn root_cannot_instantiate_with_code() { vec![], vec![], ), - DispatchError::RootNotAllowed, + DispatchError::BadOrigin ); }); } diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 7d0fac74c4d1d..f6f33a7d74285 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -785,7 +785,6 @@ mod tests { ext.borrow_mut().schedule(), ALICE, Determinism::Enforced, - TryInstantiate::Instantiate, ) .map_err(|err| err.0)? }; diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index d91f7d6abc340..857fb994b1e01 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -398,7 +398,6 @@ mod tests { &schedule, ALICE, Determinism::Enforced, - TryInstantiate::Instantiate, ); assert_matches::assert_matches!(r.map_err(|(_, msg)| msg), $($expected)*); } From dc744afa83b7b33c7c5d0091f4964239fbc279c6 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 3 Jul 2023 22:59:31 +0200 Subject: [PATCH 03/70] rm comment --- frame/contracts/src/lib.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 360052c3b89b5..37f37b07aeba3 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1407,13 +1407,6 @@ impl Pallet { let (code_hash, storage_deposit_limit): (CodeHash, Option>) = match code { Code::Upload(code) => { - // let result = Self::bare_upload_code( - // origin.clone(), - // code, - // storage_deposit_limit.clone().map(Into::into), - // Determinism::Enforced, - // ); - let (code_hash, deposit) = match try_upload(code) { Ok(CodeUploadReturnValue { code_hash, deposit }) => (code_hash, deposit), Err(error) => From 5f9a22628e4c8437d908ca7962cae8605b04e64d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 3 Jul 2023 23:34:12 +0200 Subject: [PATCH 04/70] join fns --- frame/contracts/src/lib.rs | 46 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 37f37b07aeba3..9f1b8c2c5939a 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -698,11 +698,12 @@ pub mod pallet { let origin = ensure_signed(origin)?; let code_len = code.len() as u32; - let CodeUploadReturnValue { code_hash, deposit } = Self::bare_upload_code( + let CodeUploadReturnValue { code_hash, deposit } = Self::try_upload_code( origin.clone(), code, storage_deposit_limit.clone().map(Into::into), Determinism::Enforced, + None, )?; let data_len = data.len() as u32; @@ -1387,27 +1388,17 @@ impl Pallet { } }; - let mut try_upload = |code| -> Result<_, DispatchError> { - let schedule = T::Schedule::get(); - let module = - WasmBlob::from_code(code, &schedule, origin.clone(), Determinism::Enforced) - .map_err(|(err, msg)| { - debug_message.as_mut().map(|d| d.try_extend(msg.bytes())); - err - })?; - - let deposit = module.open_deposit(&module.code_info()); - if let Some(storage_deposit_limit) = storage_deposit_limit { - ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); - } - let result = CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }; - module.store()?; - Ok(result) - }; - let (code_hash, storage_deposit_limit): (CodeHash, Option>) = match code { Code::Upload(code) => { - let (code_hash, deposit) = match try_upload(code) { + let result = Self::try_upload_code( + origin.clone(), + code, + storage_deposit_limit.clone().map(Into::into), + Determinism::Enforced, + debug_message.as_mut(), + ); + + let (code_hash, deposit) = match result { Ok(CodeUploadReturnValue { code_hash, deposit }) => (code_hash, deposit), Err(error) => return ContractResult { @@ -1464,9 +1455,22 @@ impl Pallet { determinism: Determinism, ) -> CodeUploadResult, BalanceOf> { Migration::::ensure_migrated()?; + Self::try_upload_code(origin, code, storage_deposit_limit, determinism, None) + } + + fn try_upload_code( + origin: T::AccountId, + code: Vec, + storage_deposit_limit: Option>, + determinism: Determinism, + mut debug_message: Option<&mut DebugBufferVec>, + ) -> CodeUploadResult, BalanceOf> { let schedule = T::Schedule::get(); let module = - WasmBlob::from_code(code, &schedule, origin, determinism).map_err(|(err, _)| err)?; + WasmBlob::from_code(code, &schedule, origin, determinism).map_err(|(err, msg)| { + debug_message.as_mut().map(|d| d.try_extend(msg.bytes())); + err + })?; let deposit = module.open_deposit(&module.code_info()); if let Some(storage_deposit_limit) = storage_deposit_limit { ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); From b6def6db8fe5846b098016942ad4a1eaace9e52c Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 08:29:11 +0200 Subject: [PATCH 05/70] clippy --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 9f1b8c2c5939a..cbe39de6fb472 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1393,7 +1393,7 @@ impl Pallet { let result = Self::try_upload_code( origin.clone(), code, - storage_deposit_limit.clone().map(Into::into), + storage_deposit_limit.map(Into::into), Determinism::Enforced, debug_message.as_mut(), ); From 76c43c2305fe3ccfc48ae7a5665c3ff0a1bead6b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 13:08:50 +0200 Subject: [PATCH 06/70] Fix limits --- frame/contracts/src/lib.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index cbe39de6fb472..f7bdf71bd6f6d 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1365,7 +1365,7 @@ impl Pallet { origin: T::AccountId, value: BalanceOf, gas_limit: Weight, - storage_deposit_limit: Option>, + mut storage_deposit_limit: Option>, code: Code>, data: Vec, salt: Vec, @@ -1388,7 +1388,7 @@ impl Pallet { } }; - let (code_hash, storage_deposit_limit): (CodeHash, Option>) = match code { + let (code_hash, upload_deposit): (CodeHash, BalanceOf) = match code { Code::Upload(code) => { let result = Self::try_upload_code( origin.clone(), @@ -1411,14 +1411,11 @@ impl Pallet { }, }; - let storage_deposit_limit = storage_deposit_limit.map(|limit| { - let limit: BalanceOf = limit.into(); - limit.saturating_sub(deposit) - }); - - (code_hash, storage_deposit_limit) + storage_deposit_limit = + storage_deposit_limit.map(|l| l.saturating_sub(deposit.into())); + (code_hash, deposit) }, - Code::Existing(code_hash) => (code_hash, storage_deposit_limit), + Code::Existing(code_hash) => (code_hash, Default::default()), }; let common = CommonInput { @@ -1438,7 +1435,9 @@ impl Pallet { .map_err(|e| e.error), gas_consumed: output.gas_meter.gas_consumed(), gas_required: output.gas_meter.gas_required(), - storage_deposit: output.storage_deposit, + storage_deposit: output + .storage_deposit + .saturating_add(&StorageDeposit::Charge(upload_deposit)), debug_message: debug_message.unwrap_or_default().to_vec(), events: events(), } From 83e5f374669d4addd48259658740eb318a3f3f0a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 15:06:38 +0200 Subject: [PATCH 07/70] reduce diff --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index f7bdf71bd6f6d..dd4ddc3fdb002 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -767,7 +767,7 @@ pub mod pallet { } } output.gas_meter.into_dispatch_result( - output.result.map(|(_address, output)| output), + output.result.map(|(_address, result)| result), T::WeightInfo::instantiate(data_len, salt_len), ) } From e3c51ecbe60bde972454d5c169420b95d3b9f9ca Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 15:10:09 +0200 Subject: [PATCH 08/70] fix --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index dd4ddc3fdb002..1f97fe63dd1f3 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -726,7 +726,7 @@ pub mod pallet { } output.gas_meter.into_dispatch_result( - output.result.map(|(_address, output)| output), + output.result.map(|(_address, result)| result), T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), ) } From 8c1537237905b6d0117a3d9371bab571988a03f4 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 15:11:38 +0200 Subject: [PATCH 09/70] fix --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 1f97fe63dd1f3..dbee5af5a67e7 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -767,7 +767,7 @@ pub mod pallet { } } output.gas_meter.into_dispatch_result( - output.result.map(|(_address, result)| result), + output.result.map(|(_address, output)| output), T::WeightInfo::instantiate(data_len, salt_len), ) } From c97708bf3722331918fd5a0a37d674d7e67a0367 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 17:10:26 +0200 Subject: [PATCH 10/70] fix typo --- frame/contracts/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index dbee5af5a67e7..5ea540a6dde60 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -75,8 +75,8 @@ //! allowed to code owner. //! * [`Pallet::set_code`] - Changes the code of an existing contract. Only allowed to `Root` //! origin. -//! * [`Pallet::migrate`] - Runs migration steps of curent multi-block migration in priority, before -//! [`Hooks::on_idle`][frame_support::traits::Hooks::on_idle] activates. +//! * [`Pallet::migrate`] - Runs migration steps of current multi-block migration in priority, +//! before [`Hooks::on_idle`][frame_support::traits::Hooks::on_idle] activates. //! //! ## Usage //! From 018077703de8ceb5fc9bad49da14924c092db87d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 22:07:14 +0200 Subject: [PATCH 11/70] refactor store to use self --- frame/contracts/primitives/src/lib.rs | 1 + frame/contracts/src/lib.rs | 2 +- frame/contracts/src/wasm/mod.rs | 25 +++++++++++-------------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/frame/contracts/primitives/src/lib.rs b/frame/contracts/primitives/src/lib.rs index 8da148b334e74..ddd97d99b2f59 100644 --- a/frame/contracts/primitives/src/lib.rs +++ b/frame/contracts/primitives/src/lib.rs @@ -160,6 +160,7 @@ pub enum Code { /// The code hash of an on-chain wasm blob. Existing(Hash), } + /// The amount of balance that was either charged or refunded in order to pay for storage. #[derive(Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, Clone, TypeInfo)] pub enum StorageDeposit { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 5ea540a6dde60..ff73d998e1d0f 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1465,7 +1465,7 @@ impl Pallet { mut debug_message: Option<&mut DebugBufferVec>, ) -> CodeUploadResult, BalanceOf> { let schedule = T::Schedule::get(); - let module = + let mut module = WasmBlob::from_code(code, &schedule, origin, determinism).map_err(|(err, msg)| { debug_message.as_mut().map(|d| d.try_extend(msg.bytes())); err diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index f6f33a7d74285..374e0271112e0 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -165,8 +165,8 @@ impl WasmBlob { /// /// Otherwise the code is stored when [`::execute`][`Executable::execute`] /// is called. - pub fn store(self) -> DispatchResult { - Self::store_code(self, false) + pub fn store(&mut self) -> DispatchResult { + self.store_code(false) } /// Remove the code from storage and refund the deposit to its owner. @@ -254,8 +254,8 @@ impl WasmBlob { /// /// Increments the reference count of the in-storage `WasmBlob`, if it already exists in /// storage. - fn store_code(mut module: Self, instantiated: bool) -> DispatchResult { - let code_hash = &module.code_hash().clone(); + fn store_code(&mut self, instantiated: bool) -> DispatchResult { + let code_hash = self.code_hash().clone(); >::mutate(code_hash, |stored_code_info| { match stored_code_info { // Instantiate existing contract. @@ -279,15 +279,12 @@ impl WasmBlob { None => { // This `None` case happens only in freshly uploaded modules. This means that // the `owner` is always the origin of the current transaction. - T::Currency::reserve(&module.code_info.owner, module.code_info.deposit) + T::Currency::reserve(&self.code_info.owner, self.code_info.deposit) .map_err(|_| >::StorageDepositNotEnoughFunds)?; - module.code_info.refcount = if instantiated { 1 } else { 0 }; - >::insert(code_hash, module.code); - *stored_code_info = Some(module.code_info); - >::deposit_event( - vec![*code_hash], - Event::CodeStored { code_hash: *code_hash }, - ); + self.code_info.refcount = if instantiated { 1 } else { 0 }; + >::insert(code_hash, &self.code); + *stored_code_info = Some(self.code_info.clone()); + >::deposit_event(vec![code_hash], Event::CodeStored { code_hash }); Ok(()) }, } @@ -397,7 +394,7 @@ impl Executable for WasmBlob { } fn execute>( - self, + mut self, ext: &mut E, function: &ExportedFunction, input_data: Vec, @@ -447,7 +444,7 @@ impl Executable for WasmBlob { // We store before executing so that the code hash is available in the constructor. if let &ExportedFunction::Constructor = function { - Self::store_code(self, true)?; + self.store_code(true)?; } let result = exported_func.call(&mut store, &[], &mut []); From 89accc8523d9bd7440a1495606f8abdc5a53c7d9 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 22:07:36 +0200 Subject: [PATCH 12/70] refactor run to take self by value --- frame/contracts/src/lib.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index ff73d998e1d0f..e6f327a6c06da 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1110,7 +1110,7 @@ struct InternalOutput { /// Helper trait to wrap contract execution entry points into a single function /// [`Invokable::run_guarded`]. -trait Invokable { +trait Invokable: Sized { /// What is returned as a result of a successful invocation. type Output; @@ -1122,7 +1122,7 @@ trait Invokable { /// /// We enforce a re-entrancy guard here by initializing and checking a boolean flag through a /// global reference. - fn run_guarded(&self, common: CommonInput) -> InternalOutput { + fn run_guarded(self, common: CommonInput) -> InternalOutput { // Set up a global reference to the boolean flag used for the re-entrancy guard. environmental!(executing_contract: bool); @@ -1170,11 +1170,8 @@ trait Invokable { /// contract or a instantiation of a new one. /// /// Called by dispatchables and public functions through the [`Invokable::run_guarded`]. - fn run( - &self, - common: CommonInput, - gas_meter: GasMeter, - ) -> InternalOutput; + fn run(self, common: CommonInput, gas_meter: GasMeter) + -> InternalOutput; /// This method ensures that the given `origin` is allowed to invoke the current `Invokable`. /// @@ -1186,7 +1183,7 @@ impl Invokable for CallInput { type Output = ExecReturnValue; fn run( - &self, + self, common: CommonInput, mut gas_meter: GasMeter, ) -> InternalOutput { @@ -1212,7 +1209,7 @@ impl Invokable for CallInput { value, data.clone(), debug_message, - *determinism, + determinism, ); match storage_meter.try_into_deposit(&origin) { @@ -1234,7 +1231,7 @@ impl Invokable for InstantiateInput { type Output = (AccountIdOf, ExecReturnValue); fn run( - &self, + self, common: CommonInput, mut gas_meter: GasMeter, ) -> InternalOutput { From 0e61306b313109d27334c2ad29e41a02995d215f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 23:01:31 +0200 Subject: [PATCH 13/70] pass tests --- frame/contracts/src/lib.rs | 44 +++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e6f327a6c06da..35b5e04783f95 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -698,7 +698,7 @@ pub mod pallet { let origin = ensure_signed(origin)?; let code_len = code.len() as u32; - let CodeUploadReturnValue { code_hash, deposit } = Self::try_upload_code( + let (module, deposit) = Self::try_upload_code( origin.clone(), code, storage_deposit_limit.clone().map(Into::into), @@ -718,7 +718,8 @@ pub mod pallet { debug_message: None, }; - let mut output = InstantiateInput:: { code_hash, salt }.run_guarded(common); + let mut output = + InstantiateInput:: { code: WasmCode::Wasm(module), salt }.run_guarded(common); if let Ok(retval) = &output.result { if retval.1.did_revert() { output.result = Err(>::ContractReverted.into()); @@ -760,7 +761,8 @@ pub mod pallet { storage_deposit_limit: storage_deposit_limit.map(Into::into), debug_message: None, }; - let mut output = InstantiateInput:: { code_hash, salt }.run_guarded(common); + let mut output = InstantiateInput:: { code: WasmCode::CodeHash(code_hash), salt } + .run_guarded(common); if let Ok(retval) = &output.result { if retval.1.did_revert() { output.result = Err(>::ContractReverted.into()); @@ -1063,9 +1065,14 @@ struct CallInput { determinism: Determinism, } +enum WasmCode { + Wasm(WasmBlob), + CodeHash(CodeHash), +} + /// Input specific to a contract instantiation invocation. struct InstantiateInput { - code_hash: CodeHash, + code: WasmCode, salt: Vec, } @@ -1241,7 +1248,12 @@ impl Invokable for InstantiateInput { let InstantiateInput { salt, .. } = self; let CommonInput { origin: contract_origin, .. } = common; let origin = contract_origin.account_id()?; - let executable = WasmBlob::from_storage(self.code_hash, &mut gas_meter)?; + + let executable = match self.code { + WasmCode::Wasm(module) => module, + WasmCode::CodeHash(code_hash) => WasmBlob::from_storage(code_hash, &mut gas_meter)?, + }; + let contract_origin = Origin::from_account_id(origin.clone()); let mut storage_meter = StorageMeter::new(&contract_origin, common.storage_deposit_limit, common.value)?; @@ -1385,7 +1397,7 @@ impl Pallet { } }; - let (code_hash, upload_deposit): (CodeHash, BalanceOf) = match code { + let (code, upload_deposit): (WasmCode, BalanceOf) = match code { Code::Upload(code) => { let result = Self::try_upload_code( origin.clone(), @@ -1395,8 +1407,8 @@ impl Pallet { debug_message.as_mut(), ); - let (code_hash, deposit) = match result { - Ok(CodeUploadReturnValue { code_hash, deposit }) => (code_hash, deposit), + let (module, deposit) = match result { + Ok(result) => result, Err(error) => return ContractResult { gas_consumed: Zero::zero(), @@ -1410,9 +1422,9 @@ impl Pallet { storage_deposit_limit = storage_deposit_limit.map(|l| l.saturating_sub(deposit.into())); - (code_hash, deposit) + (WasmCode::Wasm(module), deposit) }, - Code::Existing(code_hash) => (code_hash, Default::default()), + Code::Existing(hash) => (WasmCode::CodeHash(hash), Default::default()), }; let common = CommonInput { @@ -1424,7 +1436,7 @@ impl Pallet { debug_message: debug_message.as_mut(), }; - let output = InstantiateInput:: { code_hash, salt }.run_guarded(common); + let output = InstantiateInput:: { code, salt }.run_guarded(common); ContractInstantiateResult { result: output .result @@ -1451,7 +1463,9 @@ impl Pallet { determinism: Determinism, ) -> CodeUploadResult, BalanceOf> { Migration::::ensure_migrated()?; - Self::try_upload_code(origin, code, storage_deposit_limit, determinism, None) + let (module, deposit) = + Self::try_upload_code(origin, code, storage_deposit_limit, determinism, None)?; + Ok(CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }) } fn try_upload_code( @@ -1460,7 +1474,7 @@ impl Pallet { storage_deposit_limit: Option>, determinism: Determinism, mut debug_message: Option<&mut DebugBufferVec>, - ) -> CodeUploadResult, BalanceOf> { + ) -> Result<(WasmBlob, BalanceOf), DispatchError> { let schedule = T::Schedule::get(); let mut module = WasmBlob::from_code(code, &schedule, origin, determinism).map_err(|(err, msg)| { @@ -1471,9 +1485,9 @@ impl Pallet { if let Some(storage_deposit_limit) = storage_deposit_limit { ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); } - let result = CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }; + // let result = CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }; module.store()?; - Ok(result) + Ok((module, deposit)) } /// Query storage of a specified contract under a specified key. From 49c174e0ade9bf38c1b1ab46bea119397277c792 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 23:04:48 +0200 Subject: [PATCH 14/70] rm comment --- frame/contracts/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 35b5e04783f95..65dd5b5cbb200 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1485,7 +1485,6 @@ impl Pallet { if let Some(storage_deposit_limit) = storage_deposit_limit { ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); } - // let result = CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }; module.store()?; Ok((module, deposit)) } From 9f53e36ece3d48bd0639a2f56b822832e86e5674 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 11:15:30 +0200 Subject: [PATCH 15/70] fixes --- frame/contracts/src/lib.rs | 8 +-- frame/contracts/src/wasm/mod.rs | 92 ++++++++++++--------------------- 2 files changed, 37 insertions(+), 63 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 65dd5b5cbb200..782dd2a1f68ac 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1065,6 +1065,7 @@ struct CallInput { determinism: Determinism, } +/// Reference to an existing code hash or a new wasm module. enum WasmCode { Wasm(WasmBlob), CodeHash(CodeHash), @@ -1468,6 +1469,7 @@ impl Pallet { Ok(CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }) } + /// Upload new code and returns the wasm blob and deposit amount paid. fn try_upload_code( origin: T::AccountId, code: Vec, @@ -1481,11 +1483,11 @@ impl Pallet { debug_message.as_mut().map(|d| d.try_extend(msg.bytes())); err })?; - let deposit = module.open_deposit(&module.code_info()); + let deposit = module.store_code()?; if let Some(storage_deposit_limit) = storage_deposit_limit { ensure!(storage_deposit_limit >= deposit, >::StorageDepositLimitExhausted); } - module.store()?; + Ok((module, deposit)) } @@ -1530,7 +1532,7 @@ impl Pallet { owner: T::AccountId, ) -> frame_support::dispatch::DispatchResult { let schedule = T::Schedule::get(); - WasmBlob::store_code_unchecked(code, &schedule, owner)?; + WasmBlob::::from_code_unchecked(code, &schedule, owner)?.store_code()?; Ok(()) } diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 374e0271112e0..6ca36bbb25825 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -161,14 +161,6 @@ impl WasmBlob { ) } - /// Store the code without instantiating it. - /// - /// Otherwise the code is stored when [`::execute`][`Executable::execute`] - /// is called. - pub fn store(&mut self) -> DispatchResult { - self.store_code(false) - } - /// Remove the code from storage and refund the deposit to its owner. /// /// Applies all necessary checks before removing the code. @@ -176,18 +168,6 @@ impl WasmBlob { Self::try_remove_code(origin, code_hash) } - /// Returns whether there is a deposit to be paid for this module. - /// - /// Returns `0` if the module is already in storage and hence no deposit will - /// be charged for storing it. - pub fn open_deposit(&self, code_info: &CodeInfo) -> BalanceOf { - if >::contains_key(self.code_hash()) { - 0u32.into() - } else { - code_info.deposit - } - } - /// Creates and returns an instance of the supplied code. /// /// This is either used for later executing a contract or for validation of a contract. @@ -222,7 +202,7 @@ impl WasmBlob { // Query wasmi for memory limits specified in the module's import entry. let memory_limits = contract.scan_imports::(schedule)?; // Here we allocate this memory in the _store_. It allocates _inital_ value, but allows it - // to grow up to maximum number of memory pages, if neccesary. + // to grow up to maximum number of memory pages, if necessary. let qed = "We checked the limits versus our Schedule, which specifies the max amount of memory pages well below u16::MAX; qed"; @@ -250,47 +230,51 @@ impl WasmBlob { &self.code_info } - /// Put the module blob into storage. - /// - /// Increments the reference count of the in-storage `WasmBlob`, if it already exists in - /// storage. - fn store_code(&mut self, instantiated: bool) -> DispatchResult { + /// Put the module blob into storage, and returns the deposit paid for the storage. + pub fn store_code(&mut self) -> Result, Error> { let code_hash = self.code_hash().clone(); >::mutate(code_hash, |stored_code_info| { match stored_code_info { - // Instantiate existing contract. - Some(stored_code_info) if instantiated => { - stored_code_info.refcount = stored_code_info.refcount.checked_add(1).expect( - " - refcount is 64bit. Generating this overflow would require to store - _at least_ 18 exabyte of data assuming that a contract consumes only - one byte of data. Any node would run out of storage space before hitting - this overflow; - qed - ", - ); - Ok(()) - }, // Contract code is already stored in storage. Nothing to be done here. - Some(_) => Ok(()), + Some(_) => Ok(Default::default()), // Upload a new contract code. - // // We need to store the code and its code_info, and collect the deposit. + // This `None` case happens only in freshly uploaded modules. This means that + // the `owner` is always the origin of the current transaction. None => { - // This `None` case happens only in freshly uploaded modules. This means that - // the `owner` is always the origin of the current transaction. - T::Currency::reserve(&self.code_info.owner, self.code_info.deposit) + let deposit = self.code_info.deposit; + T::Currency::reserve(&self.code_info.owner, deposit) .map_err(|_| >::StorageDepositNotEnoughFunds)?; - self.code_info.refcount = if instantiated { 1 } else { 0 }; + self.code_info.refcount = 0; >::insert(code_hash, &self.code); *stored_code_info = Some(self.code_info.clone()); >::deposit_event(vec![code_hash], Event::CodeStored { code_hash }); - Ok(()) + Ok(deposit) }, } }) } + /// Increments the reference count of the in-storage `WasmBlob` + fn increment_refcount(&mut self) -> DispatchResult { + let code_hash = self.code_hash().clone(); + >::mutate(code_hash, |stored_code_info| match stored_code_info { + Some(stored_code_info) => { + stored_code_info.refcount = stored_code_info.refcount.checked_add(1).expect( + " + refcount is 64bit. Generating this overflow would require to store + _at least_ 18 exabyte of data assuming that a contract consumes only + one byte of data. Any node would run out of storage space before hitting + this overflow; + qed + ", + ); + Ok(()) + }, + None => Err(>::CodeNotFound.into()), + }) + } + /// Try to remove code together with all associated information. fn try_remove_code(origin: &T::AccountId, code_hash: CodeHash) -> DispatchResult { >::try_mutate_exists(&code_hash, |existing| { @@ -323,17 +307,6 @@ impl WasmBlob { Ok(code) } - /// See [`Self::from_code_unchecked`]. - #[cfg(feature = "runtime-benchmarks")] - pub fn store_code_unchecked( - code: Vec, - schedule: &Schedule, - owner: T::AccountId, - ) -> DispatchResult { - let executable = Self::from_code_unchecked(code, schedule, owner)?; - Self::store_code(executable, false) - } - /// Create the module without checking the passed code. /// /// # Note @@ -342,7 +315,7 @@ impl WasmBlob { /// our results. This also does not collect any deposit from the `owner`. Also useful /// during testing when we want to deploy codes that do not pass the instantiation checks. #[cfg(any(test, feature = "runtime-benchmarks"))] - fn from_code_unchecked( + pub fn from_code_unchecked( code: Vec, schedule: &Schedule, owner: T::AccountId, @@ -442,9 +415,8 @@ impl Executable for WasmBlob { Error::::CodeRejected })?; - // We store before executing so that the code hash is available in the constructor. if let &ExportedFunction::Constructor = function { - self.store_code(true)?; + self.increment_refcount()?; } let result = exported_func.call(&mut store, &[], &mut []); From 5036e88673ac45001c0a3d0ba5fc845e86e24e39 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 11:21:42 +0200 Subject: [PATCH 16/70] fix typo --- frame/contracts/src/lib.rs | 2 +- frame/contracts/src/wasm/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 782dd2a1f68ac..55e1fd2a4a676 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1469,7 +1469,7 @@ impl Pallet { Ok(CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }) } - /// Upload new code and returns the wasm blob and deposit amount paid. + /// Upload new code and returns the wasm blob and deposit amount collected. fn try_upload_code( origin: T::AccountId, code: Vec, diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 6ca36bbb25825..752d0dc75c41f 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -230,7 +230,7 @@ impl WasmBlob { &self.code_info } - /// Put the module blob into storage, and returns the deposit paid for the storage. + /// Put the module blob into storage, and returns the deposit collected for the storage. pub fn store_code(&mut self) -> Result, Error> { let code_hash = self.code_hash().clone(); >::mutate(code_hash, |stored_code_info| { @@ -255,7 +255,7 @@ impl WasmBlob { }) } - /// Increments the reference count of the in-storage `WasmBlob` + /// Increments the reference count of the in-storage `WasmBlob`. fn increment_refcount(&mut self) -> DispatchResult { let code_hash = self.code_hash().clone(); >::mutate(code_hash, |stored_code_info| match stored_code_info { From 09a99714eb4fa893554c845f00f130276137f01e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 11:37:22 +0200 Subject: [PATCH 17/70] rm --- frame/contracts/src/wasm/mod.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 752d0dc75c41f..d69124076b4ce 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -225,11 +225,6 @@ impl WasmBlob { Ok((store, memory, instance)) } - /// Getter method for the code_info. - pub fn code_info(&self) -> &CodeInfo { - &self.code_info - } - /// Put the module blob into storage, and returns the deposit collected for the storage. pub fn store_code(&mut self) -> Result, Error> { let code_hash = self.code_hash().clone(); From 6248a64298b68680fba81b578cfa5db417edfe17 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 11:41:40 +0200 Subject: [PATCH 18/70] fix fmt --- frame/contracts/src/wasm/prepare.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index 857fb994b1e01..2c6104e072beb 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -41,7 +41,6 @@ use wasmi::{ /// compiler toolchains might not support specifying other modules than "env" for memory imports. pub const IMPORT_MODULE_MEMORY: &str = "env"; - /// The inner deserialized module is valid and contains only allowed WebAssembly features. /// This is checked by loading it into wasmi interpreter `engine`. pub struct LoadedModule { From e137f0ee1148ce71615aeb24b73c1d65c0d7477e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 11:54:01 +0200 Subject: [PATCH 19/70] clippy --- frame/contracts/src/wasm/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index d69124076b4ce..7d76f33a5be4e 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -227,7 +227,7 @@ impl WasmBlob { /// Put the module blob into storage, and returns the deposit collected for the storage. pub fn store_code(&mut self) -> Result, Error> { - let code_hash = self.code_hash().clone(); + let code_hash = *self.code_hash(); >::mutate(code_hash, |stored_code_info| { match stored_code_info { // Contract code is already stored in storage. Nothing to be done here. @@ -252,7 +252,7 @@ impl WasmBlob { /// Increments the reference count of the in-storage `WasmBlob`. fn increment_refcount(&mut self) -> DispatchResult { - let code_hash = self.code_hash().clone(); + let code_hash = *self.code_hash(); >::mutate(code_hash, |stored_code_info| match stored_code_info { Some(stored_code_info) => { stored_code_info.refcount = stored_code_info.refcount.checked_add(1).expect( From 68ba74d057d1f905b6c3f2dfd8d25895e3ce9b1f Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Wed, 5 Jul 2023 13:04:51 +0000 Subject: [PATCH 20/70] ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts --- frame/contracts/src/weights.rs | 1186 ++++++++++++++++---------------- 1 file changed, 593 insertions(+), 593 deletions(-) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index fccc17a0a79ad..97104bf070c5e 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `runner-xerhrdyb-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 @@ -137,8 +137,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_546_000 picoseconds. - Weight::from_parts(2_671_000, 1627) + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_691_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -148,10 +148,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `451 + k * (69 ±0)` // Estimated: `441 + k * (70 ±0)` - // Minimum execution time: 13_398_000 picoseconds. - Weight::from_parts(13_771_000, 441) - // Standard Error: 1_033 - .saturating_add(Weight::from_parts(1_231_963, 0).saturating_mul(k.into())) + // Minimum execution time: 13_477_000 picoseconds. + Weight::from_parts(13_900_000, 441) + // Standard Error: 1_073 + .saturating_add(Weight::from_parts(1_252_072, 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)) @@ -165,10 +165,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 8_335_000 picoseconds. - Weight::from_parts(9_172_574, 6149) + // Minimum execution time: 8_545_000 picoseconds. + Weight::from_parts(8_702_062, 6149) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_388, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_314, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -181,8 +181,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `510` // Estimated: `6450` - // Minimum execution time: 17_087_000 picoseconds. - Weight::from_parts(17_840_000, 6450) + // Minimum execution time: 17_228_000 picoseconds. + Weight::from_parts(18_232_000, 6450) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -195,10 +195,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 4_016_000 picoseconds. - Weight::from_parts(655_916, 3635) - // Standard Error: 1_202 - .saturating_add(Weight::from_parts(1_158_002, 0).saturating_mul(k.into())) + // Minimum execution time: 3_945_000 picoseconds. + Weight::from_parts(3_627_456, 3635) + // Standard Error: 933 + .saturating_add(Weight::from_parts(1_186_234, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -217,10 +217,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 17_500_000 picoseconds. - Weight::from_parts(17_675_710, 6263) - // Standard Error: 0 - .saturating_add(Weight::from_parts(488, 0).saturating_mul(c.into())) + // Minimum execution time: 17_716_000 picoseconds. + Weight::from_parts(17_740_527, 6263) + // Standard Error: 1 + .saturating_add(Weight::from_parts(407, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -231,8 +231,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 3_278_000 picoseconds. - Weight::from_parts(3_501_000, 1627) + // Minimum execution time: 3_372_000 picoseconds. + Weight::from_parts(3_579_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -244,8 +244,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 12_489_000 picoseconds. - Weight::from_parts(12_850_000, 3631) + // Minimum execution time: 12_787_000 picoseconds. + Weight::from_parts(13_172_000, 3631) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -255,8 +255,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_788_000 picoseconds. - Weight::from_parts(5_099_000, 3607) + // Minimum execution time: 4_638_000 picoseconds. + Weight::from_parts(5_026_000, 3607) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -267,8 +267,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 6_850_000 picoseconds. - Weight::from_parts(7_146_000, 3632) + // Minimum execution time: 6_505_000 picoseconds. + Weight::from_parts(7_000_000, 3632) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -279,8 +279,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 7_078_000 picoseconds. - Weight::from_parts(7_452_000, 3607) + // Minimum execution time: 7_240_000 picoseconds. + Weight::from_parts(7_596_000, 3607) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -303,10 +303,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `786` // Estimated: `6735 + c * (1 ±0)` - // Minimum execution time: 366_103_000 picoseconds. - Weight::from_parts(335_256_535, 6735) - // Standard Error: 81 - .saturating_add(Weight::from_parts(38_395, 0).saturating_mul(c.into())) + // Minimum execution time: 300_870_000 picoseconds. + Weight::from_parts(264_705_665, 6735) + // Standard Error: 80 + .saturating_add(Weight::from_parts(37_998, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -315,6 +315,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeInfoOf (r:1 w:1) /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) + /// Storage: System EventTopics (r:3 w:3) + /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -323,8 +325,6 @@ impl WeightInfo for SubstrateWeight { /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) /// Storage: System Account (r:2 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// Storage: Contracts PristineCode (r:0 w:1) /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) /// The range of component `c` is `[0, 125952]`. @@ -334,14 +334,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `303` // Estimated: `8745` - // Minimum execution time: 4_289_681_000 picoseconds. - Weight::from_parts(331_057_751, 8745) - // Standard Error: 206 - .saturating_add(Weight::from_parts(76_366, 0).saturating_mul(c.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(1_938, 0).saturating_mul(i.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(2_026, 0).saturating_mul(s.into())) + // Minimum execution time: 4_327_624_000 picoseconds. + Weight::from_parts(301_214_781, 8745) + // Standard Error: 256 + .saturating_add(Weight::from_parts(113_888, 0).saturating_mul(c.into())) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_982, 0).saturating_mul(i.into())) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_978, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } @@ -367,12 +367,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `523` // Estimated: `6513` - // Minimum execution time: 2_122_622_000 picoseconds. - Weight::from_parts(348_487_014, 6513) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_944, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_816, 0).saturating_mul(s.into())) + // Minimum execution time: 2_034_124_000 picoseconds. + Weight::from_parts(316_084_273, 6513) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_833, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_764, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -394,8 +394,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `820` // Estimated: `6760` - // Minimum execution time: 209_114_000 picoseconds. - Weight::from_parts(216_139_000, 6760) + // Minimum execution time: 203_976_000 picoseconds. + Weight::from_parts(211_752_000, 6760) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -412,10 +412,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 323_131_000 picoseconds. - Weight::from_parts(331_460_802, 3607) - // Standard Error: 104 - .saturating_add(Weight::from_parts(73_534, 0).saturating_mul(c.into())) + // Minimum execution time: 257_618_000 picoseconds. + Weight::from_parts(238_902_229, 3607) + // Standard Error: 109 + .saturating_add(Weight::from_parts(75_649, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -431,8 +431,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_960_000 picoseconds. - Weight::from_parts(36_057_000, 3720) + // Minimum execution time: 35_213_000 picoseconds. + Weight::from_parts(36_573_000, 3720) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -448,8 +448,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `575` // Estimated: `8990` - // Minimum execution time: 37_375_000 picoseconds. - Weight::from_parts(38_310_000, 8990) + // Minimum execution time: 38_203_000 picoseconds. + Weight::from_parts(39_195_000, 8990) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -472,10 +472,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `860 + r * (6 ±0)` // Estimated: `6801 + r * (6 ±0)` - // Minimum execution time: 332_418_000 picoseconds. - Weight::from_parts(344_417_681, 6801) - // Standard Error: 840 - .saturating_add(Weight::from_parts(349_564, 0).saturating_mul(r.into())) + // Minimum execution time: 255_632_000 picoseconds. + Weight::from_parts(290_369_859, 6801) + // Standard Error: 631 + .saturating_add(Weight::from_parts(354_164, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -499,10 +499,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `918 + r * (240 ±0)` // Estimated: `6822 + r * (2715 ±0)` - // Minimum execution time: 336_949_000 picoseconds. - Weight::from_parts(172_018_300, 6822) - // Standard Error: 6_859 - .saturating_add(Weight::from_parts(3_732_788, 0).saturating_mul(r.into())) + // Minimum execution time: 266_150_000 picoseconds. + Weight::from_parts(92_451_392, 6822) + // Standard Error: 7_407 + .saturating_add(Weight::from_parts(3_790_855, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -527,10 +527,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `910 + r * (244 ±0)` // Estimated: `6826 + r * (2719 ±0)` - // Minimum execution time: 331_580_000 picoseconds. - Weight::from_parts(166_444_295, 6826) - // Standard Error: 6_323 - .saturating_add(Weight::from_parts(4_651_680, 0).saturating_mul(r.into())) + // Minimum execution time: 265_546_000 picoseconds. + Weight::from_parts(105_931_939, 6826) + // Standard Error: 6_595 + .saturating_add(Weight::from_parts(4_658_614, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -555,10 +555,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `867 + r * (6 ±0)` // Estimated: `6809 + r * (6 ±0)` - // Minimum execution time: 332_922_000 picoseconds. - Weight::from_parts(347_945_106, 6809) - // Standard Error: 503 - .saturating_add(Weight::from_parts(420_506, 0).saturating_mul(r.into())) + // Minimum execution time: 264_617_000 picoseconds. + Weight::from_parts(288_134_988, 6809) + // Standard Error: 544 + .saturating_add(Weight::from_parts(427_340, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -582,10 +582,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `857 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 331_926_000 picoseconds. - Weight::from_parts(342_482_786, 6802) - // Standard Error: 382 - .saturating_add(Weight::from_parts(185_631, 0).saturating_mul(r.into())) + // Minimum execution time: 261_863_000 picoseconds. + Weight::from_parts(281_898_313, 6802) + // Standard Error: 361 + .saturating_add(Weight::from_parts(188_642, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -607,10 +607,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `747 + r * (3 ±0)` // Estimated: `6687 + r * (3 ±0)` - // Minimum execution time: 317_584_000 picoseconds. - Weight::from_parts(335_305_634, 6687) - // Standard Error: 413 - .saturating_add(Weight::from_parts(160_105, 0).saturating_mul(r.into())) + // Minimum execution time: 259_567_000 picoseconds. + Weight::from_parts(270_588_132, 6687) + // Standard Error: 347 + .saturating_add(Weight::from_parts(166_640, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -634,10 +634,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `861 + r * (6 ±0)` // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 329_683_000 picoseconds. - Weight::from_parts(350_664_785, 6803) - // Standard Error: 1_164 - .saturating_add(Weight::from_parts(342_540, 0).saturating_mul(r.into())) + // Minimum execution time: 267_068_000 picoseconds. + Weight::from_parts(286_387_558, 6803) + // Standard Error: 505 + .saturating_add(Weight::from_parts(340_789, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -661,10 +661,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `857 + r * (6 ±0)` // Estimated: `6798 + r * (6 ±0)` - // Minimum execution time: 337_992_000 picoseconds. - Weight::from_parts(349_845_008, 6798) - // Standard Error: 2_273 - .saturating_add(Weight::from_parts(544_647, 0).saturating_mul(r.into())) + // Minimum execution time: 264_198_000 picoseconds. + Weight::from_parts(285_684_642, 6798) + // Standard Error: 928 + .saturating_add(Weight::from_parts(560_650, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -688,10 +688,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1001 + r * (6 ±0)` // Estimated: `6925 + r * (6 ±0)` - // Minimum execution time: 333_494_000 picoseconds. - Weight::from_parts(346_208_587, 6925) - // Standard Error: 2_719 - .saturating_add(Weight::from_parts(1_609_679, 0).saturating_mul(r.into())) + // Minimum execution time: 273_226_000 picoseconds. + Weight::from_parts(283_185_921, 6925) + // Standard Error: 1_386 + .saturating_add(Weight::from_parts(1_603_171, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -715,10 +715,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `871 + r * (6 ±0)` // Estimated: `6820 + r * (6 ±0)` - // Minimum execution time: 333_877_000 picoseconds. - Weight::from_parts(345_594_741, 6820) - // Standard Error: 645 - .saturating_add(Weight::from_parts(338_480, 0).saturating_mul(r.into())) + // Minimum execution time: 266_334_000 picoseconds. + Weight::from_parts(285_010_823, 6820) + // Standard Error: 574 + .saturating_add(Weight::from_parts(340_403, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -742,10 +742,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `869 + r * (6 ±0)` // Estimated: `6818 + r * (6 ±0)` - // Minimum execution time: 332_219_000 picoseconds. - Weight::from_parts(344_126_186, 6818) - // Standard Error: 511 - .saturating_add(Weight::from_parts(338_886, 0).saturating_mul(r.into())) + // Minimum execution time: 257_368_000 picoseconds. + Weight::from_parts(289_195_499, 6818) + // Standard Error: 647 + .saturating_add(Weight::from_parts(336_915, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -769,10 +769,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `866 + r * (6 ±0)` // Estimated: `6816 + r * (6 ±0)` - // Minimum execution time: 335_740_000 picoseconds. - Weight::from_parts(347_465_239, 6816) - // Standard Error: 821 - .saturating_add(Weight::from_parts(332_457, 0).saturating_mul(r.into())) + // Minimum execution time: 274_331_000 picoseconds. + Weight::from_parts(283_636_376, 6816) + // Standard Error: 699 + .saturating_add(Weight::from_parts(342_875, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -796,10 +796,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `857 + r * (6 ±0)` // Estimated: `6802 + r * (6 ±0)` - // Minimum execution time: 332_370_000 picoseconds. - Weight::from_parts(347_892_383, 6802) - // Standard Error: 551 - .saturating_add(Weight::from_parts(326_597, 0).saturating_mul(r.into())) + // Minimum execution time: 262_335_000 picoseconds. + Weight::from_parts(287_617_025, 6802) + // Standard Error: 640 + .saturating_add(Weight::from_parts(335_517, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -825,10 +825,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `931 + r * (14 ±0)` // Estimated: `6864 + r * (14 ±0)` - // Minimum execution time: 334_272_000 picoseconds. - Weight::from_parts(356_868_168, 6864) - // Standard Error: 2_385 - .saturating_add(Weight::from_parts(1_446_019, 0).saturating_mul(r.into())) + // Minimum execution time: 261_601_000 picoseconds. + Weight::from_parts(297_921_160, 6864) + // Standard Error: 709 + .saturating_add(Weight::from_parts(1_395_881, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) @@ -852,10 +852,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `859 + r * (6 ±0)` // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 331_916_000 picoseconds. - Weight::from_parts(343_895_372, 6803) - // Standard Error: 484 - .saturating_add(Weight::from_parts(296_685, 0).saturating_mul(r.into())) + // Minimum execution time: 262_649_000 picoseconds. + Weight::from_parts(290_939_064, 6803) + // Standard Error: 485 + .saturating_add(Weight::from_parts(292_776, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -879,10 +879,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `863` // Estimated: `6803` - // Minimum execution time: 338_879_000 picoseconds. - Weight::from_parts(295_207_774, 6803) - // Standard Error: 22 - .saturating_add(Weight::from_parts(1_098, 0).saturating_mul(n.into())) + // Minimum execution time: 266_311_000 picoseconds. + Weight::from_parts(227_393_029, 6803) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_001, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -905,10 +905,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `847 + r * (45 ±0)` // Estimated: `6787 + r * (45 ±0)` - // Minimum execution time: 327_574_000 picoseconds. - Weight::from_parts(338_834_161, 6787) - // Standard Error: 865_283 - .saturating_add(Weight::from_parts(3_500_538, 0).saturating_mul(r.into())) + // Minimum execution time: 252_169_000 picoseconds. + Weight::from_parts(277_261_279, 6787) + // Standard Error: 866_492 + .saturating_add(Weight::from_parts(3_576_720, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -932,10 +932,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `857` // Estimated: `6810` - // Minimum execution time: 334_360_000 picoseconds. - Weight::from_parts(343_561_211, 6810) + // Minimum execution time: 262_708_000 picoseconds. + Weight::from_parts(281_445_792, 6810) // Standard Error: 0 - .saturating_add(Weight::from_parts(448, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(317, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -962,10 +962,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `889 + r * (300 ±0)` // Estimated: `6829 + r * (7725 ±0)` - // Minimum execution time: 331_544_000 picoseconds. - Weight::from_parts(343_944_959, 6829) - // Standard Error: 861_931 - .saturating_add(Weight::from_parts(128_736_840, 0).saturating_mul(r.into())) + // Minimum execution time: 253_501_000 picoseconds. + Weight::from_parts(281_009_204, 6829) + // Standard Error: 898_995 + .saturating_add(Weight::from_parts(130_670_295, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -993,10 +993,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `938 + r * (10 ±0)` // Estimated: `6879 + r * (10 ±0)` - // Minimum execution time: 335_545_000 picoseconds. - Weight::from_parts(362_097_658, 6879) - // Standard Error: 3_732 - .saturating_add(Weight::from_parts(1_954_016, 0).saturating_mul(r.into())) + // Minimum execution time: 257_558_000 picoseconds. + Weight::from_parts(307_805_023, 6879) + // Standard Error: 3_347 + .saturating_add(Weight::from_parts(1_949_048, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -1020,10 +1020,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `857 + r * (10 ±0)` // Estimated: `6802 + r * (10 ±0)` - // Minimum execution time: 334_465_000 picoseconds. - Weight::from_parts(347_040_544, 6802) - // Standard Error: 3_209 - .saturating_add(Weight::from_parts(3_867_402, 0).saturating_mul(r.into())) + // Minimum execution time: 256_797_000 picoseconds. + Weight::from_parts(270_921_209, 6802) + // Standard Error: 3_812 + .saturating_add(Weight::from_parts(3_878_493, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -1048,12 +1048,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `876 + t * (32 ±0)` // Estimated: `6823 + t * (2508 ±0)` - // Minimum execution time: 353_043_000 picoseconds. - Weight::from_parts(350_570_845, 6823) - // Standard Error: 90_604 - .saturating_add(Weight::from_parts(3_376_302, 0).saturating_mul(t.into())) - // Standard Error: 25 - .saturating_add(Weight::from_parts(920, 0).saturating_mul(n.into())) + // Minimum execution time: 278_113_000 picoseconds. + Weight::from_parts(290_794_078, 6823) + // Standard Error: 98_125 + .saturating_add(Weight::from_parts(2_922_975, 0).saturating_mul(t.into())) + // Standard Error: 27 + .saturating_add(Weight::from_parts(751, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1079,10 +1079,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (7 ±0)` // Estimated: `6800 + r * (7 ±0)` - // Minimum execution time: 174_100_000 picoseconds. - Weight::from_parts(185_023_142, 6800) - // Standard Error: 377 - .saturating_add(Weight::from_parts(244_850, 0).saturating_mul(r.into())) + // Minimum execution time: 167_368_000 picoseconds. + Weight::from_parts(176_246_705, 6800) + // Standard Error: 422 + .saturating_add(Weight::from_parts(252_448, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -1106,10 +1106,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `125807` // Estimated: `131749` - // Minimum execution time: 499_963_000 picoseconds. - Weight::from_parts(472_468_910, 131749) - // Standard Error: 13 - .saturating_add(Weight::from_parts(1_151, 0).saturating_mul(i.into())) + // Minimum execution time: 422_586_000 picoseconds. + Weight::from_parts(389_498_139, 131749) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_053, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1120,10 +1120,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `924 + r * (292 ±0)` // Estimated: `922 + r * (293 ±0)` - // Minimum execution time: 334_917_000 picoseconds. - Weight::from_parts(231_957_251, 922) - // Standard Error: 11_080 - .saturating_add(Weight::from_parts(7_071_706, 0).saturating_mul(r.into())) + // Minimum execution time: 267_808_000 picoseconds. + Weight::from_parts(157_918_739, 922) + // Standard Error: 12_993 + .saturating_add(Weight::from_parts(7_089_399, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1137,10 +1137,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1383` // Estimated: `1359` - // Minimum execution time: 351_914_000 picoseconds. - Weight::from_parts(395_438_997, 1359) - // Standard Error: 55 - .saturating_add(Weight::from_parts(935, 0).saturating_mul(n.into())) + // Minimum execution time: 290_308_000 picoseconds. + Weight::from_parts(339_060_470, 1359) + // Standard Error: 61 + .saturating_add(Weight::from_parts(568, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -1151,10 +1151,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1246 + n * (1 ±0)` // Estimated: `1246 + n * (1 ±0)` - // Minimum execution time: 350_334_000 picoseconds. - Weight::from_parts(360_616_821, 1246) - // Standard Error: 32 - .saturating_add(Weight::from_parts(441, 0).saturating_mul(n.into())) + // Minimum execution time: 276_981_000 picoseconds. + Weight::from_parts(301_637_376, 1246) + // Standard Error: 34 + .saturating_add(Weight::from_parts(106, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1166,10 +1166,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `920 + r * (288 ±0)` // Estimated: `924 + r * (289 ±0)` - // Minimum execution time: 337_287_000 picoseconds. - Weight::from_parts(228_593_823, 924) - // Standard Error: 12_420 - .saturating_add(Weight::from_parts(6_871_018, 0).saturating_mul(r.into())) + // Minimum execution time: 259_481_000 picoseconds. + Weight::from_parts(162_863_446, 924) + // Standard Error: 11_347 + .saturating_add(Weight::from_parts(6_928_780, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1183,10 +1183,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1242 + n * (1 ±0)` // Estimated: `1242 + n * (1 ±0)` - // Minimum execution time: 348_450_000 picoseconds. - Weight::from_parts(359_145_658, 1242) - // Standard Error: 31 - .saturating_add(Weight::from_parts(309, 0).saturating_mul(n.into())) + // Minimum execution time: 274_204_000 picoseconds. + Weight::from_parts(298_126_769, 1242) + // Standard Error: 35 + .saturating_add(Weight::from_parts(215, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1198,10 +1198,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `914 + r * (296 ±0)` // Estimated: `919 + r * (297 ±0)` - // Minimum execution time: 337_918_000 picoseconds. - Weight::from_parts(252_634_761, 919) - // Standard Error: 10_301 - .saturating_add(Weight::from_parts(5_658_982, 0).saturating_mul(r.into())) + // Minimum execution time: 265_708_000 picoseconds. + Weight::from_parts(191_697_715, 919) + // Standard Error: 9_503 + .saturating_add(Weight::from_parts(5_693_457, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1214,10 +1214,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1258 + n * (1 ±0)` // Estimated: `1258 + n * (1 ±0)` - // Minimum execution time: 349_865_000 picoseconds. - Weight::from_parts(364_637_455, 1258) - // Standard Error: 43 - .saturating_add(Weight::from_parts(627, 0).saturating_mul(n.into())) + // Minimum execution time: 277_258_000 picoseconds. + Weight::from_parts(300_294_130, 1258) + // Standard Error: 36 + .saturating_add(Weight::from_parts(753, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1229,10 +1229,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `935 + r * (288 ±0)` // Estimated: `936 + r * (289 ±0)` - // Minimum execution time: 334_501_000 picoseconds. - Weight::from_parts(256_737_953, 936) - // Standard Error: 8_494 - .saturating_add(Weight::from_parts(5_452_683, 0).saturating_mul(r.into())) + // Minimum execution time: 260_038_000 picoseconds. + Weight::from_parts(193_284_354, 936) + // Standard Error: 8_271 + .saturating_add(Weight::from_parts(5_480_248, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1245,10 +1245,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1245 + n * (1 ±0)` // Estimated: `1245 + n * (1 ±0)` - // Minimum execution time: 349_107_000 picoseconds. - Weight::from_parts(359_995_568, 1245) - // Standard Error: 30 - .saturating_add(Weight::from_parts(109, 0).saturating_mul(n.into())) + // Minimum execution time: 271_511_000 picoseconds. + Weight::from_parts(295_714_721, 1245) + // Standard Error: 38 + .saturating_add(Weight::from_parts(283, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1260,10 +1260,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `908 + r * (296 ±0)` // Estimated: `915 + r * (297 ±0)` - // Minimum execution time: 333_339_000 picoseconds. - Weight::from_parts(235_980_883, 915) - // Standard Error: 11_633 - .saturating_add(Weight::from_parts(7_018_977, 0).saturating_mul(r.into())) + // Minimum execution time: 261_474_000 picoseconds. + Weight::from_parts(161_423_158, 915) + // Standard Error: 12_304 + .saturating_add(Weight::from_parts(7_110_406, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1277,10 +1277,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1259 + n * (1 ±0)` // Estimated: `1259 + n * (1 ±0)` - // Minimum execution time: 353_005_000 picoseconds. - Weight::from_parts(364_276_314, 1259) - // Standard Error: 30 - .saturating_add(Weight::from_parts(759, 0).saturating_mul(n.into())) + // Minimum execution time: 274_820_000 picoseconds. + Weight::from_parts(300_518_306, 1259) + // Standard Error: 34 + .saturating_add(Weight::from_parts(891, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1304,10 +1304,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1452 + r * (45 ±0)` // Estimated: `7349 + r * (2520 ±0)` - // Minimum execution time: 333_452_000 picoseconds. - Weight::from_parts(142_147_982, 7349) - // Standard Error: 36_619 - .saturating_add(Weight::from_parts(39_660_249, 0).saturating_mul(r.into())) + // Minimum execution time: 267_109_000 picoseconds. + Weight::from_parts(197_399_572, 7349) + // Standard Error: 31_800 + .saturating_add(Weight::from_parts(39_207_406, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -1333,10 +1333,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1296 + r * (276 ±0)` // Estimated: `9481 + r * (2752 ±0)` - // Minimum execution time: 337_964_000 picoseconds. - Weight::from_parts(343_202_000, 9481) - // Standard Error: 105_016 - .saturating_add(Weight::from_parts(309_034_946, 0).saturating_mul(r.into())) + // Minimum execution time: 273_118_000 picoseconds. + Weight::from_parts(279_284_000, 9481) + // Standard Error: 88_418 + .saturating_add(Weight::from_parts(246_962_175, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -1361,11 +1361,11 @@ impl WeightInfo for SubstrateWeight { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (572 ±0)` - // Estimated: `6806 + r * (2633 ±10)` - // Minimum execution time: 333_861_000 picoseconds. - Weight::from_parts(337_550_000, 6806) - // Standard Error: 139_004 - .saturating_add(Weight::from_parts(306_928_468, 0).saturating_mul(r.into())) + // Estimated: `6806 + r * (2633 ±3)` + // Minimum execution time: 264_545_000 picoseconds. + Weight::from_parts(280_351_000, 6806) + // Standard Error: 135_561 + .saturating_add(Weight::from_parts(246_530_299, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1392,12 +1392,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1328 + t * (310 ±0)` // Estimated: `12218 + t * (5260 ±0)` - // Minimum execution time: 538_804_000 picoseconds. - Weight::from_parts(153_868_010, 12218) - // Standard Error: 11_323_037 - .saturating_add(Weight::from_parts(350_086_502, 0).saturating_mul(t.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_099, 0).saturating_mul(c.into())) + // Minimum execution time: 467_592_000 picoseconds. + Weight::from_parts(63_855_768, 12218) + // Standard Error: 12_051_350 + .saturating_add(Weight::from_parts(372_002_021, 0).saturating_mul(t.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_014, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1425,10 +1425,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1383 + r * (251 ±0)` // Estimated: `7207 + r * (5202 ±0)` - // Minimum execution time: 778_214_000 picoseconds. - Weight::from_parts(786_870_000, 7207) - // Standard Error: 332_116 - .saturating_add(Weight::from_parts(457_145_100, 0).saturating_mul(r.into())) + // Minimum execution time: 655_925_000 picoseconds. + Weight::from_parts(662_488_000, 7207) + // Standard Error: 382_818 + .saturating_add(Weight::from_parts(400_950_464, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1458,12 +1458,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1232 + t * (156 ±0)` // Estimated: `9662 + t * (2578 ±2)` - // Minimum execution time: 2_540_848_000 picoseconds. - Weight::from_parts(1_403_859_093, 9662) + // Minimum execution time: 2_337_882_000 picoseconds. + Weight::from_parts(1_324_849_179, 9662) // Standard Error: 18 - .saturating_add(Weight::from_parts(1_194, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_096, 0).saturating_mul(i.into())) // Standard Error: 18 - .saturating_add(Weight::from_parts(1_277, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_217, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) @@ -1489,10 +1489,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (8 ±0)` // Estimated: `6797 + r * (8 ±0)` - // Minimum execution time: 332_530_000 picoseconds. - Weight::from_parts(344_690_108, 6797) - // Standard Error: 475 - .saturating_add(Weight::from_parts(414_505, 0).saturating_mul(r.into())) + // Minimum execution time: 254_134_000 picoseconds. + Weight::from_parts(284_282_035, 6797) + // Standard Error: 558 + .saturating_add(Weight::from_parts(398_156, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1516,10 +1516,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `864` // Estimated: `6804` - // Minimum execution time: 333_818_000 picoseconds. - Weight::from_parts(326_455_409, 6804) + // Minimum execution time: 266_665_000 picoseconds. + Weight::from_parts(268_320_162, 6804) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_190, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_088, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1542,10 +1542,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6800 + r * (8 ±0)` - // Minimum execution time: 332_527_000 picoseconds. - Weight::from_parts(340_624_458, 6800) - // Standard Error: 702 - .saturating_add(Weight::from_parts(830_440, 0).saturating_mul(r.into())) + // Minimum execution time: 261_528_000 picoseconds. + Weight::from_parts(286_263_449, 6800) + // Standard Error: 644 + .saturating_add(Weight::from_parts(809_865, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1569,10 +1569,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6808` - // Minimum execution time: 337_558_000 picoseconds. - Weight::from_parts(345_319_444, 6808) + // Minimum execution time: 273_200_000 picoseconds. + Weight::from_parts(277_647_495, 6808) // Standard Error: 1 - .saturating_add(Weight::from_parts(3_443, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_369, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1595,10 +1595,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6803 + r * (8 ±0)` - // Minimum execution time: 333_576_000 picoseconds. - Weight::from_parts(342_567_918, 6803) - // Standard Error: 517 - .saturating_add(Weight::from_parts(469_999, 0).saturating_mul(r.into())) + // Minimum execution time: 254_622_000 picoseconds. + Weight::from_parts(285_795_625, 6803) + // Standard Error: 659 + .saturating_add(Weight::from_parts(459_946, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1622,10 +1622,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6812` - // Minimum execution time: 333_643_000 picoseconds. - Weight::from_parts(332_234_962, 6812) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_299, 0).saturating_mul(n.into())) + // Minimum execution time: 268_346_000 picoseconds. + Weight::from_parts(272_295_711, 6812) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_205, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1648,10 +1648,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6804 + r * (8 ±0)` - // Minimum execution time: 335_949_000 picoseconds. - Weight::from_parts(339_586_300, 6804) - // Standard Error: 712 - .saturating_add(Weight::from_parts(475_318, 0).saturating_mul(r.into())) + // Minimum execution time: 270_389_000 picoseconds. + Weight::from_parts(282_398_541, 6804) + // Standard Error: 461 + .saturating_add(Weight::from_parts(460_368, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1675,10 +1675,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6806` - // Minimum execution time: 331_102_000 picoseconds. - Weight::from_parts(335_444_569, 6806) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_292, 0).saturating_mul(n.into())) + // Minimum execution time: 263_803_000 picoseconds. + Weight::from_parts(279_347_222, 6806) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_201, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1701,10 +1701,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `991 + n * (1 ±0)` // Estimated: `6928 + n * (1 ±0)` - // Minimum execution time: 399_687_000 picoseconds. - Weight::from_parts(412_562_252, 6928) - // Standard Error: 11 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(n.into())) + // Minimum execution time: 346_143_000 picoseconds. + Weight::from_parts(355_308_434, 6928) + // Standard Error: 14 + .saturating_add(Weight::from_parts(5_879, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1728,10 +1728,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `806 + r * (112 ±0)` // Estimated: `6745 + r * (112 ±0)` - // Minimum execution time: 340_992_000 picoseconds. - Weight::from_parts(385_744_518, 6745) - // Standard Error: 10_987 - .saturating_add(Weight::from_parts(56_047_105, 0).saturating_mul(r.into())) + // Minimum execution time: 257_292_000 picoseconds. + Weight::from_parts(333_450_089, 6745) + // Standard Error: 12_293 + .saturating_add(Weight::from_parts(56_441_219, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -1753,12 +1753,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `900 + r * (76 ±0)` - // Estimated: `6795 + r * (77 ±0)` - // Minimum execution time: 335_366_000 picoseconds. - Weight::from_parts(395_811_523, 6795) - // Standard Error: 14_268 - .saturating_add(Weight::from_parts(46_194_718, 0).saturating_mul(r.into())) + // Measured: `901 + r * (76 ±0)` + // Estimated: `6796 + r * (77 ±0)` + // Minimum execution time: 262_823_000 picoseconds. + Weight::from_parts(344_408_866, 6796) + // Standard Error: 14_763 + .saturating_add(Weight::from_parts(46_172_383, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -1782,10 +1782,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `871 + r * (42 ±0)` // Estimated: `6810 + r * (42 ±0)` - // Minimum execution time: 333_708_000 picoseconds. - Weight::from_parts(375_822_414, 6810) - // Standard Error: 15_535 - .saturating_add(Weight::from_parts(38_534_300, 0).saturating_mul(r.into())) + // Minimum execution time: 262_338_000 picoseconds. + Weight::from_parts(322_263_797, 6810) + // Standard Error: 10_378 + .saturating_add(Weight::from_parts(12_075_676, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -1808,11 +1808,11 @@ impl WeightInfo for SubstrateWeight { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (961 ±0)` - // Estimated: `6801 + r * (3087 ±7)` - // Minimum execution time: 329_668_000 picoseconds. - Weight::from_parts(337_256_000, 6801) - // Standard Error: 64_733 - .saturating_add(Weight::from_parts(25_506_246, 0).saturating_mul(r.into())) + // Estimated: `6801 + r * (3087 ±10)` + // Minimum execution time: 273_715_000 picoseconds. + Weight::from_parts(276_040_000, 6801) + // Standard Error: 58_043 + .saturating_add(Weight::from_parts(25_487_818, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1838,10 +1838,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `852 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 332_021_000 picoseconds. - Weight::from_parts(343_753_442, 6802) - // Standard Error: 406 - .saturating_add(Weight::from_parts(178_908, 0).saturating_mul(r.into())) + // Minimum execution time: 271_210_000 picoseconds. + Weight::from_parts(282_738_966, 6802) + // Standard Error: 383 + .saturating_add(Weight::from_parts(181_168, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1865,10 +1865,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `2092 + r * (39 ±0)` // Estimated: `7919 + r * (40 ±0)` - // Minimum execution time: 334_122_000 picoseconds. - Weight::from_parts(410_992_486, 7919) - // Standard Error: 1_583 - .saturating_add(Weight::from_parts(316_027, 0).saturating_mul(r.into())) + // Minimum execution time: 275_373_000 picoseconds. + Weight::from_parts(364_892_503, 7919) + // Standard Error: 2_028 + .saturating_add(Weight::from_parts(312_770, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -1894,10 +1894,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `855 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 331_093_000 picoseconds. - Weight::from_parts(345_663_437, 6802) - // Standard Error: 374 - .saturating_add(Weight::from_parts(157_207, 0).saturating_mul(r.into())) + // Minimum execution time: 257_957_000 picoseconds. + Weight::from_parts(285_689_724, 6802) + // Standard Error: 407 + .saturating_add(Weight::from_parts(156_613, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1907,10 +1907,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_483_000 picoseconds. - Weight::from_parts(1_672_465, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(10_591, 0).saturating_mul(r.into())) + // Minimum execution time: 1_484_000 picoseconds. + Weight::from_parts(1_594_192, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(10_548, 0).saturating_mul(r.into())) } } @@ -1922,8 +1922,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_546_000 picoseconds. - Weight::from_parts(2_671_000, 1627) + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_691_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -1933,10 +1933,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `451 + k * (69 ±0)` // Estimated: `441 + k * (70 ±0)` - // Minimum execution time: 13_398_000 picoseconds. - Weight::from_parts(13_771_000, 441) - // Standard Error: 1_033 - .saturating_add(Weight::from_parts(1_231_963, 0).saturating_mul(k.into())) + // Minimum execution time: 13_477_000 picoseconds. + Weight::from_parts(13_900_000, 441) + // Standard Error: 1_073 + .saturating_add(Weight::from_parts(1_252_072, 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)) @@ -1950,10 +1950,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 8_335_000 picoseconds. - Weight::from_parts(9_172_574, 6149) + // Minimum execution time: 8_545_000 picoseconds. + Weight::from_parts(8_702_062, 6149) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_388, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_314, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -1966,8 +1966,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `510` // Estimated: `6450` - // Minimum execution time: 17_087_000 picoseconds. - Weight::from_parts(17_840_000, 6450) + // Minimum execution time: 17_228_000 picoseconds. + Weight::from_parts(18_232_000, 6450) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1980,10 +1980,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 4_016_000 picoseconds. - Weight::from_parts(655_916, 3635) - // Standard Error: 1_202 - .saturating_add(Weight::from_parts(1_158_002, 0).saturating_mul(k.into())) + // Minimum execution time: 3_945_000 picoseconds. + Weight::from_parts(3_627_456, 3635) + // Standard Error: 933 + .saturating_add(Weight::from_parts(1_186_234, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -2002,10 +2002,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 17_500_000 picoseconds. - Weight::from_parts(17_675_710, 6263) - // Standard Error: 0 - .saturating_add(Weight::from_parts(488, 0).saturating_mul(c.into())) + // Minimum execution time: 17_716_000 picoseconds. + Weight::from_parts(17_740_527, 6263) + // Standard Error: 1 + .saturating_add(Weight::from_parts(407, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2016,8 +2016,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 3_278_000 picoseconds. - Weight::from_parts(3_501_000, 1627) + // Minimum execution time: 3_372_000 picoseconds. + Weight::from_parts(3_579_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2029,8 +2029,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 12_489_000 picoseconds. - Weight::from_parts(12_850_000, 3631) + // Minimum execution time: 12_787_000 picoseconds. + Weight::from_parts(13_172_000, 3631) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -2040,8 +2040,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_788_000 picoseconds. - Weight::from_parts(5_099_000, 3607) + // Minimum execution time: 4_638_000 picoseconds. + Weight::from_parts(5_026_000, 3607) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -2052,8 +2052,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 6_850_000 picoseconds. - Weight::from_parts(7_146_000, 3632) + // Minimum execution time: 6_505_000 picoseconds. + Weight::from_parts(7_000_000, 3632) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -2064,8 +2064,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 7_078_000 picoseconds. - Weight::from_parts(7_452_000, 3607) + // Minimum execution time: 7_240_000 picoseconds. + Weight::from_parts(7_596_000, 3607) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -2088,10 +2088,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `786` // Estimated: `6735 + c * (1 ±0)` - // Minimum execution time: 366_103_000 picoseconds. - Weight::from_parts(335_256_535, 6735) - // Standard Error: 81 - .saturating_add(Weight::from_parts(38_395, 0).saturating_mul(c.into())) + // Minimum execution time: 300_870_000 picoseconds. + Weight::from_parts(264_705_665, 6735) + // Standard Error: 80 + .saturating_add(Weight::from_parts(37_998, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2100,6 +2100,8 @@ impl WeightInfo for () { /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) /// Storage: Contracts CodeInfoOf (r:1 w:1) /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) + /// Storage: System EventTopics (r:3 w:3) + /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// Storage: Contracts Nonce (r:1 w:1) /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2108,8 +2110,6 @@ impl WeightInfo for () { /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) /// Storage: System Account (r:2 w:2) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// Storage: Contracts PristineCode (r:0 w:1) /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) /// The range of component `c` is `[0, 125952]`. @@ -2119,14 +2119,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `303` // Estimated: `8745` - // Minimum execution time: 4_289_681_000 picoseconds. - Weight::from_parts(331_057_751, 8745) - // Standard Error: 206 - .saturating_add(Weight::from_parts(76_366, 0).saturating_mul(c.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(1_938, 0).saturating_mul(i.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(2_026, 0).saturating_mul(s.into())) + // Minimum execution time: 4_327_624_000 picoseconds. + Weight::from_parts(301_214_781, 8745) + // Standard Error: 256 + .saturating_add(Weight::from_parts(113_888, 0).saturating_mul(c.into())) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_982, 0).saturating_mul(i.into())) + // Standard Error: 30 + .saturating_add(Weight::from_parts(1_978, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } @@ -2152,12 +2152,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `523` // Estimated: `6513` - // Minimum execution time: 2_122_622_000 picoseconds. - Weight::from_parts(348_487_014, 6513) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_944, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_816, 0).saturating_mul(s.into())) + // Minimum execution time: 2_034_124_000 picoseconds. + Weight::from_parts(316_084_273, 6513) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_833, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_764, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -2179,8 +2179,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `820` // Estimated: `6760` - // Minimum execution time: 209_114_000 picoseconds. - Weight::from_parts(216_139_000, 6760) + // Minimum execution time: 203_976_000 picoseconds. + Weight::from_parts(211_752_000, 6760) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2197,10 +2197,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 323_131_000 picoseconds. - Weight::from_parts(331_460_802, 3607) - // Standard Error: 104 - .saturating_add(Weight::from_parts(73_534, 0).saturating_mul(c.into())) + // Minimum execution time: 257_618_000 picoseconds. + Weight::from_parts(238_902_229, 3607) + // Standard Error: 109 + .saturating_add(Weight::from_parts(75_649, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2216,8 +2216,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 34_960_000 picoseconds. - Weight::from_parts(36_057_000, 3720) + // Minimum execution time: 35_213_000 picoseconds. + Weight::from_parts(36_573_000, 3720) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2233,8 +2233,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `575` // Estimated: `8990` - // Minimum execution time: 37_375_000 picoseconds. - Weight::from_parts(38_310_000, 8990) + // Minimum execution time: 38_203_000 picoseconds. + Weight::from_parts(39_195_000, 8990) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2257,10 +2257,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `860 + r * (6 ±0)` // Estimated: `6801 + r * (6 ±0)` - // Minimum execution time: 332_418_000 picoseconds. - Weight::from_parts(344_417_681, 6801) - // Standard Error: 840 - .saturating_add(Weight::from_parts(349_564, 0).saturating_mul(r.into())) + // Minimum execution time: 255_632_000 picoseconds. + Weight::from_parts(290_369_859, 6801) + // Standard Error: 631 + .saturating_add(Weight::from_parts(354_164, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2284,10 +2284,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `918 + r * (240 ±0)` // Estimated: `6822 + r * (2715 ±0)` - // Minimum execution time: 336_949_000 picoseconds. - Weight::from_parts(172_018_300, 6822) - // Standard Error: 6_859 - .saturating_add(Weight::from_parts(3_732_788, 0).saturating_mul(r.into())) + // Minimum execution time: 266_150_000 picoseconds. + Weight::from_parts(92_451_392, 6822) + // Standard Error: 7_407 + .saturating_add(Weight::from_parts(3_790_855, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2312,10 +2312,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `910 + r * (244 ±0)` // Estimated: `6826 + r * (2719 ±0)` - // Minimum execution time: 331_580_000 picoseconds. - Weight::from_parts(166_444_295, 6826) - // Standard Error: 6_323 - .saturating_add(Weight::from_parts(4_651_680, 0).saturating_mul(r.into())) + // Minimum execution time: 265_546_000 picoseconds. + Weight::from_parts(105_931_939, 6826) + // Standard Error: 6_595 + .saturating_add(Weight::from_parts(4_658_614, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2340,10 +2340,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `867 + r * (6 ±0)` // Estimated: `6809 + r * (6 ±0)` - // Minimum execution time: 332_922_000 picoseconds. - Weight::from_parts(347_945_106, 6809) - // Standard Error: 503 - .saturating_add(Weight::from_parts(420_506, 0).saturating_mul(r.into())) + // Minimum execution time: 264_617_000 picoseconds. + Weight::from_parts(288_134_988, 6809) + // Standard Error: 544 + .saturating_add(Weight::from_parts(427_340, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2367,10 +2367,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `857 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 331_926_000 picoseconds. - Weight::from_parts(342_482_786, 6802) - // Standard Error: 382 - .saturating_add(Weight::from_parts(185_631, 0).saturating_mul(r.into())) + // Minimum execution time: 261_863_000 picoseconds. + Weight::from_parts(281_898_313, 6802) + // Standard Error: 361 + .saturating_add(Weight::from_parts(188_642, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -2392,10 +2392,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `747 + r * (3 ±0)` // Estimated: `6687 + r * (3 ±0)` - // Minimum execution time: 317_584_000 picoseconds. - Weight::from_parts(335_305_634, 6687) - // Standard Error: 413 - .saturating_add(Weight::from_parts(160_105, 0).saturating_mul(r.into())) + // Minimum execution time: 259_567_000 picoseconds. + Weight::from_parts(270_588_132, 6687) + // Standard Error: 347 + .saturating_add(Weight::from_parts(166_640, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -2419,10 +2419,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `861 + r * (6 ±0)` // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 329_683_000 picoseconds. - Weight::from_parts(350_664_785, 6803) - // Standard Error: 1_164 - .saturating_add(Weight::from_parts(342_540, 0).saturating_mul(r.into())) + // Minimum execution time: 267_068_000 picoseconds. + Weight::from_parts(286_387_558, 6803) + // Standard Error: 505 + .saturating_add(Weight::from_parts(340_789, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2446,10 +2446,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `857 + r * (6 ±0)` // Estimated: `6798 + r * (6 ±0)` - // Minimum execution time: 337_992_000 picoseconds. - Weight::from_parts(349_845_008, 6798) - // Standard Error: 2_273 - .saturating_add(Weight::from_parts(544_647, 0).saturating_mul(r.into())) + // Minimum execution time: 264_198_000 picoseconds. + Weight::from_parts(285_684_642, 6798) + // Standard Error: 928 + .saturating_add(Weight::from_parts(560_650, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2473,10 +2473,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1001 + r * (6 ±0)` // Estimated: `6925 + r * (6 ±0)` - // Minimum execution time: 333_494_000 picoseconds. - Weight::from_parts(346_208_587, 6925) - // Standard Error: 2_719 - .saturating_add(Weight::from_parts(1_609_679, 0).saturating_mul(r.into())) + // Minimum execution time: 273_226_000 picoseconds. + Weight::from_parts(283_185_921, 6925) + // Standard Error: 1_386 + .saturating_add(Weight::from_parts(1_603_171, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2500,10 +2500,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `871 + r * (6 ±0)` // Estimated: `6820 + r * (6 ±0)` - // Minimum execution time: 333_877_000 picoseconds. - Weight::from_parts(345_594_741, 6820) - // Standard Error: 645 - .saturating_add(Weight::from_parts(338_480, 0).saturating_mul(r.into())) + // Minimum execution time: 266_334_000 picoseconds. + Weight::from_parts(285_010_823, 6820) + // Standard Error: 574 + .saturating_add(Weight::from_parts(340_403, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2527,10 +2527,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `869 + r * (6 ±0)` // Estimated: `6818 + r * (6 ±0)` - // Minimum execution time: 332_219_000 picoseconds. - Weight::from_parts(344_126_186, 6818) - // Standard Error: 511 - .saturating_add(Weight::from_parts(338_886, 0).saturating_mul(r.into())) + // Minimum execution time: 257_368_000 picoseconds. + Weight::from_parts(289_195_499, 6818) + // Standard Error: 647 + .saturating_add(Weight::from_parts(336_915, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2554,10 +2554,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `866 + r * (6 ±0)` // Estimated: `6816 + r * (6 ±0)` - // Minimum execution time: 335_740_000 picoseconds. - Weight::from_parts(347_465_239, 6816) - // Standard Error: 821 - .saturating_add(Weight::from_parts(332_457, 0).saturating_mul(r.into())) + // Minimum execution time: 274_331_000 picoseconds. + Weight::from_parts(283_636_376, 6816) + // Standard Error: 699 + .saturating_add(Weight::from_parts(342_875, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2581,10 +2581,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `857 + r * (6 ±0)` // Estimated: `6802 + r * (6 ±0)` - // Minimum execution time: 332_370_000 picoseconds. - Weight::from_parts(347_892_383, 6802) - // Standard Error: 551 - .saturating_add(Weight::from_parts(326_597, 0).saturating_mul(r.into())) + // Minimum execution time: 262_335_000 picoseconds. + Weight::from_parts(287_617_025, 6802) + // Standard Error: 640 + .saturating_add(Weight::from_parts(335_517, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2610,10 +2610,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `931 + r * (14 ±0)` // Estimated: `6864 + r * (14 ±0)` - // Minimum execution time: 334_272_000 picoseconds. - Weight::from_parts(356_868_168, 6864) - // Standard Error: 2_385 - .saturating_add(Weight::from_parts(1_446_019, 0).saturating_mul(r.into())) + // Minimum execution time: 261_601_000 picoseconds. + Weight::from_parts(297_921_160, 6864) + // Standard Error: 709 + .saturating_add(Weight::from_parts(1_395_881, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) @@ -2637,10 +2637,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `859 + r * (6 ±0)` // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 331_916_000 picoseconds. - Weight::from_parts(343_895_372, 6803) - // Standard Error: 484 - .saturating_add(Weight::from_parts(296_685, 0).saturating_mul(r.into())) + // Minimum execution time: 262_649_000 picoseconds. + Weight::from_parts(290_939_064, 6803) + // Standard Error: 485 + .saturating_add(Weight::from_parts(292_776, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2664,10 +2664,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `863` // Estimated: `6803` - // Minimum execution time: 338_879_000 picoseconds. - Weight::from_parts(295_207_774, 6803) - // Standard Error: 22 - .saturating_add(Weight::from_parts(1_098, 0).saturating_mul(n.into())) + // Minimum execution time: 266_311_000 picoseconds. + Weight::from_parts(227_393_029, 6803) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_001, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2690,10 +2690,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `847 + r * (45 ±0)` // Estimated: `6787 + r * (45 ±0)` - // Minimum execution time: 327_574_000 picoseconds. - Weight::from_parts(338_834_161, 6787) - // Standard Error: 865_283 - .saturating_add(Weight::from_parts(3_500_538, 0).saturating_mul(r.into())) + // Minimum execution time: 252_169_000 picoseconds. + Weight::from_parts(277_261_279, 6787) + // Standard Error: 866_492 + .saturating_add(Weight::from_parts(3_576_720, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -2717,10 +2717,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `857` // Estimated: `6810` - // Minimum execution time: 334_360_000 picoseconds. - Weight::from_parts(343_561_211, 6810) + // Minimum execution time: 262_708_000 picoseconds. + Weight::from_parts(281_445_792, 6810) // Standard Error: 0 - .saturating_add(Weight::from_parts(448, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(317, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2747,10 +2747,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `889 + r * (300 ±0)` // Estimated: `6829 + r * (7725 ±0)` - // Minimum execution time: 331_544_000 picoseconds. - Weight::from_parts(343_944_959, 6829) - // Standard Error: 861_931 - .saturating_add(Weight::from_parts(128_736_840, 0).saturating_mul(r.into())) + // Minimum execution time: 253_501_000 picoseconds. + Weight::from_parts(281_009_204, 6829) + // Standard Error: 898_995 + .saturating_add(Weight::from_parts(130_670_295, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2778,10 +2778,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `938 + r * (10 ±0)` // Estimated: `6879 + r * (10 ±0)` - // Minimum execution time: 335_545_000 picoseconds. - Weight::from_parts(362_097_658, 6879) - // Standard Error: 3_732 - .saturating_add(Weight::from_parts(1_954_016, 0).saturating_mul(r.into())) + // Minimum execution time: 257_558_000 picoseconds. + Weight::from_parts(307_805_023, 6879) + // Standard Error: 3_347 + .saturating_add(Weight::from_parts(1_949_048, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -2805,10 +2805,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `857 + r * (10 ±0)` // Estimated: `6802 + r * (10 ±0)` - // Minimum execution time: 334_465_000 picoseconds. - Weight::from_parts(347_040_544, 6802) - // Standard Error: 3_209 - .saturating_add(Weight::from_parts(3_867_402, 0).saturating_mul(r.into())) + // Minimum execution time: 256_797_000 picoseconds. + Weight::from_parts(270_921_209, 6802) + // Standard Error: 3_812 + .saturating_add(Weight::from_parts(3_878_493, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -2833,12 +2833,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `876 + t * (32 ±0)` // Estimated: `6823 + t * (2508 ±0)` - // Minimum execution time: 353_043_000 picoseconds. - Weight::from_parts(350_570_845, 6823) - // Standard Error: 90_604 - .saturating_add(Weight::from_parts(3_376_302, 0).saturating_mul(t.into())) - // Standard Error: 25 - .saturating_add(Weight::from_parts(920, 0).saturating_mul(n.into())) + // Minimum execution time: 278_113_000 picoseconds. + Weight::from_parts(290_794_078, 6823) + // Standard Error: 98_125 + .saturating_add(Weight::from_parts(2_922_975, 0).saturating_mul(t.into())) + // Standard Error: 27 + .saturating_add(Weight::from_parts(751, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2864,10 +2864,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (7 ±0)` // Estimated: `6800 + r * (7 ±0)` - // Minimum execution time: 174_100_000 picoseconds. - Weight::from_parts(185_023_142, 6800) - // Standard Error: 377 - .saturating_add(Weight::from_parts(244_850, 0).saturating_mul(r.into())) + // Minimum execution time: 167_368_000 picoseconds. + Weight::from_parts(176_246_705, 6800) + // Standard Error: 422 + .saturating_add(Weight::from_parts(252_448, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -2891,10 +2891,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `125807` // Estimated: `131749` - // Minimum execution time: 499_963_000 picoseconds. - Weight::from_parts(472_468_910, 131749) - // Standard Error: 13 - .saturating_add(Weight::from_parts(1_151, 0).saturating_mul(i.into())) + // Minimum execution time: 422_586_000 picoseconds. + Weight::from_parts(389_498_139, 131749) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_053, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2905,10 +2905,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `924 + r * (292 ±0)` // Estimated: `922 + r * (293 ±0)` - // Minimum execution time: 334_917_000 picoseconds. - Weight::from_parts(231_957_251, 922) - // Standard Error: 11_080 - .saturating_add(Weight::from_parts(7_071_706, 0).saturating_mul(r.into())) + // Minimum execution time: 267_808_000 picoseconds. + Weight::from_parts(157_918_739, 922) + // Standard Error: 12_993 + .saturating_add(Weight::from_parts(7_089_399, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2922,10 +2922,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1383` // Estimated: `1359` - // Minimum execution time: 351_914_000 picoseconds. - Weight::from_parts(395_438_997, 1359) - // Standard Error: 55 - .saturating_add(Weight::from_parts(935, 0).saturating_mul(n.into())) + // Minimum execution time: 290_308_000 picoseconds. + Weight::from_parts(339_060_470, 1359) + // Standard Error: 61 + .saturating_add(Weight::from_parts(568, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2936,10 +2936,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1246 + n * (1 ±0)` // Estimated: `1246 + n * (1 ±0)` - // Minimum execution time: 350_334_000 picoseconds. - Weight::from_parts(360_616_821, 1246) - // Standard Error: 32 - .saturating_add(Weight::from_parts(441, 0).saturating_mul(n.into())) + // Minimum execution time: 276_981_000 picoseconds. + Weight::from_parts(301_637_376, 1246) + // Standard Error: 34 + .saturating_add(Weight::from_parts(106, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -2951,10 +2951,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `920 + r * (288 ±0)` // Estimated: `924 + r * (289 ±0)` - // Minimum execution time: 337_287_000 picoseconds. - Weight::from_parts(228_593_823, 924) - // Standard Error: 12_420 - .saturating_add(Weight::from_parts(6_871_018, 0).saturating_mul(r.into())) + // Minimum execution time: 259_481_000 picoseconds. + Weight::from_parts(162_863_446, 924) + // Standard Error: 11_347 + .saturating_add(Weight::from_parts(6_928_780, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2968,10 +2968,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1242 + n * (1 ±0)` // Estimated: `1242 + n * (1 ±0)` - // Minimum execution time: 348_450_000 picoseconds. - Weight::from_parts(359_145_658, 1242) - // Standard Error: 31 - .saturating_add(Weight::from_parts(309, 0).saturating_mul(n.into())) + // Minimum execution time: 274_204_000 picoseconds. + Weight::from_parts(298_126_769, 1242) + // Standard Error: 35 + .saturating_add(Weight::from_parts(215, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -2983,10 +2983,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `914 + r * (296 ±0)` // Estimated: `919 + r * (297 ±0)` - // Minimum execution time: 337_918_000 picoseconds. - Weight::from_parts(252_634_761, 919) - // Standard Error: 10_301 - .saturating_add(Weight::from_parts(5_658_982, 0).saturating_mul(r.into())) + // Minimum execution time: 265_708_000 picoseconds. + Weight::from_parts(191_697_715, 919) + // Standard Error: 9_503 + .saturating_add(Weight::from_parts(5_693_457, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2999,10 +2999,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1258 + n * (1 ±0)` // Estimated: `1258 + n * (1 ±0)` - // Minimum execution time: 349_865_000 picoseconds. - Weight::from_parts(364_637_455, 1258) - // Standard Error: 43 - .saturating_add(Weight::from_parts(627, 0).saturating_mul(n.into())) + // Minimum execution time: 277_258_000 picoseconds. + Weight::from_parts(300_294_130, 1258) + // Standard Error: 36 + .saturating_add(Weight::from_parts(753, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3014,10 +3014,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `935 + r * (288 ±0)` // Estimated: `936 + r * (289 ±0)` - // Minimum execution time: 334_501_000 picoseconds. - Weight::from_parts(256_737_953, 936) - // Standard Error: 8_494 - .saturating_add(Weight::from_parts(5_452_683, 0).saturating_mul(r.into())) + // Minimum execution time: 260_038_000 picoseconds. + Weight::from_parts(193_284_354, 936) + // Standard Error: 8_271 + .saturating_add(Weight::from_parts(5_480_248, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3030,10 +3030,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1245 + n * (1 ±0)` // Estimated: `1245 + n * (1 ±0)` - // Minimum execution time: 349_107_000 picoseconds. - Weight::from_parts(359_995_568, 1245) - // Standard Error: 30 - .saturating_add(Weight::from_parts(109, 0).saturating_mul(n.into())) + // Minimum execution time: 271_511_000 picoseconds. + Weight::from_parts(295_714_721, 1245) + // Standard Error: 38 + .saturating_add(Weight::from_parts(283, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3045,10 +3045,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `908 + r * (296 ±0)` // Estimated: `915 + r * (297 ±0)` - // Minimum execution time: 333_339_000 picoseconds. - Weight::from_parts(235_980_883, 915) - // Standard Error: 11_633 - .saturating_add(Weight::from_parts(7_018_977, 0).saturating_mul(r.into())) + // Minimum execution time: 261_474_000 picoseconds. + Weight::from_parts(161_423_158, 915) + // Standard Error: 12_304 + .saturating_add(Weight::from_parts(7_110_406, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3062,10 +3062,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1259 + n * (1 ±0)` // Estimated: `1259 + n * (1 ±0)` - // Minimum execution time: 353_005_000 picoseconds. - Weight::from_parts(364_276_314, 1259) - // Standard Error: 30 - .saturating_add(Weight::from_parts(759, 0).saturating_mul(n.into())) + // Minimum execution time: 274_820_000 picoseconds. + Weight::from_parts(300_518_306, 1259) + // Standard Error: 34 + .saturating_add(Weight::from_parts(891, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3089,10 +3089,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1452 + r * (45 ±0)` // Estimated: `7349 + r * (2520 ±0)` - // Minimum execution time: 333_452_000 picoseconds. - Weight::from_parts(142_147_982, 7349) - // Standard Error: 36_619 - .saturating_add(Weight::from_parts(39_660_249, 0).saturating_mul(r.into())) + // Minimum execution time: 267_109_000 picoseconds. + Weight::from_parts(197_399_572, 7349) + // Standard Error: 31_800 + .saturating_add(Weight::from_parts(39_207_406, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) @@ -3118,10 +3118,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1296 + r * (276 ±0)` // Estimated: `9481 + r * (2752 ±0)` - // Minimum execution time: 337_964_000 picoseconds. - Weight::from_parts(343_202_000, 9481) - // Standard Error: 105_016 - .saturating_add(Weight::from_parts(309_034_946, 0).saturating_mul(r.into())) + // Minimum execution time: 273_118_000 picoseconds. + Weight::from_parts(279_284_000, 9481) + // Standard Error: 88_418 + .saturating_add(Weight::from_parts(246_962_175, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) @@ -3146,11 +3146,11 @@ impl WeightInfo for () { fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (572 ±0)` - // Estimated: `6806 + r * (2633 ±10)` - // Minimum execution time: 333_861_000 picoseconds. - Weight::from_parts(337_550_000, 6806) - // Standard Error: 139_004 - .saturating_add(Weight::from_parts(306_928_468, 0).saturating_mul(r.into())) + // Estimated: `6806 + r * (2633 ±3)` + // Minimum execution time: 264_545_000 picoseconds. + Weight::from_parts(280_351_000, 6806) + // Standard Error: 135_561 + .saturating_add(Weight::from_parts(246_530_299, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3177,12 +3177,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1328 + t * (310 ±0)` // Estimated: `12218 + t * (5260 ±0)` - // Minimum execution time: 538_804_000 picoseconds. - Weight::from_parts(153_868_010, 12218) - // Standard Error: 11_323_037 - .saturating_add(Weight::from_parts(350_086_502, 0).saturating_mul(t.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_099, 0).saturating_mul(c.into())) + // Minimum execution time: 467_592_000 picoseconds. + Weight::from_parts(63_855_768, 12218) + // Standard Error: 12_051_350 + .saturating_add(Weight::from_parts(372_002_021, 0).saturating_mul(t.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_014, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -3210,10 +3210,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1383 + r * (251 ±0)` // Estimated: `7207 + r * (5202 ±0)` - // Minimum execution time: 778_214_000 picoseconds. - Weight::from_parts(786_870_000, 7207) - // Standard Error: 332_116 - .saturating_add(Weight::from_parts(457_145_100, 0).saturating_mul(r.into())) + // Minimum execution time: 655_925_000 picoseconds. + Weight::from_parts(662_488_000, 7207) + // Standard Error: 382_818 + .saturating_add(Weight::from_parts(400_950_464, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -3243,12 +3243,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1232 + t * (156 ±0)` // Estimated: `9662 + t * (2578 ±2)` - // Minimum execution time: 2_540_848_000 picoseconds. - Weight::from_parts(1_403_859_093, 9662) + // Minimum execution time: 2_337_882_000 picoseconds. + Weight::from_parts(1_324_849_179, 9662) // Standard Error: 18 - .saturating_add(Weight::from_parts(1_194, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_096, 0).saturating_mul(i.into())) // Standard Error: 18 - .saturating_add(Weight::from_parts(1_277, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(1_217, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(15_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) @@ -3274,10 +3274,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (8 ±0)` // Estimated: `6797 + r * (8 ±0)` - // Minimum execution time: 332_530_000 picoseconds. - Weight::from_parts(344_690_108, 6797) - // Standard Error: 475 - .saturating_add(Weight::from_parts(414_505, 0).saturating_mul(r.into())) + // Minimum execution time: 254_134_000 picoseconds. + Weight::from_parts(284_282_035, 6797) + // Standard Error: 558 + .saturating_add(Weight::from_parts(398_156, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3301,10 +3301,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `864` // Estimated: `6804` - // Minimum execution time: 333_818_000 picoseconds. - Weight::from_parts(326_455_409, 6804) + // Minimum execution time: 266_665_000 picoseconds. + Weight::from_parts(268_320_162, 6804) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_190, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_088, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3327,10 +3327,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6800 + r * (8 ±0)` - // Minimum execution time: 332_527_000 picoseconds. - Weight::from_parts(340_624_458, 6800) - // Standard Error: 702 - .saturating_add(Weight::from_parts(830_440, 0).saturating_mul(r.into())) + // Minimum execution time: 261_528_000 picoseconds. + Weight::from_parts(286_263_449, 6800) + // Standard Error: 644 + .saturating_add(Weight::from_parts(809_865, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3354,10 +3354,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6808` - // Minimum execution time: 337_558_000 picoseconds. - Weight::from_parts(345_319_444, 6808) + // Minimum execution time: 273_200_000 picoseconds. + Weight::from_parts(277_647_495, 6808) // Standard Error: 1 - .saturating_add(Weight::from_parts(3_443, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_369, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3380,10 +3380,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6803 + r * (8 ±0)` - // Minimum execution time: 333_576_000 picoseconds. - Weight::from_parts(342_567_918, 6803) - // Standard Error: 517 - .saturating_add(Weight::from_parts(469_999, 0).saturating_mul(r.into())) + // Minimum execution time: 254_622_000 picoseconds. + Weight::from_parts(285_795_625, 6803) + // Standard Error: 659 + .saturating_add(Weight::from_parts(459_946, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3407,10 +3407,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6812` - // Minimum execution time: 333_643_000 picoseconds. - Weight::from_parts(332_234_962, 6812) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_299, 0).saturating_mul(n.into())) + // Minimum execution time: 268_346_000 picoseconds. + Weight::from_parts(272_295_711, 6812) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_205, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3433,10 +3433,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `858 + r * (8 ±0)` // Estimated: `6804 + r * (8 ±0)` - // Minimum execution time: 335_949_000 picoseconds. - Weight::from_parts(339_586_300, 6804) - // Standard Error: 712 - .saturating_add(Weight::from_parts(475_318, 0).saturating_mul(r.into())) + // Minimum execution time: 270_389_000 picoseconds. + Weight::from_parts(282_398_541, 6804) + // Standard Error: 461 + .saturating_add(Weight::from_parts(460_368, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3460,10 +3460,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `866` // Estimated: `6806` - // Minimum execution time: 331_102_000 picoseconds. - Weight::from_parts(335_444_569, 6806) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_292, 0).saturating_mul(n.into())) + // Minimum execution time: 263_803_000 picoseconds. + Weight::from_parts(279_347_222, 6806) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_201, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3486,10 +3486,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `991 + n * (1 ±0)` // Estimated: `6928 + n * (1 ±0)` - // Minimum execution time: 399_687_000 picoseconds. - Weight::from_parts(412_562_252, 6928) - // Standard Error: 11 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(n.into())) + // Minimum execution time: 346_143_000 picoseconds. + Weight::from_parts(355_308_434, 6928) + // Standard Error: 14 + .saturating_add(Weight::from_parts(5_879, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3513,10 +3513,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `806 + r * (112 ±0)` // Estimated: `6745 + r * (112 ±0)` - // Minimum execution time: 340_992_000 picoseconds. - Weight::from_parts(385_744_518, 6745) - // Standard Error: 10_987 - .saturating_add(Weight::from_parts(56_047_105, 0).saturating_mul(r.into())) + // Minimum execution time: 257_292_000 picoseconds. + Weight::from_parts(333_450_089, 6745) + // Standard Error: 12_293 + .saturating_add(Weight::from_parts(56_441_219, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -3538,12 +3538,12 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `900 + r * (76 ±0)` - // Estimated: `6795 + r * (77 ±0)` - // Minimum execution time: 335_366_000 picoseconds. - Weight::from_parts(395_811_523, 6795) - // Standard Error: 14_268 - .saturating_add(Weight::from_parts(46_194_718, 0).saturating_mul(r.into())) + // Measured: `901 + r * (76 ±0)` + // Estimated: `6796 + r * (77 ±0)` + // Minimum execution time: 262_823_000 picoseconds. + Weight::from_parts(344_408_866, 6796) + // Standard Error: 14_763 + .saturating_add(Weight::from_parts(46_172_383, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -3567,10 +3567,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `871 + r * (42 ±0)` // Estimated: `6810 + r * (42 ±0)` - // Minimum execution time: 333_708_000 picoseconds. - Weight::from_parts(375_822_414, 6810) - // Standard Error: 15_535 - .saturating_add(Weight::from_parts(38_534_300, 0).saturating_mul(r.into())) + // Minimum execution time: 262_338_000 picoseconds. + Weight::from_parts(322_263_797, 6810) + // Standard Error: 10_378 + .saturating_add(Weight::from_parts(12_075_676, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -3593,11 +3593,11 @@ impl WeightInfo for () { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (961 ±0)` - // Estimated: `6801 + r * (3087 ±7)` - // Minimum execution time: 329_668_000 picoseconds. - Weight::from_parts(337_256_000, 6801) - // Standard Error: 64_733 - .saturating_add(Weight::from_parts(25_506_246, 0).saturating_mul(r.into())) + // Estimated: `6801 + r * (3087 ±10)` + // Minimum execution time: 273_715_000 picoseconds. + Weight::from_parts(276_040_000, 6801) + // Standard Error: 58_043 + .saturating_add(Weight::from_parts(25_487_818, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3623,10 +3623,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `852 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 332_021_000 picoseconds. - Weight::from_parts(343_753_442, 6802) - // Standard Error: 406 - .saturating_add(Weight::from_parts(178_908, 0).saturating_mul(r.into())) + // Minimum execution time: 271_210_000 picoseconds. + Weight::from_parts(282_738_966, 6802) + // Standard Error: 383 + .saturating_add(Weight::from_parts(181_168, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3650,10 +3650,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `2092 + r * (39 ±0)` // Estimated: `7919 + r * (40 ±0)` - // Minimum execution time: 334_122_000 picoseconds. - Weight::from_parts(410_992_486, 7919) - // Standard Error: 1_583 - .saturating_add(Weight::from_parts(316_027, 0).saturating_mul(r.into())) + // Minimum execution time: 275_373_000 picoseconds. + Weight::from_parts(364_892_503, 7919) + // Standard Error: 2_028 + .saturating_add(Weight::from_parts(312_770, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -3679,10 +3679,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `855 + r * (3 ±0)` // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 331_093_000 picoseconds. - Weight::from_parts(345_663_437, 6802) - // Standard Error: 374 - .saturating_add(Weight::from_parts(157_207, 0).saturating_mul(r.into())) + // Minimum execution time: 257_957_000 picoseconds. + Weight::from_parts(285_689_724, 6802) + // Standard Error: 407 + .saturating_add(Weight::from_parts(156_613, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3692,9 +3692,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_483_000 picoseconds. - Weight::from_parts(1_672_465, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(10_591, 0).saturating_mul(r.into())) + // Minimum execution time: 1_484_000 picoseconds. + Weight::from_parts(1_594_192, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(10_548, 0).saturating_mul(r.into())) } } From e8ceb0d89c7de65d2c210cf56099b4b086d02fc4 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Thu, 6 Jul 2023 09:00:14 +0200 Subject: [PATCH 21/70] Update frame/contracts/src/lib.rs Co-authored-by: Sasha Gryaznov --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 55e1fd2a4a676..343705860eab8 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1469,7 +1469,7 @@ impl Pallet { Ok(CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }) } - /// Upload new code and returns the wasm blob and deposit amount collected. + /// Uploads new code and returns the Wasm blob and collect the deposit amount. fn try_upload_code( origin: T::AccountId, code: Vec, From 9eb783369bb60b50922289ba5113b77d2968d7fe Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Thu, 6 Jul 2023 09:00:32 +0200 Subject: [PATCH 22/70] Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov --- frame/contracts/src/wasm/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 7d76f33a5be4e..2a67ba2d69d4f 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -225,7 +225,7 @@ impl WasmBlob { Ok((store, memory, instance)) } - /// Put the module blob into storage, and returns the deposit collected for the storage. + /// Puts the module blob into storage, and returns the deposit collected for the storage. pub fn store_code(&mut self) -> Result, Error> { let code_hash = *self.code_hash(); >::mutate(code_hash, |stored_code_info| { From 96e3dcf9a77fa33c253c2bd1a77dba161361cc89 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Thu, 6 Jul 2023 09:00:45 +0200 Subject: [PATCH 23/70] Update frame/contracts/src/wasm/mod.rs Co-authored-by: Sasha Gryaznov --- frame/contracts/src/wasm/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 2a67ba2d69d4f..51ce03c3f5bab 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -234,7 +234,7 @@ impl WasmBlob { Some(_) => Ok(Default::default()), // Upload a new contract code. // We need to store the code and its code_info, and collect the deposit. - // This `None` case happens only in freshly uploaded modules. This means that + // This `None` case happens only with freshly uploaded modules. This means that // the `owner` is always the origin of the current transaction. None => { let deposit = self.code_info.deposit; From a9df0cc0a2dd4a385ed8c0fff167f11d699ab7ce Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 6 Jul 2023 10:31:57 +0200 Subject: [PATCH 24/70] PR review, rm duplicate increment_refcount --- frame/contracts/src/lib.rs | 2 +- frame/contracts/src/wasm/mod.rs | 24 ++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 343705860eab8..bd14f52c4dd32 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1469,7 +1469,7 @@ impl Pallet { Ok(CodeUploadReturnValue { code_hash: *module.code_hash(), deposit }) } - /// Uploads new code and returns the Wasm blob and collect the deposit amount. + /// Uploads new code and returns the Wasm blob and deposit amount collected. fn try_upload_code( origin: T::AccountId, code: Vec, diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 51ce03c3f5bab..a4421d6435dde 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -250,26 +250,6 @@ impl WasmBlob { }) } - /// Increments the reference count of the in-storage `WasmBlob`. - fn increment_refcount(&mut self) -> DispatchResult { - let code_hash = *self.code_hash(); - >::mutate(code_hash, |stored_code_info| match stored_code_info { - Some(stored_code_info) => { - stored_code_info.refcount = stored_code_info.refcount.checked_add(1).expect( - " - refcount is 64bit. Generating this overflow would require to store - _at least_ 18 exabyte of data assuming that a contract consumes only - one byte of data. Any node would run out of storage space before hitting - this overflow; - qed - ", - ); - Ok(()) - }, - None => Err(>::CodeNotFound.into()), - }) - } - /// Try to remove code together with all associated information. fn try_remove_code(origin: &T::AccountId, code_hash: CodeHash) -> DispatchResult { >::try_mutate_exists(&code_hash, |existing| { @@ -362,7 +342,7 @@ impl Executable for WasmBlob { } fn execute>( - mut self, + self, ext: &mut E, function: &ExportedFunction, input_data: Vec, @@ -411,7 +391,7 @@ impl Executable for WasmBlob { })?; if let &ExportedFunction::Constructor = function { - self.increment_refcount()?; + WasmBlob::::increment_refcount(self.code_hash)?; } let result = exported_func.call(&mut store, &[], &mut []); From b291902bbb241d52a0c5ebed4eb3c57b4ea1ad89 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 6 Jul 2023 11:06:31 +0200 Subject: [PATCH 25/70] PR review --- frame/contracts/src/lib.rs | 9 ++++++--- frame/contracts/src/wasm/mod.rs | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index bd14f52c4dd32..4be01fd7d3917 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -698,7 +698,7 @@ pub mod pallet { let origin = ensure_signed(origin)?; let code_len = code.len() as u32; - let (module, deposit) = Self::try_upload_code( + let (module, upload_deposit) = Self::try_upload_code( origin.clone(), code, storage_deposit_limit.clone().map(Into::into), @@ -706,6 +706,10 @@ pub mod pallet { None, )?; + // Reduces the storage deposit limit by the amount that was reserved for the upload. + let storage_deposit_limit = storage_deposit_limit + .map(|limit| limit.into().saturating_sub(upload_deposit)); + let data_len = data.len() as u32; let salt_len = salt.len() as u32; let common = CommonInput { @@ -713,8 +717,7 @@ pub mod pallet { value, data, gas_limit, - storage_deposit_limit: storage_deposit_limit - .map(|limit| limit.into().saturating_sub(deposit)), + storage_deposit_limit, debug_message: None, }; diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index a4421d6435dde..56c95840b63e4 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -144,9 +144,6 @@ impl Token for CodeLoadToken { impl WasmBlob { /// Create the module by checking the `code`. - /// - /// This does **not** store the module. For this one need to either call [`Self::store`] - /// or [`::execute`][`Executable::execute`]. pub fn from_code( code: Vec, schedule: &Schedule, From bc2057d20c347662ceba4721830da81be0852e9c Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Thu, 6 Jul 2023 11:14:56 +0200 Subject: [PATCH 26/70] Update frame/contracts/src/wasm/prepare.rs Co-authored-by: Sasha Gryaznov --- frame/contracts/src/wasm/prepare.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index 2c6104e072beb..ee89aae642b4a 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -245,7 +245,8 @@ where // // - It doesn't use any unknown imports. // - It doesn't explode the wasmi bytecode generation. - // We don't actually ever run any code so we can get away with a minimal stack which + // + // We don't actually ever execute this instance so we can get away with a minimal stack which // reduces the amount of memory that needs to be zeroed. let stack_limits = StackLimits::new(1, 1, 0).expect("initial <= max; qed"); WasmBlob::::instantiate::( From bbf2c5beed63fa9a6665bc0bdc34a34da6a9c300 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 6 Jul 2023 14:00:47 +0200 Subject: [PATCH 27/70] Add test for failing storage_deposit --- frame/contracts/src/lib.rs | 4 ++-- frame/contracts/src/tests.rs | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 4be01fd7d3917..d36a0f93f339b 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -707,8 +707,8 @@ pub mod pallet { )?; // Reduces the storage deposit limit by the amount that was reserved for the upload. - let storage_deposit_limit = storage_deposit_limit - .map(|limit| limit.into().saturating_sub(upload_deposit)); + let storage_deposit_limit = + storage_deposit_limit.map(|limit| limit.into().saturating_sub(upload_deposit)); let data_len = data.len() as u32; let salt_len = salt.len() as u32; diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 4f8de4db2ce57..f67be602695d6 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -4587,11 +4587,29 @@ fn set_code_hash() { #[test] fn storage_deposit_limit_is_enforced() { + let ed = 200; let (wasm, _code_hash) = compile_module::("store_call").unwrap(); - ExtBuilder::default().existential_deposit(200).build().execute_with(|| { + ExtBuilder::default().existential_deposit(ed).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); let min_balance = ::Currency::minimum_balance(); + // Setting insufficient storage_deposit should fail. + assert_err!( + Contracts::bare_instantiate( + ALICE, + 0, + GAS_LIMIT, + Some((2 * ed + 3 - 1).into()), // expected deposit is 2 * ed + 3 for the call + Code::Upload(wasm.clone()), + vec![], + vec![], + DebugInfo::Skip, + CollectEvents::Skip, + ) + .result, + >::StorageDepositLimitExhausted, + ); + // Instantiate the BOB contract. let addr = Contracts::bare_instantiate( ALICE, From dff47589269dc006487d0d08dc7656a66732a335 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Thu, 6 Jul 2023 14:01:13 +0200 Subject: [PATCH 28/70] fix lint --- frame/contracts/src/migration/v11.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/migration/v11.rs b/frame/contracts/src/migration/v11.rs index 67740cfaf6c80..8123d73aee560 100644 --- a/frame/contracts/src/migration/v11.rs +++ b/frame/contracts/src/migration/v11.rs @@ -80,7 +80,9 @@ impl MigrationStep for Migration { } fn step(&mut self) -> (IsFinished, Weight) { - let Some(old_queue) = old::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; + let Some(old_queue) = old::DeletionQueue::::take() else { + return (IsFinished::Yes, Weight::zero()) + }; let len = old_queue.len(); log::debug!( From 5873b6f4bad39d92f7a744d77f7ab67c8a767e8d Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 3 Jul 2023 21:22:26 +0200 Subject: [PATCH 29/70] wip --- frame/contracts/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index d36a0f93f339b..8e7ca054f6696 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -730,8 +730,8 @@ pub mod pallet { } output.gas_meter.into_dispatch_result( - output.result.map(|(_address, result)| result), - T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), + output.result.map(|(_address, output)| output), + T::WeightInfo::instantiate(data_len, salt_len), ) } From 679bb883b1c96be7ec663d0a6102cf4db29f0075 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 10:02:32 +0200 Subject: [PATCH 30/70] Delegate update take 2 --- bin/node/runtime/src/lib.rs | 3 + .../add_remove_delegate_dependency.wat | 118 ++++++++ frame/contracts/src/benchmarking/mod.rs | 140 +++++++++- frame/contracts/src/exec.rs | 97 ++++++- frame/contracts/src/lib.rs | 21 ++ frame/contracts/src/migration/v13.rs | 135 +++++++++ frame/contracts/src/schedule.rs | 8 + frame/contracts/src/storage.rs | 82 +++++- frame/contracts/src/storage/meter.rs | 34 ++- frame/contracts/src/tests.rs | 260 +++++++++++++++++- frame/contracts/src/wasm/mod.rs | 63 ++++- frame/contracts/src/wasm/runtime.rs | 30 ++ frame/contracts/src/weights.rs | 10 + 13 files changed, 963 insertions(+), 38 deletions(-) create mode 100644 frame/contracts/fixtures/add_remove_delegate_dependency.wat create mode 100644 frame/contracts/src/migration/v13.rs diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index e1434f0504bd3..4bee81310caca 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -1223,6 +1223,7 @@ parameter_types! { pub const DepositPerByte: Balance = deposit(0, 1); pub const DefaultDepositLimit: Balance = deposit(1024, 1024 * 1024); pub Schedule: pallet_contracts::Schedule = Default::default(); + pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30); } impl pallet_contracts::Config for Runtime { @@ -1255,6 +1256,8 @@ impl pallet_contracts::Config for Runtime { type Migrations = (); #[cfg(feature = "runtime-benchmarks")] type Migrations = (NoopMigration<1>, NoopMigration<2>); + type MaxDelegateDependencies = ConstU32<32>; + type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; } impl pallet_sudo::Config for Runtime { diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat new file mode 100644 index 0000000000000..d3938d507880c --- /dev/null +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -0,0 +1,118 @@ +;; This contract tests the behavior of adding / removing delegate_dependencies when delegate calling into a contract. +(module + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) + (import "seal0" "seal_input" (func $seal_input (param i32 i32))) + (import "seal0" "seal_terminate" (func $seal_terminate (param i32 i32))) + (import "seal0" "seal_delegate_call" (func $seal_delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) + (import "env" "memory" (memory 1 1)) + + ;; [100, 132) Address of Alice + (data (i32.const 100) + "\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01" + "\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01" + ) + + (func $assert (param i32) + (block $ok + (br_if $ok + (get_local 0) + ) + (unreachable) + ) + ) + + ;; This function loads input data and performs the action specified. + ;; The first 4 bytes of the input specify the action to perform. + ;; The next 32 bytes specify the code hash to use when calling add_delegate_dependency or remove_delegate_dependency. + ;; Actions are: + ;; 1: call add_delegate_dependency + ;; 2: call remove_delegate_dependency. + ;; 3: call terminate. + ;; Any other value is a no-op. + (func $load_input + (local $action i32) + (local $code_hash_ptr i32) + + ;; Store available input size at offset 0. + (i32.store (i32.const 0) (i32.const 512)) + + ;; Read input data. + (call $seal_input (i32.const 4) (i32.const 0)) + + ;; Input data layout. + ;; [0..4) - size of the call + ;; [4..8) - action to perform + ;; [8..42) - code hash of the callee + (set_local $action (i32.load (i32.const 4))) + (set_local $code_hash_ptr (i32.const 8)) + + ;; Assert input size == 36 (4 for action + 32 for code_hash). + (call $assert + (i32.eq + (i32.load (i32.const 0)) + (i32.const 36) + ) + ) + + ;; Call add_delegate_dependency when action == 1. + (if (i32.eq (get_local $action) (i32.const 1)) + (then + (call $assert (i32.eqz + (call $add_delegate_dependency + (get_local $code_hash_ptr) + ) + )) + ) + (else) + ) + + ;; Call remove_delegate_dependency when action == 2. + (if (i32.eq (get_local $action) (i32.const 2)) + (then + (call $assert (i32.eqz + (call $remove_delegate_dependency + (get_local $code_hash_ptr) + ) + )) + ) + (else) + ) + + ;; Call terminate when action == 3. + (if (i32.eq (get_local $action) (i32.const 3)) + (then + (call $seal_terminate + (i32.const 100) ;; Pointer to beneficiary address + (i32.const 32) ;; Length of beneficiary address + ) + (unreachable) ;; seal_terminate never returns + ) + (else) + ) + ) + + (func (export "deploy") + (call $load_input) + ) + + (func (export "call") + (call $load_input) + + ;; Delegate call into passed code hash. + (call $assert + (i32.eq + (call $seal_delegate_call + (i32.const 0) ;; Set no call flags. + (i32.const 8) ;; Pointer to "callee" code_hash. + (i32.const 0) ;; Input is ignored. + (i32.const 0) ;; Length of the input. + (i32.const 4294967295) ;; u32 max sentinel value: do not copy output. + (i32.const 0) ;; Length is ignored in this case. + ) + (i32.const 0) + ) + ) + ) + +) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 11683456f0a14..d7a8fde3888d8 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -257,6 +257,19 @@ benchmarks! { m.step(); } + // This benchmarks the v13 migration step. + #[pov_mode = Measured] + v13_migration_step { + let contract = >::with_caller( + whitelisted_caller(), WasmModule::dummy(), vec![], + )?; + + v13::store_old_contrat_info::(contract.account_id.clone(), contract.info()?); + let mut m = v13::Migration::::default(); + }: { + m.step(); + } + // This benchmarks the weight of executing Migration::migrate to execute a noop migration. #[pov_mode = Measured] migration_noop { @@ -832,20 +845,49 @@ benchmarks! { let beneficiary = account::("beneficiary", 0, 0); let beneficiary_bytes = beneficiary.encode(); let beneficiary_len = beneficiary_bytes.len(); + + // Maximize the delegate_dependencies to account for the worst-case scenario. + let code_hashes = (0..T::MaxDelegateDependencies::get()) + .map(|i| { + let new_code = WasmModule::::dummy_with_bytes(65 + i); + Contracts::::store_code_raw(new_code.code, whitelisted_caller())?; + Ok(new_code.hash) + }) + .collect::, &'static str>>()?; + let code_hash_len = code_hashes.get(0).map(|x| x.encode().len()).unwrap_or(0); + let code_hashes_bytes = code_hashes.iter().flat_map(|x| x.encode()).collect::>(); + let code = WasmModule::::from(ModuleDefinition { memory: Some(ImportedMemory::max::()), - imported_functions: vec![ImportedFunction { - module: "seal0", - name: "seal_terminate", - params: vec![ValueType::I32, ValueType::I32], - return_type: None, - }], + imported_functions: vec![ + ImportedFunction { + module: "seal0", + name: "seal_terminate", + params: vec![ValueType::I32, ValueType::I32], + return_type: None, + }, + ImportedFunction { + module: "seal0", + name: "add_delegate_dependency", + params: vec![ValueType::I32], + return_type: Some(ValueType::I32), + } + ], data_segments: vec![ DataSegment { offset: 0, value: beneficiary_bytes, }, + DataSegment { + offset: beneficiary_len as u32, + value: code_hashes_bytes, + }, ], + deploy_body: Some(body::repeated_dyn(r, vec![ + Counter(beneficiary_len as u32, code_hash_len as u32), // code_hash_ptr + Regular(Instruction::Call(1)), + Regular(Instruction::Drop), + ])), call_body: Some(body::repeated(r, &[ Instruction::I32Const(0), // beneficiary_ptr Instruction::I32Const(beneficiary_len as i32), // beneficiary_len @@ -2327,6 +2369,92 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[pov_mode = Measured] + add_delegate_dependency { + let r in 0 .. T::MaxDelegateDependencies::get(); + let code_hashes = (0..r) + .map(|i| { + let new_code = WasmModule::::dummy_with_bytes(65 + i); + Contracts::::store_code_raw(new_code.code, whitelisted_caller())?; + Ok(new_code.hash) + }) + .collect::, &'static str>>()?; + let code_hash_len = code_hashes.get(0).map(|x| x.encode().len()).unwrap_or(0); + let code_hashes_bytes = code_hashes.iter().flat_map(|x| x.encode()).collect::>(); + + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "seal0", + name: "add_delegate_dependency", + params: vec![ValueType::I32], + return_type: Some(ValueType::I32), + }], + data_segments: vec![ + DataSegment { + offset: 0, + value: code_hashes_bytes, + }, + ], + call_body: Some(body::repeated_dyn(r, vec![ + Counter(0, code_hash_len as u32), // code_hash_ptr + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let origin = RawOrigin::Signed(instance.caller.clone()); + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + + remove_delegate_dependency { + let r in 0 .. T::MaxDelegateDependencies::get(); + let code_hashes = (0..r) + .map(|i| { + let new_code = WasmModule::::dummy_with_bytes(65 + i); + Contracts::::store_code_raw(new_code.code, whitelisted_caller())?; + Ok(new_code.hash) + }) + .collect::, &'static str>>()?; + + let code_hash_len = code_hashes.get(0).map(|x| x.encode().len()).unwrap_or(0); + let code_hashes_bytes = code_hashes.iter().flat_map(|x| x.encode()).collect::>(); + + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "seal0", + name: "remove_delegate_dependency", + params: vec![ValueType::I32], + return_type: Some(ValueType::I32), + }, ImportedFunction { + module: "seal0", + name: "add_delegate_dependency", + params: vec![ValueType::I32], + return_type: Some(ValueType::I32), + }], + data_segments: vec![ + DataSegment { + offset: 0, + value: code_hashes_bytes, + }, + ], + deploy_body: Some(body::repeated_dyn(r, vec![ + Counter(0, code_hash_len as u32), // code_hash_ptr + Regular(Instruction::Call(1)), + Regular(Instruction::Drop), + ])), + call_body: Some(body::repeated_dyn(r, vec![ + Counter(0, code_hash_len as u32), // code_hash_ptr + Regular(Instruction::Call(0)), + Regular(Instruction::Drop), + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let origin = RawOrigin::Signed(instance.caller.clone()); + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[pov_mode = Measured] seal_reentrance_count { let r in 0 .. API_BENCHMARK_RUNS; diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 2bf3f44717c27..3dbcbbb69da4c 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -18,14 +18,16 @@ use crate::{ gas::GasMeter, storage::{self, DepositAccount, WriteOutcome}, - BalanceOf, CodeHash, Config, ContractInfo, ContractInfoOf, DebugBufferVec, Determinism, Error, - Event, Nonce, Origin, Pallet as Contracts, Schedule, System, LOG_TARGET, + BalanceOf, CodeHash, CodeInfoOf, Config, ContractInfo, ContractInfoOf, DebugBufferVec, + Determinism, Error, Event, Nonce, Origin, Pallet as Contracts, Schedule, System, WasmBlob, + LOG_TARGET, }; use frame_support::{ crypto::ecdsa::ECDSAExt, dispatch::{ fmt::Debug, DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable, }, + ensure, storage::{with_transaction, TransactionOutcome}, traits::{ tokens::{Fortitude::Polite, Preservation::Expendable}, @@ -35,11 +37,12 @@ use frame_support::{ Blake2_128Concat, BoundedVec, StorageHasher, }; use frame_system::RawOrigin; -use pallet_contracts_primitives::ExecReturnValue; +use pallet_contracts_primitives::{ExecReturnValue, StorageDeposit}; use smallvec::{Array, SmallVec}; use sp_core::{ ecdsa::Public as ECDSAPublic, sr25519::{Public as SR25519Public, Signature as SR25519Signature}, + Get, }; use sp_io::{crypto::secp256k1_ecdsa_recover_compressed, hashing::blake2_256}; use sp_runtime::traits::{Convert, Hash, Zero}; @@ -309,6 +312,30 @@ pub trait Ext: sealing::Sealed { /// Returns a nonce that is incremented for every instantiated contract. fn nonce(&mut self) -> u64; + + /// Add a delegate dependency to `delegate_dependencies`. + /// + /// This ensure that the delegated contract is not removed while it is still in use. This will + /// increase the reference count of the code hash, and charge a fraction (see + /// `CodeHashLockupDepositPercent`) of the code deposit. + /// + /// Returns an error if we have reached the maximum number of delegate_dependencies, or the + /// delegate_dependency already exists. + fn add_delegate_dependency( + &mut self, + code_hash: CodeHash, + ) -> Result<(), DispatchError>; + + /// Remove a delegate dependency from `delegate_dependencies`. + /// + /// This is the counterpart of `add_delegate_dependency`. This method will decrease the + /// reference count And refund the deposit that was charged by `add_delegate_dependency`. + /// + /// Returns an error if the dependency does not exist. + fn remove_delegate_dependency( + &mut self, + code_hash: &CodeHash, + ) -> Result<(), DispatchError>; } /// Describes the different functions that can be exported by an [`Executable`]. @@ -1260,6 +1287,14 @@ where info.queue_trie_for_deletion(); ContractInfoOf::::remove(&frame.account_id); E::decrement_refcount(info.code_hash); + + for (code_hash, deposit) in info.delegate_dependencies() { + E::decrement_refcount(*code_hash); + frame + .nested_storage + .charge_deposit(info.deposit_account().clone(), StorageDeposit::Refund(*deposit)); + } + Contracts::::deposit_event( vec![T::Hashing::hash_of(&frame.account_id), T::Hashing::hash_of(&beneficiary)], Event::Terminated { @@ -1434,10 +1469,27 @@ where if !E::from_storage(hash, &mut frame.nested_gas)?.is_deterministic() { return Err(>::Indeterministic.into()) } + + let info = frame.contract_info(); + + let prev_hash = info.code_hash; + info.code_hash = hash; + + let code_info = CodeInfoOf::::get(hash).ok_or(Error::::CodeNotFound)?; + + let old_base_deposit = info.storage_base_deposit(); + let new_base_deposit = info.update_base_deposit(code_info.deposit()); + let deposit = if new_base_deposit > old_base_deposit { + StorageDeposit::Charge(new_base_deposit - old_base_deposit) + } else { + StorageDeposit::Refund(old_base_deposit - new_base_deposit) + }; + + let deposit_account = info.deposit_account().clone(); + frame.nested_storage.charge_deposit(deposit_account, deposit); + E::increment_refcount(hash)?; - let prev_hash = frame.contract_info().code_hash; E::decrement_refcount(prev_hash); - frame.contract_info().code_hash = hash; Contracts::::deposit_event( vec![T::Hashing::hash_of(&frame.account_id), hash, prev_hash], Event::ContractCodeUpdated { @@ -1469,6 +1521,41 @@ where current } } + + fn add_delegate_dependency( + &mut self, + code_hash: CodeHash, + ) -> Result<(), DispatchError> { + let frame = self.top_frame_mut(); + let info = frame.contract_info.get(&frame.account_id); + ensure!(code_hash != info.code_hash, Error::::CannotAddSelfAsDelegateDependency); + + let code_info = CodeInfoOf::::get(code_hash).ok_or(Error::::CodeNotFound)?; + let deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(code_info.deposit()); + + info.add_delegate_dependency(code_hash, deposit)?; + >::increment_refcount(code_hash)?; + frame + .nested_storage + .charge_deposit(info.deposit_account().clone(), StorageDeposit::Charge(deposit)); + Ok(()) + } + + fn remove_delegate_dependency( + &mut self, + code_hash: &CodeHash, + ) -> Result<(), DispatchError> { + let frame = self.top_frame_mut(); + let info = frame.contract_info.get(&frame.account_id); + + let deposit = info.remove_delegate_dependency(code_hash)?; + >::decrement_refcount(*code_hash); + + frame + .nested_storage + .charge_deposit(info.deposit_account().clone(), StorageDeposit::Refund(deposit)); + Ok(()) + } } mod sealing { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 8e7ca054f6696..387bf44540bb5 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -183,6 +183,7 @@ pub mod pallet { use super::*; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use sp_runtime::Perbill; /// The current storage version. #[cfg(not(any(test, feature = "runtime-benchmarks")))] @@ -290,6 +291,13 @@ pub mod pallet { #[pallet::constant] type DepositPerItem: Get>; + /// The percentage of the storage deposit that should be held for using a code hash. + /// Instantiating a contract, or calling `add_delegate_dependency` (for contract delegation) + /// protects the code from being removed, In order to prevent abuse these actions are + /// protected with a percentage of the code deposit. + #[pallet::constant] + type CodeHashLockupDepositPercent: Get; + /// The address generator used to generate the addresses of contracts. type AddressGenerator: AddressGenerator; @@ -305,6 +313,11 @@ pub mod pallet { #[pallet::constant] type MaxStorageKeyLen: Get; + /// The maximum number of delegate_dependencies that a contract can lock with + /// `add_delegate_dependency`. + #[pallet::constant] + type MaxDelegateDependencies: Get; + /// Make contract callable functions marked as `#[unstable]` available. /// /// Contracts that use `#[unstable]` functions won't be able to be uploaded unless @@ -961,6 +974,14 @@ pub mod pallet { MigrationInProgress, /// Migrate dispatch call was attempted but no migration was performed. NoMigrationPerformed, + /// The contract has reached its maximum number of delegate dependencies. + MaxDelegateDependenciesReached, + /// The dependency was not found in the contract's delegate dependencies. + DelegateDependencyNotFound, + /// The contract already depends on the given delegate dependency. + DelegateDependencyAlreadyExists, + /// Can not add a delegate dependency to the code hash of the contract itself. + CannotAddSelfAsDelegateDependency, } /// A mapping from a contract's code hash to its code. diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs new file mode 100644 index 0000000000000..c77b1db0729c7 --- /dev/null +++ b/frame/contracts/src/migration/v13.rs @@ -0,0 +1,135 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Add `delegate_dependencies` to `ContractInfo`. +//! See . + +use crate::{ + migration::{IsFinished, Migrate}, + storage::DepositAccount, + weights::WeightInfo, + BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET, +}; +use codec::{Decode, Encode}; +use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound, IterableStorageMap}; +use sp_runtime::BoundedBTreeMap; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; +use sp_std::{marker::PhantomData, prelude::*}; + +mod old { + use crate::storage::DepositAccount; + + use super::*; + + #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] + #[scale_info(skip_type_params(T))] + pub struct ContractInfo { + pub trie_id: TrieId, + pub deposit_account: DepositAccount, + pub code_hash: CodeHash, + pub storage_bytes: u32, + pub storage_items: u32, + pub storage_byte_deposit: BalanceOf, + pub storage_item_deposit: BalanceOf, + pub storage_base_deposit: BalanceOf, + } + + #[storage_alias] + pub type ContractInfoOf = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + ContractInfo, + >; +} + +#[cfg(feature = "runtime-benchmarks")] +pub fn store_old_contrat_info(account: T::AccountId, info: crate::ContractInfo) { + let info = old::ContractInfo { + trie_id: info.trie_id.clone(), + deposit_account: info.deposit_account().clone(), + code_hash: info.code_hash, + storage_bytes: Default::default(), + storage_items: Default::default(), + storage_byte_deposit: Default::default(), + storage_item_deposit: Default::default(), + storage_base_deposit: Default::default(), + }; + old::ContractInfoOf::::insert(account, info); +} + +#[storage_alias] +pub type ContractInfoOf = + StorageMap, Twox64Concat, ::AccountId, ContractInfo>; + +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[scale_info(skip_type_params(T))] +pub struct ContractInfo { + pub trie_id: TrieId, + pub deposit_account: DepositAccount, + pub code_hash: CodeHash, + pub storage_bytes: u32, + pub storage_items: u32, + pub storage_byte_deposit: BalanceOf, + pub storage_item_deposit: BalanceOf, + pub storage_base_deposit: BalanceOf, + pub delegate_dependencies: + BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies>, +} + +#[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] +pub struct Migration { + last_key: Option>>, + _phantom: PhantomData, +} + +impl Migrate for Migration { + const VERSION: u16 = 12; + + fn max_step_weight() -> Weight { + T::WeightInfo::v10_migration_step() + } + + fn step(&mut self) -> (IsFinished, Weight) { + let last_key = self.last_key.take().map(|k| k.into()); + + log::debug!(target: LOG_TARGET, "Migrating contract code {:?}", last_key); + self.last_key = + ContractInfoOf::::translate_next(last_key, |_key, old: old::ContractInfo| { + Some(ContractInfo { + trie_id: old.trie_id, + deposit_account: old.deposit_account, + code_hash: old.code_hash, + storage_bytes: old.storage_bytes, + storage_items: old.storage_items, + storage_byte_deposit: old.storage_byte_deposit, + storage_item_deposit: old.storage_item_deposit, + storage_base_deposit: old.storage_base_deposit, + delegate_dependencies: Default::default(), + }) + }) + .and_then(|key| key.try_into().ok()); + + if self.last_key.is_some() { + (IsFinished::No, T::WeightInfo::v12_migration_step()) + } else { + log::debug!(target: LOG_TARGET, "No more contracts code to migrate"); + (IsFinished::Yes, T::WeightInfo::v12_migration_step()) + } + } +} diff --git a/frame/contracts/src/schedule.rs b/frame/contracts/src/schedule.rs index 1e906a99061ae..5ca18af026a4c 100644 --- a/frame/contracts/src/schedule.rs +++ b/frame/contracts/src/schedule.rs @@ -329,6 +329,12 @@ pub struct HostFnWeights { /// Weight of calling `instantiation_nonce`. pub instantiation_nonce: Weight, + /// Weight of calling `add_delegate_dependency`. + pub add_delegate_dependency: Weight, + + /// Weight of calling `remove_delegate_dependency`. + pub remove_delegate_dependency: Weight, + /// The type parameter is used in the default implementation. #[codec(skip)] pub _phantom: PhantomData, @@ -476,6 +482,8 @@ impl Default for HostFnWeights { reentrance_count: cost!(seal_reentrance_count), account_reentrance_count: cost!(seal_account_reentrance_count), instantiation_nonce: cost!(seal_instantiation_nonce), + add_delegate_dependency: cost!(add_delegate_dependency), + remove_delegate_dependency: cost!(remove_delegate_dependency), _phantom: PhantomData, } } diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 769caef0736fe..7a2a670375d79 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -30,19 +30,22 @@ use frame_support::{ dispatch::DispatchError, storage::child::{self, ChildInfo}, weights::Weight, - DefaultNoBound, RuntimeDebugNoBound, + CloneNoBound, DefaultNoBound, RuntimeDebugNoBound, }; use scale_info::TypeInfo; +use sp_core::Get; use sp_io::KillStorageResult; use sp_runtime::{ traits::{Hash, Saturating, Zero}, - RuntimeDebug, + BoundedBTreeMap, DispatchResult, RuntimeDebug, }; use sp_std::{marker::PhantomData, ops::Deref, prelude::*}; +use self::meter::Diff; + /// Information for managing an account and its sub trie abstraction. /// This is the required info to cache for an account. -#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { /// Unique ID for the subtree encoded as a bytes vector. @@ -66,6 +69,12 @@ pub struct ContractInfo { /// We need to store this information separately so it is not used when calculating any refunds /// since the base deposit can only ever be refunded on contract termination. storage_base_deposit: BalanceOf, + /// Map of code hashes and deposit balances. + /// + /// A Code hash of a delegate contracts dependencies added to the map can not be removed from + /// the chain state and can be safely used for delegate calls. The deposit is the deposit held + /// for adding the dependency, it is refunded on removal. + delegate_dependencies: BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies>, } impl ContractInfo { @@ -101,6 +110,7 @@ impl ContractInfo { storage_byte_deposit: Zero::zero(), storage_item_deposit: Zero::zero(), storage_base_deposit: Zero::zero(), + delegate_dependencies: Default::default(), }; Ok(contract) @@ -123,11 +133,16 @@ impl ContractInfo { .saturating_sub(Pallet::::min_balance()) } - /// Return the account that storage deposits should be deposited into. + /// Returns the account that storage deposits should be deposited into. pub fn deposit_account(&self) -> &DepositAccount { &self.deposit_account } + /// Returns the storage base deposit of the contract. + pub fn storage_base_deposit(&self) -> BalanceOf { + self.storage_base_deposit + } + /// Reads a storage kv pair of a contract. /// /// The read is performed from the `trie_id` only. The `address` is not necessary. If the @@ -201,6 +216,65 @@ impl ContractInfo { }) } + /// Set and returns the contract base deposit. + /// `upload_deposit` is the balance of the deposit paid for uploading the contract. + pub fn update_base_deposit(&mut self, upload_deposit: BalanceOf) -> BalanceOf { + let ed = Pallet::::min_balance(); + let info_deposit = + Diff { bytes_added: self.encoded_size() as u32, items_added: 1, ..Default::default() } + .update_contract::(None) + .charge_or_zero(); + + // Instantiating the contract, prevent it to be deleted, therefore the base deposit includes + // a fraction (`T::CodeHashLockupDepositPercent`) of the original storage deposit to prevent + // abuse. + let upload_deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(upload_deposit); + + // Instantiate needs to transfer at least the minimum balance in order to pull the + // deposit account into existence. + // We also add another `ed` here which goes to the contract's own account into existence. + let deposit = info_deposit.saturating_add(upload_deposit).max(ed).saturating_add(ed); + + self.storage_base_deposit = deposit; + deposit + } + + /// Add a new delegate dependency to the contract. + /// The `amount` is the amount of funds that will be reserved for the dependency. + /// + /// Returns an error if the maximum number of delegate_dependencies is reached or if + /// the delegate dependency already exists. + pub fn add_delegate_dependency( + &mut self, + code_hash: CodeHash, + amount: BalanceOf, + ) -> DispatchResult { + self.delegate_dependencies + .try_insert(code_hash, amount) + .map_err(|_| Error::::MaxDelegateDependenciesReached)? + .map_or(Ok(()), |_| Err(Error::::DelegateDependencyAlreadyExists)) + .map_err(Into::into) + } + + /// Remove a delegate dependency from the contract. + /// + /// Returns an error if the entry doesn't exist. + pub fn remove_delegate_dependency( + &mut self, + code_hash: &CodeHash, + ) -> Result, DispatchError> { + self.delegate_dependencies + .remove(code_hash) + .ok_or(Error::::DelegateDependencyNotFound.into()) + } + + /// Returns the delegate_dependencies of the contract. + pub fn delegate_dependencies( + &self, + ) -> &BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies> { + &self.delegate_dependencies + } + /// Push a contract's trie to the deletion queue for lazy removal. /// /// You must make sure that the contract is also removed when queuing the trie for deletion. diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index e5caa68a88482..4e3e255ac870c 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -19,9 +19,10 @@ use crate::{ storage::{ContractInfo, DepositAccount}, - BalanceOf, Config, Error, Inspect, Origin, Pallet, System, + BalanceOf, CodeInfoOf, Config, Error, Inspect, Origin, Pallet, StorageDeposit as Deposit, + System, }; -use codec::Encode; + use frame_support::{ dispatch::{fmt::Debug, DispatchError}, ensure, @@ -31,7 +32,6 @@ use frame_support::{ }, DefaultNoBound, RuntimeDebugNoBound, }; -use pallet_contracts_primitives::StorageDeposit as Deposit; use sp_runtime::{ traits::{Saturating, Zero}, FixedPointNumber, FixedU128, @@ -406,6 +406,16 @@ where }; } + /// Add a deposit charge + /// + /// Use this method instead of `charge` when the charge is not the result of a storage change. + /// This is the case when a delegate dependency is added or removed, or when the code_hash is + /// updated. + pub fn charge_deposit(&mut self, deposit_account: DepositAccount, amount: DepositOf) { + self.total_deposit = self.total_deposit.saturating_add(&amount); + self.charges.push(Charge { deposit_account, amount, terminated: false }); + } + /// Charge from `origin` a storage deposit for contract instantiation. /// /// This immediately transfers the balance in order to create the account. @@ -416,24 +426,19 @@ where info: &mut ContractInfo, ) -> Result, DispatchError> { debug_assert!(self.is_alive()); - let ed = Pallet::::min_balance(); - let mut deposit = - Diff { bytes_added: info.encoded_size() as u32, items_added: 1, ..Default::default() } - .update_contract::(None); - - // Instantiate needs to transfer at least the minimum balance in order to pull the - // deposit account into existence. - // We also add another `ed` here which goes to the contract's own account into existence. - deposit = deposit.max(Deposit::Charge(ed)).saturating_add(&Deposit::Charge(ed)); - if deposit.charge_or_zero() > self.limit { + + let code_info = CodeInfoOf::::get(info.code_hash).ok_or(Error::::CodeNotFound)?; + let deposit = info.update_base_deposit(code_info.deposit()); + if deposit > self.limit { return Err(>::StorageDepositLimitExhausted.into()) } + let deposit = Deposit::Charge(deposit); + // We do not increase `own_contribution` because this will be charged later when the // contract execution does conclude and hence would lead to a double charge. self.total_deposit = deposit.clone(); - info.storage_base_deposit = deposit.charge_or_zero(); // Normally, deposit charges are deferred to be able to coalesce them with refunds. // However, we need to charge immediately so that the account is created before @@ -664,6 +669,7 @@ mod tests { storage_byte_deposit: info.bytes_deposit, storage_item_deposit: info.items_deposit, storage_base_deposit: Default::default(), + delegate_dependencies: Default::default(), } } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index f67be602695d6..d10ff80a5b45c 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -16,8 +16,8 @@ // limitations under the License. use self::test_utils::{ensure_stored, expected_deposit, hash}; -use crate as pallet_contracts; use crate::{ + self as pallet_contracts, chain_extension::{ ChainExtension, Environment, Ext, InitState, RegisteredChainExtension, Result as ExtensionResult, RetVal, ReturnFlags, SysConfig, @@ -45,6 +45,7 @@ use frame_support::{ weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, }; use frame_system::{EventRecord, Phase}; +use pallet_contracts_primitives::CodeUploadReturnValue; use pretty_assertions::{assert_eq, assert_ne}; use sp_core::ByteArray; use sp_io::hashing::blake2_256; @@ -52,7 +53,7 @@ use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; use sp_runtime::{ testing::{Header, H256}, traits::{BlakeTwo256, Convert, Hash, IdentityLookup}, - AccountId32, TokenError, + AccountId32, Perbill, TokenError, }; use std::ops::Deref; @@ -91,8 +92,8 @@ macro_rules! assert_refcount { pub mod test_utils { use super::{Balances, DepositPerByte, DepositPerItem, Hash, SysConfig, Test}; use crate::{ - exec::AccountIdOf, CodeHash, CodeInfo, CodeInfoOf, Config, ContractInfo, ContractInfoOf, - Nonce, PristineCode, + exec::AccountIdOf, BalanceOf, CodeHash, CodeInfo, CodeInfoOf, Config, ContractInfo, + ContractInfoOf, Nonce, PristineCode, }; use codec::{Encode, MaxEncodedLen}; use frame_support::traits::Currency; @@ -119,6 +120,9 @@ pub mod test_utils { pub fn get_contract_checked(addr: &AccountIdOf) -> Option> { ContractInfoOf::::get(addr) } + pub fn get_code_deposit(code_hash: &CodeHash) -> BalanceOf { + crate::CodeInfoOf::::get(code_hash).unwrap().deposit() + } pub fn hash(s: &S) -> <::Hashing as Hash>::Output { <::Hashing as Hash>::hash_of(s) } @@ -385,6 +389,9 @@ parameter_types! { }; pub static DepositPerByte: BalanceOf = 1; pub const DepositPerItem: BalanceOf = 2; + pub static MaxDelegateDependencies: u32 = 32; + + pub static CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0); // We need this one set high enough for running benchmarks. pub static DefaultDepositLimit: BalanceOf = 10_000_000; } @@ -451,6 +458,8 @@ impl Config for Test { type UnsafeUnstableInterface = UnstableInterface; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; type Migrations = (NoopMigration<1>, NoopMigration<2>); + type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; + type MaxDelegateDependencies = MaxDelegateDependencies; } pub const ALICE: AccountId32 = AccountId32::new([1u8; 32]); @@ -710,7 +719,7 @@ fn instantiate_and_call_and_deposit_event() { phase: Phase::Initialization, event: RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: deposit_account.clone(), - free_balance: 131, + free_balance: 132, }), topics: vec![], }, @@ -719,7 +728,7 @@ fn instantiate_and_call_and_deposit_event() { event: RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: ALICE, to: deposit_account.clone(), - amount: 131, + amount: 132, }), topics: vec![], }, @@ -1192,7 +1201,7 @@ fn deploy_and_call_other_contract() { phase: Phase::Initialization, event: RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: deposit_account.clone(), - free_balance: 131, + free_balance: 132, }), topics: vec![], }, @@ -1201,7 +1210,7 @@ fn deploy_and_call_other_contract() { event: RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: ALICE, to: deposit_account.clone(), - amount: 131, + amount: 132, }), topics: vec![], }, @@ -5360,6 +5369,241 @@ fn delegate_call_indeterministic_code() { }); } +#[test] +fn add_remove_delegate_dependency_works() { + // set hah lock up deposit to 30%, to test deposit calculation. + CODE_HASH_LOCKUP_DEPOSIT_PERCENT.with(|c| *c.borrow_mut() = Perbill::from_percent(30)); + MAX_DELEGATE_DEPENDENCIES.with(|c| *c.borrow_mut() = 1); + + let (wasm_caller, self_code_hash) = + compile_module::("add_remove_delegate_dependency").unwrap(); + let (wasm_callee, code_hash) = compile_module::("dummy").unwrap(); + let (wasm_other, other_code_hash) = compile_module::("call").unwrap(); + + // Define inputs with various actions to test adding / removing delegate_dependencies. + // See the contract for more details. + let noop_input = (0u32, code_hash); + let add_delegate_dependency_input = (1u32, code_hash); + let remove_delegate_dependency_input = (2u32, code_hash); + let terminate_input = (3u32, code_hash); + + // Instantiate the caller contract with the given input. + let instantiate = |input: &(u32, H256)| { + Contracts::bare_instantiate( + ALICE, + 0, + GAS_LIMIT, + None, + Code::Upload(wasm_caller.clone()), + input.encode(), + vec![], + DebugInfo::Skip, + CollectEvents::Skip, + ) + }; + + // Call contract with the given input. + let call = |addr_caller: &AccountId32, input: &(u32, H256)| { + >::bare_call( + ALICE, + addr_caller.clone(), + 0, + GAS_LIMIT, + None, + input.encode(), + DebugInfo::UnsafeDebug, + CollectEvents::Skip, + Determinism::Enforced, + ) + }; + + const ED: u64 = 2000; + ExtBuilder::default().existential_deposit(ED).build().execute_with(|| { + let _ = Balances::deposit_creating(&ALICE, 1_000_000); + + // Instantiate with add_delegate_dependency should fail since the code is not yet on chain. + assert_err!( + instantiate(&add_delegate_dependency_input).result, + Error::::CodeNotFound + ); + + // Upload the delegated code. + let CodeUploadReturnValue { deposit, .. } = + Contracts::bare_upload_code(ALICE, wasm_callee.clone(), None, Determinism::Enforced) + .unwrap(); + + // Instantiate should now works. + let addr_caller = instantiate(&add_delegate_dependency_input).result.unwrap().account_id; + + // There should be a dependency and a deposit. + let contract = test_utils::get_contract(&addr_caller); + + let dependency_deposit = &CodeHashLockupDepositPercent::get().mul_ceil(deposit); + assert_eq!(contract.delegate_dependencies().get(&code_hash), Some(dependency_deposit)); + assert_eq!(test_utils::get_balance(contract.deposit_account()), ED + dependency_deposit); + + // Removing the code should fail, since we have added a dependency. + assert_err!( + Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash), + >::CodeInUse + ); + + // Adding an already existing dependency should fail. + assert_err!( + call(&addr_caller, &add_delegate_dependency_input).result, + Error::::DelegateDependencyAlreadyExists + ); + + // Adding a dependency to self should fail. + assert_err!( + call(&addr_caller, &(1u32, self_code_hash)).result, + Error::::CannotAddSelfAsDelegateDependency + ); + + // Adding more than the maximum allowed delegate_dependencies should fail. + Contracts::bare_upload_code(ALICE, wasm_other, None, Determinism::Enforced).unwrap(); + assert_err!( + call(&addr_caller, &(1u32, other_code_hash)).result, + Error::::MaxDelegateDependenciesReached + ); + + // Removing dependency should work. + assert_ok!(call(&addr_caller, &remove_delegate_dependency_input).result); + + // Dependency should be removed, and deposit should be returned. + let contract = test_utils::get_contract(&addr_caller); + assert!(contract.delegate_dependencies().is_empty()); + assert_eq!(test_utils::get_balance(contract.deposit_account()), ED); + + // Removing an unexisting dependency should fail. + assert_err!( + call(&addr_caller, &remove_delegate_dependency_input).result, + Error::::DelegateDependencyNotFound + ); + + // Adding a depedendency with a storage limit too low should fail. + DEFAULT_DEPOSIT_LIMIT.with(|c| *c.borrow_mut() = dependency_deposit - 1); + assert_err!( + call(&addr_caller, &add_delegate_dependency_input).result, + Error::::StorageDepositLimitExhausted + ); + + // Since we removed the dependency we should now be able to remove the code. + assert_ok!(Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash)); + + // Calling should fail since the delegated contract is not on chain anymore. + assert_err!(call(&addr_caller, &noop_input).result, Error::::ContractTrapped); + + // Restore initial deposit limit and add the dependency back. + DEFAULT_DEPOSIT_LIMIT.with(|c| *c.borrow_mut() = 10_000_000); + Contracts::bare_upload_code(ALICE, wasm_callee, None, Determinism::Enforced).unwrap(); + call(&addr_caller, &add_delegate_dependency_input).result.unwrap(); + + // Call terninate should work, and return the deposit. + let balance_before = test_utils::get_balance(&ALICE); + assert_ok!(call(&addr_caller, &terminate_input).result); + assert_eq!(test_utils::get_balance(&ALICE), balance_before + 2 * ED + dependency_deposit); + + // Terminate should also remove the dependency, so we can remove the code. + assert_ok!(Contracts::remove_code(RuntimeOrigin::signed(ALICE), code_hash)); + }); +} + +#[test] +fn native_dependency_deposit_works() { + let (wasm, code_hash) = compile_module::("set_code_hash").unwrap(); + let (dummy_wasm, dummy_code_hash) = compile_module::("dummy").unwrap(); + + // Set hah lock up deposit to 30%, to test deposit calculation. + CODE_HASH_LOCKUP_DEPOSIT_PERCENT.with(|c| *c.borrow_mut() = Perbill::from_percent(30)); + + // Set a low existential deposit so that the base storage deposit is based on the contract + // storage deposit rather than the existential deposit. + const ED: u64 = 10; + + // Test with both existing and uploaded code + for code in [Code::Upload(wasm.clone()), Code::Existing(code_hash)] { + ExtBuilder::default().existential_deposit(ED).build().execute_with(|| { + let _ = Balances::deposit_creating(&ALICE, 1_000_000); + let lockup_deposit_percent = CodeHashLockupDepositPercent::get(); + let per_byte = DepositPerByte::get(); + let per_item = DepositPerItem::get(); + + // Upload the dummy contract, + Contracts::upload_code( + RuntimeOrigin::signed(ALICE), + dummy_wasm.clone(), + None, + Determinism::Enforced, + ) + .unwrap(); + + // Upload set_code_hash contracts if using Code::Existing. + let add_upload_deposit = match code { + Code::Existing(_) => { + Contracts::upload_code( + RuntimeOrigin::signed(ALICE), + wasm.clone(), + None, + Determinism::Enforced, + ) + .unwrap(); + false + }, + Code::Upload(_) => true, + }; + + // Instantiate the set_code_hash contract. + let res = Contracts::bare_instantiate( + ALICE, + 0, + GAS_LIMIT, + None, + code, + vec![], + vec![], + DebugInfo::Skip, + CollectEvents::Skip, + ); + + let addr = res.result.unwrap().account_id; + let info = ContractInfoOf::::get(&addr).unwrap(); + let info_len = info.encoded_size() as u64; + let base_deposit = ED + per_byte * info_len + per_item * 1; + let upload_deposit = test_utils::get_code_deposit(&code_hash); + let extra_deposit = add_upload_deposit.then(|| upload_deposit).unwrap_or_default(); + + // Check initial storage_deposit + // The base deposit should be: ED + info_len * per_byte + 1 * per_item + 30% * deposit + let deposit = + extra_deposit + base_deposit + lockup_deposit_percent.mul_ceil(upload_deposit); + + assert_eq!(res.storage_deposit.charge_or_zero(), deposit); + + // call set_code_hash + >::bare_call( + ALICE, + addr.clone(), + 0, + GAS_LIMIT, + None, + dummy_code_hash.encode(), + DebugInfo::Skip, + CollectEvents::Skip, + Determinism::Enforced, + ) + .result + .unwrap(); + + // Check updated storage_deposit + let code_deposit = test_utils::get_code_deposit(&dummy_code_hash); + let deposit = base_deposit + lockup_deposit_percent.mul_ceil(code_deposit); + assert_eq!(test_utils::get_contract(&addr).storage_base_deposit(), deposit); + assert_eq!(test_utils::get_balance(&info.deposit_account()), deposit - ED); + }); + } +} + #[test] fn reentrance_count_works_with_call() { let (wasm, _code_hash) = compile_module::("reentrance_count_call").unwrap(); diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 56c95840b63e4..f7e812e956d1b 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -302,6 +302,11 @@ impl CodeInfo { pub fn refcount(&self) -> u64 { self.refcount } + + /// Returns the deposit of the module. + pub fn deposit(&self) -> BalanceOf { + self.deposit + } } impl Executable for WasmBlob { @@ -434,7 +439,10 @@ mod tests { use std::{ borrow::BorrowMut, cell::RefCell, - collections::hash_map::{Entry, HashMap}, + collections::{ + hash_map::{Entry, HashMap}, + HashSet, + }, }; #[derive(Debug, PartialEq, Eq)] @@ -488,6 +496,7 @@ mod tests { sr25519_verify: RefCell, [u8; 32])>>, code_hashes: Vec>, caller: Origin, + delegate_dependencies: RefCell>>, } /// The call is mocked and just returns this hardcoded value. @@ -513,6 +522,7 @@ mod tests { ecdsa_recover: Default::default(), caller: Default::default(), sr25519_verify: Default::default(), + delegate_dependencies: Default::default(), } } } @@ -698,6 +708,22 @@ mod tests { fn nonce(&mut self) -> u64 { 995 } + + fn add_delegate_dependency( + &mut self, + code: CodeHash, + ) -> Result<(), DispatchError> { + self.delegate_dependencies.borrow_mut().insert(code); + Ok(()) + } + + fn remove_delegate_dependency( + &mut self, + code: &CodeHash, + ) -> Result<(), DispatchError> { + self.delegate_dependencies.borrow_mut().remove(code); + Ok(()) + } } /// Execute the supplied code. @@ -3324,4 +3350,39 @@ mod tests { >::CodeRejected, ); } + + #[test] + fn add_remove_delegate_dependency() { + const CODE_ADD_REMOVE_DELEGATE_DEPENDENCY: &str = r#" +(module + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) + (import "env" "memory" (memory 1 1)) + (func (export "call") + (drop (call $add_delegate_dependency (i32.const 0))) + (drop (call $add_delegate_dependency (i32.const 32))) + (drop (call $remove_delegate_dependency (i32.const 32))) + ) + (func (export "deploy")) + + ;; hash1 (32 bytes) + (data (i32.const 0) + "\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01" + "\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01" + ) + + ;; hash2 (32 bytes) + (data (i32.const 32) + "\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02" + "\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02\02" + ) +) +"#; + let mut mock_ext = MockExt::default(); + assert_ok!(execute(&CODE_ADD_REMOVE_DELEGATE_DEPENDENCY, vec![], &mut mock_ext)); + let delegate_dependencies: Vec<_> = + mock_ext.delegate_dependencies.into_inner().into_iter().collect(); + assert_eq!(delegate_dependencies.len(), 1); + assert_eq!(delegate_dependencies[0].as_bytes(), [1; 32]); + } } diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index b2e2ed0e5401e..9c264040ded39 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -267,6 +267,10 @@ pub enum RuntimeCosts { AccountEntranceCount, /// Weight of calling `instantiation_nonce` InstantationNonce, + /// Weight of calling `add_delegate_dependency` + AddDelegateDependency, + /// Weight of calling `remove_delegate_dependency` + RemoveDelegateDependency, } impl RuntimeCosts { @@ -348,6 +352,8 @@ impl RuntimeCosts { ReentrantCount => s.reentrance_count, AccountEntranceCount => s.account_reentrance_count, InstantationNonce => s.instantiation_nonce, + AddDelegateDependency => s.add_delegate_dependency, + RemoveDelegateDependency => s.remove_delegate_dependency, }; RuntimeToken { #[cfg(test)] @@ -2821,4 +2827,28 @@ pub mod env { ctx.charge_gas(RuntimeCosts::InstantationNonce)?; Ok(ctx.ext.nonce()) } + + #[unstable] + fn add_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { + ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; + let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; + ctx.ext.add_delegate_dependency(code_hash)?; + Ok(ReturnCode::Success) + } + + #[unstable] + fn remove_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { + ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; + let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; + ctx.ext.remove_delegate_dependency(&code_hash)?; + Ok(ReturnCode::Success) + } } diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 97104bf070c5e..490138643538f 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -126,6 +126,16 @@ pub trait WeightInfo { fn seal_account_reentrance_count(r: u32, ) -> Weight; fn seal_instantiation_nonce(r: u32, ) -> Weight; fn instr_i64const(r: u32, ) -> Weight; + fn add_delegate_dependency(_r: u32,) -> Weight { + return Weight::zero() + } + fn remove_delegate_dependency(_r: u32,) -> Weight { + return Weight::zero() + } + fn v13_migration_step() -> Weight { + return Weight::zero() + } + } /// Weights for pallet_contracts using the Substrate node and recommended hardware. From 966429773b2de6e3bc3e9f1660ff838093aee467 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 12:46:21 +0200 Subject: [PATCH 31/70] update --- frame/contracts/src/exec.rs | 632 +++++++++++++++++--------------- frame/contracts/src/tests.rs | 27 +- frame/contracts/src/wasm/mod.rs | 10 + 3 files changed, 375 insertions(+), 294 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 3dbcbbb69da4c..6c1be178d70fd 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1641,6 +1641,10 @@ mod tests { } impl MockLoader { + fn code_hashes() -> Vec> { + Loader::get().map.keys().copied().collect() + } + fn insert( func_type: ExportedFunction, f: impl Fn(MockCtx, &MockExecutable) -> ExecResult + 'static, @@ -2042,29 +2046,33 @@ mod tests { }); // This one tests passing the input data into a contract via instantiate. - ExtBuilder::default().build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let executable = MockExecutable::from_storage(input_data_ch, &mut gas_meter).unwrap(); - set_balance(&ALICE, min_balance * 10_000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); - - let result = MockStack::run_instantiate( - ALICE, - executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance, - vec![1, 2, 3, 4], - &[], - None, - ); - assert_matches!(result, Ok(_)); - }); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let executable = + MockExecutable::from_storage(input_data_ch, &mut gas_meter).unwrap(); + set_balance(&ALICE, min_balance * 10_000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); + + let result = MockStack::run_instantiate( + ALICE, + executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance, + vec![1, 2, 3, 4], + &[], + None, + ); + assert_matches!(result, Ok(_)); + }); } #[test] @@ -2487,43 +2495,53 @@ mod tests { Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: vec![80, 65, 83, 83] }) }); - ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let executable = MockExecutable::from_storage(dummy_ch, &mut gas_meter).unwrap(); - set_balance(&ALICE, min_balance * 1000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, Some(min_balance * 100), min_balance) - .unwrap(); - - let instantiated_contract_address = assert_matches!( - MockStack::run_instantiate( - ALICE, - executable, - &mut gas_meter, - &mut storage_meter, - &schedule, + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .existential_deposit(15) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let executable = MockExecutable::from_storage(dummy_ch, &mut gas_meter).unwrap(); + set_balance(&ALICE, min_balance * 1000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new( + &contract_origin, + Some(min_balance * 100), min_balance, - vec![], - &[], - None, - ), - Ok((address, ref output)) if output.data == vec![80, 65, 83, 83] => address - ); + ) + .unwrap(); - // Check that the newly created account has the expected code hash and - // there are instantiation event. - assert_eq!( - ContractInfo::::load_code_hash(&instantiated_contract_address).unwrap(), - dummy_ch - ); - assert_eq!( - &events(), - &[Event::Instantiated { deployer: ALICE, contract: instantiated_contract_address }] - ); - }); + let instantiated_contract_address = assert_matches!( + MockStack::run_instantiate( + ALICE, + executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance, + vec![], + &[], + None, + ), + Ok((address, ref output)) if output.data == vec![80, 65, 83, 83] => address + ); + + // Check that the newly created account has the expected code hash and + // there are instantiation event. + assert_eq!( + ContractInfo::::load_code_hash(&instantiated_contract_address).unwrap(), + dummy_ch + ); + assert_eq!( + &events(), + &[Event::Instantiated { + deployer: ALICE, + contract: instantiated_contract_address + }] + ); + }); } #[test] @@ -2532,36 +2550,45 @@ mod tests { Ok(ExecReturnValue { flags: ReturnFlags::REVERT, data: vec![70, 65, 73, 76] }) }); - ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let executable = MockExecutable::from_storage(dummy_ch, &mut gas_meter).unwrap(); - set_balance(&ALICE, min_balance * 1000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, Some(min_balance * 100), min_balance) - .unwrap(); - - let instantiated_contract_address = assert_matches!( - MockStack::run_instantiate( - ALICE, - executable, - &mut gas_meter, - &mut storage_meter, - &schedule, + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .existential_deposit(15) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let executable = MockExecutable::from_storage(dummy_ch, &mut gas_meter).unwrap(); + set_balance(&ALICE, min_balance * 1000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new( + &contract_origin, + Some(min_balance * 100), min_balance, - vec![], - &[], - None, - ), - Ok((address, ref output)) if output.data == vec![70, 65, 73, 76] => address - ); + ) + .unwrap(); - // Check that the account has not been created. - assert!(ContractInfo::::load_code_hash(&instantiated_contract_address).is_none()); - assert!(events().is_empty()); - }); + let instantiated_contract_address = assert_matches!( + MockStack::run_instantiate( + ALICE, + executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance, + vec![], + &[], + None, + ), + Ok((address, ref output)) if output.data == vec![70, 65, 73, 76] => address + ); + + // Check that the account has not been created. + assert!( + ContractInfo::::load_code_hash(&instantiated_contract_address).is_none() + ); + assert!(events().is_empty()); + }); } #[test] @@ -2589,51 +2616,58 @@ mod tests { } }); - ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - set_balance(&ALICE, min_balance * 100); - place_contract(&BOB, instantiator_ch); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = storage::meter::Meter::new( - &contract_origin, - Some(min_balance * 10), - min_balance * 10, - ) - .unwrap(); - - assert_matches!( - MockStack::run_call( - contract_origin, - BOB, - &mut GasMeter::::new(GAS_LIMIT), - &mut storage_meter, - &schedule, + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .existential_deposit(15) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + set_balance(&ALICE, min_balance * 100); + place_contract(&BOB, instantiator_ch); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new( + &contract_origin, + Some(min_balance * 10), min_balance * 10, - vec![], - None, - Determinism::Enforced, - ), - Ok(_) - ); + ) + .unwrap(); - let instantiated_contract_address = - instantiated_contract_address.borrow().as_ref().unwrap().clone(); + assert_matches!( + MockStack::run_call( + contract_origin, + BOB, + &mut GasMeter::::new(GAS_LIMIT), + &mut storage_meter, + &schedule, + min_balance * 10, + vec![], + None, + Determinism::Enforced, + ), + Ok(_) + ); - // Check that the newly created account has the expected code hash and - // there are instantiation event. - assert_eq!( - ContractInfo::::load_code_hash(&instantiated_contract_address).unwrap(), - dummy_ch - ); - assert_eq!( - &events(), - &[ - Event::Instantiated { deployer: BOB, contract: instantiated_contract_address }, - Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB }, - ] - ); - }); + let instantiated_contract_address = + instantiated_contract_address.borrow().as_ref().unwrap().clone(); + + // Check that the newly created account has the expected code hash and + // there are instantiation event. + assert_eq!( + ContractInfo::::load_code_hash(&instantiated_contract_address).unwrap(), + dummy_ch + ); + assert_eq!( + &events(), + &[ + Event::Instantiated { + deployer: BOB, + contract: instantiated_contract_address + }, + Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB }, + ] + ); + }); } #[test] @@ -2661,37 +2695,41 @@ mod tests { } }); - ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let schedule = ::Schedule::get(); - set_balance(&ALICE, 1000); - set_balance(&BOB, 100); - place_contract(&BOB, instantiator_ch); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, Some(200), 0).unwrap(); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .existential_deposit(15) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + set_balance(&ALICE, 1000); + set_balance(&BOB, 100); + place_contract(&BOB, instantiator_ch); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(200), 0).unwrap(); - assert_matches!( - MockStack::run_call( - contract_origin, - BOB, - &mut GasMeter::::new(GAS_LIMIT), - &mut storage_meter, - &schedule, - 0, - vec![], - None, - Determinism::Enforced, - ), - Ok(_) - ); + assert_matches!( + MockStack::run_call( + contract_origin, + BOB, + &mut GasMeter::::new(GAS_LIMIT), + &mut storage_meter, + &schedule, + 0, + vec![], + None, + Determinism::Enforced, + ), + Ok(_) + ); - // The contract wasn't instantiated so we don't expect to see an instantiation - // event here. - assert_eq!( - &events(), - &[Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB },] - ); - }); + // The contract wasn't instantiated so we don't expect to see an instantiation + // event here. + assert_eq!( + &events(), + &[Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB },] + ); + }); } #[test] @@ -2701,32 +2739,37 @@ mod tests { exec_success() }); - ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let schedule = ::Schedule::get(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let executable = MockExecutable::from_storage(terminate_ch, &mut gas_meter).unwrap(); - set_balance(&ALICE, 10_000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, None, 100).unwrap(); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .existential_deposit(15) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let executable = + MockExecutable::from_storage(terminate_ch, &mut gas_meter).unwrap(); + set_balance(&ALICE, 10_000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, 100).unwrap(); - assert_eq!( - MockStack::run_instantiate( - ALICE, - executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - 100, - vec![], - &[], - None, - ), - Err(Error::::TerminatedInConstructor.into()) - ); + assert_eq!( + MockStack::run_instantiate( + ALICE, + executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + 100, + vec![], + &[], + None, + ), + Err(Error::::TerminatedInConstructor.into()) + ); - assert_eq!(&events(), &[]); - }); + assert_eq!(&events(), &[]); + }); } #[test] @@ -2802,29 +2845,32 @@ mod tests { }); // This one tests passing the input data into a contract via instantiate. - ExtBuilder::default().build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let executable = MockExecutable::from_storage(code, &mut gas_meter).unwrap(); - set_balance(&ALICE, min_balance * 10_000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); - - let result = MockStack::run_instantiate( - ALICE, - executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance, - vec![], - &[], - None, - ); - assert_matches!(result, Ok(_)); - }); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let executable = MockExecutable::from_storage(code, &mut gas_meter).unwrap(); + set_balance(&ALICE, min_balance * 10_000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); + + let result = MockStack::run_instantiate( + ALICE, + executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance, + vec![], + &[], + None, + ); + assert_matches!(result, Ok(_)); + }); } #[test] @@ -3226,75 +3272,79 @@ mod tests { exec_success() }); - ExtBuilder::default().build().execute_with(|| { - let schedule = ::Schedule::get(); - let min_balance = ::Currency::minimum_balance(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - let fail_executable = MockExecutable::from_storage(fail_code, &mut gas_meter).unwrap(); - let success_executable = - MockExecutable::from_storage(success_code, &mut gas_meter).unwrap(); - let succ_fail_executable = - MockExecutable::from_storage(succ_fail_code, &mut gas_meter).unwrap(); - let succ_succ_executable = - MockExecutable::from_storage(succ_succ_code, &mut gas_meter).unwrap(); - set_balance(&ALICE, min_balance * 10_000); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = - storage::meter::Meter::new(&contract_origin, None, min_balance * 100).unwrap(); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .build() + .execute_with(|| { + let schedule = ::Schedule::get(); + let min_balance = ::Currency::minimum_balance(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + let fail_executable = + MockExecutable::from_storage(fail_code, &mut gas_meter).unwrap(); + let success_executable = + MockExecutable::from_storage(success_code, &mut gas_meter).unwrap(); + let succ_fail_executable = + MockExecutable::from_storage(succ_fail_code, &mut gas_meter).unwrap(); + let succ_succ_executable = + MockExecutable::from_storage(succ_succ_code, &mut gas_meter).unwrap(); + set_balance(&ALICE, min_balance * 10_000); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, min_balance * 100).unwrap(); - MockStack::run_instantiate( - ALICE, - fail_executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance * 100, - vec![], - &[], - None, - ) - .ok(); - assert_eq!(>::get(), 0); + MockStack::run_instantiate( + ALICE, + fail_executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance * 100, + vec![], + &[], + None, + ) + .ok(); + assert_eq!(>::get(), 0); - assert_ok!(MockStack::run_instantiate( - ALICE, - success_executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance * 100, - vec![], - &[], - None, - )); - assert_eq!(>::get(), 1); + assert_ok!(MockStack::run_instantiate( + ALICE, + success_executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance * 100, + vec![], + &[], + None, + )); + assert_eq!(>::get(), 1); - assert_ok!(MockStack::run_instantiate( - ALICE, - succ_fail_executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance * 200, - vec![], - &[], - None, - )); - assert_eq!(>::get(), 2); + assert_ok!(MockStack::run_instantiate( + ALICE, + succ_fail_executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance * 200, + vec![], + &[], + None, + )); + assert_eq!(>::get(), 2); - assert_ok!(MockStack::run_instantiate( - ALICE, - succ_succ_executable, - &mut gas_meter, - &mut storage_meter, - &schedule, - min_balance * 200, - vec![], - &[], - None, - )); - assert_eq!(>::get(), 4); - }); + assert_ok!(MockStack::run_instantiate( + ALICE, + succ_succ_executable, + &mut gas_meter, + &mut storage_meter, + &schedule, + min_balance * 200, + vec![], + &[], + None, + )); + assert_eq!(>::get(), 4); + }); } #[test] @@ -3762,26 +3812,30 @@ mod tests { exec_success() }); - ExtBuilder::default().build().execute_with(|| { - let min_balance = ::Currency::minimum_balance(); - let schedule = ::Schedule::get(); - let mut gas_meter = GasMeter::::new(GAS_LIMIT); - set_balance(&ALICE, min_balance * 1000); - place_contract(&BOB, code_hash); - let contract_origin = Origin::from_account_id(ALICE); - let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); - assert_ok!(MockStack::run_call( - contract_origin, - BOB, - &mut gas_meter, - &mut storage_meter, - &schedule, - 0, - vec![], - None, - Determinism::Enforced - )); - }); + ExtBuilder::default() + .with_code_hashes(MockLoader::code_hashes()) + .build() + .execute_with(|| { + let min_balance = ::Currency::minimum_balance(); + let schedule = ::Schedule::get(); + let mut gas_meter = GasMeter::::new(GAS_LIMIT); + set_balance(&ALICE, min_balance * 1000); + place_contract(&BOB, code_hash); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); + assert_ok!(MockStack::run_call( + contract_origin, + BOB, + &mut gas_meter, + &mut storage_meter, + &schedule, + 0, + vec![], + None, + Determinism::Enforced + )); + }); } /// This works even though random interface is deprecated, as the check to ban deprecated diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index d10ff80a5b45c..6804b58b5054c 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -27,9 +27,9 @@ use crate::{ tests::test_utils::{get_contract, get_contract_checked}, wasm::{Determinism, ReturnCode as RuntimeReturnCode}, weights::WeightInfo, - BalanceOf, Code, CollectEvents, Config, ContractInfo, ContractInfoOf, DebugInfo, - DefaultAddressGenerator, DeletionQueueCounter, Error, MigrationInProgress, NoopMigration, - Origin, Pallet, PristineCode, Schedule, + BalanceOf, Code, CodeHash, CodeInfoOf, CollectEvents, Config, ContractInfo, ContractInfoOf, + DebugInfo, DefaultAddressGenerator, DeletionQueueCounter, Error, MigrationInProgress, + NoopMigration, Origin, Pallet, PristineCode, Schedule, }; use assert_matches::assert_matches; use codec::Encode; @@ -104,6 +104,7 @@ pub mod test_utils { *counter }); set_balance(address, ::Currency::minimum_balance() * 10); + >::insert(code_hash, CodeInfo::new(address.clone())); let contract = >::new(&address, nonce, code_hash).unwrap(); >::insert(address, contract); } @@ -472,17 +473,28 @@ pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000, 3 * 1024 * 102 pub struct ExtBuilder { existential_deposit: u64, storage_version: Option, + code_hashes: Vec>, } + impl Default for ExtBuilder { fn default() -> Self { - Self { existential_deposit: ExistentialDeposit::get(), storage_version: None } + Self { + existential_deposit: ExistentialDeposit::get(), + storage_version: None, + code_hashes: vec![], + } } } + impl ExtBuilder { pub fn existential_deposit(mut self, existential_deposit: u64) -> Self { self.existential_deposit = existential_deposit; self } + pub fn with_code_hashes(mut self, code_hashes: Vec>) -> Self { + self.code_hashes = code_hashes; + self + } pub fn set_associated_consts(&self) { EXISTENTIAL_DEPOSIT.with(|v| *v.borrow_mut() = self.existential_deposit); } @@ -510,6 +522,11 @@ impl ExtBuilder { } System::set_block_number(1) }); + ext.execute_with(|| { + for code_hash in self.code_hashes { + CodeInfoOf::::insert(code_hash, crate::CodeInfo::new(ALICE)); + } + }); ext } } @@ -5538,7 +5555,7 @@ fn native_dependency_deposit_works() { ) .unwrap(); - // Upload set_code_hash contracts if using Code::Existing. + // Upload `set_code_hash` contracts if using Code::Existing. let add_upload_deposit = match code { Code::Existing(_) => { Contracts::upload_code( diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index f7e812e956d1b..bece953744d54 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -303,6 +303,16 @@ impl CodeInfo { self.refcount } + #[cfg(test)] + pub fn new(owner: T::AccountId) -> Self { + CodeInfo { + owner, + deposit: Default::default(), + refcount: 0, + determinism: Determinism::Enforced, + } + } + /// Returns the deposit of the module. pub fn deposit(&self) -> BalanceOf { self.deposit From ddaba768f84609630b08e5f20d73946d6ccfb922 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 13:35:08 +0200 Subject: [PATCH 32/70] fix migration --- frame/contracts/src/migration/v13.rs | 70 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index c77b1db0729c7..d3cf678b3e36e 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -39,14 +39,14 @@ mod old { #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { - pub trie_id: TrieId, - pub deposit_account: DepositAccount, - pub code_hash: CodeHash, - pub storage_bytes: u32, - pub storage_items: u32, - pub storage_byte_deposit: BalanceOf, - pub storage_item_deposit: BalanceOf, - pub storage_base_deposit: BalanceOf, + trie_id: TrieId, + deposit_account: DepositAccount, + code_hash: CodeHash, + storage_bytes: u32, + storage_items: u32, + storage_byte_deposit: BalanceOf, + storage_item_deposit: BalanceOf, + storage_base_deposit: BalanceOf, } #[storage_alias] @@ -94,42 +94,42 @@ pub struct ContractInfo { #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] pub struct Migration { - last_key: Option>>, - _phantom: PhantomData, + last_account: Option, } impl Migrate for Migration { - const VERSION: u16 = 12; + const VERSION: u16 = 13; fn max_step_weight() -> Weight { - T::WeightInfo::v10_migration_step() + T::WeightInfo::v13_migration_step() } fn step(&mut self) -> (IsFinished, Weight) { - let last_key = self.last_key.take().map(|k| k.into()); - - log::debug!(target: LOG_TARGET, "Migrating contract code {:?}", last_key); - self.last_key = - ContractInfoOf::::translate_next(last_key, |_key, old: old::ContractInfo| { - Some(ContractInfo { - trie_id: old.trie_id, - deposit_account: old.deposit_account, - code_hash: old.code_hash, - storage_bytes: old.storage_bytes, - storage_items: old.storage_items, - storage_byte_deposit: old.storage_byte_deposit, - storage_item_deposit: old.storage_item_deposit, - storage_base_deposit: old.storage_base_deposit, - delegate_dependencies: Default::default(), - }) - }) - .and_then(|key| key.try_into().ok()); - - if self.last_key.is_some() { - (IsFinished::No, T::WeightInfo::v12_migration_step()) + let mut iter = if let Some(last_account) = self.last_account.take() { + old::CodeStorage::::iter_from(old::CodeStorage::::hashed_key_for(last_account)) } else { - log::debug!(target: LOG_TARGET, "No more contracts code to migrate"); - (IsFinished::Yes, T::WeightInfo::v12_migration_step()) + old::CodeStorage::::iter() + }; + + if let Some((key, old)) = iter.next() { + log::debug!(target: LOG_TARGET, "Migrating contract {:?}", key); + let info = ContractInfo { + trie_id: old.trie_id, + deposit_account: old.deposit_account, + code_hash: old.code_hash, + storage_bytes: old.storage_bytes, + storage_items: old.storage_items, + storage_byte_deposit: old.storage_byte_deposit, + storage_item_deposit: old.storage_item_deposit, + storage_base_deposit: old.storage_base_deposit, + delegate_dependencies: Default::default(), + }; + ContractInfo::::insert(key, module); + self.last_account = Some(key); + (IsFinished::No, T::WeightInfo::v13_migration_step()) + } else { + log::debug!(target: LOG_TARGET, "No more contracts to migrate"); + (IsFinished::Yes, T::WeightInfo::v13_migration_step()) } } } From d45c793529e261476b464622c054ccf826efce1c Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 14:01:52 +0200 Subject: [PATCH 33/70] fix migration --- frame/contracts/src/benchmarking/mod.rs | 2 +- frame/contracts/src/migration.rs | 1 + frame/contracts/src/migration/v13.rs | 51 +++++++++++++------------ 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index d7a8fde3888d8..f3ca68b613911 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -30,7 +30,7 @@ use self::{ }; use crate::{ exec::{AccountIdOf, Key}, - migration::{v10, v11, v12, v9, MigrationStep}, + migration::{v10, v11, v12, v13, v9, MigrationStep}, wasm::CallFlags, Pallet as Contracts, *, }; diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 827135e081223..034230be0c2d4 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -59,6 +59,7 @@ pub mod v10; pub mod v11; pub mod v12; +pub mod v13; pub mod v9; use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index d3cf678b3e36e..da4df1b4afb39 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -19,17 +19,17 @@ //! See . use crate::{ - migration::{IsFinished, Migrate}, + migration::{IsFinished, MigrationStep}, storage::DepositAccount, weights::WeightInfo, BalanceOf, CodeHash, Config, Pallet, TrieId, Weight, LOG_TARGET, }; use codec::{Decode, Encode}; -use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound, IterableStorageMap}; +use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; use sp_runtime::BoundedBTreeMap; #[cfg(feature = "try-runtime")] use sp_runtime::TryRuntimeError; -use sp_std::{marker::PhantomData, prelude::*}; +use sp_std::prelude::*; mod old { use crate::storage::DepositAccount; @@ -39,14 +39,14 @@ mod old { #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { - trie_id: TrieId, - deposit_account: DepositAccount, - code_hash: CodeHash, - storage_bytes: u32, - storage_items: u32, - storage_byte_deposit: BalanceOf, - storage_item_deposit: BalanceOf, - storage_base_deposit: BalanceOf, + pub trie_id: TrieId, + pub deposit_account: DepositAccount, + pub code_hash: CodeHash, + pub storage_bytes: u32, + pub storage_items: u32, + pub storage_byte_deposit: BalanceOf, + pub storage_item_deposit: BalanceOf, + pub storage_base_deposit: BalanceOf, } #[storage_alias] @@ -80,16 +80,15 @@ pub type ContractInfoOf = #[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ContractInfo { - pub trie_id: TrieId, - pub deposit_account: DepositAccount, - pub code_hash: CodeHash, - pub storage_bytes: u32, - pub storage_items: u32, - pub storage_byte_deposit: BalanceOf, - pub storage_item_deposit: BalanceOf, - pub storage_base_deposit: BalanceOf, - pub delegate_dependencies: - BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies>, + trie_id: TrieId, + deposit_account: DepositAccount, + code_hash: CodeHash, + storage_bytes: u32, + storage_items: u32, + storage_byte_deposit: BalanceOf, + storage_item_deposit: BalanceOf, + storage_base_deposit: BalanceOf, + delegate_dependencies: BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies>, } #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] @@ -97,7 +96,7 @@ pub struct Migration { last_account: Option, } -impl Migrate for Migration { +impl MigrationStep for Migration { const VERSION: u16 = 13; fn max_step_weight() -> Weight { @@ -106,9 +105,11 @@ impl Migrate for Migration { fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_account) = self.last_account.take() { - old::CodeStorage::::iter_from(old::CodeStorage::::hashed_key_for(last_account)) + old::ContractInfoOf::::iter_from(old::ContractInfoOf::::hashed_key_for( + last_account, + )) } else { - old::CodeStorage::::iter() + old::ContractInfoOf::::iter() }; if let Some((key, old)) = iter.next() { @@ -124,7 +125,7 @@ impl Migrate for Migration { storage_base_deposit: old.storage_base_deposit, delegate_dependencies: Default::default(), }; - ContractInfo::::insert(key, module); + ContractInfoOf::::insert(key.clone(), info); self.last_account = Some(key); (IsFinished::No, T::WeightInfo::v13_migration_step()) } else { From 33a9d79a4eff5e8a270fbaea5a4e68b5f0e1140f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 4 Jul 2023 15:05:46 +0200 Subject: [PATCH 34/70] doc --- frame/contracts/src/benchmarking/mod.rs | 2 +- frame/contracts/src/exec.rs | 25 +++++++++++++++---------- frame/contracts/src/lib.rs | 4 ++-- frame/contracts/src/storage.rs | 6 +++--- frame/contracts/src/storage/meter.rs | 8 ++++---- frame/contracts/src/tests.rs | 4 ++-- 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index f3ca68b613911..3b3c795db168b 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -257,7 +257,7 @@ benchmarks! { m.step(); } - // This benchmarks the v13 migration step. + // This benchmarks the v13 migration step (Add delegate_dependencies field). #[pov_mode = Measured] v13_migration_step { let contract = >::with_caller( diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 6c1be178d70fd..e3cb5033fd631 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -313,25 +313,30 @@ pub trait Ext: sealing::Sealed { /// Returns a nonce that is incremented for every instantiated contract. fn nonce(&mut self) -> u64; - /// Add a delegate dependency to `delegate_dependencies`. + /// Adds a delegate dependency to [`ContractInfo`]'s `delegate_dependencies` field. /// - /// This ensure that the delegated contract is not removed while it is still in use. This will - /// increase the reference count of the code hash, and charge a fraction (see - /// `CodeHashLockupDepositPercent`) of the code deposit. + /// This ensures that the delegated contract is not removed while it is still in use. It + /// increases the reference count of the code hash and charges a fraction (see + /// [`Config::CodeHashLockupDepositPercent`]) of the code deposit. /// - /// Returns an error if we have reached the maximum number of delegate_dependencies, or the - /// delegate_dependency already exists. + /// # Errors + /// + /// - [`Error::::MaxDelegateDependenciesReached`] + /// - [`Error::::CannotAddSelfAsDelegateDependency`] + /// - [`Error::::DelegateDependencyAlreadyExists`] fn add_delegate_dependency( &mut self, code_hash: CodeHash, ) -> Result<(), DispatchError>; - /// Remove a delegate dependency from `delegate_dependencies`. + /// Removes a delegate dependency from [`ContractInfo`]'s `delegate_dependencies` field. /// - /// This is the counterpart of `add_delegate_dependency`. This method will decrease the - /// reference count And refund the deposit that was charged by `add_delegate_dependency`. + /// This is the counterpart of [`Self::add_delegate_dependency`]. It decreases the reference + /// count and refunds the deposit that was charged by [`Self::add_delegate_dependency`]. + /// + /// # Errors /// - /// Returns an error if the dependency does not exist. + /// - [`Error::::DelegateDependencyNotFound`] fn remove_delegate_dependency( &mut self, code_hash: &CodeHash, diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 387bf44540bb5..88eb85d8f3966 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -292,7 +292,7 @@ pub mod pallet { type DepositPerItem: Get>; /// The percentage of the storage deposit that should be held for using a code hash. - /// Instantiating a contract, or calling `add_delegate_dependency` (for contract delegation) + /// Instantiating a contract, or calling [`chain_extension::Ext::add_delegate_dependency`] /// protects the code from being removed, In order to prevent abuse these actions are /// protected with a percentage of the code deposit. #[pallet::constant] @@ -314,7 +314,7 @@ pub mod pallet { type MaxStorageKeyLen: Get; /// The maximum number of delegate_dependencies that a contract can lock with - /// `add_delegate_dependency`. + /// [`chain_extension::Ext::add_delegate_dependency`]. #[pallet::constant] type MaxDelegateDependencies: Get; diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 7a2a670375d79..763481b697231 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -216,7 +216,7 @@ impl ContractInfo { }) } - /// Set and returns the contract base deposit. + /// Sets and returns the contract base deposit. /// `upload_deposit` is the balance of the deposit paid for uploading the contract. pub fn update_base_deposit(&mut self, upload_deposit: BalanceOf) -> BalanceOf { let ed = Pallet::::min_balance(); @@ -239,7 +239,7 @@ impl ContractInfo { deposit } - /// Add a new delegate dependency to the contract. + /// Adds a new delegate dependency to the contract. /// The `amount` is the amount of funds that will be reserved for the dependency. /// /// Returns an error if the maximum number of delegate_dependencies is reached or if @@ -256,7 +256,7 @@ impl ContractInfo { .map_err(Into::into) } - /// Remove a delegate dependency from the contract. + /// Removes a delegate dependency from the contract. /// /// Returns an error if the entry doesn't exist. pub fn remove_delegate_dependency( diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 4e3e255ac870c..8201dff09042e 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -406,11 +406,11 @@ where }; } - /// Add a deposit charge + /// Adds a deposit charge. /// - /// Use this method instead of `charge` when the charge is not the result of a storage change. - /// This is the case when a delegate dependency is added or removed, or when the code_hash is - /// updated. + /// Use this method instead of [`Self::charge`] when the charge is not the result of a storage + /// change. This is the case when a `delegate_dependency` is added or removed, or when the + /// `code_hash` is updated. pub fn charge_deposit(&mut self, deposit_account: DepositAccount, amount: DepositOf) { self.total_deposit = self.total_deposit.saturating_add(&amount); self.charges.push(Charge { deposit_account, amount, terminated: false }); diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 6804b58b5054c..b7f057f9bdab8 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -5388,7 +5388,7 @@ fn delegate_call_indeterministic_code() { #[test] fn add_remove_delegate_dependency_works() { - // set hah lock up deposit to 30%, to test deposit calculation. + // set hash lock up deposit to 30%, to test deposit calculation. CODE_HASH_LOCKUP_DEPOSIT_PERCENT.with(|c| *c.borrow_mut() = Perbill::from_percent(30)); MAX_DELEGATE_DEPENDENCIES.with(|c| *c.borrow_mut() = 1); @@ -5531,7 +5531,7 @@ fn native_dependency_deposit_works() { let (wasm, code_hash) = compile_module::("set_code_hash").unwrap(); let (dummy_wasm, dummy_code_hash) = compile_module::("dummy").unwrap(); - // Set hah lock up deposit to 30%, to test deposit calculation. + // Set hash lock up deposit to 30%, to test deposit calculation. CODE_HASH_LOCKUP_DEPOSIT_PERCENT.with(|c| *c.borrow_mut() = Perbill::from_percent(30)); // Set a low existential deposit so that the base storage deposit is based on the contract From b5f35fc5d5d871ab0e59d0a58a559eeae0a251cc Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 13:10:23 +0200 Subject: [PATCH 35/70] fix lint --- frame/contracts/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 88eb85d8f3966..4773b4359c0ce 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -709,7 +709,6 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; - let code_len = code.len() as u32; let (module, upload_deposit) = Self::try_upload_code( origin.clone(), From f941e2a107981504e636d45d3b8dd9e1a55a7134 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 13:26:13 +0200 Subject: [PATCH 36/70] update migration --- frame/contracts/src/benchmarking/mod.rs | 14 ++++++++++++++ frame/contracts/src/migration/v13.rs | 2 +- frame/contracts/src/weights.rs | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 3b3c795db168b..7071cd0f075ac 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -270,6 +270,20 @@ benchmarks! { m.step(); } + // This benchmarks the last iteration of a migration step, when we are passed the last key of a map. + // This benchmark is using `v13::Migration` but this can be used for any migration step that follow the same logic of + // iterating over a map and mutating the next entry. + #[pov_mode = Measured] + migration_noop_step { + let contract = >::with_caller( + whitelisted_caller(), WasmModule::dummy(), vec![], + )?; + + let mut m = v13::Migration::::default(); + }: { + m.step(); + } + // This benchmarks the weight of executing Migration::migrate to execute a noop migration. #[pov_mode = Measured] migration_noop { diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index da4df1b4afb39..fed48dfd866a4 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -130,7 +130,7 @@ impl MigrationStep for Migration { (IsFinished::No, T::WeightInfo::v13_migration_step()) } else { log::debug!(target: LOG_TARGET, "No more contracts to migrate"); - (IsFinished::Yes, T::WeightInfo::v13_migration_step()) + (IsFinished::Yes, T::WeightInfo::migration_noop_step()) } } } diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 490138643538f..328a6180f350c 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -135,6 +135,9 @@ pub trait WeightInfo { fn v13_migration_step() -> Weight { return Weight::zero() } + fn migration_noop_step() -> Weight { + return Weight::zero() + } } From 4ccb853e15415e9c09ce169430d7534f091b13e6 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 5 Jul 2023 14:40:09 +0200 Subject: [PATCH 37/70] fix warning --- frame/contracts/src/migration/v13.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index fed48dfd866a4..06d090595a287 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -27,8 +27,6 @@ use crate::{ use codec::{Decode, Encode}; use frame_support::{codec, pallet_prelude::*, storage_alias, DefaultNoBound}; use sp_runtime::BoundedBTreeMap; -#[cfg(feature = "try-runtime")] -use sp_runtime::TryRuntimeError; use sp_std::prelude::*; mod old { From 30f5472f0359252c4277cfe27d9ce1a98bdd4933 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 7 Jul 2023 16:04:31 +0200 Subject: [PATCH 38/70] reformat comment --- frame/contracts/src/storage.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 763481b697231..904cdda880ea5 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -71,9 +71,9 @@ pub struct ContractInfo { storage_base_deposit: BalanceOf, /// Map of code hashes and deposit balances. /// - /// A Code hash of a delegate contracts dependencies added to the map can not be removed from - /// the chain state and can be safely used for delegate calls. The deposit is the deposit held - /// for adding the dependency, it is refunded on removal. + /// Tracks the code hash and deposit held for adding delegate dependencies. Dependencies added + /// to the map can not be removed from the chain state and can be safely used for delegate + /// calls. delegate_dependencies: BoundedBTreeMap, BalanceOf, T::MaxDelegateDependencies>, } From 649011db0293ebe45c28faedc2d348cf592bd3ad Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 7 Jul 2023 17:58:14 +0200 Subject: [PATCH 39/70] regenerate weightInfo trait --- frame/contracts/src/weights.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 754a28fc22926..624f3ba219d0b 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -56,6 +56,10 @@ pub trait WeightInfo { fn v10_migration_step() -> Weight; fn v11_migration_step(k: u32, ) -> Weight; fn v12_migration_step(c: u32, ) -> Weight; + fn v13_migration_step() -> Weight { Weight::zero()} + fn migration_noop_step() -> Weight { Weight::zero()} + fn add_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } + fn remove_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } fn migration_noop() -> Weight; fn migrate() -> Weight; fn on_runtime_upgrade_noop() -> Weight; From 3d126ac50c974fbf91f3fbf7f76c855fec1ac982 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 7 Jul 2023 18:31:17 +0200 Subject: [PATCH 40/70] fix merge --- frame/contracts/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 88eb85d8f3966..4773b4359c0ce 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -709,7 +709,6 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; - let code_len = code.len() as u32; let (module, upload_deposit) = Self::try_upload_code( origin.clone(), From 81d674f80bddd28cbef029c4475382c1689dd47e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 16:20:24 +0200 Subject: [PATCH 41/70] PR review https://github.com/paritytech/substrate/pull/14079#discussion_r1255904563 --- frame/contracts/src/lib.rs | 2 +- frame/contracts/src/migration/v13.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 4773b4359c0ce..901d36b36780f 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -1021,7 +1021,7 @@ pub mod pallet { /// TWOX-NOTE: SAFE since `AccountId` is a secure hash. #[pallet::storage] pub(crate) type ContractInfoOf = - StorageMap<_, Twox64Concat, T::AccountId, ContractInfo>; + StorageMap<_, Identity, T::AccountId, ContractInfo>; /// Evicted contracts that await child trie deletion. /// diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index 06d090595a287..b3235e3d9b213 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -73,7 +73,7 @@ pub fn store_old_contrat_info(account: T::AccountId, info: crate::Con #[storage_alias] pub type ContractInfoOf = - StorageMap, Twox64Concat, ::AccountId, ContractInfo>; + StorageMap, Identity, ::AccountId, ContractInfo>; #[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] From 16cab18eef3ede87378ebd5f815295c22e9b237f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 16:26:18 +0200 Subject: [PATCH 42/70] PR review https://github.com/paritytech/substrate/pull/14079/files#r1257521373 --- frame/contracts/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 901d36b36780f..170ef0147ec6e 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -709,6 +709,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { Migration::::ensure_migrated()?; let origin = ensure_signed(origin)?; + let code_len = code.len() as u32; let (module, upload_deposit) = Self::try_upload_code( origin.clone(), @@ -743,7 +744,7 @@ pub mod pallet { output.gas_meter.into_dispatch_result( output.result.map(|(_address, output)| output), - T::WeightInfo::instantiate(data_len, salt_len), + T::WeightInfo::instantiate_with_code(code_len, data_len, salt_len), ) } From f18194b9b3ca0ad6761a8f1ca310f5b657db2c32 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 16:34:30 +0200 Subject: [PATCH 43/70] PR review remove optimisation https://github.com/paritytech/substrate/pull/14079/files#r1263312237 --- frame/contracts/src/benchmarking/mod.rs | 14 -------------- frame/contracts/src/migration/v13.rs | 2 +- frame/contracts/src/weights.rs | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 7071cd0f075ac..3b3c795db168b 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -270,20 +270,6 @@ benchmarks! { m.step(); } - // This benchmarks the last iteration of a migration step, when we are passed the last key of a map. - // This benchmark is using `v13::Migration` but this can be used for any migration step that follow the same logic of - // iterating over a map and mutating the next entry. - #[pov_mode = Measured] - migration_noop_step { - let contract = >::with_caller( - whitelisted_caller(), WasmModule::dummy(), vec![], - )?; - - let mut m = v13::Migration::::default(); - }: { - m.step(); - } - // This benchmarks the weight of executing Migration::migrate to execute a noop migration. #[pov_mode = Measured] migration_noop { diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index b3235e3d9b213..07db7a6eb4af5 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -128,7 +128,7 @@ impl MigrationStep for Migration { (IsFinished::No, T::WeightInfo::v13_migration_step()) } else { log::debug!(target: LOG_TARGET, "No more contracts to migrate"); - (IsFinished::Yes, T::WeightInfo::migration_noop_step()) + (IsFinished::Yes, T::WeightInfo::v13_migration_step()) } } } diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 624f3ba219d0b..f8d11318708c1 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -57,7 +57,6 @@ pub trait WeightInfo { fn v11_migration_step(k: u32, ) -> Weight; fn v12_migration_step(c: u32, ) -> Weight; fn v13_migration_step() -> Weight { Weight::zero()} - fn migration_noop_step() -> Weight { Weight::zero()} fn add_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } fn remove_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } fn migration_noop() -> Weight; From 0ddaacd8629d2fa376e78bd1004e09264cdca4e8 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 16:38:09 +0200 Subject: [PATCH 44/70] PR review fix return type https://github.com/paritytech/substrate/pull/14079/files#r1263315804 --- frame/contracts/src/wasm/runtime.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 9c264040ded39..cdee2111c4642 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2829,26 +2829,18 @@ pub mod env { } #[unstable] - fn add_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.add_delegate_dependency(code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } #[unstable] - fn remove_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.remove_delegate_dependency(&code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } } From b12319c02237a97c36065015cdd7b80b69e834a4 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 14 Jul 2023 16:39:12 +0200 Subject: [PATCH 45/70] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/storage.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 904cdda880ea5..c8148f1841588 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -217,6 +217,7 @@ impl ContractInfo { } /// Sets and returns the contract base deposit. + /// /// `upload_deposit` is the balance of the deposit paid for uploading the contract. pub fn update_base_deposit(&mut self, upload_deposit: BalanceOf) -> BalanceOf { let ed = Pallet::::min_balance(); From 0b761d6eb80f790b0e872614e3a46fa2783d51bb Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 16:55:25 +0200 Subject: [PATCH 46/70] PR review pass CodeInfo and update docstring https://github.com/paritytech/substrate/pull/14079/files#r1257522327 --- frame/contracts/src/exec.rs | 2 +- frame/contracts/src/storage.rs | 7 ++++--- frame/contracts/src/storage/meter.rs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 717fca1046d90..e6109c748c390 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1483,7 +1483,7 @@ where let code_info = CodeInfoOf::::get(hash).ok_or(Error::::CodeNotFound)?; let old_base_deposit = info.storage_base_deposit(); - let new_base_deposit = info.update_base_deposit(code_info.deposit()); + let new_base_deposit = info.update_base_deposit(&code_info); let deposit = if new_base_deposit > old_base_deposit { StorageDeposit::Charge(new_base_deposit - old_base_deposit) } else { diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index c8148f1841588..0c87e27fe2000 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -218,8 +218,9 @@ impl ContractInfo { /// Sets and returns the contract base deposit. /// - /// `upload_deposit` is the balance of the deposit paid for uploading the contract. - pub fn update_base_deposit(&mut self, upload_deposit: BalanceOf) -> BalanceOf { + /// The base deposit is updated when the `code_hash` of the contract changes, as it depends on + /// the deposit paid to upload the contract's code. + pub fn update_base_deposit(&mut self, code_info: &crate::CodeInfo) -> BalanceOf { let ed = Pallet::::min_balance(); let info_deposit = Diff { bytes_added: self.encoded_size() as u32, items_added: 1, ..Default::default() } @@ -229,7 +230,7 @@ impl ContractInfo { // Instantiating the contract, prevent it to be deleted, therefore the base deposit includes // a fraction (`T::CodeHashLockupDepositPercent`) of the original storage deposit to prevent // abuse. - let upload_deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(upload_deposit); + let upload_deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(code_info.deposit()); // Instantiate needs to transfer at least the minimum balance in order to pull the // deposit account into existence. diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 8201dff09042e..562bbe219c1b0 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -429,7 +429,7 @@ where let ed = Pallet::::min_balance(); let code_info = CodeInfoOf::::get(info.code_hash).ok_or(Error::::CodeNotFound)?; - let deposit = info.update_base_deposit(code_info.deposit()); + let deposit = info.update_base_deposit(&code_info); if deposit > self.limit { return Err(>::StorageDepositLimitExhausted.into()) } From c6ce4baa568d087d8f7ab5ecd252bcb0d0de1426 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 17:10:45 +0200 Subject: [PATCH 47/70] PR review add code_info to the executable https://github.com/paritytech/substrate/pull/14079/files#r1263309049 --- frame/contracts/src/exec.rs | 12 ++++++++---- frame/contracts/src/storage.rs | 4 ++-- frame/contracts/src/storage/meter.rs | 5 ++--- frame/contracts/src/wasm/mod.rs | 4 ++++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 1a8beb22dd550..04e97e615aad5 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -18,9 +18,9 @@ use crate::{ gas::GasMeter, storage::{self, DepositAccount, WriteOutcome}, - BalanceOf, CodeHash, CodeInfoOf, Config, ContractInfo, ContractInfoOf, DebugBufferVec, - Determinism, Error, Event, Nonce, Origin, Pallet as Contracts, Schedule, System, WasmBlob, - LOG_TARGET, + BalanceOf, CodeHash, CodeInfo, CodeInfoOf, Config, ContractInfo, ContractInfoOf, + DebugBufferVec, Determinism, Error, Event, Nonce, Origin, Pallet as Contracts, Schedule, + System, WasmBlob, LOG_TARGET, }; use frame_support::{ crypto::ecdsa::ECDSAExt, @@ -37,7 +37,7 @@ use frame_support::{ Blake2_128Concat, BoundedVec, StorageHasher, }; use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; -use pallet_contracts_primitives::ExecReturnValue; +use pallet_contracts_primitives::{ExecReturnValue, StorageDeposit}; use smallvec::{Array, SmallVec}; use sp_core::{ ecdsa::Public as ECDSAPublic, @@ -397,6 +397,9 @@ pub trait Executable: Sized { input_data: Vec, ) -> ExecResult; + /// The code info of the executable. + fn code_info(&self) -> &CodeInfo; + /// The code hash of the executable. fn code_hash(&self) -> &CodeHash; @@ -893,6 +896,7 @@ where origin, &frame.account_id, frame.contract_info.get(&frame.account_id), + executable.code_info(), )?; } diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 0c87e27fe2000..10ad3de32083c 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -22,7 +22,7 @@ pub mod meter; use crate::{ exec::{AccountIdOf, Key}, weights::WeightInfo, - AddressGenerator, BalanceOf, CodeHash, Config, ContractInfoOf, DeletionQueue, + AddressGenerator, BalanceOf, CodeHash, CodeInfo, Config, ContractInfoOf, DeletionQueue, DeletionQueueCounter, Error, Pallet, TrieId, SENTINEL, }; use codec::{Decode, Encode, MaxEncodedLen}; @@ -220,7 +220,7 @@ impl ContractInfo { /// /// The base deposit is updated when the `code_hash` of the contract changes, as it depends on /// the deposit paid to upload the contract's code. - pub fn update_base_deposit(&mut self, code_info: &crate::CodeInfo) -> BalanceOf { + pub fn update_base_deposit(&mut self, code_info: &CodeInfo) -> BalanceOf { let ed = Pallet::::min_balance(); let info_deposit = Diff { bytes_added: self.encoded_size() as u32, items_added: 1, ..Default::default() } diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 562bbe219c1b0..259eed124faab 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -19,8 +19,7 @@ use crate::{ storage::{ContractInfo, DepositAccount}, - BalanceOf, CodeInfoOf, Config, Error, Inspect, Origin, Pallet, StorageDeposit as Deposit, - System, + BalanceOf, CodeInfo, Config, Error, Inspect, Origin, Pallet, StorageDeposit as Deposit, System, }; use frame_support::{ @@ -424,11 +423,11 @@ where origin: &T::AccountId, contract: &T::AccountId, info: &mut ContractInfo, + code_info: &CodeInfo, ) -> Result, DispatchError> { debug_assert!(self.is_alive()); let ed = Pallet::::min_balance(); - let code_info = CodeInfoOf::::get(info.code_hash).ok_or(Error::::CodeNotFound)?; let deposit = info.update_base_deposit(&code_info); if deposit > self.limit { return Err(>::StorageDepositLimitExhausted.into()) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index aac40396e9636..b596c48bdebb4 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -411,6 +411,10 @@ impl Executable for WasmBlob { &self.code_hash } + fn code_info(&self) -> &CodeInfo { + &self.code_info + } + fn code_len(&self) -> u32 { self.code.len() as u32 } From fe051510ac521b149a3eaf3c3156cfe150884689 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 17:12:35 +0200 Subject: [PATCH 48/70] rename info -> contract_info --- frame/contracts/src/storage/meter.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 259eed124faab..27a5f2e21a93d 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -422,13 +422,13 @@ where &mut self, origin: &T::AccountId, contract: &T::AccountId, - info: &mut ContractInfo, + contract_info: &mut ContractInfo, code_info: &CodeInfo, ) -> Result, DispatchError> { debug_assert!(self.is_alive()); let ed = Pallet::::min_balance(); - let deposit = info.update_base_deposit(&code_info); + let deposit = contract_info.update_base_deposit(&code_info); if deposit > self.limit { return Err(>::StorageDepositLimitExhausted.into()) } @@ -444,12 +444,12 @@ where // charges possibly below the ed are collected and fail. E::charge( origin, - info.deposit_account(), + contract_info.deposit_account(), &deposit.saturating_sub(&Deposit::Charge(ed)), false, )?; - System::::inc_consumers(info.deposit_account())?; + System::::inc_consumers(contract_info.deposit_account())?; // We also need to make sure that the contract's account itself exists. T::Currency::transfer(origin, contract, ed, ExistenceRequirement::KeepAlive)?; From bdd78891398b7e10ad7dbce9773abb7665b744e6 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 14 Jul 2023 17:18:19 +0200 Subject: [PATCH 49/70] Update frame/contracts/src/exec.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/exec.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 04e97e615aad5..7f0e1e596f353 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1487,11 +1487,7 @@ where let old_base_deposit = info.storage_base_deposit(); let new_base_deposit = info.update_base_deposit(&code_info); - let deposit = if new_base_deposit > old_base_deposit { - StorageDeposit::Charge(new_base_deposit - old_base_deposit) - } else { - StorageDeposit::Refund(old_base_deposit - new_base_deposit) - }; + let deposit = StorageDeposit::Charge(new_base_deposit).saturating_sub( StorageDeposit::Charge(old_base_deposit)); let deposit_account = info.deposit_account().clone(); frame.nested_storage.charge_deposit(deposit_account, deposit); From 46a961708295bdc0b0bf0644bda245319fcc040c Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 21 Jul 2023 08:59:54 +0200 Subject: [PATCH 50/70] Update frame/contracts/fixtures/add_remove_delegate_dependency.wat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/fixtures/add_remove_delegate_dependency.wat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index d3938d507880c..cff33a0b886b9 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -2,9 +2,9 @@ (module (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) - (import "seal0" "seal_input" (func $seal_input (param i32 i32))) - (import "seal0" "seal_terminate" (func $seal_terminate (param i32 i32))) - (import "seal0" "seal_delegate_call" (func $seal_delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) + (import "seal0" "input" (func $input (param i32 i32))) + (import "seal0" "terminate" (func $terminate (param i32 i32))) + (import "seal0" "delegate_call" (func $delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory 1 1)) ;; [100, 132) Address of Alice From b2243628ff32776dfc2dee92c99709c5ca95608a Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Fri, 21 Jul 2023 09:05:18 +0200 Subject: [PATCH 51/70] Update frame/contracts/src/migration/v13.rs --- frame/contracts/src/migration/v13.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index 07db7a6eb4af5..c4c147eb6ca22 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -16,6 +16,7 @@ // limitations under the License. //! Add `delegate_dependencies` to `ContractInfo`. +//! Use `Identity` instead of `Twox64Concat` for hashing keys of the `ContractInfoOf` storage map //! See . use crate::{ From f7d6b996d4342ec7e8cbbba2da4aa0d49756c2ca Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 14 Jul 2023 17:44:20 +0200 Subject: [PATCH 52/70] fix tests --- frame/contracts/src/exec.rs | 13 ++++++++++++- frame/contracts/src/tests.rs | 4 ++-- frame/contracts/src/wasm/mod.rs | 1 + frame/contracts/src/wasm/runtime.rs | 16 ++++++++++++---- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index 7f0e1e596f353..fc841f15ee669 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1635,6 +1635,7 @@ mod tests { func: Rc ExecResult + 'static>, func_type: ExportedFunction, code_hash: CodeHash, + code_info: CodeInfo, refcount: u64, } @@ -1659,7 +1660,13 @@ mod tests { loader.counter += 1; loader.map.insert( hash, - MockExecutable { func: Rc::new(f), func_type, code_hash: hash, refcount: 1 }, + MockExecutable { + func: Rc::new(f), + func_type, + code_hash: hash, + code_info: CodeInfo::::new(ALICE), + refcount: 1, + }, ); hash }) @@ -1729,6 +1736,10 @@ mod tests { &self.code_hash } + fn code_info(&self) -> &CodeInfo { + &self.code_info + } + fn code_len(&self) -> u32 { 0 } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 686017ba56930..de367c43c8a6b 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -52,9 +52,9 @@ use sp_core::ByteArray; use sp_io::hashing::blake2_256; use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; use sp_runtime::{ - testing::{Header, H256}, + testing::H256, traits::{BlakeTwo256, Convert, Hash, IdentityLookup}, - AccountId32, BuildStorage, TokenError, + AccountId32, BuildStorage, Perbill, TokenError, }; use std::ops::Deref; diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index b596c48bdebb4..49d7763751f9e 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -307,6 +307,7 @@ impl CodeInfo { owner, deposit: Default::default(), refcount: 0, + code_len: 0, determinism: Determinism::Enforced, } } diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 1ab1408e5b056..c6d01a9a65921 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2829,18 +2829,26 @@ pub mod env { } #[unstable] - fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { + fn add_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.add_delegate_dependency(code_hash)?; - Ok(()) + Ok(ReturnCode::Success) } #[unstable] - fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { + fn remove_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.remove_delegate_dependency(&code_hash)?; - Ok(()) + Ok(ReturnCode::Success) } } From fdd461352aee46f0f42c66f0d15d9e80b919231f Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 21 Jul 2023 09:17:41 +0200 Subject: [PATCH 53/70] Fmt & fix tests --- .../contracts/fixtures/add_remove_delegate_dependency.wat | 8 ++++---- frame/contracts/src/exec.rs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index cff33a0b886b9..2eed06c04187a 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -38,7 +38,7 @@ (i32.store (i32.const 0) (i32.const 512)) ;; Read input data. - (call $seal_input (i32.const 4) (i32.const 0)) + (call $input (i32.const 4) (i32.const 0)) ;; Input data layout. ;; [0..4) - size of the call @@ -82,11 +82,11 @@ ;; Call terminate when action == 3. (if (i32.eq (get_local $action) (i32.const 3)) (then - (call $seal_terminate + (call $terminate (i32.const 100) ;; Pointer to beneficiary address (i32.const 32) ;; Length of beneficiary address ) - (unreachable) ;; seal_terminate never returns + (unreachable) ;; terminate never returns ) (else) ) @@ -102,7 +102,7 @@ ;; Delegate call into passed code hash. (call $assert (i32.eq - (call $seal_delegate_call + (call $delegate_call (i32.const 0) ;; Set no call flags. (i32.const 8) ;; Pointer to "callee" code_hash. (i32.const 0) ;; Input is ignored. diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index fc841f15ee669..97fdd17e21aa8 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -1487,7 +1487,8 @@ where let old_base_deposit = info.storage_base_deposit(); let new_base_deposit = info.update_base_deposit(&code_info); - let deposit = StorageDeposit::Charge(new_base_deposit).saturating_sub( StorageDeposit::Charge(old_base_deposit)); + let deposit = StorageDeposit::Charge(new_base_deposit) + .saturating_sub(&StorageDeposit::Charge(old_base_deposit)); let deposit_account = info.deposit_account().clone(); frame.nested_storage.charge_deposit(deposit_account, deposit); From a876168f2054edf84d720c666387583ccbe78dcd Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 08:21:15 +0200 Subject: [PATCH 54/70] Test Result<(), _> return type --- .../fixtures/add_remove_delegate_dependency.wat | 4 ++-- frame/contracts/src/wasm/runtime.rs | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index 2eed06c04187a..e2df7f285b186 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -1,7 +1,7 @@ ;; This contract tests the behavior of adding / removing delegate_dependencies when delegate calling into a contract. (module - (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) - (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) (import "seal0" "input" (func $input (param i32 i32))) (import "seal0" "terminate" (func $terminate (param i32 i32))) (import "seal0" "delegate_call" (func $delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index c6d01a9a65921..1ab1408e5b056 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2829,26 +2829,18 @@ pub mod env { } #[unstable] - fn add_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.add_delegate_dependency(code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } #[unstable] - fn remove_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.remove_delegate_dependency(&code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } } From c81d6a04b8ce14756db0ff18207fda68eb9db52c Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Mon, 24 Jul 2023 08:49:41 +0200 Subject: [PATCH 55/70] Update frame/contracts/src/migration.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/migration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 4334dee9d948b..850d8acefd5b2 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -61,6 +61,7 @@ pub mod v10; pub mod v11; pub mod v12; pub mod v13; + use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET}; use codec::{Codec, Decode}; use frame_support::{ From 3cbb6161d1abd9520cd9f8519b4dfbf4f29a2998 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 09:01:04 +0200 Subject: [PATCH 56/70] Revert "Test Result<(), _> return type" This reverts commit a876168f2054edf84d720c666387583ccbe78dcd. --- .../fixtures/add_remove_delegate_dependency.wat | 4 ++-- frame/contracts/src/wasm/runtime.rs | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index e2df7f285b186..2eed06c04187a 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -1,7 +1,7 @@ ;; This contract tests the behavior of adding / removing delegate_dependencies when delegate calling into a contract. (module - (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32))) - (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) (import "seal0" "input" (func $input (param i32 i32))) (import "seal0" "terminate" (func $terminate (param i32 i32))) (import "seal0" "delegate_call" (func $delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 1ab1408e5b056..c6d01a9a65921 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2829,18 +2829,26 @@ pub mod env { } #[unstable] - fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { + fn add_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.add_delegate_dependency(code_hash)?; - Ok(()) + Ok(ReturnCode::Success) } #[unstable] - fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { + fn remove_delegate_dependency( + ctx: _, + memory: _, + code_hash_ptr: u32, + ) -> Result { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.remove_delegate_dependency(&code_hash)?; - Ok(()) + Ok(ReturnCode::Success) } } From de001968e74f8e8eeba818ce4fb4b16e2bae62dd Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 09:20:03 +0200 Subject: [PATCH 57/70] add / update doc comments --- frame/contracts/src/storage/meter.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 27a5f2e21a93d..fa3876ded8015 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -397,7 +397,7 @@ where T: Config, E: Ext, { - /// Charge `diff` from the meter. + /// Charges `diff` from the meter. pub fn charge(&mut self, diff: &Diff) { match &mut self.own_contribution { Contribution::Alive(own) => *own = own.saturating_add(diff), @@ -409,13 +409,14 @@ where /// /// Use this method instead of [`Self::charge`] when the charge is not the result of a storage /// change. This is the case when a `delegate_dependency` is added or removed, or when the - /// `code_hash` is updated. + /// `code_hash` is updated. `[Self::charge]` can not be used here because we keep track of the + /// deposit charge separately from the storage charge. pub fn charge_deposit(&mut self, deposit_account: DepositAccount, amount: DepositOf) { self.total_deposit = self.total_deposit.saturating_add(&amount); self.charges.push(Charge { deposit_account, amount, terminated: false }); } - /// Charge from `origin` a storage deposit for contract instantiation. + /// Charges from `origin` a storage deposit for contract instantiation. /// /// This immediately transfers the balance in order to create the account. pub fn charge_instantiate( From 2ff64255ac906e7d5b5ccf9f6ca1b7a9351528ad Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 09:26:30 +0200 Subject: [PATCH 58/70] fix backticks --- frame/contracts/src/storage/meter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index fa3876ded8015..90c33a22443c5 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -409,8 +409,8 @@ where /// /// Use this method instead of [`Self::charge`] when the charge is not the result of a storage /// change. This is the case when a `delegate_dependency` is added or removed, or when the - /// `code_hash` is updated. `[Self::charge]` can not be used here because we keep track of the - /// deposit charge separately from the storage charge. + /// `code_hash` is updated. [`Self::charge`] cannot be used here because we keep track of the + /// deposit charg separately from the storage charge. pub fn charge_deposit(&mut self, deposit_account: DepositAccount, amount: DepositOf) { self.total_deposit = self.total_deposit.saturating_add(&amount); self.charges.push(Charge { deposit_account, amount, terminated: false }); From 564169b6bfef73103ac40f6ebce946b7352b35bf Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 13:56:41 +0200 Subject: [PATCH 59/70] Revert "Revert "Test Result<(), _> return type"" This reverts commit 3cbb6161d1abd9520cd9f8519b4dfbf4f29a2998. --- .../fixtures/add_remove_delegate_dependency.wat | 4 ++-- frame/contracts/src/wasm/runtime.rs | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index 2eed06c04187a..e2df7f285b186 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -1,7 +1,7 @@ ;; This contract tests the behavior of adding / removing delegate_dependencies when delegate calling into a contract. (module - (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) - (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) (import "seal0" "input" (func $input (param i32 i32))) (import "seal0" "terminate" (func $terminate (param i32 i32))) (import "seal0" "delegate_call" (func $delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index c6d01a9a65921..1ab1408e5b056 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2829,26 +2829,18 @@ pub mod env { } #[unstable] - fn add_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.add_delegate_dependency(code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } #[unstable] - fn remove_delegate_dependency( - ctx: _, - memory: _, - code_hash_ptr: u32, - ) -> Result { + fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; let code_hash = ctx.read_sandbox_memory_as(memory, code_hash_ptr)?; ctx.ext.remove_delegate_dependency(&code_hash)?; - Ok(ReturnCode::Success) + Ok(()) } } From a1da12369172b57d445503a8f7c7e78bb6c58edf Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 14:02:54 +0200 Subject: [PATCH 60/70] fix bench --- .../fixtures/add_remove_delegate_dependency.wat | 14 ++++---------- frame/contracts/src/benchmarking/mod.rs | 8 ++++---- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index e2df7f285b186..d2250b5517b98 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -58,11 +58,7 @@ ;; Call add_delegate_dependency when action == 1. (if (i32.eq (get_local $action) (i32.const 1)) (then - (call $assert (i32.eqz - (call $add_delegate_dependency - (get_local $code_hash_ptr) - ) - )) + (call $add_delegate_dependency (get_local $code_hash_ptr)) ) (else) ) @@ -70,11 +66,9 @@ ;; Call remove_delegate_dependency when action == 2. (if (i32.eq (get_local $action) (i32.const 2)) (then - (call $assert (i32.eqz - (call $remove_delegate_dependency - (get_local $code_hash_ptr) - ) - )) + (call $remove_delegate_dependency + (get_local $code_hash_ptr) + ) ) (else) ) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index ee8f01c16e5d9..73cad729f60fd 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -870,7 +870,7 @@ benchmarks! { module: "seal0", name: "add_delegate_dependency", params: vec![ValueType::I32], - return_type: Some(ValueType::I32), + return_type: None, } ], data_segments: vec![ @@ -2388,7 +2388,7 @@ benchmarks! { module: "seal0", name: "add_delegate_dependency", params: vec![ValueType::I32], - return_type: Some(ValueType::I32), + return_type: None, }], data_segments: vec![ DataSegment { @@ -2426,12 +2426,12 @@ benchmarks! { module: "seal0", name: "remove_delegate_dependency", params: vec![ValueType::I32], - return_type: Some(ValueType::I32), + return_type: None, }, ImportedFunction { module: "seal0", name: "add_delegate_dependency", params: vec![ValueType::I32], - return_type: Some(ValueType::I32), + return_type: None }], data_segments: vec![ DataSegment { From a8e8fa4b634c0e17614f2f47c967e54b686fbd9b Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 14:27:28 +0200 Subject: [PATCH 61/70] fix bench --- frame/contracts/src/benchmarking/mod.rs | 4 ---- frame/contracts/src/wasm/mod.rs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 73cad729f60fd..789bf00673573 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -886,7 +886,6 @@ benchmarks! { deploy_body: Some(body::repeated_dyn(r, vec![ Counter(beneficiary_len as u32, code_hash_len as u32), // code_hash_ptr Regular(Instruction::Call(1)), - Regular(Instruction::Drop), ])), call_body: Some(body::repeated(r, &[ Instruction::I32Const(0), // beneficiary_ptr @@ -2399,7 +2398,6 @@ benchmarks! { call_body: Some(body::repeated_dyn(r, vec![ Counter(0, code_hash_len as u32), // code_hash_ptr Regular(Instruction::Call(0)), - Regular(Instruction::Drop), ])), .. Default::default() }); @@ -2442,12 +2440,10 @@ benchmarks! { deploy_body: Some(body::repeated_dyn(r, vec![ Counter(0, code_hash_len as u32), // code_hash_ptr Regular(Instruction::Call(1)), - Regular(Instruction::Drop), ])), call_body: Some(body::repeated_dyn(r, vec![ Counter(0, code_hash_len as u32), // code_hash_ptr Regular(Instruction::Call(0)), - Regular(Instruction::Drop), ])), .. Default::default() }); diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 49d7763751f9e..6482e0659ff13 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -3363,8 +3363,8 @@ mod tests { fn add_remove_delegate_dependency() { const CODE_ADD_REMOVE_DELEGATE_DEPENDENCY: &str = r#" (module - (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32) (result i32))) - (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32) (result i32))) + (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32))) + (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) (import "env" "memory" (memory 1 1)) (func (export "call") (drop (call $add_delegate_dependency (i32.const 0))) From 2cbe99f1e0430979980d56b8cb6c78ef0396700a Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 14:29:24 +0200 Subject: [PATCH 62/70] fix --- frame/contracts/src/wasm/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 6482e0659ff13..5bf0b0cc94b7b 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -3367,9 +3367,9 @@ mod tests { (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) (import "env" "memory" (memory 1 1)) (func (export "call") - (drop (call $add_delegate_dependency (i32.const 0))) - (drop (call $add_delegate_dependency (i32.const 32))) - (drop (call $remove_delegate_dependency (i32.const 32))) + (call $add_delegate_dependency (i32.const 0)) + (call $add_delegate_dependency (i32.const 32)) + (call $remove_delegate_dependency (i32.const 32)) ) (func (export "deploy")) From 59755eb7a08987b2efb40f4467e5c7abd011dbd6 Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Mon, 24 Jul 2023 16:19:24 +0200 Subject: [PATCH 63/70] Update frame/contracts/src/storage/meter.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Theißen --- frame/contracts/src/storage/meter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 90c33a22443c5..5b3a2388bbafe 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -410,7 +410,7 @@ where /// Use this method instead of [`Self::charge`] when the charge is not the result of a storage /// change. This is the case when a `delegate_dependency` is added or removed, or when the /// `code_hash` is updated. [`Self::charge`] cannot be used here because we keep track of the - /// deposit charg separately from the storage charge. + /// deposit charge separately from the storage charge. pub fn charge_deposit(&mut self, deposit_account: DepositAccount, amount: DepositOf) { self.total_deposit = self.total_deposit.saturating_add(&amount); self.charges.push(Charge { deposit_account, amount, terminated: false }); From 6316417cca3a8f656e38384c9a5d68da5e47a6e9 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Mon, 24 Jul 2023 17:11:55 +0200 Subject: [PATCH 64/70] rm stale comments --- frame/contracts/src/wasm/runtime.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 1ab1408e5b056..363132ac8a286 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -1579,9 +1579,6 @@ pub mod env { /// length to `output_len_ptr`. The copy of the output buffer and address can be skipped by /// supplying the sentinel value of `SENTINEL` to `output_ptr` or `address_ptr`. /// - /// `value` must be at least the minimum balance. Otherwise the instantiation fails and the - /// contract is not created. - /// /// # Parameters /// /// - `code_hash_ptr`: a pointer to the buffer that contains the initializer code. From 02487341736ba684a56b1955fdfd11fc90524e1e Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Tue, 25 Jul 2023 22:35:29 +0200 Subject: [PATCH 65/70] Apply suggestions from code review Co-authored-by: Sasha Gryaznov --- frame/contracts/src/benchmarking/mod.rs | 2 +- frame/contracts/src/migration/v13.rs | 2 +- frame/contracts/src/storage.rs | 4 ++-- frame/contracts/src/tests.rs | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 789bf00673573..c081d8b995d5b 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -264,7 +264,7 @@ benchmarks! { whitelisted_caller(), WasmModule::dummy(), vec![], )?; - v13::store_old_contrat_info::(contract.account_id.clone(), contract.info()?); + v13::store_old_contract_info::(contract.account_id.clone(), contract.info()?); let mut m = v13::Migration::::default(); }: { m.step(); diff --git a/frame/contracts/src/migration/v13.rs b/frame/contracts/src/migration/v13.rs index c4c147eb6ca22..a512e6c074d23 100644 --- a/frame/contracts/src/migration/v13.rs +++ b/frame/contracts/src/migration/v13.rs @@ -58,7 +58,7 @@ mod old { } #[cfg(feature = "runtime-benchmarks")] -pub fn store_old_contrat_info(account: T::AccountId, info: crate::ContractInfo) { +pub fn store_old_contract_info(account: T::AccountId, info: crate::ContractInfo) { let info = old::ContractInfo { trie_id: info.trie_id.clone(), deposit_account: info.deposit_account().clone(), diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 10ad3de32083c..fa26bb89f970d 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -227,7 +227,7 @@ impl ContractInfo { .update_contract::(None) .charge_or_zero(); - // Instantiating the contract, prevent it to be deleted, therefore the base deposit includes + // Instantiating the contract prevents its code to be deleted, therefore the base deposit includes // a fraction (`T::CodeHashLockupDepositPercent`) of the original storage deposit to prevent // abuse. let upload_deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(code_info.deposit()); @@ -258,7 +258,7 @@ impl ContractInfo { .map_err(Into::into) } - /// Removes a delegate dependency from the contract. + /// Removes the delegate dependency from the contract and returns the deposit held for this dependency. /// /// Returns an error if the entry doesn't exist. pub fn remove_delegate_dependency( diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index de367c43c8a6b..2960be1928e4b 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -5444,7 +5444,7 @@ fn add_remove_delegate_dependency_works() { Contracts::bare_upload_code(ALICE, wasm_callee.clone(), None, Determinism::Enforced) .unwrap(); - // Instantiate should now works. + // Instantiate should now work. let addr_caller = instantiate(&add_delegate_dependency_input).result.unwrap().account_id; // There should be a dependency and a deposit. @@ -5493,7 +5493,7 @@ fn add_remove_delegate_dependency_works() { Error::::DelegateDependencyNotFound ); - // Adding a depedendency with a storage limit too low should fail. + // Adding a dependency with a storage limit too low should fail. DEFAULT_DEPOSIT_LIMIT.with(|c| *c.borrow_mut() = dependency_deposit - 1); assert_err!( call(&addr_caller, &add_delegate_dependency_input).result, @@ -5511,7 +5511,7 @@ fn add_remove_delegate_dependency_works() { Contracts::bare_upload_code(ALICE, wasm_callee, None, Determinism::Enforced).unwrap(); call(&addr_caller, &add_delegate_dependency_input).result.unwrap(); - // Call terninate should work, and return the deposit. + // Call terminate should work, and return the deposit. let balance_before = test_utils::get_balance(&ALICE); assert_ok!(call(&addr_caller, &terminate_input).result); assert_eq!(test_utils::get_balance(&ALICE), balance_before + 2 * ED + dependency_deposit); From e7862f0c22e2a3a64a5f9490db6d8e8c8cb61ed1 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 25 Jul 2023 22:46:55 +0200 Subject: [PATCH 66/70] PR suggestion --- frame/contracts/fixtures/add_remove_delegate_dependency.wat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frame/contracts/fixtures/add_remove_delegate_dependency.wat b/frame/contracts/fixtures/add_remove_delegate_dependency.wat index d2250b5517b98..ef456b6d620a3 100644 --- a/frame/contracts/fixtures/add_remove_delegate_dependency.wat +++ b/frame/contracts/fixtures/add_remove_delegate_dependency.wat @@ -3,7 +3,7 @@ (import "seal0" "add_delegate_dependency" (func $add_delegate_dependency (param i32))) (import "seal0" "remove_delegate_dependency" (func $remove_delegate_dependency (param i32))) (import "seal0" "input" (func $input (param i32 i32))) - (import "seal0" "terminate" (func $terminate (param i32 i32))) + (import "seal1" "terminate" (func $terminate (param i32))) (import "seal0" "delegate_call" (func $delegate_call (param i32 i32 i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory 1 1)) @@ -78,7 +78,6 @@ (then (call $terminate (i32.const 100) ;; Pointer to beneficiary address - (i32.const 32) ;; Length of beneficiary address ) (unreachable) ;; terminate never returns ) From 25be4b07e2270b7bbbe9fac6f0a78d4d5d863532 Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 25 Jul 2023 23:26:08 +0200 Subject: [PATCH 67/70] Add missing doc --- frame/contracts/src/wasm/runtime.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 363132ac8a286..9d29da70a87d9 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -2825,6 +2825,11 @@ pub mod env { Ok(ctx.ext.nonce()) } + /// Adds a new delegate dependency to the contract. + /// + /// # Parameters + /// + /// - `code_hash_ptr`: A pointer to the code hash of the dependency. #[unstable] fn add_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::AddDelegateDependency)?; @@ -2833,6 +2838,11 @@ pub mod env { Ok(()) } + /// Removes the delegate dependency from the contract. + /// + /// # Parameters + /// + /// - `code_hash_ptr`: A pointer to the code hash of the dependency. #[unstable] fn remove_delegate_dependency(ctx: _, memory: _, code_hash_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::RemoveDelegateDependency)?; From 9627c4c97d5696af0f2ac63fa504a22e239841ff Mon Sep 17 00:00:00 2001 From: pgherveou Date: Tue, 25 Jul 2023 23:38:27 +0200 Subject: [PATCH 68/70] fx lint --- frame/contracts/src/storage.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index fa26bb89f970d..7fbd697e509dc 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -227,9 +227,9 @@ impl ContractInfo { .update_contract::(None) .charge_or_zero(); - // Instantiating the contract prevents its code to be deleted, therefore the base deposit includes - // a fraction (`T::CodeHashLockupDepositPercent`) of the original storage deposit to prevent - // abuse. + // Instantiating the contract prevents its code to be deleted, therefore the base deposit + // includes a fraction (`T::CodeHashLockupDepositPercent`) of the original storage deposit + // to prevent abuse. let upload_deposit = T::CodeHashLockupDepositPercent::get().mul_ceil(code_info.deposit()); // Instantiate needs to transfer at least the minimum balance in order to pull the @@ -258,7 +258,8 @@ impl ContractInfo { .map_err(Into::into) } - /// Removes the delegate dependency from the contract and returns the deposit held for this dependency. + /// Removes the delegate dependency from the contract and returns the deposit held for this + /// dependency. /// /// Returns an error if the entry doesn't exist. pub fn remove_delegate_dependency( From e0fe397dcec071d7edf86ddaf75493da7d72e4b4 Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Tue, 25 Jul 2023 23:18:29 +0000 Subject: [PATCH 69/70] ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_contracts --- frame/contracts/src/weights.rs | 5093 ++++++++++++++++---------------- 1 file changed, 2619 insertions(+), 2474 deletions(-) diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index f8d11318708c1..a3e289b0763f6 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -15,22 +15,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for pallet_contracts +//! Autogenerated weights for `pallet_contracts` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-07-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-xerhrdyb-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `runner-ynta1nyy-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: -// target/production/substrate +// target/production/substrate-node // benchmark // pallet // --steps=50 // --repeat=20 // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --json-file=/builds/parity/mirrors/substrate/.git/.artifacts/bench.json @@ -48,7 +47,7 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; -/// Weight functions needed for pallet_contracts. +/// Weight functions needed for `pallet_contracts`. pub trait WeightInfo { fn on_process_deletion_queue_batch() -> Weight; fn on_initialize_per_trie_key(k: u32, ) -> Weight; @@ -56,9 +55,7 @@ pub trait WeightInfo { fn v10_migration_step() -> Weight; fn v11_migration_step(k: u32, ) -> Weight; fn v12_migration_step(c: u32, ) -> Weight; - fn v13_migration_step() -> Weight { Weight::zero()} - fn add_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } - fn remove_delegate_dependency(_c: u32, ) -> Weight { Weight::zero() } + fn v13_migration_step() -> Weight; fn migration_noop() -> Weight; fn migrate() -> Weight; fn on_runtime_upgrade_noop() -> Weight; @@ -125,211 +122,224 @@ pub trait WeightInfo { fn seal_ecdsa_recover(r: u32, ) -> Weight; fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight; fn seal_set_code_hash(r: u32, ) -> Weight; + fn add_delegate_dependency(r: u32, ) -> Weight; + fn remove_delegate_dependency(r: u32, ) -> Weight; fn seal_reentrance_count(r: u32, ) -> Weight; fn seal_account_reentrance_count(r: u32, ) -> Weight; fn seal_instantiation_nonce(r: u32, ) -> Weight; fn instr_i64const(r: u32, ) -> Weight; } -/// Weights for pallet_contracts using the Substrate node and recommended hardware. +/// Weights for `pallet_contracts` using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: Contracts DeletionQueueCounter (r:1 w:0) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:0) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) fn on_process_deletion_queue_batch() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_519_000 picoseconds. - Weight::from_parts(2_660_000, 1627) + // Minimum execution time: 2_527_000 picoseconds. + Weight::from_parts(2_651_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `451 + k * (69 ±0)` // Estimated: `441 + k * (70 ±0)` - // Minimum execution time: 13_096_000 picoseconds. - Weight::from_parts(13_395_000, 441) - // Standard Error: 1_046 - .saturating_add(Weight::from_parts(1_246_238, 0).saturating_mul(k.into())) + // Minimum execution time: 13_291_000 picoseconds. + Weight::from_parts(13_825_000, 441) + // Standard Error: 1_137 + .saturating_add(Weight::from_parts(1_244_309, 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)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(k.into())) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) /// The range of component `c` is `[0, 125952]`. fn v9_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 8_409_000 picoseconds. - Weight::from_parts(9_006_438, 6149) + // Minimum execution time: 8_359_000 picoseconds. + Weight::from_parts(9_179_121, 6149) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_345, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_312, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts ContractInfoOf (r:2 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) + /// Storage: `Contracts::ContractInfoOf` (r:3 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) fn v10_migration_step() -> Weight { // Proof Size summary in bytes: - // Measured: `510` - // Estimated: `6450` - // Minimum execution time: 16_962_000 picoseconds. - Weight::from_parts(17_716_000, 6450) - .saturating_add(T::DbWeight::get().reads(3_u64)) + // Measured: `709` + // Estimated: `9124` + // Minimum execution time: 42_457_000 picoseconds. + Weight::from_parts(44_556_000, 9124) + .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: Contracts DeletionQueue (r:1 w:1025) - /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) - /// Storage: Contracts DeletionQueueCounter (r:0 w:1) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: `Contracts::DeletionQueue` (r:1 w:1025) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:0 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) /// The range of component `k` is `[0, 1024]`. fn v11_migration_step(k: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 3_763_000 picoseconds. - Weight::from_parts(2_401_625, 3635) - // Standard Error: 2_827 - .saturating_add(Weight::from_parts(1_201_671, 0).saturating_mul(k.into())) + // Minimum execution time: 3_839_000 picoseconds. + Weight::from_parts(3_462_337, 3635) + // Standard Error: 1_384 + .saturating_add(Weight::from_parts(1_166_522, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:0 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:0 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn v12_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 17_490_000 picoseconds. - Weight::from_parts(17_712_278, 6263) - // Standard Error: 0 - .saturating_add(Weight::from_parts(427, 0).saturating_mul(c.into())) + // Minimum execution time: 17_001_000 picoseconds. + Weight::from_parts(17_095_380, 6263) + // Standard Error: 1 + .saturating_add(Weight::from_parts(411, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: `Contracts::ContractInfoOf` (r:3 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + fn v13_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `639` + // Estimated: `9054` + // Minimum execution time: 35_342_000 picoseconds. + Weight::from_parts(36_839_000, 9054) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn migration_noop() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 3_282_000 picoseconds. - Weight::from_parts(3_536_000, 1627) + // Minimum execution time: 3_272_000 picoseconds. + Weight::from_parts(3_553_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) fn migrate() -> Weight { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 12_973_000 picoseconds. - Weight::from_parts(13_366_000, 3631) + // Minimum execution time: 12_788_000 picoseconds. + Weight::from_parts(13_163_000, 3631) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) fn on_runtime_upgrade_noop() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_764_000 picoseconds. - Weight::from_parts(5_000_000, 3607) + // Minimum execution time: 4_794_000 picoseconds. + Weight::from_parts(5_086_000, 3607) .saturating_add(T::DbWeight::get().reads(1_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn on_runtime_upgrade_in_progress() -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` // Minimum execution time: 6_616_000 picoseconds. - Weight::from_parts(6_935_000, 3632) + Weight::from_parts(7_034_000, 3632) .saturating_add(T::DbWeight::get().reads(2_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn on_runtime_upgrade() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 6_953_000 picoseconds. - Weight::from_parts(7_440_000, 3607) + // Minimum execution time: 6_985_000 picoseconds. + Weight::from_parts(7_477_000, 3607) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn call_with_code_per_byte(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `786` - // Estimated: `6735 + c * (1 ±0)` - // Minimum execution time: 302_714_000 picoseconds. - Weight::from_parts(271_320_595, 6735) - // Standard Error: 72 - .saturating_add(Weight::from_parts(38_474, 0).saturating_mul(c.into())) + // Measured: `783` + // Estimated: `6732 + c * (1 ±0)` + // Minimum execution time: 306_088_000 picoseconds. + Weight::from_parts(268_361_911, 6732) + // Standard Error: 76 + .saturating_add(Weight::from_parts(38_334, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. @@ -337,1568 +347,1630 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `303` // Estimated: `8745` - // Minimum execution time: 4_506_957_000 picoseconds. - Weight::from_parts(643_316_921, 8745) - // Standard Error: 278 - .saturating_add(Weight::from_parts(112_835, 0).saturating_mul(c.into())) - // Standard Error: 33 - .saturating_add(Weight::from_parts(1_830, 0).saturating_mul(i.into())) - // Standard Error: 33 - .saturating_add(Weight::from_parts(2_022, 0).saturating_mul(s.into())) + // Minimum execution time: 4_224_657_000 picoseconds. + Weight::from_parts(451_557_864, 8745) + // Standard Error: 216 + .saturating_add(Weight::from_parts(111_761, 0).saturating_mul(c.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_794, 0).saturating_mul(i.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(2_013, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(9_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `523` - // Estimated: `6513` - // Minimum execution time: 2_103_482_000 picoseconds. - Weight::from_parts(316_666_183, 6513) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_933, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_803, 0).saturating_mul(s.into())) + // Measured: `527` + // Estimated: `6517` + // Minimum execution time: 2_029_313_000 picoseconds. + Weight::from_parts(353_077_600, 6517) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_781, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_729, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn call() -> Weight { // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `6760` - // Minimum execution time: 207_530_000 picoseconds. - Weight::from_parts(217_243_000, 6760) + // Measured: `817` + // Estimated: `6757` + // Minimum execution time: 204_086_000 picoseconds. + Weight::from_parts(216_738_000, 6757) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn upload_code(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 246_381_000 picoseconds. - Weight::from_parts(242_933_576, 3607) - // Standard Error: 100 - .saturating_add(Weight::from_parts(74_645, 0).saturating_mul(c.into())) + // Minimum execution time: 269_337_000 picoseconds. + Weight::from_parts(220_186_006, 3607) + // Standard Error: 106 + .saturating_add(Weight::from_parts(74_291, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) fn remove_code() -> Weight { // Proof Size summary in bytes: - // Measured: `255` - // Estimated: `3720` - // Minimum execution time: 35_519_000 picoseconds. - Weight::from_parts(36_813_000, 3720) + // Measured: `259` + // Estimated: `3724` + // Minimum execution time: 35_127_000 picoseconds. + Weight::from_parts(36_180_000, 3724) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:2) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `575` - // Estimated: `8990` - // Minimum execution time: 37_769_000 picoseconds. - Weight::from_parts(39_349_000, 8990) + // Measured: `576` + // Estimated: `8991` + // Minimum execution time: 37_550_000 picoseconds. + Weight::from_parts(39_149_000, 8991) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `860 + r * (6 ±0)` - // Estimated: `6801 + r * (6 ±0)` - // Minimum execution time: 273_355_000 picoseconds. - Weight::from_parts(280_115_308, 6801) - // Standard Error: 662 - .saturating_add(Weight::from_parts(351_066, 0).saturating_mul(r.into())) + // Measured: `857 + r * (6 ±0)` + // Estimated: `6798 + r * (6 ±0)` + // Minimum execution time: 269_991_000 picoseconds. + Weight::from_parts(293_993_592, 6798) + // Standard Error: 665 + .saturating_add(Weight::from_parts(343_796, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_is_contract(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `918 + r * (240 ±0)` - // Estimated: `6822 + r * (2715 ±0)` - // Minimum execution time: 264_066_000 picoseconds. - Weight::from_parts(103_474_597, 6822) - // Standard Error: 7_010 - .saturating_add(Weight::from_parts(3_917_988, 0).saturating_mul(r.into())) + // Measured: `924 + r * (232 ±0)` + // Estimated: `6831 + r * (2707 ±0)` + // Minimum execution time: 274_151_000 picoseconds. + Weight::from_parts(83_529_206, 6831) + // Standard Error: 8_452 + .saturating_add(Weight::from_parts(3_534_024, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2707).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `910 + r * (244 ±0)` - // Estimated: `6826 + r * (2719 ±0)` - // Minimum execution time: 275_726_000 picoseconds. - Weight::from_parts(111_512_451, 6826) - // Standard Error: 6_673 - .saturating_add(Weight::from_parts(4_626_511, 0).saturating_mul(r.into())) + // Measured: `910 + r * (236 ±0)` + // Estimated: `6835 + r * (2711 ±0)` + // Minimum execution time: 276_689_000 picoseconds. + Weight::from_parts(110_268_281, 6835) + // Standard Error: 8_106 + .saturating_add(Weight::from_parts(4_376_136, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2711).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_own_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `867 + r * (6 ±0)` - // Estimated: `6809 + r * (6 ±0)` - // Minimum execution time: 274_377_000 picoseconds. - Weight::from_parts(286_299_699, 6809) - // Standard Error: 521 - .saturating_add(Weight::from_parts(419_417, 0).saturating_mul(r.into())) + // Measured: `864 + r * (6 ±0)` + // Estimated: `6806 + r * (6 ±0)` + // Minimum execution time: 274_079_000 picoseconds. + Weight::from_parts(282_258_090, 6806) + // Standard Error: 1_343 + .saturating_add(Weight::from_parts(464_680, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_origin(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 265_297_000 picoseconds. - Weight::from_parts(283_474_927, 6802) - // Standard Error: 376 - .saturating_add(Weight::from_parts(186_214, 0).saturating_mul(r.into())) + // Measured: `854 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 270_960_000 picoseconds. + Weight::from_parts(281_985_584, 6799) + // Standard Error: 378 + .saturating_add(Weight::from_parts(184_462, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_root(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `747 + r * (3 ±0)` - // Estimated: `6687 + r * (3 ±0)` - // Minimum execution time: 258_385_000 picoseconds. - Weight::from_parts(269_869_790, 6687) - // Standard Error: 334 - .saturating_add(Weight::from_parts(164_806, 0).saturating_mul(r.into())) + // Measured: `744 + r * (3 ±0)` + // Estimated: `6684 + r * (3 ±0)` + // Minimum execution time: 244_835_000 picoseconds. + Weight::from_parts(270_660_753, 6684) + // Standard Error: 390 + .saturating_add(Weight::from_parts(164_232, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_address(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `861 + r * (6 ±0)` - // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 271_351_000 picoseconds. - Weight::from_parts(286_390_305, 6803) - // Standard Error: 628 - .saturating_add(Weight::from_parts(339_374, 0).saturating_mul(r.into())) + // Measured: `858 + r * (6 ±0)` + // Estimated: `6800 + r * (6 ±0)` + // Minimum execution time: 273_269_000 picoseconds. + Weight::from_parts(274_468_168, 6800) + // Standard Error: 2_246 + .saturating_add(Weight::from_parts(386_838, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (6 ±0)` - // Estimated: `6798 + r * (6 ±0)` - // Minimum execution time: 273_060_000 picoseconds. - Weight::from_parts(285_959_049, 6798) - // Standard Error: 813 - .saturating_add(Weight::from_parts(544_941, 0).saturating_mul(r.into())) + // Measured: `854 + r * (6 ±0)` + // Estimated: `6795 + r * (6 ±0)` + // Minimum execution time: 275_244_000 picoseconds. + Weight::from_parts(281_299_739, 6795) + // Standard Error: 2_890 + .saturating_add(Weight::from_parts(600_498, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:2 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_balance(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1001 + r * (6 ±0)` - // Estimated: `6925 + r * (6 ±0)` - // Minimum execution time: 273_717_000 picoseconds. - Weight::from_parts(301_053_119, 6925) - // Standard Error: 3_314 - .saturating_add(Weight::from_parts(1_645_480, 0).saturating_mul(r.into())) + // Measured: `998 + r * (6 ±0)` + // Estimated: `6922 + r * (6 ±0)` + // Minimum execution time: 271_540_000 picoseconds. + Weight::from_parts(298_456_935, 6922) + // Standard Error: 2_881 + .saturating_add(Weight::from_parts(1_719_337, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_value_transferred(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `871 + r * (6 ±0)` - // Estimated: `6820 + r * (6 ±0)` - // Minimum execution time: 273_480_000 picoseconds. - Weight::from_parts(284_751_212, 6820) - // Standard Error: 501 - .saturating_add(Weight::from_parts(334_063, 0).saturating_mul(r.into())) + // Measured: `868 + r * (6 ±0)` + // Estimated: `6817 + r * (6 ±0)` + // Minimum execution time: 274_832_000 picoseconds. + Weight::from_parts(286_078_648, 6817) + // Standard Error: 695 + .saturating_add(Weight::from_parts(345_045, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_minimum_balance(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `869 + r * (6 ±0)` - // Estimated: `6818 + r * (6 ±0)` - // Minimum execution time: 278_938_000 picoseconds. - Weight::from_parts(284_829_302, 6818) - // Standard Error: 488 - .saturating_add(Weight::from_parts(338_782, 0).saturating_mul(r.into())) + // Measured: `866 + r * (6 ±0)` + // Estimated: `6815 + r * (6 ±0)` + // Minimum execution time: 267_337_000 picoseconds. + Weight::from_parts(283_693_170, 6815) + // Standard Error: 580 + .saturating_add(Weight::from_parts(345_350, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_block_number(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866 + r * (6 ±0)` - // Estimated: `6816 + r * (6 ±0)` - // Minimum execution time: 276_799_000 picoseconds. - Weight::from_parts(290_353_700, 6816) - // Standard Error: 675 - .saturating_add(Weight::from_parts(323_565, 0).saturating_mul(r.into())) + // Measured: `863 + r * (6 ±0)` + // Estimated: `6813 + r * (6 ±0)` + // Minimum execution time: 276_313_000 picoseconds. + Weight::from_parts(287_689_703, 6813) + // Standard Error: 1_251 + .saturating_add(Weight::from_parts(342_536, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_now(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (6 ±0)` - // Estimated: `6802 + r * (6 ±0)` - // Minimum execution time: 267_740_000 picoseconds. - Weight::from_parts(287_560_339, 6802) - // Standard Error: 479 - .saturating_add(Weight::from_parts(329_276, 0).saturating_mul(r.into())) + // Measured: `854 + r * (6 ±0)` + // Estimated: `6799 + r * (6 ±0)` + // Minimum execution time: 274_196_000 picoseconds. + Weight::from_parts(288_641_687, 6799) + // Standard Error: 530 + .saturating_add(Weight::from_parts(336_194, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `931 + r * (14 ±0)` - // Estimated: `6864 + r * (14 ±0)` - // Minimum execution time: 275_471_000 picoseconds. - Weight::from_parts(297_332_107, 6864) - // Standard Error: 2_230 - .saturating_add(Weight::from_parts(1_484_476, 0).saturating_mul(r.into())) + // Measured: `928 + r * (14 ±0)` + // Estimated: `6861 + r * (14 ±0)` + // Minimum execution time: 254_997_000 picoseconds. + Weight::from_parts(292_260_891, 6861) + // Standard Error: 1_019 + .saturating_add(Weight::from_parts(1_447_021, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_input(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `859 + r * (6 ±0)` - // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 255_279_000 picoseconds. - Weight::from_parts(282_649_020, 6803) - // Standard Error: 429 - .saturating_add(Weight::from_parts(290_527, 0).saturating_mul(r.into())) + // Measured: `856 + r * (6 ±0)` + // Estimated: `6800 + r * (6 ±0)` + // Minimum execution time: 272_720_000 picoseconds. + Weight::from_parts(287_125_181, 6800) + // Standard Error: 491 + .saturating_add(Weight::from_parts(294_488, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_input_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `863` - // Estimated: `6803` - // Minimum execution time: 268_029_000 picoseconds. - Weight::from_parts(231_474_232, 6803) + // Measured: `860` + // Estimated: `6800` + // Minimum execution time: 280_665_000 picoseconds. + Weight::from_parts(233_022_448, 6800) // Standard Error: 23 - .saturating_add(Weight::from_parts(1_050, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(996, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `847 + r * (45 ±0)` - // Estimated: `6787 + r * (45 ±0)` - // Minimum execution time: 252_126_000 picoseconds. - Weight::from_parts(277_677_710, 6787) - // Standard Error: 770_704 - .saturating_add(Weight::from_parts(2_678_989, 0).saturating_mul(r.into())) + // Measured: `844 + r * (45 ±0)` + // Estimated: `6784 + r * (45 ±0)` + // Minimum execution time: 250_335_000 picoseconds. + Weight::from_parts(278_774_071, 6784) + // Standard Error: 873_509 + .saturating_add(Weight::from_parts(4_562_628, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_return_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857` - // Estimated: `6810` - // Minimum execution time: 271_967_000 picoseconds. - Weight::from_parts(282_988_484, 6810) + // Measured: `854` + // Estimated: `6807` + // Minimum execution time: 278_402_000 picoseconds. + Weight::from_parts(285_491_021, 6807) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(312, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:4 w:4) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts DeletionQueueCounter (r:1 w:1) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts DeletionQueue (r:0 w:1) - /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::DeletionQueue` (r:0 w:1) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `889 + r * (300 ±0)` - // Estimated: `6829 + r * (7725 ±0)` - // Minimum execution time: 257_246_000 picoseconds. - Weight::from_parts(280_196_561, 6829) - // Standard Error: 815_845 - .saturating_add(Weight::from_parts(127_831_338, 0).saturating_mul(r.into())) + // Measured: `2963 + r * (400 ±0)` + // Estimated: `8903 + r * (7825 ±0)` + // Minimum execution time: 281_030_000 picoseconds. + Weight::from_parts(305_435_226, 8903) + // Standard Error: 816_824 + .saturating_add(Weight::from_parts(131_691_873, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) - .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(T::DbWeight::get().writes((8_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 7725).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) - /// Proof: RandomnessCollectiveFlip RandomMaterial (max_values: Some(1), max_size: Some(2594), added: 3089, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(T::DbWeight::get().writes((9_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 7825).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `RandomnessCollectiveFlip::RandomMaterial` (r:1 w:0) + /// Proof: `RandomnessCollectiveFlip::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_random(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `938 + r * (10 ±0)` - // Estimated: `6879 + r * (10 ±0)` - // Minimum execution time: 270_074_000 picoseconds. - Weight::from_parts(292_298_331, 6879) - // Standard Error: 2_123 - .saturating_add(Weight::from_parts(2_089_487, 0).saturating_mul(r.into())) + // Measured: `935 + r * (10 ±0)` + // Estimated: `6876 + r * (10 ±0)` + // Minimum execution time: 261_369_000 picoseconds. + Weight::from_parts(300_458_315, 6876) + // Standard Error: 3_506 + .saturating_add(Weight::from_parts(1_971_733, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_deposit_event(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (10 ±0)` - // Estimated: `6802 + r * (10 ±0)` - // Minimum execution time: 267_080_000 picoseconds. - Weight::from_parts(298_470_496, 6802) - // Standard Error: 3_004 - .saturating_add(Weight::from_parts(3_898_460, 0).saturating_mul(r.into())) + // Measured: `854 + r * (10 ±0)` + // Estimated: `6799 + r * (10 ±0)` + // Minimum execution time: 262_894_000 picoseconds. + Weight::from_parts(285_321_838, 6799) + // Standard Error: 6_585 + .saturating_add(Weight::from_parts(3_998_744, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:6 w:6) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:6 w:6) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16384]`. fn seal_deposit_event_per_topic_and_byte(t: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `876 + t * (32 ±0)` - // Estimated: `6823 + t * (2508 ±0)` - // Minimum execution time: 277_152_000 picoseconds. - Weight::from_parts(290_745_178, 6823) - // Standard Error: 88_577 - .saturating_add(Weight::from_parts(2_476_405, 0).saturating_mul(t.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(702, 0).saturating_mul(n.into())) + // Measured: `873 + t * (32 ±0)` + // Estimated: `6820 + t * (2508 ±0)` + // Minimum execution time: 275_909_000 picoseconds. + Weight::from_parts(289_251_568, 6820) + // Standard Error: 94_431 + .saturating_add(Weight::from_parts(3_007_409, 0).saturating_mul(t.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(815, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_debug_message(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (7 ±0)` - // Estimated: `6800 + r * (7 ±0)` - // Minimum execution time: 168_782_000 picoseconds. - Weight::from_parts(179_694_331, 6800) - // Standard Error: 338 - .saturating_add(Weight::from_parts(246_541, 0).saturating_mul(r.into())) + // Measured: `853 + r * (7 ±0)` + // Estimated: `6797 + r * (7 ±0)` + // Minimum execution time: 168_482_000 picoseconds. + Weight::from_parts(178_065_606, 6797) + // Standard Error: 371 + .saturating_add(Weight::from_parts(242_851, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: MaxEncodedLen) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: MaxEncodedLen) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1048576]`. fn seal_debug_message_per_byte(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `125807` - // Estimated: `131749` - // Minimum execution time: 428_673_000 picoseconds. - Weight::from_parts(398_928_494, 131749) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_106, 0).saturating_mul(i.into())) + // Measured: `125804` + // Estimated: `131746` + // Minimum execution time: 407_401_000 picoseconds. + Weight::from_parts(426_585_443, 131746) + // Standard Error: 22 + .saturating_add(Weight::from_parts(986, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_set_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `924 + r * (292 ±0)` - // Estimated: `922 + r * (293 ±0)` - // Minimum execution time: 271_384_000 picoseconds. - Weight::from_parts(147_677_611, 922) - // Standard Error: 13_371 - .saturating_add(Weight::from_parts(7_085_478, 0).saturating_mul(r.into())) + // Measured: `921 + r * (292 ±0)` + // Estimated: `919 + r * (293 ±0)` + // Minimum execution time: 275_800_000 picoseconds. + Weight::from_parts(161_230_700, 919) + // Standard Error: 12_908 + .saturating_add(Weight::from_parts(6_965_844, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 293).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_set_storage_per_new_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1383` - // Estimated: `1359` - // Minimum execution time: 279_587_000 picoseconds. - Weight::from_parts(335_690_918, 1359) - // Standard Error: 57 - .saturating_add(Weight::from_parts(708, 0).saturating_mul(n.into())) + // Measured: `1380` + // Estimated: `1356` + // Minimum execution time: 289_258_000 picoseconds. + Weight::from_parts(334_318_402, 1356) + // Standard Error: 59 + .saturating_add(Weight::from_parts(808, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_set_storage_per_old_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1246 + n * (1 ±0)` - // Estimated: `1246 + n * (1 ±0)` - // Minimum execution time: 275_572_000 picoseconds. - Weight::from_parts(300_309_544, 1246) - // Standard Error: 35 - .saturating_add(Weight::from_parts(299, 0).saturating_mul(n.into())) + // Measured: `1243 + n * (1 ±0)` + // Estimated: `1243 + n * (1 ±0)` + // Minimum execution time: 277_874_000 picoseconds. + Weight::from_parts(303_956_600, 1243) + // Standard Error: 33 + .saturating_add(Weight::from_parts(58, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_clear_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `920 + r * (288 ±0)` - // Estimated: `924 + r * (289 ±0)` - // Minimum execution time: 271_875_000 picoseconds. - Weight::from_parts(153_680_437, 924) - // Standard Error: 13_050 - .saturating_add(Weight::from_parts(6_892_925, 0).saturating_mul(r.into())) + // Measured: `917 + r * (288 ±0)` + // Estimated: `921 + r * (289 ±0)` + // Minimum execution time: 255_230_000 picoseconds. + Weight::from_parts(163_226_984, 921) + // Standard Error: 12_691 + .saturating_add(Weight::from_parts(6_808_905, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_clear_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1242 + n * (1 ±0)` - // Estimated: `1242 + n * (1 ±0)` - // Minimum execution time: 272_682_000 picoseconds. - Weight::from_parts(301_025_128, 1242) + // Measured: `1239 + n * (1 ±0)` + // Estimated: `1239 + n * (1 ±0)` + // Minimum execution time: 275_780_000 picoseconds. + Weight::from_parts(301_967_262, 1239) + // Standard Error: 34 + .saturating_add(Weight::from_parts(128, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_get_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `914 + r * (296 ±0)` - // Estimated: `919 + r * (297 ±0)` - // Minimum execution time: 271_796_000 picoseconds. - Weight::from_parts(183_856_480, 919) - // Standard Error: 10_064 - .saturating_add(Weight::from_parts(5_660_636, 0).saturating_mul(r.into())) + // Measured: `911 + r * (296 ±0)` + // Estimated: `916 + r * (297 ±0)` + // Minimum execution time: 279_295_000 picoseconds. + Weight::from_parts(208_289_066, 916) + // Standard Error: 8_330 + .saturating_add(Weight::from_parts(5_600_713, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_get_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1258 + n * (1 ±0)` - // Estimated: `1258 + n * (1 ±0)` - // Minimum execution time: 273_102_000 picoseconds. - Weight::from_parts(297_455_692, 1258) - // Standard Error: 35 - .saturating_add(Weight::from_parts(868, 0).saturating_mul(n.into())) + // Measured: `1255 + n * (1 ±0)` + // Estimated: `1255 + n * (1 ±0)` + // Minimum execution time: 276_745_000 picoseconds. + Weight::from_parts(298_824_233, 1255) + // Standard Error: 36 + .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_contains_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `935 + r * (288 ±0)` - // Estimated: `936 + r * (289 ±0)` - // Minimum execution time: 271_323_000 picoseconds. - Weight::from_parts(190_080_834, 936) - // Standard Error: 9_143 - .saturating_add(Weight::from_parts(5_488_362, 0).saturating_mul(r.into())) + // Measured: `932 + r * (288 ±0)` + // Estimated: `933 + r * (289 ±0)` + // Minimum execution time: 275_137_000 picoseconds. + Weight::from_parts(196_695_898, 933) + // Standard Error: 9_207 + .saturating_add(Weight::from_parts(5_466_071, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_contains_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1245 + n * (1 ±0)` - // Estimated: `1245 + n * (1 ±0)` - // Minimum execution time: 270_399_000 picoseconds. - Weight::from_parts(296_679_410, 1245) - // Standard Error: 34 - .saturating_add(Weight::from_parts(161, 0).saturating_mul(n.into())) + // Measured: `1242 + n * (1 ±0)` + // Estimated: `1242 + n * (1 ±0)` + // Minimum execution time: 269_315_000 picoseconds. + Weight::from_parts(296_795_271, 1242) + // Standard Error: 39 + .saturating_add(Weight::from_parts(242, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_take_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `908 + r * (296 ±0)` - // Estimated: `915 + r * (297 ±0)` - // Minimum execution time: 271_645_000 picoseconds. - Weight::from_parts(147_320_521, 915) - // Standard Error: 13_502 - .saturating_add(Weight::from_parts(7_074_778, 0).saturating_mul(r.into())) + // Measured: `905 + r * (296 ±0)` + // Estimated: `912 + r * (297 ±0)` + // Minimum execution time: 256_406_000 picoseconds. + Weight::from_parts(156_850_288, 912) + // Standard Error: 12_496 + .saturating_add(Weight::from_parts(7_055_305, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_take_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1259 + n * (1 ±0)` - // Estimated: `1259 + n * (1 ±0)` - // Minimum execution time: 280_680_000 picoseconds. - Weight::from_parts(304_043_474, 1259) - // Standard Error: 29 - .saturating_add(Weight::from_parts(644, 0).saturating_mul(n.into())) + // Measured: `1256 + n * (1 ±0)` + // Estimated: `1256 + n * (1 ±0)` + // Minimum execution time: 280_297_000 picoseconds. + Weight::from_parts(302_241_752, 1256) + // Standard Error: 34 + .saturating_add(Weight::from_parts(748, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1602 w:1601) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1602 w:1601) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_transfer(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1452 + r * (45 ±0)` - // Estimated: `7349 + r * (2520 ±0)` - // Minimum execution time: 274_928_000 picoseconds. - Weight::from_parts(192_111_339, 7349) - // Standard Error: 42_436 - .saturating_add(Weight::from_parts(40_323_660, 0).saturating_mul(r.into())) + // Measured: `1449 + r * (45 ±0)` + // Estimated: `7346 + r * (2520 ±0)` + // Minimum execution time: 274_834_000 picoseconds. + Weight::from_parts(176_977_557, 7346) + // Standard Error: 32_386 + .saturating_add(Weight::from_parts(39_393_162, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:801 w:801) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:803 w:803) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:803 w:803) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1296 + r * (276 ±0)` - // Estimated: `9481 + r * (2752 ±0)` - // Minimum execution time: 275_293_000 picoseconds. - Weight::from_parts(278_243_000, 9481) - // Standard Error: 119_869 - .saturating_add(Weight::from_parts(245_114_905, 0).saturating_mul(r.into())) + // Measured: `1304 + r * (268 ±0)` + // Estimated: `9485 + r * (2744 ±0)` + // Minimum execution time: 279_802_000 picoseconds. + Weight::from_parts(287_995_000, 9485) + // Standard Error: 99_110 + .saturating_add(Weight::from_parts(245_521_843, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(11_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:736 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:736 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:737 w:737) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2744).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:736 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:736 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:737 w:737) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (572 ±0)` - // Estimated: `6806 + r * (2633 ±3)` - // Minimum execution time: 271_857_000 picoseconds. - Weight::from_parts(278_276_000, 6806) - // Standard Error: 152_056 - .saturating_add(Weight::from_parts(243_744_830, 0).saturating_mul(r.into())) + // Measured: `0 + r * (576 ±0)` + // Estimated: `6803 + r * (2637 ±3)` + // Minimum execution time: 273_435_000 picoseconds. + Weight::from_parts(276_865_000, 6803) + // Standard Error: 148_051 + .saturating_add(Weight::from_parts(244_660_274, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2633).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:3 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:2 w:2) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:4 w:4) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2637).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:4 w:4) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1328 + t * (310 ±0)` - // Estimated: `12218 + t * (5260 ±0)` - // Minimum execution time: 463_865_000 picoseconds. - Weight::from_parts(70_396_050, 12218) - // Standard Error: 11_489_598 - .saturating_add(Weight::from_parts(359_195_747, 0).saturating_mul(t.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_090, 0).saturating_mul(c.into())) + // Measured: `1322 + t * (310 ±0)` + // Estimated: `12212 + t * (5260 ±0)` + // Minimum execution time: 477_593_000 picoseconds. + Weight::from_parts(69_887_451, 12212) + // Standard Error: 11_764_606 + .saturating_add(Weight::from_parts(373_361_977, 0).saturating_mul(t.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5260).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1602 w:1602) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:801 w:801) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:801 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:801 w:800) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:802 w:802) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1602 w:1602) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:801 w:800) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:801 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:802 w:802) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1383 + r * (251 ±0)` - // Estimated: `7207 + r * (5202 ±0)` - // Minimum execution time: 660_947_000 picoseconds. - Weight::from_parts(668_346_000, 7207) - // Standard Error: 357_950 - .saturating_add(Weight::from_parts(397_202_020, 0).saturating_mul(r.into())) + // Measured: `1380 + r * (255 ±0)` + // Estimated: `7204 + r * (5206 ±0)` + // Minimum execution time: 652_387_000 picoseconds. + Weight::from_parts(658_670_000, 7204) + // Standard Error: 363_054 + .saturating_add(Weight::from_parts(395_547_049, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 5202).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:4 w:4) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:2 w:2) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1232 + t * (156 ±0)` - // Estimated: `9662 + t * (2578 ±2)` - // Minimum execution time: 2_419_720_000 picoseconds. - Weight::from_parts(1_328_224_119, 9662) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_171, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_263, 0).saturating_mul(s.into())) + // Measured: `1233 + t * (156 ±0)` + // Estimated: `9663 + t * (2578 ±2)` + // Minimum execution time: 2_299_620_000 picoseconds. + Weight::from_parts(1_274_859_063, 9663) + // Standard Error: 12_129_871 + .saturating_add(Weight::from_parts(16_608_792, 0).saturating_mul(t.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(1_014, 0).saturating_mul(i.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(1_180, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(15_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2578).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (8 ±0)` - // Estimated: `6797 + r * (8 ±0)` - // Minimum execution time: 263_620_000 picoseconds. - Weight::from_parts(285_686_431, 6797) - // Standard Error: 605 - .saturating_add(Weight::from_parts(393_863, 0).saturating_mul(r.into())) + // Measured: `853 + r * (8 ±0)` + // Estimated: `6794 + r * (8 ±0)` + // Minimum execution time: 267_959_000 picoseconds. + Weight::from_parts(282_967_946, 6794) + // Standard Error: 624 + .saturating_add(Weight::from_parts(402_344, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_sha2_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `864` - // Estimated: `6804` - // Minimum execution time: 271_378_000 picoseconds. - Weight::from_parts(266_737_832, 6804) + // Measured: `861` + // Estimated: `6801` + // Minimum execution time: 274_585_000 picoseconds. + Weight::from_parts(272_480_647, 6801) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_124, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_089, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6800 + r * (8 ±0)` - // Minimum execution time: 269_277_000 picoseconds. - Weight::from_parts(282_723_951, 6800) - // Standard Error: 577 - .saturating_add(Weight::from_parts(808_522, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6797 + r * (8 ±0)` + // Minimum execution time: 268_346_000 picoseconds. + Weight::from_parts(284_168_231, 6797) + // Standard Error: 620 + .saturating_add(Weight::from_parts(805_038, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6808` - // Minimum execution time: 254_252_000 picoseconds. - Weight::from_parts(277_589_498, 6808) + // Measured: `863` + // Estimated: `6805` + // Minimum execution time: 273_073_000 picoseconds. + Weight::from_parts(280_346_065, 6805) // Standard Error: 1 - .saturating_add(Weight::from_parts(3_394, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_357, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6803 + r * (8 ±0)` - // Minimum execution time: 254_411_000 picoseconds. - Weight::from_parts(283_572_987, 6803) - // Standard Error: 549 - .saturating_add(Weight::from_parts(455_436, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6800 + r * (8 ±0)` + // Minimum execution time: 263_072_000 picoseconds. + Weight::from_parts(284_487_433, 6800) + // Standard Error: 668 + .saturating_add(Weight::from_parts(458_763, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6812` - // Minimum execution time: 264_371_000 picoseconds. - Weight::from_parts(269_330_603, 6812) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_249, 0).saturating_mul(n.into())) + // Measured: `863` + // Estimated: `6809` + // Minimum execution time: 271_488_000 picoseconds. + Weight::from_parts(273_877_727, 6809) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_202, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6804 + r * (8 ±0)` - // Minimum execution time: 257_896_000 picoseconds. - Weight::from_parts(286_738_151, 6804) - // Standard Error: 680 - .saturating_add(Weight::from_parts(459_525, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6801 + r * (8 ±0)` + // Minimum execution time: 271_365_000 picoseconds. + Weight::from_parts(285_100_883, 6801) + // Standard Error: 651 + .saturating_add(Weight::from_parts(462_754, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6806` - // Minimum execution time: 272_952_000 picoseconds. - Weight::from_parts(271_516_361, 6806) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_242, 0).saturating_mul(n.into())) + // Measured: `863` + // Estimated: `6803` + // Minimum execution time: 272_341_000 picoseconds. + Weight::from_parts(275_388_470, 6803) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_192, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `991 + n * (1 ±0)` - // Estimated: `6928 + n * (1 ±0)` - // Minimum execution time: 351_363_000 picoseconds. - Weight::from_parts(356_558_856, 6928) - // Standard Error: 10 - .saturating_add(Weight::from_parts(6_085, 0).saturating_mul(n.into())) + // Measured: `988 + n * (1 ±0)` + // Estimated: `6925 + n * (1 ±0)` + // Minimum execution time: 341_302_000 picoseconds. + Weight::from_parts(354_111_630, 6925) + // Standard Error: 8 + .saturating_add(Weight::from_parts(5_913, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `801 + r * (112 ±0)` - // Estimated: `6745 + r * (112 ±0)` - // Minimum execution time: 261_688_000 picoseconds. - Weight::from_parts(338_043_015, 6745) - // Standard Error: 13_532 - .saturating_add(Weight::from_parts(56_420_806, 0).saturating_mul(r.into())) + // Measured: `804 + r * (112 ±0)` + // Estimated: `6742 + r * (112 ±0)` + // Minimum execution time: 275_325_000 picoseconds. + Weight::from_parts(333_041_903, 6742) + // Standard Error: 11_171 + .saturating_add(Weight::from_parts(56_605_218, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `901 + r * (76 ±0)` - // Estimated: `6795 + r * (77 ±0)` - // Minimum execution time: 267_401_000 picoseconds. - Weight::from_parts(345_773_771, 6795) - // Standard Error: 14_486 - .saturating_add(Weight::from_parts(46_180_739, 0).saturating_mul(r.into())) + // Measured: `898 + r * (76 ±0)` + // Estimated: `6793 + r * (77 ±0)` + // Minimum execution time: 274_165_000 picoseconds. + Weight::from_parts(347_487_800, 6793) + // Standard Error: 15_398 + .saturating_add(Weight::from_parts(46_072_020, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `871 + r * (42 ±0)` - // Estimated: `6810 + r * (42 ±0)` - // Minimum execution time: 277_890_000 picoseconds. - Weight::from_parts(319_211_194, 6810) - // Standard Error: 9_132 - .saturating_add(Weight::from_parts(12_128_696, 0).saturating_mul(r.into())) + // Measured: `868 + r * (42 ±0)` + // Estimated: `6807 + r * (42 ±0)` + // Minimum execution time: 270_855_000 picoseconds. + Weight::from_parts(320_777_105, 6807) + // Standard Error: 11_106 + .saturating_add(Weight::from_parts(12_053_053, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1536 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1536 w:1536) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:1538 w:1538) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1536 w:1536) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1536 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1538 w:1538) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (961 ±0)` - // Estimated: `6801 + r * (3087 ±10)` - // Minimum execution time: 259_692_000 picoseconds. - Weight::from_parts(278_327_000, 6801) - // Standard Error: 60_024 - .saturating_add(Weight::from_parts(25_758_805, 0).saturating_mul(r.into())) + // Measured: `0 + r * (965 ±0)` + // Estimated: `6798 + r * (3090 ±10)` + // Minimum execution time: 257_732_000 picoseconds. + Weight::from_parts(280_982_000, 6798) + // Standard Error: 68_194 + .saturating_add(Weight::from_parts(27_413_991, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 3087).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn add_delegate_dependency(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `918 + r * (132 ±0)` + // Estimated: `6870 + r * (2606 ±0)` + // Minimum execution time: 278_285_000 picoseconds. + Weight::from_parts(298_012_554, 6870) + // Standard Error: 24_160 + .saturating_add(Weight::from_parts(6_363_118, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2606).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn remove_delegate_dependency(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `965 + r * (183 ±0)` + // Estimated: `129453 + r * (2568 ±0)` + // Minimum execution time: 258_198_000 picoseconds. + Weight::from_parts(290_090_206, 129453) + // Standard Error: 19_792 + .saturating_add(Weight::from_parts(6_004_811, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2568).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_reentrance_count(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `852 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 258_907_000 picoseconds. - Weight::from_parts(285_755_890, 6802) - // Standard Error: 378 - .saturating_add(Weight::from_parts(179_649, 0).saturating_mul(r.into())) + // Measured: `849 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 263_315_000 picoseconds. + Weight::from_parts(284_093_748, 6799) + // Standard Error: 371 + .saturating_add(Weight::from_parts(176_949, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2092 + r * (39 ±0)` - // Estimated: `7919 + r * (40 ±0)` - // Minimum execution time: 260_415_000 picoseconds. - Weight::from_parts(363_871_048, 7919) - // Standard Error: 2_010 - .saturating_add(Weight::from_parts(317_607, 0).saturating_mul(r.into())) + // Measured: `2082 + r * (39 ±0)` + // Estimated: `7886 + r * (40 ±0)` + // Minimum execution time: 274_583_000 picoseconds. + Weight::from_parts(352_081_486, 7886) + // Standard Error: 1_799 + .saturating_add(Weight::from_parts(313_433, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `855 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 257_725_000 picoseconds. - Weight::from_parts(283_441_372, 6802) - // Standard Error: 371 - .saturating_add(Weight::from_parts(157_674, 0).saturating_mul(r.into())) + // Measured: `852 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 267_291_000 picoseconds. + Weight::from_parts(287_500_540, 6799) + // Standard Error: 393 + .saturating_add(Weight::from_parts(152_587, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1908,211 +1980,222 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_635_000 picoseconds. - Weight::from_parts(2_990_110, 0) - // Standard Error: 31 - .saturating_add(Weight::from_parts(10_213, 0).saturating_mul(r.into())) + // Minimum execution time: 1_440_000 picoseconds. + Weight::from_parts(1_656_631, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(10_486, 0).saturating_mul(r.into())) } } -// For backwards compatibility and tests +// For backwards compatibility and tests. impl WeightInfo for () { - /// Storage: Contracts DeletionQueueCounter (r:1 w:0) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:0) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) fn on_process_deletion_queue_batch() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_519_000 picoseconds. - Weight::from_parts(2_660_000, 1627) + // Minimum execution time: 2_527_000 picoseconds. + Weight::from_parts(2_651_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `451 + k * (69 ±0)` // Estimated: `441 + k * (70 ±0)` - // Minimum execution time: 13_096_000 picoseconds. - Weight::from_parts(13_395_000, 441) - // Standard Error: 1_046 - .saturating_add(Weight::from_parts(1_246_238, 0).saturating_mul(k.into())) + // Minimum execution time: 13_291_000 picoseconds. + Weight::from_parts(13_825_000, 441) + // Standard Error: 1_137 + .saturating_add(Weight::from_parts(1_244_309, 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)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(k.into())) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) /// The range of component `c` is `[0, 125952]`. fn v9_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 8_409_000 picoseconds. - Weight::from_parts(9_006_438, 6149) + // Minimum execution time: 8_359_000 picoseconds. + Weight::from_parts(9_179_121, 6149) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_345, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_312, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts ContractInfoOf (r:2 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) + /// Storage: `Contracts::ContractInfoOf` (r:3 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) fn v10_migration_step() -> Weight { // Proof Size summary in bytes: - // Measured: `510` - // Estimated: `6450` - // Minimum execution time: 16_962_000 picoseconds. - Weight::from_parts(17_716_000, 6450) - .saturating_add(RocksDbWeight::get().reads(3_u64)) + // Measured: `709` + // Estimated: `9124` + // Minimum execution time: 42_457_000 picoseconds. + Weight::from_parts(44_556_000, 9124) + .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: Contracts DeletionQueue (r:1 w:1025) - /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) - /// Storage: Contracts DeletionQueueCounter (r:0 w:1) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: `Contracts::DeletionQueue` (r:1 w:1025) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:0 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) /// The range of component `k` is `[0, 1024]`. fn v11_migration_step(k: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 3_763_000 picoseconds. - Weight::from_parts(2_401_625, 3635) - // Standard Error: 2_827 - .saturating_add(Weight::from_parts(1_201_671, 0).saturating_mul(k.into())) + // Minimum execution time: 3_839_000 picoseconds. + Weight::from_parts(3_462_337, 3635) + // Standard Error: 1_384 + .saturating_add(Weight::from_parts(1_166_522, 0).saturating_mul(k.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(k.into()))) .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:0 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:0 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn v12_migration_step(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 17_490_000 picoseconds. - Weight::from_parts(17_712_278, 6263) - // Standard Error: 0 - .saturating_add(Weight::from_parts(427, 0).saturating_mul(c.into())) + // Minimum execution time: 17_001_000 picoseconds. + Weight::from_parts(17_095_380, 6263) + // Standard Error: 1 + .saturating_add(Weight::from_parts(411, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: `Contracts::ContractInfoOf` (r:3 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + fn v13_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `639` + // Estimated: `9054` + // Minimum execution time: 35_342_000 picoseconds. + Weight::from_parts(36_839_000, 9054) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn migration_noop() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 3_282_000 picoseconds. - Weight::from_parts(3_536_000, 1627) + // Minimum execution time: 3_272_000 picoseconds. + Weight::from_parts(3_553_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) fn migrate() -> Weight { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 12_973_000 picoseconds. - Weight::from_parts(13_366_000, 3631) + // Minimum execution time: 12_788_000 picoseconds. + Weight::from_parts(13_163_000, 3631) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) fn on_runtime_upgrade_noop() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_764_000 picoseconds. - Weight::from_parts(5_000_000, 3607) + // Minimum execution time: 4_794_000 picoseconds. + Weight::from_parts(5_086_000, 3607) .saturating_add(RocksDbWeight::get().reads(1_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn on_runtime_upgrade_in_progress() -> Weight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` // Minimum execution time: 6_616_000 picoseconds. - Weight::from_parts(6_935_000, 3632) + Weight::from_parts(7_034_000, 3632) .saturating_add(RocksDbWeight::get().reads(2_u64)) } - /// Storage: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Proof Skipped: unknown `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) - /// Storage: Contracts MigrationInProgress (r:1 w:1) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) fn on_runtime_upgrade() -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 6_953_000 picoseconds. - Weight::from_parts(7_440_000, 3607) + // Minimum execution time: 6_985_000 picoseconds. + Weight::from_parts(7_477_000, 3607) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn call_with_code_per_byte(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `786` - // Estimated: `6735 + c * (1 ±0)` - // Minimum execution time: 302_714_000 picoseconds. - Weight::from_parts(271_320_595, 6735) - // Standard Error: 72 - .saturating_add(Weight::from_parts(38_474, 0).saturating_mul(c.into())) + // Measured: `783` + // Estimated: `6732 + c * (1 ±0)` + // Minimum execution time: 306_088_000 picoseconds. + Weight::from_parts(268_361_911, 6732) + // Standard Error: 76 + .saturating_add(Weight::from_parts(38_334, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. @@ -2120,1568 +2203,1630 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `303` // Estimated: `8745` - // Minimum execution time: 4_506_957_000 picoseconds. - Weight::from_parts(643_316_921, 8745) - // Standard Error: 278 - .saturating_add(Weight::from_parts(112_835, 0).saturating_mul(c.into())) - // Standard Error: 33 - .saturating_add(Weight::from_parts(1_830, 0).saturating_mul(i.into())) - // Standard Error: 33 - .saturating_add(Weight::from_parts(2_022, 0).saturating_mul(s.into())) + // Minimum execution time: 4_224_657_000 picoseconds. + Weight::from_parts(451_557_864, 8745) + // Standard Error: 216 + .saturating_add(Weight::from_parts(111_761, 0).saturating_mul(c.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_794, 0).saturating_mul(i.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(2_013, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(9_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `523` - // Estimated: `6513` - // Minimum execution time: 2_103_482_000 picoseconds. - Weight::from_parts(316_666_183, 6513) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_933, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_803, 0).saturating_mul(s.into())) + // Measured: `527` + // Estimated: `6517` + // Minimum execution time: 2_029_313_000 picoseconds. + Weight::from_parts(353_077_600, 6517) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_781, 0).saturating_mul(i.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_729, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn call() -> Weight { // Proof Size summary in bytes: - // Measured: `820` - // Estimated: `6760` - // Minimum execution time: 207_530_000 picoseconds. - Weight::from_parts(217_243_000, 6760) + // Measured: `817` + // Estimated: `6757` + // Minimum execution time: 204_086_000 picoseconds. + Weight::from_parts(216_738_000, 6757) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn upload_code(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 246_381_000 picoseconds. - Weight::from_parts(242_933_576, 3607) - // Standard Error: 100 - .saturating_add(Weight::from_parts(74_645, 0).saturating_mul(c.into())) + // Minimum execution time: 269_337_000 picoseconds. + Weight::from_parts(220_186_006, 3607) + // Standard Error: 106 + .saturating_add(Weight::from_parts(74_291, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) fn remove_code() -> Weight { // Proof Size summary in bytes: - // Measured: `255` - // Estimated: `3720` - // Minimum execution time: 35_519_000 picoseconds. - Weight::from_parts(36_813_000, 3720) + // Measured: `259` + // Estimated: `3724` + // Minimum execution time: 35_127_000 picoseconds. + Weight::from_parts(36_180_000, 3724) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:2) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `575` - // Estimated: `8990` - // Minimum execution time: 37_769_000 picoseconds. - Weight::from_parts(39_349_000, 8990) + // Measured: `576` + // Estimated: `8991` + // Minimum execution time: 37_550_000 picoseconds. + Weight::from_parts(39_149_000, 8991) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `860 + r * (6 ±0)` - // Estimated: `6801 + r * (6 ±0)` - // Minimum execution time: 273_355_000 picoseconds. - Weight::from_parts(280_115_308, 6801) - // Standard Error: 662 - .saturating_add(Weight::from_parts(351_066, 0).saturating_mul(r.into())) + // Measured: `857 + r * (6 ±0)` + // Estimated: `6798 + r * (6 ±0)` + // Minimum execution time: 269_991_000 picoseconds. + Weight::from_parts(293_993_592, 6798) + // Standard Error: 665 + .saturating_add(Weight::from_parts(343_796, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_is_contract(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `918 + r * (240 ±0)` - // Estimated: `6822 + r * (2715 ±0)` - // Minimum execution time: 264_066_000 picoseconds. - Weight::from_parts(103_474_597, 6822) - // Standard Error: 7_010 - .saturating_add(Weight::from_parts(3_917_988, 0).saturating_mul(r.into())) + // Measured: `924 + r * (232 ±0)` + // Estimated: `6831 + r * (2707 ±0)` + // Minimum execution time: 274_151_000 picoseconds. + Weight::from_parts(83_529_206, 6831) + // Standard Error: 8_452 + .saturating_add(Weight::from_parts(3_534_024, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 2715).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2707).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `910 + r * (244 ±0)` - // Estimated: `6826 + r * (2719 ±0)` - // Minimum execution time: 275_726_000 picoseconds. - Weight::from_parts(111_512_451, 6826) - // Standard Error: 6_673 - .saturating_add(Weight::from_parts(4_626_511, 0).saturating_mul(r.into())) + // Measured: `910 + r * (236 ±0)` + // Estimated: `6835 + r * (2711 ±0)` + // Minimum execution time: 276_689_000 picoseconds. + Weight::from_parts(110_268_281, 6835) + // Standard Error: 8_106 + .saturating_add(Weight::from_parts(4_376_136, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 2719).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2711).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_own_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `867 + r * (6 ±0)` - // Estimated: `6809 + r * (6 ±0)` - // Minimum execution time: 274_377_000 picoseconds. - Weight::from_parts(286_299_699, 6809) - // Standard Error: 521 - .saturating_add(Weight::from_parts(419_417, 0).saturating_mul(r.into())) + // Measured: `864 + r * (6 ±0)` + // Estimated: `6806 + r * (6 ±0)` + // Minimum execution time: 274_079_000 picoseconds. + Weight::from_parts(282_258_090, 6806) + // Standard Error: 1_343 + .saturating_add(Weight::from_parts(464_680, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_origin(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 265_297_000 picoseconds. - Weight::from_parts(283_474_927, 6802) - // Standard Error: 376 - .saturating_add(Weight::from_parts(186_214, 0).saturating_mul(r.into())) + // Measured: `854 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 270_960_000 picoseconds. + Weight::from_parts(281_985_584, 6799) + // Standard Error: 378 + .saturating_add(Weight::from_parts(184_462, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_root(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `747 + r * (3 ±0)` - // Estimated: `6687 + r * (3 ±0)` - // Minimum execution time: 258_385_000 picoseconds. - Weight::from_parts(269_869_790, 6687) - // Standard Error: 334 - .saturating_add(Weight::from_parts(164_806, 0).saturating_mul(r.into())) + // Measured: `744 + r * (3 ±0)` + // Estimated: `6684 + r * (3 ±0)` + // Minimum execution time: 244_835_000 picoseconds. + Weight::from_parts(270_660_753, 6684) + // Standard Error: 390 + .saturating_add(Weight::from_parts(164_232, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_address(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `861 + r * (6 ±0)` - // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 271_351_000 picoseconds. - Weight::from_parts(286_390_305, 6803) - // Standard Error: 628 - .saturating_add(Weight::from_parts(339_374, 0).saturating_mul(r.into())) + // Measured: `858 + r * (6 ±0)` + // Estimated: `6800 + r * (6 ±0)` + // Minimum execution time: 273_269_000 picoseconds. + Weight::from_parts(274_468_168, 6800) + // Standard Error: 2_246 + .saturating_add(Weight::from_parts(386_838, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (6 ±0)` - // Estimated: `6798 + r * (6 ±0)` - // Minimum execution time: 273_060_000 picoseconds. - Weight::from_parts(285_959_049, 6798) - // Standard Error: 813 - .saturating_add(Weight::from_parts(544_941, 0).saturating_mul(r.into())) + // Measured: `854 + r * (6 ±0)` + // Estimated: `6795 + r * (6 ±0)` + // Minimum execution time: 275_244_000 picoseconds. + Weight::from_parts(281_299_739, 6795) + // Standard Error: 2_890 + .saturating_add(Weight::from_parts(600_498, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:2 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_balance(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1001 + r * (6 ±0)` - // Estimated: `6925 + r * (6 ±0)` - // Minimum execution time: 273_717_000 picoseconds. - Weight::from_parts(301_053_119, 6925) - // Standard Error: 3_314 - .saturating_add(Weight::from_parts(1_645_480, 0).saturating_mul(r.into())) + // Measured: `998 + r * (6 ±0)` + // Estimated: `6922 + r * (6 ±0)` + // Minimum execution time: 271_540_000 picoseconds. + Weight::from_parts(298_456_935, 6922) + // Standard Error: 2_881 + .saturating_add(Weight::from_parts(1_719_337, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_value_transferred(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `871 + r * (6 ±0)` - // Estimated: `6820 + r * (6 ±0)` - // Minimum execution time: 273_480_000 picoseconds. - Weight::from_parts(284_751_212, 6820) - // Standard Error: 501 - .saturating_add(Weight::from_parts(334_063, 0).saturating_mul(r.into())) + // Measured: `868 + r * (6 ±0)` + // Estimated: `6817 + r * (6 ±0)` + // Minimum execution time: 274_832_000 picoseconds. + Weight::from_parts(286_078_648, 6817) + // Standard Error: 695 + .saturating_add(Weight::from_parts(345_045, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_minimum_balance(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `869 + r * (6 ±0)` - // Estimated: `6818 + r * (6 ±0)` - // Minimum execution time: 278_938_000 picoseconds. - Weight::from_parts(284_829_302, 6818) - // Standard Error: 488 - .saturating_add(Weight::from_parts(338_782, 0).saturating_mul(r.into())) + // Measured: `866 + r * (6 ±0)` + // Estimated: `6815 + r * (6 ±0)` + // Minimum execution time: 267_337_000 picoseconds. + Weight::from_parts(283_693_170, 6815) + // Standard Error: 580 + .saturating_add(Weight::from_parts(345_350, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_block_number(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866 + r * (6 ±0)` - // Estimated: `6816 + r * (6 ±0)` - // Minimum execution time: 276_799_000 picoseconds. - Weight::from_parts(290_353_700, 6816) - // Standard Error: 675 - .saturating_add(Weight::from_parts(323_565, 0).saturating_mul(r.into())) + // Measured: `863 + r * (6 ±0)` + // Estimated: `6813 + r * (6 ±0)` + // Minimum execution time: 276_313_000 picoseconds. + Weight::from_parts(287_689_703, 6813) + // Standard Error: 1_251 + .saturating_add(Weight::from_parts(342_536, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_now(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (6 ±0)` - // Estimated: `6802 + r * (6 ±0)` - // Minimum execution time: 267_740_000 picoseconds. - Weight::from_parts(287_560_339, 6802) - // Standard Error: 479 - .saturating_add(Weight::from_parts(329_276, 0).saturating_mul(r.into())) + // Measured: `854 + r * (6 ±0)` + // Estimated: `6799 + r * (6 ±0)` + // Minimum execution time: 274_196_000 picoseconds. + Weight::from_parts(288_641_687, 6799) + // Standard Error: 530 + .saturating_add(Weight::from_parts(336_194, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `931 + r * (14 ±0)` - // Estimated: `6864 + r * (14 ±0)` - // Minimum execution time: 275_471_000 picoseconds. - Weight::from_parts(297_332_107, 6864) - // Standard Error: 2_230 - .saturating_add(Weight::from_parts(1_484_476, 0).saturating_mul(r.into())) + // Measured: `928 + r * (14 ±0)` + // Estimated: `6861 + r * (14 ±0)` + // Minimum execution time: 254_997_000 picoseconds. + Weight::from_parts(292_260_891, 6861) + // Standard Error: 1_019 + .saturating_add(Weight::from_parts(1_447_021, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_input(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `859 + r * (6 ±0)` - // Estimated: `6803 + r * (6 ±0)` - // Minimum execution time: 255_279_000 picoseconds. - Weight::from_parts(282_649_020, 6803) - // Standard Error: 429 - .saturating_add(Weight::from_parts(290_527, 0).saturating_mul(r.into())) + // Measured: `856 + r * (6 ±0)` + // Estimated: `6800 + r * (6 ±0)` + // Minimum execution time: 272_720_000 picoseconds. + Weight::from_parts(287_125_181, 6800) + // Standard Error: 491 + .saturating_add(Weight::from_parts(294_488, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_input_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `863` - // Estimated: `6803` - // Minimum execution time: 268_029_000 picoseconds. - Weight::from_parts(231_474_232, 6803) + // Measured: `860` + // Estimated: `6800` + // Minimum execution time: 280_665_000 picoseconds. + Weight::from_parts(233_022_448, 6800) // Standard Error: 23 - .saturating_add(Weight::from_parts(1_050, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(996, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `847 + r * (45 ±0)` - // Estimated: `6787 + r * (45 ±0)` - // Minimum execution time: 252_126_000 picoseconds. - Weight::from_parts(277_677_710, 6787) - // Standard Error: 770_704 - .saturating_add(Weight::from_parts(2_678_989, 0).saturating_mul(r.into())) + // Measured: `844 + r * (45 ±0)` + // Estimated: `6784 + r * (45 ±0)` + // Minimum execution time: 250_335_000 picoseconds. + Weight::from_parts(278_774_071, 6784) + // Standard Error: 873_509 + .saturating_add(Weight::from_parts(4_562_628, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_return_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857` - // Estimated: `6810` - // Minimum execution time: 271_967_000 picoseconds. - Weight::from_parts(282_988_484, 6810) + // Measured: `854` + // Estimated: `6807` + // Minimum execution time: 278_402_000 picoseconds. + Weight::from_parts(285_491_021, 6807) // Standard Error: 0 - .saturating_add(Weight::from_parts(387, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(312, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:4 w:4) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts DeletionQueueCounter (r:1 w:1) - /// Proof: Contracts DeletionQueueCounter (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// Storage: Contracts DeletionQueue (r:0 w:1) - /// Proof: Contracts DeletionQueue (max_values: None, max_size: Some(142), added: 2617, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::DeletionQueue` (r:0 w:1) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `889 + r * (300 ±0)` - // Estimated: `6829 + r * (7725 ±0)` - // Minimum execution time: 257_246_000 picoseconds. - Weight::from_parts(280_196_561, 6829) - // Standard Error: 815_845 - .saturating_add(Weight::from_parts(127_831_338, 0).saturating_mul(r.into())) + // Measured: `2963 + r * (400 ±0)` + // Estimated: `8903 + r * (7825 ±0)` + // Minimum execution time: 281_030_000 picoseconds. + Weight::from_parts(305_435_226, 8903) + // Standard Error: 816_824 + .saturating_add(Weight::from_parts(131_691_873, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) - .saturating_add(RocksDbWeight::get().reads((5_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(RocksDbWeight::get().writes((8_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 7725).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) - /// Proof: RandomnessCollectiveFlip RandomMaterial (max_values: Some(1), max_size: Some(2594), added: 3089, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(RocksDbWeight::get().writes((9_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 7825).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `RandomnessCollectiveFlip::RandomMaterial` (r:1 w:0) + /// Proof: `RandomnessCollectiveFlip::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_random(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `938 + r * (10 ±0)` - // Estimated: `6879 + r * (10 ±0)` - // Minimum execution time: 270_074_000 picoseconds. - Weight::from_parts(292_298_331, 6879) - // Standard Error: 2_123 - .saturating_add(Weight::from_parts(2_089_487, 0).saturating_mul(r.into())) + // Measured: `935 + r * (10 ±0)` + // Estimated: `6876 + r * (10 ±0)` + // Minimum execution time: 261_369_000 picoseconds. + Weight::from_parts(300_458_315, 6876) + // Standard Error: 3_506 + .saturating_add(Weight::from_parts(1_971_733, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_deposit_event(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `857 + r * (10 ±0)` - // Estimated: `6802 + r * (10 ±0)` - // Minimum execution time: 267_080_000 picoseconds. - Weight::from_parts(298_470_496, 6802) - // Standard Error: 3_004 - .saturating_add(Weight::from_parts(3_898_460, 0).saturating_mul(r.into())) + // Measured: `854 + r * (10 ±0)` + // Estimated: `6799 + r * (10 ±0)` + // Minimum execution time: 262_894_000 picoseconds. + Weight::from_parts(285_321_838, 6799) + // Standard Error: 6_585 + .saturating_add(Weight::from_parts(3_998_744, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:6 w:6) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:6 w:6) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 4]`. /// The range of component `n` is `[0, 16384]`. fn seal_deposit_event_per_topic_and_byte(t: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `876 + t * (32 ±0)` - // Estimated: `6823 + t * (2508 ±0)` - // Minimum execution time: 277_152_000 picoseconds. - Weight::from_parts(290_745_178, 6823) - // Standard Error: 88_577 - .saturating_add(Weight::from_parts(2_476_405, 0).saturating_mul(t.into())) - // Standard Error: 24 - .saturating_add(Weight::from_parts(702, 0).saturating_mul(n.into())) + // Measured: `873 + t * (32 ±0)` + // Estimated: `6820 + t * (2508 ±0)` + // Minimum execution time: 275_909_000 picoseconds. + Weight::from_parts(289_251_568, 6820) + // Standard Error: 94_431 + .saturating_add(Weight::from_parts(3_007_409, 0).saturating_mul(t.into())) + // Standard Error: 26 + .saturating_add(Weight::from_parts(815, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_debug_message(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (7 ±0)` - // Estimated: `6800 + r * (7 ±0)` - // Minimum execution time: 168_782_000 picoseconds. - Weight::from_parts(179_694_331, 6800) - // Standard Error: 338 - .saturating_add(Weight::from_parts(246_541, 0).saturating_mul(r.into())) + // Measured: `853 + r * (7 ±0)` + // Estimated: `6797 + r * (7 ±0)` + // Minimum execution time: 168_482_000 picoseconds. + Weight::from_parts(178_065_606, 6797) + // Standard Error: 371 + .saturating_add(Weight::from_parts(242_851, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: MaxEncodedLen) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: MaxEncodedLen) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: MaxEncodedLen) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1048576]`. fn seal_debug_message_per_byte(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `125807` - // Estimated: `131749` - // Minimum execution time: 428_673_000 picoseconds. - Weight::from_parts(398_928_494, 131749) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_106, 0).saturating_mul(i.into())) + // Measured: `125804` + // Estimated: `131746` + // Minimum execution time: 407_401_000 picoseconds. + Weight::from_parts(426_585_443, 131746) + // Standard Error: 22 + .saturating_add(Weight::from_parts(986, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_set_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `924 + r * (292 ±0)` - // Estimated: `922 + r * (293 ±0)` - // Minimum execution time: 271_384_000 picoseconds. - Weight::from_parts(147_677_611, 922) - // Standard Error: 13_371 - .saturating_add(Weight::from_parts(7_085_478, 0).saturating_mul(r.into())) + // Measured: `921 + r * (292 ±0)` + // Estimated: `919 + r * (293 ±0)` + // Minimum execution time: 275_800_000 picoseconds. + Weight::from_parts(161_230_700, 919) + // Standard Error: 12_908 + .saturating_add(Weight::from_parts(6_965_844, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 293).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_set_storage_per_new_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1383` - // Estimated: `1359` - // Minimum execution time: 279_587_000 picoseconds. - Weight::from_parts(335_690_918, 1359) - // Standard Error: 57 - .saturating_add(Weight::from_parts(708, 0).saturating_mul(n.into())) + // Measured: `1380` + // Estimated: `1356` + // Minimum execution time: 289_258_000 picoseconds. + Weight::from_parts(334_318_402, 1356) + // Standard Error: 59 + .saturating_add(Weight::from_parts(808, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_set_storage_per_old_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1246 + n * (1 ±0)` - // Estimated: `1246 + n * (1 ±0)` - // Minimum execution time: 275_572_000 picoseconds. - Weight::from_parts(300_309_544, 1246) - // Standard Error: 35 - .saturating_add(Weight::from_parts(299, 0).saturating_mul(n.into())) + // Measured: `1243 + n * (1 ±0)` + // Estimated: `1243 + n * (1 ±0)` + // Minimum execution time: 277_874_000 picoseconds. + Weight::from_parts(303_956_600, 1243) + // Standard Error: 33 + .saturating_add(Weight::from_parts(58, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_clear_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `920 + r * (288 ±0)` - // Estimated: `924 + r * (289 ±0)` - // Minimum execution time: 271_875_000 picoseconds. - Weight::from_parts(153_680_437, 924) - // Standard Error: 13_050 - .saturating_add(Weight::from_parts(6_892_925, 0).saturating_mul(r.into())) + // Measured: `917 + r * (288 ±0)` + // Estimated: `921 + r * (289 ±0)` + // Minimum execution time: 255_230_000 picoseconds. + Weight::from_parts(163_226_984, 921) + // Standard Error: 12_691 + .saturating_add(Weight::from_parts(6_808_905, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_clear_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1242 + n * (1 ±0)` - // Estimated: `1242 + n * (1 ±0)` - // Minimum execution time: 272_682_000 picoseconds. - Weight::from_parts(301_025_128, 1242) + // Measured: `1239 + n * (1 ±0)` + // Estimated: `1239 + n * (1 ±0)` + // Minimum execution time: 275_780_000 picoseconds. + Weight::from_parts(301_967_262, 1239) + // Standard Error: 34 + .saturating_add(Weight::from_parts(128, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_get_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `914 + r * (296 ±0)` - // Estimated: `919 + r * (297 ±0)` - // Minimum execution time: 271_796_000 picoseconds. - Weight::from_parts(183_856_480, 919) - // Standard Error: 10_064 - .saturating_add(Weight::from_parts(5_660_636, 0).saturating_mul(r.into())) + // Measured: `911 + r * (296 ±0)` + // Estimated: `916 + r * (297 ±0)` + // Minimum execution time: 279_295_000 picoseconds. + Weight::from_parts(208_289_066, 916) + // Standard Error: 8_330 + .saturating_add(Weight::from_parts(5_600_713, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_get_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1258 + n * (1 ±0)` - // Estimated: `1258 + n * (1 ±0)` - // Minimum execution time: 273_102_000 picoseconds. - Weight::from_parts(297_455_692, 1258) - // Standard Error: 35 - .saturating_add(Weight::from_parts(868, 0).saturating_mul(n.into())) + // Measured: `1255 + n * (1 ±0)` + // Estimated: `1255 + n * (1 ±0)` + // Minimum execution time: 276_745_000 picoseconds. + Weight::from_parts(298_824_233, 1255) + // Standard Error: 36 + .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_contains_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `935 + r * (288 ±0)` - // Estimated: `936 + r * (289 ±0)` - // Minimum execution time: 271_323_000 picoseconds. - Weight::from_parts(190_080_834, 936) - // Standard Error: 9_143 - .saturating_add(Weight::from_parts(5_488_362, 0).saturating_mul(r.into())) + // Measured: `932 + r * (288 ±0)` + // Estimated: `933 + r * (289 ±0)` + // Minimum execution time: 275_137_000 picoseconds. + Weight::from_parts(196_695_898, 933) + // Standard Error: 9_207 + .saturating_add(Weight::from_parts(5_466_071, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_contains_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1245 + n * (1 ±0)` - // Estimated: `1245 + n * (1 ±0)` - // Minimum execution time: 270_399_000 picoseconds. - Weight::from_parts(296_679_410, 1245) - // Standard Error: 34 - .saturating_add(Weight::from_parts(161, 0).saturating_mul(n.into())) + // Measured: `1242 + n * (1 ±0)` + // Estimated: `1242 + n * (1 ±0)` + // Minimum execution time: 269_315_000 picoseconds. + Weight::from_parts(296_795_271, 1242) + // Standard Error: 39 + .saturating_add(Weight::from_parts(242, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_take_storage(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `908 + r * (296 ±0)` - // Estimated: `915 + r * (297 ±0)` - // Minimum execution time: 271_645_000 picoseconds. - Weight::from_parts(147_320_521, 915) - // Standard Error: 13_502 - .saturating_add(Weight::from_parts(7_074_778, 0).saturating_mul(r.into())) + // Measured: `905 + r * (296 ±0)` + // Estimated: `912 + r * (297 ±0)` + // Minimum execution time: 256_406_000 picoseconds. + Weight::from_parts(156_850_288, 912) + // Standard Error: 12_496 + .saturating_add(Weight::from_parts(7_055_305, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// 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, 16384]`. fn seal_take_storage_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1259 + n * (1 ±0)` - // Estimated: `1259 + n * (1 ±0)` - // Minimum execution time: 280_680_000 picoseconds. - Weight::from_parts(304_043_474, 1259) - // Standard Error: 29 - .saturating_add(Weight::from_parts(644, 0).saturating_mul(n.into())) + // Measured: `1256 + n * (1 ±0)` + // Estimated: `1256 + n * (1 ±0)` + // Minimum execution time: 280_297_000 picoseconds. + Weight::from_parts(302_241_752, 1256) + // Standard Error: 34 + .saturating_add(Weight::from_parts(748, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1602 w:1601) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1602 w:1601) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_transfer(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1452 + r * (45 ±0)` - // Estimated: `7349 + r * (2520 ±0)` - // Minimum execution time: 274_928_000 picoseconds. - Weight::from_parts(192_111_339, 7349) - // Standard Error: 42_436 - .saturating_add(Weight::from_parts(40_323_660, 0).saturating_mul(r.into())) + // Measured: `1449 + r * (45 ±0)` + // Estimated: `7346 + r * (2520 ±0)` + // Minimum execution time: 274_834_000 picoseconds. + Weight::from_parts(176_977_557, 7346) + // Standard Error: 32_386 + .saturating_add(Weight::from_parts(39_393_162, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:801 w:801) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:803 w:803) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:803 w:803) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1296 + r * (276 ±0)` - // Estimated: `9481 + r * (2752 ±0)` - // Minimum execution time: 275_293_000 picoseconds. - Weight::from_parts(278_243_000, 9481) - // Standard Error: 119_869 - .saturating_add(Weight::from_parts(245_114_905, 0).saturating_mul(r.into())) + // Measured: `1304 + r * (268 ±0)` + // Estimated: `9485 + r * (2744 ±0)` + // Minimum execution time: 279_802_000 picoseconds. + Weight::from_parts(287_995_000, 9485) + // Standard Error: 99_110 + .saturating_add(Weight::from_parts(245_521_843, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(11_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:736 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:736 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:737 w:737) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2744).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:736 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:736 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:737 w:737) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 800]`. fn seal_delegate_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (572 ±0)` - // Estimated: `6806 + r * (2633 ±3)` - // Minimum execution time: 271_857_000 picoseconds. - Weight::from_parts(278_276_000, 6806) - // Standard Error: 152_056 - .saturating_add(Weight::from_parts(243_744_830, 0).saturating_mul(r.into())) + // Measured: `0 + r * (576 ±0)` + // Estimated: `6803 + r * (2637 ±3)` + // Minimum execution time: 273_435_000 picoseconds. + Weight::from_parts(276_865_000, 6803) + // Standard Error: 148_051 + .saturating_add(Weight::from_parts(244_660_274, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2633).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:3 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:2 w:2) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:4 w:4) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 2637).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:4 w:4) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1328 + t * (310 ±0)` - // Estimated: `12218 + t * (5260 ±0)` - // Minimum execution time: 463_865_000 picoseconds. - Weight::from_parts(70_396_050, 12218) - // Standard Error: 11_489_598 - .saturating_add(Weight::from_parts(359_195_747, 0).saturating_mul(t.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_090, 0).saturating_mul(c.into())) + // Measured: `1322 + t * (310 ±0)` + // Estimated: `12212 + t * (5260 ±0)` + // Minimum execution time: 477_593_000 picoseconds. + Weight::from_parts(69_887_451, 12212) + // Standard Error: 11_764_606 + .saturating_add(Weight::from_parts(373_361_977, 0).saturating_mul(t.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_000, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5260).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1602 w:1602) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:801 w:801) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:801 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:801 w:800) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:802 w:802) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1602 w:1602) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:801 w:800) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:801 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:802 w:802) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1383 + r * (251 ±0)` - // Estimated: `7207 + r * (5202 ±0)` - // Minimum execution time: 660_947_000 picoseconds. - Weight::from_parts(668_346_000, 7207) - // Standard Error: 357_950 - .saturating_add(Weight::from_parts(397_202_020, 0).saturating_mul(r.into())) + // Measured: `1380 + r * (255 ±0)` + // Estimated: `7204 + r * (5206 ±0)` + // Minimum execution time: 652_387_000 picoseconds. + Weight::from_parts(658_670_000, 7204) + // Standard Error: 363_054 + .saturating_add(Weight::from_parts(395_547_049, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((5_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 5202).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:4 w:4) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:2 w:2) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:2 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:2 w:1) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 5206).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:4 w:4) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1232 + t * (156 ±0)` - // Estimated: `9662 + t * (2578 ±2)` - // Minimum execution time: 2_419_720_000 picoseconds. - Weight::from_parts(1_328_224_119, 9662) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_171, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_263, 0).saturating_mul(s.into())) + // Measured: `1233 + t * (156 ±0)` + // Estimated: `9663 + t * (2578 ±2)` + // Minimum execution time: 2_299_620_000 picoseconds. + Weight::from_parts(1_274_859_063, 9663) + // Standard Error: 12_129_871 + .saturating_add(Weight::from_parts(16_608_792, 0).saturating_mul(t.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(1_014, 0).saturating_mul(i.into())) + // Standard Error: 19 + .saturating_add(Weight::from_parts(1_180, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(15_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2578).saturating_mul(t.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_sha2_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (8 ±0)` - // Estimated: `6797 + r * (8 ±0)` - // Minimum execution time: 263_620_000 picoseconds. - Weight::from_parts(285_686_431, 6797) - // Standard Error: 605 - .saturating_add(Weight::from_parts(393_863, 0).saturating_mul(r.into())) + // Measured: `853 + r * (8 ±0)` + // Estimated: `6794 + r * (8 ±0)` + // Minimum execution time: 267_959_000 picoseconds. + Weight::from_parts(282_967_946, 6794) + // Standard Error: 624 + .saturating_add(Weight::from_parts(402_344, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_sha2_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `864` - // Estimated: `6804` - // Minimum execution time: 271_378_000 picoseconds. - Weight::from_parts(266_737_832, 6804) + // Measured: `861` + // Estimated: `6801` + // Minimum execution time: 274_585_000 picoseconds. + Weight::from_parts(272_480_647, 6801) // Standard Error: 1 - .saturating_add(Weight::from_parts(1_124, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_089, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_keccak_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6800 + r * (8 ±0)` - // Minimum execution time: 269_277_000 picoseconds. - Weight::from_parts(282_723_951, 6800) - // Standard Error: 577 - .saturating_add(Weight::from_parts(808_522, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6797 + r * (8 ±0)` + // Minimum execution time: 268_346_000 picoseconds. + Weight::from_parts(284_168_231, 6797) + // Standard Error: 620 + .saturating_add(Weight::from_parts(805_038, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6808` - // Minimum execution time: 254_252_000 picoseconds. - Weight::from_parts(277_589_498, 6808) + // Measured: `863` + // Estimated: `6805` + // Minimum execution time: 273_073_000 picoseconds. + Weight::from_parts(280_346_065, 6805) // Standard Error: 1 - .saturating_add(Weight::from_parts(3_394, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_357, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_256(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6803 + r * (8 ±0)` - // Minimum execution time: 254_411_000 picoseconds. - Weight::from_parts(283_572_987, 6803) - // Standard Error: 549 - .saturating_add(Weight::from_parts(455_436, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6800 + r * (8 ±0)` + // Minimum execution time: 263_072_000 picoseconds. + Weight::from_parts(284_487_433, 6800) + // Standard Error: 668 + .saturating_add(Weight::from_parts(458_763, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6812` - // Minimum execution time: 264_371_000 picoseconds. - Weight::from_parts(269_330_603, 6812) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_249, 0).saturating_mul(n.into())) + // Measured: `863` + // Estimated: `6809` + // Minimum execution time: 271_488_000 picoseconds. + Weight::from_parts(273_877_727, 6809) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_202, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_128(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `858 + r * (8 ±0)` - // Estimated: `6804 + r * (8 ±0)` - // Minimum execution time: 257_896_000 picoseconds. - Weight::from_parts(286_738_151, 6804) - // Standard Error: 680 - .saturating_add(Weight::from_parts(459_525, 0).saturating_mul(r.into())) + // Measured: `855 + r * (8 ±0)` + // Estimated: `6801 + r * (8 ±0)` + // Minimum execution time: 271_365_000 picoseconds. + Weight::from_parts(285_100_883, 6801) + // Standard Error: 651 + .saturating_add(Weight::from_parts(462_754, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `866` - // Estimated: `6806` - // Minimum execution time: 272_952_000 picoseconds. - Weight::from_parts(271_516_361, 6806) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_242, 0).saturating_mul(n.into())) + // Measured: `863` + // Estimated: `6803` + // Minimum execution time: 272_341_000 picoseconds. + Weight::from_parts(275_388_470, 6803) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_192, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `991 + n * (1 ±0)` - // Estimated: `6928 + n * (1 ±0)` - // Minimum execution time: 351_363_000 picoseconds. - Weight::from_parts(356_558_856, 6928) - // Standard Error: 10 - .saturating_add(Weight::from_parts(6_085, 0).saturating_mul(n.into())) + // Measured: `988 + n * (1 ±0)` + // Estimated: `6925 + n * (1 ±0)` + // Minimum execution time: 341_302_000 picoseconds. + Weight::from_parts(354_111_630, 6925) + // Standard Error: 8 + .saturating_add(Weight::from_parts(5_913, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_sr25519_verify(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `801 + r * (112 ±0)` - // Estimated: `6745 + r * (112 ±0)` - // Minimum execution time: 261_688_000 picoseconds. - Weight::from_parts(338_043_015, 6745) - // Standard Error: 13_532 - .saturating_add(Weight::from_parts(56_420_806, 0).saturating_mul(r.into())) + // Measured: `804 + r * (112 ±0)` + // Estimated: `6742 + r * (112 ±0)` + // Minimum execution time: 275_325_000 picoseconds. + Weight::from_parts(333_041_903, 6742) + // Standard Error: 11_171 + .saturating_add(Weight::from_parts(56_605_218, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `901 + r * (76 ±0)` - // Estimated: `6795 + r * (77 ±0)` - // Minimum execution time: 267_401_000 picoseconds. - Weight::from_parts(345_773_771, 6795) - // Standard Error: 14_486 - .saturating_add(Weight::from_parts(46_180_739, 0).saturating_mul(r.into())) + // Measured: `898 + r * (76 ±0)` + // Estimated: `6793 + r * (77 ±0)` + // Minimum execution time: 274_165_000 picoseconds. + Weight::from_parts(347_487_800, 6793) + // Standard Error: 15_398 + .saturating_add(Weight::from_parts(46_072_020, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `871 + r * (42 ±0)` - // Estimated: `6810 + r * (42 ±0)` - // Minimum execution time: 277_890_000 picoseconds. - Weight::from_parts(319_211_194, 6810) - // Standard Error: 9_132 - .saturating_add(Weight::from_parts(12_128_696, 0).saturating_mul(r.into())) + // Measured: `868 + r * (42 ±0)` + // Estimated: `6807 + r * (42 ±0)` + // Minimum execution time: 270_855_000 picoseconds. + Weight::from_parts(320_777_105, 6807) + // Standard Error: 11_106 + .saturating_add(Weight::from_parts(12_053_053, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1536 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1536 w:1536) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:1538 w:1538) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1536 w:1536) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1536 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1538 w:1538) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (961 ±0)` - // Estimated: `6801 + r * (3087 ±10)` - // Minimum execution time: 259_692_000 picoseconds. - Weight::from_parts(278_327_000, 6801) - // Standard Error: 60_024 - .saturating_add(Weight::from_parts(25_758_805, 0).saturating_mul(r.into())) + // Measured: `0 + r * (965 ±0)` + // Estimated: `6798 + r * (3090 ±10)` + // Minimum execution time: 257_732_000 picoseconds. + Weight::from_parts(280_982_000, 6798) + // Standard Error: 68_194 + .saturating_add(Weight::from_parts(27_413_991, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 3087).saturating_mul(r.into())) - } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn add_delegate_dependency(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `918 + r * (132 ±0)` + // Estimated: `6870 + r * (2606 ±0)` + // Minimum execution time: 278_285_000 picoseconds. + Weight::from_parts(298_012_554, 6870) + // Standard Error: 24_160 + .saturating_add(Weight::from_parts(6_363_118, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2606).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn remove_delegate_dependency(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `965 + r * (183 ±0)` + // Estimated: `129453 + r * (2568 ±0)` + // Minimum execution time: 258_198_000 picoseconds. + Weight::from_parts(290_090_206, 129453) + // Standard Error: 19_792 + .saturating_add(Weight::from_parts(6_004_811, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) + .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2568).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_reentrance_count(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `852 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 258_907_000 picoseconds. - Weight::from_parts(285_755_890, 6802) - // Standard Error: 378 - .saturating_add(Weight::from_parts(179_649, 0).saturating_mul(r.into())) + // Measured: `849 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 263_315_000 picoseconds. + Weight::from_parts(284_093_748, 6799) + // Standard Error: 371 + .saturating_add(Weight::from_parts(176_949, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_account_reentrance_count(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2092 + r * (39 ±0)` - // Estimated: `7919 + r * (40 ±0)` - // Minimum execution time: 260_415_000 picoseconds. - Weight::from_parts(363_871_048, 7919) - // Standard Error: 2_010 - .saturating_add(Weight::from_parts(317_607, 0).saturating_mul(r.into())) + // Measured: `2082 + r * (39 ±0)` + // Estimated: `7886 + r * (40 ±0)` + // Minimum execution time: 274_583_000 picoseconds. + Weight::from_parts(352_081_486, 7886) + // Standard Error: 1_799 + .saturating_add(Weight::from_parts(313_433, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) } - /// Storage: Contracts MigrationInProgress (r:1 w:0) - /// Proof: Contracts MigrationInProgress (max_values: Some(1), max_size: Some(1026), added: 1521, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Measured) - /// Storage: Contracts CodeInfoOf (r:1 w:0) - /// Proof: Contracts CodeInfoOf (max_values: None, max_size: Some(89), added: 2564, mode: Measured) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1819), added: 4294, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1600]`. fn seal_instantiation_nonce(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `855 + r * (3 ±0)` - // Estimated: `6802 + r * (3 ±0)` - // Minimum execution time: 257_725_000 picoseconds. - Weight::from_parts(283_441_372, 6802) - // Standard Error: 371 - .saturating_add(Weight::from_parts(157_674, 0).saturating_mul(r.into())) + // Measured: `852 + r * (3 ±0)` + // Estimated: `6799 + r * (3 ±0)` + // Minimum execution time: 267_291_000 picoseconds. + Weight::from_parts(287_500_540, 6799) + // Standard Error: 393 + .saturating_add(Weight::from_parts(152_587, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3691,9 +3836,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_635_000 picoseconds. - Weight::from_parts(2_990_110, 0) - // Standard Error: 31 - .saturating_add(Weight::from_parts(10_213, 0).saturating_mul(r.into())) + // Minimum execution time: 1_440_000 picoseconds. + Weight::from_parts(1_656_631, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(10_486, 0).saturating_mul(r.into())) } } From 9a888e548edfe696c3addb2339b0c50abdb71efd Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Wed, 26 Jul 2023 11:02:31 +0200 Subject: [PATCH 70/70] Update frame/contracts/src/lib.rs Co-authored-by: Juan --- frame/contracts/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index b18e41d8fc829..449576270fce7 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -293,7 +293,7 @@ pub mod pallet { /// The percentage of the storage deposit that should be held for using a code hash. /// Instantiating a contract, or calling [`chain_extension::Ext::add_delegate_dependency`] - /// protects the code from being removed, In order to prevent abuse these actions are + /// protects the code from being removed. In order to prevent abuse these actions are /// protected with a percentage of the code deposit. #[pallet::constant] type CodeHashLockupDepositPercent: Get;