Alliance pallet: retirement notice call (#11970)

* Alliance pallet: retirement notice

* add alliance pallet to benchmark list for dev chain

* fix type

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* link weight generated by bench for retirement_notice method

* migration to clear UpForKicking storage prefix

* rename migration from v1 to v0_to_v1

* Apply suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* rename `retirement-notice to give-retirement-notice

* Apply suggestions from code review

Co-authored-by: Squirrel <gilescope@gmail.com>

* review fixes: update doc, saturating add, BlockNumber type alias

* add suffix to duratin consts *_IN_BLOCKS

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* add negative tests (#11995)

* add negative tests

* remove tests powerless asserts checking against announcment origin

* assert bad origin from announcement origin checks

Co-authored-by: muharem <ismailov.m.h@gmail.com>

Co-authored-by: command-bot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
Muharem Ismailov
2022-08-29 18:02:23 +02:00
committed by GitHub
parent b922a25ccd
commit b74fba5dac
8 changed files with 561 additions and 292 deletions
+293 -231
View File
@@ -1,6 +1,6 @@
// This file is part of Substrate.
// Copyright (C) 2021 Parity Technologies (UK) Ltd.
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,24 +18,25 @@
//! Autogenerated weights for pallet_alliance
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-10-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
//! DATE: 2022-08-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/release/substrate
// /home/benchbot/cargo_target_dir/production/substrate
// benchmark
// --chain=dev
// pallet
// --steps=50
// --repeat=20
// --pallet=pallet_alliance
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --pallet=pallet_alliance
// --chain=dev
// --output=./frame/alliance/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -59,6 +60,7 @@ pub trait WeightInfo {
fn join_alliance() -> Weight;
fn nominate_ally() -> Weight;
fn elevate_ally() -> Weight;
fn give_retirement_notice() -> Weight;
fn retire() -> Weight;
fn kick_member() -> Weight;
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight;
@@ -73,23 +75,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalCount (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
fn propose_proposed(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(39_992_000 as Weight)
/// 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 `p` is `[1, 100]`.
fn propose_proposed(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(22_575_000 as Weight)
// Standard Error: 0
.saturating_add((11_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 23_000
.saturating_add((158_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((44_000 as Weight).saturating_mul(y as Weight))
.saturating_add((90_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((323_000 as Weight).saturating_mul(p as Weight))
.saturating_add((216_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))
}
// Storage: Alliance Members (r:2 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 {
(36_649_000 as Weight)
// Standard Error: 90_000
.saturating_add((42_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((195_000 as Weight).saturating_mul(y as Weight))
(45_486_000 as Weight)
// Standard Error: 29_000
.saturating_add((78_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((128_000 as Weight).saturating_mul(y as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -97,125 +109,135 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
(30_301_000 as Weight)
// Standard Error: 1_000
.saturating_add((330_000 as Weight).saturating_mul(p as Weight))
(35_296_000 as Weight)
// Standard Error: 2_000
.saturating_add((171_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// 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 `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(40_472_000 as Weight)
// Standard Error: 69_000
.saturating_add((485_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((192_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((330_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(52_076_000 as Weight)
// Standard Error: 0
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 77_000
.saturating_add((194_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((188_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((329_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(47_009_000 as Weight)
// Standard Error: 66_000
.saturating_add((256_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((176_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((327_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(43_650_000 as Weight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 85_000
.saturating_add((124_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((199_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 3_000
.saturating_add((326_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(45_100_000 as Weight)
// Standard Error: 4_000
.saturating_add((162_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 4_000
.saturating_add((151_000 as Weight).saturating_mul(z as Weight))
(39_252_000 as Weight)
// Standard Error: 18_000
.saturating_add((75_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 1_000
.saturating_add((107_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((170_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `p` is `[1, 100]`.
fn close_early_approved(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(50_357_000 as Weight)
// Standard Error: 1_000
.saturating_add((103_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((204_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `p` is `[1, 100]`.
fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight {
(41_258_000 as Weight)
// Standard Error: 1_000
.saturating_add((111_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((186_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))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(_b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(40_490_000 as Weight)
// Standard Error: 16_000
.saturating_add((119_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 1_000
.saturating_add((93_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((195_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))
}
// Storage: Alliance Members (r:2 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(35_186_000 as Weight)
// Standard Error: 1_000
.saturating_add((161_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((127_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
(14_517_000 as Weight)
(18_189_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
(16_801_000 as Weight)
(21_106_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
(17_133_000 as Weight)
(22_208_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: Alliance Members (r:4 w:0)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
(95_370_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
(53_771_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:4 w:0)
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
(44_764_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
(41_912_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Members (r:3 w:2)
@@ -223,23 +245,29 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
(44_013_000 as Weight)
(36_811_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Alliance KickingMembers (r:1 w:0)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance Members (r:4 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn retire() -> Weight {
(60_183_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
// Storage: Alliance RetiringMembers (r:0 w:1)
fn give_retirement_notice() -> Weight {
(41_079_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
// Storage: Alliance KickingMembers (r:1 w:0)
// Storage: Alliance RetiringMembers (r:1 w:1)
// Storage: Alliance Members (r:1 w:1)
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn retire() -> Weight {
(42_703_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
// Storage: Alliance Members (r:3 w:1)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:1 w:1)
@@ -247,29 +275,33 @@ 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 {
(67_467_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
(61_370_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 16_000
.saturating_add((2_673_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 7_000
.saturating_add((224_000 as Weight).saturating_mul(l as Weight))
// Standard Error: 2_000
.saturating_add((1_385_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 1_000
.saturating_add((119_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 343_000
.saturating_add((59_025_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 153_000
.saturating_add((6_725_000 as Weight).saturating_mul(l as Weight))
.saturating_add((21_484_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 59_000
.saturating_add((3_772_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
@@ -282,23 +314,33 @@ impl WeightInfo for () {
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalCount (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
fn propose_proposed(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(39_992_000 as Weight)
/// 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 `p` is `[1, 100]`.
fn propose_proposed(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(22_575_000 as Weight)
// Standard Error: 0
.saturating_add((11_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 23_000
.saturating_add((158_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((44_000 as Weight).saturating_mul(y as Weight))
.saturating_add((90_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((323_000 as Weight).saturating_mul(p as Weight))
.saturating_add((216_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
// Storage: Alliance Members (r:2 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 {
(36_649_000 as Weight)
// Standard Error: 90_000
.saturating_add((42_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((195_000 as Weight).saturating_mul(y as Weight))
(45_486_000 as Weight)
// Standard Error: 29_000
.saturating_add((78_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((128_000 as Weight).saturating_mul(y as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -306,125 +348,135 @@ impl WeightInfo for () {
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
(30_301_000 as Weight)
// Standard Error: 1_000
.saturating_add((330_000 as Weight).saturating_mul(p as Weight))
(35_296_000 as Weight)
// Standard Error: 2_000
.saturating_add((171_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// 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 `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(40_472_000 as Weight)
// Standard Error: 69_000
.saturating_add((485_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((192_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((330_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(52_076_000 as Weight)
// Standard Error: 0
.saturating_add((4_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 77_000
.saturating_add((194_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((188_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((329_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(47_009_000 as Weight)
// Standard Error: 66_000
.saturating_add((256_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 2_000
.saturating_add((176_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 2_000
.saturating_add((327_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
fn close_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(43_650_000 as Weight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
// Standard Error: 85_000
.saturating_add((124_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 3_000
.saturating_add((199_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 3_000
.saturating_add((326_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(45_100_000 as Weight)
// Standard Error: 4_000
.saturating_add((162_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 4_000
.saturating_add((151_000 as Weight).saturating_mul(z as Weight))
(39_252_000 as Weight)
// Standard Error: 18_000
.saturating_add((75_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 1_000
.saturating_add((107_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((170_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `p` is `[1, 100]`.
fn close_early_approved(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(50_357_000 as Weight)
// Standard Error: 1_000
.saturating_add((103_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((204_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `p` is `[1, 100]`.
fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight {
(41_258_000 as Weight)
// Standard Error: 1_000
.saturating_add((111_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((186_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// 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 `b` is `[1, 1024]`.
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(_b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(40_490_000 as Weight)
// Standard Error: 16_000
.saturating_add((119_000 as Weight).saturating_mul(x as Weight))
// Standard Error: 1_000
.saturating_add((93_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((195_000 as Weight).saturating_mul(p as Weight))
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:2 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
/// The range of component `x` is `[2, 10]`.
/// The range of component `y` is `[0, 90]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(35_186_000 as Weight)
// Standard Error: 1_000
.saturating_add((161_000 as Weight).saturating_mul(y as Weight))
// Standard Error: 1_000
.saturating_add((127_000 as Weight).saturating_mul(z as Weight))
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
(14_517_000 as Weight)
(18_189_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
(16_801_000 as Weight)
(21_106_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
(17_133_000 as Weight)
(22_208_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: Alliance Members (r:4 w:0)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
(95_370_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
(53_771_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Alliance Members (r:4 w:0)
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
(44_764_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
(41_912_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Alliance Members (r:3 w:2)
@@ -432,23 +484,29 @@ impl WeightInfo for () {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
(44_013_000 as Weight)
(36_811_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
// Storage: Alliance KickingMembers (r:1 w:0)
// Storage: Alliance Members (r:3 w:1)
// Storage: Alliance Members (r:4 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn retire() -> Weight {
(60_183_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
// Storage: Alliance RetiringMembers (r:0 w:1)
fn give_retirement_notice() -> Weight {
(41_079_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
// Storage: Alliance KickingMembers (r:1 w:0)
// Storage: Alliance RetiringMembers (r:1 w:1)
// Storage: Alliance Members (r:1 w:1)
// Storage: Alliance DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn retire() -> Weight {
(42_703_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
// Storage: Alliance Members (r:3 w:1)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: Alliance DepositOf (r:1 w:1)
@@ -456,29 +514,33 @@ impl WeightInfo for () {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn kick_member() -> Weight {
(67_467_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
(61_370_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
.saturating_add(RocksDbWeight::get().writes(5 as Weight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 16_000
.saturating_add((2_673_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 7_000
.saturating_add((224_000 as Weight).saturating_mul(l as Weight))
// Standard Error: 2_000
.saturating_add((1_385_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 1_000
.saturating_add((119_000 as Weight).saturating_mul(l as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 343_000
.saturating_add((59_025_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 153_000
.saturating_add((6_725_000 as Weight).saturating_mul(l as Weight))
.saturating_add((21_484_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 59_000
.saturating_add((3_772_000 as Weight).saturating_mul(l as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
}