pallet_recovery/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18
19//! Autogenerated weights for `pallet_recovery`
20//!
21//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
22//! DATE: 2026-01-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
23//! WORST CASE MAP SIZE: `1000000`
24//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor`
25//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
26
27// Executed Command:
28// frame-omni-bencher
29// v1
30// benchmark
31// pallet
32// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.compact.compressed.wasm
33// --template=substrate/.maintain/frame-weight-template.hbs
34// --output=substrate/frame/recovery/src/weights.rs
35// --pallet=pallet-recovery
36// --extrinsic=
37
38#![cfg_attr(rustfmt, rustfmt_skip)]
39#![allow(unused_parens)]
40#![allow(unused_imports)]
41#![allow(missing_docs)]
42#![allow(dead_code)]
43
44use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
45use core::marker::PhantomData;
46
47/// Weight functions needed for `pallet_recovery`.
48pub trait WeightInfo {
49 fn control_inherited_account() -> Weight;
50 fn revoke_inheritor() -> Weight;
51 fn set_friend_groups() -> Weight;
52 fn initiate_attempt() -> Weight;
53 fn approve_attempt() -> Weight;
54 fn finish_attempt() -> Weight;
55 fn cancel_attempt() -> Weight;
56 fn slash_attempt() -> Weight;
57}
58
59/// Weights for `pallet_recovery` using the Substrate node and recommended hardware.
60pub struct SubstrateWeight<T>(PhantomData<T>);
61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62 /// Storage: `Recovery::Inheritor` (r:1 w:0)
63 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
64 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
65 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
66 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
67 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
68 fn control_inherited_account() -> Weight {
69 // Proof Size summary in bytes:
70 // Measured: `570`
71 // Estimated: `3997`
72 // Minimum execution time: 33_460_000 picoseconds.
73 Weight::from_parts(33_900_000, 3997)
74 .saturating_add(T::DbWeight::get().reads(3_u64))
75 }
76 /// Storage: `Recovery::Inheritor` (r:1 w:1)
77 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
78 /// Storage: `Balances::Holds` (r:1 w:1)
79 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
80 /// Storage: `System::Account` (r:1 w:1)
81 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
82 fn revoke_inheritor() -> Weight {
83 // Proof Size summary in bytes:
84 // Measured: `487`
85 // Estimated: `4000`
86 // Minimum execution time: 75_880_000 picoseconds.
87 Weight::from_parts(75_880_000, 4000)
88 .saturating_add(T::DbWeight::get().reads(3_u64))
89 .saturating_add(T::DbWeight::get().writes(3_u64))
90 }
91 /// Storage: `Recovery::Attempt` (r:1 w:0)
92 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
93 /// Storage: `Recovery::FriendGroups` (r:1 w:1)
94 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
95 fn set_friend_groups() -> Weight {
96 // Proof Size summary in bytes:
97 // Measured: `9569`
98 // Estimated: `12746`
99 // Minimum execution time: 39_360_000 picoseconds.
100 Weight::from_parts(51_879_639, 12746)
101 .saturating_add(T::DbWeight::get().reads(2_u64))
102 .saturating_add(T::DbWeight::get().writes(1_u64))
103 }
104 /// Storage: `Recovery::Attempt` (r:1 w:1)
105 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
106 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
107 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
108 /// Storage: `Recovery::Inheritor` (r:1 w:0)
109 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
110 /// Storage: `System::Account` (r:1 w:1)
111 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
112 /// Storage: `Balances::Holds` (r:1 w:0)
113 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
114 fn initiate_attempt() -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `10148`
117 // Estimated: `12746`
118 // Minimum execution time: 79_741_000 picoseconds.
119 Weight::from_parts(80_611_000, 12746)
120 .saturating_add(T::DbWeight::get().reads(5_u64))
121 .saturating_add(T::DbWeight::get().writes(2_u64))
122 }
123 /// Storage: `Recovery::Attempt` (r:1 w:1)
124 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
125 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
126 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
127 fn approve_attempt() -> Weight {
128 // Proof Size summary in bytes:
129 // Measured: `9778`
130 // Estimated: `12746`
131 // Minimum execution time: 40_020_000 picoseconds.
132 Weight::from_parts(40_540_000, 12746)
133 .saturating_add(T::DbWeight::get().reads(2_u64))
134 .saturating_add(T::DbWeight::get().writes(1_u64))
135 }
136 /// Storage: `Recovery::Attempt` (r:1 w:1)
137 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
138 /// Storage: `Balances::Holds` (r:1 w:1)
139 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
140 /// Storage: `System::Account` (r:1 w:1)
141 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
142 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
143 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
144 /// Storage: `Recovery::Inheritor` (r:1 w:1)
145 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
146 fn finish_attempt() -> Weight {
147 // Proof Size summary in bytes:
148 // Measured: `10479`
149 // Estimated: `12746`
150 // Minimum execution time: 75_091_000 picoseconds.
151 Weight::from_parts(75_880_000, 12746)
152 .saturating_add(T::DbWeight::get().reads(5_u64))
153 .saturating_add(T::DbWeight::get().writes(4_u64))
154 }
155 /// Storage: `Recovery::Attempt` (r:1 w:1)
156 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
157 /// Storage: `Balances::Holds` (r:1 w:1)
158 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
159 /// Storage: `System::Account` (r:1 w:1)
160 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
161 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
162 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
163 fn cancel_attempt() -> Weight {
164 // Proof Size summary in bytes:
165 // Measured: `10309`
166 // Estimated: `12746`
167 // Minimum execution time: 69_011_000 picoseconds.
168 Weight::from_parts(69_801_000, 12746)
169 .saturating_add(T::DbWeight::get().reads(4_u64))
170 .saturating_add(T::DbWeight::get().writes(3_u64))
171 }
172 /// Storage: `Recovery::Attempt` (r:1 w:1)
173 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
174 /// Storage: `System::Account` (r:1 w:1)
175 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
176 /// Storage: `Balances::Holds` (r:1 w:1)
177 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
178 fn slash_attempt() -> Weight {
179 // Proof Size summary in bytes:
180 // Measured: `1037`
181 // Estimated: `4000`
182 // Minimum execution time: 57_840_000 picoseconds.
183 Weight::from_parts(58_401_000, 4000)
184 .saturating_add(T::DbWeight::get().reads(3_u64))
185 .saturating_add(T::DbWeight::get().writes(3_u64))
186 }
187}
188
189// For backwards compatibility and tests.
190impl WeightInfo for () {
191 /// Storage: `Recovery::Inheritor` (r:1 w:0)
192 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
193 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
194 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
195 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
196 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
197 fn control_inherited_account() -> Weight {
198 // Proof Size summary in bytes:
199 // Measured: `570`
200 // Estimated: `3997`
201 // Minimum execution time: 33_460_000 picoseconds.
202 Weight::from_parts(33_900_000, 3997)
203 .saturating_add(RocksDbWeight::get().reads(3_u64))
204 }
205 /// Storage: `Recovery::Inheritor` (r:1 w:1)
206 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
207 /// Storage: `Balances::Holds` (r:1 w:1)
208 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
209 /// Storage: `System::Account` (r:1 w:1)
210 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
211 fn revoke_inheritor() -> Weight {
212 // Proof Size summary in bytes:
213 // Measured: `487`
214 // Estimated: `4000`
215 // Minimum execution time: 75_880_000 picoseconds.
216 Weight::from_parts(75_880_000, 4000)
217 .saturating_add(RocksDbWeight::get().reads(3_u64))
218 .saturating_add(RocksDbWeight::get().writes(3_u64))
219 }
220 /// Storage: `Recovery::Attempt` (r:1 w:0)
221 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
222 /// Storage: `Recovery::FriendGroups` (r:1 w:1)
223 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
224 fn set_friend_groups() -> Weight {
225 // Proof Size summary in bytes:
226 // Measured: `9569`
227 // Estimated: `12746`
228 // Minimum execution time: 39_360_000 picoseconds.
229 Weight::from_parts(51_879_639, 12746)
230 .saturating_add(RocksDbWeight::get().reads(2_u64))
231 .saturating_add(RocksDbWeight::get().writes(1_u64))
232 }
233 /// Storage: `Recovery::Attempt` (r:1 w:1)
234 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
235 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
236 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
237 /// Storage: `Recovery::Inheritor` (r:1 w:0)
238 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
239 /// Storage: `System::Account` (r:1 w:1)
240 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
241 /// Storage: `Balances::Holds` (r:1 w:0)
242 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
243 fn initiate_attempt() -> Weight {
244 // Proof Size summary in bytes:
245 // Measured: `10148`
246 // Estimated: `12746`
247 // Minimum execution time: 79_741_000 picoseconds.
248 Weight::from_parts(80_611_000, 12746)
249 .saturating_add(RocksDbWeight::get().reads(5_u64))
250 .saturating_add(RocksDbWeight::get().writes(2_u64))
251 }
252 /// Storage: `Recovery::Attempt` (r:1 w:1)
253 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
254 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
255 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
256 fn approve_attempt() -> Weight {
257 // Proof Size summary in bytes:
258 // Measured: `9778`
259 // Estimated: `12746`
260 // Minimum execution time: 40_020_000 picoseconds.
261 Weight::from_parts(40_540_000, 12746)
262 .saturating_add(RocksDbWeight::get().reads(2_u64))
263 .saturating_add(RocksDbWeight::get().writes(1_u64))
264 }
265 /// Storage: `Recovery::Attempt` (r:1 w:1)
266 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
267 /// Storage: `Balances::Holds` (r:1 w:1)
268 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
269 /// Storage: `System::Account` (r:1 w:1)
270 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
271 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
272 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
273 /// Storage: `Recovery::Inheritor` (r:1 w:1)
274 /// Proof: `Recovery::Inheritor` (`max_values`: None, `max_size`: Some(117), added: 2592, mode: `MaxEncodedLen`)
275 fn finish_attempt() -> Weight {
276 // Proof Size summary in bytes:
277 // Measured: `10479`
278 // Estimated: `12746`
279 // Minimum execution time: 75_091_000 picoseconds.
280 Weight::from_parts(75_880_000, 12746)
281 .saturating_add(RocksDbWeight::get().reads(5_u64))
282 .saturating_add(RocksDbWeight::get().writes(4_u64))
283 }
284 /// Storage: `Recovery::Attempt` (r:1 w:1)
285 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
286 /// Storage: `Balances::Holds` (r:1 w:1)
287 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
288 /// Storage: `System::Account` (r:1 w:1)
289 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
290 /// Storage: `Recovery::FriendGroups` (r:1 w:0)
291 /// Proof: `Recovery::FriendGroups` (`max_values`: None, `max_size`: Some(9281), added: 11756, mode: `MaxEncodedLen`)
292 fn cancel_attempt() -> Weight {
293 // Proof Size summary in bytes:
294 // Measured: `10309`
295 // Estimated: `12746`
296 // Minimum execution time: 69_011_000 picoseconds.
297 Weight::from_parts(69_801_000, 12746)
298 .saturating_add(RocksDbWeight::get().reads(4_u64))
299 .saturating_add(RocksDbWeight::get().writes(3_u64))
300 }
301 /// Storage: `Recovery::Attempt` (r:1 w:1)
302 /// Proof: `Recovery::Attempt` (`max_values`: None, `max_size`: Some(164), added: 2639, mode: `MaxEncodedLen`)
303 /// Storage: `System::Account` (r:1 w:1)
304 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
305 /// Storage: `Balances::Holds` (r:1 w:1)
306 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(535), added: 3010, mode: `MaxEncodedLen`)
307 fn slash_attempt() -> Weight {
308 // Proof Size summary in bytes:
309 // Measured: `1037`
310 // Estimated: `4000`
311 // Minimum execution time: 57_840_000 picoseconds.
312 Weight::from_parts(58_401_000, 4000)
313 .saturating_add(RocksDbWeight::get().reads(3_u64))
314 .saturating_add(RocksDbWeight::get().writes(3_u64))
315 }
316}