diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 6ebfb18509b1c..2c60c1501df7a 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -534,6 +534,28 @@ benchmarks! { let origin = RawOrigin::Signed(instance.caller.clone()); }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[pov_mode = Measured] + seal_caller_is_root { + let r in 0 .. API_BENCHMARK_RUNS; + + let code = WasmModule::::from(ModuleDefinition { + memory: Some(ImportedMemory::max::()), + imported_functions: vec![ImportedFunction { + module: "seal0", + name: "caller_is_root", + params: vec![], + return_type: Some(ValueType::I32), + }], + call_body: Some(body::repeated(r, &[ + Instruction::Call(0), + Instruction::Drop, + ])), + .. Default::default() + }); + let instance = Contract::::new(code, vec![])?; + let origin = RawOrigin::Root; + }: call(origin, instance.addr, 0u32.into(), Weight::MAX, None, vec![]) + #[pov_mode = Measured] seal_address { let r in 0 .. API_BENCHMARK_RUNS; diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index d0a650e0a0ef6..a81a633f740ab 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -19,7 +19,7 @@ use crate::{ gas::GasMeter, storage::{self, DepositAccount, WriteOutcome}, BalanceOf, CodeHash, Config, ContractInfo, ContractInfoOf, DebugBufferVec, Determinism, Error, - Event, Nonce, Pallet as Contracts, Schedule, System, LOG_TARGET, + Event, Nonce, Origin, Pallet as Contracts, Schedule, System, LOG_TARGET, }; use frame_support::{ crypto::ecdsa::ECDSAExt, @@ -203,8 +203,8 @@ pub trait Ext: sealing::Sealed { take_old: bool, ) -> Result; - /// Returns a reference to the account id of the caller. - fn caller(&self) -> &AccountIdOf; + /// Returns the caller. + fn caller(&self) -> Origin; /// Check if a contract lives at the specified `address`. fn is_contract(&self, address: &AccountIdOf) -> bool; @@ -223,6 +223,9 @@ pub trait Ext: sealing::Sealed { /// However, this function does not require any storage lookup and therefore uses less weight. fn caller_is_origin(&self) -> bool; + /// Check if the caller is origin, and this origin is root. + fn caller_is_root(&self) -> bool; + /// Returns a reference to the account id of the current contract. fn address(&self) -> &AccountIdOf; @@ -373,14 +376,15 @@ pub trait Executable: Sized { /// This type implements `Ext` and by that exposes the business logic of contract execution to /// the runtime module which interfaces with the contract (the wasm blob) itself. pub struct Stack<'a, T: Config, E> { - /// The account id of a plain account that initiated the call stack. + /// The origin that initiated the call stack. It could either be a Signed plain account that + /// holds an account id or Root. /// /// # Note /// - /// Please note that it is possible that the id belongs to a contract rather than a plain - /// account when being called through one of the contract RPCs where the client can freely - /// choose the origin. This usually makes no sense but is still possible. - origin: T::AccountId, + /// Please note that it is possible that the id of a Signed origin belongs to a contract rather + /// than a plain account when being called through one of the contract RPCs where the + /// client can freely choose the origin. This usually makes no sense but is still possible. + origin: Origin, /// The cost schedule used when charging from the gas meter. schedule: &'a Schedule, /// The gas meter where costs are charged to. @@ -436,15 +440,15 @@ pub struct Frame { /// If `false` the contract enabled its defense against reentrance attacks. allows_reentry: bool, /// The caller of the currently executing frame which was spawned by `delegate_call`. - delegate_caller: Option, + delegate_caller: Option>, } /// Used in a delegate call frame arguments in order to override the executable and caller. struct DelegatedCall { /// The executable which is run instead of the contracts own `executable`. executable: E, - /// The account id of the caller contract. - caller: T::AccountId, + /// The caller of the contract. + caller: Origin, } /// Parameter passed in when creating a new `Frame`. @@ -617,7 +621,7 @@ where /// /// Result<(ExecReturnValue, CodeSize), (ExecError, CodeSize)> pub fn run_call( - origin: T::AccountId, + origin: Origin, dest: T::AccountId, gas_meter: &'a mut GasMeter, storage_meter: &'a mut storage::meter::Meter, @@ -669,7 +673,7 @@ where salt, input_data: input_data.as_ref(), }, - origin, + Origin::from_account_id(origin), gas_meter, storage_meter, schedule, @@ -684,7 +688,7 @@ where /// Create a new call stack. fn new( args: FrameArgs, - origin: T::AccountId, + origin: Origin, gas_meter: &'a mut GasMeter, storage_meter: &'a mut storage::meter::Meter, schedule: &'a Schedule, @@ -846,9 +850,12 @@ where // We need to charge the storage deposit before the initial transfer so that // it can create the account in case the initial transfer is < ed. if entry_point == ExportedFunction::Constructor { + // Root origin can't be used to instantiate a contract, so it is safe to assume that + // if we reached this point the origin has an associated account. + let origin = &self.origin.account_id()?; let frame = top_frame_mut!(self); frame.nested_storage.charge_instantiate( - &self.origin, + origin, &frame.account_id, frame.contract_info.get(&frame.account_id), )?; @@ -894,13 +901,12 @@ where let contract = frame.contract_info.as_contract(); frame.nested_storage.enforce_subcall_limit(contract)?; + let caller = self.caller().account_id()?.clone(); + // Deposit an instantiation event. Contracts::::deposit_event( - vec![T::Hashing::hash_of(self.caller()), T::Hashing::hash_of(account_id)], - Event::Instantiated { - deployer: self.caller().clone(), - contract: account_id.clone(), - }, + vec![T::Hashing::hash_of(&caller), T::Hashing::hash_of(account_id)], + Event::Instantiated { deployer: caller, contract: account_id.clone() }, ); }, (ExportedFunction::Call, Some(code_hash)) => { @@ -918,7 +924,7 @@ where let caller = self.caller(); Contracts::::deposit_event( - vec![T::Hashing::hash_of(caller), T::Hashing::hash_of(&account_id)], + vec![T::Hashing::hash_of(&caller), T::Hashing::hash_of(&account_id)], Event::Called { caller: caller.clone(), contract: account_id.clone() }, ); }, @@ -1076,7 +1082,16 @@ where } let value = frame.value_transferred; - Self::transfer(ExistenceRequirement::KeepAlive, self.caller(), &frame.account_id, value) + + // Get the account id from the caller. + // If the caller is root there is no account to transfer from, and therefore we can't take + // any `value` other than 0. + let caller = match self.caller() { + Origin::Signed(caller) => caller, + Origin::Root if value.is_zero() => return Ok(()), + Origin::Root => return DispatchError::RootNotAllowed.into(), + }; + Self::transfer(ExistenceRequirement::KeepAlive, &caller, &frame.account_id, value) } /// Reference to the current (top) frame. @@ -1282,11 +1297,14 @@ where &self.top_frame().account_id } - fn caller(&self) -> &T::AccountId { + fn caller(&self) -> Origin { if let Some(caller) = &self.top_frame().delegate_caller { - caller + caller.clone() } else { - self.frames().nth(1).map(|f| &f.account_id).unwrap_or(&self.origin) + self.frames() + .nth(1) + .map(|f| Origin::from_account_id(f.account_id.clone())) + .unwrap_or(self.origin.clone()) } } @@ -1303,7 +1321,12 @@ where } fn caller_is_origin(&self) -> bool { - self.caller() == &self.origin + self.origin == self.caller() + } + + fn caller_is_root(&self) -> bool { + // if the caller isn't origin, then it can't be root. + self.caller_is_origin() && self.origin == Origin::Root } fn balance(&self) -> BalanceOf { @@ -1637,11 +1660,13 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); place_contract(&BOB, exec_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), value).unwrap(); + let mut storage_meter = + storage::meter::Meter::new(&Origin::from_account_id(ALICE), Some(0), value) + .unwrap(); assert_matches!( MockStack::run_call( - ALICE, + Origin::from_account_id(ALICE), BOB, &mut gas_meter, &mut storage_meter, @@ -1692,10 +1717,12 @@ mod tests { place_contract(&dest, success_ch); set_balance(&origin, 100); let balance = get_balance(&dest); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), value).unwrap(); + let contract_origin = Origin::from_account_id(origin.clone()); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), value).unwrap(); let _ = MockStack::run_call( - origin.clone(), + contract_origin.clone(), dest.clone(), &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1734,10 +1761,12 @@ mod tests { place_contract(&dest, delegate_ch); set_balance(&origin, 100); let balance = get_balance(&dest); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), 55).unwrap(); + let contract_origin = Origin::from_account_id(origin.clone()); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 55).unwrap(); let _ = MockStack::run_call( - origin.clone(), + contract_origin.clone(), dest.clone(), &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1770,10 +1799,12 @@ mod tests { place_contract(&dest, return_ch); set_balance(&origin, 100); let balance = get_balance(&dest); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), 55).unwrap(); + let contract_origin = Origin::from_account_id(origin.clone()); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 55).unwrap(); let output = MockStack::run_call( - origin.clone(), + contract_origin.clone(), dest.clone(), &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1821,11 +1852,13 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(origin); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); place_contract(&BOB, return_ch); let result = MockStack::run_call( - origin, + contract_origin, dest, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1855,10 +1888,12 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); place_contract(&BOB, return_ch); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(origin); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - origin, + contract_origin, dest, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1886,10 +1921,12 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); place_contract(&BOB, input_data_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1918,7 +1955,9 @@ mod tests { let executable = MockExecutable::from_storage(input_data_ch, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, min_balance * 10_000); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, min_balance).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); let result = MockStack::run_instantiate( ALICE, @@ -1966,10 +2005,12 @@ mod tests { let schedule = ::Schedule::get(); set_balance(&BOB, 1); place_contract(&BOB, recurse_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), value).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), value).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -1996,7 +2037,9 @@ mod tests { let bob_ch = MockLoader::insert(Call, |ctx, _| { // Record the caller for bob. - WitnessedCallerBob::mutate(|caller| *caller = Some(ctx.ext.caller().clone())); + WitnessedCallerBob::mutate(|caller| { + *caller = Some(ctx.ext.caller().account_id().unwrap().clone()) + }); // Call into CHARLIE contract. assert_matches!( @@ -2008,7 +2051,9 @@ mod tests { }); let charlie_ch = MockLoader::insert(Call, |ctx, _| { // Record the caller for charlie. - WitnessedCallerCharlie::mutate(|caller| *caller = Some(ctx.ext.caller().clone())); + WitnessedCallerCharlie::mutate(|caller| { + *caller = Some(ctx.ext.caller().account_id().unwrap().clone()) + }); exec_success() }); @@ -2016,10 +2061,12 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&dest, bob_ch); place_contract(&CHARLIE, charlie_ch); - let mut storage_meter = storage::meter::Meter::new(&origin, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(origin.clone()); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - origin.clone(), + contract_origin.clone(), dest.clone(), &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2051,9 +2098,11 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, bob_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2080,10 +2129,12 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); place_contract(&BOB, code_bob); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); // ALICE (not contract) -> BOB (contract) let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2108,10 +2159,12 @@ mod tests { ExtBuilder::default().build().execute_with(|| { let schedule = ::Schedule::get(); place_contract(&BOB, bob_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); // ALICE (not contract) -> BOB (contract) let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2145,10 +2198,111 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, code_bob); place_contract(&CHARLIE, code_charlie); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); // ALICE -> BOB (caller is origin) -> CHARLIE (caller is not origin) let result = MockStack::run_call( - ALICE, + contract_origin, + BOB, + &mut GasMeter::::new(GAS_LIMIT), + &mut storage_meter, + &schedule, + 0, + vec![0], + None, + Determinism::Enforced, + ); + assert_matches!(result, Ok(_)); + }); + } + + #[test] + fn root_caller_succeeds() { + let code_bob = MockLoader::insert(Call, |ctx, _| { + // root is the origin of the call stack. + assert!(ctx.ext.caller_is_root()); + exec_success() + }); + + ExtBuilder::default().build().execute_with(|| { + let schedule = ::Schedule::get(); + place_contract(&BOB, code_bob); + let contract_origin = Origin::Root; + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); + // root -> BOB (caller is root) + let result = MockStack::run_call( + contract_origin, + BOB, + &mut GasMeter::::new(GAS_LIMIT), + &mut storage_meter, + &schedule, + 0, + vec![0], + None, + Determinism::Enforced, + ); + assert_matches!(result, Ok(_)); + }); + } + + #[test] + fn root_caller_does_not_succeed_when_value_not_zero() { + let code_bob = MockLoader::insert(Call, |ctx, _| { + // root is the origin of the call stack. + assert!(ctx.ext.caller_is_root()); + exec_success() + }); + + ExtBuilder::default().build().execute_with(|| { + let schedule = ::Schedule::get(); + place_contract(&BOB, code_bob); + let contract_origin = Origin::Root; + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); + // root -> BOB (caller is root) + let result = MockStack::run_call( + contract_origin, + BOB, + &mut GasMeter::::new(GAS_LIMIT), + &mut storage_meter, + &schedule, + 1, + vec![0], + None, + Determinism::Enforced, + ); + assert_matches!(result, Err(_)); + }); + } + + #[test] + fn root_caller_succeeds_with_consecutive_calls() { + let code_charlie = MockLoader::insert(Call, |ctx, _| { + // BOB is not root, even though the origin is root. + assert!(!ctx.ext.caller_is_root()); + exec_success() + }); + + let code_bob = MockLoader::insert(Call, |ctx, _| { + // root is the origin of the call stack. + assert!(ctx.ext.caller_is_root()); + // BOB calls CHARLIE. + ctx.ext + .call(Weight::zero(), BalanceOf::::zero(), CHARLIE, 0, vec![], true) + }); + + ExtBuilder::default().build().execute_with(|| { + let schedule = ::Schedule::get(); + place_contract(&BOB, code_bob); + place_contract(&CHARLIE, code_charlie); + let contract_origin = Origin::Root; + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); + // root -> BOB (caller is root) -> CHARLIE (caller is not root) + let result = MockStack::run_call( + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2185,10 +2339,12 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, bob_ch); place_contract(&CHARLIE, charlie_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2212,7 +2368,9 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); let executable = MockExecutable::from_storage(dummy_ch, &schedule, &mut gas_meter).unwrap(); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); assert_matches!( MockStack::run_instantiate( @@ -2244,8 +2402,10 @@ mod tests { let executable = MockExecutable::from_storage(dummy_ch, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, min_balance * 1000); + let contract_origin = Origin::from_account_id(ALICE); let mut storage_meter = - storage::meter::Meter::new(&ALICE, Some(min_balance * 100), min_balance).unwrap(); + storage::meter::Meter::new(&contract_origin, Some(min_balance * 100), min_balance) + .unwrap(); let instantiated_contract_address = assert_matches!( MockStack::run_instantiate( @@ -2288,8 +2448,10 @@ mod tests { let executable = MockExecutable::from_storage(dummy_ch, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, min_balance * 1000); + let contract_origin = Origin::from_account_id(ALICE); let mut storage_meter = - storage::meter::Meter::new(&ALICE, Some(min_balance * 100), min_balance).unwrap(); + storage::meter::Meter::new(&contract_origin, Some(min_balance * 100), min_balance) + .unwrap(); let instantiated_contract_address = assert_matches!( MockStack::run_instantiate( @@ -2342,13 +2504,17 @@ mod tests { let min_balance = ::Currency::minimum_balance(); set_balance(&ALICE, min_balance * 100); place_contract(&BOB, instantiator_ch); - let mut storage_meter = - storage::meter::Meter::new(&ALICE, Some(min_balance * 10), min_balance * 10) - .unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new( + &contract_origin, + Some(min_balance * 10), + min_balance * 10, + ) + .unwrap(); assert_matches!( MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2374,7 +2540,7 @@ mod tests { &events(), &[ Event::Instantiated { deployer: BOB, contract: instantiated_contract_address }, - Event::Called { caller: ALICE, contract: BOB }, + Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB }, ] ); }); @@ -2410,11 +2576,13 @@ mod tests { set_balance(&ALICE, 1000); set_balance(&BOB, 100); place_contract(&BOB, instantiator_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(200), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(200), 0).unwrap(); assert_matches!( MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2429,7 +2597,10 @@ mod tests { // The contract wasn't instantiated so we don't expect to see an instantiation // event here. - assert_eq!(&events(), &[Event::Called { caller: ALICE, contract: BOB },]); + assert_eq!( + &events(), + &[Event::Called { caller: Origin::from_account_id(ALICE), contract: BOB },] + ); }); } @@ -2446,7 +2617,9 @@ mod tests { let executable = MockExecutable::from_storage(terminate_ch, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, 10_000); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 100).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, 100).unwrap(); assert_eq!( MockStack::run_instantiate( @@ -2510,10 +2683,12 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, code_bob); place_contract(&CHARLIE, code_charlie); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2544,7 +2719,9 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); let executable = MockExecutable::from_storage(code, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, min_balance * 10_000); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, min_balance).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, None, min_balance).unwrap(); let result = MockStack::run_instantiate( ALICE, @@ -2577,9 +2754,11 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 10); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -2611,9 +2790,11 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 10); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -2648,9 +2829,11 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 10); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -2679,11 +2862,13 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, code_bob); place_contract(&CHARLIE, code_charlie); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); // Calling another contract should succeed assert_ok!(MockStack::run_call( - ALICE, + contract_origin.clone(), BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2697,7 +2882,7 @@ mod tests { // Calling into oneself fails assert_err!( MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2733,12 +2918,14 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, code_bob); place_contract(&CHARLIE, code_charlie); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); // BOB -> CHARLIE -> BOB fails as BOB denies reentry. assert_err!( MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -2770,10 +2957,12 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 10); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); System::reset_events(); MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -2800,10 +2989,10 @@ mod tests { EventRecord { phase: Phase::Initialization, event: MetaEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: BOB, }), - topics: vec![hash(&ALICE), hash(&BOB)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&BOB)], }, ] ); @@ -2855,10 +3044,12 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 10); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); System::reset_events(); MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -2898,10 +3089,10 @@ mod tests { EventRecord { phase: Phase::Initialization, event: MetaEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: BOB, }), - topics: vec![hash(&ALICE), hash(&BOB)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&BOB)], }, ] ); @@ -2959,8 +3150,9 @@ mod tests { let succ_succ_executable = MockExecutable::from_storage(succ_succ_code, &schedule, &mut gas_meter).unwrap(); set_balance(&ALICE, min_balance * 10_000); + let contract_origin = Origin::from_account_id(ALICE); let mut storage_meter = - storage::meter::Meter::new(&ALICE, None, min_balance * 100).unwrap(); + storage::meter::Meter::new(&contract_origin, None, min_balance * 100).unwrap(); MockStack::run_instantiate( ALICE, @@ -3069,9 +3261,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3196,9 +3389,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3235,9 +3429,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3274,9 +3469,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3330,9 +3526,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3386,9 +3583,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3418,9 +3616,11 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, bob_ch); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, @@ -3480,9 +3680,10 @@ mod tests { let mut gas_meter = GasMeter::::new(GAS_LIMIT); set_balance(&ALICE, min_balance * 1000); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, None, 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = storage::meter::Meter::new(&contract_origin, None, 0).unwrap(); assert_ok!(MockStack::run_call( - ALICE, + contract_origin, BOB, &mut gas_meter, &mut storage_meter, @@ -3510,9 +3711,11 @@ mod tests { let schedule = ::Schedule::get(); place_contract(&BOB, code_hash); - let mut storage_meter = storage::meter::Meter::new(&ALICE, Some(0), 0).unwrap(); + let contract_origin = Origin::from_account_id(ALICE); + let mut storage_meter = + storage::meter::Meter::new(&contract_origin, Some(0), 0).unwrap(); let result = MockStack::run_call( - ALICE, + contract_origin, BOB, &mut GasMeter::::new(GAS_LIMIT), &mut storage_meter, diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 24653423b4f67..97fa284577d47 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -97,7 +97,6 @@ pub mod weights; #[cfg(test)] mod tests; - use crate::{ exec::{AccountIdOf, ErrorOrigin, ExecError, Executable, Key, Stack as ExecStack}, gas::GasMeter, @@ -105,19 +104,20 @@ use crate::{ wasm::{OwnerInfo, PrefabWasmModule, TryInstantiate}, weights::WeightInfo, }; -use codec::{Codec, Encode, HasCompact}; +use codec::{Codec, Decode, Encode, HasCompact}; use environmental::*; use frame_support::{ - dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo}, + dispatch::{DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin}, ensure, + error::BadOrigin, traits::{ tokens::fungible::Inspect, ConstU32, Contains, Currency, Get, Randomness, ReservableCurrency, Time, }, weights::Weight, - BoundedVec, WeakBoundedVec, + BoundedVec, RuntimeDebugNoBound, WeakBoundedVec, }; -use frame_system::Pallet as System; +use frame_system::{ensure_signed, pallet_prelude::OriginFor, Pallet as System}; use pallet_contracts_primitives::{ Code, CodeUploadResult, CodeUploadReturnValue, ContractAccessError, ContractExecResult, ContractInstantiateResult, ExecReturnValue, GetStorageResult, InstantiateReturnValue, @@ -584,17 +584,15 @@ pub mod pallet { storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec, ) -> DispatchResultWithPostInfo { - let gas_limit: Weight = gas_limit.into(); - let origin = ensure_signed(origin)?; - let dest = T::Lookup::lookup(dest)?; let common = CommonInput { - origin, + origin: Origin::from_runtime_origin(origin)?, value, data, - gas_limit, + gas_limit: gas_limit.into(), storage_deposit_limit: storage_deposit_limit.map(Into::into), debug_message: None, }; + let dest = T::Lookup::lookup(dest)?; let mut output = CallInput:: { dest, determinism: Determinism::Enforced }.run_guarded(common); if let Ok(retval) = &output.result { @@ -645,12 +643,11 @@ pub mod pallet { data: Vec, salt: Vec, ) -> DispatchResultWithPostInfo { - let origin = ensure_signed(origin)?; let code_len = code.len() as u32; let data_len = data.len() as u32; let salt_len = salt.len() as u32; let common = CommonInput { - origin, + origin: Origin::from_runtime_origin(origin)?, value, data, gas_limit, @@ -688,11 +685,10 @@ pub mod pallet { data: Vec, salt: Vec, ) -> DispatchResultWithPostInfo { - let origin = ensure_signed(origin)?; let data_len = data.len() as u32; let salt_len = salt.len() as u32; let common = CommonInput { - origin, + origin: Origin::from_runtime_origin(origin)?, value, data, gas_limit, @@ -764,8 +760,8 @@ pub mod pallet { /// calls. This is because on failure all storage changes including events are /// rolled back. Called { - /// The account that called the `contract`. - caller: T::AccountId, + /// The caller of the `contract`. + caller: Origin, /// The contract that was called. contract: T::AccountId, }, @@ -924,9 +920,38 @@ pub mod pallet { StorageValue<_, DeletionQueueManager, ValueQuery>; } +/// The type of origins supported by the contracts pallet. +#[derive(Clone, Encode, Decode, PartialEq, TypeInfo, RuntimeDebugNoBound)] +pub enum Origin { + Root, + Signed(T::AccountId), +} + +impl Origin { + /// Creates a new Signed Caller from an AccountId. + pub fn from_account_id(account_id: T::AccountId) -> Self { + Origin::Signed(account_id) + } + /// Creates a new Origin from a `RuntimeOrigin`. + pub fn from_runtime_origin(o: OriginFor) -> Result { + match o.into() { + Ok(RawOrigin::Root) => Ok(Self::Root), + Ok(RawOrigin::Signed(t)) => Ok(Self::Signed(t)), + _ => Err(BadOrigin.into()), + } + } + /// Returns the AccountId of a Signed Origin or an error if the origin is Root. + pub fn account_id(&self) -> Result<&T::AccountId, DispatchError> { + match self { + Origin::Signed(id) => Ok(id), + Origin::Root => Err(DispatchError::RootNotAllowed), + } + } +} + /// Context of a contract invocation. struct CommonInput<'a, T: Config> { - origin: T::AccountId, + origin: Origin, value: BalanceOf, data: Vec, gas_limit: Weight, @@ -975,6 +1000,19 @@ trait Invokable { environmental!(executing_contract: bool); let gas_limit = common.gas_limit; + + // Check whether the origin is allowed here. The logic of the access rules + // is in the `ensure_origin`, this could vary for different implementations of this + // trait. For example, some actions might not allow Root origin as they could require an + // AccountId associated with the origin. + if let Err(e) = self.ensure_origin(common.origin.clone()) { + return InternalOutput { + gas_meter: GasMeter::new(gas_limit), + storage_deposit: Default::default(), + result: Err(ExecError { error: e.into(), origin: ErrorOrigin::Caller }), + } + } + executing_contract::using_once(&mut false, || { executing_contract::with(|f| { // Fail if already entered contract execution @@ -1010,6 +1048,11 @@ trait Invokable { common: CommonInput, gas_meter: GasMeter, ) -> InternalOutput; + + /// This method ensures that the given `origin` is allowed to invoke the current `Invokable`. + /// + /// Called by dispatchables and public functions through the [`Invokable::run_guarded`]. + fn ensure_origin(&self, origin: Origin) -> Result<(), DispatchError>; } impl Invokable for CallInput { @@ -1020,8 +1063,10 @@ impl Invokable for CallInput { common: CommonInput, mut gas_meter: GasMeter, ) -> InternalOutput { + let CallInput { dest, determinism } = self; + let CommonInput { origin, value, data, debug_message, .. } = common; let mut storage_meter = - match StorageMeter::new(&common.origin, common.storage_deposit_limit, common.value) { + match StorageMeter::new(&origin, common.storage_deposit_limit, common.value) { Ok(meter) => meter, Err(err) => return InternalOutput { @@ -1031,8 +1076,6 @@ impl Invokable for CallInput { }, }; let schedule = T::Schedule::get(); - let CallInput { dest, determinism } = self; - let CommonInput { origin, value, data, debug_message, .. } = common; let result = ExecStack::>::run_call( origin.clone(), dest.clone(), @@ -1054,6 +1097,10 @@ impl Invokable for CallInput { }, } } + + fn ensure_origin(&self, _origin: Origin) -> Result<(), DispatchError> { + Ok(()) + } } impl Invokable for InstantiateInput { @@ -1067,12 +1114,15 @@ impl Invokable for InstantiateInput { let mut storage_deposit = Default::default(); let try_exec = || { let schedule = T::Schedule::get(); + let InstantiateInput { salt, .. } = self; + let CommonInput { origin: contract_origin, .. } = common; + let origin = contract_origin.account_id()?; let (extra_deposit, executable) = match &self.code { Code::Upload(binary) => { let executable = PrefabWasmModule::from_code( binary.clone(), &schedule, - common.origin.clone(), + origin.clone(), Determinism::Enforced, TryInstantiate::Skip, ) @@ -1094,14 +1144,13 @@ impl Invokable for InstantiateInput { PrefabWasmModule::from_storage(*hash, &schedule, &mut gas_meter)?, ), }; + let contract_origin = Origin::from_account_id(origin.clone()); let mut storage_meter = StorageMeter::new( - &common.origin, + &contract_origin, common.storage_deposit_limit, common.value.saturating_add(extra_deposit), )?; - - let InstantiateInput { salt, .. } = self; - let CommonInput { origin, value, data, debug_message, .. } = common; + let CommonInput { value, data, debug_message, .. } = common; let result = ExecStack::>::run_instantiate( origin.clone(), executable, @@ -1115,12 +1164,19 @@ impl Invokable for InstantiateInput { ); storage_deposit = storage_meter - .try_into_deposit(&origin)? + .try_into_deposit(&contract_origin)? .saturating_add(&StorageDeposit::Charge(extra_deposit)); result }; InternalOutput { result: try_exec(), gas_meter, storage_deposit } } + + fn ensure_origin(&self, origin: Origin) -> Result<(), DispatchError> { + match origin { + Origin::Signed(_) => Ok(()), + Origin::Root => Err(DispatchError::RootNotAllowed), + } + } } impl Pallet { @@ -1147,6 +1203,7 @@ impl Pallet { determinism: Determinism, ) -> ContractExecResult> { let mut debug_message = if debug { Some(DebugBufferVec::::default()) } else { None }; + let origin = Origin::from_account_id(origin); let common = CommonInput { origin, value, @@ -1189,7 +1246,7 @@ impl Pallet { ) -> ContractInstantiateResult> { let mut debug_message = if debug { Some(DebugBufferVec::::default()) } else { None }; let common = CommonInput { - origin, + origin: Origin::from_account_id(origin), value, data, gas_limit, diff --git a/frame/contracts/src/schedule.rs b/frame/contracts/src/schedule.rs index aef2fa1ca7dc1..c6eedb155d6a4 100644 --- a/frame/contracts/src/schedule.rs +++ b/frame/contracts/src/schedule.rs @@ -260,6 +260,9 @@ pub struct HostFnWeights { /// Weight of calling `seal_caller_is_origin`. pub caller_is_origin: Weight, + /// Weight of calling `seal_caller_is_root`. + pub caller_is_root: Weight, + /// Weight of calling `seal_address`. pub address: Weight, @@ -557,6 +560,7 @@ impl Default for HostFnWeights { code_hash: cost!(seal_code_hash), own_code_hash: cost!(seal_own_code_hash), caller_is_origin: cost!(seal_caller_is_origin), + caller_is_root: cost!(seal_caller_is_root), address: cost!(seal_address), gas_left: cost!(seal_gas_left), balance: cost!(seal_balance), diff --git a/frame/contracts/src/storage/meter.rs b/frame/contracts/src/storage/meter.rs index 73794b59774d4..506f4f0d86649 100644 --- a/frame/contracts/src/storage/meter.rs +++ b/frame/contracts/src/storage/meter.rs @@ -19,7 +19,7 @@ use crate::{ storage::{ContractInfo, DepositAccount}, - BalanceOf, Config, Error, Inspect, Pallet, System, + BalanceOf, Config, Error, Inspect, Origin, Pallet, System, }; use codec::Encode; use frame_support::{ @@ -352,12 +352,21 @@ where /// /// This tries to [`Ext::check_limit`] on `origin` and fails if this is not possible. pub fn new( - origin: &T::AccountId, + origin: &Origin, limit: Option>, min_leftover: BalanceOf, ) -> Result { - let limit = E::check_limit(origin, limit, min_leftover)?; - Ok(Self { limit, ..Default::default() }) + // Check the limit only if the origin is not root. + return match origin { + Origin::Root => Ok(Self { + limit: limit.unwrap_or(T::DefaultDepositLimit::get()), + ..Default::default() + }), + Origin::Signed(o) => { + let limit = E::check_limit(o, limit, min_leftover)?; + Ok(Self { limit, ..Default::default() }) + }, + } } /// The total amount of deposit that should change hands as result of the execution @@ -366,7 +375,13 @@ where /// /// This drops the root meter in order to make sure it is only called when the whole /// execution did finish. - pub fn try_into_deposit(self, origin: &T::AccountId) -> Result, DispatchError> { + + pub fn try_into_deposit(self, origin: &Origin) -> Result, DispatchError> { + // Only refund or charge deposit if the origin is not root. + let origin = match origin { + Origin::Root => return Ok(Deposit::Charge(Zero::zero())), + Origin::Signed(o) => o, + }; for charge in self.charges.iter().filter(|c| matches!(c.amount, Deposit::Refund(_))) { E::charge(origin, &charge.deposit_account, &charge.amount, charge.terminated)?; } @@ -625,6 +640,12 @@ mod tests { TestExtTestValue::mutate(|ext| ext.clear()) } + struct ChargingTestCase { + origin: Origin, + deposit: DepositOf, + expected: TestExt, + } + #[derive(Default)] struct StorageInfo { bytes: u32, @@ -650,7 +671,7 @@ mod tests { fn new_reserves_balance_works() { clear_ext(); - TestMeter::new(&ALICE, Some(1_000), 0).unwrap(); + TestMeter::new(&Origin::from_account_id(ALICE), Some(1_000), 0).unwrap(); assert_eq!( TestExtTestValue::get(), @@ -665,7 +686,7 @@ mod tests { fn empty_charge_works() { clear_ext(); - let mut meter = TestMeter::new(&ALICE, Some(1_000), 0).unwrap(); + let mut meter = TestMeter::new(&Origin::from_account_id(ALICE), Some(1_000), 0).unwrap(); assert_eq!(meter.available(), 1_000); // an empty charge does not create a `Charge` entry @@ -684,118 +705,158 @@ mod tests { #[test] fn charging_works() { - clear_ext(); + let test_cases = vec![ + ChargingTestCase { + origin: Origin::::from_account_id(ALICE), + deposit: Deposit::Refund(28), + expected: TestExt { + limit_checks: vec![LimitCheck { origin: ALICE, limit: 100, min_leftover: 0 }], + charges: vec![ + Charge { + origin: ALICE, + contract: DepositAccount(CHARLIE), + amount: Deposit::Refund(10), + terminated: false, + }, + Charge { + origin: ALICE, + contract: DepositAccount(CHARLIE), + amount: Deposit::Refund(20), + terminated: false, + }, + Charge { + origin: ALICE, + contract: DepositAccount(BOB), + amount: Deposit::Charge(2), + terminated: false, + }, + ], + }, + }, + ChargingTestCase { + origin: Origin::::Root, + deposit: Deposit::Charge(0), + expected: TestExt { limit_checks: vec![], charges: vec![] }, + }, + ]; - let mut meter = TestMeter::new(&ALICE, Some(100), 0).unwrap(); - assert_eq!(meter.available(), 100); + for test_case in test_cases { + clear_ext(); - let mut nested0_info = - new_info(StorageInfo { bytes: 100, items: 5, bytes_deposit: 100, items_deposit: 10 }); - let mut nested0 = meter.nested(BalanceOf::::zero()); - nested0.charge(&Diff { - bytes_added: 108, - bytes_removed: 5, - items_added: 1, - items_removed: 2, - }); - nested0.charge(&Diff { bytes_removed: 99, ..Default::default() }); - - let mut nested1_info = - new_info(StorageInfo { bytes: 100, items: 10, bytes_deposit: 100, items_deposit: 20 }); - let mut nested1 = nested0.nested(BalanceOf::::zero()); - nested1.charge(&Diff { items_removed: 5, ..Default::default() }); - nested0.absorb(nested1, DepositAccount(CHARLIE), Some(&mut nested1_info)); - - let mut nested2_info = - new_info(StorageInfo { bytes: 100, items: 7, bytes_deposit: 100, items_deposit: 20 }); - let mut nested2 = nested0.nested(BalanceOf::::zero()); - nested2.charge(&Diff { items_removed: 7, ..Default::default() }); - nested0.absorb(nested2, DepositAccount(CHARLIE), Some(&mut nested2_info)); - - nested0.enforce_limit(Some(&mut nested0_info)).unwrap(); - meter.absorb(nested0, DepositAccount(BOB), Some(&mut nested0_info)); - - meter.try_into_deposit(&ALICE).unwrap(); - - assert_eq!(nested0_info.extra_deposit(), 112); - assert_eq!(nested1_info.extra_deposit(), 110); - assert_eq!(nested2_info.extra_deposit(), 100); + let mut meter = TestMeter::new(&test_case.origin, Some(100), 0).unwrap(); + assert_eq!(meter.available(), 100); - assert_eq!( - TestExtTestValue::get(), - TestExt { - limit_checks: vec![LimitCheck { origin: ALICE, limit: 100, min_leftover: 0 }], - charges: vec![ - Charge { - origin: ALICE, - contract: DepositAccount(CHARLIE), - amount: Deposit::Refund(10), - terminated: false - }, - Charge { - origin: ALICE, - contract: DepositAccount(CHARLIE), - amount: Deposit::Refund(20), - terminated: false - }, - Charge { - origin: ALICE, - contract: DepositAccount(BOB), - amount: Deposit::Charge(2), - terminated: false - } - ] - } - ) + let mut nested0_info = new_info(StorageInfo { + bytes: 100, + items: 5, + bytes_deposit: 100, + items_deposit: 10, + }); + let mut nested0 = meter.nested(BalanceOf::::zero()); + nested0.charge(&Diff { + bytes_added: 108, + bytes_removed: 5, + items_added: 1, + items_removed: 2, + }); + nested0.charge(&Diff { bytes_removed: 99, ..Default::default() }); + + let mut nested1_info = new_info(StorageInfo { + bytes: 100, + items: 10, + bytes_deposit: 100, + items_deposit: 20, + }); + let mut nested1 = nested0.nested(BalanceOf::::zero()); + nested1.charge(&Diff { items_removed: 5, ..Default::default() }); + nested0.absorb(nested1, DepositAccount(CHARLIE), Some(&mut nested1_info)); + + let mut nested2_info = new_info(StorageInfo { + bytes: 100, + items: 7, + bytes_deposit: 100, + items_deposit: 20, + }); + let mut nested2 = nested0.nested(BalanceOf::::zero()); + nested2.charge(&Diff { items_removed: 7, ..Default::default() }); + nested0.absorb(nested2, DepositAccount(CHARLIE), Some(&mut nested2_info)); + + nested0.enforce_limit(Some(&mut nested0_info)).unwrap(); + meter.absorb(nested0, DepositAccount(BOB), Some(&mut nested0_info)); + + assert_eq!(meter.try_into_deposit(&test_case.origin).unwrap(), test_case.deposit); + + assert_eq!(nested0_info.extra_deposit(), 112); + assert_eq!(nested1_info.extra_deposit(), 110); + assert_eq!(nested2_info.extra_deposit(), 100); + + assert_eq!(TestExtTestValue::get(), test_case.expected) + } } #[test] fn termination_works() { - clear_ext(); + let test_cases = vec![ + ChargingTestCase { + origin: Origin::::from_account_id(ALICE), + deposit: Deposit::Refund(107), + expected: TestExt { + limit_checks: vec![LimitCheck { origin: ALICE, limit: 1_000, min_leftover: 0 }], + charges: vec![ + Charge { + origin: ALICE, + contract: DepositAccount(CHARLIE), + amount: Deposit::Refund(119), + terminated: true, + }, + Charge { + origin: ALICE, + contract: DepositAccount(BOB), + amount: Deposit::Charge(12), + terminated: false, + }, + ], + }, + }, + ChargingTestCase { + origin: Origin::::Root, + deposit: Deposit::Charge(0), + expected: TestExt { limit_checks: vec![], charges: vec![] }, + }, + ]; - let mut meter = TestMeter::new(&ALICE, Some(1_000), 0).unwrap(); - assert_eq!(meter.available(), 1_000); + for test_case in test_cases { + clear_ext(); - let mut nested0 = meter.nested(BalanceOf::::zero()); - nested0.charge(&Diff { - bytes_added: 5, - bytes_removed: 1, - items_added: 3, - items_removed: 1, - }); - nested0.charge(&Diff { items_added: 2, ..Default::default() }); - - let mut nested1_info = - new_info(StorageInfo { bytes: 100, items: 10, bytes_deposit: 100, items_deposit: 20 }); - let mut nested1 = nested0.nested(BalanceOf::::zero()); - nested1.charge(&Diff { items_removed: 5, ..Default::default() }); - nested1.charge(&Diff { bytes_added: 20, ..Default::default() }); - nested1.terminate(&nested1_info); - nested0.enforce_limit(Some(&mut nested1_info)).unwrap(); - nested0.absorb(nested1, DepositAccount(CHARLIE), None); + let mut meter = TestMeter::new(&test_case.origin, Some(1_000), 0).unwrap(); + assert_eq!(meter.available(), 1_000); - meter.absorb(nested0, DepositAccount(BOB), None); - meter.try_into_deposit(&ALICE).unwrap(); + let mut nested0 = meter.nested(BalanceOf::::zero()); + nested0.charge(&Diff { + bytes_added: 5, + bytes_removed: 1, + items_added: 3, + items_removed: 1, + }); + nested0.charge(&Diff { items_added: 2, ..Default::default() }); - assert_eq!( - TestExtTestValue::get(), - TestExt { - limit_checks: vec![LimitCheck { origin: ALICE, limit: 1_000, min_leftover: 0 }], - charges: vec![ - Charge { - origin: ALICE, - contract: DepositAccount(CHARLIE), - amount: Deposit::Refund(119), - terminated: true - }, - Charge { - origin: ALICE, - contract: DepositAccount(BOB), - amount: Deposit::Charge(12), - terminated: false - } - ] - } - ) + let mut nested1_info = new_info(StorageInfo { + bytes: 100, + items: 10, + bytes_deposit: 100, + items_deposit: 20, + }); + let mut nested1 = nested0.nested(BalanceOf::::zero()); + nested1.charge(&Diff { items_removed: 5, ..Default::default() }); + nested1.charge(&Diff { bytes_added: 20, ..Default::default() }); + nested1.terminate(&nested1_info); + nested0.enforce_limit(Some(&mut nested1_info)).unwrap(); + nested0.absorb(nested1, DepositAccount(CHARLIE), None); + + meter.absorb(nested0, DepositAccount(BOB), None); + assert_eq!(meter.try_into_deposit(&test_case.origin).unwrap(), test_case.deposit); + + assert_eq!(TestExtTestValue::get(), test_case.expected) + } } } diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index c202d3796e3ed..a07176e9f67b9 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -28,13 +28,13 @@ use crate::{ wasm::{Determinism, PrefabWasmModule, ReturnCode as RuntimeReturnCode}, weights::WeightInfo, BalanceOf, Code, CodeStorage, Config, ContractInfo, ContractInfoOf, DefaultAddressGenerator, - DeletionQueueCounter, Error, Pallet, Schedule, + DeletionQueueCounter, Error, Origin, Pallet, Schedule, }; use assert_matches::assert_matches; use codec::Encode; use frame_support::{ assert_err, assert_err_ignore_postinfo, assert_err_with_weight, assert_noop, assert_ok, - dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo}, + dispatch::{DispatchError, DispatchErrorWithPostInfo, PostDispatchInfo}, parameter_types, storage::child, traits::{ @@ -517,6 +517,11 @@ impl<'a> From> for Vec { } } +impl Default for Origin { + fn default() -> Self { + Self::Signed(ALICE) + } +} // Perform a call to a plain account. // The actual transfer fails because we can only call contracts. // Then we check that at least the base costs where charged (no runtime gas costs.) @@ -986,18 +991,21 @@ fn deploy_and_call_other_contract() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: caller_addr.clone(), + caller: Origin::from_account_id(caller_addr.clone()), contract: callee_addr.clone(), }), - topics: vec![hash(&caller_addr), hash(&callee_addr)], + topics: vec![ + hash(&Origin::::from_account_id(caller_addr.clone())), + hash(&callee_addr) + ], }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: caller_addr.clone(), }), - topics: vec![hash(&ALICE), hash(&caller_addr)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&caller_addr)], }, ] ); @@ -1305,10 +1313,10 @@ fn self_destruct_works() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: addr.clone(), }), - topics: vec![hash(&ALICE), hash(&addr)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&addr)], }, EventRecord { phase: Phase::Initialization, @@ -3626,10 +3634,10 @@ fn storage_deposit_works() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: addr.clone(), }), - topics: vec![hash(&ALICE), hash(&addr)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&addr)], }, EventRecord { phase: Phase::Initialization, @@ -3643,10 +3651,10 @@ fn storage_deposit_works() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: addr.clone(), }), - topics: vec![hash(&ALICE), hash(&addr)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&addr)], }, EventRecord { phase: Phase::Initialization, @@ -3660,10 +3668,10 @@ fn storage_deposit_works() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: addr.clone(), }), - topics: vec![hash(&ALICE), hash(&addr)], + topics: vec![hash(&Origin::::from_account_id(ALICE)), hash(&addr)], }, EventRecord { phase: Phase::Initialization, @@ -4115,18 +4123,24 @@ fn set_code_hash() { EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: contract_addr.clone(), }), - topics: vec![hash(&ALICE), hash(&contract_addr)], + topics: vec![ + hash(&Origin::::from_account_id(ALICE)), + hash(&contract_addr) + ], }, EventRecord { phase: Phase::Initialization, event: RuntimeEvent::Contracts(crate::Event::Called { - caller: ALICE, + caller: Origin::from_account_id(ALICE), contract: contract_addr.clone(), }), - topics: vec![hash(&ALICE), hash(&contract_addr)], + topics: vec![ + hash(&Origin::::from_account_id(ALICE)), + hash(&contract_addr) + ], }, ], ); @@ -5015,3 +5029,122 @@ fn account_reentrance_count_works() { assert_eq!(result2.data, 0.encode()); }); } + +#[test] +fn root_cannot_upload_code() { + let (wasm, _) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + Contracts::upload_code(RuntimeOrigin::root(), wasm, None, Determinism::Enforced), + DispatchError::BadOrigin, + ); + }); +} + +#[test] +fn root_cannot_remove_code() { + let (_, code_hash) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + Contracts::remove_code(RuntimeOrigin::root(), code_hash), + DispatchError::BadOrigin, + ); + }); +} + +#[test] +fn signed_cannot_set_code() { + let (_, code_hash) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + Contracts::set_code(RuntimeOrigin::signed(ALICE), BOB, code_hash), + DispatchError::BadOrigin, + ); + }); +} + +#[test] +fn none_cannot_call_code() { + ExtBuilder::default().build().execute_with(|| { + assert_noop!( + Contracts::call(RuntimeOrigin::none(), BOB, 0, GAS_LIMIT, None, Vec::new()), + DispatchError::BadOrigin, + ); + }); +} + +#[test] +fn root_can_call() { + let (wasm, _) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().existential_deposit(100).build().execute_with(|| { + let _ = Balances::deposit_creating(&ALICE, 1_000_000); + + let addr = Contracts::bare_instantiate( + ALICE, + 0, + GAS_LIMIT, + None, + Code::Upload(wasm), + vec![], + vec![], + false, + ) + .result + .unwrap() + .account_id; + + // Call the contract. + assert_ok!(Contracts::call( + RuntimeOrigin::root(), + addr.clone(), + 0, + GAS_LIMIT, + None, + vec![] + )); + }); +} + +#[test] +fn root_cannot_instantiate_with_code() { + let (wasm, _) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().build().execute_with(|| { + assert_err_ignore_postinfo!( + Contracts::instantiate_with_code( + RuntimeOrigin::root(), + 0, + GAS_LIMIT, + None, + wasm, + vec![], + vec![], + ), + DispatchError::RootNotAllowed, + ); + }); +} + +#[test] +fn root_cannot_instantiate() { + let (_, code_hash) = compile_module::("dummy").unwrap(); + + ExtBuilder::default().build().execute_with(|| { + assert_err_ignore_postinfo!( + Contracts::instantiate( + RuntimeOrigin::root(), + 0, + GAS_LIMIT, + None, + code_hash, + vec![], + vec![], + ), + DispatchError::RootNotAllowed + ); + }); +} diff --git a/frame/contracts/src/wasm/mod.rs b/frame/contracts/src/wasm/mod.rs index 5be28a301d8f4..224c116946aa4 100644 --- a/frame/contracts/src/wasm/mod.rs +++ b/frame/contracts/src/wasm/mod.rs @@ -370,7 +370,7 @@ mod tests { gas::GasMeter, storage::WriteOutcome, tests::{RuntimeCall, Test, ALICE, BOB}, - BalanceOf, CodeHash, Error, Pallet as Contracts, + BalanceOf, CodeHash, Error, Origin, Pallet as Contracts, }; use assert_matches::assert_matches; use frame_support::{ @@ -436,6 +436,7 @@ mod tests { ecdsa_recover: RefCell>, sr25519_verify: RefCell, [u8; 32])>>, code_hashes: Vec>, + caller: Origin, } /// The call is mocked and just returns this hardcoded value. @@ -459,6 +460,7 @@ mod tests { gas_meter: GasMeter::new(Weight::from_parts(10_000_000_000, 10 * 1024 * 1024)), debug_buffer: Default::default(), ecdsa_recover: Default::default(), + caller: Default::default(), sr25519_verify: Default::default(), } } @@ -545,8 +547,8 @@ mod tests { } Ok(result) } - fn caller(&self) -> &AccountIdOf { - &ALICE + fn caller(&self) -> Origin { + self.caller.clone() } fn is_contract(&self, _address: &AccountIdOf) -> bool { true @@ -561,6 +563,9 @@ mod tests { fn caller_is_origin(&self) -> bool { false } + fn caller_is_root(&self) -> bool { + &self.caller == &Origin::Root + } fn address(&self) -> &AccountIdOf { &BOB } @@ -1499,6 +1504,16 @@ mod tests { assert_ok!(execute(CODE_CALLER, vec![], MockExt::default())); } + #[test] + fn caller_traps_when_no_account_id() { + let mut ext = MockExt::default(); + ext.caller = Origin::Root; + assert_eq!( + execute(CODE_CALLER, vec![], ext), + Err(ExecError { error: DispatchError::RootNotAllowed, origin: ErrorOrigin::Caller }) + ); + } + /// calls `seal_address` and compares the result with the constant (BOB's address part). const CODE_ADDRESS: &str = r#" (module @@ -2977,6 +2992,45 @@ mod tests { assert_eq!(output, ExecReturnValue { flags: ReturnFlags::empty(), data: 0u32.encode() },); } + #[test] + fn caller_is_root_works() { + const CODE_CALLER_IS_ROOT: &str = r#" +;; This runs `caller_is_root` check on zero account address +(module + (import "seal0" "caller_is_root" (func $caller_is_root (result i32))) + (import "seal0" "seal_return" (func $seal_return (param i32 i32 i32))) + (import "env" "memory" (memory 1 1)) + + ;; [0, 4) here the return code of the `caller_is_root` will be stored + ;; we initialize it with non-zero value to be sure that it's being overwritten below + (data (i32.const 0) "\10\10\10\10") + + (func (export "deploy")) + + (func (export "call") + (i32.store + (i32.const 0) + (call $caller_is_root) + ) + ;; exit with success and take `caller_is_root` return code to the output buffer + (call $seal_return (i32.const 0) (i32.const 0) (i32.const 4)) + ) +) +"#; + // The default `caller` is ALICE. Therefore not root. + let output = execute(CODE_CALLER_IS_ROOT, vec![], MockExt::default()).unwrap(); + assert_eq!(output, ExecReturnValue { flags: ReturnFlags::empty(), data: 0u32.encode() },); + + // The caller is forced to be root instead of using the default ALICE. + let output = execute( + CODE_CALLER_IS_ROOT, + vec![], + MockExt { caller: Origin::Root, ..MockExt::default() }, + ) + .unwrap(); + assert_eq!(output, ExecReturnValue { flags: ReturnFlags::empty(), data: 1u32.encode() },); + } + #[test] fn set_code_hash() { const CODE: &str = r#" diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index 92ae2e3e6ea57..330bf19d65232 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -191,6 +191,8 @@ pub enum RuntimeCosts { OwnCodeHash, /// Weight of calling `seal_caller_is_origin`. CallerIsOrigin, + /// Weight of calling `caller_is_root`. + CallerIsRoot, /// Weight of calling `seal_address`. Address, /// Weight of calling `seal_gas_left`. @@ -283,6 +285,7 @@ impl RuntimeCosts { CodeHash => s.code_hash, OwnCodeHash => s.own_code_hash, CallerIsOrigin => s.caller_is_origin, + CallerIsRoot => s.caller_is_root, Address => s.address, GasLeft => s.gas_left, Balance => s.balance, @@ -1750,14 +1753,18 @@ pub mod env { /// If this is a top-level call (i.e. initiated by an extrinsic) the origin address of the /// extrinsic will be returned. Otherwise, if this call is initiated by another contract then /// the address of the contract will be returned. The value is encoded as T::AccountId. + /// + /// If there is no address associated with the caller (e.g. because the caller is root) then + /// it traps with `BadOrigin`. #[prefixed_alias] fn caller(ctx: _, memory: _, out_ptr: u32, out_len_ptr: u32) -> Result<(), TrapReason> { ctx.charge_gas(RuntimeCosts::Caller)?; + let caller = ctx.ext.caller().account_id()?.clone(); Ok(ctx.write_sandbox_output( memory, out_ptr, out_len_ptr, - &ctx.ext.caller().encode(), + &caller.encode(), false, already_charged, )?) @@ -1856,6 +1863,21 @@ pub mod env { Ok(ctx.ext.caller_is_origin() as u32) } + /// Checks whether the caller of the current contract is root. + /// + /// Note that only the origin of the call stack can be root. Hence this function returning + /// `true` implies that the contract is being called by the origin. + /// + /// A return value of `true` indicates that this contract is being called by a root origin, + /// and `false` indicates that the caller is a signed origin. + /// + /// Returned value is a `u32`-encoded boolean: (`0 = false`, `1 = true`). + #[unstable] + fn caller_is_root(ctx: _, _memory: _) -> Result { + ctx.charge_gas(RuntimeCosts::CallerIsRoot)?; + Ok(ctx.ext.caller_is_root() as u32) + } + /// Stores the address of the current contract into the supplied buffer. /// /// The value is stored to linear memory at the address pointed to by `out_ptr`. diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index cdaba7f59b72f..0a7f3ddf1ca4f 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -18,30 +18,32 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-04-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-04-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/substrate +// target/production/substrate // benchmark // pallet -// --chain=dev // --steps=50 // --repeat=20 -// --pallet=pallet_contracts // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./frame/contracts/src/weights.rs +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/substrate/.git/.artifacts/bench.json +// --pallet=pallet_contracts +// --chain=dev // --header=./HEADER-APACHE2 +// --output=./frame/contracts/src/weights.rs // --template=./.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; @@ -63,6 +65,7 @@ pub trait WeightInfo { fn seal_code_hash(r: u32, ) -> Weight; fn seal_own_code_hash(r: u32, ) -> Weight; fn seal_caller_is_origin(r: u32, ) -> Weight; + fn seal_caller_is_root(r: u32, ) -> Weight; fn seal_address(r: u32, ) -> Weight; fn seal_gas_left(r: u32, ) -> Weight; fn seal_balance(r: u32, ) -> Weight; @@ -177,8 +180,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_565_000 picoseconds. - Weight::from_parts(2_759_000, 1594) + // Minimum execution time: 2_627_000 picoseconds. + Weight::from_parts(2_748_000, 1594) .saturating_add(T::DbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -188,10 +191,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_480_000 picoseconds. - Weight::from_parts(10_153_869, 478) - // Standard Error: 427 - .saturating_add(Weight::from_parts(958_726, 0).saturating_mul(k.into())) + // Minimum execution time: 13_607_000 picoseconds. + Weight::from_parts(8_026_118, 478) + // Standard Error: 1_323 + .saturating_add(Weight::from_parts(980_583, 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)) @@ -207,10 +210,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_406_000 picoseconds. - Weight::from_parts(28_467_370, 3708) - // Standard Error: 46 - .saturating_add(Weight::from_parts(53_724, 0).saturating_mul(c.into())) + // Minimum execution time: 30_563_000 picoseconds. + Weight::from_parts(22_292_544, 3708) + // Standard Error: 60 + .saturating_add(Weight::from_parts(54_541, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -230,10 +233,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 263_198_000 picoseconds. - Weight::from_parts(276_162_279, 6656) - // Standard Error: 18 - .saturating_add(Weight::from_parts(37_378, 0).saturating_mul(c.into())) + // Minimum execution time: 268_884_000 picoseconds. + Weight::from_parts(277_799_331, 6656) + // Standard Error: 23 + .saturating_add(Weight::from_parts(37_876, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -261,14 +264,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_132_259_000 picoseconds. - Weight::from_parts(513_284_834, 8659) - // Standard Error: 280 - .saturating_add(Weight::from_parts(106_723, 0).saturating_mul(c.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_166, 0).saturating_mul(i.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_436, 0).saturating_mul(s.into())) + // Minimum execution time: 3_159_921_000 picoseconds. + Weight::from_parts(594_826_134, 8659) + // Standard Error: 290 + .saturating_add(Weight::from_parts(106_471, 0).saturating_mul(c.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_160, 0).saturating_mul(i.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_417, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(10_u64)) } @@ -292,12 +295,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_646_604_000 picoseconds. - Weight::from_parts(271_369_256, 6408) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_426, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_438, 0).saturating_mul(s.into())) + // Minimum execution time: 1_653_811_000 picoseconds. + Weight::from_parts(296_038_081, 6408) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_461, 0).saturating_mul(i.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_430, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(9_u64)) .saturating_add(T::DbWeight::get().writes(7_u64)) } @@ -315,8 +318,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 191_360_000 picoseconds. - Weight::from_parts(192_625_000, 6699) + // Minimum execution time: 195_916_000 picoseconds. + Weight::from_parts(196_706_000, 6699) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -333,10 +336,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 245_207_000 picoseconds. - Weight::from_parts(244_703_457, 3574) - // Standard Error: 61 - .saturating_add(Weight::from_parts(106_850, 0).saturating_mul(c.into())) + // Minimum execution time: 251_137_000 picoseconds. + Weight::from_parts(252_985_435, 3574) + // Standard Error: 88 + .saturating_add(Weight::from_parts(108_141, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -352,8 +355,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_560_000 picoseconds. - Weight::from_parts(33_833_000, 3720) + // Minimum execution time: 33_521_000 picoseconds. + Weight::from_parts(34_039_000, 3720) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) } @@ -367,8 +370,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_288_000 picoseconds. - Weight::from_parts(33_775_000, 8985) + // Minimum execution time: 33_477_000 picoseconds. + Weight::from_parts(33_890_000, 8985) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -387,10 +390,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 234_292_000 picoseconds. - Weight::from_parts(235_941_911, 6722) - // Standard Error: 413 - .saturating_add(Weight::from_parts(339_913, 0).saturating_mul(r.into())) + // Minimum execution time: 239_374_000 picoseconds. + Weight::from_parts(246_017_099, 6722) + // Standard Error: 539 + .saturating_add(Weight::from_parts(323_826, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -410,10 +413,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 236_273_000 picoseconds. - Weight::from_parts(74_380_906, 6743) - // Standard Error: 5_745 - .saturating_add(Weight::from_parts(3_331_781, 0).saturating_mul(r.into())) + // Minimum execution time: 240_656_000 picoseconds. + Weight::from_parts(87_361_934, 6743) + // Standard Error: 5_912 + .saturating_add(Weight::from_parts(3_329_840, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -434,10 +437,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 236_573_000 picoseconds. - Weight::from_parts(82_473_906, 6747) - // Standard Error: 5_510 - .saturating_add(Weight::from_parts(4_131_820, 0).saturating_mul(r.into())) + // Minimum execution time: 243_026_000 picoseconds. + Weight::from_parts(76_953_007, 6747) + // Standard Error: 6_640 + .saturating_add(Weight::from_parts(4_132_521, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -458,10 +461,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 235_878_000 picoseconds. - Weight::from_parts(238_387_359, 6730) - // Standard Error: 318 - .saturating_add(Weight::from_parts(409_923, 0).saturating_mul(r.into())) + // Minimum execution time: 242_736_000 picoseconds. + Weight::from_parts(243_136_007, 6730) + // Standard Error: 912 + .saturating_add(Weight::from_parts(414_717, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -481,14 +484,35 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 233_476_000 picoseconds. - Weight::from_parts(238_014_452, 6723) - // Standard Error: 145 - .saturating_add(Weight::from_parts(165_823, 0).saturating_mul(r.into())) + // Minimum execution time: 240_130_000 picoseconds. + Weight::from_parts(244_517_187, 6723) + // Standard Error: 384 + .saturating_add(Weight::from_parts(167_431, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts ContractInfoOf (r:1 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + /// Storage: Contracts CodeStorage (r:1 w:0) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: System EventTopics (r:2 w:2) + /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// The range of component `r` is `[0, 1600]`. + fn seal_caller_is_root(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `668 + r * (3 ±0)` + // Estimated: `6608 + r * (3 ±0)` + // Minimum execution time: 228_022_000 picoseconds. + Weight::from_parts(232_385_198, 6608) + // Standard Error: 300 + .saturating_add(Weight::from_parts(145_143, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -504,10 +528,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_490_000 picoseconds. - Weight::from_parts(240_039_685, 6724) - // Standard Error: 330 - .saturating_add(Weight::from_parts(332_291, 0).saturating_mul(r.into())) + // Minimum execution time: 240_250_000 picoseconds. + Weight::from_parts(240_268_824, 6724) + // Standard Error: 945 + .saturating_add(Weight::from_parts(329_577, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -525,12 +549,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `783 + r * (6 ±0)` - // Estimated: `6721 + r * (6 ±0)` - // Minimum execution time: 236_093_000 picoseconds. - Weight::from_parts(238_513_328, 6721) - // Standard Error: 206 - .saturating_add(Weight::from_parts(328_899, 0).saturating_mul(r.into())) + // Measured: `778 + r * (6 ±0)` + // Estimated: `6719 + r * (6 ±0)` + // Minimum execution time: 242_370_000 picoseconds. + Weight::from_parts(242_389_500, 6719) + // Standard Error: 712 + .saturating_add(Weight::from_parts(518_380, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -550,10 +574,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 234_801_000 picoseconds. - Weight::from_parts(243_519_159, 6846) - // Standard Error: 1_367 - .saturating_add(Weight::from_parts(1_449_599, 0).saturating_mul(r.into())) + // Minimum execution time: 238_563_000 picoseconds. + Weight::from_parts(253_511_314, 6846) + // Standard Error: 1_571 + .saturating_add(Weight::from_parts(1_454_089, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -573,10 +597,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 236_765_000 picoseconds. - Weight::from_parts(237_843_244, 6741) - // Standard Error: 308 - .saturating_add(Weight::from_parts(329_911, 0).saturating_mul(r.into())) + // Minimum execution time: 242_995_000 picoseconds. + Weight::from_parts(240_061_456, 6741) + // Standard Error: 2_650 + .saturating_add(Weight::from_parts(326_813, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -596,10 +620,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 236_690_000 picoseconds. - Weight::from_parts(241_743_164, 6739) - // Standard Error: 333 - .saturating_add(Weight::from_parts(324_693, 0).saturating_mul(r.into())) + // Minimum execution time: 241_342_000 picoseconds. + Weight::from_parts(240_875_314, 6739) + // Standard Error: 669 + .saturating_add(Weight::from_parts(324_519, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -619,10 +643,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 236_149_000 picoseconds. - Weight::from_parts(239_090_707, 6737) - // Standard Error: 246 - .saturating_add(Weight::from_parts(344_488, 0).saturating_mul(r.into())) + // Minimum execution time: 238_954_000 picoseconds. + Weight::from_parts(242_269_896, 6737) + // Standard Error: 1_453 + .saturating_add(Weight::from_parts(317_998, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -642,10 +666,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 235_057_000 picoseconds. - Weight::from_parts(237_752_870, 6723) - // Standard Error: 236 - .saturating_add(Weight::from_parts(328_235, 0).saturating_mul(r.into())) + // Minimum execution time: 240_935_000 picoseconds. + Weight::from_parts(242_938_271, 6723) + // Standard Error: 792 + .saturating_add(Weight::from_parts(316_782, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -665,15 +689,15 @@ impl WeightInfo for SubstrateWeight { /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (10 ±0)` - // Estimated: `6796 + r * (10 ±0)` - // Minimum execution time: 234_995_000 picoseconds. - Weight::from_parts(246_473_554, 6796) - // Standard Error: 1_015 - .saturating_add(Weight::from_parts(1_337_653, 0).saturating_mul(r.into())) + // Measured: `852 + r * (14 ±0)` + // Estimated: `6785 + r * (14 ±0)` + // Minimum execution time: 240_142_000 picoseconds. + Weight::from_parts(241_386_730, 6785) + // Standard Error: 2_116 + .saturating_add(Weight::from_parts(1_387_202, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) @@ -690,10 +714,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 160_445_000 picoseconds. - Weight::from_parts(165_558_135, 6687) - // Standard Error: 234 - .saturating_add(Weight::from_parts(133_607, 0).saturating_mul(r.into())) + // Minimum execution time: 165_617_000 picoseconds. + Weight::from_parts(170_794_127, 6687) + // Standard Error: 209 + .saturating_add(Weight::from_parts(127_931, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) @@ -713,10 +737,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_065_000 picoseconds. - Weight::from_parts(237_797_177, 6724) - // Standard Error: 336 - .saturating_add(Weight::from_parts(267_302, 0).saturating_mul(r.into())) + // Minimum execution time: 238_832_000 picoseconds. + Weight::from_parts(237_110_694, 6724) + // Standard Error: 539 + .saturating_add(Weight::from_parts(280_610, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -736,10 +760,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 236_215_000 picoseconds. - Weight::from_parts(239_347_313, 6724) - // Standard Error: 0 - .saturating_add(Weight::from_parts(587, 0).saturating_mul(n.into())) + // Minimum execution time: 241_070_000 picoseconds. + Weight::from_parts(242_162_279, 6724) + // Standard Error: 1 + .saturating_add(Weight::from_parts(595, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -758,10 +782,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 231_571_000 picoseconds. - Weight::from_parts(233_477_918, 6708) - // Standard Error: 95_776 - .saturating_add(Weight::from_parts(1_733_181, 0).saturating_mul(r.into())) + // Minimum execution time: 236_337_000 picoseconds. + Weight::from_parts(238_883_828, 6708) + // Standard Error: 188_978 + .saturating_add(Weight::from_parts(926_671, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -781,10 +805,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 234_956_000 picoseconds. - Weight::from_parts(236_785_051, 6731) + // Minimum execution time: 239_103_000 picoseconds. + Weight::from_parts(240_382_910, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(181, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -809,10 +833,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 234_275_000 picoseconds. - Weight::from_parts(236_776_769, 6750) - // Standard Error: 137_203 - .saturating_add(Weight::from_parts(110_758_930, 0).saturating_mul(r.into())) + // Minimum execution time: 238_739_000 picoseconds. + Weight::from_parts(241_041_330, 6750) + // Standard Error: 176_820 + .saturating_add(Weight::from_parts(115_332_869, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -836,10 +860,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 235_593_000 picoseconds. - Weight::from_parts(253_731_242, 6769) - // Standard Error: 2_129 - .saturating_add(Weight::from_parts(1_771_297, 0).saturating_mul(r.into())) + // Minimum execution time: 240_888_000 picoseconds. + Weight::from_parts(259_901_113, 6769) + // Standard Error: 5_935 + .saturating_add(Weight::from_parts(1_764_269, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -859,10 +883,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 232_124_000 picoseconds. - Weight::from_parts(245_904_447, 6723) - // Standard Error: 2_185 - .saturating_add(Weight::from_parts(3_470_410, 0).saturating_mul(r.into())) + // Minimum execution time: 237_478_000 picoseconds. + Weight::from_parts(264_915_436, 6723) + // Standard Error: 4_644 + .saturating_add(Weight::from_parts(3_452_918, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -883,12 +907,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 250_301_000 picoseconds. - Weight::from_parts(245_292_258, 6744) - // Standard Error: 29_864 - .saturating_add(Weight::from_parts(2_163_531, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(583, 0).saturating_mul(n.into())) + // Minimum execution time: 255_720_000 picoseconds. + Weight::from_parts(247_945_758, 6744) + // Standard Error: 73_390 + .saturating_add(Weight::from_parts(2_483_239, 0).saturating_mul(t.into())) + // Standard Error: 20 + .saturating_add(Weight::from_parts(756, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -910,10 +934,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 165_711_000 picoseconds. - Weight::from_parts(168_792_571, 6721) - // Standard Error: 216 - .saturating_add(Weight::from_parts(230_285, 0).saturating_mul(r.into())) + // Minimum execution time: 172_214_000 picoseconds. + Weight::from_parts(177_306_567, 6721) + // Standard Error: 839 + .saturating_add(Weight::from_parts(230_558, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -933,10 +957,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 348_928_000 picoseconds. - Weight::from_parts(352_224_793, 131670) - // Standard Error: 0 - .saturating_add(Weight::from_parts(731, 0).saturating_mul(i.into())) + // Minimum execution time: 354_105_000 picoseconds. + Weight::from_parts(360_649_854, 131670) + // Standard Error: 2 + .saturating_add(Weight::from_parts(737, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -947,10 +971,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 236_418_000 picoseconds. - Weight::from_parts(129_862_840, 843) - // Standard Error: 9_733 - .saturating_add(Weight::from_parts(6_005_187, 0).saturating_mul(r.into())) + // Minimum execution time: 239_637_000 picoseconds. + Weight::from_parts(136_431_436, 843) + // Standard Error: 10_238 + .saturating_add(Weight::from_parts(6_070_221, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -964,10 +988,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 251_599_000 picoseconds. - Weight::from_parts(285_284_665, 1280) - // Standard Error: 46 - .saturating_add(Weight::from_parts(410, 0).saturating_mul(n.into())) + // Minimum execution time: 256_198_000 picoseconds. + Weight::from_parts(289_972_802, 1280) + // Standard Error: 54 + .saturating_add(Weight::from_parts(438, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().writes(6_u64)) } @@ -978,10 +1002,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 251_309_000 picoseconds. - Weight::from_parts(253_555_552, 1167) - // Standard Error: 9 - .saturating_add(Weight::from_parts(27, 0).saturating_mul(n.into())) + // Minimum execution time: 255_519_000 picoseconds. + Weight::from_parts(257_668_217, 1167) + // Standard Error: 19 + .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -993,10 +1017,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 235_441_000 picoseconds. - Weight::from_parts(132_980_942, 845) - // Standard Error: 9_421 - .saturating_add(Weight::from_parts(5_854_896, 0).saturating_mul(r.into())) + // Minimum execution time: 239_461_000 picoseconds. + Weight::from_parts(131_630_528, 845) + // Standard Error: 10_483 + .saturating_add(Weight::from_parts(5_910_066, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1010,10 +1034,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 249_967_000 picoseconds. - Weight::from_parts(252_122_186, 1163) - // Standard Error: 10 - .saturating_add(Weight::from_parts(74, 0).saturating_mul(n.into())) + // Minimum execution time: 254_904_000 picoseconds. + Weight::from_parts(261_213_399, 1163) + // Standard Error: 178 + .saturating_add(Weight::from_parts(125, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1025,10 +1049,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 235_647_000 picoseconds. - Weight::from_parts(145_525_169, 840) - // Standard Error: 8_553 - .saturating_add(Weight::from_parts(4_948_021, 0).saturating_mul(r.into())) + // Minimum execution time: 239_995_000 picoseconds. + Weight::from_parts(151_326_508, 840) + // Standard Error: 8_960 + .saturating_add(Weight::from_parts(4_937_728, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1041,10 +1065,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 249_576_000 picoseconds. - Weight::from_parts(250_747_191, 1179) - // Standard Error: 8 - .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) + // Minimum execution time: 254_515_000 picoseconds. + Weight::from_parts(256_728_817, 1179) + // Standard Error: 22 + .saturating_add(Weight::from_parts(706, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1056,10 +1080,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 236_110_000 picoseconds. - Weight::from_parts(148_420_625, 857) - // Standard Error: 8_175 - .saturating_add(Weight::from_parts(4_684_126, 0).saturating_mul(r.into())) + // Minimum execution time: 240_601_000 picoseconds. + Weight::from_parts(154_476_561, 857) + // Standard Error: 8_872 + .saturating_add(Weight::from_parts(4_805_043, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1072,10 +1096,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 247_800_000 picoseconds. - Weight::from_parts(249_410_575, 1166) - // Standard Error: 6 - .saturating_add(Weight::from_parts(99, 0).saturating_mul(n.into())) + // Minimum execution time: 253_654_000 picoseconds. + Weight::from_parts(257_288_586, 1166) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1087,10 +1109,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 235_251_000 picoseconds. - Weight::from_parts(128_816_707, 836) - // Standard Error: 9_887 - .saturating_add(Weight::from_parts(6_167_176, 0).saturating_mul(r.into())) + // Minimum execution time: 239_869_000 picoseconds. + Weight::from_parts(135_258_204, 836) + // Standard Error: 10_378 + .saturating_add(Weight::from_parts(6_144_770, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1104,10 +1126,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 250_401_000 picoseconds. - Weight::from_parts(253_298_243, 1180) - // Standard Error: 9 - .saturating_add(Weight::from_parts(667, 0).saturating_mul(n.into())) + // Minimum execution time: 258_153_000 picoseconds. + Weight::from_parts(260_068_186, 1180) + // Standard Error: 25 + .saturating_add(Weight::from_parts(744, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1127,10 +1149,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 236_470_000 picoseconds. - Weight::from_parts(98_898_727, 7270) - // Standard Error: 33_316 - .saturating_add(Weight::from_parts(35_149_946, 0).saturating_mul(r.into())) + // Minimum execution time: 243_189_000 picoseconds. + Weight::from_parts(243_465_000, 7270) + // Standard Error: 30_961 + .saturating_add(Weight::from_parts(35_376_623, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4_u64)) @@ -1145,22 +1167,22 @@ impl WeightInfo for SubstrateWeight { /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:802 w:802) + /// Storage: System EventTopics (r:803 w:803) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1237 + r * (256 ±0)` - // Estimated: `7125 + r * (2732 ±0)` - // Minimum execution time: 238_303_000 picoseconds. - Weight::from_parts(239_024_000, 7125) - // Standard Error: 65_907 - .saturating_add(Weight::from_parts(209_419_071, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7_u64)) + // Measured: `1140 + r * (276 ±0)` + // Estimated: `9332 + r * (2752 ±0)` + // Minimum execution time: 243_656_000 picoseconds. + Weight::from_parts(244_221_000, 9332) + // Standard Error: 69_762 + .saturating_add(Weight::from_parts(216_905_619, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2732).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) @@ -1177,10 +1199,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 235_961_000 picoseconds. - Weight::from_parts(236_939_000, 6727) - // Standard Error: 83_087 - .saturating_add(Weight::from_parts(205_646_517, 0).saturating_mul(r.into())) + // Minimum execution time: 242_632_000 picoseconds. + Weight::from_parts(243_068_000, 6727) + // Standard Error: 126_218 + .saturating_add(Weight::from_parts(213_096_291, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1195,23 +1217,23 @@ impl WeightInfo for SubstrateWeight { /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) + /// Storage: System EventTopics (r:4 w:4) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` - // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 410_156_000 picoseconds. - Weight::from_parts(378_378_143, 9569) - // Standard Error: 285_172 - .saturating_add(Weight::from_parts(34_736_740, 0).saturating_mul(t.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(591, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(9_u64)) + // Estimated: `12044 + t * (5154 ±0)` + // Minimum execution time: 421_691_000 picoseconds. + Weight::from_parts(394_587_369, 12044) + // Standard Error: 1_104_014 + .saturating_add(Weight::from_parts(30_461_758, 0).saturating_mul(t.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) - .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } @@ -1229,15 +1251,15 @@ impl WeightInfo for SubstrateWeight { /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:802 w:802) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 800]`. + /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1301 + r * (254 ±0)` - // Estimated: `7131 + r * (5205 ±0)` - // Minimum execution time: 236_748_000 picoseconds. - Weight::from_parts(237_129_000, 7131) - // Standard Error: 280_059 - .saturating_add(Weight::from_parts(341_428_013, 0).saturating_mul(r.into())) + // Measured: `1322 + r * (254 ±0)` + // Estimated: `7146 + r * (5205 ±0)` + // Minimum execution time: 581_252_000 picoseconds. + Weight::from_parts(582_275_000, 7146) + // Standard Error: 279_771 + .saturating_add(Weight::from_parts(349_770_967, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(6_u64)) @@ -1265,14 +1287,14 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_613_796_000 picoseconds. - Weight::from_parts(340_002_206, 9492) - // Standard Error: 4_296_381 - .saturating_add(Weight::from_parts(115_239_834, 0).saturating_mul(t.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_145, 0).saturating_mul(i.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(s.into())) + // Minimum execution time: 1_623_241_000 picoseconds. + Weight::from_parts(317_076_173, 9492) + // Standard Error: 4_549_416 + .saturating_add(Weight::from_parts(125_360_446, 0).saturating_mul(t.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(i.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_352, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(T::DbWeight::get().writes(10_u64)) @@ -1294,10 +1316,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 233_111_000 picoseconds. - Weight::from_parts(238_643_933, 6718) - // Standard Error: 184 - .saturating_add(Weight::from_parts(572_296, 0).saturating_mul(r.into())) + // Minimum execution time: 238_262_000 picoseconds. + Weight::from_parts(243_093_288, 6718) + // Standard Error: 870 + .saturating_add(Weight::from_parts(573_939, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1317,10 +1339,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 234_746_000 picoseconds. - Weight::from_parts(229_815_552, 6725) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_892, 0).saturating_mul(n.into())) + // Minimum execution time: 239_888_000 picoseconds. + Weight::from_parts(242_849_333, 6725) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_949, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1339,10 +1361,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 232_732_000 picoseconds. - Weight::from_parts(239_007_209, 6721) - // Standard Error: 256 - .saturating_add(Weight::from_parts(733_879, 0).saturating_mul(r.into())) + // Minimum execution time: 237_288_000 picoseconds. + Weight::from_parts(242_510_631, 6721) + // Standard Error: 977 + .saturating_add(Weight::from_parts(742_726, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1362,10 +1384,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 234_184_000 picoseconds. - Weight::from_parts(227_603_375, 6729) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_127, 0).saturating_mul(n.into())) + // Minimum execution time: 240_006_000 picoseconds. + Weight::from_parts(233_802_510, 6729) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_161, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1384,10 +1406,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 233_038_000 picoseconds. - Weight::from_parts(238_515_817, 6724) - // Standard Error: 255 - .saturating_add(Weight::from_parts(413_343, 0).saturating_mul(r.into())) + // Minimum execution time: 237_532_000 picoseconds. + Weight::from_parts(243_087_565, 6724) + // Standard Error: 656 + .saturating_add(Weight::from_parts(417_850, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1407,10 +1429,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 232_996_000 picoseconds. - Weight::from_parts(226_706_997, 6733) + // Minimum execution time: 241_429_000 picoseconds. + Weight::from_parts(233_528_258, 6733) // Standard Error: 1 - .saturating_add(Weight::from_parts(908, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(913, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1429,10 +1451,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 232_292_000 picoseconds. - Weight::from_parts(237_997_001, 6725) - // Standard Error: 219 - .saturating_add(Weight::from_parts(410_177, 0).saturating_mul(r.into())) + // Minimum execution time: 237_622_000 picoseconds. + Weight::from_parts(240_476_401, 6725) + // Standard Error: 795 + .saturating_add(Weight::from_parts(416_869, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -1452,10 +1474,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 234_815_000 picoseconds. - Weight::from_parts(226_317_150, 6727) - // Standard Error: 1 - .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into())) + // Minimum execution time: 241_134_000 picoseconds. + Weight::from_parts(234_043_271, 6727) + // Standard Error: 3 + .saturating_add(Weight::from_parts(919, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) } @@ -1473,11 +1495,11 @@ impl WeightInfo for SubstrateWeight { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6848 + n * (1 ±0)` - // Minimum execution time: 286_323_000 picoseconds. - Weight::from_parts(290_287_955, 6848) - // Standard Error: 1 - .saturating_add(Weight::from_parts(4_693, 0).saturating_mul(n.into())) + // Estimated: `6849 + n * (1 ±0)` + // Minimum execution time: 292_699_000 picoseconds. + Weight::from_parts(301_523_608, 6849) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_676, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -1497,10 +1519,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `727 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 235_938_000 picoseconds. - Weight::from_parts(242_728_358, 6666) - // Standard Error: 9_725 - .saturating_add(Weight::from_parts(47_527_740, 0).saturating_mul(r.into())) + // Minimum execution time: 241_126_000 picoseconds. + Weight::from_parts(248_796_458, 6666) + // Standard Error: 21_501 + .saturating_add(Weight::from_parts(48_091_265, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -1519,11 +1541,11 @@ impl WeightInfo for SubstrateWeight { fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `822 + r * (76 ±0)` - // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 236_108_000 picoseconds. - Weight::from_parts(248_577_226, 6716) - // Standard Error: 9_565 - .saturating_add(Weight::from_parts(36_733_552, 0).saturating_mul(r.into())) + // Estimated: `6717 + r * (77 ±0)` + // Minimum execution time: 242_379_000 picoseconds. + Weight::from_parts(261_355_525, 6717) + // Standard Error: 18_862 + .saturating_add(Weight::from_parts(37_603_073, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -1543,10 +1565,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 236_440_000 picoseconds. - Weight::from_parts(240_771_418, 6731) - // Standard Error: 1_849 - .saturating_add(Weight::from_parts(9_185_896, 0).saturating_mul(r.into())) + // Minimum execution time: 241_270_000 picoseconds. + Weight::from_parts(245_135_291, 6731) + // Standard Error: 10_757 + .saturating_add(Weight::from_parts(9_344_876, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -1567,11 +1589,11 @@ impl WeightInfo for SubstrateWeight { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±10)` - // Minimum execution time: 235_056_000 picoseconds. - Weight::from_parts(235_743_000, 8190) - // Standard Error: 46_122 - .saturating_add(Weight::from_parts(21_447_984, 0).saturating_mul(r.into())) + // Estimated: `8190 + r * (3090 ±7)` + // Minimum execution time: 240_506_000 picoseconds. + Weight::from_parts(241_653_000, 8190) + // Standard Error: 46_785 + .saturating_add(Weight::from_parts(22_107_816, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3_u64)) @@ -1593,10 +1615,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 235_213_000 picoseconds. - Weight::from_parts(239_456_464, 6723) - // Standard Error: 130 - .saturating_add(Weight::from_parts(159_851, 0).saturating_mul(r.into())) + // Minimum execution time: 241_539_000 picoseconds. + Weight::from_parts(245_471_045, 6723) + // Standard Error: 416 + .saturating_add(Weight::from_parts(159_577, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1616,10 +1638,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 237_886_000 picoseconds. - Weight::from_parts(262_430_157, 7805) - // Standard Error: 939 - .saturating_add(Weight::from_parts(260_005, 0).saturating_mul(r.into())) + // Minimum execution time: 242_702_000 picoseconds. + Weight::from_parts(274_518_595, 7805) + // Standard Error: 1_138 + .saturating_add(Weight::from_parts(256_973, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -1641,10 +1663,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_014_000 picoseconds. - Weight::from_parts(240_042_671, 6723) - // Standard Error: 152 - .saturating_add(Weight::from_parts(138_382, 0).saturating_mul(r.into())) + // Minimum execution time: 239_360_000 picoseconds. + Weight::from_parts(245_990_810, 6723) + // Standard Error: 3_188 + .saturating_add(Weight::from_parts(143_408, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -1654,510 +1676,510 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_846_015, 0) + // Minimum execution time: 1_617_000 picoseconds. + Weight::from_parts(1_900_268, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(2_935, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_950, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(2_197_197, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_335, 0).saturating_mul(r.into())) + // Minimum execution time: 1_739_000 picoseconds. + Weight::from_parts(2_109_373, 0) + // Standard Error: 43 + .saturating_add(Weight::from_parts(6_586, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_200_545, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_011, 0).saturating_mul(r.into())) + // Minimum execution time: 1_726_000 picoseconds. + Weight::from_parts(2_268_507, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_022, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_545_000 picoseconds. - Weight::from_parts(1_977_462, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(7_901, 0).saturating_mul(r.into())) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(2_042_521, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(7_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_515_000 picoseconds. - Weight::from_parts(1_866_184, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_514, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(1_902_691, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(10_572, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_618_000 picoseconds. - Weight::from_parts(1_895_104, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(4_523, 0).saturating_mul(r.into())) + // Minimum execution time: 1_626_000 picoseconds. + Weight::from_parts(1_891_843, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_612, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510_000 picoseconds. - Weight::from_parts(1_779_998, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_832, 0).saturating_mul(r.into())) + // Minimum execution time: 1_581_000 picoseconds. + Weight::from_parts(1_139_823, 0) + // Standard Error: 74 + .saturating_add(Weight::from_parts(8_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_726_996, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(9_199, 0).saturating_mul(r.into())) + // Minimum execution time: 1_591_000 picoseconds. + Weight::from_parts(1_258_400, 0) + // Standard Error: 34 + .saturating_add(Weight::from_parts(9_706, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_682_000 picoseconds. - Weight::from_parts(1_789_910, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(42, 0).saturating_mul(e.into())) + // Minimum execution time: 1_701_000 picoseconds. + Weight::from_parts(1_876_118, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(4, 0).saturating_mul(e.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_539_000 picoseconds. - Weight::from_parts(2_093_056, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(18_917, 0).saturating_mul(r.into())) + // Minimum execution time: 1_617_000 picoseconds. + Weight::from_parts(1_565_613, 0) + // Standard Error: 629 + .saturating_add(Weight::from_parts(19_575, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_851_000 picoseconds. - Weight::from_parts(3_134_610, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(24_714, 0).saturating_mul(r.into())) + // Minimum execution time: 1_875_000 picoseconds. + Weight::from_parts(4_549_584, 0) + // Standard Error: 278 + .saturating_add(Weight::from_parts(24_336, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(1_885_921, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_243, 0).saturating_mul(l.into())) + // Minimum execution time: 1_742_000 picoseconds. + Weight::from_parts(2_087_387, 0) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_041, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(3_014_725, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_447, 0).saturating_mul(r.into())) + // Minimum execution time: 2_861_000 picoseconds. + Weight::from_parts(3_552_428, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(2_339, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_881_000 picoseconds. - Weight::from_parts(3_137_711, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_608, 0).saturating_mul(r.into())) + // Minimum execution time: 2_866_000 picoseconds. + Weight::from_parts(3_151_948, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_809_000 picoseconds. - Weight::from_parts(3_142_066, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_841, 0).saturating_mul(r.into())) + // Minimum execution time: 2_919_000 picoseconds. + Weight::from_parts(3_214_587, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(3_867, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_704_000 picoseconds. - Weight::from_parts(2_083_619, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(8_366, 0).saturating_mul(r.into())) + // Minimum execution time: 1_764_000 picoseconds. + Weight::from_parts(1_815_683, 0) + // Standard Error: 123 + .saturating_add(Weight::from_parts(8_733, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(2_048_256, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_826, 0).saturating_mul(r.into())) + // Minimum execution time: 1_783_000 picoseconds. + Weight::from_parts(2_437_152, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(8_839, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_924_626, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_746, 0).saturating_mul(r.into())) + // Minimum execution time: 1_745_000 picoseconds. + Weight::from_parts(2_018_078, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_756, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_585_000 picoseconds. - Weight::from_parts(490_856, 0) - // Standard Error: 133_673 - .saturating_add(Weight::from_parts(13_182_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(648_059, 0) + // Standard Error: 142_299 + .saturating_add(Weight::from_parts(13_313_060, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_851_563, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_953_179, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_828, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_564_000 picoseconds. - Weight::from_parts(1_914_178, 0) + // Minimum execution time: 1_607_000 picoseconds. + Weight::from_parts(1_924_759, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_732, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_559_000 picoseconds. - Weight::from_parts(1_886_992, 0) + // Minimum execution time: 1_687_000 picoseconds. + Weight::from_parts(1_959_683, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_731, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_553_000 picoseconds. - Weight::from_parts(1_886_545, 0) + // Minimum execution time: 1_641_000 picoseconds. + Weight::from_parts(1_975_838, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_658, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_681, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_853_647, 0) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(1_980_109, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_880, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_554_000 picoseconds. - Weight::from_parts(1_868_877, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_806, 0).saturating_mul(r.into())) + // Minimum execution time: 1_671_000 picoseconds. + Weight::from_parts(1_912_089, 0) + // Standard Error: 29 + .saturating_add(Weight::from_parts(3_896, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_514_000 picoseconds. - Weight::from_parts(1_882_233, 0) + // Minimum execution time: 1_643_000 picoseconds. + Weight::from_parts(1_951_485, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_700, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_725, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_897_247, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_955, 0).saturating_mul(r.into())) + // Minimum execution time: 1_649_000 picoseconds. + Weight::from_parts(1_937_598, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_045, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_922_333, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_933, 0).saturating_mul(r.into())) + // Minimum execution time: 1_651_000 picoseconds. + Weight::from_parts(2_202_977, 0) + // Standard Error: 313 + .saturating_add(Weight::from_parts(6_299, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_512_000 picoseconds. - Weight::from_parts(1_848_668, 0) + // Minimum execution time: 1_589_000 picoseconds. + Weight::from_parts(1_946_304, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_966, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_019, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_522_000 picoseconds. - Weight::from_parts(1_875_257, 0) + // Minimum execution time: 1_614_000 picoseconds. + Weight::from_parts(1_933_375, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_020, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_546_000 picoseconds. - Weight::from_parts(1_836_691, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_678_000 picoseconds. + Weight::from_parts(2_003_850, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_505_000 picoseconds. - Weight::from_parts(1_907_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_075, 0).saturating_mul(r.into())) + // Minimum execution time: 1_651_000 picoseconds. + Weight::from_parts(1_971_321, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_114, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_891_008, 0) + // Minimum execution time: 1_647_000 picoseconds. + Weight::from_parts(2_017_232, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_990, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_556_000 picoseconds. - Weight::from_parts(1_910_864, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_059, 0).saturating_mul(r.into())) + // Minimum execution time: 1_635_000 picoseconds. + Weight::from_parts(3_232_848, 0) + // Standard Error: 105 + .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_544_000 picoseconds. - Weight::from_parts(1_912_650, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_943, 0).saturating_mul(r.into())) + // Minimum execution time: 1_623_000 picoseconds. + Weight::from_parts(1_996_165, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_964, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_855_260, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_975, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(1_973_238, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(6_021, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_521_000 picoseconds. - Weight::from_parts(1_867_259, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_846, 0).saturating_mul(r.into())) + // Minimum execution time: 1_674_000 picoseconds. + Weight::from_parts(1_981_762, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_898, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_509_000 picoseconds. - Weight::from_parts(1_893_018, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_096, 0).saturating_mul(r.into())) + // Minimum execution time: 1_632_000 picoseconds. + Weight::from_parts(1_935_700, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_154, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_496_000 picoseconds. - Weight::from_parts(1_886_659, 0) + // Minimum execution time: 1_607_000 picoseconds. + Weight::from_parts(1_942_734, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_754, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_797, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_890_548, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(11_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_611_000 picoseconds. + Weight::from_parts(2_960_454, 0) + // Standard Error: 177 + .saturating_add(Weight::from_parts(11_666, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_891_903, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_613, 0).saturating_mul(r.into())) + // Minimum execution time: 1_641_000 picoseconds. + Weight::from_parts(2_104_200, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(10_540, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_504_000 picoseconds. - Weight::from_parts(1_632_694, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(12_281, 0).saturating_mul(r.into())) + // Minimum execution time: 1_643_000 picoseconds. + Weight::from_parts(2_602_908, 0) + // Standard Error: 24 + .saturating_add(Weight::from_parts(11_900, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_878_413, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(10_737, 0).saturating_mul(r.into())) + // Minimum execution time: 1_584_000 picoseconds. + Weight::from_parts(2_056_817, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(10_722, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_898_519, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_645, 0).saturating_mul(r.into())) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_988_892, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_683, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_503_000 picoseconds. - Weight::from_parts(1_895_532, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_745, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(2_148_537, 0) + // Standard Error: 38 + .saturating_add(Weight::from_parts(5_756, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_868_720, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_873, 0).saturating_mul(r.into())) + // Minimum execution time: 1_629_000 picoseconds. + Weight::from_parts(1_955_010, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_931, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_894_207, 0) + // Minimum execution time: 1_569_000 picoseconds. + Weight::from_parts(1_982_403, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_843, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_867, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_473_000 picoseconds. - Weight::from_parts(1_880_224, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_615_000 picoseconds. + Weight::from_parts(1_989_920, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_137, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_447_000 picoseconds. - Weight::from_parts(1_884_551, 0) + // Minimum execution time: 1_646_000 picoseconds. + Weight::from_parts(2_020_935, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_849, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_863, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_908_813, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) + // Minimum execution time: 1_661_000 picoseconds. + Weight::from_parts(2_320_710, 0) + // Standard Error: 27 + .saturating_add(Weight::from_parts(5_922, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_878_015, 0) + // Minimum execution time: 1_674_000 picoseconds. + Weight::from_parts(2_044_188, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_848, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_855, 0).saturating_mul(r.into())) } } @@ -2169,8 +2191,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `1594` - // Minimum execution time: 2_565_000 picoseconds. - Weight::from_parts(2_759_000, 1594) + // Minimum execution time: 2_627_000 picoseconds. + Weight::from_parts(2_748_000, 1594) .saturating_add(RocksDbWeight::get().reads(1_u64)) } /// Storage: Skipped Metadata (r:0 w:0) @@ -2180,10 +2202,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `488 + k * (69 ±0)` // Estimated: `478 + k * (70 ±0)` - // Minimum execution time: 13_480_000 picoseconds. - Weight::from_parts(10_153_869, 478) - // Standard Error: 427 - .saturating_add(Weight::from_parts(958_726, 0).saturating_mul(k.into())) + // Minimum execution time: 13_607_000 picoseconds. + Weight::from_parts(8_026_118, 478) + // Standard Error: 1_323 + .saturating_add(Weight::from_parts(980_583, 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)) @@ -2199,10 +2221,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `238 + c * (1 ±0)` // Estimated: `3708 + c * (1 ±0)` - // Minimum execution time: 30_406_000 picoseconds. - Weight::from_parts(28_467_370, 3708) - // Standard Error: 46 - .saturating_add(Weight::from_parts(53_724, 0).saturating_mul(c.into())) + // Minimum execution time: 30_563_000 picoseconds. + Weight::from_parts(22_292_544, 3708) + // Standard Error: 60 + .saturating_add(Weight::from_parts(54_541, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2222,10 +2244,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `707` // Estimated: `6656 + c * (1 ±0)` - // Minimum execution time: 263_198_000 picoseconds. - Weight::from_parts(276_162_279, 6656) - // Standard Error: 18 - .saturating_add(Weight::from_parts(37_378, 0).saturating_mul(c.into())) + // Minimum execution time: 268_884_000 picoseconds. + Weight::from_parts(277_799_331, 6656) + // Standard Error: 23 + .saturating_add(Weight::from_parts(37_876, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) @@ -2253,14 +2275,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `270` // Estimated: `8659` - // Minimum execution time: 3_132_259_000 picoseconds. - Weight::from_parts(513_284_834, 8659) - // Standard Error: 280 - .saturating_add(Weight::from_parts(106_723, 0).saturating_mul(c.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_166, 0).saturating_mul(i.into())) - // Standard Error: 16 - .saturating_add(Weight::from_parts(1_436, 0).saturating_mul(s.into())) + // Minimum execution time: 3_159_921_000 picoseconds. + Weight::from_parts(594_826_134, 8659) + // Standard Error: 290 + .saturating_add(Weight::from_parts(106_471, 0).saturating_mul(c.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_160, 0).saturating_mul(i.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_417, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(10_u64)) } @@ -2284,12 +2306,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `482` // Estimated: `6408` - // Minimum execution time: 1_646_604_000 picoseconds. - Weight::from_parts(271_369_256, 6408) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_426, 0).saturating_mul(i.into())) - // Standard Error: 7 - .saturating_add(Weight::from_parts(1_438, 0).saturating_mul(s.into())) + // Minimum execution time: 1_653_811_000 picoseconds. + Weight::from_parts(296_038_081, 6408) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_461, 0).saturating_mul(i.into())) + // Standard Error: 9 + .saturating_add(Weight::from_parts(1_430, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(9_u64)) .saturating_add(RocksDbWeight::get().writes(7_u64)) } @@ -2307,8 +2329,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `759` // Estimated: `6699` - // Minimum execution time: 191_360_000 picoseconds. - Weight::from_parts(192_625_000, 6699) + // Minimum execution time: 195_916_000 picoseconds. + Weight::from_parts(196_706_000, 6699) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2325,10 +2347,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `109` // Estimated: `3574` - // Minimum execution time: 245_207_000 picoseconds. - Weight::from_parts(244_703_457, 3574) - // Standard Error: 61 - .saturating_add(Weight::from_parts(106_850, 0).saturating_mul(c.into())) + // Minimum execution time: 251_137_000 picoseconds. + Weight::from_parts(252_985_435, 3574) + // Standard Error: 88 + .saturating_add(Weight::from_parts(108_141, 0).saturating_mul(c.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2344,8 +2366,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 33_560_000 picoseconds. - Weight::from_parts(33_833_000, 3720) + // Minimum execution time: 33_521_000 picoseconds. + Weight::from_parts(34_039_000, 3720) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } @@ -2359,8 +2381,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `570` // Estimated: `8985` - // Minimum execution time: 33_288_000 picoseconds. - Weight::from_parts(33_775_000, 8985) + // Minimum execution time: 33_477_000 picoseconds. + Weight::from_parts(33_890_000, 8985) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2379,10 +2401,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `781 + r * (6 ±0)` // Estimated: `6722 + r * (6 ±0)` - // Minimum execution time: 234_292_000 picoseconds. - Weight::from_parts(235_941_911, 6722) - // Standard Error: 413 - .saturating_add(Weight::from_parts(339_913, 0).saturating_mul(r.into())) + // Minimum execution time: 239_374_000 picoseconds. + Weight::from_parts(246_017_099, 6722) + // Standard Error: 539 + .saturating_add(Weight::from_parts(323_826, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2402,10 +2424,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `839 + r * (240 ±0)` // Estimated: `6743 + r * (2715 ±0)` - // Minimum execution time: 236_273_000 picoseconds. - Weight::from_parts(74_380_906, 6743) - // Standard Error: 5_745 - .saturating_add(Weight::from_parts(3_331_781, 0).saturating_mul(r.into())) + // Minimum execution time: 240_656_000 picoseconds. + Weight::from_parts(87_361_934, 6743) + // Standard Error: 5_912 + .saturating_add(Weight::from_parts(3_329_840, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2426,10 +2448,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `831 + r * (244 ±0)` // Estimated: `6747 + r * (2719 ±0)` - // Minimum execution time: 236_573_000 picoseconds. - Weight::from_parts(82_473_906, 6747) - // Standard Error: 5_510 - .saturating_add(Weight::from_parts(4_131_820, 0).saturating_mul(r.into())) + // Minimum execution time: 243_026_000 picoseconds. + Weight::from_parts(76_953_007, 6747) + // Standard Error: 6_640 + .saturating_add(Weight::from_parts(4_132_521, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2450,10 +2472,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `788 + r * (6 ±0)` // Estimated: `6730 + r * (6 ±0)` - // Minimum execution time: 235_878_000 picoseconds. - Weight::from_parts(238_387_359, 6730) - // Standard Error: 318 - .saturating_add(Weight::from_parts(409_923, 0).saturating_mul(r.into())) + // Minimum execution time: 242_736_000 picoseconds. + Weight::from_parts(243_136_007, 6730) + // Standard Error: 912 + .saturating_add(Weight::from_parts(414_717, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2473,14 +2495,35 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 233_476_000 picoseconds. - Weight::from_parts(238_014_452, 6723) - // Standard Error: 145 - .saturating_add(Weight::from_parts(165_823, 0).saturating_mul(r.into())) + // Minimum execution time: 240_130_000 picoseconds. + Weight::from_parts(244_517_187, 6723) + // Standard Error: 384 + .saturating_add(Weight::from_parts(167_431, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) } + /// Storage: Contracts ContractInfoOf (r:1 w:1) + /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(290), added: 2765, mode: Measured) + /// Storage: Contracts CodeStorage (r:1 w:0) + /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) + /// Storage: System EventTopics (r:2 w:2) + /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// The range of component `r` is `[0, 1600]`. + fn seal_caller_is_root(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `668 + r * (3 ±0)` + // Estimated: `6608 + r * (3 ±0)` + // Minimum execution time: 228_022_000 picoseconds. + Weight::from_parts(232_385_198, 6608) + // Standard Error: 300 + .saturating_add(Weight::from_parts(145_143, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) /// Storage: Contracts ContractInfoOf (r:1 w:1) @@ -2496,10 +2539,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `782 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_490_000 picoseconds. - Weight::from_parts(240_039_685, 6724) - // Standard Error: 330 - .saturating_add(Weight::from_parts(332_291, 0).saturating_mul(r.into())) + // Minimum execution time: 240_250_000 picoseconds. + Weight::from_parts(240_268_824, 6724) + // Standard Error: 945 + .saturating_add(Weight::from_parts(329_577, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2517,12 +2560,12 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `783 + r * (6 ±0)` - // Estimated: `6721 + r * (6 ±0)` - // Minimum execution time: 236_093_000 picoseconds. - Weight::from_parts(238_513_328, 6721) - // Standard Error: 206 - .saturating_add(Weight::from_parts(328_899, 0).saturating_mul(r.into())) + // Measured: `778 + r * (6 ±0)` + // Estimated: `6719 + r * (6 ±0)` + // Minimum execution time: 242_370_000 picoseconds. + Weight::from_parts(242_389_500, 6719) + // Standard Error: 712 + .saturating_add(Weight::from_parts(518_380, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2542,10 +2585,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `922 + r * (6 ±0)` // Estimated: `6846 + r * (6 ±0)` - // Minimum execution time: 234_801_000 picoseconds. - Weight::from_parts(243_519_159, 6846) - // Standard Error: 1_367 - .saturating_add(Weight::from_parts(1_449_599, 0).saturating_mul(r.into())) + // Minimum execution time: 238_563_000 picoseconds. + Weight::from_parts(253_511_314, 6846) + // Standard Error: 1_571 + .saturating_add(Weight::from_parts(1_454_089, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2565,10 +2608,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (6 ±0)` // Estimated: `6741 + r * (6 ±0)` - // Minimum execution time: 236_765_000 picoseconds. - Weight::from_parts(237_843_244, 6741) - // Standard Error: 308 - .saturating_add(Weight::from_parts(329_911, 0).saturating_mul(r.into())) + // Minimum execution time: 242_995_000 picoseconds. + Weight::from_parts(240_061_456, 6741) + // Standard Error: 2_650 + .saturating_add(Weight::from_parts(326_813, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2588,10 +2631,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `790 + r * (6 ±0)` // Estimated: `6739 + r * (6 ±0)` - // Minimum execution time: 236_690_000 picoseconds. - Weight::from_parts(241_743_164, 6739) - // Standard Error: 333 - .saturating_add(Weight::from_parts(324_693, 0).saturating_mul(r.into())) + // Minimum execution time: 241_342_000 picoseconds. + Weight::from_parts(240_875_314, 6739) + // Standard Error: 669 + .saturating_add(Weight::from_parts(324_519, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2611,10 +2654,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787 + r * (6 ±0)` // Estimated: `6737 + r * (6 ±0)` - // Minimum execution time: 236_149_000 picoseconds. - Weight::from_parts(239_090_707, 6737) - // Standard Error: 246 - .saturating_add(Weight::from_parts(344_488, 0).saturating_mul(r.into())) + // Minimum execution time: 238_954_000 picoseconds. + Weight::from_parts(242_269_896, 6737) + // Standard Error: 1_453 + .saturating_add(Weight::from_parts(317_998, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2634,10 +2677,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (6 ±0)` // Estimated: `6723 + r * (6 ±0)` - // Minimum execution time: 235_057_000 picoseconds. - Weight::from_parts(237_752_870, 6723) - // Standard Error: 236 - .saturating_add(Weight::from_parts(328_235, 0).saturating_mul(r.into())) + // Minimum execution time: 240_935_000 picoseconds. + Weight::from_parts(242_938_271, 6723) + // Standard Error: 792 + .saturating_add(Weight::from_parts(316_782, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2657,15 +2700,15 @@ impl WeightInfo for () { /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `856 + r * (10 ±0)` - // Estimated: `6796 + r * (10 ±0)` - // Minimum execution time: 234_995_000 picoseconds. - Weight::from_parts(246_473_554, 6796) - // Standard Error: 1_015 - .saturating_add(Weight::from_parts(1_337_653, 0).saturating_mul(r.into())) + // Measured: `852 + r * (14 ±0)` + // Estimated: `6785 + r * (14 ±0)` + // Minimum execution time: 240_142_000 picoseconds. + Weight::from_parts(241_386_730, 6785) + // Standard Error: 2_116 + .saturating_add(Weight::from_parts(1_387_202, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) - .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) @@ -2682,10 +2725,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `745 + r * (4 ±0)` // Estimated: `6687 + r * (4 ±0)` - // Minimum execution time: 160_445_000 picoseconds. - Weight::from_parts(165_558_135, 6687) - // Standard Error: 234 - .saturating_add(Weight::from_parts(133_607, 0).saturating_mul(r.into())) + // Minimum execution time: 165_617_000 picoseconds. + Weight::from_parts(170_794_127, 6687) + // Standard Error: 209 + .saturating_add(Weight::from_parts(127_931, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(r.into())) @@ -2705,10 +2748,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `780 + r * (6 ±0)` // Estimated: `6724 + r * (6 ±0)` - // Minimum execution time: 235_065_000 picoseconds. - Weight::from_parts(237_797_177, 6724) - // Standard Error: 336 - .saturating_add(Weight::from_parts(267_302, 0).saturating_mul(r.into())) + // Minimum execution time: 238_832_000 picoseconds. + Weight::from_parts(237_110_694, 6724) + // Standard Error: 539 + .saturating_add(Weight::from_parts(280_610, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) @@ -2728,10 +2771,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `784` // Estimated: `6724` - // Minimum execution time: 236_215_000 picoseconds. - Weight::from_parts(239_347_313, 6724) - // Standard Error: 0 - .saturating_add(Weight::from_parts(587, 0).saturating_mul(n.into())) + // Minimum execution time: 241_070_000 picoseconds. + Weight::from_parts(242_162_279, 6724) + // Standard Error: 1 + .saturating_add(Weight::from_parts(595, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2750,10 +2793,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `768 + r * (45 ±0)` // Estimated: `6708 + r * (45 ±0)` - // Minimum execution time: 231_571_000 picoseconds. - Weight::from_parts(233_477_918, 6708) - // Standard Error: 95_776 - .saturating_add(Weight::from_parts(1_733_181, 0).saturating_mul(r.into())) + // Minimum execution time: 236_337_000 picoseconds. + Weight::from_parts(238_883_828, 6708) + // Standard Error: 188_978 + .saturating_add(Weight::from_parts(926_671, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) @@ -2773,10 +2816,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778` // Estimated: `6731` - // Minimum execution time: 234_956_000 picoseconds. - Weight::from_parts(236_785_051, 6731) + // Minimum execution time: 239_103_000 picoseconds. + Weight::from_parts(240_382_910, 6731) // Standard Error: 0 - .saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(181, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2801,10 +2844,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `810 + r * (356 ±0)` // Estimated: `6750 + r * (7781 ±0)` - // Minimum execution time: 234_275_000 picoseconds. - Weight::from_parts(236_776_769, 6750) - // Standard Error: 137_203 - .saturating_add(Weight::from_parts(110_758_930, 0).saturating_mul(r.into())) + // Minimum execution time: 238_739_000 picoseconds. + Weight::from_parts(241_041_330, 6750) + // Standard Error: 176_820 + .saturating_add(Weight::from_parts(115_332_869, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2828,10 +2871,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `825 + r * (10 ±0)` // Estimated: `6769 + r * (10 ±0)` - // Minimum execution time: 235_593_000 picoseconds. - Weight::from_parts(253_731_242, 6769) - // Standard Error: 2_129 - .saturating_add(Weight::from_parts(1_771_297, 0).saturating_mul(r.into())) + // Minimum execution time: 240_888_000 picoseconds. + Weight::from_parts(259_901_113, 6769) + // Standard Error: 5_935 + .saturating_add(Weight::from_parts(1_764_269, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -2851,10 +2894,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `778 + r * (10 ±0)` // Estimated: `6723 + r * (10 ±0)` - // Minimum execution time: 232_124_000 picoseconds. - Weight::from_parts(245_904_447, 6723) - // Standard Error: 2_185 - .saturating_add(Weight::from_parts(3_470_410, 0).saturating_mul(r.into())) + // Minimum execution time: 237_478_000 picoseconds. + Weight::from_parts(264_915_436, 6723) + // Standard Error: 4_644 + .saturating_add(Weight::from_parts(3_452_918, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) @@ -2875,12 +2918,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `797 + t * (32 ±0)` // Estimated: `6744 + t * (2508 ±0)` - // Minimum execution time: 250_301_000 picoseconds. - Weight::from_parts(245_292_258, 6744) - // Standard Error: 29_864 - .saturating_add(Weight::from_parts(2_163_531, 0).saturating_mul(t.into())) - // Standard Error: 8 - .saturating_add(Weight::from_parts(583, 0).saturating_mul(n.into())) + // Minimum execution time: 255_720_000 picoseconds. + Weight::from_parts(247_945_758, 6744) + // Standard Error: 73_390 + .saturating_add(Weight::from_parts(2_483_239, 0).saturating_mul(t.into())) + // Standard Error: 20 + .saturating_add(Weight::from_parts(756, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2902,10 +2945,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (7 ±0)` // Estimated: `6721 + r * (7 ±0)` - // Minimum execution time: 165_711_000 picoseconds. - Weight::from_parts(168_792_571, 6721) - // Standard Error: 216 - .saturating_add(Weight::from_parts(230_285, 0).saturating_mul(r.into())) + // Minimum execution time: 172_214_000 picoseconds. + Weight::from_parts(177_306_567, 6721) + // Standard Error: 839 + .saturating_add(Weight::from_parts(230_558, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) @@ -2925,10 +2968,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `125728` // Estimated: `131670` - // Minimum execution time: 348_928_000 picoseconds. - Weight::from_parts(352_224_793, 131670) - // Standard Error: 0 - .saturating_add(Weight::from_parts(731, 0).saturating_mul(i.into())) + // Minimum execution time: 354_105_000 picoseconds. + Weight::from_parts(360_649_854, 131670) + // Standard Error: 2 + .saturating_add(Weight::from_parts(737, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -2939,10 +2982,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `845 + r * (292 ±0)` // Estimated: `843 + r * (293 ±0)` - // Minimum execution time: 236_418_000 picoseconds. - Weight::from_parts(129_862_840, 843) - // Standard Error: 9_733 - .saturating_add(Weight::from_parts(6_005_187, 0).saturating_mul(r.into())) + // Minimum execution time: 239_637_000 picoseconds. + Weight::from_parts(136_431_436, 843) + // Standard Error: 10_238 + .saturating_add(Weight::from_parts(6_070_221, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -2956,10 +2999,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1304` // Estimated: `1280` - // Minimum execution time: 251_599_000 picoseconds. - Weight::from_parts(285_284_665, 1280) - // Standard Error: 46 - .saturating_add(Weight::from_parts(410, 0).saturating_mul(n.into())) + // Minimum execution time: 256_198_000 picoseconds. + Weight::from_parts(289_972_802, 1280) + // Standard Error: 54 + .saturating_add(Weight::from_parts(438, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().writes(6_u64)) } @@ -2970,10 +3013,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1167 + n * (1 ±0)` // Estimated: `1167 + n * (1 ±0)` - // Minimum execution time: 251_309_000 picoseconds. - Weight::from_parts(253_555_552, 1167) - // Standard Error: 9 - .saturating_add(Weight::from_parts(27, 0).saturating_mul(n.into())) + // Minimum execution time: 255_519_000 picoseconds. + Weight::from_parts(257_668_217, 1167) + // Standard Error: 19 + .saturating_add(Weight::from_parts(105, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -2985,10 +3028,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `841 + r * (288 ±0)` // Estimated: `845 + r * (289 ±0)` - // Minimum execution time: 235_441_000 picoseconds. - Weight::from_parts(132_980_942, 845) - // Standard Error: 9_421 - .saturating_add(Weight::from_parts(5_854_896, 0).saturating_mul(r.into())) + // Minimum execution time: 239_461_000 picoseconds. + Weight::from_parts(131_630_528, 845) + // Standard Error: 10_483 + .saturating_add(Weight::from_parts(5_910_066, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3002,10 +3045,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1163 + n * (1 ±0)` // Estimated: `1163 + n * (1 ±0)` - // Minimum execution time: 249_967_000 picoseconds. - Weight::from_parts(252_122_186, 1163) - // Standard Error: 10 - .saturating_add(Weight::from_parts(74, 0).saturating_mul(n.into())) + // Minimum execution time: 254_904_000 picoseconds. + Weight::from_parts(261_213_399, 1163) + // Standard Error: 178 + .saturating_add(Weight::from_parts(125, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3017,10 +3060,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `835 + r * (296 ±0)` // Estimated: `840 + r * (297 ±0)` - // Minimum execution time: 235_647_000 picoseconds. - Weight::from_parts(145_525_169, 840) - // Standard Error: 8_553 - .saturating_add(Weight::from_parts(4_948_021, 0).saturating_mul(r.into())) + // Minimum execution time: 239_995_000 picoseconds. + Weight::from_parts(151_326_508, 840) + // Standard Error: 8_960 + .saturating_add(Weight::from_parts(4_937_728, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3033,10 +3076,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1179 + n * (1 ±0)` // Estimated: `1179 + n * (1 ±0)` - // Minimum execution time: 249_576_000 picoseconds. - Weight::from_parts(250_747_191, 1179) - // Standard Error: 8 - .saturating_add(Weight::from_parts(717, 0).saturating_mul(n.into())) + // Minimum execution time: 254_515_000 picoseconds. + Weight::from_parts(256_728_817, 1179) + // Standard Error: 22 + .saturating_add(Weight::from_parts(706, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3048,10 +3091,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `856 + r * (288 ±0)` // Estimated: `857 + r * (289 ±0)` - // Minimum execution time: 236_110_000 picoseconds. - Weight::from_parts(148_420_625, 857) - // Standard Error: 8_175 - .saturating_add(Weight::from_parts(4_684_126, 0).saturating_mul(r.into())) + // Minimum execution time: 240_601_000 picoseconds. + Weight::from_parts(154_476_561, 857) + // Standard Error: 8_872 + .saturating_add(Weight::from_parts(4_805_043, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3064,10 +3107,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1166 + n * (1 ±0)` // Estimated: `1166 + n * (1 ±0)` - // Minimum execution time: 247_800_000 picoseconds. - Weight::from_parts(249_410_575, 1166) - // Standard Error: 6 - .saturating_add(Weight::from_parts(99, 0).saturating_mul(n.into())) + // Minimum execution time: 253_654_000 picoseconds. + Weight::from_parts(257_288_586, 1166) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3079,10 +3120,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `829 + r * (296 ±0)` // Estimated: `836 + r * (297 ±0)` - // Minimum execution time: 235_251_000 picoseconds. - Weight::from_parts(128_816_707, 836) - // Standard Error: 9_887 - .saturating_add(Weight::from_parts(6_167_176, 0).saturating_mul(r.into())) + // Minimum execution time: 239_869_000 picoseconds. + Weight::from_parts(135_258_204, 836) + // Standard Error: 10_378 + .saturating_add(Weight::from_parts(6_144_770, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3096,10 +3137,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1180 + n * (1 ±0)` // Estimated: `1180 + n * (1 ±0)` - // Minimum execution time: 250_401_000 picoseconds. - Weight::from_parts(253_298_243, 1180) - // Standard Error: 9 - .saturating_add(Weight::from_parts(667, 0).saturating_mul(n.into())) + // Minimum execution time: 258_153_000 picoseconds. + Weight::from_parts(260_068_186, 1180) + // Standard Error: 25 + .saturating_add(Weight::from_parts(744, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3119,10 +3160,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1373 + r * (45 ±0)` // Estimated: `7270 + r * (2520 ±0)` - // Minimum execution time: 236_470_000 picoseconds. - Weight::from_parts(98_898_727, 7270) - // Standard Error: 33_316 - .saturating_add(Weight::from_parts(35_149_946, 0).saturating_mul(r.into())) + // Minimum execution time: 243_189_000 picoseconds. + Weight::from_parts(243_465_000, 7270) + // Standard Error: 30_961 + .saturating_add(Weight::from_parts(35_376_623, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(4_u64)) @@ -3137,22 +3178,22 @@ impl WeightInfo for () { /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:802 w:802) + /// Storage: System EventTopics (r:803 w:803) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1237 + r * (256 ±0)` - // Estimated: `7125 + r * (2732 ±0)` - // Minimum execution time: 238_303_000 picoseconds. - Weight::from_parts(239_024_000, 7125) - // Standard Error: 65_907 - .saturating_add(Weight::from_parts(209_419_071, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(7_u64)) + // Measured: `1140 + r * (276 ±0)` + // Estimated: `9332 + r * (2752 ±0)` + // Minimum execution time: 243_656_000 picoseconds. + Weight::from_parts(244_221_000, 9332) + // Standard Error: 69_762 + .saturating_add(Weight::from_parts(216_905_619, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) - .saturating_add(RocksDbWeight::get().writes(3_u64)) + .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2732).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2752).saturating_mul(r.into())) } /// Storage: System Account (r:1 w:0) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: Measured) @@ -3169,10 +3210,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0 + r * (502 ±0)` // Estimated: `6727 + r * (2572 ±10)` - // Minimum execution time: 235_961_000 picoseconds. - Weight::from_parts(236_939_000, 6727) - // Standard Error: 83_087 - .saturating_add(Weight::from_parts(205_646_517, 0).saturating_mul(r.into())) + // Minimum execution time: 242_632_000 picoseconds. + Weight::from_parts(243_068_000, 6727) + // Standard Error: 126_218 + .saturating_add(Weight::from_parts(213_096_291, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3187,23 +3228,23 @@ impl WeightInfo for () { /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Measured) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Measured) - /// Storage: System EventTopics (r:3 w:3) + /// Storage: System EventTopics (r:4 w:4) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) /// The range of component `t` is `[0, 1]`. /// The range of component `c` is `[0, 1048576]`. fn seal_call_per_transfer_clone_byte(t: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1154 + t * (204 ±0)` - // Estimated: `9569 + t * (5154 ±0)` - // Minimum execution time: 410_156_000 picoseconds. - Weight::from_parts(378_378_143, 9569) - // Standard Error: 285_172 - .saturating_add(Weight::from_parts(34_736_740, 0).saturating_mul(t.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(591, 0).saturating_mul(c.into())) - .saturating_add(RocksDbWeight::get().reads(9_u64)) + // Estimated: `12044 + t * (5154 ±0)` + // Minimum execution time: 421_691_000 picoseconds. + Weight::from_parts(394_587_369, 12044) + // Standard Error: 1_104_014 + .saturating_add(Weight::from_parts(30_461_758, 0).saturating_mul(t.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(601, 0).saturating_mul(c.into())) + .saturating_add(RocksDbWeight::get().reads(10_u64)) .saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(t.into()))) - .saturating_add(RocksDbWeight::get().writes(5_u64)) + .saturating_add(RocksDbWeight::get().writes(6_u64)) .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(t.into()))) .saturating_add(Weight::from_parts(0, 5154).saturating_mul(t.into())) } @@ -3221,15 +3262,15 @@ impl WeightInfo for () { /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Measured) /// Storage: System EventTopics (r:802 w:802) /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// The range of component `r` is `[0, 800]`. + /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1301 + r * (254 ±0)` - // Estimated: `7131 + r * (5205 ±0)` - // Minimum execution time: 236_748_000 picoseconds. - Weight::from_parts(237_129_000, 7131) - // Standard Error: 280_059 - .saturating_add(Weight::from_parts(341_428_013, 0).saturating_mul(r.into())) + // Measured: `1322 + r * (254 ±0)` + // Estimated: `7146 + r * (5205 ±0)` + // Minimum execution time: 581_252_000 picoseconds. + Weight::from_parts(582_275_000, 7146) + // Standard Error: 279_771 + .saturating_add(Weight::from_parts(349_770_967, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(8_u64)) .saturating_add(RocksDbWeight::get().reads((6_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(6_u64)) @@ -3257,14 +3298,14 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1071 + t * (187 ±0)` // Estimated: `9492 + t * (2634 ±2)` - // Minimum execution time: 1_613_796_000 picoseconds. - Weight::from_parts(340_002_206, 9492) - // Standard Error: 4_296_381 - .saturating_add(Weight::from_parts(115_239_834, 0).saturating_mul(t.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_145, 0).saturating_mul(i.into())) - // Standard Error: 6 - .saturating_add(Weight::from_parts(1_315, 0).saturating_mul(s.into())) + // Minimum execution time: 1_623_241_000 picoseconds. + Weight::from_parts(317_076_173, 9492) + // Standard Error: 4_549_416 + .saturating_add(Weight::from_parts(125_360_446, 0).saturating_mul(t.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_183, 0).saturating_mul(i.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_352, 0).saturating_mul(s.into())) .saturating_add(RocksDbWeight::get().reads(13_u64)) .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(t.into()))) .saturating_add(RocksDbWeight::get().writes(10_u64)) @@ -3286,10 +3327,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `777 + r * (8 ±0)` // Estimated: `6718 + r * (8 ±0)` - // Minimum execution time: 233_111_000 picoseconds. - Weight::from_parts(238_643_933, 6718) - // Standard Error: 184 - .saturating_add(Weight::from_parts(572_296, 0).saturating_mul(r.into())) + // Minimum execution time: 238_262_000 picoseconds. + Weight::from_parts(243_093_288, 6718) + // Standard Error: 870 + .saturating_add(Weight::from_parts(573_939, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3309,10 +3350,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `785` // Estimated: `6725` - // Minimum execution time: 234_746_000 picoseconds. - Weight::from_parts(229_815_552, 6725) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_892, 0).saturating_mul(n.into())) + // Minimum execution time: 239_888_000 picoseconds. + Weight::from_parts(242_849_333, 6725) + // Standard Error: 3 + .saturating_add(Weight::from_parts(3_949, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3331,10 +3372,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6721 + r * (8 ±0)` - // Minimum execution time: 232_732_000 picoseconds. - Weight::from_parts(239_007_209, 6721) - // Standard Error: 256 - .saturating_add(Weight::from_parts(733_879, 0).saturating_mul(r.into())) + // Minimum execution time: 237_288_000 picoseconds. + Weight::from_parts(242_510_631, 6721) + // Standard Error: 977 + .saturating_add(Weight::from_parts(742_726, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3354,10 +3395,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6729` - // Minimum execution time: 234_184_000 picoseconds. - Weight::from_parts(227_603_375, 6729) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_127, 0).saturating_mul(n.into())) + // Minimum execution time: 240_006_000 picoseconds. + Weight::from_parts(233_802_510, 6729) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_161, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3376,10 +3417,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6724 + r * (8 ±0)` - // Minimum execution time: 233_038_000 picoseconds. - Weight::from_parts(238_515_817, 6724) - // Standard Error: 255 - .saturating_add(Weight::from_parts(413_343, 0).saturating_mul(r.into())) + // Minimum execution time: 237_532_000 picoseconds. + Weight::from_parts(243_087_565, 6724) + // Standard Error: 656 + .saturating_add(Weight::from_parts(417_850, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3399,10 +3440,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6733` - // Minimum execution time: 232_996_000 picoseconds. - Weight::from_parts(226_706_997, 6733) + // Minimum execution time: 241_429_000 picoseconds. + Weight::from_parts(233_528_258, 6733) // Standard Error: 1 - .saturating_add(Weight::from_parts(908, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(913, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3421,10 +3462,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `779 + r * (8 ±0)` // Estimated: `6725 + r * (8 ±0)` - // Minimum execution time: 232_292_000 picoseconds. - Weight::from_parts(237_997_001, 6725) - // Standard Error: 219 - .saturating_add(Weight::from_parts(410_177, 0).saturating_mul(r.into())) + // Minimum execution time: 237_622_000 picoseconds. + Weight::from_parts(240_476_401, 6725) + // Standard Error: 795 + .saturating_add(Weight::from_parts(416_869, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) @@ -3444,10 +3485,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `787` // Estimated: `6727` - // Minimum execution time: 234_815_000 picoseconds. - Weight::from_parts(226_317_150, 6727) - // Standard Error: 1 - .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into())) + // Minimum execution time: 241_134_000 picoseconds. + Weight::from_parts(234_043_271, 6727) + // Standard Error: 3 + .saturating_add(Weight::from_parts(919, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) } @@ -3465,11 +3506,11 @@ impl WeightInfo for () { fn seal_sr25519_verify_per_byte(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `912 + n * (1 ±0)` - // Estimated: `6848 + n * (1 ±0)` - // Minimum execution time: 286_323_000 picoseconds. - Weight::from_parts(290_287_955, 6848) - // Standard Error: 1 - .saturating_add(Weight::from_parts(4_693, 0).saturating_mul(n.into())) + // Estimated: `6849 + n * (1 ±0)` + // Minimum execution time: 292_699_000 picoseconds. + Weight::from_parts(301_523_608, 6849) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_676, 0).saturating_mul(n.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) @@ -3489,10 +3530,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `727 + r * (112 ±0)` // Estimated: `6666 + r * (112 ±0)` - // Minimum execution time: 235_938_000 picoseconds. - Weight::from_parts(242_728_358, 6666) - // Standard Error: 9_725 - .saturating_add(Weight::from_parts(47_527_740, 0).saturating_mul(r.into())) + // Minimum execution time: 241_126_000 picoseconds. + Weight::from_parts(248_796_458, 6666) + // Standard Error: 21_501 + .saturating_add(Weight::from_parts(48_091_265, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) @@ -3511,11 +3552,11 @@ impl WeightInfo for () { fn seal_ecdsa_recover(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `822 + r * (76 ±0)` - // Estimated: `6716 + r * (77 ±0)` - // Minimum execution time: 236_108_000 picoseconds. - Weight::from_parts(248_577_226, 6716) - // Standard Error: 9_565 - .saturating_add(Weight::from_parts(36_733_552, 0).saturating_mul(r.into())) + // Estimated: `6717 + r * (77 ±0)` + // Minimum execution time: 242_379_000 picoseconds. + Weight::from_parts(261_355_525, 6717) + // Standard Error: 18_862 + .saturating_add(Weight::from_parts(37_603_073, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) @@ -3535,10 +3576,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `792 + r * (42 ±0)` // Estimated: `6731 + r * (42 ±0)` - // Minimum execution time: 236_440_000 picoseconds. - Weight::from_parts(240_771_418, 6731) - // Standard Error: 1_849 - .saturating_add(Weight::from_parts(9_185_896, 0).saturating_mul(r.into())) + // Minimum execution time: 241_270_000 picoseconds. + Weight::from_parts(245_135_291, 6731) + // Standard Error: 10_757 + .saturating_add(Weight::from_parts(9_344_876, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) @@ -3559,11 +3600,11 @@ impl WeightInfo for () { fn seal_set_code_hash(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + r * (964 ±0)` - // Estimated: `8190 + r * (3090 ±10)` - // Minimum execution time: 235_056_000 picoseconds. - Weight::from_parts(235_743_000, 8190) - // Standard Error: 46_122 - .saturating_add(Weight::from_parts(21_447_984, 0).saturating_mul(r.into())) + // Estimated: `8190 + r * (3090 ±7)` + // Minimum execution time: 240_506_000 picoseconds. + Weight::from_parts(241_653_000, 8190) + // Standard Error: 46_785 + .saturating_add(Weight::from_parts(22_107_816, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(r.into()))) .saturating_add(RocksDbWeight::get().writes(3_u64)) @@ -3585,10 +3626,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `773 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 235_213_000 picoseconds. - Weight::from_parts(239_456_464, 6723) - // Standard Error: 130 - .saturating_add(Weight::from_parts(159_851, 0).saturating_mul(r.into())) + // Minimum execution time: 241_539_000 picoseconds. + Weight::from_parts(245_471_045, 6723) + // Standard Error: 416 + .saturating_add(Weight::from_parts(159_577, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3608,10 +3649,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `1975 + r * (39 ±0)` // Estimated: `7805 + r * (40 ±0)` - // Minimum execution time: 237_886_000 picoseconds. - Weight::from_parts(262_430_157, 7805) - // Standard Error: 939 - .saturating_add(Weight::from_parts(260_005, 0).saturating_mul(r.into())) + // Minimum execution time: 242_702_000 picoseconds. + Weight::from_parts(274_518_595, 7805) + // Standard Error: 1_138 + .saturating_add(Weight::from_parts(256_973, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(6_u64)) .saturating_add(RocksDbWeight::get().writes(3_u64)) .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) @@ -3633,10 +3674,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `776 + r * (3 ±0)` // Estimated: `6723 + r * (3 ±0)` - // Minimum execution time: 234_014_000 picoseconds. - Weight::from_parts(240_042_671, 6723) - // Standard Error: 152 - .saturating_add(Weight::from_parts(138_382, 0).saturating_mul(r.into())) + // Minimum execution time: 239_360_000 picoseconds. + Weight::from_parts(245_990_810, 6723) + // Standard Error: 3_188 + .saturating_add(Weight::from_parts(143_408, 0).saturating_mul(r.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) @@ -3646,509 +3687,509 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_846_015, 0) + // Minimum execution time: 1_617_000 picoseconds. + Weight::from_parts(1_900_268, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(2_935, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(2_950, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64load(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(2_197_197, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_335, 0).saturating_mul(r.into())) + // Minimum execution time: 1_739_000 picoseconds. + Weight::from_parts(2_109_373, 0) + // Standard Error: 43 + .saturating_add(Weight::from_parts(6_586, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64store(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_665_000 picoseconds. - Weight::from_parts(2_200_545, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(6_011, 0).saturating_mul(r.into())) + // Minimum execution time: 1_726_000 picoseconds. + Weight::from_parts(2_268_507, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_022, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_select(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_545_000 picoseconds. - Weight::from_parts(1_977_462, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(7_901, 0).saturating_mul(r.into())) + // Minimum execution time: 1_628_000 picoseconds. + Weight::from_parts(2_042_521, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(7_935, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_515_000 picoseconds. - Weight::from_parts(1_866_184, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_514, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(1_902_691, 0) + // Standard Error: 7 + .saturating_add(Weight::from_parts(10_572, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_618_000 picoseconds. - Weight::from_parts(1_895_104, 0) - // Standard Error: 12 - .saturating_add(Weight::from_parts(4_523, 0).saturating_mul(r.into())) + // Minimum execution time: 1_626_000 picoseconds. + Weight::from_parts(1_891_843, 0) + // Standard Error: 14 + .saturating_add(Weight::from_parts(4_612, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_if(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_510_000 picoseconds. - Weight::from_parts(1_779_998, 0) - // Standard Error: 8 - .saturating_add(Weight::from_parts(6_832, 0).saturating_mul(r.into())) + // Minimum execution time: 1_581_000 picoseconds. + Weight::from_parts(1_139_823, 0) + // Standard Error: 74 + .saturating_add(Weight::from_parts(8_008, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_br_table(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_726_996, 0) - // Standard Error: 26 - .saturating_add(Weight::from_parts(9_199, 0).saturating_mul(r.into())) + // Minimum execution time: 1_591_000 picoseconds. + Weight::from_parts(1_258_400, 0) + // Standard Error: 34 + .saturating_add(Weight::from_parts(9_706, 0).saturating_mul(r.into())) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_682_000 picoseconds. - Weight::from_parts(1_789_910, 0) - // Standard Error: 16 - .saturating_add(Weight::from_parts(42, 0).saturating_mul(e.into())) + // Minimum execution time: 1_701_000 picoseconds. + Weight::from_parts(1_876_118, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(4, 0).saturating_mul(e.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_539_000 picoseconds. - Weight::from_parts(2_093_056, 0) - // Standard Error: 27 - .saturating_add(Weight::from_parts(18_917, 0).saturating_mul(r.into())) + // Minimum execution time: 1_617_000 picoseconds. + Weight::from_parts(1_565_613, 0) + // Standard Error: 629 + .saturating_add(Weight::from_parts(19_575, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_call_indirect(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_851_000 picoseconds. - Weight::from_parts(3_134_610, 0) - // Standard Error: 34 - .saturating_add(Weight::from_parts(24_714, 0).saturating_mul(r.into())) + // Minimum execution time: 1_875_000 picoseconds. + Weight::from_parts(4_549_584, 0) + // Standard Error: 278 + .saturating_add(Weight::from_parts(24_336, 0).saturating_mul(r.into())) } /// The range of component `l` is `[0, 1024]`. fn instr_call_per_local(l: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_654_000 picoseconds. - Weight::from_parts(1_885_921, 0) - // Standard Error: 14 - .saturating_add(Weight::from_parts(1_243, 0).saturating_mul(l.into())) + // Minimum execution time: 1_742_000 picoseconds. + Weight::from_parts(2_087_387, 0) + // Standard Error: 26 + .saturating_add(Weight::from_parts(1_041, 0).saturating_mul(l.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_744_000 picoseconds. - Weight::from_parts(3_014_725, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(2_447, 0).saturating_mul(r.into())) + // Minimum execution time: 2_861_000 picoseconds. + Weight::from_parts(3_552_428, 0) + // Standard Error: 23 + .saturating_add(Weight::from_parts(2_339, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_881_000 picoseconds. - Weight::from_parts(3_137_711, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_608, 0).saturating_mul(r.into())) + // Minimum execution time: 2_866_000 picoseconds. + Weight::from_parts(3_151_948, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(3_667, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_local_tee(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_809_000 picoseconds. - Weight::from_parts(3_142_066, 0) - // Standard Error: 3 - .saturating_add(Weight::from_parts(3_841, 0).saturating_mul(r.into())) + // Minimum execution time: 2_919_000 picoseconds. + Weight::from_parts(3_214_587, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(3_867, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_get(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_704_000 picoseconds. - Weight::from_parts(2_083_619, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(8_366, 0).saturating_mul(r.into())) + // Minimum execution time: 1_764_000 picoseconds. + Weight::from_parts(1_815_683, 0) + // Standard Error: 123 + .saturating_add(Weight::from_parts(8_733, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_global_set(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_652_000 picoseconds. - Weight::from_parts(2_048_256, 0) - // Standard Error: 5 - .saturating_add(Weight::from_parts(8_826, 0).saturating_mul(r.into())) + // Minimum execution time: 1_783_000 picoseconds. + Weight::from_parts(2_437_152, 0) + // Standard Error: 13 + .saturating_add(Weight::from_parts(8_839, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_memory_current(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_671_000 picoseconds. - Weight::from_parts(1_924_626, 0) - // Standard Error: 1 - .saturating_add(Weight::from_parts(3_746, 0).saturating_mul(r.into())) + // Minimum execution time: 1_745_000 picoseconds. + Weight::from_parts(2_018_078, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(3_756, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 16]`. fn instr_memory_grow(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_585_000 picoseconds. - Weight::from_parts(490_856, 0) - // Standard Error: 133_673 - .saturating_add(Weight::from_parts(13_182_582, 0).saturating_mul(r.into())) + // Minimum execution time: 1_648_000 picoseconds. + Weight::from_parts(648_059, 0) + // Standard Error: 142_299 + .saturating_add(Weight::from_parts(13_313_060, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64clz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_533_000 picoseconds. - Weight::from_parts(1_851_563, 0) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_953_179, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_820, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_828, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ctz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_564_000 picoseconds. - Weight::from_parts(1_914_178, 0) + // Minimum execution time: 1_607_000 picoseconds. + Weight::from_parts(1_924_759, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_732, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_762, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64popcnt(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_559_000 picoseconds. - Weight::from_parts(1_886_992, 0) + // Minimum execution time: 1_687_000 picoseconds. + Weight::from_parts(1_959_683, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_731, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_754, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eqz(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_553_000 picoseconds. - Weight::from_parts(1_886_545, 0) + // Minimum execution time: 1_641_000 picoseconds. + Weight::from_parts(1_975_838, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_658, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_681, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendsi32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_853_647, 0) + // Minimum execution time: 1_689_000 picoseconds. + Weight::from_parts(1_980_109, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_852, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_880, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64extendui32(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_554_000 picoseconds. - Weight::from_parts(1_868_877, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(3_806, 0).saturating_mul(r.into())) + // Minimum execution time: 1_671_000 picoseconds. + Weight::from_parts(1_912_089, 0) + // Standard Error: 29 + .saturating_add(Weight::from_parts(3_896, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i32wrapi64(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_514_000 picoseconds. - Weight::from_parts(1_882_233, 0) + // Minimum execution time: 1_643_000 picoseconds. + Weight::from_parts(1_951_485, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(3_700, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(3_725, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64eq(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_529_000 picoseconds. - Weight::from_parts(1_897_247, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_955, 0).saturating_mul(r.into())) + // Minimum execution time: 1_649_000 picoseconds. + Weight::from_parts(1_937_598, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(6_045, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ne(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_922_333, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_933, 0).saturating_mul(r.into())) + // Minimum execution time: 1_651_000 picoseconds. + Weight::from_parts(2_202_977, 0) + // Standard Error: 313 + .saturating_add(Weight::from_parts(6_299, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64lts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_512_000 picoseconds. - Weight::from_parts(1_848_668, 0) + // Minimum execution time: 1_589_000 picoseconds. + Weight::from_parts(1_946_304, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_966, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_019, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ltu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_522_000 picoseconds. - Weight::from_parts(1_875_257, 0) + // Minimum execution time: 1_614_000 picoseconds. + Weight::from_parts(1_933_375, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_965, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(6_020, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gts(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_546_000 picoseconds. - Weight::from_parts(1_836_691, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(5_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_678_000 picoseconds. + Weight::from_parts(2_003_850, 0) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64gtu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_505_000 picoseconds. - Weight::from_parts(1_907_551, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_075, 0).saturating_mul(r.into())) + // Minimum execution time: 1_651_000 picoseconds. + Weight::from_parts(1_971_321, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_114, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64les(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_891_008, 0) + // Minimum execution time: 1_647_000 picoseconds. + Weight::from_parts(2_017_232, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_971, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_990, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64leu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_556_000 picoseconds. - Weight::from_parts(1_910_864, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_059, 0).saturating_mul(r.into())) + // Minimum execution time: 1_635_000 picoseconds. + Weight::from_parts(3_232_848, 0) + // Standard Error: 105 + .saturating_add(Weight::from_parts(5_816, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64ges(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_544_000 picoseconds. - Weight::from_parts(1_912_650, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_943, 0).saturating_mul(r.into())) + // Minimum execution time: 1_623_000 picoseconds. + Weight::from_parts(1_996_165, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_964, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64geu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_855_260, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_975, 0).saturating_mul(r.into())) + // Minimum execution time: 1_668_000 picoseconds. + Weight::from_parts(1_973_238, 0) + // Standard Error: 20 + .saturating_add(Weight::from_parts(6_021, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64add(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_521_000 picoseconds. - Weight::from_parts(1_867_259, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_846, 0).saturating_mul(r.into())) + // Minimum execution time: 1_674_000 picoseconds. + Weight::from_parts(1_981_762, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_898, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64sub(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_509_000 picoseconds. - Weight::from_parts(1_893_018, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_096, 0).saturating_mul(r.into())) + // Minimum execution time: 1_632_000 picoseconds. + Weight::from_parts(1_935_700, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_154, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64mul(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_496_000 picoseconds. - Weight::from_parts(1_886_659, 0) + // Minimum execution time: 1_607_000 picoseconds. + Weight::from_parts(1_942_734, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_754, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_797, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_527_000 picoseconds. - Weight::from_parts(1_890_548, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(11_842, 0).saturating_mul(r.into())) + // Minimum execution time: 1_611_000 picoseconds. + Weight::from_parts(2_960_454, 0) + // Standard Error: 177 + .saturating_add(Weight::from_parts(11_666, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64divu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_518_000 picoseconds. - Weight::from_parts(1_891_903, 0) - // Standard Error: 4 - .saturating_add(Weight::from_parts(10_613, 0).saturating_mul(r.into())) + // Minimum execution time: 1_641_000 picoseconds. + Weight::from_parts(2_104_200, 0) + // Standard Error: 5 + .saturating_add(Weight::from_parts(10_540, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rems(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_504_000 picoseconds. - Weight::from_parts(1_632_694, 0) - // Standard Error: 7 - .saturating_add(Weight::from_parts(12_281, 0).saturating_mul(r.into())) + // Minimum execution time: 1_643_000 picoseconds. + Weight::from_parts(2_602_908, 0) + // Standard Error: 24 + .saturating_add(Weight::from_parts(11_900, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64remu(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_878_413, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(10_737, 0).saturating_mul(r.into())) + // Minimum execution time: 1_584_000 picoseconds. + Weight::from_parts(2_056_817, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(10_722, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64and(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_534_000 picoseconds. - Weight::from_parts(1_898_519, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_645, 0).saturating_mul(r.into())) + // Minimum execution time: 1_652_000 picoseconds. + Weight::from_parts(1_988_892, 0) + // Standard Error: 4 + .saturating_add(Weight::from_parts(5_683, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64or(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_503_000 picoseconds. - Weight::from_parts(1_895_532, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_745, 0).saturating_mul(r.into())) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(2_148_537, 0) + // Standard Error: 38 + .saturating_add(Weight::from_parts(5_756, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64xor(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_507_000 picoseconds. - Weight::from_parts(1_868_720, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_873, 0).saturating_mul(r.into())) + // Minimum execution time: 1_629_000 picoseconds. + Weight::from_parts(1_955_010, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(5_931, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_513_000 picoseconds. - Weight::from_parts(1_894_207, 0) + // Minimum execution time: 1_569_000 picoseconds. + Weight::from_parts(1_982_403, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_843, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_867, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shrs(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_473_000 picoseconds. - Weight::from_parts(1_880_224, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(6_107, 0).saturating_mul(r.into())) + // Minimum execution time: 1_615_000 picoseconds. + Weight::from_parts(1_989_920, 0) + // Standard Error: 3 + .saturating_add(Weight::from_parts(6_137, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64shru(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_447_000 picoseconds. - Weight::from_parts(1_884_551, 0) + // Minimum execution time: 1_646_000 picoseconds. + Weight::from_parts(2_020_935, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_849, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_863, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotl(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_908_813, 0) - // Standard Error: 2 - .saturating_add(Weight::from_parts(5_987, 0).saturating_mul(r.into())) + // Minimum execution time: 1_661_000 picoseconds. + Weight::from_parts(2_320_710, 0) + // Standard Error: 27 + .saturating_add(Weight::from_parts(5_922, 0).saturating_mul(r.into())) } /// The range of component `r` is `[0, 5000]`. fn instr_i64rotr(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_538_000 picoseconds. - Weight::from_parts(1_878_015, 0) + // Minimum execution time: 1_674_000 picoseconds. + Weight::from_parts(2_044_188, 0) // Standard Error: 2 - .saturating_add(Weight::from_parts(5_848, 0).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(5_855, 0).saturating_mul(r.into())) } } diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 0994dc21b31dd..e30146918a4a9 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -553,6 +553,8 @@ pub enum DispatchError { Corruption, /// Some resource (e.g. a preimage) is unavailable right now. This might fix itself later. Unavailable, + /// Root origin is not allowed. + RootNotAllowed, } /// Result of a `Dispatchable` which contains the `DispatchResult` and additional information about @@ -678,6 +680,7 @@ impl From for &'static str { Exhausted => "Resources exhausted", Corruption => "State corrupt", Unavailable => "Resource unavailable", + RootNotAllowed => "Root not allowed", } } } @@ -724,6 +727,7 @@ impl traits::Printable for DispatchError { Exhausted => "Resources exhausted".print(), Corruption => "State corrupt".print(), Unavailable => "Resource unavailable".print(), + RootNotAllowed => "Root not allowed".print(), } } }