diff --git a/substrate/bin/node/executor/tests/basic.rs b/substrate/bin/node/executor/tests/basic.rs index b384003187..1d49f6613d 100644 --- a/substrate/bin/node/executor/tests/basic.rs +++ b/substrate/bin/node/executor/tests/basic.rs @@ -588,7 +588,7 @@ fn deploying_wasm_contract_should_work() { &[], ); - let subsistence = pallet_contracts::ConfigCache::::subsistence_threshold_uncached(); + let subsistence = pallet_contracts::Module::::subsistence_threshold(); let b = construct_block( &mut new_test_ext(compact_code_unwrap(), false), diff --git a/substrate/frame/contracts/src/benchmarking/mod.rs b/substrate/frame/contracts/src/benchmarking/mod.rs index 2034a17e92..a5dcc40d71 100644 --- a/substrate/frame/contracts/src/benchmarking/mod.rs +++ b/substrate/frame/contracts/src/benchmarking/mod.rs @@ -1179,7 +1179,7 @@ benchmarks! { .collect::>(); let account_len = accounts.get(0).map(|i| i.encode().len()).unwrap_or(0); let account_bytes = accounts.iter().flat_map(|x| x.encode()).collect(); - let value = ConfigCache::::subsistence_threshold_uncached(); + let value = Contracts::::subsistence_threshold(); assert!(value > 0u32.into()); let value_bytes = value.encode(); let value_len = value_bytes.len(); diff --git a/substrate/frame/contracts/src/exec.rs b/substrate/frame/contracts/src/exec.rs index 5eddcc41a9..bbb972b2ed 100644 --- a/substrate/frame/contracts/src/exec.rs +++ b/substrate/frame/contracts/src/exec.rs @@ -16,7 +16,7 @@ // limitations under the License. use crate::{ - CodeHash, ConfigCache, Event, RawEvent, Config, Module as Contracts, + CodeHash, Event, RawEvent, Config, Module as Contracts, TrieId, BalanceOf, ContractInfo, gas::GasMeter, rent::Rent, storage::{self, Storage}, Error, ContractInfoOf, Schedule, }; @@ -28,7 +28,7 @@ use sp_std::{ use sp_runtime::traits::{Bounded, Zero, Convert, Saturating}; use frame_support::{ dispatch::{DispatchResult, DispatchError}, - traits::{ExistenceRequirement, Currency, Time, Randomness}, + traits::{ExistenceRequirement, Currency, Time, Randomness, Get}, weights::Weight, ensure, StorageMap, }; @@ -245,7 +245,7 @@ pub struct ExecutionContext<'a, T: Config + 'a, E> { pub self_account: T::AccountId, pub self_trie_id: Option, pub depth: usize, - pub config: &'a ConfigCache, + pub schedule: &'a Schedule, pub timestamp: MomentOf, pub block_number: T::BlockNumber, _phantom: PhantomData, @@ -261,13 +261,13 @@ where /// /// The specified `origin` address will be used as `sender` for. The `origin` must be a regular /// account (not a contract). - pub fn top_level(origin: T::AccountId, cfg: &'a ConfigCache) -> Self { + pub fn top_level(origin: T::AccountId, schedule: &'a Schedule) -> Self { ExecutionContext { caller: None, self_trie_id: None, self_account: origin, depth: 0, - config: &cfg, + schedule, timestamp: T::Time::now(), block_number: >::block_number(), _phantom: Default::default(), @@ -282,7 +282,7 @@ where self_trie_id: Some(trie_id), self_account: dest, depth: self.depth + 1, - config: self.config, + schedule: self.schedule, timestamp: self.timestamp.clone(), block_number: self.block_number.clone(), _phantom: Default::default(), @@ -297,7 +297,7 @@ where gas_meter: &mut GasMeter, input_data: Vec, ) -> ExecResult { - if self.depth == self.config.max_depth as usize { + if self.depth == T::MaxDepth::get() as usize { Err(Error::::MaxCallDepthReached)? } @@ -305,7 +305,7 @@ where .and_then(|contract| contract.get_alive()) .ok_or(Error::::NotCallable)?; - let executable = E::from_storage(contract.code_hash, &self.config.schedule)?; + let executable = E::from_storage(contract.code_hash, &self.schedule)?; // This charges the rent and denies access to a contract that is in need of // eviction by returning `None`. We cannot evict eagerly here because those @@ -320,13 +320,12 @@ where self.with_nested_context(dest.clone(), contract.trie_id.clone(), |nested| { if value > BalanceOf::::zero() { - transfer( + transfer::( TransferCause::Call, transactor_kind, &caller, &dest, value, - nested, )? } @@ -348,7 +347,7 @@ where input_data: Vec, salt: &[u8], ) -> Result<(T::AccountId, ExecReturnValue), ExecError> { - if self.depth == self.config.max_depth as usize { + if self.depth == T::MaxDepth::get() as usize { Err(Error::::MaxCallDepthReached)? } @@ -372,13 +371,12 @@ where // Send funds unconditionally here. If the `endowment` is below existential_deposit // then error will be returned here. - transfer( + transfer::( TransferCause::Instantiate, transactor_kind, &caller, &dest, endowment, - nested, )?; // Cache the value before calling into the constructor because that @@ -489,17 +487,15 @@ enum TransferCause { /// is specified as `Terminate`. Otherwise, any transfer that would bring the sender below the /// subsistence threshold (for contracts) or the existential deposit (for plain accounts) /// results in an error. -fn transfer<'a, T: Config, E>( +fn transfer( cause: TransferCause, origin: TransactorKind, transactor: &T::AccountId, dest: &T::AccountId, value: BalanceOf, - ctx: &mut ExecutionContext<'a, T, E>, ) -> DispatchResult where T::AccountId: UncheckedFrom + AsRef<[u8]>, - E: Executable, { use self::TransferCause::*; use self::TransactorKind::*; @@ -511,7 +507,7 @@ where (_, Contract) => { ensure!( T::Currency::total_balance(transactor).saturating_sub(value) >= - ctx.config.subsistence_threshold(), + Contracts::::subsistence_threshold(), Error::::BelowSubsistenceThreshold, ); ExistenceRequirement::KeepAlive @@ -586,7 +582,7 @@ where input_data: Vec, salt: &[u8], ) -> Result<(AccountIdOf, ExecReturnValue), ExecError> { - let executable = E::from_storage(code_hash, &self.ctx.config.schedule)?; + let executable = E::from_storage(code_hash, &self.ctx.schedule)?; let result = self.ctx.instantiate(endowment, gas_meter, executable, input_data, salt)?; Ok(result) } @@ -596,13 +592,12 @@ where to: &T::AccountId, value: BalanceOf, ) -> DispatchResult { - transfer( + transfer::( TransferCause::Call, TransactorKind::Contract, &self.ctx.self_account.clone(), to, value, - self.ctx, ) } @@ -617,13 +612,12 @@ where return Err(Error::::ReentranceDenied.into()); } } - transfer( + transfer::( TransferCause::Terminate, TransactorKind::Contract, &self_id, beneficiary, value, - self.ctx, )?; if let Some(ContractInfo::Alive(info)) = ContractInfoOf::::take(&self_id) { Storage::::queue_trie_for_deletion(&info)?; @@ -708,11 +702,11 @@ where } fn minimum_balance(&self) -> BalanceOf { - self.ctx.config.existential_deposit + T::Currency::minimum_balance() } fn tombstone_deposit(&self) -> BalanceOf { - self.ctx.config.tombstone_deposit + T::TombstoneDeposit::get() } fn deposit_event(&mut self, topics: Vec, data: Vec) { @@ -741,7 +735,7 @@ where fn block_number(&self) -> T::BlockNumber { self.block_number } fn max_value_size(&self) -> u32 { - self.ctx.config.max_value_size + T::MaxValueSize::get() } fn get_weight_price(&self, weight: Weight) -> BalanceOf { @@ -749,7 +743,7 @@ where } fn schedule(&self) -> &Schedule { - &self.ctx.config.schedule + &self.ctx.schedule } } @@ -898,8 +892,8 @@ mod tests { }); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); place_contract(&BOB, exec_ch); assert_matches!( @@ -919,18 +913,15 @@ mod tests { let dest = BOB; ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(origin.clone(), &cfg); set_balance(&origin, 100); set_balance(&dest, 0); - super::transfer( + super::transfer::( super::TransferCause::Call, super::TransactorKind::PlainAccount, &origin, &dest, 55, - &mut ctx, ).unwrap(); assert_eq!(get_balance(&origin), 45); @@ -950,8 +941,8 @@ mod tests { ); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(origin.clone(), &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(origin.clone(), &schedule); place_contract(&BOB, return_ch); set_balance(&origin, 100); let balance = get_balance(&dest); @@ -979,17 +970,14 @@ mod tests { let dest = BOB; ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(origin.clone(), &cfg); set_balance(&origin, 0); - let result = super::transfer( + let result = super::transfer::( super::TransferCause::Call, super::TransactorKind::PlainAccount, &origin, &dest, 100, - &mut ctx, ); assert_eq!( @@ -1012,8 +1000,8 @@ mod tests { ); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(origin, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(origin, &schedule); place_contract(&BOB, return_ch); let result = ctx.call( @@ -1040,8 +1028,8 @@ mod tests { ); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(origin, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(origin, &schedule); place_contract(&BOB, return_ch); let result = ctx.call( @@ -1066,8 +1054,8 @@ mod tests { // This one tests passing the input data into a contract via call. ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); place_contract(&BOB, input_data_ch); let result = ctx.call( @@ -1089,15 +1077,16 @@ mod tests { // This one tests passing the input data into a contract via instantiate. ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let subsistence = Contracts::::subsistence_threshold(); + let mut ctx = MockContext::top_level(ALICE, &schedule); - set_balance(&ALICE, cfg.subsistence_threshold() * 10); + set_balance(&ALICE, subsistence * 10); let result = ctx.instantiate( - cfg.subsistence_threshold() * 3, + subsistence * 3, &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(input_data_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(input_data_ch, &schedule).unwrap(), vec![1, 2, 3, 4], &[], ); @@ -1137,8 +1126,8 @@ mod tests { }); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); set_balance(&BOB, 1); place_contract(&BOB, recurse_ch); @@ -1185,9 +1174,8 @@ mod tests { }); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - - let mut ctx = MockContext::top_level(origin.clone(), &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(origin.clone(), &schedule); place_contract(&dest, bob_ch); place_contract(&CHARLIE, charlie_ch); @@ -1224,8 +1212,8 @@ mod tests { }); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); place_contract(&BOB, bob_ch); place_contract(&CHARLIE, charlie_ch); @@ -1245,14 +1233,14 @@ mod tests { let dummy_ch = MockLoader::insert(|_| exec_success()); ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); assert_matches!( ctx.instantiate( 0, // <- zero endowment &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(dummy_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(dummy_ch, &schedule).unwrap(), vec![], &[], ), @@ -1268,15 +1256,15 @@ mod tests { ); ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); set_balance(&ALICE, 1000); let instantiated_contract_address = assert_matches!( ctx.instantiate( 100, &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(dummy_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(dummy_ch, &schedule).unwrap(), vec![], &[], ), @@ -1299,15 +1287,15 @@ mod tests { ); ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); set_balance(&ALICE, 1000); let instantiated_contract_address = assert_matches!( ctx.instantiate( 100, &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(dummy_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(dummy_ch, &schedule).unwrap(), vec![], &[], ), @@ -1331,7 +1319,7 @@ mod tests { // Instantiate a contract and save it's address in `instantiated_contract_address`. let (address, output) = ctx.ext.instantiate( dummy_ch, - ConfigCache::::subsistence_threshold_uncached() * 3, + Contracts::::subsistence_threshold() * 3, ctx.gas_meter, vec![], &[48, 49, 50], @@ -1343,9 +1331,9 @@ mod tests { }); ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); - set_balance(&ALICE, cfg.subsistence_threshold() * 100); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); + set_balance(&ALICE, Contracts::::subsistence_threshold() * 100); place_contract(&BOB, instantiator_ch); assert_matches!( @@ -1392,8 +1380,8 @@ mod tests { }); ExtBuilder::default().existential_deposit(15).build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); set_balance(&ALICE, 1000); set_balance(&BOB, 100); place_contract(&BOB, instantiator_ch); @@ -1420,15 +1408,15 @@ mod tests { .existential_deposit(15) .build() .execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); set_balance(&ALICE, 1000); assert_eq!( ctx.instantiate( 100, &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(terminate_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(terminate_ch, &schedule).unwrap(), vec![], &[], ), @@ -1445,7 +1433,8 @@ mod tests { #[test] fn rent_allowance() { let rent_allowance_ch = MockLoader::insert(|ctx| { - let allowance = ConfigCache::::subsistence_threshold_uncached() * 3; + let subsistence = Contracts::::subsistence_threshold(); + let allowance = subsistence * 3; assert_eq!(ctx.ext.rent_allowance(), >::max_value()); ctx.ext.set_rent_allowance(allowance); assert_eq!(ctx.ext.rent_allowance(), allowance); @@ -1453,14 +1442,15 @@ mod tests { }); ExtBuilder::default().build().execute_with(|| { - let cfg = ConfigCache::preload(); - let mut ctx = MockContext::top_level(ALICE, &cfg); - set_balance(&ALICE, cfg.subsistence_threshold() * 10); + let subsistence = Contracts::::subsistence_threshold(); + let schedule = Contracts::current_schedule(); + let mut ctx = MockContext::top_level(ALICE, &schedule); + set_balance(&ALICE, subsistence * 10); let result = ctx.instantiate( - cfg.subsistence_threshold() * 5, + subsistence * 5, &mut GasMeter::::new(GAS_LIMIT), - MockExecutable::from_storage(rent_allowance_ch, &cfg.schedule).unwrap(), + MockExecutable::from_storage(rent_allowance_ch, &schedule).unwrap(), vec![], &[], ); diff --git a/substrate/frame/contracts/src/lib.rs b/substrate/frame/contracts/src/lib.rs index 2dff15a184..b20db8dd8c 100644 --- a/substrate/frame/contracts/src/lib.rs +++ b/substrate/frame/contracts/src/lib.rs @@ -628,7 +628,7 @@ decl_module! { let origin = ensure_signed(origin)?; let mut gas_meter = GasMeter::new(gas_limit); let result = Self::execute_wasm(origin, &mut gas_meter, |ctx, gas_meter| { - let executable = PrefabWasmModule::from_storage(code_hash, &ctx.config.schedule)?; + let executable = PrefabWasmModule::from_storage(code_hash, &ctx.schedule)?; let result = ctx.instantiate(endowment, gas_meter, executable, data, &salt) .map(|(_address, output)| output)?; Ok(result) @@ -764,6 +764,17 @@ where .collect(); UncheckedFrom::unchecked_from(T::Hashing::hash(&buf)) } + + /// Subsistence threshold is the extension of the minimum balance (aka existential deposit) + /// by the tombstone deposit, required for leaving a tombstone. + /// + /// Rent or any contract initiated balance transfer mechanism cannot make the balance lower + /// than the subsistence threshold in order to guarantee that a tombstone is created. + /// + /// The only way to completely kill a contract without a tombstone is calling `seal_terminate`. + pub fn subsistence_threshold() -> BalanceOf { + T::Currency::minimum_balance().saturating_add(T::TombstoneDeposit::get()) + } } impl Module @@ -778,8 +789,8 @@ where &mut GasMeter, ) -> ExecResult, ) -> ExecResult { - let cfg = ConfigCache::preload(); - let mut ctx = ExecutionContext::top_level(origin, &cfg); + let schedule = >::current_schedule(); + let mut ctx = ExecutionContext::top_level(origin, &schedule); func(&mut ctx, gas_meter) } } @@ -875,49 +886,3 @@ decl_storage! { pub DeletionQueue: Vec; } } - -/// In-memory cache of configuration values. -/// -/// We assume that these values can't be changed in the -/// course of transaction execution. -pub struct ConfigCache { - pub schedule: Schedule, - pub existential_deposit: BalanceOf, - pub tombstone_deposit: BalanceOf, - pub max_depth: u32, - pub max_value_size: u32, -} - -impl ConfigCache -where - T::AccountId: UncheckedFrom + AsRef<[u8]> -{ - fn preload() -> ConfigCache { - ConfigCache { - schedule: >::current_schedule(), - existential_deposit: T::Currency::minimum_balance(), - tombstone_deposit: T::TombstoneDeposit::get(), - max_depth: T::MaxDepth::get(), - max_value_size: T::MaxValueSize::get(), - } - } - - /// Subsistence threshold is the extension of the minimum balance (aka existential deposit) by the - /// tombstone deposit, required for leaving a tombstone. - /// - /// Rent or any contract initiated balance transfer mechanism cannot make the balance lower - /// than the subsistence threshold in order to guarantee that a tombstone is created. - /// - /// The only way to completely kill a contract without a tombstone is calling `seal_terminate`. - pub fn subsistence_threshold(&self) -> BalanceOf { - self.existential_deposit.saturating_add(self.tombstone_deposit) - } - - /// The same as `subsistence_threshold` but without the need for a preloaded instance. - /// - /// This is for cases where this value is needed in rent calculation rather than - /// during contract execution. - pub fn subsistence_threshold_uncached() -> BalanceOf { - T::Currency::minimum_balance().saturating_add(T::TombstoneDeposit::get()) - } -} diff --git a/substrate/frame/contracts/src/rent.rs b/substrate/frame/contracts/src/rent.rs index 145e6639c6..38b1e8bd11 100644 --- a/substrate/frame/contracts/src/rent.rs +++ b/substrate/frame/contracts/src/rent.rs @@ -19,7 +19,7 @@ use crate::{ AliveContractInfo, BalanceOf, ContractInfo, ContractInfoOf, Module, RawEvent, - TombstoneContractInfo, Config, CodeHash, ConfigCache, Error, + TombstoneContractInfo, Config, CodeHash, Error, storage::Storage, wasm::PrefabWasmModule, exec::Executable, }; use sp_std::prelude::*; @@ -125,7 +125,7 @@ where free_balance: &BalanceOf, contract: &AliveContractInfo, ) -> Option> { - let subsistence_threshold = ConfigCache::::subsistence_threshold_uncached(); + let subsistence_threshold = Module::::subsistence_threshold(); // Reserved balance contributes towards the subsistence threshold to stay consistent // with the existential deposit where the reserved balance is also counted. if *total_balance < subsistence_threshold { diff --git a/substrate/frame/contracts/src/tests.rs b/substrate/frame/contracts/src/tests.rs index f50c4b6596..364683a203 100644 --- a/substrate/frame/contracts/src/tests.rs +++ b/substrate/frame/contracts/src/tests.rs @@ -18,7 +18,7 @@ use crate::{ BalanceOf, ContractInfo, ContractInfoOf, Module, RawAliveContractInfo, RawEvent, Config, Schedule, gas::Gas, - Error, ConfigCache, RuntimeReturnCode, storage::Storage, + Error, RuntimeReturnCode, storage::Storage, chain_extension::{ Result as ExtensionResult, Environment, ChainExtension, Ext, SysConfig, RetVal, UncheckedFrom, InitState, ReturnFlags, @@ -67,10 +67,10 @@ frame_support::construct_runtime!( pub mod test_utils { use super::{Test, Balances}; use crate::{ - ConfigCache, ContractInfoOf, CodeHash, storage::Storage, exec::{StorageKey, AccountIdOf}, + Module as Contracts, }; use frame_support::{StorageMap, traits::Currency}; @@ -84,7 +84,7 @@ pub mod test_utils { } pub fn place_contract(address: &AccountIdOf, code_hash: CodeHash) { let trie_id = Storage::::generate_trie_id(address); - set_balance(address, ConfigCache::::subsistence_threshold_uncached() * 10); + set_balance(address, Contracts::::subsistence_threshold() * 10); Storage::::place_contract(&address, trie_id, code_hash).unwrap(); } pub fn set_balance(who: &AccountIdOf, amount: u64) { @@ -451,7 +451,7 @@ fn instantiate_and_call_and_deposit_event() { .build() .execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); // Check at the end to get hash on error easily let creation = Contracts::instantiate_with_code( @@ -566,7 +566,7 @@ fn deposit_event_max_value_limit() { #[test] fn run_out_of_gas() { let (wasm, code_hash) = compile_module::("run_out_of_gas").unwrap(); - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); ExtBuilder::default() .existential_deposit(50) @@ -902,7 +902,7 @@ fn removals(trigger_call: impl Fn(AccountIdOf) -> bool) { .unwrap().get_alive().unwrap().rent_allowance; let balance = Balances::free_balance(&addr); - let subsistence_threshold = ConfigCache::::subsistence_threshold_uncached(); + let subsistence_threshold = Module::::subsistence_threshold(); // Trigger rent must have no effect assert!(!trigger_call(addr.clone())); @@ -991,7 +991,7 @@ fn removals(trigger_call: impl Fn(AccountIdOf) -> bool) { .build() .execute_with(|| { // Create - let subsistence_threshold = ConfigCache::::subsistence_threshold_uncached(); + let subsistence_threshold = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, subsistence_threshold * 1000); assert_ok!(Contracts::instantiate_with_code( Origin::signed(ALICE), @@ -1878,7 +1878,7 @@ fn crypto_hashes() { fn transfer_return_code() { let (wasm, code_hash) = compile_module::("transfer_return_code").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -1925,7 +1925,7 @@ fn call_return_code() { let (caller_code, caller_hash) = compile_module::("call_return_code").unwrap(); let (callee_code, callee_hash) = compile_module::("ok_trap_revert").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); let _ = Balances::deposit_creating(&CHARLIE, 1000 * subsistence); @@ -2018,7 +2018,7 @@ fn instantiate_return_code() { let (caller_code, caller_hash) = compile_module::("instantiate_return_code").unwrap(); let (callee_code, callee_hash) = compile_module::("ok_trap_revert").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); let _ = Balances::deposit_creating(&CHARLIE, 1000 * subsistence); let callee_hash = callee_hash.as_ref().to_vec(); @@ -2109,7 +2109,7 @@ fn instantiate_return_code() { fn disabled_chain_extension_wont_deploy() { let (code, _hash) = compile_module::("chain_extension").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); TestExtension::disable(); assert_err_ignore_postinfo!( @@ -2130,7 +2130,7 @@ fn disabled_chain_extension_wont_deploy() { fn disabled_chain_extension_errors_on_call() { let (code, hash) = compile_module::("chain_extension").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( Contracts::instantiate_with_code( @@ -2161,7 +2161,7 @@ fn disabled_chain_extension_errors_on_call() { fn chain_extension_works() { let (code, hash) = compile_module::("chain_extension").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( Contracts::instantiate_with_code( @@ -2230,7 +2230,7 @@ fn chain_extension_works() { fn lazy_removal_works() { let (code, hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -2290,7 +2290,7 @@ fn lazy_removal_partial_remove_works() { let mut ext = ExtBuilder::default().existential_deposit(50).build(); let trie = ext.execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -2371,7 +2371,7 @@ fn lazy_removal_partial_remove_works() { fn lazy_removal_does_no_run_on_full_block() { let (code, hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -2455,7 +2455,7 @@ fn lazy_removal_does_no_run_on_full_block() { fn lazy_removal_does_not_use_all_weight() { let (code, hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -2525,7 +2525,7 @@ fn lazy_removal_does_not_use_all_weight() { fn deletion_queue_full() { let (code, hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); let _ = Balances::deposit_creating(&ALICE, 1000 * subsistence); assert_ok!( @@ -2651,7 +2651,7 @@ fn refcounter() { let (wasm, code_hash) = compile_module::("self_destruct").unwrap(); ExtBuilder::default().existential_deposit(50).build().execute_with(|| { let _ = Balances::deposit_creating(&ALICE, 1_000_000); - let subsistence = ConfigCache::::subsistence_threshold_uncached(); + let subsistence = Module::::subsistence_threshold(); // Create two contracts with the same code and check that they do in fact share it. assert_ok!(Contracts::instantiate_with_code( diff --git a/substrate/frame/contracts/src/weights.rs b/substrate/frame/contracts/src/weights.rs index 3660220451..9c53611038 100644 --- a/substrate/frame/contracts/src/weights.rs +++ b/substrate/frame/contracts/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_contracts //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.1 -//! DATE: 2021-01-25, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! DATE: 2021-02-04, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -150,247 +150,247 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn on_initialize() -> Weight { - (3_697_000 as Weight) + (3_947_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn on_initialize_per_trie_key(k: u32, ) -> Weight { - (45_767_000 as Weight) + (46_644_000 as Weight) // Standard Error: 5_000 - .saturating_add((2_294_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((2_295_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn on_initialize_per_queue_item(q: u32, ) -> Weight { - (270_383_000 as Weight) - // Standard Error: 42_000 - .saturating_add((146_901_000 as Weight).saturating_mul(q as Weight)) + (0 as Weight) + // Standard Error: 164_000 + .saturating_add((165_220_000 as Weight).saturating_mul(q as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn update_schedule() -> Weight { - (26_819_000 as Weight) + (28_195_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn instantiate_with_code(c: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 135_000 - .saturating_add((156_679_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 67_000 - .saturating_add((2_794_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 126_000 + .saturating_add((154_196_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 63_000 + .saturating_add((2_764_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn instantiate(s: u32, ) -> Weight { - (189_974_000 as Weight) + (201_407_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_250_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_247_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn call() -> Weight { - (168_719_000 as Weight) + (180_337_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn claim_surcharge() -> Weight { - (294_458_000 as Weight) + (322_371_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn seal_caller(r: u32, ) -> Weight { - (123_683_000 as Weight) - // Standard Error: 115_000 - .saturating_add((255_734_000 as Weight).saturating_mul(r as Weight)) + (135_499_000 as Weight) + // Standard Error: 296_000 + .saturating_add((275_938_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_address(r: u32, ) -> Weight { - (120_904_000 as Weight) - // Standard Error: 96_000 - .saturating_add((255_431_000 as Weight).saturating_mul(r as Weight)) + (132_674_000 as Weight) + // Standard Error: 158_000 + .saturating_add((273_808_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_gas_left(r: u32, ) -> Weight { - (124_210_000 as Weight) - // Standard Error: 124_000 - .saturating_add((251_138_000 as Weight).saturating_mul(r as Weight)) + (126_819_000 as Weight) + // Standard Error: 145_000 + .saturating_add((269_173_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_balance(r: u32, ) -> Weight { - (127_626_000 as Weight) - // Standard Error: 192_000 - .saturating_add((528_716_000 as Weight).saturating_mul(r as Weight)) + (140_223_000 as Weight) + // Standard Error: 259_000 + .saturating_add((581_353_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_value_transferred(r: u32, ) -> Weight { - (117_016_000 as Weight) - // Standard Error: 109_000 - .saturating_add((250_620_000 as Weight).saturating_mul(r as Weight)) + (129_490_000 as Weight) + // Standard Error: 132_000 + .saturating_add((269_433_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_minimum_balance(r: u32, ) -> Weight { - (123_945_000 as Weight) - // Standard Error: 290_000 - .saturating_add((252_225_000 as Weight).saturating_mul(r as Weight)) + (127_251_000 as Weight) + // Standard Error: 161_000 + .saturating_add((268_720_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_tombstone_deposit(r: u32, ) -> Weight { - (119_625_000 as Weight) - // Standard Error: 132_000 - .saturating_add((250_486_000 as Weight).saturating_mul(r as Weight)) + (129_546_000 as Weight) + // Standard Error: 130_000 + .saturating_add((268_280_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_rent_allowance(r: u32, ) -> Weight { - (131_962_000 as Weight) - // Standard Error: 187_000 - .saturating_add((555_772_000 as Weight).saturating_mul(r as Weight)) + (133_306_000 as Weight) + // Standard Error: 208_000 + .saturating_add((604_235_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_block_number(r: u32, ) -> Weight { - (120_356_000 as Weight) - // Standard Error: 107_000 - .saturating_add((249_743_000 as Weight).saturating_mul(r as Weight)) + (133_689_000 as Weight) + // Standard Error: 115_000 + .saturating_add((267_107_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_now(r: u32, ) -> Weight { - (109_890_000 as Weight) - // Standard Error: 252_000 - .saturating_add((253_638_000 as Weight).saturating_mul(r as Weight)) + (133_773_000 as Weight) + // Standard Error: 130_000 + .saturating_add((268_897_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_weight_to_fee(r: u32, ) -> Weight { - (128_014_000 as Weight) - // Standard Error: 207_000 - .saturating_add((481_167_000 as Weight).saturating_mul(r as Weight)) + (133_222_000 as Weight) + // Standard Error: 476_000 + .saturating_add((514_400_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) } fn seal_gas(r: u32, ) -> Weight { - (108_147_000 as Weight) - // Standard Error: 101_000 - .saturating_add((122_462_000 as Weight).saturating_mul(r as Weight)) + (118_769_000 as Weight) + // Standard Error: 102_000 + .saturating_add((134_134_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_input(r: u32, ) -> Weight { - (117_045_000 as Weight) - // Standard Error: 57_000 - .saturating_add((7_168_000 as Weight).saturating_mul(r as Weight)) + (124_719_000 as Weight) + // Standard Error: 93_000 + .saturating_add((7_486_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_input_per_kb(n: u32, ) -> Weight { - (127_286_000 as Weight) + (136_348_000 as Weight) // Standard Error: 0 - .saturating_add((278_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((274_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_return(r: u32, ) -> Weight { - (111_673_000 as Weight) - // Standard Error: 88_000 - .saturating_add((4_768_000 as Weight).saturating_mul(r as Weight)) + (118_710_000 as Weight) + // Standard Error: 77_000 + .saturating_add((4_566_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_return_per_kb(n: u32, ) -> Weight { - (113_767_000 as Weight) - // Standard Error: 4_000 - .saturating_add((745_000 as Weight).saturating_mul(n as Weight)) + (127_609_000 as Weight) + // Standard Error: 0 + .saturating_add((786_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_terminate(r: u32, ) -> Weight { - (117_714_000 as Weight) - // Standard Error: 82_000 - .saturating_add((92_096_000 as Weight).saturating_mul(r as Weight)) + (125_463_000 as Weight) + // Standard Error: 154_000 + .saturating_add((106_188_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(r as Weight))) } fn seal_restore_to(r: u32, ) -> Weight { - (208_895_000 as Weight) - // Standard Error: 312_000 - .saturating_add((125_607_000 as Weight).saturating_mul(r as Weight)) + (219_195_000 as Weight) + // Standard Error: 361_000 + .saturating_add((131_326_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes((6 as Weight).saturating_mul(r as Weight))) } fn seal_restore_to_per_delta(d: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_920_000 - .saturating_add((3_575_765_000 as Weight).saturating_mul(d as Weight)) + (6_742_000 as Weight) + // Standard Error: 2_484_000 + .saturating_add((3_747_735_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(d as Weight))) .saturating_add(T::DbWeight::get().writes(7 as Weight)) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(d as Weight))) } fn seal_random(r: u32, ) -> Weight { - (120_578_000 as Weight) - // Standard Error: 196_000 - .saturating_add((604_126_000 as Weight).saturating_mul(r as Weight)) + (137_248_000 as Weight) + // Standard Error: 662_000 + .saturating_add((661_121_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) } fn seal_deposit_event(r: u32, ) -> Weight { - (142_228_000 as Weight) - // Standard Error: 476_000 - .saturating_add((885_528_000 as Weight).saturating_mul(r as Weight)) + (147_654_000 as Weight) + // Standard Error: 305_000 + .saturating_add((935_148_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - (1_157_284_000 as Weight) - // Standard Error: 2_081_000 - .saturating_add((547_132_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 410_000 - .saturating_add((243_458_000 as Weight).saturating_mul(n as Weight)) + (1_246_123_000 as Weight) + // Standard Error: 2_807_000 + .saturating_add((585_535_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 553_000 + .saturating_add((249_976_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(t as Weight))) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(t as Weight))) } fn seal_set_rent_allowance(r: u32, ) -> Weight { - (142_691_000 as Weight) - // Standard Error: 237_000 - .saturating_add((662_375_000 as Weight).saturating_mul(r as Weight)) + (140_588_000 as Weight) + // Standard Error: 228_000 + .saturating_add((707_872_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn seal_set_storage(r: u32, ) -> Weight { - (1_111_700_000 as Weight) - // Standard Error: 15_818_000 - .saturating_add((16_429_245_000 as Weight).saturating_mul(r as Weight)) + (2_767_124_000 as Weight) + // Standard Error: 18_504_000 + .saturating_add((17_507_873_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } fn seal_set_storage_per_kb(n: u32, ) -> Weight { - (1_613_716_000 as Weight) - // Standard Error: 339_000 - .saturating_add((67_360_000 as Weight).saturating_mul(n as Weight)) + (1_748_586_000 as Weight) + // Standard Error: 359_000 + .saturating_add((75_231_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn seal_clear_storage(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_384_000 - .saturating_add((2_125_855_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 2_209_000 + .saturating_add((2_261_355_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } fn seal_get_storage(r: u32, ) -> Weight { - (88_908_000 as Weight) - // Standard Error: 657_000 - .saturating_add((894_111_000 as Weight).saturating_mul(r as Weight)) + (83_780_000 as Weight) + // Standard Error: 965_000 + .saturating_add((973_164_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) } fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (680_626_000 as Weight) - // Standard Error: 256_000 - .saturating_add((146_686_000 as Weight).saturating_mul(n as Weight)) + (728_625_000 as Weight) + // Standard Error: 294_000 + .saturating_add((154_625_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) } fn seal_transfer(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_355_000 - .saturating_add((5_086_065_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_543_000 + .saturating_add((5_467_966_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -398,591 +398,591 @@ impl WeightInfo for SubstrateWeight { } fn seal_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 8_018_000 - .saturating_add((9_737_605_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 9_216_000 + .saturating_add((10_265_093_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((200 as Weight).saturating_mul(r as Weight))) } fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight { - (6_776_517_000 as Weight) - // Standard Error: 181_875_000 - .saturating_add((3_769_181_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 64_000 - .saturating_add((57_763_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 69_000 - .saturating_add((79_752_000 as Weight).saturating_mul(o as Weight)) + (10_426_869_000 as Weight) + // Standard Error: 114_622_000 + .saturating_add((4_366_037_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 40_000 + .saturating_add((59_741_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 43_000 + .saturating_add((82_331_000 as Weight).saturating_mul(o as Weight)) .saturating_add(T::DbWeight::get().reads(206 as Weight)) .saturating_add(T::DbWeight::get().writes((101 as Weight).saturating_mul(t as Weight))) } fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 32_551_000 - .saturating_add((19_948_011_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 35_927_000 + .saturating_add((21_088_623_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((300 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((300 as Weight).saturating_mul(r as Weight))) } fn seal_instantiate_per_input_output_salt_kb(i: u32, o: u32, s: u32, ) -> Weight { - (19_812_400_000 as Weight) - // Standard Error: 80_000 - .saturating_add((53_676_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 80_000 - .saturating_add((76_512_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 80_000 - .saturating_add((274_518_000 as Weight).saturating_mul(s as Weight)) + (17_200_760_000 as Weight) + // Standard Error: 157_000 + .saturating_add((61_221_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 157_000 + .saturating_add((84_149_000 as Weight).saturating_mul(o as Weight)) + // Standard Error: 157_000 + .saturating_add((284_655_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(207 as Weight)) .saturating_add(T::DbWeight::get().writes(203 as Weight)) } fn seal_hash_sha2_256(r: u32, ) -> Weight { - (123_385_000 as Weight) - // Standard Error: 128_000 - .saturating_add((231_897_000 as Weight).saturating_mul(r as Weight)) + (126_005_000 as Weight) + // Standard Error: 133_000 + .saturating_add((252_338_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - (399_641_000 as Weight) - // Standard Error: 46_000 - .saturating_add((427_165_000 as Weight).saturating_mul(n as Weight)) + (727_930_000 as Weight) + // Standard Error: 57_000 + .saturating_add((430_299_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_keccak_256(r: u32, ) -> Weight { - (120_367_000 as Weight) - // Standard Error: 131_000 - .saturating_add((247_401_000 as Weight).saturating_mul(r as Weight)) + (129_778_000 as Weight) + // Standard Error: 146_000 + .saturating_add((266_097_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - (150_485_000 as Weight) - // Standard Error: 39_000 - .saturating_add((337_450_000 as Weight).saturating_mul(n as Weight)) + (683_078_000 as Weight) + // Standard Error: 42_000 + .saturating_add((344_294_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_256(r: u32, ) -> Weight { - (117_139_000 as Weight) - // Standard Error: 138_000 - .saturating_add((221_115_000 as Weight).saturating_mul(r as Weight)) + (141_731_000 as Weight) + // Standard Error: 251_000 + .saturating_add((239_931_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - (428_440_000 as Weight) - // Standard Error: 36_000 - .saturating_add((153_427_000 as Weight).saturating_mul(n as Weight)) + (563_895_000 as Weight) + // Standard Error: 51_000 + .saturating_add((160_216_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_128(r: u32, ) -> Weight { - (120_716_000 as Weight) - // Standard Error: 116_000 - .saturating_add((218_086_000 as Weight).saturating_mul(r as Weight)) + (132_587_000 as Weight) + // Standard Error: 159_000 + .saturating_add((239_287_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - (478_148_000 as Weight) - // Standard Error: 45_000 - .saturating_add((153_952_000 as Weight).saturating_mul(n as Weight)) + (606_572_000 as Weight) + // Standard Error: 34_000 + .saturating_add((160_101_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) } fn instr_i64const(r: u32, ) -> Weight { - (23_526_000 as Weight) - // Standard Error: 19_000 - .saturating_add((3_125_000 as Weight).saturating_mul(r as Weight)) + (24_366_000 as Weight) + // Standard Error: 21_000 + .saturating_add((3_114_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (25_653_000 as Weight) - // Standard Error: 17_000 - .saturating_add((159_121_000 as Weight).saturating_mul(r as Weight)) + (26_779_000 as Weight) + // Standard Error: 28_000 + .saturating_add((161_654_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (25_608_000 as Weight) - // Standard Error: 26_000 - .saturating_add((229_680_000 as Weight).saturating_mul(r as Weight)) + (26_763_000 as Weight) + // Standard Error: 88_000 + .saturating_add((232_822_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (24_053_000 as Weight) - // Standard Error: 19_000 - .saturating_add((11_768_000 as Weight).saturating_mul(r as Weight)) + (24_342_000 as Weight) + // Standard Error: 36_000 + .saturating_add((12_530_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (23_478_000 as Weight) - // Standard Error: 16_000 - .saturating_add((11_992_000 as Weight).saturating_mul(r as Weight)) + (24_301_000 as Weight) + // Standard Error: 25_000 + .saturating_add((12_106_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (23_418_000 as Weight) - // Standard Error: 15_000 - .saturating_add((5_936_000 as Weight).saturating_mul(r as Weight)) + (24_253_000 as Weight) + // Standard Error: 21_000 + .saturating_add((6_464_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (23_380_000 as Weight) - // Standard Error: 10_000 - .saturating_add((13_844_000 as Weight).saturating_mul(r as Weight)) + (24_259_000 as Weight) + // Standard Error: 20_000 + .saturating_add((14_030_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (23_509_000 as Weight) - // Standard Error: 11_000 - .saturating_add((14_912_000 as Weight).saturating_mul(r as Weight)) + (24_313_000 as Weight) + // Standard Error: 37_000 + .saturating_add((15_788_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (36_616_000 as Weight) - // Standard Error: 1_000 - .saturating_add((104_000 as Weight).saturating_mul(e as Weight)) + (37_991_000 as Weight) + // Standard Error: 0 + .saturating_add((138_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (23_821_000 as Weight) - // Standard Error: 49_000 - .saturating_add((96_843_000 as Weight).saturating_mul(r as Weight)) + (24_739_000 as Weight) + // Standard Error: 31_000 + .saturating_add((97_567_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (31_502_000 as Weight) - // Standard Error: 523_000 - .saturating_add((196_243_000 as Weight).saturating_mul(r as Weight)) + (32_395_000 as Weight) + // Standard Error: 432_000 + .saturating_add((198_972_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (242_403_000 as Weight) - // Standard Error: 9_000 - .saturating_add((3_443_000 as Weight).saturating_mul(p as Weight)) + (238_857_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_491_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (40_816_000 as Weight) - // Standard Error: 20_000 - .saturating_add((3_178_000 as Weight).saturating_mul(r as Weight)) + (42_196_000 as Weight) + // Standard Error: 22_000 + .saturating_add((3_161_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (40_778_000 as Weight) - // Standard Error: 17_000 - .saturating_add((3_507_000 as Weight).saturating_mul(r as Weight)) + (42_133_000 as Weight) + // Standard Error: 29_000 + .saturating_add((3_459_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (40_808_000 as Weight) - // Standard Error: 15_000 - .saturating_add((4_775_000 as Weight).saturating_mul(r as Weight)) + (42_164_000 as Weight) + // Standard Error: 25_000 + .saturating_add((4_653_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (26_983_000 as Weight) - // Standard Error: 32_000 - .saturating_add((8_878_000 as Weight).saturating_mul(r as Weight)) + (27_802_000 as Weight) + // Standard Error: 28_000 + .saturating_add((7_780_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (26_975_000 as Weight) - // Standard Error: 34_000 - .saturating_add((12_236_000 as Weight).saturating_mul(r as Weight)) + (27_826_000 as Weight) + // Standard Error: 21_000 + .saturating_add((11_978_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (25_691_000 as Weight) - // Standard Error: 22_000 - .saturating_add((3_577_000 as Weight).saturating_mul(r as Weight)) + (26_753_000 as Weight) + // Standard Error: 20_000 + .saturating_add((3_494_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (24_245_000 as Weight) - // Standard Error: 3_933_000 - .saturating_add((2_305_850_000 as Weight).saturating_mul(r as Weight)) + (25_078_000 as Weight) + // Standard Error: 4_213_000 + .saturating_add((2_324_209_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (23_495_000 as Weight) + (24_301_000 as Weight) // Standard Error: 28_000 - .saturating_add((5_186_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_201_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (23_441_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_224_000 as Weight).saturating_mul(r as Weight)) + (24_237_000 as Weight) + // Standard Error: 14_000 + .saturating_add((5_251_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (23_507_000 as Weight) - // Standard Error: 13_000 - .saturating_add((5_820_000 as Weight).saturating_mul(r as Weight)) + (24_290_000 as Weight) + // Standard Error: 20_000 + .saturating_add((5_780_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (23_475_000 as Weight) - // Standard Error: 19_000 - .saturating_add((5_244_000 as Weight).saturating_mul(r as Weight)) + (24_278_000 as Weight) + // Standard Error: 17_000 + .saturating_add((5_145_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (23_437_000 as Weight) + (24_249_000 as Weight) // Standard Error: 14_000 - .saturating_add((5_204_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_248_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendui32(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_211_000 as Weight).saturating_mul(r as Weight)) + (24_266_000 as Weight) + // Standard Error: 13_000 + .saturating_add((5_236_000 as Weight).saturating_mul(r as Weight)) } fn instr_i32wrapi64(r: u32, ) -> Weight { - (23_454_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_181_000 as Weight).saturating_mul(r as Weight)) + (24_236_000 as Weight) + // Standard Error: 12_000 + .saturating_add((5_304_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eq(r: u32, ) -> Weight { - (23_470_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_257_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ne(r: u32, ) -> Weight { - (23_475_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_132_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64lts(r: u32, ) -> Weight { - (23_418_000 as Weight) + (24_262_000 as Weight) // Standard Error: 22_000 - .saturating_add((7_199_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (23_478_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_278_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gts(r: u32, ) -> Weight { - (23_471_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_134_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gtu(r: u32, ) -> Weight { - (23_448_000 as Weight) - // Standard Error: 20_000 - .saturating_add((7_260_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64les(r: u32, ) -> Weight { - (23_409_000 as Weight) - // Standard Error: 26_000 - .saturating_add((7_064_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64leu(r: u32, ) -> Weight { - (23_433_000 as Weight) - // Standard Error: 18_000 - .saturating_add((7_088_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ges(r: u32, ) -> Weight { - (23_425_000 as Weight) - // Standard Error: 28_000 - .saturating_add((7_152_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64geu(r: u32, ) -> Weight { - (23_474_000 as Weight) - // Standard Error: 17_000 - .saturating_add((7_204_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64add(r: u32, ) -> Weight { - (23_431_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_105_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64sub(r: u32, ) -> Weight { - (23_423_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_094_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64mul(r: u32, ) -> Weight { - (23_407_000 as Weight) - // Standard Error: 16_000 - .saturating_add((7_149_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divs(r: u32, ) -> Weight { - (23_437_000 as Weight) - // Standard Error: 23_000 - .saturating_add((13_007_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divu(r: u32, ) -> Weight { - (23_405_000 as Weight) - // Standard Error: 22_000 - .saturating_add((12_259_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64rems(r: u32, ) -> Weight { - (23_469_000 as Weight) - // Standard Error: 12_000 - .saturating_add((12_950_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64remu(r: u32, ) -> Weight { - (23_460_000 as Weight) - // Standard Error: 13_000 - .saturating_add((12_249_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64and(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 22_000 - .saturating_add((7_111_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64or(r: u32, ) -> Weight { - (23_481_000 as Weight) - // Standard Error: 17_000 - .saturating_add((7_010_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64xor(r: u32, ) -> Weight { - (23_500_000 as Weight) - // Standard Error: 34_000 - .saturating_add((7_074_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64shl(r: u32, ) -> Weight { - (23_477_000 as Weight) - // Standard Error: 28_000 .saturating_add((7_220_000 as Weight).saturating_mul(r as Weight)) } + fn instr_i64ne(r: u32, ) -> Weight { + (24_287_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_072_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64lts(r: u32, ) -> Weight { + (24_211_000 as Weight) + // Standard Error: 12_000 + .saturating_add((7_196_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ltu(r: u32, ) -> Weight { + (24_175_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_392_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gts(r: u32, ) -> Weight { + (24_209_000 as Weight) + // Standard Error: 11_000 + .saturating_add((7_131_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gtu(r: u32, ) -> Weight { + (24_261_000 as Weight) + // Standard Error: 19_000 + .saturating_add((7_203_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64les(r: u32, ) -> Weight { + (24_258_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_120_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64leu(r: u32, ) -> Weight { + (24_236_000 as Weight) + // Standard Error: 11_000 + .saturating_add((7_076_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ges(r: u32, ) -> Weight { + (24_262_000 as Weight) + // Standard Error: 20_000 + .saturating_add((7_261_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64geu(r: u32, ) -> Weight { + (24_242_000 as Weight) + // Standard Error: 23_000 + .saturating_add((7_249_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64add(r: u32, ) -> Weight { + (24_248_000 as Weight) + // Standard Error: 28_000 + .saturating_add((7_149_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64sub(r: u32, ) -> Weight { + (24_243_000 as Weight) + // Standard Error: 14_000 + .saturating_add((7_128_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64mul(r: u32, ) -> Weight { + (24_217_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_237_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divs(r: u32, ) -> Weight { + (24_191_000 as Weight) + // Standard Error: 28_000 + .saturating_add((12_970_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divu(r: u32, ) -> Weight { + (24_213_000 as Weight) + // Standard Error: 19_000 + .saturating_add((12_106_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64rems(r: u32, ) -> Weight { + (24_238_000 as Weight) + // Standard Error: 15_000 + .saturating_add((12_944_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64remu(r: u32, ) -> Weight { + (24_317_000 as Weight) + // Standard Error: 16_000 + .saturating_add((12_129_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64and(r: u32, ) -> Weight { + (24_282_000 as Weight) + // Standard Error: 14_000 + .saturating_add((7_123_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64or(r: u32, ) -> Weight { + (24_243_000 as Weight) + // Standard Error: 18_000 + .saturating_add((7_148_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64xor(r: u32, ) -> Weight { + (24_239_000 as Weight) + // Standard Error: 18_000 + .saturating_add((7_157_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64shl(r: u32, ) -> Weight { + (24_279_000 as Weight) + // Standard Error: 16_000 + .saturating_add((7_253_000 as Weight).saturating_mul(r as Weight)) + } fn instr_i64shrs(r: u32, ) -> Weight { - (23_433_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_305_000 as Weight).saturating_mul(r as Weight)) + (24_285_000 as Weight) + // Standard Error: 29_000 + .saturating_add((7_333_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (23_413_000 as Weight) - // Standard Error: 18_000 - .saturating_add((7_299_000 as Weight).saturating_mul(r as Weight)) + (24_298_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_228_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (23_468_000 as Weight) - // Standard Error: 22_000 - .saturating_add((7_204_000 as Weight).saturating_mul(r as Weight)) + (24_226_000 as Weight) + // Standard Error: 16_000 + .saturating_add((7_269_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 32_000 - .saturating_add((7_255_000 as Weight).saturating_mul(r as Weight)) + (24_235_000 as Weight) + // Standard Error: 27_000 + .saturating_add((7_299_000 as Weight).saturating_mul(r as Weight)) } } // For backwards compatibility and tests impl WeightInfo for () { fn on_initialize() -> Weight { - (3_697_000 as Weight) + (3_947_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) } fn on_initialize_per_trie_key(k: u32, ) -> Weight { - (45_767_000 as Weight) + (46_644_000 as Weight) // Standard Error: 5_000 - .saturating_add((2_294_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((2_295_000 as Weight).saturating_mul(k as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn on_initialize_per_queue_item(q: u32, ) -> Weight { - (270_383_000 as Weight) - // Standard Error: 42_000 - .saturating_add((146_901_000 as Weight).saturating_mul(q as Weight)) + (0 as Weight) + // Standard Error: 164_000 + .saturating_add((165_220_000 as Weight).saturating_mul(q as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn update_schedule() -> Weight { - (26_819_000 as Weight) + (28_195_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn instantiate_with_code(c: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 135_000 - .saturating_add((156_679_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 67_000 - .saturating_add((2_794_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 126_000 + .saturating_add((154_196_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 63_000 + .saturating_add((2_764_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(5 as Weight)) } fn instantiate(s: u32, ) -> Weight { - (189_974_000 as Weight) + (201_407_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_250_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_247_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn call() -> Weight { - (168_719_000 as Weight) + (180_337_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } fn claim_surcharge() -> Weight { - (294_458_000 as Weight) + (322_371_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn seal_caller(r: u32, ) -> Weight { - (123_683_000 as Weight) - // Standard Error: 115_000 - .saturating_add((255_734_000 as Weight).saturating_mul(r as Weight)) + (135_499_000 as Weight) + // Standard Error: 296_000 + .saturating_add((275_938_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_address(r: u32, ) -> Weight { - (120_904_000 as Weight) - // Standard Error: 96_000 - .saturating_add((255_431_000 as Weight).saturating_mul(r as Weight)) + (132_674_000 as Weight) + // Standard Error: 158_000 + .saturating_add((273_808_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_gas_left(r: u32, ) -> Weight { - (124_210_000 as Weight) - // Standard Error: 124_000 - .saturating_add((251_138_000 as Weight).saturating_mul(r as Weight)) + (126_819_000 as Weight) + // Standard Error: 145_000 + .saturating_add((269_173_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_balance(r: u32, ) -> Weight { - (127_626_000 as Weight) - // Standard Error: 192_000 - .saturating_add((528_716_000 as Weight).saturating_mul(r as Weight)) + (140_223_000 as Weight) + // Standard Error: 259_000 + .saturating_add((581_353_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_value_transferred(r: u32, ) -> Weight { - (117_016_000 as Weight) - // Standard Error: 109_000 - .saturating_add((250_620_000 as Weight).saturating_mul(r as Weight)) + (129_490_000 as Weight) + // Standard Error: 132_000 + .saturating_add((269_433_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_minimum_balance(r: u32, ) -> Weight { - (123_945_000 as Weight) - // Standard Error: 290_000 - .saturating_add((252_225_000 as Weight).saturating_mul(r as Weight)) + (127_251_000 as Weight) + // Standard Error: 161_000 + .saturating_add((268_720_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_tombstone_deposit(r: u32, ) -> Weight { - (119_625_000 as Weight) - // Standard Error: 132_000 - .saturating_add((250_486_000 as Weight).saturating_mul(r as Weight)) + (129_546_000 as Weight) + // Standard Error: 130_000 + .saturating_add((268_280_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_rent_allowance(r: u32, ) -> Weight { - (131_962_000 as Weight) - // Standard Error: 187_000 - .saturating_add((555_772_000 as Weight).saturating_mul(r as Weight)) + (133_306_000 as Weight) + // Standard Error: 208_000 + .saturating_add((604_235_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_block_number(r: u32, ) -> Weight { - (120_356_000 as Weight) - // Standard Error: 107_000 - .saturating_add((249_743_000 as Weight).saturating_mul(r as Weight)) + (133_689_000 as Weight) + // Standard Error: 115_000 + .saturating_add((267_107_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_now(r: u32, ) -> Weight { - (109_890_000 as Weight) - // Standard Error: 252_000 - .saturating_add((253_638_000 as Weight).saturating_mul(r as Weight)) + (133_773_000 as Weight) + // Standard Error: 130_000 + .saturating_add((268_897_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_weight_to_fee(r: u32, ) -> Weight { - (128_014_000 as Weight) - // Standard Error: 207_000 - .saturating_add((481_167_000 as Weight).saturating_mul(r as Weight)) + (133_222_000 as Weight) + // Standard Error: 476_000 + .saturating_add((514_400_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) } fn seal_gas(r: u32, ) -> Weight { - (108_147_000 as Weight) - // Standard Error: 101_000 - .saturating_add((122_462_000 as Weight).saturating_mul(r as Weight)) + (118_769_000 as Weight) + // Standard Error: 102_000 + .saturating_add((134_134_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_input(r: u32, ) -> Weight { - (117_045_000 as Weight) - // Standard Error: 57_000 - .saturating_add((7_168_000 as Weight).saturating_mul(r as Weight)) + (124_719_000 as Weight) + // Standard Error: 93_000 + .saturating_add((7_486_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_input_per_kb(n: u32, ) -> Weight { - (127_286_000 as Weight) + (136_348_000 as Weight) // Standard Error: 0 - .saturating_add((278_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((274_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_return(r: u32, ) -> Weight { - (111_673_000 as Weight) - // Standard Error: 88_000 - .saturating_add((4_768_000 as Weight).saturating_mul(r as Weight)) + (118_710_000 as Weight) + // Standard Error: 77_000 + .saturating_add((4_566_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_return_per_kb(n: u32, ) -> Weight { - (113_767_000 as Weight) - // Standard Error: 4_000 - .saturating_add((745_000 as Weight).saturating_mul(n as Weight)) + (127_609_000 as Weight) + // Standard Error: 0 + .saturating_add((786_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_terminate(r: u32, ) -> Weight { - (117_714_000 as Weight) - // Standard Error: 82_000 - .saturating_add((92_096_000 as Weight).saturating_mul(r as Weight)) + (125_463_000 as Weight) + // Standard Error: 154_000 + .saturating_add((106_188_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(r as Weight))) } fn seal_restore_to(r: u32, ) -> Weight { - (208_895_000 as Weight) - // Standard Error: 312_000 - .saturating_add((125_607_000 as Weight).saturating_mul(r as Weight)) + (219_195_000 as Weight) + // Standard Error: 361_000 + .saturating_add((131_326_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes((6 as Weight).saturating_mul(r as Weight))) } fn seal_restore_to_per_delta(d: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 2_920_000 - .saturating_add((3_575_765_000 as Weight).saturating_mul(d as Weight)) + (6_742_000 as Weight) + // Standard Error: 2_484_000 + .saturating_add((3_747_735_000 as Weight).saturating_mul(d as Weight)) .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(d as Weight))) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(d as Weight))) } fn seal_random(r: u32, ) -> Weight { - (120_578_000 as Weight) - // Standard Error: 196_000 - .saturating_add((604_126_000 as Weight).saturating_mul(r as Weight)) + (137_248_000 as Weight) + // Standard Error: 662_000 + .saturating_add((661_121_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) } fn seal_deposit_event(r: u32, ) -> Weight { - (142_228_000 as Weight) - // Standard Error: 476_000 - .saturating_add((885_528_000 as Weight).saturating_mul(r as Weight)) + (147_654_000 as Weight) + // Standard Error: 305_000 + .saturating_add((935_148_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { - (1_157_284_000 as Weight) - // Standard Error: 2_081_000 - .saturating_add((547_132_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 410_000 - .saturating_add((243_458_000 as Weight).saturating_mul(n as Weight)) + (1_246_123_000 as Weight) + // Standard Error: 2_807_000 + .saturating_add((585_535_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 553_000 + .saturating_add((249_976_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(t as Weight))) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(t as Weight))) } fn seal_set_rent_allowance(r: u32, ) -> Weight { - (142_691_000 as Weight) - // Standard Error: 237_000 - .saturating_add((662_375_000 as Weight).saturating_mul(r as Weight)) + (140_588_000 as Weight) + // Standard Error: 228_000 + .saturating_add((707_872_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn seal_set_storage(r: u32, ) -> Weight { - (1_111_700_000 as Weight) - // Standard Error: 15_818_000 - .saturating_add((16_429_245_000 as Weight).saturating_mul(r as Weight)) + (2_767_124_000 as Weight) + // Standard Error: 18_504_000 + .saturating_add((17_507_873_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } fn seal_set_storage_per_kb(n: u32, ) -> Weight { - (1_613_716_000 as Weight) - // Standard Error: 339_000 - .saturating_add((67_360_000 as Weight).saturating_mul(n as Weight)) + (1_748_586_000 as Weight) + // Standard Error: 359_000 + .saturating_add((75_231_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } fn seal_clear_storage(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_384_000 - .saturating_add((2_125_855_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 2_209_000 + .saturating_add((2_261_355_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((100 as Weight).saturating_mul(r as Weight))) } fn seal_get_storage(r: u32, ) -> Weight { - (88_908_000 as Weight) - // Standard Error: 657_000 - .saturating_add((894_111_000 as Weight).saturating_mul(r as Weight)) + (83_780_000 as Weight) + // Standard Error: 965_000 + .saturating_add((973_164_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) } fn seal_get_storage_per_kb(n: u32, ) -> Weight { - (680_626_000 as Weight) - // Standard Error: 256_000 - .saturating_add((146_686_000 as Weight).saturating_mul(n as Weight)) + (728_625_000 as Weight) + // Standard Error: 294_000 + .saturating_add((154_625_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) } fn seal_transfer(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 1_355_000 - .saturating_add((5_086_065_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_543_000 + .saturating_add((5_467_966_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((100 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -990,343 +990,343 @@ impl WeightInfo for () { } fn seal_call(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 8_018_000 - .saturating_add((9_737_605_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 9_216_000 + .saturating_add((10_265_093_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().reads((200 as Weight).saturating_mul(r as Weight))) } fn seal_call_per_transfer_input_output_kb(t: u32, i: u32, o: u32, ) -> Weight { - (6_776_517_000 as Weight) - // Standard Error: 181_875_000 - .saturating_add((3_769_181_000 as Weight).saturating_mul(t as Weight)) - // Standard Error: 64_000 - .saturating_add((57_763_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 69_000 - .saturating_add((79_752_000 as Weight).saturating_mul(o as Weight)) + (10_426_869_000 as Weight) + // Standard Error: 114_622_000 + .saturating_add((4_366_037_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 40_000 + .saturating_add((59_741_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 43_000 + .saturating_add((82_331_000 as Weight).saturating_mul(o as Weight)) .saturating_add(RocksDbWeight::get().reads(206 as Weight)) .saturating_add(RocksDbWeight::get().writes((101 as Weight).saturating_mul(t as Weight))) } fn seal_instantiate(r: u32, ) -> Weight { (0 as Weight) - // Standard Error: 32_551_000 - .saturating_add((19_948_011_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 35_927_000 + .saturating_add((21_088_623_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().reads((300 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) .saturating_add(RocksDbWeight::get().writes((300 as Weight).saturating_mul(r as Weight))) } fn seal_instantiate_per_input_output_salt_kb(i: u32, o: u32, s: u32, ) -> Weight { - (19_812_400_000 as Weight) - // Standard Error: 80_000 - .saturating_add((53_676_000 as Weight).saturating_mul(i as Weight)) - // Standard Error: 80_000 - .saturating_add((76_512_000 as Weight).saturating_mul(o as Weight)) - // Standard Error: 80_000 - .saturating_add((274_518_000 as Weight).saturating_mul(s as Weight)) + (17_200_760_000 as Weight) + // Standard Error: 157_000 + .saturating_add((61_221_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 157_000 + .saturating_add((84_149_000 as Weight).saturating_mul(o as Weight)) + // Standard Error: 157_000 + .saturating_add((284_655_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(207 as Weight)) .saturating_add(RocksDbWeight::get().writes(203 as Weight)) } fn seal_hash_sha2_256(r: u32, ) -> Weight { - (123_385_000 as Weight) - // Standard Error: 128_000 - .saturating_add((231_897_000 as Weight).saturating_mul(r as Weight)) + (126_005_000 as Weight) + // Standard Error: 133_000 + .saturating_add((252_338_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { - (399_641_000 as Weight) - // Standard Error: 46_000 - .saturating_add((427_165_000 as Weight).saturating_mul(n as Weight)) + (727_930_000 as Weight) + // Standard Error: 57_000 + .saturating_add((430_299_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_keccak_256(r: u32, ) -> Weight { - (120_367_000 as Weight) - // Standard Error: 131_000 - .saturating_add((247_401_000 as Weight).saturating_mul(r as Weight)) + (129_778_000 as Weight) + // Standard Error: 146_000 + .saturating_add((266_097_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { - (150_485_000 as Weight) - // Standard Error: 39_000 - .saturating_add((337_450_000 as Weight).saturating_mul(n as Weight)) + (683_078_000 as Weight) + // Standard Error: 42_000 + .saturating_add((344_294_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_256(r: u32, ) -> Weight { - (117_139_000 as Weight) - // Standard Error: 138_000 - .saturating_add((221_115_000 as Weight).saturating_mul(r as Weight)) + (141_731_000 as Weight) + // Standard Error: 251_000 + .saturating_add((239_931_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { - (428_440_000 as Weight) - // Standard Error: 36_000 - .saturating_add((153_427_000 as Weight).saturating_mul(n as Weight)) + (563_895_000 as Weight) + // Standard Error: 51_000 + .saturating_add((160_216_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_128(r: u32, ) -> Weight { - (120_716_000 as Weight) - // Standard Error: 116_000 - .saturating_add((218_086_000 as Weight).saturating_mul(r as Weight)) + (132_587_000 as Weight) + // Standard Error: 159_000 + .saturating_add((239_287_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { - (478_148_000 as Weight) - // Standard Error: 45_000 - .saturating_add((153_952_000 as Weight).saturating_mul(n as Weight)) + (606_572_000 as Weight) + // Standard Error: 34_000 + .saturating_add((160_101_000 as Weight).saturating_mul(n as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) } fn instr_i64const(r: u32, ) -> Weight { - (23_526_000 as Weight) - // Standard Error: 19_000 - .saturating_add((3_125_000 as Weight).saturating_mul(r as Weight)) + (24_366_000 as Weight) + // Standard Error: 21_000 + .saturating_add((3_114_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64load(r: u32, ) -> Weight { - (25_653_000 as Weight) - // Standard Error: 17_000 - .saturating_add((159_121_000 as Weight).saturating_mul(r as Weight)) + (26_779_000 as Weight) + // Standard Error: 28_000 + .saturating_add((161_654_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64store(r: u32, ) -> Weight { - (25_608_000 as Weight) - // Standard Error: 26_000 - .saturating_add((229_680_000 as Weight).saturating_mul(r as Weight)) + (26_763_000 as Weight) + // Standard Error: 88_000 + .saturating_add((232_822_000 as Weight).saturating_mul(r as Weight)) } fn instr_select(r: u32, ) -> Weight { - (24_053_000 as Weight) - // Standard Error: 19_000 - .saturating_add((11_768_000 as Weight).saturating_mul(r as Weight)) + (24_342_000 as Weight) + // Standard Error: 36_000 + .saturating_add((12_530_000 as Weight).saturating_mul(r as Weight)) } fn instr_if(r: u32, ) -> Weight { - (23_478_000 as Weight) - // Standard Error: 16_000 - .saturating_add((11_992_000 as Weight).saturating_mul(r as Weight)) + (24_301_000 as Weight) + // Standard Error: 25_000 + .saturating_add((12_106_000 as Weight).saturating_mul(r as Weight)) } fn instr_br(r: u32, ) -> Weight { - (23_418_000 as Weight) - // Standard Error: 15_000 - .saturating_add((5_936_000 as Weight).saturating_mul(r as Weight)) + (24_253_000 as Weight) + // Standard Error: 21_000 + .saturating_add((6_464_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_if(r: u32, ) -> Weight { - (23_380_000 as Weight) - // Standard Error: 10_000 - .saturating_add((13_844_000 as Weight).saturating_mul(r as Weight)) + (24_259_000 as Weight) + // Standard Error: 20_000 + .saturating_add((14_030_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table(r: u32, ) -> Weight { - (23_509_000 as Weight) - // Standard Error: 11_000 - .saturating_add((14_912_000 as Weight).saturating_mul(r as Weight)) + (24_313_000 as Weight) + // Standard Error: 37_000 + .saturating_add((15_788_000 as Weight).saturating_mul(r as Weight)) } fn instr_br_table_per_entry(e: u32, ) -> Weight { - (36_616_000 as Weight) - // Standard Error: 1_000 - .saturating_add((104_000 as Weight).saturating_mul(e as Weight)) + (37_991_000 as Weight) + // Standard Error: 0 + .saturating_add((138_000 as Weight).saturating_mul(e as Weight)) } fn instr_call(r: u32, ) -> Weight { - (23_821_000 as Weight) - // Standard Error: 49_000 - .saturating_add((96_843_000 as Weight).saturating_mul(r as Weight)) + (24_739_000 as Weight) + // Standard Error: 31_000 + .saturating_add((97_567_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect(r: u32, ) -> Weight { - (31_502_000 as Weight) - // Standard Error: 523_000 - .saturating_add((196_243_000 as Weight).saturating_mul(r as Weight)) + (32_395_000 as Weight) + // Standard Error: 432_000 + .saturating_add((198_972_000 as Weight).saturating_mul(r as Weight)) } fn instr_call_indirect_per_param(p: u32, ) -> Weight { - (242_403_000 as Weight) - // Standard Error: 9_000 - .saturating_add((3_443_000 as Weight).saturating_mul(p as Weight)) + (238_857_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_491_000 as Weight).saturating_mul(p as Weight)) } fn instr_local_get(r: u32, ) -> Weight { - (40_816_000 as Weight) - // Standard Error: 20_000 - .saturating_add((3_178_000 as Weight).saturating_mul(r as Weight)) + (42_196_000 as Weight) + // Standard Error: 22_000 + .saturating_add((3_161_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_set(r: u32, ) -> Weight { - (40_778_000 as Weight) - // Standard Error: 17_000 - .saturating_add((3_507_000 as Weight).saturating_mul(r as Weight)) + (42_133_000 as Weight) + // Standard Error: 29_000 + .saturating_add((3_459_000 as Weight).saturating_mul(r as Weight)) } fn instr_local_tee(r: u32, ) -> Weight { - (40_808_000 as Weight) - // Standard Error: 15_000 - .saturating_add((4_775_000 as Weight).saturating_mul(r as Weight)) + (42_164_000 as Weight) + // Standard Error: 25_000 + .saturating_add((4_653_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_get(r: u32, ) -> Weight { - (26_983_000 as Weight) - // Standard Error: 32_000 - .saturating_add((8_878_000 as Weight).saturating_mul(r as Weight)) + (27_802_000 as Weight) + // Standard Error: 28_000 + .saturating_add((7_780_000 as Weight).saturating_mul(r as Weight)) } fn instr_global_set(r: u32, ) -> Weight { - (26_975_000 as Weight) - // Standard Error: 34_000 - .saturating_add((12_236_000 as Weight).saturating_mul(r as Weight)) + (27_826_000 as Weight) + // Standard Error: 21_000 + .saturating_add((11_978_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_current(r: u32, ) -> Weight { - (25_691_000 as Weight) - // Standard Error: 22_000 - .saturating_add((3_577_000 as Weight).saturating_mul(r as Weight)) + (26_753_000 as Weight) + // Standard Error: 20_000 + .saturating_add((3_494_000 as Weight).saturating_mul(r as Weight)) } fn instr_memory_grow(r: u32, ) -> Weight { - (24_245_000 as Weight) - // Standard Error: 3_933_000 - .saturating_add((2_305_850_000 as Weight).saturating_mul(r as Weight)) + (25_078_000 as Weight) + // Standard Error: 4_213_000 + .saturating_add((2_324_209_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64clz(r: u32, ) -> Weight { - (23_495_000 as Weight) + (24_301_000 as Weight) // Standard Error: 28_000 - .saturating_add((5_186_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_201_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64ctz(r: u32, ) -> Weight { - (23_441_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_224_000 as Weight).saturating_mul(r as Weight)) + (24_237_000 as Weight) + // Standard Error: 14_000 + .saturating_add((5_251_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64popcnt(r: u32, ) -> Weight { - (23_507_000 as Weight) - // Standard Error: 13_000 - .saturating_add((5_820_000 as Weight).saturating_mul(r as Weight)) + (24_290_000 as Weight) + // Standard Error: 20_000 + .saturating_add((5_780_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eqz(r: u32, ) -> Weight { - (23_475_000 as Weight) - // Standard Error: 19_000 - .saturating_add((5_244_000 as Weight).saturating_mul(r as Weight)) + (24_278_000 as Weight) + // Standard Error: 17_000 + .saturating_add((5_145_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendsi32(r: u32, ) -> Weight { - (23_437_000 as Weight) + (24_249_000 as Weight) // Standard Error: 14_000 - .saturating_add((5_204_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_248_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64extendui32(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_211_000 as Weight).saturating_mul(r as Weight)) + (24_266_000 as Weight) + // Standard Error: 13_000 + .saturating_add((5_236_000 as Weight).saturating_mul(r as Weight)) } fn instr_i32wrapi64(r: u32, ) -> Weight { - (23_454_000 as Weight) - // Standard Error: 16_000 - .saturating_add((5_181_000 as Weight).saturating_mul(r as Weight)) + (24_236_000 as Weight) + // Standard Error: 12_000 + .saturating_add((5_304_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64eq(r: u32, ) -> Weight { - (23_470_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_257_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ne(r: u32, ) -> Weight { - (23_475_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_132_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64lts(r: u32, ) -> Weight { - (23_418_000 as Weight) + (24_262_000 as Weight) // Standard Error: 22_000 - .saturating_add((7_199_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ltu(r: u32, ) -> Weight { - (23_478_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_278_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gts(r: u32, ) -> Weight { - (23_471_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_134_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64gtu(r: u32, ) -> Weight { - (23_448_000 as Weight) - // Standard Error: 20_000 - .saturating_add((7_260_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64les(r: u32, ) -> Weight { - (23_409_000 as Weight) - // Standard Error: 26_000 - .saturating_add((7_064_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64leu(r: u32, ) -> Weight { - (23_433_000 as Weight) - // Standard Error: 18_000 - .saturating_add((7_088_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64ges(r: u32, ) -> Weight { - (23_425_000 as Weight) - // Standard Error: 28_000 - .saturating_add((7_152_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64geu(r: u32, ) -> Weight { - (23_474_000 as Weight) - // Standard Error: 17_000 - .saturating_add((7_204_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64add(r: u32, ) -> Weight { - (23_431_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_105_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64sub(r: u32, ) -> Weight { - (23_423_000 as Weight) - // Standard Error: 21_000 - .saturating_add((7_094_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64mul(r: u32, ) -> Weight { - (23_407_000 as Weight) - // Standard Error: 16_000 - .saturating_add((7_149_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divs(r: u32, ) -> Weight { - (23_437_000 as Weight) - // Standard Error: 23_000 - .saturating_add((13_007_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64divu(r: u32, ) -> Weight { - (23_405_000 as Weight) - // Standard Error: 22_000 - .saturating_add((12_259_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64rems(r: u32, ) -> Weight { - (23_469_000 as Weight) - // Standard Error: 12_000 - .saturating_add((12_950_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64remu(r: u32, ) -> Weight { - (23_460_000 as Weight) - // Standard Error: 13_000 - .saturating_add((12_249_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64and(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 22_000 - .saturating_add((7_111_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64or(r: u32, ) -> Weight { - (23_481_000 as Weight) - // Standard Error: 17_000 - .saturating_add((7_010_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64xor(r: u32, ) -> Weight { - (23_500_000 as Weight) - // Standard Error: 34_000 - .saturating_add((7_074_000 as Weight).saturating_mul(r as Weight)) - } - fn instr_i64shl(r: u32, ) -> Weight { - (23_477_000 as Weight) - // Standard Error: 28_000 .saturating_add((7_220_000 as Weight).saturating_mul(r as Weight)) } + fn instr_i64ne(r: u32, ) -> Weight { + (24_287_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_072_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64lts(r: u32, ) -> Weight { + (24_211_000 as Weight) + // Standard Error: 12_000 + .saturating_add((7_196_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ltu(r: u32, ) -> Weight { + (24_175_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_392_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gts(r: u32, ) -> Weight { + (24_209_000 as Weight) + // Standard Error: 11_000 + .saturating_add((7_131_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64gtu(r: u32, ) -> Weight { + (24_261_000 as Weight) + // Standard Error: 19_000 + .saturating_add((7_203_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64les(r: u32, ) -> Weight { + (24_258_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_120_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64leu(r: u32, ) -> Weight { + (24_236_000 as Weight) + // Standard Error: 11_000 + .saturating_add((7_076_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64ges(r: u32, ) -> Weight { + (24_262_000 as Weight) + // Standard Error: 20_000 + .saturating_add((7_261_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64geu(r: u32, ) -> Weight { + (24_242_000 as Weight) + // Standard Error: 23_000 + .saturating_add((7_249_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64add(r: u32, ) -> Weight { + (24_248_000 as Weight) + // Standard Error: 28_000 + .saturating_add((7_149_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64sub(r: u32, ) -> Weight { + (24_243_000 as Weight) + // Standard Error: 14_000 + .saturating_add((7_128_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64mul(r: u32, ) -> Weight { + (24_217_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_237_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divs(r: u32, ) -> Weight { + (24_191_000 as Weight) + // Standard Error: 28_000 + .saturating_add((12_970_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64divu(r: u32, ) -> Weight { + (24_213_000 as Weight) + // Standard Error: 19_000 + .saturating_add((12_106_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64rems(r: u32, ) -> Weight { + (24_238_000 as Weight) + // Standard Error: 15_000 + .saturating_add((12_944_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64remu(r: u32, ) -> Weight { + (24_317_000 as Weight) + // Standard Error: 16_000 + .saturating_add((12_129_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64and(r: u32, ) -> Weight { + (24_282_000 as Weight) + // Standard Error: 14_000 + .saturating_add((7_123_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64or(r: u32, ) -> Weight { + (24_243_000 as Weight) + // Standard Error: 18_000 + .saturating_add((7_148_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64xor(r: u32, ) -> Weight { + (24_239_000 as Weight) + // Standard Error: 18_000 + .saturating_add((7_157_000 as Weight).saturating_mul(r as Weight)) + } + fn instr_i64shl(r: u32, ) -> Weight { + (24_279_000 as Weight) + // Standard Error: 16_000 + .saturating_add((7_253_000 as Weight).saturating_mul(r as Weight)) + } fn instr_i64shrs(r: u32, ) -> Weight { - (23_433_000 as Weight) - // Standard Error: 24_000 - .saturating_add((7_305_000 as Weight).saturating_mul(r as Weight)) + (24_285_000 as Weight) + // Standard Error: 29_000 + .saturating_add((7_333_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64shru(r: u32, ) -> Weight { - (23_413_000 as Weight) - // Standard Error: 18_000 - .saturating_add((7_299_000 as Weight).saturating_mul(r as Weight)) + (24_298_000 as Weight) + // Standard Error: 17_000 + .saturating_add((7_228_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotl(r: u32, ) -> Weight { - (23_468_000 as Weight) - // Standard Error: 22_000 - .saturating_add((7_204_000 as Weight).saturating_mul(r as Weight)) + (24_226_000 as Weight) + // Standard Error: 16_000 + .saturating_add((7_269_000 as Weight).saturating_mul(r as Weight)) } fn instr_i64rotr(r: u32, ) -> Weight { - (23_434_000 as Weight) - // Standard Error: 32_000 - .saturating_add((7_255_000 as Weight).saturating_mul(r as Weight)) + (24_235_000 as Weight) + // Standard Error: 27_000 + .saturating_add((7_299_000 as Weight).saturating_mul(r as Weight)) } }