mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 11:35:41 +00:00
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:
@@ -355,7 +355,7 @@ benchmarks_instance_pallet! {
|
||||
// Whitelist voter account from further DB operations.
|
||||
let voter_key = frame_system::Account::<T>::hashed_key_for(&voter);
|
||||
frame_benchmarking::benchmarking::add_to_whitelist(voter_key.into());
|
||||
}: close(SystemOrigin::Signed(voter), last_hash, index, Weight::max_value(), bytes_in_storage)
|
||||
}: close(SystemOrigin::Signed(voter), last_hash, index, Weight::MAX, bytes_in_storage)
|
||||
verify {
|
||||
// The last proposal is removed.
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
@@ -436,7 +436,7 @@ benchmarks_instance_pallet! {
|
||||
index, approve,
|
||||
)?;
|
||||
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, index, Weight::max_value(), bytes_in_storage)
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, index, Weight::MAX, bytes_in_storage)
|
||||
verify {
|
||||
// The last proposal is removed.
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
@@ -511,7 +511,7 @@ benchmarks_instance_pallet! {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), p as usize);
|
||||
|
||||
// Prime nay will close it as disapproved
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, index, Weight::max_value(), bytes_in_storage)
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, index, Weight::MAX, bytes_in_storage)
|
||||
verify {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Disapproved { proposal_hash: last_hash }.into());
|
||||
@@ -583,7 +583,7 @@ benchmarks_instance_pallet! {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), p as usize);
|
||||
|
||||
// Prime aye will close it as approved
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, p - 1, Weight::max_value(), bytes_in_storage)
|
||||
}: close(SystemOrigin::Signed(caller), last_hash, p - 1, Weight::MAX, bytes_in_storage)
|
||||
verify {
|
||||
assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize);
|
||||
assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Err(DispatchError::BadOrigin) }.into());
|
||||
|
||||
@@ -45,7 +45,7 @@ pub fn migrate<T: frame_system::Config, P: GetStorageVersion + PalletInfoAccess,
|
||||
target: "runtime::collective",
|
||||
"New pallet name is equal to the old pallet name. No migration needs to be done.",
|
||||
);
|
||||
return 0
|
||||
return Weight::zero()
|
||||
}
|
||||
|
||||
let on_chain_storage_version = <P as GetStorageVersion>::on_chain_storage_version();
|
||||
@@ -70,7 +70,7 @@ pub fn migrate<T: frame_system::Config, P: GetStorageVersion + PalletInfoAccess,
|
||||
"Attempted to apply migration to v4 but failed because storage version is {:?}",
|
||||
on_chain_storage_version,
|
||||
);
|
||||
0
|
||||
Weight::zero()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ parameter_types! {
|
||||
pub const MotionDuration: u64 = 3;
|
||||
pub const MaxProposals: u32 = 100;
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(1024);
|
||||
frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024));
|
||||
}
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
@@ -270,7 +270,13 @@ fn proposal_weight_limit_works_on_approve() {
|
||||
// With 1's prime vote, this should pass
|
||||
System::set_block_number(4);
|
||||
assert_noop!(
|
||||
Collective::close(Origin::signed(4), hash, 0, proposal_weight - 100, proposal_len),
|
||||
Collective::close(
|
||||
Origin::signed(4),
|
||||
hash,
|
||||
0,
|
||||
proposal_weight - Weight::from_ref_time(100),
|
||||
proposal_len
|
||||
),
|
||||
Error::<Test, Instance1>::WrongProposalWeight
|
||||
);
|
||||
assert_ok!(Collective::close(Origin::signed(4), hash, 0, proposal_weight, proposal_len));
|
||||
@@ -301,7 +307,7 @@ fn proposal_weight_limit_ignored_on_disapprove() {
|
||||
Origin::signed(4),
|
||||
hash,
|
||||
0,
|
||||
proposal_weight - 100,
|
||||
proposal_weight - Weight::from_ref_time(100),
|
||||
proposal_len
|
||||
));
|
||||
})
|
||||
@@ -687,7 +693,11 @@ fn correct_validate_and_get_proposal() {
|
||||
Error::<Test, Instance1>::WrongProposalLength
|
||||
);
|
||||
assert_noop!(
|
||||
Collective::validate_and_get_proposal(&hash, length, weight - 10),
|
||||
Collective::validate_and_get_proposal(
|
||||
&hash,
|
||||
length,
|
||||
weight - Weight::from_ref_time(10)
|
||||
),
|
||||
Error::<Test, Instance1>::WrongProposalWeight
|
||||
);
|
||||
let res = Collective::validate_and_get_proposal(&hash, length, weight);
|
||||
@@ -1196,18 +1206,18 @@ fn close_disapprove_does_not_care_about_weight_or_len() {
|
||||
assert_ok!(Collective::vote(Origin::signed(2), hash, 0, true));
|
||||
// It will not close with bad weight/len information
|
||||
assert_noop!(
|
||||
Collective::close(Origin::signed(2), hash, 0, 0, 0),
|
||||
Collective::close(Origin::signed(2), hash, 0, Weight::zero(), 0),
|
||||
Error::<Test, Instance1>::WrongProposalLength,
|
||||
);
|
||||
assert_noop!(
|
||||
Collective::close(Origin::signed(2), hash, 0, 0, proposal_len),
|
||||
Collective::close(Origin::signed(2), hash, 0, Weight::zero(), proposal_len),
|
||||
Error::<Test, Instance1>::WrongProposalWeight,
|
||||
);
|
||||
// Now we make the proposal fail
|
||||
assert_ok!(Collective::vote(Origin::signed(1), hash, 0, false));
|
||||
assert_ok!(Collective::vote(Origin::signed(2), hash, 0, false));
|
||||
// It can close even if the weight/len information is bad
|
||||
assert_ok!(Collective::close(Origin::signed(2), hash, 0, 0, 0));
|
||||
assert_ok!(Collective::close(Origin::signed(2), hash, 0, Weight::zero(), 0));
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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_collective.
|
||||
@@ -64,36 +64,36 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Council Voting (r:100 w:100)
|
||||
// Storage: Council Prime (r:0 w:1)
|
||||
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((10_280_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((126_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((13_310_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
(16_819_000 as Weight)
|
||||
Weight::from_ref_time(16_819_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((33_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:0)
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
(18_849_000 as Weight)
|
||||
Weight::from_ref_time(18_849_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((56_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
@@ -101,52 +101,52 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Council ProposalCount (r:1 w:1)
|
||||
// Storage: Council Voting (r:0 w:1)
|
||||
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(22_204_000 as Weight)
|
||||
Weight::from_ref_time(22_204_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((8_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((49_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((180_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
(30_941_000 as Weight)
|
||||
Weight::from_ref_time(30_941_000 as RefTimeWeight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((77_000 as Weight).saturating_mul(m 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(77_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(32_485_000 as Weight)
|
||||
Weight::from_ref_time(32_485_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((39_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((124_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(124_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: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(33_487_000 as Weight)
|
||||
Weight::from_ref_time(33_487_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((66_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((157_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
@@ -154,13 +154,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(33_494_000 as Weight)
|
||||
Weight::from_ref_time(33_494_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((58_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((124_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
@@ -168,25 +168,25 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(36_566_000 as Weight)
|
||||
Weight::from_ref_time(36_566_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((63_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((158_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council Voting (r:0 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
(20_159_000 as Weight)
|
||||
Weight::from_ref_time(20_159_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((173_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,36 +197,36 @@ impl WeightInfo for () {
|
||||
// Storage: Council Voting (r:100 w:100)
|
||||
// Storage: Council Prime (r:0 w:1)
|
||||
fn set_members(m: u32, n: u32, p: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
Weight::from_ref_time(0 as RefTimeWeight)
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((10_280_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((126_000 as Weight).saturating_mul(n as Weight))
|
||||
.saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((13_310_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
|
||||
.saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
fn execute(b: u32, m: u32, ) -> Weight {
|
||||
(16_819_000 as Weight)
|
||||
Weight::from_ref_time(16_819_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((33_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:0)
|
||||
fn propose_execute(b: u32, m: u32, ) -> Weight {
|
||||
(18_849_000 as Weight)
|
||||
Weight::from_ref_time(18_849_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((56_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
@@ -234,52 +234,52 @@ impl WeightInfo for () {
|
||||
// Storage: Council ProposalCount (r:1 w:1)
|
||||
// Storage: Council Voting (r:0 w:1)
|
||||
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(22_204_000 as Weight)
|
||||
Weight::from_ref_time(22_204_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((8_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((49_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((180_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
fn vote(m: u32, ) -> Weight {
|
||||
(30_941_000 as Weight)
|
||||
Weight::from_ref_time(30_941_000 as RefTimeWeight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((77_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(32_485_000 as Weight)
|
||||
Weight::from_ref_time(32_485_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((39_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((124_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(124_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: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(33_487_000 as Weight)
|
||||
Weight::from_ref_time(33_487_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((66_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((157_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
@@ -287,13 +287,13 @@ impl WeightInfo for () {
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn close_disapproved(m: u32, p: u32, ) -> Weight {
|
||||
(33_494_000 as Weight)
|
||||
Weight::from_ref_time(33_494_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((58_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((124_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Voting (r:1 w:1)
|
||||
// Storage: Council Members (r:1 w:0)
|
||||
@@ -301,24 +301,24 @@ impl WeightInfo for () {
|
||||
// Storage: Council ProposalOf (r:1 w:1)
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
|
||||
(36_566_000 as Weight)
|
||||
Weight::from_ref_time(36_566_000 as RefTimeWeight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((5_000 as Weight).saturating_mul(b as Weight))
|
||||
.saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((63_000 as Weight).saturating_mul(m as Weight))
|
||||
.saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((158_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
// Storage: Council Proposals (r:1 w:1)
|
||||
// Storage: Council Voting (r:0 w:1)
|
||||
// Storage: Council ProposalOf (r:0 w:1)
|
||||
fn disapprove_proposal(p: u32, ) -> Weight {
|
||||
(20_159_000 as Weight)
|
||||
Weight::from_ref_time(20_159_000 as RefTimeWeight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((173_000 as Weight).saturating_mul(p as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
.saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user