Contracts pallet: removal on idle (#11202)

* on_initialize -> on_idle

* use remaining_weight info

* no weight_limit for on_idle

* call on_idle in tests

* attempt to fix tests

* run on_initiaize when queue full

* add on_idle to weight info

* add on_idle weight info to on_idle hook

* add basic test for on_initialize with full queue

* disbale check for all keys gone in full queue, full block test

* queue_deth as usize, add comment

* comment was removed by accident

* Update frame/contracts/src/lib.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* cargo +nightly fmt

* update lazy_removal_does_no_run_on_full_queue_and_full_block

* remove changes in weights.rs

* weights on_idle -> on_process_deletion_queue_batch

* use block number for on_idle

* use BlockNumber for on_initialize

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Update frame/contracts/src/lib.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* remove outcommented code

* add check that queue still full for test

* cargo fmt

* cargo +nightly fmt

* Update frame/contracts/src/benchmarking/mod.rs

Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>

* fix weights.rs

* add lazy_removal_does_no_run_on_low_remaining_weight test

* Apply suggestions from code review

Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Alexander Gryaznov <hi@agryaznov.com>
This commit is contained in:
Achim Schneider
2022-05-24 16:17:23 +02:00
committed by GitHub
parent 6198a5fb06
commit f744a1a01b
5 changed files with 200 additions and 74 deletions
@@ -202,8 +202,8 @@ benchmarks! {
<BalanceOf<T> as codec::HasCompact>::Type: Clone + Eq + PartialEq + sp_std::fmt::Debug + scale_info::TypeInfo + codec::Encode,
}
// The base weight without any actual work performed apart from the setup costs.
on_initialize {}: {
// The base weight consumed on processing contracts deletion queue.
on_process_deletion_queue_batch {}: {
Storage::<T>::process_deletion_queue_batch(Weight::MAX)
}
+21 -8
View File
@@ -380,15 +380,28 @@ pub mod pallet {
T::AccountId: UncheckedFrom<T::Hash>,
T::AccountId: AsRef<[u8]>,
{
fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight {
Storage::<T>::process_deletion_queue_batch(remaining_weight)
.saturating_add(T::WeightInfo::on_process_deletion_queue_batch())
}
fn on_initialize(_block: T::BlockNumber) -> Weight {
// We do not want to go above the block limit and rather avoid lazy deletion
// in that case. This should only happen on runtime upgrades.
let weight_limit = T::BlockWeights::get()
.max_block
.saturating_sub(System::<T>::block_weight().total())
.min(T::DeletionWeightLimit::get());
Storage::<T>::process_deletion_queue_batch(weight_limit)
.saturating_add(T::WeightInfo::on_initialize())
// We want to process the deletion_queue in the on_idle hook. Only in the case
// that the queue length has reached its maximal depth, we process it here.
let max_len = T::DeletionQueueDepth::get() as usize;
let queue_len = <DeletionQueue<T>>::decode_len().unwrap_or(0);
if queue_len >= max_len {
// We do not want to go above the block limit and rather avoid lazy deletion
// in that case. This should only happen on runtime upgrades.
let weight_limit = T::BlockWeights::get()
.max_block
.saturating_sub(System::<T>::block_weight().total())
.min(T::DeletionWeightLimit::get());
Storage::<T>::process_deletion_queue_batch(weight_limit)
.saturating_add(T::WeightInfo::on_process_deletion_queue_batch())
} else {
T::WeightInfo::on_process_deletion_queue_batch()
}
}
}
+1 -1
View File
@@ -224,7 +224,7 @@ where
/// of those keys can be deleted from the deletion queue given the supplied queue length
/// and weight limit.
pub fn deletion_budget(queue_len: usize, weight_limit: Weight) -> (u64, u32) {
let base_weight = T::WeightInfo::on_initialize();
let base_weight = T::WeightInfo::on_process_deletion_queue_batch();
let weight_per_queue_item = T::WeightInfo::on_initialize_per_queue_item(1) -
T::WeightInfo::on_initialize_per_queue_item(0);
let weight_per_key = T::WeightInfo::on_initialize_per_trie_key(1) -
+72 -41
View File
@@ -25,7 +25,7 @@ use crate::{
wasm::{PrefabWasmModule, ReturnCode as RuntimeReturnCode},
weights::WeightInfo,
BalanceOf, Code, CodeStorage, Config, ContractInfoOf, DefaultAddressGenerator,
DefaultContractAccessWeight, Error, Pallet, Schedule,
DefaultContractAccessWeight, DeletionQueue, Error, Pallet, Schedule,
};
use assert_matches::assert_matches;
use codec::Encode;
@@ -35,7 +35,8 @@ use frame_support::{
parameter_types,
storage::child,
traits::{
BalanceStatus, ConstU32, ConstU64, Contains, Currency, OnInitialize, ReservableCurrency,
BalanceStatus, ConstU32, ConstU64, Contains, Currency, Get, OnIdle, OnInitialize,
ReservableCurrency,
},
weights::{constants::WEIGHT_PER_SECOND, DispatchClass, PostDispatchInfo, Weight},
};
@@ -1610,13 +1611,32 @@ fn lazy_removal_works() {
assert_matches!(child::get(trie, &[99]), Some(42));
// Run the lazy removal
Contracts::on_initialize(Weight::max_value());
Contracts::on_idle(System::block_number(), Weight::max_value());
// Value should be gone now
assert_matches!(child::get::<i32>(trie, &[99]), None);
});
}
#[test]
fn lazy_removal_on_full_queue_works_on_initialize() {
ExtBuilder::default().existential_deposit(50).build().execute_with(|| {
// Fill the deletion queue with dummy values, so that on_initialize attempts
// to clear the queue
Storage::<Test>::fill_queue_with_dummies();
let queue_len_initial = <DeletionQueue<Test>>::decode_len().unwrap_or(0);
// Run the lazy removal
Contracts::on_initialize(System::block_number());
let queue_len_after_on_initialize = <DeletionQueue<Test>>::decode_len().unwrap_or(0);
// Queue length should be decreased after call of on_initialize()
assert!(queue_len_initial - queue_len_after_on_initialize > 0);
});
}
#[test]
fn lazy_batch_removal_works() {
let (code, hash) = compile_module::<Test>("self_destruct").unwrap();
@@ -1661,7 +1681,7 @@ fn lazy_batch_removal_works() {
}
// Run single lazy removal
Contracts::on_initialize(Weight::max_value());
Contracts::on_idle(System::block_number(), Weight::max_value());
// The single lazy removal should have removed all queued tries
for trie in tries.iter() {
@@ -1761,7 +1781,34 @@ fn lazy_removal_partial_remove_works() {
}
#[test]
fn lazy_removal_does_no_run_on_full_block() {
fn lazy_removal_does_no_run_on_full_queue_and_full_block() {
ExtBuilder::default().existential_deposit(50).build().execute_with(|| {
// Fill up the block which should prevent the lazy storage removal from running.
System::register_extra_weight_unchecked(
<Test as system::Config>::BlockWeights::get().max_block,
DispatchClass::Mandatory,
);
// Fill the deletion queue with dummy values, so that on_initialize attempts
// to clear the queue
Storage::<Test>::fill_queue_with_dummies();
// Check that on_initialize() tries to perform lazy removal but removes nothing
// as no more weight is left for that.
let weight_used = Contracts::on_initialize(System::block_number());
let base = <<Test as Config>::WeightInfo as WeightInfo>::on_process_deletion_queue_batch();
assert_eq!(weight_used, base);
// Check that the deletion queue is still full after execution of the
// on_initialize() hook.
let max_len: u32 = <Test as Config>::DeletionQueueDepth::get();
let queue_len: u32 = <DeletionQueue<Test>>::decode_len().unwrap_or(0).try_into().unwrap();
assert_eq!(max_len, queue_len);
});
}
#[test]
fn lazy_removal_does_no_run_on_low_remaining_weight() {
let (code, hash) = compile_module::<Test>("self_destruct").unwrap();
ExtBuilder::default().existential_deposit(50).build().execute_with(|| {
let min_balance = <Test as Config>::Currency::minimum_balance();
@@ -1779,19 +1826,10 @@ fn lazy_removal_does_no_run_on_full_block() {
let addr = Contracts::contract_address(&ALICE, &hash, &[]);
let info = <ContractInfoOf<Test>>::get(&addr).unwrap();
let max_keys = 30;
// Create some storage items for the contract.
let vals: Vec<_> = (0..max_keys)
.map(|i| (blake2_256(&i.encode()), (i as u32), (i as u32).encode()))
.collect();
let trie = &info.child_trie_info();
// Put value into the contracts child trie
for val in &vals {
Storage::<Test>::write(&info.trie_id, &val.0, Some(val.2.clone()), None, false)
.unwrap();
}
<ContractInfoOf<Test>>::insert(&addr, info.clone());
child::put(trie, &[99], &42);
// Terminate the contract
assert_ok!(Contracts::call(
@@ -1806,37 +1844,30 @@ fn lazy_removal_does_no_run_on_full_block() {
// Contract info should be gone
assert!(!<ContractInfoOf::<Test>>::contains_key(&addr));
let trie = info.child_trie_info();
// But value should be still there as the lazy removal did not run, yet.
for val in &vals {
assert_eq!(child::get::<u32>(&trie, &blake2_256(&val.0)), Some(val.1));
}
assert_matches!(child::get(trie, &[99]), Some(42));
// Fill up the block which should prevent the lazy storage removal from running.
System::register_extra_weight_unchecked(
<Test as system::Config>::BlockWeights::get().max_block,
DispatchClass::Mandatory,
);
// Assign a remaining weight which is too low for a successfull deletion of the contract
let low_remaining_weight =
<<Test as Config>::WeightInfo as WeightInfo>::on_process_deletion_queue_batch();
// Run the lazy removal without any limit so that all keys would be removed if there
// had been some weight left in the block.
let weight_used = Contracts::on_initialize(Weight::max_value());
let base = <<Test as Config>::WeightInfo as WeightInfo>::on_initialize();
assert_eq!(weight_used, base);
// Run the lazy removal
Contracts::on_idle(System::block_number(), low_remaining_weight);
// All the keys are still in place
for val in &vals {
assert_eq!(child::get::<u32>(&trie, &blake2_256(&val.0)), Some(val.1));
}
// Value should still be there, since remaining weight was too low for removal
assert_matches!(child::get::<i32>(trie, &[99]), Some(42));
// Run the lazy removal directly which disregards the block limits
Storage::<Test>::process_deletion_queue_batch(Weight::max_value());
// Run the lazy removal while deletion_queue is not full
Contracts::on_initialize(System::block_number());
// Now the keys should be gone
for val in &vals {
assert_eq!(child::get::<u32>(&trie, &blake2_256(&val.0)), None);
}
// Value should still be there, since deletion_queue was not full
assert_matches!(child::get::<i32>(trie, &[99]), Some(42));
// Run on_idle with max remaining weight, this should remove the value
Contracts::on_idle(System::block_number(), Weight::max_value());
// Value should be gone
assert_matches!(child::get::<i32>(trie, &[99]), None);
});
}
+104 -22
View File
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_contracts
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-04-24, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
@@ -44,7 +44,7 @@ use sp_std::marker::PhantomData;
/// Weight functions needed for pallet_contracts.
pub trait WeightInfo {
fn on_initialize() -> Weight;
fn on_process_deletion_queue_batch() -> Weight;
fn on_initialize_per_trie_key(k: u32, ) -> Weight;
fn on_initialize_per_queue_item(q: u32, ) -> Weight;
fn reinstrument(c: u32, ) -> Weight;
@@ -163,8 +163,8 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts DeletionQueue (r:1 w:0)
fn on_initialize() -> Weight {
(1_684_000 as Weight)
fn on_process_deletion_queue_batch() -> Weight {
(1_664_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
@@ -196,6 +196,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn call_with_code_per_byte(c: u32, ) -> Weight {
(206_036_000 as Weight)
@@ -208,6 +209,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Contracts PristineCode (r:0 w:1)
// Storage: Contracts OwnerInfoOf (r:0 w:1)
@@ -217,25 +219,27 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
.saturating_add((122_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
// Storage: Contracts CodeStorage (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn instantiate(s: u32, ) -> Weight {
(180_607_000 as Weight)
// Standard Error: 0
.saturating_add((2_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))
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn call() -> Weight {
(146_032_000 as Weight)
@@ -271,6 +275,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_caller(r: u32, ) -> Weight {
(205_061_000 as Weight)
// Standard Error: 76_000
@@ -282,6 +287,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_is_contract(r: u32, ) -> Weight {
(97_971_000 as Weight)
// Standard Error: 741_000
@@ -294,6 +300,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_code_hash(r: u32, ) -> Weight {
(109_052_000 as Weight)
// Standard Error: 716_000
@@ -306,6 +313,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_own_code_hash(r: u32, ) -> Weight {
(205_748_000 as Weight)
// Standard Error: 87_000
@@ -317,6 +325,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_caller_is_origin(r: u32, ) -> Weight {
(201_898_000 as Weight)
// Standard Error: 55_000
@@ -328,6 +337,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_address(r: u32, ) -> Weight {
(204_668_000 as Weight)
// Standard Error: 65_000
@@ -339,6 +349,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_gas_left(r: u32, ) -> Weight {
(203_240_000 as Weight)
// Standard Error: 68_000
@@ -350,6 +361,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_balance(r: u32, ) -> Weight {
(211_535_000 as Weight)
// Standard Error: 73_000
@@ -361,6 +373,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_value_transferred(r: u32, ) -> Weight {
(204_653_000 as Weight)
// Standard Error: 71_000
@@ -372,6 +385,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_minimum_balance(r: u32, ) -> Weight {
(204_690_000 as Weight)
// Standard Error: 82_000
@@ -383,6 +397,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_block_number(r: u32, ) -> Weight {
(205_004_000 as Weight)
// Standard Error: 62_000
@@ -394,6 +409,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_now(r: u32, ) -> Weight {
(204_341_000 as Weight)
// Standard Error: 93_000
@@ -405,6 +421,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
fn seal_weight_to_fee(r: u32, ) -> Weight {
(208_702_000 as Weight)
@@ -417,6 +434,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_gas(r: u32, ) -> Weight {
(131_983_000 as Weight)
// Standard Error: 17_000
@@ -428,6 +446,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_input(r: u32, ) -> Weight {
(203_768_000 as Weight)
// Standard Error: 57_000
@@ -439,6 +458,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_input_per_kb(n: u32, ) -> Weight {
(273_930_000 as Weight)
// Standard Error: 3_000
@@ -461,6 +481,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_return_per_kb(n: u32, ) -> Weight {
(201_130_000 as Weight)
// Standard Error: 0
@@ -472,6 +493,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts DeletionQueue (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn seal_terminate(r: u32, ) -> Weight {
@@ -480,13 +502,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
.saturating_add((54_190_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(r as Weight)))
}
// Storage: System Account (r:1 w:0)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
fn seal_random(r: u32, ) -> Weight {
(206_528_000 as Weight)
@@ -499,6 +522,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_deposit_event(r: u32, ) -> Weight {
(210_309_000 as Weight)
// Standard Error: 138_000
@@ -526,6 +550,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_debug_message(r: u32, ) -> Weight {
(138_934_000 as Weight)
// Standard Error: 34_000
@@ -633,6 +658,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_transfer(r: u32, ) -> Weight {
(124_818_000 as Weight)
// Standard Error: 1_251_000
@@ -646,6 +672,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_call(r: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 4_575_000
@@ -659,6 +686,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_delegate_call(r: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 5_742_000
@@ -670,6 +698,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:81 w:81)
// Storage: Contracts CodeStorage (r:2 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight {
(9_081_635_000 as Weight)
// Standard Error: 11_326_000
@@ -685,6 +714,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:80 w:80)
fn seal_instantiate(r: u32, ) -> Weight {
@@ -700,6 +730,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:81 w:81)
// Storage: Contracts CodeStorage (r:2 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight {
@@ -717,6 +748,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_sha2_256(r: u32, ) -> Weight {
(203_315_000 as Weight)
// Standard Error: 74_000
@@ -728,6 +760,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight {
(355_672_000 as Weight)
// Standard Error: 25_000
@@ -739,6 +772,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_keccak_256(r: u32, ) -> Weight {
(203_117_000 as Weight)
// Standard Error: 94_000
@@ -750,6 +784,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight {
(196_575_000 as Weight)
// Standard Error: 13_000
@@ -761,6 +796,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_256(r: u32, ) -> Weight {
(203_938_000 as Weight)
// Standard Error: 97_000
@@ -772,6 +808,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight {
(247_065_000 as Weight)
// Standard Error: 8_000
@@ -783,6 +820,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_128(r: u32, ) -> Weight {
(204_389_000 as Weight)
// Standard Error: 86_000
@@ -794,6 +832,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight {
(284_700_000 as Weight)
// Standard Error: 9_000
@@ -805,6 +844,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_ecdsa_recover(r: u32, ) -> Weight {
(235_813_000 as Weight)
// Standard Error: 521_000
@@ -816,6 +856,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight {
(204_095_000 as Weight)
// Standard Error: 495_000
@@ -1021,9 +1062,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
.saturating_add((1_333_000 as Weight).saturating_mul(r as Weight))
}
fn instr_i64sub(r: u32, ) -> Weight {
(74_033_000 as Weight)
// Standard Error: 1_000
.saturating_add((1_322_000 as Weight).saturating_mul(r as Weight))
(74_312_000 as Weight)
// Standard Error: 2_000
.saturating_add((1_339_000 as Weight).saturating_mul(r as Weight))
}
fn instr_i64mul(r: u32, ) -> Weight {
(74_203_000 as Weight)
@@ -1095,8 +1136,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
// Storage: Contracts DeletionQueue (r:1 w:0)
fn on_initialize() -> Weight {
(1_684_000 as Weight)
fn on_process_deletion_queue_batch() -> Weight {
(1_641_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
}
// Storage: Skipped Metadata (r:0 w:0)
@@ -1128,6 +1169,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn call_with_code_per_byte(c: u32, ) -> Weight {
(206_036_000 as Weight)
@@ -1140,6 +1182,7 @@ impl WeightInfo for () {
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Contracts PristineCode (r:0 w:1)
// Storage: Contracts OwnerInfoOf (r:0 w:1)
@@ -1149,25 +1192,27 @@ impl WeightInfo for () {
.saturating_add((122_000 as Weight).saturating_mul(c as Weight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(7 as Weight))
}
// Storage: Contracts CodeStorage (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn instantiate(s: u32, ) -> Weight {
(180_607_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn call() -> Weight {
(146_032_000 as Weight)
@@ -1203,6 +1248,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_caller(r: u32, ) -> Weight {
(205_061_000 as Weight)
// Standard Error: 76_000
@@ -1214,6 +1260,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_is_contract(r: u32, ) -> Weight {
(97_971_000 as Weight)
// Standard Error: 741_000
@@ -1226,6 +1273,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_code_hash(r: u32, ) -> Weight {
(109_052_000 as Weight)
// Standard Error: 716_000
@@ -1238,6 +1286,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_own_code_hash(r: u32, ) -> Weight {
(205_748_000 as Weight)
// Standard Error: 87_000
@@ -1249,6 +1298,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_caller_is_origin(r: u32, ) -> Weight {
(201_898_000 as Weight)
// Standard Error: 55_000
@@ -1260,6 +1310,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_address(r: u32, ) -> Weight {
(204_668_000 as Weight)
// Standard Error: 65_000
@@ -1271,6 +1322,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_gas_left(r: u32, ) -> Weight {
(203_240_000 as Weight)
// Standard Error: 68_000
@@ -1282,6 +1334,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_balance(r: u32, ) -> Weight {
(211_535_000 as Weight)
// Standard Error: 73_000
@@ -1293,6 +1346,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_value_transferred(r: u32, ) -> Weight {
(204_653_000 as Weight)
// Standard Error: 71_000
@@ -1304,6 +1358,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_minimum_balance(r: u32, ) -> Weight {
(204_690_000 as Weight)
// Standard Error: 82_000
@@ -1315,6 +1370,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_block_number(r: u32, ) -> Weight {
(205_004_000 as Weight)
// Standard Error: 62_000
@@ -1326,6 +1382,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_now(r: u32, ) -> Weight {
(204_341_000 as Weight)
// Standard Error: 93_000
@@ -1337,6 +1394,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0)
fn seal_weight_to_fee(r: u32, ) -> Weight {
(208_702_000 as Weight)
@@ -1349,6 +1407,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_gas(r: u32, ) -> Weight {
(131_983_000 as Weight)
// Standard Error: 17_000
@@ -1360,6 +1419,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_input(r: u32, ) -> Weight {
(203_768_000 as Weight)
// Standard Error: 57_000
@@ -1371,6 +1431,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_input_per_kb(n: u32, ) -> Weight {
(273_930_000 as Weight)
// Standard Error: 3_000
@@ -1393,6 +1454,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_return_per_kb(n: u32, ) -> Weight {
(201_130_000 as Weight)
// Standard Error: 0
@@ -1404,6 +1466,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts DeletionQueue (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn seal_terminate(r: u32, ) -> Weight {
@@ -1412,13 +1475,14 @@ impl WeightInfo for () {
.saturating_add((54_190_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(r as Weight)))
}
// Storage: System Account (r:1 w:0)
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0)
fn seal_random(r: u32, ) -> Weight {
(206_528_000 as Weight)
@@ -1431,6 +1495,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_deposit_event(r: u32, ) -> Weight {
(210_309_000 as Weight)
// Standard Error: 138_000
@@ -1458,6 +1523,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_debug_message(r: u32, ) -> Weight {
(138_934_000 as Weight)
// Standard Error: 34_000
@@ -1565,6 +1631,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_transfer(r: u32, ) -> Weight {
(124_818_000 as Weight)
// Standard Error: 1_251_000
@@ -1578,6 +1645,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_call(r: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 4_575_000
@@ -1591,6 +1659,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_delegate_call(r: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 5_742_000
@@ -1602,6 +1671,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:81 w:81)
// Storage: Contracts CodeStorage (r:2 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight {
(9_081_635_000 as Weight)
// Standard Error: 11_326_000
@@ -1617,6 +1687,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:80 w:80)
fn seal_instantiate(r: u32, ) -> Weight {
@@ -1632,6 +1703,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:81 w:81)
// Storage: Contracts CodeStorage (r:2 w:1)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: Contracts Nonce (r:1 w:1)
// Storage: Contracts OwnerInfoOf (r:1 w:1)
fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight {
@@ -1649,6 +1721,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_sha2_256(r: u32, ) -> Weight {
(203_315_000 as Weight)
// Standard Error: 74_000
@@ -1660,6 +1733,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight {
(355_672_000 as Weight)
// Standard Error: 25_000
@@ -1671,6 +1745,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_keccak_256(r: u32, ) -> Weight {
(203_117_000 as Weight)
// Standard Error: 94_000
@@ -1682,6 +1757,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight {
(196_575_000 as Weight)
// Standard Error: 13_000
@@ -1693,6 +1769,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_256(r: u32, ) -> Weight {
(203_938_000 as Weight)
// Standard Error: 97_000
@@ -1704,6 +1781,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight {
(247_065_000 as Weight)
// Standard Error: 8_000
@@ -1715,6 +1793,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_128(r: u32, ) -> Weight {
(204_389_000 as Weight)
// Standard Error: 86_000
@@ -1726,6 +1805,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight {
(284_700_000 as Weight)
// Standard Error: 9_000
@@ -1737,6 +1817,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_ecdsa_recover(r: u32, ) -> Weight {
(235_813_000 as Weight)
// Standard Error: 521_000
@@ -1748,6 +1829,7 @@ impl WeightInfo for () {
// Storage: Contracts ContractInfoOf (r:1 w:1)
// Storage: Contracts CodeStorage (r:1 w:0)
// Storage: Timestamp Now (r:1 w:0)
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight {
(204_095_000 as Weight)
// Standard Error: 495_000
@@ -1953,9 +2035,9 @@ impl WeightInfo for () {
.saturating_add((1_333_000 as Weight).saturating_mul(r as Weight))
}
fn instr_i64sub(r: u32, ) -> Weight {
(74_033_000 as Weight)
// Standard Error: 1_000
.saturating_add((1_322_000 as Weight).saturating_mul(r as Weight))
(74_312_000 as Weight)
// Standard Error: 2_000
.saturating_add((1_339_000 as Weight).saturating_mul(r as Weight))
}
fn instr_i64mul(r: u32, ) -> Weight {
(74_203_000 as Weight)