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 `pallet_nomination_pools`.
@@ -58,9 +58,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:3 w:3)
// Storage: VoterList ListBags (r:2 w:2)
fn join() -> Weight {
(127_461_000 as Weight)
.saturating_add(T::DbWeight::get().reads(17 as Weight))
.saturating_add(T::DbWeight::get().writes(12 as Weight))
Weight::from_ref_time(127_461_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(17 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
@@ -72,9 +72,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:3 w:3)
// Storage: VoterList ListBags (r:2 w:2)
fn bond_extra_transfer() -> Weight {
(119_965_000 as Weight)
.saturating_add(T::DbWeight::get().reads(14 as Weight))
.saturating_add(T::DbWeight::get().writes(12 as Weight))
Weight::from_ref_time(119_965_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(14 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
@@ -86,18 +86,18 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:2 w:2)
// Storage: VoterList ListBags (r:2 w:2)
fn bond_extra_reward() -> Weight {
(126_924_000 as Weight)
.saturating_add(T::DbWeight::get().reads(13 as Weight))
.saturating_add(T::DbWeight::get().writes(12 as Weight))
Weight::from_ref_time(126_924_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(13 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: NominationPools RewardPools (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn claim_payout() -> Weight {
(48_168_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(48_168_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
@@ -114,9 +114,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
fn unbond() -> Weight {
(124_841_000 as Weight)
.saturating_add(T::DbWeight::get().reads(18 as Weight))
.saturating_add(T::DbWeight::get().writes(13 as Weight))
Weight::from_ref_time(124_841_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(18 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(13 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:1)
@@ -124,11 +124,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: Balances Locks (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
(41_129_000 as Weight)
Weight::from_ref_time(41_129_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((33_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
@@ -140,11 +140,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
(78_870_000 as Weight)
Weight::from_ref_time(78_870_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((49_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
.saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(7 as RefTimeWeight))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
@@ -167,9 +167,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: Staking Payee (r:0 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
(137_414_000 as Weight)
.saturating_add(T::DbWeight::get().reads(19 as Weight))
.saturating_add(T::DbWeight::get().writes(16 as Weight))
Weight::from_ref_time(137_414_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(19 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(16 as RefTimeWeight))
}
// Storage: Staking MinNominatorBond (r:1 w:0)
// Storage: NominationPools MinCreateBond (r:1 w:0)
@@ -194,9 +194,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn create() -> Weight {
(131_154_000 as Weight)
.saturating_add(T::DbWeight::get().reads(22 as Weight))
.saturating_add(T::DbWeight::get().writes(15 as Weight))
Weight::from_ref_time(131_154_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(22 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(15 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:0)
@@ -212,30 +212,30 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: Staking CounterForNominators (r:1 w:1)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
(50_310_000 as Weight)
Weight::from_ref_time(50_310_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((2_137_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
.saturating_add(Weight::from_ref_time(2_137_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(12 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: Staking Ledger (r:1 w:0)
fn set_state() -> Weight {
(25_062_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(25_062_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: NominationPools Metadata (r:1 w:1)
// Storage: NominationPools CounterForMetadata (r:1 w:1)
/// The range of component `n` is `[1, 256]`.
fn set_metadata(n: u32, ) -> Weight {
(13_890_000 as Weight)
Weight::from_ref_time(13_890_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: NominationPools MinJoinBond (r:0 w:1)
// Storage: NominationPools MaxPoolMembers (r:0 w:1)
@@ -243,14 +243,14 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools MinCreateBond (r:0 w:1)
// Storage: NominationPools MaxPools (r:0 w:1)
fn set_configs() -> Weight {
(6_811_000 as Weight)
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(6_811_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn update_roles() -> Weight {
(21_056_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(21_056_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:0)
@@ -261,8 +261,8 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListBags (r:1 w:1)
// Storage: VoterList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
(48_506_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(48_506_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
}