diff --git a/Cargo.lock b/Cargo.lock index a01420bc3ef6..a96bb680b750 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom 0.2.10", @@ -6508,7 +6508,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", ] [[package]] @@ -6517,7 +6517,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "allocator-api2", "serde", ] @@ -7425,9 +7425,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libnghttp2-sys" @@ -8559,6 +8559,12 @@ dependencies = [ "syn 2.0.61", ] +[[package]] +name = "multi-stash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f" + [[package]] name = "multiaddr" version = "0.17.1" @@ -9115,6 +9121,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2 1.0.82", + "quote 1.0.35", + "syn 2.0.61", +] + [[package]] name = "num-format" version = "0.4.4" @@ -9984,7 +10001,7 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "wasm-instrument", - "wasmi", + "wasmi 0.32.3", "wat", ] @@ -17107,7 +17124,7 @@ dependencies = [ name = "sc-consensus-grandpa" version = "0.19.0" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "array-bytes", "assert_matches", "async-trait", @@ -17492,7 +17509,7 @@ dependencies = [ name = "sc-network-gossip" version = "0.34.0" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "async-trait", "futures", "futures-timer", @@ -18245,7 +18262,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] @@ -18965,7 +18982,7 @@ dependencies = [ "smallvec", "soketto", "twox-hash", - "wasmi", + "wasmi 0.31.2", "x25519-dalek 2.0.0", "zeroize", ] @@ -20410,7 +20427,7 @@ dependencies = [ name = "sp-trie" version = "29.0.0" dependencies = [ - "ahash 0.8.8", + "ahash 0.8.11", "array-bytes", "criterion", "hash-db", @@ -20781,6 +20798,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "string-interner" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6a0d765f5807e98a091107bae0a56ea3799f66a5de47b2c84c94a39c09974e" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "serde", +] + [[package]] name = "strobe-rs" version = "0.8.1" @@ -22823,7 +22851,24 @@ dependencies = [ "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core", + "wasmi_core 0.13.0", + "wasmparser-nostd", +] + +[[package]] +name = "wasmi" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50386c99b9c32bd2ed71a55b6dd4040af2580530fae8bdb9a6576571a80d0cca" +dependencies = [ + "arrayvec 0.7.4", + "multi-stash", + "num-derive", + "num-traits", + "smallvec", + "spin 0.9.8", + "wasmi_collections", + "wasmi_core 0.32.3", "wasmparser-nostd", ] @@ -22833,6 +22878,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" +[[package]] +name = "wasmi_collections" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c128c039340ffd50d4195c3f8ce31aac357f06804cfc494c8b9508d4b30dca4" +dependencies = [ + "ahash 0.8.11", + "hashbrown 0.14.3", + "string-interner", +] + [[package]] name = "wasmi_core" version = "0.13.0" @@ -22845,6 +22901,18 @@ dependencies = [ "paste", ] +[[package]] +name = "wasmi_core" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23b3a7f6c8c3ceeec6b83531ee61f0013c56e51cbf2b14b0f213548b23a4b41" +dependencies = [ + "downcast-rs", + "libm", + "num-traits", + "paste", +] + [[package]] name = "wasmparser" version = "0.102.0" @@ -22857,9 +22925,9 @@ dependencies = [ [[package]] name = "wasmparser-nostd" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" dependencies = [ "indexmap-nostd", ] diff --git a/prdoc/pr_3679.prdoc b/prdoc/pr_3679.prdoc new file mode 100644 index 000000000000..86c1e9beafe9 --- /dev/null +++ b/prdoc/pr_3679.prdoc @@ -0,0 +1,14 @@ +title: "[pallet-contracts] bump wasmi to 0.32" + +doc: + - audience: Runtime Dev + description: | + - Bump wasmi to 0.32 + - Turn on lazy and unchecked compilation when calling a contract. + See https://docs.rs/wasmi/0.32.0/wasmi/enum.CompilationMode.html#variant.Lazy + See https://docs.rs/wasmi/0.32.0/wasmi/struct.Module.html#method.new_unchecked + See https://wasmi-labs.github.io/blog/posts/wasmi-v0.32 for more details, on the wasmi update. + +crates: + - name: pallet-contracts + - name: pallet-contracts-proc-macro diff --git a/substrate/frame/contracts/Cargo.toml b/substrate/frame/contracts/Cargo.toml index bd4ded1a1170..70363562f6af 100644 --- a/substrate/frame/contracts/Cargo.toml +++ b/substrate/frame/contracts/Cargo.toml @@ -30,7 +30,7 @@ serde = { optional = true, features = ["derive"], workspace = true, default-feat smallvec = { version = "1", default-features = false, features = [ "const_generics", ] } -wasmi = { version = "0.31", default-features = false } +wasmi = { version = "0.32.3", default-features = false } impl-trait-for-tuples = "0.2" # Only used in benchmarking to generate contract code diff --git a/substrate/frame/contracts/proc-macro/src/lib.rs b/substrate/frame/contracts/proc-macro/src/lib.rs index 2472863b58b1..f91f8660cd31 100644 --- a/substrate/frame/contracts/proc-macro/src/lib.rs +++ b/substrate/frame/contracts/proc-macro/src/lib.rs @@ -150,7 +150,7 @@ impl HostFnReturn { Self::U64 => quote! { ::core::primitive::u64 }, }; quote! { - ::core::result::Result<#ok, ::wasmi::core::Trap> + ::core::result::Result<#ok, ::wasmi::Error> } } } @@ -694,7 +694,7 @@ fn expand_functions(def: &EnvDef, expand_mode: ExpandMode) -> TokenStream2 { let into_host = if expand_blocks { quote! { |reason| { - ::wasmi::core::Trap::from(reason) + ::wasmi::Error::host(reason) } } } else { @@ -711,13 +711,13 @@ fn expand_functions(def: &EnvDef, expand_mode: ExpandMode) -> TokenStream2 { quote! { // Write gas from wasmi into pallet-contracts before entering the host function. let __gas_left_before__ = { - let executor_total = - __caller__.fuel_consumed().expect("Fuel metering is enabled; qed"); + let fuel = + __caller__.get_fuel().expect("Fuel metering is enabled; qed"); __caller__ .data_mut() .ext() .gas_meter_mut() - .sync_from_executor(executor_total) + .sync_from_executor(fuel) .map_err(TrapReason::from) .map_err(#into_host)? }; @@ -733,15 +733,18 @@ fn expand_functions(def: &EnvDef, expand_mode: ExpandMode) -> TokenStream2 { // Write gas from pallet-contracts into wasmi after leaving the host function. let sync_gas_after = if expand_blocks { quote! { - let fuel_consumed = __caller__ + let fuel = __caller__ .data_mut() .ext() .gas_meter_mut() .sync_to_executor(__gas_left_before__) - .map_err(TrapReason::from)?; + .map_err(|err| { + let err = TrapReason::from(err); + wasmi::Error::host(err) + })?; __caller__ - .consume_fuel(fuel_consumed.into()) - .map_err(|_| TrapReason::from(Error::::OutOfGas))?; + .set_fuel(fuel.into()) + .expect("Fuel metering is enabled; qed"); } } else { quote! { } diff --git a/substrate/frame/contracts/src/benchmarking/mod.rs b/substrate/frame/contracts/src/benchmarking/mod.rs index 7c993bc9a771..80c7e863d299 100644 --- a/substrate/frame/contracts/src/benchmarking/mod.rs +++ b/substrate/frame/contracts/src/benchmarking/mod.rs @@ -1278,7 +1278,6 @@ mod benchmarks { // s: size of salt in bytes #[benchmark(pov_mode = Measured)] fn seal_instantiate( - t: Linear<0, 1>, i: Linear<0, { (code::max_pages::() - 1) * 64 * 1024 }>, s: Linear<0, { (code::max_pages::() - 1) * 64 * 1024 }>, ) -> Result<(), BenchmarkError> { @@ -1286,7 +1285,7 @@ mod benchmarks { let hash_bytes = hash.encode(); let hash_len = hash_bytes.len() as u32; - let value: BalanceOf = t.into(); + let value: BalanceOf = 1u32.into(); let value_bytes = value.encode(); let value_len = value_bytes.len() as u32; @@ -1341,6 +1340,7 @@ mod benchmarks { assert_ok!(result); assert!(ContractInfoOf::::get(&addr).is_some()); + assert_eq!(T::Currency::balance(&addr), Pallet::::min_balance() + value); Ok(()) } diff --git a/substrate/frame/contracts/src/benchmarking/sandbox.rs b/substrate/frame/contracts/src/benchmarking/sandbox.rs index 308bf6873e49..1bcf0c401f41 100644 --- a/substrate/frame/contracts/src/benchmarking/sandbox.rs +++ b/substrate/frame/contracts/src/benchmarking/sandbox.rs @@ -24,7 +24,7 @@ use crate::wasm::{ LoadingMode, WasmBlob, }; use sp_core::Get; -use wasmi::{errors::LinkerError, Func, Linker, StackLimits, Store}; +use wasmi::{errors::LinkerError, CompilationMode, Func, Linker, StackLimits, Store}; /// Minimal execution environment without any imported functions. pub struct Sandbox { @@ -48,6 +48,7 @@ impl From<&WasmModule> for Sandbox { Determinism::Relaxed, Some(StackLimits::default()), LoadingMode::Checked, + CompilationMode::Eager, ) .expect("Failed to load Wasm module"); @@ -62,7 +63,7 @@ impl From<&WasmModule> for Sandbox { // Set fuel for wasmi execution. store - .add_fuel(u64::MAX) + .set_fuel(u64::MAX) .expect("We've set up engine to fuel consuming mode; qed"); let entry_point = instance diff --git a/substrate/frame/contracts/src/gas.rs b/substrate/frame/contracts/src/gas.rs index 32fad2140f14..f8c97e251f3d 100644 --- a/substrate/frame/contracts/src/gas.rs +++ b/substrate/frame/contracts/src/gas.rs @@ -23,7 +23,7 @@ use frame_support::{ DefaultNoBound, }; use sp_core::Get; -use sp_runtime::{traits::Zero, DispatchError, Saturating}; +use sp_runtime::{traits::Zero, DispatchError}; #[cfg(test)] use std::{any::Any, fmt::Debug}; @@ -37,6 +37,45 @@ impl ChargedAmount { } } +/// Meter for syncing the gas between the executor and the gas meter. +#[derive(DefaultNoBound)] +struct EngineMeter { + fuel: u64, + _phantom: PhantomData, +} + +impl EngineMeter { + /// Create a meter with the given fuel limit. + fn new(limit: Weight) -> Self { + Self { + fuel: limit.ref_time().saturating_div(T::Schedule::get().ref_time_by_fuel()), + _phantom: PhantomData, + } + } + + /// Set the fuel left to the given value. + /// Returns the amount of Weight consumed since the last update. + fn set_fuel(&mut self, fuel: u64) -> Weight { + let consumed = self + .fuel + .saturating_sub(fuel) + .saturating_mul(T::Schedule::get().ref_time_by_fuel()); + self.fuel = fuel; + Weight::from_parts(consumed, 0) + } + + /// Charge the given amount of gas. + /// Returns the amount of fuel left. + fn charge_ref_time(&mut self, ref_time: u64) -> Result { + let amount = ref_time + .checked_div(T::Schedule::get().ref_time_by_fuel()) + .ok_or(Error::::InvalidSchedule)?; + + self.fuel.checked_sub(amount).ok_or_else(|| Error::::OutOfGas)?; + Ok(Syncable(self.fuel)) + } +} + /// Used to capture the gas left before entering a host function. /// /// Has to be consumed in order to sync back the gas after leaving the host function. @@ -103,12 +142,9 @@ pub struct GasMeter { /// Due to `adjust_gas` and `nested` the `gas_left` can temporarily dip below its final value. gas_left_lowest: Weight, /// The amount of resources that was consumed by the execution engine. - /// - /// This should be equivalent to `self.gas_consumed().ref_time()` but expressed in whatever - /// unit the execution engine uses to track resource consumption. We have to track it - /// separately in order to avoid the loss of precision that happens when converting from - /// ref_time to the execution engine unit. - executor_consumed: u64, + /// We have to track it separately in order to avoid the loss of precision that happens when + /// converting from ref_time to the execution engine unit. + engine_meter: EngineMeter, _phantom: PhantomData, #[cfg(test)] tokens: Vec, @@ -120,7 +156,7 @@ impl GasMeter { gas_limit, gas_left: gas_limit, gas_left_lowest: gas_limit, - executor_consumed: 0, + engine_meter: EngineMeter::new(gas_limit), _phantom: PhantomData, #[cfg(test)] tokens: Vec::new(), @@ -200,16 +236,10 @@ impl GasMeter { /// Needs to be called when entering a host function to update this meter with the /// gas that was tracked by the executor. It tracks the latest seen total value /// in order to compute the delta that needs to be charged. - pub fn sync_from_executor( - &mut self, - executor_total: u64, - ) -> Result { - let chargable_reftime = executor_total - .saturating_sub(self.executor_consumed) - .saturating_mul(u64::from(T::Schedule::get().instruction_weights.base)); - self.executor_consumed = executor_total; + pub fn sync_from_executor(&mut self, engine_fuel: u64) -> Result { + let weight_consumed = self.engine_meter.set_fuel(engine_fuel); self.gas_left - .checked_reduce(Weight::from_parts(chargable_reftime, 0)) + .checked_reduce(weight_consumed) .ok_or_else(|| Error::::OutOfGas)?; Ok(RefTimeLeft(self.gas_left.ref_time())) } @@ -223,13 +253,8 @@ impl GasMeter { /// It is important that this does **not** actually sync with the executor. That has /// to be done by the caller. pub fn sync_to_executor(&mut self, before: RefTimeLeft) -> Result { - let chargable_executor_resource = before - .0 - .saturating_sub(self.gas_left().ref_time()) - .checked_div(u64::from(T::Schedule::get().instruction_weights.base)) - .ok_or(Error::::InvalidSchedule)?; - self.executor_consumed.saturating_accrue(chargable_executor_resource); - Ok(Syncable(chargable_executor_resource)) + let ref_time_consumed = before.0.saturating_sub(self.gas_left().ref_time()); + self.engine_meter.charge_ref_time(ref_time_consumed) } /// Returns the amount of gas that is required to run the same call. diff --git a/substrate/frame/contracts/src/schedule.rs b/substrate/frame/contracts/src/schedule.rs index a1fbdea4228b..60c9520677eb 100644 --- a/substrate/frame/contracts/src/schedule.rs +++ b/substrate/frame/contracts/src/schedule.rs @@ -62,6 +62,13 @@ pub struct Schedule { pub instruction_weights: InstructionWeights, } +impl Schedule { + /// Returns the reference time per engine fuel. + pub fn ref_time_by_fuel(&self) -> u64 { + self.instruction_weights.base as u64 + } +} + /// Describes the upper limits on various metrics. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[cfg_attr(feature = "runtime-benchmarks", derive(Debug))] diff --git a/substrate/frame/contracts/src/wasm/mod.rs b/substrate/frame/contracts/src/wasm/mod.rs index 5eccdfffb91d..0d65d696758d 100644 --- a/substrate/frame/contracts/src/wasm/mod.rs +++ b/substrate/frame/contracts/src/wasm/mod.rs @@ -57,7 +57,7 @@ use frame_support::{ use sp_core::Get; use sp_runtime::{DispatchError, RuntimeDebug}; use sp_std::prelude::*; -use wasmi::{InstancePre, Linker, Memory, MemoryType, StackLimits, Store}; +use wasmi::{CompilationMode, InstancePre, Linker, Memory, MemoryType, StackLimits, Store}; const BYTES_PER_PAGE: usize = 64 * 1024; @@ -142,11 +142,6 @@ struct CodeLoadToken(u32); impl Token for CodeLoadToken { fn weight(&self) -> Weight { - // When loading the contract, we already covered the general costs of - // calling the storage but still need to account for the actual size of the - // contract code. This is why we subtract `T::*::(0)`. We need to do this at this - // point because when charging the general weight for calling the contract we don't know the - // size of the contract. T::WeightInfo::call_with_code_per_byte(self.0) .saturating_sub(T::WeightInfo::call_with_code_per_byte(0)) } @@ -351,9 +346,9 @@ impl WasmBlob { mut store: Store>, result: Result<(), wasmi::Error>, ) -> ExecResult { - let engine_consumed_total = store.fuel_consumed().expect("Fuel metering is enabled; qed"); + let engine_fuel = store.get_fuel().expect("Fuel metering is enabled; qed"); let gas_meter = store.data_mut().ext().gas_meter_mut(); - let _ = gas_meter.sync_from_executor(engine_consumed_total)?; + let _ = gas_meter.sync_from_executor(engine_fuel)?; store.into_data().to_execution_result(result) } @@ -364,8 +359,13 @@ impl WasmBlob { input_data: Vec, ) -> (Func, Store>) { use InstanceOrExecReturn::*; - match Self::prepare_execute(self, Runtime::new(ext, input_data), &ExportedFunction::Call) - .expect("Benchmark should provide valid module") + match Self::prepare_execute( + self, + Runtime::new(ext, input_data), + &ExportedFunction::Call, + CompilationMode::Eager, + ) + .expect("Benchmark should provide valid module") { Instance((func, store)) => (func, store), ExecReturn(_) => panic!("Expected Instance"), @@ -376,6 +376,7 @@ impl WasmBlob { self, runtime: Runtime<'a, E>, function: &'a ExportedFunction, + compilation_mode: CompilationMode, ) -> PreExecResult<'a, E> { let code = self.code.as_slice(); // Instantiate the Wasm module to the engine. @@ -386,6 +387,7 @@ impl WasmBlob { self.code_info.determinism, Some(StackLimits::default()), LoadingMode::Unchecked, + compilation_mode, ) .map_err(|err| { log::debug!(target: LOG_TARGET, "failed to create wasmi module: {err:?}"); @@ -415,10 +417,10 @@ impl WasmBlob { .gas_meter_mut() .gas_left() .ref_time() - .checked_div(T::Schedule::get().instruction_weights.base as u64) + .checked_div(T::Schedule::get().ref_time_by_fuel()) .ok_or(Error::::InvalidSchedule)?; store - .add_fuel(fuel_limit) + .set_fuel(fuel_limit) .expect("We've set up engine to fuel consuming mode; qed"); // Start function should already see the correct refcount in case it will be ever inspected. @@ -464,7 +466,12 @@ impl Executable for WasmBlob { input_data: Vec, ) -> ExecResult { use InstanceOrExecReturn::*; - match Self::prepare_execute(self, Runtime::new(ext, input_data), function)? { + match Self::prepare_execute( + self, + Runtime::new(ext, input_data), + function, + CompilationMode::Lazy, + )? { Instance((func, mut store)) => { let result = func.call(&mut store, &[], &mut []); Self::process_result(store, result) diff --git a/substrate/frame/contracts/src/wasm/prepare.rs b/substrate/frame/contracts/src/wasm/prepare.rs index 0d9a12d8ae83..50eb6d625321 100644 --- a/substrate/frame/contracts/src/wasm/prepare.rs +++ b/substrate/frame/contracts/src/wasm/prepare.rs @@ -33,8 +33,8 @@ use sp_runtime::{traits::Hash, DispatchError}; #[cfg(any(test, feature = "runtime-benchmarks"))] use sp_std::prelude::Vec; use wasmi::{ - core::ValueType as WasmiValueType, Config as WasmiConfig, Engine, ExternType, - FuelConsumptionMode, Module, StackLimits, + core::ValType as WasmiValueType, CompilationMode, Config as WasmiConfig, Engine, ExternType, + Module, StackLimits, }; /// Imported memory must be located inside this module. The reason for hardcoding is that current @@ -71,7 +71,8 @@ impl LoadedModule { code: &[u8], determinism: Determinism, stack_limits: Option, - _mode: LoadingMode, + loading_mode: LoadingMode, + compilation_mode: CompilationMode, ) -> Result { // NOTE: wasmi does not support unstable WebAssembly features. The module is implicitly // checked for not having those ones when creating `wasmi::Module` below. @@ -86,8 +87,8 @@ impl LoadedModule { .wasm_extended_const(false) .wasm_saturating_float_to_int(false) .floats(matches!(determinism, Determinism::Relaxed)) - .consume_fuel(true) - .fuel_consumption_mode(FuelConsumptionMode::Eager); + .compilation_mode(compilation_mode) + .consume_fuel(true); if let Some(stack_limits) = stack_limits { config.set_stack_limits(stack_limits); @@ -95,14 +96,18 @@ impl LoadedModule { let engine = Engine::new(&config); - // TODO use Module::new_unchecked when validate_module is true once we are on wasmi@0.32 - let module = Module::new(&engine, code).map_err(|err| { + let module = match loading_mode { + LoadingMode::Checked => Module::new(&engine, code), + // Safety: The code has been validated, Therefore we know that it's a valid binary. + LoadingMode::Unchecked => unsafe { Module::new_unchecked(&engine, code) }, + } + .map_err(|err| { log::debug!(target: LOG_TARGET, "Module creation failed: {:?}", err); "Can't load the module into wasmi!" })?; #[cfg(test)] - tracker::LOADED_MODULE.with(|t| t.borrow_mut().push(_mode)); + tracker::LOADED_MODULE.with(|t| t.borrow_mut().push(loading_mode)); // Return a `LoadedModule` instance with // __valid__ module. @@ -263,17 +268,25 @@ where Determinism::Enforced, stack_limits, LoadingMode::Checked, + CompilationMode::Eager, ) { *determinism = Determinism::Enforced; module } else { - LoadedModule::new::(code, Determinism::Relaxed, None, LoadingMode::Checked)? + LoadedModule::new::( + code, + Determinism::Relaxed, + None, + LoadingMode::Checked, + CompilationMode::Eager, + )? }, Determinism::Enforced => LoadedModule::new::( code, Determinism::Enforced, stack_limits, LoadingMode::Checked, + CompilationMode::Eager, )?, }; @@ -348,8 +361,13 @@ pub mod benchmarking { owner: AccountIdOf, ) -> Result, DispatchError> { let determinism = Determinism::Enforced; - let contract_module = - LoadedModule::new::(&code, determinism, None, LoadingMode::Checked)?; + let contract_module = LoadedModule::new::( + &code, + determinism, + None, + LoadingMode::Checked, + CompilationMode::Eager, + )?; let _ = contract_module.scan_imports::(schedule)?; let code: CodeVec = code.try_into().map_err(|_| >::CodeTooLarge)?; let code_info = CodeInfo { diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs index 07ecd60f7d5e..5f50dbf391a2 100644 --- a/substrate/frame/contracts/src/wasm/runtime.rs +++ b/substrate/frame/contracts/src/wasm/runtime.rs @@ -209,9 +209,7 @@ pub enum RuntimeCosts { /// Weight per byte that is cloned by supplying the `CLONE_INPUT` flag. CallInputCloned(u32), /// Weight of calling `seal_instantiate` for the given input length and salt. - InstantiateBase { input_data_len: u32, salt_len: u32 }, - /// Weight of the transfer performed during an instantiate. - InstantiateTransferSurcharge, + Instantiate { input_data_len: u32, salt_len: u32 }, /// Weight of calling `seal_hash_sha_256` for the given input size. HashSha256(u32), /// Weight of calling `seal_hash_keccak_256` for the given input size. @@ -302,9 +300,8 @@ impl Token for RuntimeCosts { DelegateCallBase => T::WeightInfo::seal_delegate_call(), CallTransferSurcharge => cost_args!(seal_call, 1, 0), CallInputCloned(len) => cost_args!(seal_call, 0, len), - InstantiateBase { input_data_len, salt_len } => - T::WeightInfo::seal_instantiate(0, input_data_len, salt_len), - InstantiateTransferSurcharge => cost_args!(seal_instantiate, 1, 0, 0), + Instantiate { input_data_len, salt_len } => + T::WeightInfo::seal_instantiate(input_data_len, salt_len), HashSha256(len) => T::WeightInfo::seal_hash_sha2_256(len), HashKeccak256(len) => T::WeightInfo::seal_hash_keccak_256(len), HashBlake256(len) => T::WeightInfo::seal_hash_blake2_256(len), @@ -385,49 +382,55 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> { /// Converts the sandbox result and the runtime state into the execution outcome. pub fn to_execution_result(self, sandbox_result: Result<(), wasmi::Error>) -> ExecResult { - use wasmi::core::TrapCode::OutOfFuel; + use wasmi::{ + core::TrapCode, + errors::{ErrorKind, FuelError}, + }; use TrapReason::*; - match sandbox_result { + let Err(error) = sandbox_result else { // Contract returned from main function -> no data was returned. - Ok(_) => Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() }), + return Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() }) + }; + if let ErrorKind::Fuel(FuelError::OutOfFuel) = error.kind() { // `OutOfGas` when host asks engine to consume more than left in the _store_. // We should never get this case, as gas meter is being charged (and hence raises error) // first. - Err(wasmi::Error::Store(_)) => Err(Error::::OutOfGas.into()), - // Contract either trapped or some host function aborted the execution. - Err(wasmi::Error::Trap(trap)) => { - if let Some(OutOfFuel) = trap.trap_code() { - // `OutOfGas` during engine execution. - return Err(Error::::OutOfGas.into()) - } - // If we encoded a reason then it is some abort generated by a host function. - if let Some(reason) = &trap.downcast_ref::() { - match &reason { - Return(ReturnData { flags, data }) => { - let flags = ReturnFlags::from_bits(*flags) - .ok_or(Error::::InvalidCallFlags)?; - return Ok(ExecReturnValue { flags, data: data.to_vec() }) - }, - Termination => - return Ok(ExecReturnValue { - flags: ReturnFlags::empty(), - data: Vec::new(), - }), - SupervisorError(error) => return Err((*error).into()), - } - } + return Err(Error::::OutOfGas.into()) + } + match error.as_trap_code() { + Some(TrapCode::OutOfFuel) => { + // `OutOfGas` during engine execution. + return Err(Error::::OutOfGas.into()) + }, + Some(_trap_code) => { // Otherwise the trap came from the contract itself. - Err(Error::::ContractTrapped.into()) + return Err(Error::::ContractTrapped.into()) }, - // Any other error is returned only if instantiation or linking failed (i.e. - // wasm binary tried to import a function that is not provided by the host). - // This shouldn't happen because validation process ought to reject such binaries. - // - // Because panics are really undesirable in the runtime code, we treat this as - // a trap for now. Eventually, we might want to revisit this. - Err(_) => Err(Error::::CodeRejected.into()), + None => {}, + } + // If we encoded a reason then it is some abort generated by a host function. + if let Some(reason) = &error.downcast_ref::() { + match &reason { + Return(ReturnData { flags, data }) => { + let flags = + ReturnFlags::from_bits(*flags).ok_or(Error::::InvalidCallFlags)?; + return Ok(ExecReturnValue { flags, data: data.to_vec() }) + }, + Termination => + return Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() }), + SupervisorError(error) => return Err((*error).into()), + } } + + // Any other error is returned only if instantiation or linking failed (i.e. + // wasm binary tried to import a function that is not provided by the host). + // This shouldn't happen because validation process ought to reject such binaries. + // + // Because panics are really undesirable in the runtime code, we treat this as + // a trap for now. Eventually, we might want to revisit this. + log::debug!("Code rejected: {:?}", error); + Err(Error::::CodeRejected.into()) } /// Get a mutable reference to the inner `Ext`. @@ -894,16 +897,13 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> { salt_ptr: u32, salt_len: u32, ) -> Result { - self.charge_gas(RuntimeCosts::InstantiateBase { input_data_len, salt_len })?; + self.charge_gas(RuntimeCosts::Instantiate { input_data_len, salt_len })?; let deposit_limit: BalanceOf<::T> = if deposit_ptr == SENTINEL { BalanceOf::<::T>::zero() } else { self.read_sandbox_memory_as(memory, deposit_ptr)? }; let value: BalanceOf<::T> = self.read_sandbox_memory_as(memory, value_ptr)?; - if value > 0u32.into() { - self.charge_gas(RuntimeCosts::InstantiateTransferSurcharge)?; - } let code_hash: CodeHash<::T> = self.read_sandbox_memory_as(memory, code_hash_ptr)?; let input_data = self.read_sandbox_memory(memory, input_data_ptr, input_data_len)?; diff --git a/substrate/frame/contracts/src/weights.rs b/substrate/frame/contracts/src/weights.rs index 98b41eda964c..0404a9d3d8e5 100644 --- a/substrate/frame/contracts/src/weights.rs +++ b/substrate/frame/contracts/src/weights.rs @@ -18,9 +18,9 @@ //! Autogenerated weights for `pallet_contracts` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-05-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-06-07, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner-vicqj8em-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `runner-1pho9goo-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024` // Executed Command: @@ -101,7 +101,7 @@ pub trait WeightInfo { fn seal_transfer() -> Weight; fn seal_call(t: u32, i: u32, ) -> Weight; fn seal_delegate_call() -> Weight; - fn seal_instantiate(t: u32, i: u32, s: u32, ) -> Weight; + fn seal_instantiate(i: u32, s: u32, ) -> Weight; fn seal_hash_sha2_256(n: u32, ) -> Weight; fn seal_hash_keccak_256(n: u32, ) -> Weight; fn seal_hash_blake2_256(n: u32, ) -> Weight; @@ -127,8 +127,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 1_960_000 picoseconds. - Weight::from_parts(2_043_000, 1627) + // Minimum execution time: 1_896_000 picoseconds. + Weight::from_parts(1_990_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,10 +138,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `452 + k * (69 ±0)` // Estimated: `442 + k * (70 ±0)` - // Minimum execution time: 11_574_000 picoseconds. - Weight::from_parts(11_846_000, 442) - // Standard Error: 1_342 - .saturating_add(Weight::from_parts(1_113_844, 0).saturating_mul(k.into())) + // Minimum execution time: 11_142_000 picoseconds. + Weight::from_parts(11_578_000, 442) + // Standard Error: 1_557 + .saturating_add(Weight::from_parts(1_165_198, 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)) @@ -155,10 +155,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 7_709_000 picoseconds. - Weight::from_parts(5_068_795, 6149) + // Minimum execution time: 7_649_000 picoseconds. + Weight::from_parts(4_827_445, 6149) // Standard Error: 5 - .saturating_add(Weight::from_parts(1_689, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_630, 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())) @@ -171,8 +171,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `510` // Estimated: `6450` - // Minimum execution time: 16_477_000 picoseconds. - Weight::from_parts(17_313_000, 6450) + // Minimum execution time: 16_096_000 picoseconds. + Weight::from_parts(16_937_000, 6450) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -185,10 +185,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 3_111_000 picoseconds. - Weight::from_parts(3_198_000, 3635) - // Standard Error: 593 - .saturating_add(Weight::from_parts(1_081_746, 0).saturating_mul(k.into())) + // Minimum execution time: 3_131_000 picoseconds. + Weight::from_parts(3_209_000, 3635) + // Standard Error: 481 + .saturating_add(Weight::from_parts(1_087_506, 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()))) @@ -207,10 +207,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 15_390_000 picoseconds. - Weight::from_parts(16_157_208, 6263) + // Minimum execution time: 15_289_000 picoseconds. + Weight::from_parts(16_157_168, 6263) // Standard Error: 1 - .saturating_add(Weight::from_parts(501, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(395, 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())) @@ -221,8 +221,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `440` // Estimated: `6380` - // Minimum execution time: 12_045_000 picoseconds. - Weight::from_parts(12_892_000, 6380) + // Minimum execution time: 12_312_000 picoseconds. + Weight::from_parts(12_650_000, 6380) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -236,8 +236,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `352` // Estimated: `6292` - // Minimum execution time: 47_250_000 picoseconds. - Weight::from_parts(49_231_000, 6292) + // Minimum execution time: 47_239_000 picoseconds. + Weight::from_parts(48_617_000, 6292) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -249,8 +249,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `594` // Estimated: `6534` - // Minimum execution time: 53_722_000 picoseconds. - Weight::from_parts(55_268_000, 6534) + // Minimum execution time: 52_084_000 picoseconds. + Weight::from_parts(53_838_000, 6534) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -260,8 +260,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `409` // Estimated: `6349` - // Minimum execution time: 11_707_000 picoseconds. - Weight::from_parts(12_305_000, 6349) + // Minimum execution time: 11_785_000 picoseconds. + Weight::from_parts(12_284_000, 6349) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -271,8 +271,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_129_000 picoseconds. - Weight::from_parts(2_197_000, 1627) + // Minimum execution time: 2_136_000 picoseconds. + Weight::from_parts(2_233_000, 1627) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -284,8 +284,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 11_145_000 picoseconds. - Weight::from_parts(11_445_000, 3631) + // Minimum execution time: 10_957_000 picoseconds. + Weight::from_parts(11_314_000, 3631) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -295,8 +295,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_463_000 picoseconds. - Weight::from_parts(4_585_000, 3607) + // Minimum execution time: 4_354_000 picoseconds. + Weight::from_parts(4_613_000, 3607) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -307,8 +307,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 5_639_000 picoseconds. - Weight::from_parts(5_865_000, 3632) + // Minimum execution time: 5_541_000 picoseconds. + Weight::from_parts(5_790_000, 3632) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -319,8 +319,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 5_540_000 picoseconds. - Weight::from_parts(5_954_000, 3607) + // Minimum execution time: 5_502_000 picoseconds. + Weight::from_parts(5_701_000, 3607) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -341,10 +341,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `801 + c * (1 ±0)` // Estimated: `4264 + c * (1 ±0)` - // Minimum execution time: 353_812_000 picoseconds. - Weight::from_parts(337_889_300, 4264) - // Standard Error: 94 - .saturating_add(Weight::from_parts(34_200, 0).saturating_mul(c.into())) + // Minimum execution time: 247_884_000 picoseconds. + Weight::from_parts(265_795_781, 4264) + // Standard Error: 4 + .saturating_add(Weight::from_parts(724, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -372,14 +372,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `323` // Estimated: `6262` - // Minimum execution time: 4_499_852_000 picoseconds. - Weight::from_parts(135_265_841, 6262) - // Standard Error: 247 - .saturating_add(Weight::from_parts(72_051, 0).saturating_mul(c.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(2_180, 0).saturating_mul(i.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(2_195, 0).saturating_mul(s.into())) + // Minimum execution time: 4_500_184_000 picoseconds. + Weight::from_parts(160_729_258, 6262) + // Standard Error: 143 + .saturating_add(Weight::from_parts(52_809, 0).saturating_mul(c.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(2_173, 0).saturating_mul(i.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(2_165, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -405,12 +405,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4029` - // Minimum execution time: 2_376_075_000 picoseconds. - Weight::from_parts(2_387_885_000, 4029) + // Minimum execution time: 2_219_163_000 picoseconds. + Weight::from_parts(2_236_918_000, 4029) // Standard Error: 32 - .saturating_add(Weight::from_parts(1_036, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(937, 0).saturating_mul(i.into())) // Standard Error: 32 - .saturating_add(Weight::from_parts(936, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(938, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(5_u64)) } @@ -430,8 +430,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `826` // Estimated: `4291` - // Minimum execution time: 197_222_000 picoseconds. - Weight::from_parts(203_633_000, 4291) + // Minimum execution time: 164_801_000 picoseconds. + Weight::from_parts(167_250_000, 4291) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } @@ -448,10 +448,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 325_788_000 picoseconds. - Weight::from_parts(335_491_760, 3607) - // Standard Error: 50 - .saturating_add(Weight::from_parts(35_337, 0).saturating_mul(c.into())) + // Minimum execution time: 225_207_000 picoseconds. + Weight::from_parts(263_665_658, 3607) + // Standard Error: 47 + .saturating_add(Weight::from_parts(50_732, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -468,10 +468,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 336_010_000 picoseconds. - Weight::from_parts(348_030_264, 3607) - // Standard Error: 43 - .saturating_add(Weight::from_parts(35_696, 0).saturating_mul(c.into())) + // Minimum execution time: 230_718_000 picoseconds. + Weight::from_parts(258_359_271, 3607) + // Standard Error: 47 + .saturating_add(Weight::from_parts(51_014, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -487,8 +487,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `315` // Estimated: `3780` - // Minimum execution time: 40_118_000 picoseconds. - Weight::from_parts(40_987_000, 3780) + // Minimum execution time: 39_668_000 picoseconds. + Weight::from_parts(41_031_000, 3780) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -502,8 +502,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `552` // Estimated: `6492` - // Minimum execution time: 25_236_000 picoseconds. - Weight::from_parts(26_450_000, 6492) + // Minimum execution time: 25_890_000 picoseconds. + Weight::from_parts(26_603_000, 6492) .saturating_add(T::DbWeight::get().reads(4_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -512,17 +512,17 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_200_000 picoseconds. - Weight::from_parts(9_773_983, 0) + // Minimum execution time: 8_269_000 picoseconds. + Weight::from_parts(9_227_069, 0) // Standard Error: 74 - .saturating_add(Weight::from_parts(72_257, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(51_396, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 606_000 picoseconds. - Weight::from_parts(672_000, 0) + // Minimum execution time: 602_000 picoseconds. + Weight::from_parts(664_000, 0) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:0) /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) @@ -530,8 +530,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `354` // Estimated: `3819` - // Minimum execution time: 6_260_000 picoseconds. - Weight::from_parts(6_645_000, 3819) + // Minimum execution time: 6_131_000 picoseconds. + Weight::from_parts(6_468_000, 3819) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:0) @@ -540,79 +540,79 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3912` - // Minimum execution time: 7_599_000 picoseconds. - Weight::from_parts(7_913_000, 3912) + // Minimum execution time: 7_557_000 picoseconds. + Weight::from_parts(7_704_000, 3912) .saturating_add(T::DbWeight::get().reads(1_u64)) } fn seal_own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 772_000 picoseconds. - Weight::from_parts(852_000, 0) + // Minimum execution time: 783_000 picoseconds. + Weight::from_parts(848_000, 0) } fn seal_caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 390_000 picoseconds. - Weight::from_parts(417_000, 0) + // Minimum execution time: 397_000 picoseconds. + Weight::from_parts(435_000, 0) } fn seal_caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 340_000 picoseconds. - Weight::from_parts(368_000, 0) + // Minimum execution time: 351_000 picoseconds. + Weight::from_parts(372_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 640_000 picoseconds. - Weight::from_parts(672_000, 0) + // Minimum execution time: 608_000 picoseconds. + Weight::from_parts(645_000, 0) } fn seal_gas_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 607_000 picoseconds. - Weight::from_parts(699_000, 0) + // Minimum execution time: 661_000 picoseconds. + Weight::from_parts(729_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 4_519_000 picoseconds. - Weight::from_parts(4_668_000, 0) + // Minimum execution time: 4_545_000 picoseconds. + Weight::from_parts(4_663_000, 0) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 600_000 picoseconds. - Weight::from_parts(639_000, 0) + // Minimum execution time: 614_000 picoseconds. + Weight::from_parts(641_000, 0) } fn seal_minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 579_000 picoseconds. - Weight::from_parts(609_000, 0) + // Minimum execution time: 583_000 picoseconds. + Weight::from_parts(618_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 575_000 picoseconds. - Weight::from_parts(613_000, 0) + // Minimum execution time: 583_000 picoseconds. + Weight::from_parts(617_000, 0) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 554_000 picoseconds. - Weight::from_parts(622_000, 0) + // Minimum execution time: 607_000 picoseconds. + Weight::from_parts(638_000, 0) } /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) @@ -620,8 +620,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `67` // Estimated: `1552` - // Minimum execution time: 4_265_000 picoseconds. - Weight::from_parts(4_525_000, 1552) + // Minimum execution time: 4_172_000 picoseconds. + Weight::from_parts(4_408_000, 1552) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// The range of component `n` is `[0, 1048572]`. @@ -629,20 +629,20 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 512_000 picoseconds. - Weight::from_parts(524_000, 0) + // Minimum execution time: 475_000 picoseconds. + Weight::from_parts(515_000, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(303, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(298, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048572]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 358_000 picoseconds. - Weight::from_parts(375_000, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(481, 0).saturating_mul(n.into())) + // Minimum execution time: 289_000 picoseconds. + Weight::from_parts(357_000, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(405, 0).saturating_mul(n.into())) } /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:1) /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) @@ -655,10 +655,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `319 + n * (78 ±0)` // Estimated: `3784 + n * (2553 ±0)` - // Minimum execution time: 13_267_000 picoseconds. - Weight::from_parts(15_705_698, 3784) - // Standard Error: 7_176 - .saturating_add(Weight::from_parts(3_506_583, 0).saturating_mul(n.into())) + // Minimum execution time: 13_316_000 picoseconds. + Weight::from_parts(15_855_821, 3784) + // Standard Error: 7_274 + .saturating_add(Weight::from_parts(3_447_246, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -671,8 +671,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_339_000 picoseconds. - Weight::from_parts(3_544_000, 1561) + // Minimum execution time: 3_468_000 picoseconds. + Weight::from_parts(3_608_000, 1561) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: `System::EventTopics` (r:4 w:4) @@ -683,12 +683,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `990 + t * (2475 ±0)` - // Minimum execution time: 3_789_000 picoseconds. - Weight::from_parts(4_070_991, 990) - // Standard Error: 6_319 - .saturating_add(Weight::from_parts(2_264_078, 0).saturating_mul(t.into())) + // Minimum execution time: 3_777_000 picoseconds. + Weight::from_parts(4_028_191, 990) + // Standard Error: 5_907 + .saturating_add(Weight::from_parts(2_183_733, 0).saturating_mul(t.into())) // Standard Error: 1 - .saturating_add(Weight::from_parts(20, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(18, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2475).saturating_mul(t.into())) @@ -698,10 +698,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 426_000 picoseconds. - Weight::from_parts(465_000, 0) + // Minimum execution time: 400_000 picoseconds. + Weight::from_parts(423_000, 0) // Standard Error: 10 - .saturating_add(Weight::from_parts(1_277, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_209, 0).saturating_mul(i.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -711,12 +711,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `250 + o * (1 ±0)` // Estimated: `249 + o * (1 ±0)` - // Minimum execution time: 9_148_000 picoseconds. - Weight::from_parts(8_789_382, 249) - // Standard Error: 2 - .saturating_add(Weight::from_parts(361, 0).saturating_mul(n.into())) - // Standard Error: 2 - .saturating_add(Weight::from_parts(66, 0).saturating_mul(o.into())) + // Minimum execution time: 9_033_000 picoseconds. + Weight::from_parts(8_797_934, 249) + // Standard Error: 1 + .saturating_add(Weight::from_parts(257, 0).saturating_mul(n.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(51, 0).saturating_mul(o.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -728,10 +728,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 7_344_000 picoseconds. - Weight::from_parts(8_119_197, 248) + // Minimum execution time: 7_167_000 picoseconds. + Weight::from_parts(8_012_194, 248) // Standard Error: 1 - .saturating_add(Weight::from_parts(83, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(90, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -743,10 +743,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 6_763_000 picoseconds. - Weight::from_parts(7_669_781, 248) - // Standard Error: 2 - .saturating_add(Weight::from_parts(710, 0).saturating_mul(n.into())) + // Minimum execution time: 6_868_000 picoseconds. + Weight::from_parts(7_801_811, 248) + // Standard Error: 1 + .saturating_add(Weight::from_parts(605, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -757,10 +757,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 6_310_000 picoseconds. - Weight::from_parts(7_039_085, 248) + // Minimum execution time: 6_322_000 picoseconds. + Weight::from_parts(7_103_552, 248) // Standard Error: 1 - .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(79, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -771,10 +771,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 7_541_000 picoseconds. - Weight::from_parts(8_559_509, 248) - // Standard Error: 1 - .saturating_add(Weight::from_parts(711, 0).saturating_mul(n.into())) + // Minimum execution time: 7_702_000 picoseconds. + Weight::from_parts(8_746_305, 248) + // Standard Error: 2 + .saturating_add(Weight::from_parts(604, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -783,8 +783,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 8_728_000 picoseconds. - Weight::from_parts(9_035_000, 0) + // Minimum execution time: 8_851_000 picoseconds. + Weight::from_parts(9_083_000, 0) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) @@ -800,12 +800,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `620 + t * (280 ±0)` // Estimated: `4085 + t * (2182 ±0)` - // Minimum execution time: 153_385_000 picoseconds. - Weight::from_parts(156_813_102, 4085) - // Standard Error: 290_142 - .saturating_add(Weight::from_parts(42_350_253, 0).saturating_mul(t.into())) + // Minimum execution time: 121_148_000 picoseconds. + Weight::from_parts(119_605_377, 4085) + // Standard Error: 208_337 + .saturating_add(Weight::from_parts(43_153_338, 0).saturating_mul(t.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(5, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -820,8 +820,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `430` // Estimated: `3895` - // Minimum execution time: 140_007_000 picoseconds. - Weight::from_parts(144_781_000, 3895) + // Minimum execution time: 108_159_000 picoseconds. + Weight::from_parts(110_027_000, 3895) .saturating_add(T::DbWeight::get().reads(2_u64)) } /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) @@ -834,19 +834,18 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) - /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. - fn seal_instantiate(_t: u32, i: u32, s: u32, ) -> Weight { + fn seal_instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `676` - // Estimated: `4138` - // Minimum execution time: 2_073_851_000 picoseconds. - Weight::from_parts(2_084_321_000, 4138) - // Standard Error: 17 - .saturating_add(Weight::from_parts(986, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_261, 0).saturating_mul(s.into())) + // Estimated: `4127` + // Minimum execution time: 1_861_874_000 picoseconds. + Weight::from_parts(1_872_926_000, 4127) + // Standard Error: 23 + .saturating_add(Weight::from_parts(557, 0).saturating_mul(i.into())) + // Standard Error: 23 + .saturating_add(Weight::from_parts(920, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -855,64 +854,64 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 902_000 picoseconds. - Weight::from_parts(10_389_779, 0) + // Minimum execution time: 878_000 picoseconds. + Weight::from_parts(10_993_950, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_422, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_325, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_477_000 picoseconds. - Weight::from_parts(12_143_874, 0) + // Minimum execution time: 1_261_000 picoseconds. + Weight::from_parts(9_759_497, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_683, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_594, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 778_000 picoseconds. - Weight::from_parts(8_762_544, 0) + // Minimum execution time: 726_000 picoseconds. + Weight::from_parts(9_795_728, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_557, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_455, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 748_000 picoseconds. - Weight::from_parts(10_364_578, 0) + // Minimum execution time: 739_000 picoseconds. + Weight::from_parts(9_701_202, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_550, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_459, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 43_388_000 picoseconds. - Weight::from_parts(42_346_211, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(5_103, 0).saturating_mul(n.into())) + // Minimum execution time: 43_309_000 picoseconds. + Weight::from_parts(41_405_949, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(5_336, 0).saturating_mul(n.into())) } fn seal_ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_825_000 picoseconds. - Weight::from_parts(48_073_000, 0) + // Minimum execution time: 47_880_000 picoseconds. + Weight::from_parts(49_025_000, 0) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_864_000 picoseconds. - Weight::from_parts(13_065_000, 0) + // Minimum execution time: 13_462_000 picoseconds. + Weight::from_parts(13_631_000, 0) } /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) @@ -922,8 +921,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `430` // Estimated: `3895` - // Minimum execution time: 18_406_000 picoseconds. - Weight::from_parts(19_112_000, 3895) + // Minimum execution time: 17_978_000 picoseconds. + Weight::from_parts(18_578_000, 3895) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -933,8 +932,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `3820` - // Minimum execution time: 8_441_000 picoseconds. - Weight::from_parts(8_710_000, 3820) + // Minimum execution time: 8_384_000 picoseconds. + Weight::from_parts(8_687_000, 3820) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -944,8 +943,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `355` // Estimated: `3558` - // Minimum execution time: 7_525_000 picoseconds. - Weight::from_parts(7_819_000, 3558) + // Minimum execution time: 7_547_000 picoseconds. + Weight::from_parts(7_935_000, 3558) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -953,15 +952,15 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 313_000 picoseconds. - Weight::from_parts(375_000, 0) + // Minimum execution time: 331_000 picoseconds. + Weight::from_parts(363_000, 0) } fn seal_account_reentrance_count() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 308_000 picoseconds. - Weight::from_parts(334_000, 0) + // Minimum execution time: 349_000 picoseconds. + Weight::from_parts(365_000, 0) } /// Storage: `Contracts::Nonce` (r:1 w:0) /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) @@ -969,8 +968,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `219` // Estimated: `1704` - // Minimum execution time: 2_775_000 picoseconds. - Weight::from_parts(3_043_000, 1704) + // Minimum execution time: 2_814_000 picoseconds. + Weight::from_parts(3_038_000, 1704) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// The range of component `r` is `[0, 5000]`. @@ -978,10 +977,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 925_000 picoseconds. - Weight::from_parts(443_142, 0) - // Standard Error: 19 - .saturating_add(Weight::from_parts(15_316, 0).saturating_mul(r.into())) + // Minimum execution time: 693_000 picoseconds. + Weight::from_parts(665_431, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(7_030, 0).saturating_mul(r.into())) } } @@ -993,8 +992,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 1_960_000 picoseconds. - Weight::from_parts(2_043_000, 1627) + // Minimum execution time: 1_896_000 picoseconds. + Weight::from_parts(1_990_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -1004,10 +1003,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `452 + k * (69 ±0)` // Estimated: `442 + k * (70 ±0)` - // Minimum execution time: 11_574_000 picoseconds. - Weight::from_parts(11_846_000, 442) - // Standard Error: 1_342 - .saturating_add(Weight::from_parts(1_113_844, 0).saturating_mul(k.into())) + // Minimum execution time: 11_142_000 picoseconds. + Weight::from_parts(11_578_000, 442) + // Standard Error: 1_557 + .saturating_add(Weight::from_parts(1_165_198, 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)) @@ -1021,10 +1020,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `211 + c * (1 ±0)` // Estimated: `6149 + c * (1 ±0)` - // Minimum execution time: 7_709_000 picoseconds. - Weight::from_parts(5_068_795, 6149) + // Minimum execution time: 7_649_000 picoseconds. + Weight::from_parts(4_827_445, 6149) // Standard Error: 5 - .saturating_add(Weight::from_parts(1_689, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(1_630, 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())) @@ -1037,8 +1036,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `510` // Estimated: `6450` - // Minimum execution time: 16_477_000 picoseconds. - Weight::from_parts(17_313_000, 6450) + // Minimum execution time: 16_096_000 picoseconds. + Weight::from_parts(16_937_000, 6450) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1051,10 +1050,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `171 + k * (1 ±0)` // Estimated: `3635 + k * (1 ±0)` - // Minimum execution time: 3_111_000 picoseconds. - Weight::from_parts(3_198_000, 3635) - // Standard Error: 593 - .saturating_add(Weight::from_parts(1_081_746, 0).saturating_mul(k.into())) + // Minimum execution time: 3_131_000 picoseconds. + Weight::from_parts(3_209_000, 3635) + // Standard Error: 481 + .saturating_add(Weight::from_parts(1_087_506, 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()))) @@ -1073,10 +1072,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `325 + c * (1 ±0)` // Estimated: `6263 + c * (1 ±0)` - // Minimum execution time: 15_390_000 picoseconds. - Weight::from_parts(16_157_208, 6263) + // Minimum execution time: 15_289_000 picoseconds. + Weight::from_parts(16_157_168, 6263) // Standard Error: 1 - .saturating_add(Weight::from_parts(501, 0).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(395, 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())) @@ -1087,8 +1086,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `440` // Estimated: `6380` - // Minimum execution time: 12_045_000 picoseconds. - Weight::from_parts(12_892_000, 6380) + // Minimum execution time: 12_312_000 picoseconds. + Weight::from_parts(12_650_000, 6380) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1102,8 +1101,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `352` // Estimated: `6292` - // Minimum execution time: 47_250_000 picoseconds. - Weight::from_parts(49_231_000, 6292) + // Minimum execution time: 47_239_000 picoseconds. + Weight::from_parts(48_617_000, 6292) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1115,8 +1114,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `594` // Estimated: `6534` - // Minimum execution time: 53_722_000 picoseconds. - Weight::from_parts(55_268_000, 6534) + // Minimum execution time: 52_084_000 picoseconds. + Weight::from_parts(53_838_000, 6534) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1126,8 +1125,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `409` // Estimated: `6349` - // Minimum execution time: 11_707_000 picoseconds. - Weight::from_parts(12_305_000, 6349) + // Minimum execution time: 11_785_000 picoseconds. + Weight::from_parts(12_284_000, 6349) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1137,8 +1136,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `1627` - // Minimum execution time: 2_129_000 picoseconds. - Weight::from_parts(2_197_000, 1627) + // Minimum execution time: 2_136_000 picoseconds. + Weight::from_parts(2_233_000, 1627) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1150,8 +1149,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `166` // Estimated: `3631` - // Minimum execution time: 11_145_000 picoseconds. - Weight::from_parts(11_445_000, 3631) + // Minimum execution time: 10_957_000 picoseconds. + Weight::from_parts(11_314_000, 3631) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1161,8 +1160,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 4_463_000 picoseconds. - Weight::from_parts(4_585_000, 3607) + // Minimum execution time: 4_354_000 picoseconds. + Weight::from_parts(4_613_000, 3607) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -1173,8 +1172,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `167` // Estimated: `3632` - // Minimum execution time: 5_639_000 picoseconds. - Weight::from_parts(5_865_000, 3632) + // Minimum execution time: 5_541_000 picoseconds. + Weight::from_parts(5_790_000, 3632) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) @@ -1185,8 +1184,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 5_540_000 picoseconds. - Weight::from_parts(5_954_000, 3607) + // Minimum execution time: 5_502_000 picoseconds. + Weight::from_parts(5_701_000, 3607) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1207,10 +1206,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `801 + c * (1 ±0)` // Estimated: `4264 + c * (1 ±0)` - // Minimum execution time: 353_812_000 picoseconds. - Weight::from_parts(337_889_300, 4264) - // Standard Error: 94 - .saturating_add(Weight::from_parts(34_200, 0).saturating_mul(c.into())) + // Minimum execution time: 247_884_000 picoseconds. + Weight::from_parts(265_795_781, 4264) + // Standard Error: 4 + .saturating_add(Weight::from_parts(724, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -1238,14 +1237,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `323` // Estimated: `6262` - // Minimum execution time: 4_499_852_000 picoseconds. - Weight::from_parts(135_265_841, 6262) - // Standard Error: 247 - .saturating_add(Weight::from_parts(72_051, 0).saturating_mul(c.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(2_180, 0).saturating_mul(i.into())) - // Standard Error: 29 - .saturating_add(Weight::from_parts(2_195, 0).saturating_mul(s.into())) + // Minimum execution time: 4_500_184_000 picoseconds. + Weight::from_parts(160_729_258, 6262) + // Standard Error: 143 + .saturating_add(Weight::from_parts(52_809, 0).saturating_mul(c.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(2_173, 0).saturating_mul(i.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(2_165, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -1271,12 +1270,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `560` // Estimated: `4029` - // Minimum execution time: 2_376_075_000 picoseconds. - Weight::from_parts(2_387_885_000, 4029) + // Minimum execution time: 2_219_163_000 picoseconds. + Weight::from_parts(2_236_918_000, 4029) // Standard Error: 32 - .saturating_add(Weight::from_parts(1_036, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(937, 0).saturating_mul(i.into())) // Standard Error: 32 - .saturating_add(Weight::from_parts(936, 0).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(938, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(5_u64)) } @@ -1296,8 +1295,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `826` // Estimated: `4291` - // Minimum execution time: 197_222_000 picoseconds. - Weight::from_parts(203_633_000, 4291) + // Minimum execution time: 164_801_000 picoseconds. + Weight::from_parts(167_250_000, 4291) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } @@ -1314,10 +1313,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 325_788_000 picoseconds. - Weight::from_parts(335_491_760, 3607) - // Standard Error: 50 - .saturating_add(Weight::from_parts(35_337, 0).saturating_mul(c.into())) + // Minimum execution time: 225_207_000 picoseconds. + Weight::from_parts(263_665_658, 3607) + // Standard Error: 47 + .saturating_add(Weight::from_parts(50_732, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1334,10 +1333,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3607` - // Minimum execution time: 336_010_000 picoseconds. - Weight::from_parts(348_030_264, 3607) - // Standard Error: 43 - .saturating_add(Weight::from_parts(35_696, 0).saturating_mul(c.into())) + // Minimum execution time: 230_718_000 picoseconds. + Weight::from_parts(258_359_271, 3607) + // Standard Error: 47 + .saturating_add(Weight::from_parts(51_014, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1353,8 +1352,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `315` // Estimated: `3780` - // Minimum execution time: 40_118_000 picoseconds. - Weight::from_parts(40_987_000, 3780) + // Minimum execution time: 39_668_000 picoseconds. + Weight::from_parts(41_031_000, 3780) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1368,8 +1367,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `552` // Estimated: `6492` - // Minimum execution time: 25_236_000 picoseconds. - Weight::from_parts(26_450_000, 6492) + // Minimum execution time: 25_890_000 picoseconds. + Weight::from_parts(26_603_000, 6492) .saturating_add(RocksDbWeight::get().reads(4_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1378,17 +1377,17 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_200_000 picoseconds. - Weight::from_parts(9_773_983, 0) + // Minimum execution time: 8_269_000 picoseconds. + Weight::from_parts(9_227_069, 0) // Standard Error: 74 - .saturating_add(Weight::from_parts(72_257, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(51_396, 0).saturating_mul(r.into())) } fn seal_caller() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 606_000 picoseconds. - Weight::from_parts(672_000, 0) + // Minimum execution time: 602_000 picoseconds. + Weight::from_parts(664_000, 0) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:0) /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) @@ -1396,8 +1395,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `354` // Estimated: `3819` - // Minimum execution time: 6_260_000 picoseconds. - Weight::from_parts(6_645_000, 3819) + // Minimum execution time: 6_131_000 picoseconds. + Weight::from_parts(6_468_000, 3819) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:0) @@ -1406,79 +1405,79 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3912` - // Minimum execution time: 7_599_000 picoseconds. - Weight::from_parts(7_913_000, 3912) + // Minimum execution time: 7_557_000 picoseconds. + Weight::from_parts(7_704_000, 3912) .saturating_add(RocksDbWeight::get().reads(1_u64)) } fn seal_own_code_hash() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 772_000 picoseconds. - Weight::from_parts(852_000, 0) + // Minimum execution time: 783_000 picoseconds. + Weight::from_parts(848_000, 0) } fn seal_caller_is_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 390_000 picoseconds. - Weight::from_parts(417_000, 0) + // Minimum execution time: 397_000 picoseconds. + Weight::from_parts(435_000, 0) } fn seal_caller_is_root() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 340_000 picoseconds. - Weight::from_parts(368_000, 0) + // Minimum execution time: 351_000 picoseconds. + Weight::from_parts(372_000, 0) } fn seal_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 640_000 picoseconds. - Weight::from_parts(672_000, 0) + // Minimum execution time: 608_000 picoseconds. + Weight::from_parts(645_000, 0) } fn seal_gas_left() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 607_000 picoseconds. - Weight::from_parts(699_000, 0) + // Minimum execution time: 661_000 picoseconds. + Weight::from_parts(729_000, 0) } fn seal_balance() -> Weight { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 4_519_000 picoseconds. - Weight::from_parts(4_668_000, 0) + // Minimum execution time: 4_545_000 picoseconds. + Weight::from_parts(4_663_000, 0) } fn seal_value_transferred() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 600_000 picoseconds. - Weight::from_parts(639_000, 0) + // Minimum execution time: 614_000 picoseconds. + Weight::from_parts(641_000, 0) } fn seal_minimum_balance() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 579_000 picoseconds. - Weight::from_parts(609_000, 0) + // Minimum execution time: 583_000 picoseconds. + Weight::from_parts(618_000, 0) } fn seal_block_number() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 575_000 picoseconds. - Weight::from_parts(613_000, 0) + // Minimum execution time: 583_000 picoseconds. + Weight::from_parts(617_000, 0) } fn seal_now() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 554_000 picoseconds. - Weight::from_parts(622_000, 0) + // Minimum execution time: 607_000 picoseconds. + Weight::from_parts(638_000, 0) } /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) @@ -1486,8 +1485,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `67` // Estimated: `1552` - // Minimum execution time: 4_265_000 picoseconds. - Weight::from_parts(4_525_000, 1552) + // Minimum execution time: 4_172_000 picoseconds. + Weight::from_parts(4_408_000, 1552) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// The range of component `n` is `[0, 1048572]`. @@ -1495,20 +1494,20 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 512_000 picoseconds. - Weight::from_parts(524_000, 0) + // Minimum execution time: 475_000 picoseconds. + Weight::from_parts(515_000, 0) // Standard Error: 3 - .saturating_add(Weight::from_parts(303, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(298, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048572]`. fn seal_return(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 358_000 picoseconds. - Weight::from_parts(375_000, 0) - // Standard Error: 9 - .saturating_add(Weight::from_parts(481, 0).saturating_mul(n.into())) + // Minimum execution time: 289_000 picoseconds. + Weight::from_parts(357_000, 0) + // Standard Error: 10 + .saturating_add(Weight::from_parts(405, 0).saturating_mul(n.into())) } /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:1) /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) @@ -1521,10 +1520,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `319 + n * (78 ±0)` // Estimated: `3784 + n * (2553 ±0)` - // Minimum execution time: 13_267_000 picoseconds. - Weight::from_parts(15_705_698, 3784) - // Standard Error: 7_176 - .saturating_add(Weight::from_parts(3_506_583, 0).saturating_mul(n.into())) + // Minimum execution time: 13_316_000 picoseconds. + Weight::from_parts(15_855_821, 3784) + // Standard Error: 7_274 + .saturating_add(Weight::from_parts(3_447_246, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -1537,8 +1536,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_339_000 picoseconds. - Weight::from_parts(3_544_000, 1561) + // Minimum execution time: 3_468_000 picoseconds. + Weight::from_parts(3_608_000, 1561) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: `System::EventTopics` (r:4 w:4) @@ -1549,12 +1548,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `990 + t * (2475 ±0)` - // Minimum execution time: 3_789_000 picoseconds. - Weight::from_parts(4_070_991, 990) - // Standard Error: 6_319 - .saturating_add(Weight::from_parts(2_264_078, 0).saturating_mul(t.into())) + // Minimum execution time: 3_777_000 picoseconds. + Weight::from_parts(4_028_191, 990) + // Standard Error: 5_907 + .saturating_add(Weight::from_parts(2_183_733, 0).saturating_mul(t.into())) // Standard Error: 1 - .saturating_add(Weight::from_parts(20, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(18, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 2475).saturating_mul(t.into())) @@ -1564,10 +1563,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 426_000 picoseconds. - Weight::from_parts(465_000, 0) + // Minimum execution time: 400_000 picoseconds. + Weight::from_parts(423_000, 0) // Standard Error: 10 - .saturating_add(Weight::from_parts(1_277, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(1_209, 0).saturating_mul(i.into())) } /// Storage: `Skipped::Metadata` (r:0 w:0) /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -1577,12 +1576,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `250 + o * (1 ±0)` // Estimated: `249 + o * (1 ±0)` - // Minimum execution time: 9_148_000 picoseconds. - Weight::from_parts(8_789_382, 249) - // Standard Error: 2 - .saturating_add(Weight::from_parts(361, 0).saturating_mul(n.into())) - // Standard Error: 2 - .saturating_add(Weight::from_parts(66, 0).saturating_mul(o.into())) + // Minimum execution time: 9_033_000 picoseconds. + Weight::from_parts(8_797_934, 249) + // Standard Error: 1 + .saturating_add(Weight::from_parts(257, 0).saturating_mul(n.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(51, 0).saturating_mul(o.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into())) @@ -1594,10 +1593,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 7_344_000 picoseconds. - Weight::from_parts(8_119_197, 248) + // Minimum execution time: 7_167_000 picoseconds. + Weight::from_parts(8_012_194, 248) // Standard Error: 1 - .saturating_add(Weight::from_parts(83, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(90, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1609,10 +1608,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 6_763_000 picoseconds. - Weight::from_parts(7_669_781, 248) - // Standard Error: 2 - .saturating_add(Weight::from_parts(710, 0).saturating_mul(n.into())) + // Minimum execution time: 6_868_000 picoseconds. + Weight::from_parts(7_801_811, 248) + // Standard Error: 1 + .saturating_add(Weight::from_parts(605, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1623,10 +1622,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 6_310_000 picoseconds. - Weight::from_parts(7_039_085, 248) + // Minimum execution time: 6_322_000 picoseconds. + Weight::from_parts(7_103_552, 248) // Standard Error: 1 - .saturating_add(Weight::from_parts(84, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(79, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) } @@ -1637,10 +1636,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `248 + n * (1 ±0)` // Estimated: `248 + n * (1 ±0)` - // Minimum execution time: 7_541_000 picoseconds. - Weight::from_parts(8_559_509, 248) - // Standard Error: 1 - .saturating_add(Weight::from_parts(711, 0).saturating_mul(n.into())) + // Minimum execution time: 7_702_000 picoseconds. + Weight::from_parts(8_746_305, 248) + // Standard Error: 2 + .saturating_add(Weight::from_parts(604, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1649,8 +1648,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `140` // Estimated: `0` - // Minimum execution time: 8_728_000 picoseconds. - Weight::from_parts(9_035_000, 0) + // Minimum execution time: 8_851_000 picoseconds. + Weight::from_parts(9_083_000, 0) } /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) @@ -1666,12 +1665,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `620 + t * (280 ±0)` // Estimated: `4085 + t * (2182 ±0)` - // Minimum execution time: 153_385_000 picoseconds. - Weight::from_parts(156_813_102, 4085) - // Standard Error: 290_142 - .saturating_add(Weight::from_parts(42_350_253, 0).saturating_mul(t.into())) + // Minimum execution time: 121_148_000 picoseconds. + Weight::from_parts(119_605_377, 4085) + // Standard Error: 208_337 + .saturating_add(Weight::from_parts(43_153_338, 0).saturating_mul(t.into())) // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(i.into())) + .saturating_add(Weight::from_parts(5, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(1_u64)) @@ -1686,8 +1685,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `430` // Estimated: `3895` - // Minimum execution time: 140_007_000 picoseconds. - Weight::from_parts(144_781_000, 3895) + // Minimum execution time: 108_159_000 picoseconds. + Weight::from_parts(110_027_000, 3895) .saturating_add(RocksDbWeight::get().reads(2_u64)) } /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) @@ -1700,19 +1699,18 @@ impl WeightInfo for () { /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) - /// The range of component `t` is `[0, 1]`. /// The range of component `i` is `[0, 983040]`. /// The range of component `s` is `[0, 983040]`. - fn seal_instantiate(_t: u32, i: u32, s: u32, ) -> Weight { + fn seal_instantiate(i: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `676` - // Estimated: `4138` - // Minimum execution time: 2_073_851_000 picoseconds. - Weight::from_parts(2_084_321_000, 4138) - // Standard Error: 17 - .saturating_add(Weight::from_parts(986, 0).saturating_mul(i.into())) - // Standard Error: 17 - .saturating_add(Weight::from_parts(1_261, 0).saturating_mul(s.into())) + // Estimated: `4127` + // Minimum execution time: 1_861_874_000 picoseconds. + Weight::from_parts(1_872_926_000, 4127) + // Standard Error: 23 + .saturating_add(Weight::from_parts(557, 0).saturating_mul(i.into())) + // Standard Error: 23 + .saturating_add(Weight::from_parts(920, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(5_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -1721,64 +1719,64 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 902_000 picoseconds. - Weight::from_parts(10_389_779, 0) + // Minimum execution time: 878_000 picoseconds. + Weight::from_parts(10_993_950, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_422, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_325, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_keccak_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_477_000 picoseconds. - Weight::from_parts(12_143_874, 0) + // Minimum execution time: 1_261_000 picoseconds. + Weight::from_parts(9_759_497, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(3_683, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(3_594, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_256(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 778_000 picoseconds. - Weight::from_parts(8_762_544, 0) + // Minimum execution time: 726_000 picoseconds. + Weight::from_parts(9_795_728, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_557, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_455, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 1048576]`. fn seal_hash_blake2_128(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 748_000 picoseconds. - Weight::from_parts(10_364_578, 0) + // Minimum execution time: 739_000 picoseconds. + Weight::from_parts(9_701_202, 0) // Standard Error: 0 - .saturating_add(Weight::from_parts(1_550, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(1_459, 0).saturating_mul(n.into())) } /// The range of component `n` is `[0, 125697]`. fn seal_sr25519_verify(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 43_388_000 picoseconds. - Weight::from_parts(42_346_211, 0) - // Standard Error: 10 - .saturating_add(Weight::from_parts(5_103, 0).saturating_mul(n.into())) + // Minimum execution time: 43_309_000 picoseconds. + Weight::from_parts(41_405_949, 0) + // Standard Error: 8 + .saturating_add(Weight::from_parts(5_336, 0).saturating_mul(n.into())) } fn seal_ecdsa_recover() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 46_825_000 picoseconds. - Weight::from_parts(48_073_000, 0) + // Minimum execution time: 47_880_000 picoseconds. + Weight::from_parts(49_025_000, 0) } fn seal_ecdsa_to_eth_address() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 12_864_000 picoseconds. - Weight::from_parts(13_065_000, 0) + // Minimum execution time: 13_462_000 picoseconds. + Weight::from_parts(13_631_000, 0) } /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) @@ -1788,8 +1786,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `430` // Estimated: `3895` - // Minimum execution time: 18_406_000 picoseconds. - Weight::from_parts(19_112_000, 3895) + // Minimum execution time: 17_978_000 picoseconds. + Weight::from_parts(18_578_000, 3895) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1799,8 +1797,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `355` // Estimated: `3820` - // Minimum execution time: 8_441_000 picoseconds. - Weight::from_parts(8_710_000, 3820) + // Minimum execution time: 8_384_000 picoseconds. + Weight::from_parts(8_687_000, 3820) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1810,8 +1808,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `355` // Estimated: `3558` - // Minimum execution time: 7_525_000 picoseconds. - Weight::from_parts(7_819_000, 3558) + // Minimum execution time: 7_547_000 picoseconds. + Weight::from_parts(7_935_000, 3558) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } @@ -1819,15 +1817,15 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 313_000 picoseconds. - Weight::from_parts(375_000, 0) + // Minimum execution time: 331_000 picoseconds. + Weight::from_parts(363_000, 0) } fn seal_account_reentrance_count() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 308_000 picoseconds. - Weight::from_parts(334_000, 0) + // Minimum execution time: 349_000 picoseconds. + Weight::from_parts(365_000, 0) } /// Storage: `Contracts::Nonce` (r:1 w:0) /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) @@ -1835,8 +1833,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `219` // Estimated: `1704` - // Minimum execution time: 2_775_000 picoseconds. - Weight::from_parts(3_043_000, 1704) + // Minimum execution time: 2_814_000 picoseconds. + Weight::from_parts(3_038_000, 1704) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// The range of component `r` is `[0, 5000]`. @@ -1844,9 +1842,9 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 925_000 picoseconds. - Weight::from_parts(443_142, 0) - // Standard Error: 19 - .saturating_add(Weight::from_parts(15_316, 0).saturating_mul(r.into())) + // Minimum execution time: 693_000 picoseconds. + Weight::from_parts(665_431, 0) + // Standard Error: 12 + .saturating_add(Weight::from_parts(7_030, 0).saturating_mul(r.into())) } }