moonbase_runtime/weights/
pallet_conviction_voting.rs

1// Copyright 2025 Moonbeam foundation
2// This file is part of Moonbeam.
3
4// Moonbeam 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// Moonbeam 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 Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16
17
18//! Autogenerated weights for `pallet_conviction_voting`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.0.0
21//! DATE: 2025-12-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `ip-10-0-0-198`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25
26// Executed Command:
27// ./frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --runtime=./target/production/wbuild/moonbase-runtime/moonbase_runtime.wasm
32// --genesis-builder=runtime
33// --genesis-builder-preset=development
34// --steps=50
35// --repeat=20
36// --pallet=pallet_conviction_voting
37// --extrinsic=*
38// --wasm-execution=compiled
39// --header=./file_header.txt
40// --template=./benchmarking/frame-weight-template.hbs
41// --output=./runtime/moonbase/src/weights
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use sp_std::marker::PhantomData;
49
50/// Weights for `pallet_conviction_voting`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
53	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
54	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
55	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
56	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
57	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
58	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
59	/// Storage: `Balances::Locks` (r:1 w:1)
60	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
61	/// Storage: `Balances::Freezes` (r:1 w:0)
62	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
63	/// Storage: `Scheduler::Agenda` (r:1 w:1)
64	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
65	fn vote_new() -> Weight {
66		// Proof Size summary in bytes:
67		//  Measured:  `1864`
68		//  Estimated: `42428`
69		// Minimum execution time: 70_497_000 picoseconds.
70		Weight::from_parts(74_068_000, 42428)
71			.saturating_add(T::DbWeight::get().reads(6_u64))
72			.saturating_add(T::DbWeight::get().writes(5_u64))
73	}
74	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
75	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
76	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
77	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
78	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
79	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
80	/// Storage: `Balances::Locks` (r:1 w:1)
81	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
82	/// Storage: `Balances::Freezes` (r:1 w:0)
83	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
84	/// Storage: `Scheduler::Agenda` (r:2 w:2)
85	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
86	/// Storage: `Scheduler::Retries` (r:0 w:1)
87	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
88	fn vote_existing() -> Weight {
89		// Proof Size summary in bytes:
90		//  Measured:  `2165`
91		//  Estimated: `83866`
92		// Minimum execution time: 91_420_000 picoseconds.
93		Weight::from_parts(92_969_000, 83866)
94			.saturating_add(T::DbWeight::get().reads(7_u64))
95			.saturating_add(T::DbWeight::get().writes(7_u64))
96	}
97	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
98	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
99	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
100	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
101	/// Storage: `Scheduler::Agenda` (r:2 w:2)
102	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
103	/// Storage: `Scheduler::Retries` (r:0 w:1)
104	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
105	fn remove_vote() -> Weight {
106		// Proof Size summary in bytes:
107		//  Measured:  `1841`
108		//  Estimated: `83866`
109		// Minimum execution time: 60_732_000 picoseconds.
110		Weight::from_parts(62_644_000, 83866)
111			.saturating_add(T::DbWeight::get().reads(4_u64))
112			.saturating_add(T::DbWeight::get().writes(5_u64))
113	}
114	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
115	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
116	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
117	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
118	fn remove_other_vote() -> Weight {
119		// Proof Size summary in bytes:
120		//  Measured:  `1385`
121		//  Estimated: `4617`
122		// Minimum execution time: 22_373_000 picoseconds.
123		Weight::from_parts(23_228_000, 4617)
124			.saturating_add(T::DbWeight::get().reads(2_u64))
125			.saturating_add(T::DbWeight::get().writes(1_u64))
126	}
127	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
128	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
129	/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
130	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
131	/// Storage: `Scheduler::Agenda` (r:2 w:2)
132	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
133	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
134	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
135	/// Storage: `Balances::Locks` (r:1 w:1)
136	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
137	/// Storage: `Balances::Freezes` (r:1 w:0)
138	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
139	/// Storage: `Scheduler::Retries` (r:0 w:20)
140	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
141	/// The range of component `r` is `[0, 20]`.
142	fn delegate(r: u32, ) -> Weight {
143		// Proof Size summary in bytes:
144		//  Measured:  `1523 + r * (248 ±0)`
145		//  Estimated: `83866 + r * (3387 ±0)`
146		// Minimum execution time: 45_476_000 picoseconds.
147		Weight::from_parts(50_341_678, 83866)
148			// Standard Error: 62_883
149			.saturating_add(Weight::from_parts(26_090_424, 0).saturating_mul(r.into()))
150			.saturating_add(T::DbWeight::get().reads(7_u64))
151			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
152			.saturating_add(T::DbWeight::get().writes(6_u64))
153			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
154			.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
155	}
156	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
157	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
158	/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
159	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
160	/// Storage: `Scheduler::Agenda` (r:2 w:2)
161	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
162	/// Storage: `Scheduler::Retries` (r:0 w:20)
163	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
164	/// The range of component `r` is `[0, 20]`.
165	fn undelegate(r: u32, ) -> Weight {
166		// Proof Size summary in bytes:
167		//  Measured:  `1340 + r * (248 ±0)`
168		//  Estimated: `83866 + r * (3387 ±0)`
169		// Minimum execution time: 21_207_000 picoseconds.
170		Weight::from_parts(20_235_405, 83866)
171			// Standard Error: 61_012
172			.saturating_add(Weight::from_parts(25_866_265, 0).saturating_mul(r.into()))
173			.saturating_add(T::DbWeight::get().reads(4_u64))
174			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
175			.saturating_add(T::DbWeight::get().writes(4_u64))
176			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
177			.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
178	}
179	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
180	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
181	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
182	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
183	/// Storage: `Balances::Locks` (r:1 w:1)
184	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
185	/// Storage: `Balances::Freezes` (r:1 w:0)
186	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
187	fn unlock() -> Weight {
188		// Proof Size summary in bytes:
189		//  Measured:  `1130`
190		//  Estimated: `4752`
191		// Minimum execution time: 52_047_000 picoseconds.
192		Weight::from_parts(53_521_000, 4752)
193			.saturating_add(T::DbWeight::get().reads(4_u64))
194			.saturating_add(T::DbWeight::get().writes(3_u64))
195	}
196}