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 51.0.0
21
//! DATE: 2026-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-176`, 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
// --disable-log-color
42
// --output=./runtime/moonbase/src/weights
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47

            
48
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49
use sp_std::marker::PhantomData;
50

            
51
/// Weights for `pallet_conviction_voting`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_conviction_voting::WeightInfo for WeightInfo<T> {
54
	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
55
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
56
	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
57
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
58
	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
59
	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
60
	/// Storage: `Balances::Locks` (r:1 w:1)
61
	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
62
	/// Storage: `Balances::Freezes` (r:1 w:0)
63
	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
64
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
65
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
66
	fn vote_new() -> Weight {
67
		// Proof Size summary in bytes:
68
		//  Measured:  `1864`
69
		//  Estimated: `42428`
70
		// Minimum execution time: 75_158_000 picoseconds.
71
		Weight::from_parts(76_950_000, 42428)
72
			.saturating_add(T::DbWeight::get().reads(6_u64))
73
			.saturating_add(T::DbWeight::get().writes(5_u64))
74
	}
75
	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
76
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
77
	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
78
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
79
	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
80
	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
81
	/// Storage: `Balances::Locks` (r:1 w:1)
82
	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
83
	/// Storage: `Balances::Freezes` (r:1 w:0)
84
	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
85
	/// Storage: `Scheduler::Agenda` (r:2 w:2)
86
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
87
	/// Storage: `Scheduler::Retries` (r:0 w:1)
88
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
89
	fn vote_existing() -> Weight {
90
		// Proof Size summary in bytes:
91
		//  Measured:  `2165`
92
		//  Estimated: `83866`
93
		// Minimum execution time: 96_641_000 picoseconds.
94
		Weight::from_parts(98_597_000, 83866)
95
			.saturating_add(T::DbWeight::get().reads(7_u64))
96
			.saturating_add(T::DbWeight::get().writes(7_u64))
97
	}
98
	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
99
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
100
	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:1)
101
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
102
	/// Storage: `Scheduler::Agenda` (r:2 w:2)
103
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
104
	/// Storage: `Scheduler::Retries` (r:0 w:1)
105
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
106
	fn remove_vote() -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `1841`
109
		//  Estimated: `83866`
110
		// Minimum execution time: 63_311_000 picoseconds.
111
		Weight::from_parts(65_229_000, 83866)
112
			.saturating_add(T::DbWeight::get().reads(4_u64))
113
			.saturating_add(T::DbWeight::get().writes(5_u64))
114
	}
115
	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
116
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
117
	/// Storage: `Referenda::ReferendumInfoFor` (r:1 w:0)
118
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
119
	fn remove_other_vote() -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `1385`
122
		//  Estimated: `4617`
123
		// Minimum execution time: 22_749_000 picoseconds.
124
		Weight::from_parts(24_062_000, 4617)
125
			.saturating_add(T::DbWeight::get().reads(2_u64))
126
			.saturating_add(T::DbWeight::get().writes(1_u64))
127
	}
128
	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
129
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
130
	/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
131
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
132
	/// Storage: `Scheduler::Agenda` (r:2 w:2)
133
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
134
	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
135
	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
136
	/// Storage: `Balances::Locks` (r:1 w:1)
137
	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
138
	/// Storage: `Balances::Freezes` (r:1 w:0)
139
	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
140
	/// Storage: `Scheduler::Retries` (r:0 w:20)
141
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
142
	/// The range of component `r` is `[0, 20]`.
143
	fn delegate(r: u32, ) -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `1523 + r * (248 ±0)`
146
		//  Estimated: `83866 + r * (3387 ±0)`
147
		// Minimum execution time: 47_918_000 picoseconds.
148
		Weight::from_parts(53_064_676, 83866)
149
			// Standard Error: 54_158
150
			.saturating_add(Weight::from_parts(27_995_687, 0).saturating_mul(r.into()))
151
			.saturating_add(T::DbWeight::get().reads(7_u64))
152
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
153
			.saturating_add(T::DbWeight::get().writes(6_u64))
154
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
155
			.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
156
	}
157
	/// Storage: `ConvictionVoting::VotingFor` (r:2 w:2)
158
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
159
	/// Storage: `Referenda::ReferendumInfoFor` (r:20 w:20)
160
	/// Proof: `Referenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(912), added: 3387, mode: `MaxEncodedLen`)
161
	/// Storage: `Scheduler::Agenda` (r:2 w:2)
162
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
163
	/// Storage: `Scheduler::Retries` (r:0 w:20)
164
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
165
	/// The range of component `r` is `[0, 20]`.
166
	fn undelegate(r: u32, ) -> Weight {
167
		// Proof Size summary in bytes:
168
		//  Measured:  `1340 + r * (248 ±0)`
169
		//  Estimated: `83866 + r * (3387 ±0)`
170
		// Minimum execution time: 21_530_000 picoseconds.
171
		Weight::from_parts(21_530_000, 83866)
172
			// Standard Error: 63_929
173
			.saturating_add(Weight::from_parts(28_161_734, 0).saturating_mul(r.into()))
174
			.saturating_add(T::DbWeight::get().reads(4_u64))
175
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
176
			.saturating_add(T::DbWeight::get().writes(4_u64))
177
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into())))
178
			.saturating_add(Weight::from_parts(0, 3387).saturating_mul(r.into()))
179
	}
180
	/// Storage: `ConvictionVoting::VotingFor` (r:1 w:1)
181
	/// Proof: `ConvictionVoting::VotingFor` (`max_values`: None, `max_size`: Some(1152), added: 3627, mode: `MaxEncodedLen`)
182
	/// Storage: `ConvictionVoting::ClassLocksFor` (r:1 w:1)
183
	/// Proof: `ConvictionVoting::ClassLocksFor` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
184
	/// Storage: `Balances::Locks` (r:1 w:1)
185
	/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`)
186
	/// Storage: `Balances::Freezes` (r:1 w:0)
187
	/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
188
	fn unlock() -> Weight {
189
		// Proof Size summary in bytes:
190
		//  Measured:  `1130`
191
		//  Estimated: `4752`
192
		// Minimum execution time: 55_170_000 picoseconds.
193
		Weight::from_parts(55_915_000, 4752)
194
			.saturating_add(T::DbWeight::get().reads(4_u64))
195
			.saturating_add(T::DbWeight::get().writes(3_u64))
196
	}
197
}