Companion for Weight v1.5 (#5943)

* fix to latest substrate pr

* update weights

* cargo build -p polkadot-runtime-parachains

* fix xcm-builder

* fix import

* fix a bunch

* fix a bunch of weight stuff

* kusama compile

* unused

* builds

* maybe fix

* cargo test -p polkadot-runtime-parachains

* xcm simulator example

* fix tests

* xcm sim fuzz

* fix runtime tests

* remove unused

* fix integration tests

* scalar div

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-08-31 12:59:39 +01:00
committed by GitHub
parent 138aae0a22
commit 28e94d97dd
231 changed files with 4577 additions and 4514 deletions
@@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `runtime_parachains::paras`.
@@ -52,19 +52,19 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: Paras CodeByHash (r:0 w:1)
/// The range of component `c` is `[1, 3145728]`.
fn force_set_current_code(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
}
// Storage: Paras Heads (r:0 w:1)
/// The range of component `s` is `[1, 1048576]`.
fn force_set_current_head(s: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Paras FutureCodeHash (r:1 w:1)
// Storage: Paras CurrentCodeHash (r:1 w:0)
@@ -78,54 +78,54 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: Paras UpgradeRestrictionSignal (r:0 w:1)
/// The range of component `c` is `[1, 3145728]`.
fn force_schedule_code_upgrade(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(8 as RefTimeWeight))
}
// Storage: Paras FutureCodeUpgrades (r:1 w:0)
// Storage: Paras Heads (r:0 w:1)
// Storage: Paras UpgradeGoAheadSignal (r:0 w:1)
/// The range of component `s` is `[1, 1048576]`.
fn force_note_new_head(s: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras ActionsQueue (r:1 w:1)
fn force_queue_action() -> Weight {
(19_269_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_269_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Paras PvfActiveVoteMap (r:1 w:0)
// Storage: Paras CodeByHash (r:1 w:1)
/// The range of component `c` is `[1, 3145728]`.
fn add_trusted_validation_code(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Paras CodeByHashRefs (r:1 w:0)
// Storage: Paras CodeByHash (r:0 w:1)
fn poke_unused_validation_code() -> Weight {
(4_769_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(4_769_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: ParasShared ActiveValidatorKeys (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
// Storage: Paras PvfActiveVoteMap (r:1 w:1)
fn include_pvf_check_statement() -> Weight {
(92_142_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(92_142_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: ParasShared ActiveValidatorKeys (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
@@ -135,9 +135,9 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: System Digest (r:1 w:1)
// Storage: Paras FutureCodeUpgrades (r:0 w:100)
fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
(680_774_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(104 as Weight))
Weight::from_ref_time(680_774_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(104 as RefTimeWeight))
}
// Storage: ParasShared ActiveValidatorKeys (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
@@ -148,9 +148,9 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: Paras UpgradeGoAheadSignal (r:0 w:100)
// Storage: Paras FutureCodeHash (r:0 w:100)
fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
(630_172_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(204 as Weight))
Weight::from_ref_time(630_172_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(204 as RefTimeWeight))
}
// Storage: ParasShared ActiveValidatorKeys (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
@@ -158,9 +158,9 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: Paras PvfActiveVoteList (r:1 w:1)
// Storage: Paras ActionsQueue (r:1 w:1)
fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
(535_446_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(535_446_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: ParasShared ActiveValidatorKeys (r:1 w:0)
// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
@@ -172,8 +172,8 @@ impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for WeightIn
// Storage: Paras CurrentCodeHash (r:0 w:100)
// Storage: Paras UpcomingParasGenesis (r:0 w:100)
fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
(702_781_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(304 as Weight))
Weight::from_ref_time(702_781_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(304 as RefTimeWeight))
}
}