referrerpolicy=no-referrer-when-downgrade

westend_runtime/weights/
pallet_fast_unstake.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for `pallet_fast_unstake`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/westend-runtime/westend_runtime.wasm
32// --pallet=pallet_fast_unstake
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `pallet_fast_unstake`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
54	/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
55	/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56	/// Storage: `Staking::ValidatorCount` (r:1 w:0)
57	/// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
58	/// Storage: `FastUnstake::Head` (r:1 w:1)
59	/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(3087), added: 3582, mode: `MaxEncodedLen`)
60	/// Storage: `FastUnstake::CounterForQueue` (r:1 w:0)
61	/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
62	/// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
63	/// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
64	/// Storage: `Staking::CurrentEra` (r:1 w:0)
65	/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
66	/// Storage: `Staking::SlashingSpans` (r:64 w:0)
67	/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
68	/// Storage: `Staking::Bonded` (r:64 w:64)
69	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
70	/// Storage: `Staking::Ledger` (r:64 w:64)
71	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
72	/// Storage: `Staking::VirtualStakers` (r:64 w:64)
73	/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
74	/// Storage: `Balances::Holds` (r:64 w:64)
75	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
76	/// Storage: `System::Account` (r:64 w:64)
77	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
78	/// Storage: `Staking::Validators` (r:64 w:0)
79	/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
80	/// Storage: `Staking::Nominators` (r:64 w:0)
81	/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
82	/// Storage: `Staking::Payee` (r:0 w:64)
83	/// Proof: `Staking::Payee` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
84	/// The range of component `b` is `[1, 64]`.
85	fn on_idle_unstake(b: u32, ) -> Weight {
86		// Proof Size summary in bytes:
87		//  Measured:  `1229 + b * (442 ±0)`
88		//  Estimated: `4572 + b * (3566 ±0)`
89		// Minimum execution time: 109_129_000 picoseconds.
90		Weight::from_parts(50_476_717, 0)
91			.saturating_add(Weight::from_parts(0, 4572))
92			// Standard Error: 36_349
93			.saturating_add(Weight::from_parts(72_526_298, 0).saturating_mul(b.into()))
94			.saturating_add(T::DbWeight::get().reads(6))
95			.saturating_add(T::DbWeight::get().reads((8_u64).saturating_mul(b.into())))
96			.saturating_add(T::DbWeight::get().writes(1))
97			.saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(b.into())))
98			.saturating_add(Weight::from_parts(0, 3566).saturating_mul(b.into()))
99	}
100	/// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
101	/// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
102	/// Storage: Staking ValidatorCount (r:1 w:0)
103	/// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
104	/// Storage: FastUnstake Head (r:1 w:1)
105	/// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen)
106	/// Storage: FastUnstake CounterForQueue (r:1 w:0)
107	/// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
108	/// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
109	/// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured)
110	/// Storage: Staking CurrentEra (r:1 w:0)
111	/// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
112	/// Storage: Staking ErasStakers (r:257 w:0)
113	/// Proof Skipped: Staking ErasStakers (max_values: None, max_size: None, mode: Measured)
114	/// The range of component `v` is `[1, 256]`.
115	/// The range of component `b` is `[1, 64]`.
116	fn on_idle_check(v: u32, b: u32, ) -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `1438 + b * (48 ±0) + v * (2501 ±0)`
119		//  Estimated: `4753 + b * (49 ±0) + v * (4977 ±0)`
120		// Minimum execution time: 701_014_000 picoseconds.
121		Weight::from_parts(712_243_000, 0)
122			.saturating_add(Weight::from_parts(0, 4753))
123			// Standard Error: 4_057_632
124			.saturating_add(Weight::from_parts(133_559_108, 0).saturating_mul(v.into()))
125			// Standard Error: 16_235_051
126			.saturating_add(Weight::from_parts(507_051_848, 0).saturating_mul(b.into()))
127			.saturating_add(T::DbWeight::get().reads(7))
128			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
129			.saturating_add(T::DbWeight::get().writes(1))
130			.saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into()))
131			.saturating_add(Weight::from_parts(0, 4977).saturating_mul(v.into()))
132	}
133	/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
134	/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
135	/// Storage: `Staking::Ledger` (r:1 w:1)
136	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
137	/// Storage: `Staking::Bonded` (r:1 w:0)
138	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
139	/// Storage: `FastUnstake::Queue` (r:1 w:1)
140	/// Proof: `FastUnstake::Queue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
141	/// Storage: `FastUnstake::Head` (r:1 w:0)
142	/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(3087), added: 3582, mode: `MaxEncodedLen`)
143	/// Storage: `Staking::Validators` (r:1 w:0)
144	/// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
145	/// Storage: `Staking::Nominators` (r:1 w:1)
146	/// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `MaxEncodedLen`)
147	/// Storage: `Staking::CounterForNominators` (r:1 w:1)
148	/// Proof: `Staking::CounterForNominators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
149	/// Storage: `VoterList::ListNodes` (r:1 w:1)
150	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
151	/// Storage: `VoterList::ListBags` (r:1 w:1)
152	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
153	/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
154	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
155	/// Storage: `Staking::CurrentEra` (r:1 w:0)
156	/// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
157	/// Storage: `Staking::VirtualStakers` (r:1 w:0)
158	/// Proof: `Staking::VirtualStakers` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
159	/// Storage: `Balances::Holds` (r:1 w:0)
160	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
161	/// Storage: `FastUnstake::CounterForQueue` (r:1 w:1)
162	/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
163	fn register_fast_unstake() -> Weight {
164		// Proof Size summary in bytes:
165		//  Measured:  `1810`
166		//  Estimated: `4572`
167		// Minimum execution time: 143_132_000 picoseconds.
168		Weight::from_parts(146_490_000, 0)
169			.saturating_add(Weight::from_parts(0, 4572))
170			.saturating_add(T::DbWeight::get().reads(15))
171			.saturating_add(T::DbWeight::get().writes(8))
172	}
173	/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:1 w:0)
174	/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
175	/// Storage: `Staking::Ledger` (r:1 w:0)
176	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
177	/// Storage: `Staking::Bonded` (r:1 w:0)
178	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
179	/// Storage: `FastUnstake::Queue` (r:1 w:1)
180	/// Proof: `FastUnstake::Queue` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
181	/// Storage: `FastUnstake::Head` (r:1 w:0)
182	/// Proof: `FastUnstake::Head` (`max_values`: Some(1), `max_size`: Some(3087), added: 3582, mode: `MaxEncodedLen`)
183	/// Storage: `FastUnstake::CounterForQueue` (r:1 w:1)
184	/// Proof: `FastUnstake::CounterForQueue` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
185	fn deregister() -> Weight {
186		// Proof Size summary in bytes:
187		//  Measured:  `1245`
188		//  Estimated: `4572`
189		// Minimum execution time: 55_743_000 picoseconds.
190		Weight::from_parts(58_759_000, 0)
191			.saturating_add(Weight::from_parts(0, 4572))
192			.saturating_add(T::DbWeight::get().reads(6))
193			.saturating_add(T::DbWeight::get().writes(2))
194	}
195	/// Storage: `FastUnstake::ErasToCheckPerBlock` (r:0 w:1)
196	/// Proof: `FastUnstake::ErasToCheckPerBlock` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
197	fn control() -> Weight {
198		// Proof Size summary in bytes:
199		//  Measured:  `0`
200		//  Estimated: `0`
201		// Minimum execution time: 2_166_000 picoseconds.
202		Weight::from_parts(2_486_000, 0)
203			.saturating_add(Weight::from_parts(0, 0))
204			.saturating_add(T::DbWeight::get().writes(1))
205	}
206}