Allow Alliance Fellows to Give Up Voting Rights (#12730)

* allow fellows to abdicate voting rights

* rename founders to founding fellows, give equal power

* Drop FoundingFellow role and veto call (#12762)

* drop FoundingFellow role

* drop veto call

* Storage migration to remove founder role (#12766)

* storage migration to remove founder role

* skip migration if no members

* truncate the final fellows set if overflows

* change log - action order

* MemberAbdicated -> FellowAbdicated

Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
This commit is contained in:
joe petrowski
2022-11-25 15:52:26 +01:00
committed by GitHub
parent 7ed2bc7258
commit bcea0d7e7f
10 changed files with 614 additions and 775 deletions
+260 -292
View File
@@ -1,41 +1,22 @@
// This file is part of Substrate.
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for pallet_alliance
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
//! DATE: 2022-11-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// ./target/release/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_alliance
// --pallet=pallet-alliance
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./frame/alliance/src/weights.rs
// --header=./HEADER-APACHE2
// --output=./frame/alliance/src/._weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -47,14 +28,14 @@ use sp_std::marker::PhantomData;
/// Weight functions needed for pallet_alliance.
pub trait WeightInfo {
fn propose_proposed(b: u32, x: u32, y: u32, p: u32, ) -> Weight;
fn vote(x: u32, y: u32, ) -> Weight;
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight;
fn vote(m: u32, ) -> Weight;
fn veto(p: u32, ) -> Weight;
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight;
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight;
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight;
fn close_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight;
fn init_members(x: u32, y: u32, z: u32, ) -> Weight;
fn close_early_disapproved(m: u32, p: u32, ) -> Weight;
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight;
fn close_disapproved(m: u32, p: u32, ) -> Weight;
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight;
fn init_members(m: u32, z: u32, ) -> Weight;
fn disband(x: u32, y: u32, z: u32, ) -> Weight;
fn set_rule() -> Weight;
fn announce() -> Weight;
@@ -67,6 +48,7 @@ pub trait WeightInfo {
fn kick_member() -> Weight;
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight;
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight;
fn abdicate_fellow_status() -> Weight;
}
/// Weights for pallet_alliance using the Substrate node and recommended hardware.
@@ -78,31 +60,29 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion ProposalCount (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 43_720 nanoseconds.
Weight::from_ref_time(44_766_307 as u64)
// Standard Error: 2_522
.saturating_add(Weight::from_ref_time(54_721 as u64).saturating_mul(y as u64))
// Standard Error: 2_301
.saturating_add(Weight::from_ref_time(173_300 as u64).saturating_mul(p as u64))
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(24_357_172 as u64)
// Standard Error: 428
.saturating_add(Weight::from_ref_time(233 as u64).saturating_mul(b as u64))
// Standard Error: 4_474
.saturating_add(Weight::from_ref_time(48_024 as u64).saturating_mul(m as u64))
// Standard Error: 4_418
.saturating_add(Weight::from_ref_time(97_604 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Alliance Members (r:2 w:0)
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
/// The range of component `x` is `[3, 10]`.
/// The range of component `y` is `[2, 90]`.
fn vote(x: u32, y: u32, ) -> Weight {
// Minimum execution time: 46_984 nanoseconds.
Weight::from_ref_time(46_837_255 as u64)
// Standard Error: 32_860
.saturating_add(Weight::from_ref_time(273_691 as u64).saturating_mul(x as u64))
// Standard Error: 2_781
.saturating_add(Weight::from_ref_time(126_964 as u64).saturating_mul(y as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
/// The range of component `m` is `[5, 100]`.
fn vote(m: u32, ) -> Weight {
// Minimum execution time: 24_000 nanoseconds.
Weight::from_ref_time(26_617_201 as u64)
// Standard Error: 4_280
.saturating_add(Weight::from_ref_time(43_152 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:1 w:0)
@@ -111,10 +91,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
// Minimum execution time: 34_734 nanoseconds.
Weight::from_ref_time(37_652_708 as u64)
// Standard Error: 1_270
.saturating_add(Weight::from_ref_time(183_078 as u64).saturating_mul(p as u64))
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(26_045_752 as u64)
// Standard Error: 2_154
.saturating_add(Weight::from_ref_time(61_220 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -123,18 +103,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 50_147 nanoseconds.
Weight::from_ref_time(42_719_616 as u64)
// Standard Error: 19_981
.saturating_add(Weight::from_ref_time(188_796 as u64).saturating_mul(x as u64))
// Standard Error: 1_947
.saturating_add(Weight::from_ref_time(95_998 as u64).saturating_mul(y as u64))
// Standard Error: 1_739
.saturating_add(Weight::from_ref_time(177_837 as u64).saturating_mul(p as u64))
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(25_697_866 as u64)
// Standard Error: 3_827
.saturating_add(Weight::from_ref_time(48_360 as u64).saturating_mul(m as u64))
// Standard Error: 3_731
.saturating_add(Weight::from_ref_time(116_922 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -144,20 +121,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 59_495 nanoseconds.
Weight::from_ref_time(53_137_721 as u64)
// Standard Error: 138
.saturating_add(Weight::from_ref_time(1_979 as u64).saturating_mul(b as u64))
// Standard Error: 16_388
.saturating_add(Weight::from_ref_time(8_198 as u64).saturating_mul(x as u64))
// Standard Error: 1_599
.saturating_add(Weight::from_ref_time(86_577 as u64).saturating_mul(y as u64))
// Standard Error: 1_428
.saturating_add(Weight::from_ref_time(215_905 as u64).saturating_mul(p as u64))
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 34_000 nanoseconds.
Weight::from_ref_time(30_725_464 as u64)
// Standard Error: 370
.saturating_add(Weight::from_ref_time(2_367 as u64).saturating_mul(b as u64))
// Standard Error: 3_920
.saturating_add(Weight::from_ref_time(40_710 as u64).saturating_mul(m as u64))
// Standard Error: 3_822
.saturating_add(Weight::from_ref_time(111_866 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -167,16 +141,15 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 52_405 nanoseconds.
Weight::from_ref_time(44_494_732 as u64)
// Standard Error: 1_759
.saturating_add(Weight::from_ref_time(118_517 as u64).saturating_mul(y as u64))
// Standard Error: 1_572
.saturating_add(Weight::from_ref_time(198_256 as u64).saturating_mul(p as u64))
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(29_444_599 as u64)
// Standard Error: 4_043
.saturating_add(Weight::from_ref_time(48_928 as u64).saturating_mul(m as u64))
// Standard Error: 3_994
.saturating_add(Weight::from_ref_time(76_527 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
@@ -187,39 +160,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[5, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 52_737 nanoseconds.
Weight::from_ref_time(45_874_458 as u64)
// Standard Error: 140
.saturating_add(Weight::from_ref_time(601 as u64).saturating_mul(b as u64))
// Standard Error: 1_623
.saturating_add(Weight::from_ref_time(88_372 as u64).saturating_mul(y as u64))
// Standard Error: 1_449
.saturating_add(Weight::from_ref_time(197_595 as u64).saturating_mul(p as u64))
fn close_approved(_b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(32_315_075 as u64)
// Standard Error: 4_502
.saturating_add(Weight::from_ref_time(43_205 as u64).saturating_mul(m as u64))
// Standard Error: 4_340
.saturating_add(Weight::from_ref_time(101_872 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Members (r:1 w:1)
/// The range of component `x` is `[1, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `m` is `[1, 100]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(x: u32, y: u32, z: u32, ) -> Weight {
// Minimum execution time: 48_821 nanoseconds.
Weight::from_ref_time(32_972_152 as u64)
// Standard Error: 17_618
.saturating_add(Weight::from_ref_time(230_451 as u64).saturating_mul(x as u64))
// Standard Error: 1_865
.saturating_add(Weight::from_ref_time(172_532 as u64).saturating_mul(y as u64))
// Standard Error: 1_682
.saturating_add(Weight::from_ref_time(145_258 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
fn init_members(m: u32, z: u32, ) -> Weight {
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(13_523_882 as u64)
// Standard Error: 1_823
.saturating_add(Weight::from_ref_time(91_625 as u64).saturating_mul(m as u64))
// Standard Error: 1_802
.saturating_add(Weight::from_ref_time(98_184 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:101 w:50)
// Storage: System Account (r:50 w:50)
@@ -229,67 +196,67 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `y` is `[0, 100]`.
/// The range of component `z` is `[0, 50]`.
fn disband(x: u32, y: u32, z: u32, ) -> Weight {
// Minimum execution time: 256_235 nanoseconds.
Weight::from_ref_time(258_695_000 as u64)
// Standard Error: 19_643
.saturating_add(Weight::from_ref_time(436_821 as u64).saturating_mul(x as u64))
// Standard Error: 19_549
.saturating_add(Weight::from_ref_time(496_858 as u64).saturating_mul(y as u64))
// Standard Error: 39_062
.saturating_add(Weight::from_ref_time(9_169_692 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
// Minimum execution time: 145_000 nanoseconds.
Weight::from_ref_time(147_000_000 as u64)
// Standard Error: 13_290
.saturating_add(Weight::from_ref_time(304_371 as u64).saturating_mul(x as u64))
// Standard Error: 13_226
.saturating_add(Weight::from_ref_time(330_798 as u64).saturating_mul(y as u64))
// Standard Error: 26_428
.saturating_add(Weight::from_ref_time(7_207_748 as u64).saturating_mul(z as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(y as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(z as u64)))
.saturating_add(T::DbWeight::get().writes(5 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(z as u64)))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
// Minimum execution time: 19_205 nanoseconds.
Weight::from_ref_time(19_502_000 as u64)
// Minimum execution time: 11_000 nanoseconds.
Weight::from_ref_time(12_000_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
// Minimum execution time: 22_562 nanoseconds.
Weight::from_ref_time(22_842_000 as u64)
// Minimum execution time: 13_000 nanoseconds.
Weight::from_ref_time(14_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
// Minimum execution time: 23_773 nanoseconds.
Weight::from_ref_time(24_212_000 as u64)
// Minimum execution time: 14_000 nanoseconds.
Weight::from_ref_time(14_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
// Minimum execution time: 57_709 nanoseconds.
Weight::from_ref_time(59_155_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(41_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
// Minimum execution time: 44_576 nanoseconds.
Weight::from_ref_time(45_162_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
// Minimum execution time: 38_913 nanoseconds.
Weight::from_ref_time(39_637_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: Alliance Members (r:4 w:2)
@@ -298,8 +265,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Prime (r:0 w:1)
// Storage: Alliance RetiringMembers (r:0 w:1)
fn give_retirement_notice() -> Weight {
// Minimum execution time: 42_947 nanoseconds.
Weight::from_ref_time(43_414_000 as u64)
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(32_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -308,8 +275,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn retire() -> Weight {
// Minimum execution time: 46_281 nanoseconds.
Weight::from_ref_time(46_703_000 as u64)
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
@@ -320,8 +287,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn kick_member() -> Weight {
// Minimum execution time: 65_274 nanoseconds.
Weight::from_ref_time(65_762_000 as u64)
// Minimum execution time: 45_000 nanoseconds.
Weight::from_ref_time(47_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
@@ -330,12 +297,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Minimum execution time: 17_396 nanoseconds.
Weight::from_ref_time(17_638_000 as u64)
// Standard Error: 2_602
.saturating_add(Weight::from_ref_time(1_286_177 as u64).saturating_mul(n as u64))
// Standard Error: 1_019
.saturating_add(Weight::from_ref_time(70_947 as u64).saturating_mul(l as u64))
// Minimum execution time: 9_000 nanoseconds.
Weight::from_ref_time(9_512_816 as u64)
// Standard Error: 2_976
.saturating_add(Weight::from_ref_time(560_175 as u64).saturating_mul(n as u64))
// Standard Error: 1_169
.saturating_add(Weight::from_ref_time(24_530 as u64).saturating_mul(l as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -343,16 +310,24 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Minimum execution time: 17_446 nanoseconds.
Weight::from_ref_time(17_725_000 as u64)
// Standard Error: 163_579
.saturating_add(Weight::from_ref_time(12_823_232 as u64).saturating_mul(n as u64))
// Standard Error: 64_064
.saturating_add(Weight::from_ref_time(496_642 as u64).saturating_mul(l as u64))
fn remove_unscrupulous_items(n: u32, _l: u32, ) -> Weight {
// Minimum execution time: 10_000 nanoseconds.
Weight::from_ref_time(10_000_000 as u64)
// Standard Error: 94_049
.saturating_add(Weight::from_ref_time(10_887_604 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn abdicate_fellow_status() -> Weight {
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
}
// For backwards compatibility and tests
@@ -363,31 +338,29 @@ impl WeightInfo for () {
// Storage: AllianceMotion ProposalCount (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 43_720 nanoseconds.
Weight::from_ref_time(44_766_307 as u64)
// Standard Error: 2_522
.saturating_add(Weight::from_ref_time(54_721 as u64).saturating_mul(y as u64))
// Standard Error: 2_301
.saturating_add(Weight::from_ref_time(173_300 as u64).saturating_mul(p as u64))
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(24_357_172 as u64)
// Standard Error: 428
.saturating_add(Weight::from_ref_time(233 as u64).saturating_mul(b as u64))
// Standard Error: 4_474
.saturating_add(Weight::from_ref_time(48_024 as u64).saturating_mul(m as u64))
// Standard Error: 4_418
.saturating_add(Weight::from_ref_time(97_604 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Alliance Members (r:2 w:0)
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
/// The range of component `x` is `[3, 10]`.
/// The range of component `y` is `[2, 90]`.
fn vote(x: u32, y: u32, ) -> Weight {
// Minimum execution time: 46_984 nanoseconds.
Weight::from_ref_time(46_837_255 as u64)
// Standard Error: 32_860
.saturating_add(Weight::from_ref_time(273_691 as u64).saturating_mul(x as u64))
// Standard Error: 2_781
.saturating_add(Weight::from_ref_time(126_964 as u64).saturating_mul(y as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
/// The range of component `m` is `[5, 100]`.
fn vote(m: u32, ) -> Weight {
// Minimum execution time: 24_000 nanoseconds.
Weight::from_ref_time(26_617_201 as u64)
// Standard Error: 4_280
.saturating_add(Weight::from_ref_time(43_152 as u64).saturating_mul(m as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:1 w:0)
@@ -396,10 +369,10 @@ impl WeightInfo for () {
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
// Minimum execution time: 34_734 nanoseconds.
Weight::from_ref_time(37_652_708 as u64)
// Standard Error: 1_270
.saturating_add(Weight::from_ref_time(183_078 as u64).saturating_mul(p as u64))
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(26_045_752 as u64)
// Standard Error: 2_154
.saturating_add(Weight::from_ref_time(61_220 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -408,18 +381,15 @@ impl WeightInfo for () {
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 50_147 nanoseconds.
Weight::from_ref_time(42_719_616 as u64)
// Standard Error: 19_981
.saturating_add(Weight::from_ref_time(188_796 as u64).saturating_mul(x as u64))
// Standard Error: 1_947
.saturating_add(Weight::from_ref_time(95_998 as u64).saturating_mul(y as u64))
// Standard Error: 1_739
.saturating_add(Weight::from_ref_time(177_837 as u64).saturating_mul(p as u64))
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 30_000 nanoseconds.
Weight::from_ref_time(25_697_866 as u64)
// Standard Error: 3_827
.saturating_add(Weight::from_ref_time(48_360 as u64).saturating_mul(m as u64))
// Standard Error: 3_731
.saturating_add(Weight::from_ref_time(116_922 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -429,20 +399,17 @@ impl WeightInfo for () {
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 59_495 nanoseconds.
Weight::from_ref_time(53_137_721 as u64)
// Standard Error: 138
.saturating_add(Weight::from_ref_time(1_979 as u64).saturating_mul(b as u64))
// Standard Error: 16_388
.saturating_add(Weight::from_ref_time(8_198 as u64).saturating_mul(x as u64))
// Standard Error: 1_599
.saturating_add(Weight::from_ref_time(86_577 as u64).saturating_mul(y as u64))
// Standard Error: 1_428
.saturating_add(Weight::from_ref_time(215_905 as u64).saturating_mul(p as u64))
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 34_000 nanoseconds.
Weight::from_ref_time(30_725_464 as u64)
// Standard Error: 370
.saturating_add(Weight::from_ref_time(2_367 as u64).saturating_mul(b as u64))
// Standard Error: 3_920
.saturating_add(Weight::from_ref_time(40_710 as u64).saturating_mul(m as u64))
// Standard Error: 3_822
.saturating_add(Weight::from_ref_time(111_866 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -452,16 +419,15 @@ impl WeightInfo for () {
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 52_405 nanoseconds.
Weight::from_ref_time(44_494_732 as u64)
// Standard Error: 1_759
.saturating_add(Weight::from_ref_time(118_517 as u64).saturating_mul(y as u64))
// Standard Error: 1_572
.saturating_add(Weight::from_ref_time(198_256 as u64).saturating_mul(p as u64))
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(29_444_599 as u64)
// Standard Error: 4_043
.saturating_add(Weight::from_ref_time(48_928 as u64).saturating_mul(m as u64))
// Standard Error: 3_994
.saturating_add(Weight::from_ref_time(76_527 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
@@ -472,39 +438,33 @@ impl WeightInfo for () {
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `m` is `[5, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
// Minimum execution time: 52_737 nanoseconds.
Weight::from_ref_time(45_874_458 as u64)
// Standard Error: 140
.saturating_add(Weight::from_ref_time(601 as u64).saturating_mul(b as u64))
// Standard Error: 1_623
.saturating_add(Weight::from_ref_time(88_372 as u64).saturating_mul(y as u64))
// Standard Error: 1_449
.saturating_add(Weight::from_ref_time(197_595 as u64).saturating_mul(p as u64))
fn close_approved(_b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(32_315_075 as u64)
// Standard Error: 4_502
.saturating_add(Weight::from_ref_time(43_205 as u64).saturating_mul(m as u64))
// Standard Error: 4_340
.saturating_add(Weight::from_ref_time(101_872 as u64).saturating_mul(p as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Members (r:1 w:1)
/// The range of component `x` is `[1, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `m` is `[1, 100]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(x: u32, y: u32, z: u32, ) -> Weight {
// Minimum execution time: 48_821 nanoseconds.
Weight::from_ref_time(32_972_152 as u64)
// Standard Error: 17_618
.saturating_add(Weight::from_ref_time(230_451 as u64).saturating_mul(x as u64))
// Standard Error: 1_865
.saturating_add(Weight::from_ref_time(172_532 as u64).saturating_mul(y as u64))
// Standard Error: 1_682
.saturating_add(Weight::from_ref_time(145_258 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
fn init_members(m: u32, z: u32, ) -> Weight {
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(13_523_882 as u64)
// Standard Error: 1_823
.saturating_add(Weight::from_ref_time(91_625 as u64).saturating_mul(m as u64))
// Standard Error: 1_802
.saturating_add(Weight::from_ref_time(98_184 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:101 w:50)
// Storage: System Account (r:50 w:50)
@@ -514,67 +474,67 @@ impl WeightInfo for () {
/// The range of component `y` is `[0, 100]`.
/// The range of component `z` is `[0, 50]`.
fn disband(x: u32, y: u32, z: u32, ) -> Weight {
// Minimum execution time: 256_235 nanoseconds.
Weight::from_ref_time(258_695_000 as u64)
// Standard Error: 19_643
.saturating_add(Weight::from_ref_time(436_821 as u64).saturating_mul(x as u64))
// Standard Error: 19_549
.saturating_add(Weight::from_ref_time(496_858 as u64).saturating_mul(y as u64))
// Standard Error: 39_062
.saturating_add(Weight::from_ref_time(9_169_692 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
// Minimum execution time: 145_000 nanoseconds.
Weight::from_ref_time(147_000_000 as u64)
// Standard Error: 13_290
.saturating_add(Weight::from_ref_time(304_371 as u64).saturating_mul(x as u64))
// Standard Error: 13_226
.saturating_add(Weight::from_ref_time(330_798 as u64).saturating_mul(y as u64))
// Standard Error: 26_428
.saturating_add(Weight::from_ref_time(7_207_748 as u64).saturating_mul(z as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(x as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(y as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(z as u64)))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(z as u64)))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
// Minimum execution time: 19_205 nanoseconds.
Weight::from_ref_time(19_502_000 as u64)
// Minimum execution time: 11_000 nanoseconds.
Weight::from_ref_time(12_000_000 as u64)
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
// Minimum execution time: 22_562 nanoseconds.
Weight::from_ref_time(22_842_000 as u64)
// Minimum execution time: 13_000 nanoseconds.
Weight::from_ref_time(14_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
// Minimum execution time: 23_773 nanoseconds.
Weight::from_ref_time(24_212_000 as u64)
// Minimum execution time: 14_000 nanoseconds.
Weight::from_ref_time(14_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
// Minimum execution time: 57_709 nanoseconds.
Weight::from_ref_time(59_155_000 as u64)
.saturating_add(RocksDbWeight::get().reads(6 as u64))
// Minimum execution time: 39_000 nanoseconds.
Weight::from_ref_time(41_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(3 as u64))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
// Minimum execution time: 44_576 nanoseconds.
Weight::from_ref_time(45_162_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: Alliance Members (r:2 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
// Minimum execution time: 38_913 nanoseconds.
Weight::from_ref_time(39_637_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
// Minimum execution time: 23_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
// Storage: Alliance Members (r:4 w:2)
@@ -583,8 +543,8 @@ impl WeightInfo for () {
// Storage: AllianceMotion Prime (r:0 w:1)
// Storage: Alliance RetiringMembers (r:0 w:1)
fn give_retirement_notice() -> Weight {
// Minimum execution time: 42_947 nanoseconds.
Weight::from_ref_time(43_414_000 as u64)
// Minimum execution time: 31_000 nanoseconds.
Weight::from_ref_time(32_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -593,8 +553,8 @@ impl WeightInfo for () {
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn retire() -> Weight {
// Minimum execution time: 46_281 nanoseconds.
Weight::from_ref_time(46_703_000 as u64)
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
@@ -605,8 +565,8 @@ impl WeightInfo for () {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn kick_member() -> Weight {
// Minimum execution time: 65_274 nanoseconds.
Weight::from_ref_time(65_762_000 as u64)
// Minimum execution time: 45_000 nanoseconds.
Weight::from_ref_time(47_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(6 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
}
@@ -615,12 +575,12 @@ impl WeightInfo for () {
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Minimum execution time: 17_396 nanoseconds.
Weight::from_ref_time(17_638_000 as u64)
// Standard Error: 2_602
.saturating_add(Weight::from_ref_time(1_286_177 as u64).saturating_mul(n as u64))
// Standard Error: 1_019
.saturating_add(Weight::from_ref_time(70_947 as u64).saturating_mul(l as u64))
// Minimum execution time: 9_000 nanoseconds.
Weight::from_ref_time(9_512_816 as u64)
// Standard Error: 2_976
.saturating_add(Weight::from_ref_time(560_175 as u64).saturating_mul(n as u64))
// Standard Error: 1_169
.saturating_add(Weight::from_ref_time(24_530 as u64).saturating_mul(l as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
@@ -628,14 +588,22 @@ impl WeightInfo for () {
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[0, 100]`.
/// The range of component `l` is `[0, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
// Minimum execution time: 17_446 nanoseconds.
Weight::from_ref_time(17_725_000 as u64)
// Standard Error: 163_579
.saturating_add(Weight::from_ref_time(12_823_232 as u64).saturating_mul(n as u64))
// Standard Error: 64_064
.saturating_add(Weight::from_ref_time(496_642 as u64).saturating_mul(l as u64))
fn remove_unscrupulous_items(n: u32, _l: u32, ) -> Weight {
// Minimum execution time: 10_000 nanoseconds.
Weight::from_ref_time(10_000_000 as u64)
// Standard Error: 94_049
.saturating_add(Weight::from_ref_time(10_887_604 as u64).saturating_mul(n as u64))
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn abdicate_fellow_status() -> Weight {
// Minimum execution time: 29_000 nanoseconds.
Weight::from_ref_time(30_000_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
}
}