pallet_registrar_para/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// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_registrar_para`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-09-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `unknown`, CPU: `<UNKNOWN>`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// ./target/release/frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/release/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_registrar_para
51// --header=substrate/HEADER-APACHE2
52// --output=substrate/frame/registrar/para/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --genesis-builder-policy=none
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_registrar_para`.
73pub trait WeightInfo {
74 fn reserve() -> Weight;
75 fn register(h: u32, ) -> Weight;
76 fn cancel_registration() -> Weight;
77 fn receive() -> Weight;
78 fn deregister_reserved() -> Weight;
79 fn deregister_registered() -> Weight;
80 fn deregister_retry() -> Weight;
81 fn add_lock() -> Weight;
82 fn remove_lock() -> Weight;
83}
84
85/// Weights for `pallet_registrar_para` using the Substrate node and recommended hardware.
86pub struct SubstrateWeight<T>(PhantomData<T>);
87impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
88 /// Storage: `RegistrarPara::NextFreeParaId` (r:1 w:1)
89 /// Proof: `RegistrarPara::NextFreeParaId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
90 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
91 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
92 /// Storage: `System::Account` (r:1 w:1)
93 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
94 /// Storage: `Balances::Holds` (r:1 w:1)
95 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
96 fn reserve() -> Weight {
97 // Proof Size summary in bytes:
98 // Measured: `52`
99 // Estimated: `4054`
100 // Minimum execution time: 32_000_000 picoseconds.
101 Weight::from_parts(36_000_000, 4054)
102 .saturating_add(T::DbWeight::get().reads(4_u64))
103 .saturating_add(T::DbWeight::get().writes(4_u64))
104 }
105 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
106 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
107 /// Storage: `System::Account` (r:1 w:1)
108 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
109 /// Storage: `Balances::Holds` (r:1 w:1)
110 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
111 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
112 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
113 /// The range of component `h` is `[0, 1048576]`.
114 fn register(h: u32, ) -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `212`
117 // Estimated: `4054`
118 // Minimum execution time: 37_000_000 picoseconds.
119 Weight::from_parts(46_225_031, 4054)
120 // Standard Error: 0
121 .saturating_add(Weight::from_parts(167, 0).saturating_mul(h.into()))
122 .saturating_add(T::DbWeight::get().reads(4_u64))
123 .saturating_add(T::DbWeight::get().writes(4_u64))
124 }
125 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
126 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
127 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
128 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
129 fn cancel_registration() -> Weight {
130 // Proof Size summary in bytes:
131 // Measured: `161`
132 // Estimated: `3564`
133 // Minimum execution time: 12_000_000 picoseconds.
134 Weight::from_parts(16_000_000, 3564)
135 .saturating_add(T::DbWeight::get().reads(2_u64))
136 .saturating_add(T::DbWeight::get().writes(2_u64))
137 }
138 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
139 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, 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: `Balances::Holds` (r:1 w:1)
143 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
144 fn receive() -> Weight {
145 // Proof Size summary in bytes:
146 // Measured: `289`
147 // Estimated: `4054`
148 // Minimum execution time: 48_000_000 picoseconds.
149 Weight::from_parts(55_000_000, 4054)
150 .saturating_add(T::DbWeight::get().reads(3_u64))
151 .saturating_add(T::DbWeight::get().writes(3_u64))
152 }
153 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
154 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
155 /// Storage: `System::Account` (r:1 w:1)
156 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
157 /// Storage: `Balances::Holds` (r:1 w:1)
158 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
159 fn deregister_reserved() -> Weight {
160 // Proof Size summary in bytes:
161 // Measured: `212`
162 // Estimated: `4054`
163 // Minimum execution time: 28_000_000 picoseconds.
164 Weight::from_parts(32_000_000, 4054)
165 .saturating_add(T::DbWeight::get().reads(3_u64))
166 .saturating_add(T::DbWeight::get().writes(3_u64))
167 }
168 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
169 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
170 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
171 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
172 fn deregister_registered() -> Weight {
173 // Proof Size summary in bytes:
174 // Measured: `149`
175 // Estimated: `3564`
176 // Minimum execution time: 8_000_000 picoseconds.
177 Weight::from_parts(10_000_000, 3564)
178 .saturating_add(T::DbWeight::get().reads(2_u64))
179 .saturating_add(T::DbWeight::get().writes(2_u64))
180 }
181 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
182 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
183 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
184 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
185 fn deregister_retry() -> Weight {
186 // Proof Size summary in bytes:
187 // Measured: `161`
188 // Estimated: `3564`
189 // Minimum execution time: 12_000_000 picoseconds.
190 Weight::from_parts(16_000_000, 3564)
191 .saturating_add(T::DbWeight::get().reads(2_u64))
192 .saturating_add(T::DbWeight::get().writes(2_u64))
193 }
194 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
195 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
196 fn add_lock() -> Weight {
197 // Proof Size summary in bytes:
198 // Measured: `149`
199 // Estimated: `3564`
200 // Minimum execution time: 7_000_000 picoseconds.
201 Weight::from_parts(8_000_000, 3564)
202 .saturating_add(T::DbWeight::get().reads(1_u64))
203 .saturating_add(T::DbWeight::get().writes(1_u64))
204 }
205 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
206 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
207 fn remove_lock() -> Weight {
208 // Proof Size summary in bytes:
209 // Measured: `150`
210 // Estimated: `3564`
211 // Minimum execution time: 7_000_000 picoseconds.
212 Weight::from_parts(8_000_000, 3564)
213 .saturating_add(T::DbWeight::get().reads(1_u64))
214 .saturating_add(T::DbWeight::get().writes(1_u64))
215 }
216}
217
218// For backwards compatibility and tests.
219impl WeightInfo for () {
220 /// Storage: `RegistrarPara::NextFreeParaId` (r:1 w:1)
221 /// Proof: `RegistrarPara::NextFreeParaId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
222 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
223 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
224 /// Storage: `System::Account` (r:1 w:1)
225 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
226 /// Storage: `Balances::Holds` (r:1 w:1)
227 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
228 fn reserve() -> Weight {
229 // Proof Size summary in bytes:
230 // Measured: `52`
231 // Estimated: `4054`
232 // Minimum execution time: 32_000_000 picoseconds.
233 Weight::from_parts(36_000_000, 4054)
234 .saturating_add(RocksDbWeight::get().reads(4_u64))
235 .saturating_add(RocksDbWeight::get().writes(4_u64))
236 }
237 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
238 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, 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:1)
242 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
243 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
244 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
245 /// The range of component `h` is `[0, 1048576]`.
246 fn register(h: u32, ) -> Weight {
247 // Proof Size summary in bytes:
248 // Measured: `212`
249 // Estimated: `4054`
250 // Minimum execution time: 37_000_000 picoseconds.
251 Weight::from_parts(46_225_031, 4054)
252 // Standard Error: 0
253 .saturating_add(Weight::from_parts(167, 0).saturating_mul(h.into()))
254 .saturating_add(RocksDbWeight::get().reads(4_u64))
255 .saturating_add(RocksDbWeight::get().writes(4_u64))
256 }
257 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
258 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
259 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
260 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
261 fn cancel_registration() -> Weight {
262 // Proof Size summary in bytes:
263 // Measured: `161`
264 // Estimated: `3564`
265 // Minimum execution time: 12_000_000 picoseconds.
266 Weight::from_parts(16_000_000, 3564)
267 .saturating_add(RocksDbWeight::get().reads(2_u64))
268 .saturating_add(RocksDbWeight::get().writes(2_u64))
269 }
270 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
271 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
272 /// Storage: `System::Account` (r:1 w:1)
273 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
274 /// Storage: `Balances::Holds` (r:1 w:1)
275 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
276 fn receive() -> Weight {
277 // Proof Size summary in bytes:
278 // Measured: `289`
279 // Estimated: `4054`
280 // Minimum execution time: 48_000_000 picoseconds.
281 Weight::from_parts(55_000_000, 4054)
282 .saturating_add(RocksDbWeight::get().reads(3_u64))
283 .saturating_add(RocksDbWeight::get().writes(3_u64))
284 }
285 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
286 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
287 /// Storage: `System::Account` (r:1 w:1)
288 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
289 /// Storage: `Balances::Holds` (r:1 w:1)
290 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
291 fn deregister_reserved() -> Weight {
292 // Proof Size summary in bytes:
293 // Measured: `212`
294 // Estimated: `4054`
295 // Minimum execution time: 28_000_000 picoseconds.
296 Weight::from_parts(32_000_000, 4054)
297 .saturating_add(RocksDbWeight::get().reads(3_u64))
298 .saturating_add(RocksDbWeight::get().writes(3_u64))
299 }
300 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
301 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
302 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
303 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
304 fn deregister_registered() -> Weight {
305 // Proof Size summary in bytes:
306 // Measured: `149`
307 // Estimated: `3564`
308 // Minimum execution time: 8_000_000 picoseconds.
309 Weight::from_parts(10_000_000, 3564)
310 .saturating_add(RocksDbWeight::get().reads(2_u64))
311 .saturating_add(RocksDbWeight::get().writes(2_u64))
312 }
313 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
314 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
315 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
316 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
317 fn deregister_retry() -> Weight {
318 // Proof Size summary in bytes:
319 // Measured: `161`
320 // Estimated: `3564`
321 // Minimum execution time: 12_000_000 picoseconds.
322 Weight::from_parts(16_000_000, 3564)
323 .saturating_add(RocksDbWeight::get().reads(2_u64))
324 .saturating_add(RocksDbWeight::get().writes(2_u64))
325 }
326 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
327 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
328 fn add_lock() -> Weight {
329 // Proof Size summary in bytes:
330 // Measured: `149`
331 // Estimated: `3564`
332 // Minimum execution time: 7_000_000 picoseconds.
333 Weight::from_parts(8_000_000, 3564)
334 .saturating_add(RocksDbWeight::get().reads(1_u64))
335 .saturating_add(RocksDbWeight::get().writes(1_u64))
336 }
337 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
338 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(99), added: 2574, mode: `MaxEncodedLen`)
339 fn remove_lock() -> Weight {
340 // Proof Size summary in bytes:
341 // Measured: `150`
342 // Estimated: `3564`
343 // Minimum execution time: 7_000_000 picoseconds.
344 Weight::from_parts(8_000_000, 3564)
345 .saturating_add(RocksDbWeight::get().reads(1_u64))
346 .saturating_add(RocksDbWeight::get().writes(1_u64))
347 }
348}