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::hrmp`.
@@ -53,9 +53,9 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
fn hrmp_init_open_channel() -> Weight {
(38_011_000 as Weight)
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(38_011_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(9 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
// Storage: Paras ParaLifecycles (r:1 w:0)
@@ -64,9 +64,9 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
fn hrmp_accept_open_channel() -> Weight {
(33_575_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(33_575_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Hrmp HrmpChannels (r:1 w:0)
// Storage: Hrmp HrmpCloseChannelRequests (r:1 w:1)
@@ -74,9 +74,9 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
fn hrmp_close_channel() -> Weight {
(31_589_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(31_589_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Hrmp HrmpIngressChannelsIndex (r:128 w:127)
// Storage: Hrmp HrmpEgressChannelsIndex (r:1 w:1)
@@ -87,17 +87,17 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
/// The range of component `i` is `[0, 127]`.
/// The range of component `e` is `[0, 127]`.
fn force_clean_hrmp(i: u32, e: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 22_000
.saturating_add((9_971_000 as Weight).saturating_mul(i as Weight))
.saturating_add(Weight::from_ref_time(9_971_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight))
// Standard Error: 22_000
.saturating_add((9_951_000 as Weight).saturating_mul(e as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(i as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(e as Weight)))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(i as Weight)))
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(e as Weight)))
.saturating_add(Weight::from_ref_time(9_951_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(e as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((3 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((3 as RefTimeWeight).saturating_mul(e as RefTimeWeight)))
}
// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:0)
// Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2)
@@ -109,13 +109,13 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
// Storage: Hrmp HrmpChannels (r:0 w:2)
/// The range of component `c` is `[0, 128]`.
fn force_process_hrmp_open(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 35_000
.saturating_add((23_340_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((7 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((6 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(23_340_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((7 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((6 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
// Storage: Hrmp HrmpCloseChannelRequestsList (r:1 w:0)
// Storage: Hrmp HrmpChannels (r:2 w:2)
@@ -125,35 +125,35 @@ impl<T: frame_system::Config> runtime_parachains::hrmp::WeightInfo for WeightInf
// Storage: Hrmp HrmpChannelContents (r:0 w:2)
/// The range of component `c` is `[0, 128]`.
fn force_process_hrmp_close(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 23_000
.saturating_add((13_159_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(13_159_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((5 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
// Storage: Hrmp HrmpOpenChannelRequests (r:1 w:1)
// Storage: Hrmp HrmpOpenChannelRequestCount (r:1 w:1)
/// The range of component `c` is `[0, 128]`.
fn hrmp_cancel_open_request(c: u32, ) -> Weight {
(26_400_000 as Weight)
Weight::from_ref_time(26_400_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((51_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(51_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Hrmp HrmpOpenChannelRequestsList (r:1 w:1)
// Storage: Hrmp HrmpOpenChannelRequests (r:2 w:2)
/// The range of component `c` is `[0, 128]`.
fn clean_open_channel_requests(c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 7_000
.saturating_add((3_786_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(3_786_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
}