Weight v1.5: Opaque Struct (#12138)

* initial idea

* update frame_support

* update a bunch more

* add ord

* adjust RuntimeDbWeight

* frame_system builds

* re-export

* frame_support tests pass

* frame_executive compile

* frame_executive builds

* frame_system tests passing

* pallet-utility tests pass

* fix a bunch of pallets

* more

* phragmen

* state-trie-migration

* scheduler and referenda

* pallet-election-provider-multi-phase

* aura

* staking

* more

* babe

* balances

* bunch more

* sudo

* transaction-payment

* asset-tx-payment

* last pallets

* fix alliance merge

* fix node template runtime

* fix pallet-contracts cc @athei

* fix node runtime

* fix compile on runtime-benchmarks feature

* comment

* fix frame-support-test

* fix more tests

* weight regex

* frame system works

* fix a bunch

* more

* more

* more

* more

* more

* more fixes

* update templates

* fix contracts benchmarks

* Update lib.rs

* Update lib.rs

* fix ui

* make scalar saturating mul const

* more const functions

* scalar div

* refactor using constant functions

* move impl

* fix overhead template

* use compactas

* Update lib.rs
This commit is contained in:
Shawn Tabrizi
2022-08-31 12:26:13 +01:00
committed by GitHub
parent 299f4ba541
commit 30951822ba
187 changed files with 5932 additions and 4930 deletions
+1 -1
View File
@@ -1765,7 +1765,7 @@ impl<T: Config> Pallet<T> {
/// # </weight>
fn begin_block(now: T::BlockNumber) -> Weight {
let max_block_weight = T::BlockWeights::get().max_block;
let mut weight = 0;
let mut weight = Weight::new();
let next = Self::lowest_unbaked();
let last = Self::referendum_count();
+1 -1
View File
@@ -78,7 +78,7 @@ impl Contains<Call> for BaseFilter {
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(1_000_000);
frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1_000_000));
}
impl frame_system::Config for Test {
type BaseCallFilter = BaseFilter;
+199 -199
View File
@@ -39,7 +39,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;
/// Weight functions needed for pallet_democracy.
@@ -80,44 +80,44 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Democracy Blacklist (r:1 w:0)
// Storage: Democracy DepositOf (r:0 w:1)
fn propose() -> Weight {
(48_328_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(48_328_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy DepositOf (r:1 w:1)
fn second(s: u32, ) -> Weight {
(30_923_000 as Weight)
Weight::from_ref_time(30_923_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((142_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn vote_new(r: u32, ) -> Weight {
(40_345_000 as Weight)
Weight::from_ref_time(40_345_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((140_000 as Weight).saturating_mul(r 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(140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn vote_existing(r: u32, ) -> Weight {
(39_853_000 as Weight)
Weight::from_ref_time(39_853_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((150_000 as Weight).saturating_mul(r 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(150_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy Cancellations (r:1 w:1)
fn emergency_cancel() -> Weight {
(19_364_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(19_364_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy NextExternal (r:1 w:1)
@@ -126,82 +126,82 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn blacklist(p: u32, ) -> Weight {
(57_708_000 as Weight)
Weight::from_ref_time(57_708_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((192_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
.saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:0)
fn external_propose(v: u32, ) -> Weight {
(10_714_000 as Weight)
Weight::from_ref_time(10_714_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((33_000 as Weight).saturating_mul(v 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(33_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_majority() -> Weight {
(3_697_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(3_697_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_default() -> Weight {
(3_831_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(3_831_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:1)
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn fast_track() -> Weight {
(20_271_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(20_271_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:1)
fn veto_external(v: u32, ) -> Weight {
(21_319_000 as Weight)
Weight::from_ref_time(21_319_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((52_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn cancel_proposal(p: u32, ) -> Weight {
(43_960_000 as Weight)
Weight::from_ref_time(43_960_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((184_000 as Weight).saturating_mul(p 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(184_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn cancel_referendum() -> Weight {
(13_475_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(13_475_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Scheduler Lookup (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn cancel_queued(r: u32, ) -> Weight {
(24_320_000 as Weight)
Weight::from_ref_time(24_320_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((560_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy LowestUnbaked (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
fn on_initialize_base(r: u32, ) -> Weight {
(3_428_000 as Weight)
Weight::from_ref_time(3_428_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_171_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy LowestUnbaked (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:0)
@@ -210,103 +210,103 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Democracy PublicProps (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
fn on_initialize_base_with_launch_period(r: u32, ) -> Weight {
(7_867_000 as Weight)
Weight::from_ref_time(7_867_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_177_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:3 w:3)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn delegate(r: u32, ) -> Weight {
(37_902_000 as Weight)
Weight::from_ref_time(37_902_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((4_335_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
}
// Storage: Democracy VotingOf (r:2 w:2)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
fn undelegate(r: u32, ) -> Weight {
(21_272_000 as Weight)
Weight::from_ref_time(21_272_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((4_351_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
}
// Storage: Democracy PublicProps (r:0 w:1)
fn clear_public_proposals() -> Weight {
(4_913_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(4_913_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
fn note_preimage(b: u32, ) -> Weight {
(27_986_000 as Weight)
Weight::from_ref_time(27_986_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
fn note_imminent_preimage(b: u32, ) -> Weight {
(20_058_000 as Weight)
Weight::from_ref_time(20_058_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
// Storage: System Account (r:1 w:0)
fn reap_preimage(b: u32, ) -> Weight {
(28_619_000 as Weight)
Weight::from_ref_time(28_619_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b 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(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn unlock_remove(r: u32, ) -> Weight {
(26_619_000 as Weight)
Weight::from_ref_time(26_619_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((56_000 as Weight).saturating_mul(r 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(56_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn unlock_set(r: u32, ) -> Weight {
(25_373_000 as Weight)
Weight::from_ref_time(25_373_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((142_000 as Weight).saturating_mul(r 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(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
fn remove_vote(r: u32, ) -> Weight {
(15_961_000 as Weight)
Weight::from_ref_time(15_961_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((115_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
fn remove_other_vote(r: u32, ) -> Weight {
(15_992_000 as Weight)
Weight::from_ref_time(15_992_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((113_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -317,44 +317,44 @@ impl WeightInfo for () {
// Storage: Democracy Blacklist (r:1 w:0)
// Storage: Democracy DepositOf (r:0 w:1)
fn propose() -> Weight {
(48_328_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
Weight::from_ref_time(48_328_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy DepositOf (r:1 w:1)
fn second(s: u32, ) -> Weight {
(30_923_000 as Weight)
Weight::from_ref_time(30_923_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((142_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn vote_new(r: u32, ) -> Weight {
(40_345_000 as Weight)
Weight::from_ref_time(40_345_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((140_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn vote_existing(r: u32, ) -> Weight {
(39_853_000 as Weight)
Weight::from_ref_time(39_853_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((150_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy Cancellations (r:1 w:1)
fn emergency_cancel() -> Weight {
(19_364_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
Weight::from_ref_time(19_364_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy NextExternal (r:1 w:1)
@@ -363,82 +363,82 @@ impl WeightInfo for () {
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn blacklist(p: u32, ) -> Weight {
(57_708_000 as Weight)
Weight::from_ref_time(57_708_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((192_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
.saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:0)
fn external_propose(v: u32, ) -> Weight {
(10_714_000 as Weight)
Weight::from_ref_time(10_714_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((33_000 as Weight).saturating_mul(v as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_majority() -> Weight {
(3_697_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(3_697_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_default() -> Weight {
(3_831_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(3_831_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:1)
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn fast_track() -> Weight {
(20_271_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
Weight::from_ref_time(20_271_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:1)
fn veto_external(v: u32, ) -> Weight {
(21_319_000 as Weight)
Weight::from_ref_time(21_319_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((52_000 as Weight).saturating_mul(v as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn cancel_proposal(p: u32, ) -> Weight {
(43_960_000 as Weight)
Weight::from_ref_time(43_960_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((184_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn cancel_referendum() -> Weight {
(13_475_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(13_475_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Scheduler Lookup (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
fn cancel_queued(r: u32, ) -> Weight {
(24_320_000 as Weight)
Weight::from_ref_time(24_320_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((560_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy LowestUnbaked (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
fn on_initialize_base(r: u32, ) -> Weight {
(3_428_000 as Weight)
Weight::from_ref_time(3_428_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_171_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy LowestUnbaked (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:0)
@@ -447,102 +447,102 @@ impl WeightInfo for () {
// Storage: Democracy PublicProps (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
fn on_initialize_base_with_launch_period(r: u32, ) -> Weight {
(7_867_000 as Weight)
Weight::from_ref_time(7_867_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_177_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:3 w:3)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn delegate(r: u32, ) -> Weight {
(37_902_000 as Weight)
Weight::from_ref_time(37_902_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((4_335_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
}
// Storage: Democracy VotingOf (r:2 w:2)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
fn undelegate(r: u32, ) -> Weight {
(21_272_000 as Weight)
Weight::from_ref_time(21_272_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((4_351_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
}
// Storage: Democracy PublicProps (r:0 w:1)
fn clear_public_proposals() -> Weight {
(4_913_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(4_913_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
fn note_preimage(b: u32, ) -> Weight {
(27_986_000 as Weight)
Weight::from_ref_time(27_986_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
fn note_imminent_preimage(b: u32, ) -> Weight {
(20_058_000 as Weight)
Weight::from_ref_time(20_058_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy Preimages (r:1 w:1)
// Storage: System Account (r:1 w:0)
fn reap_preimage(b: u32, ) -> Weight {
(28_619_000 as Weight)
Weight::from_ref_time(28_619_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn unlock_remove(r: u32, ) -> Weight {
(26_619_000 as Weight)
Weight::from_ref_time(26_619_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((56_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn unlock_set(r: u32, ) -> Weight {
(25_373_000 as Weight)
Weight::from_ref_time(25_373_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((142_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
fn remove_vote(r: u32, ) -> Weight {
(15_961_000 as Weight)
Weight::from_ref_time(15_961_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((115_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
fn remove_other_vote(r: u32, ) -> Weight {
(15_992_000 as Weight)
Weight::from_ref_time(15_992_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((113_000 as Weight).saturating_mul(r as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
}