referrerpolicy=no-referrer-when-downgrade

pallet_registrar_relay/
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_relay`
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_relay
51// --header=substrate/HEADER-APACHE2
52// --output=substrate/frame/registrar/relay/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_relay`.
73pub trait WeightInfo {
74	fn receive_register(h: u32, ) -> Weight;
75	fn apply_authorized_code(c: u32, ) -> Weight;
76	fn authorize_apply_authorized_code(c: u32, ) -> Weight;
77	fn receive_cancel_registration() -> Weight;
78	fn on_new_head() -> Weight;
79	fn on_new_head_already_noted() -> Weight;
80	fn receive_deregister() -> Weight;
81}
82
83/// Weights for `pallet_registrar_relay` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
87	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
88	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
89	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
90	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
91	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
92	/// The range of component `h` is `[0, 1048576]`.
93	fn receive_register(h: u32, ) -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `0`
96		//  Estimated: `1052141`
97		// Minimum execution time: 9_000_000 picoseconds.
98		Weight::from_parts(13_912_216, 1052141)
99			// Standard Error: 1
100			.saturating_add(Weight::from_parts(347, 0).saturating_mul(h.into()))
101			.saturating_add(T::DbWeight::get().reads(2_u64))
102			.saturating_add(T::DbWeight::get().writes(3_u64))
103	}
104	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
105	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
106	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
107	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
108	/// The range of component `c` is `[0, 3145728]`.
109	fn apply_authorized_code(c: u32, ) -> Weight {
110		// Proof Size summary in bytes:
111		//  Measured:  `1048713`
112		//  Estimated: `1052141`
113		// Minimum execution time: 263_000_000 picoseconds.
114		Weight::from_parts(266_557_186, 1052141)
115			// Standard Error: 1
116			.saturating_add(Weight::from_parts(837, 0).saturating_mul(c.into()))
117			.saturating_add(T::DbWeight::get().reads(2_u64))
118			.saturating_add(T::DbWeight::get().writes(2_u64))
119	}
120	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:0)
121	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
122	/// The range of component `c` is `[0, 3145728]`.
123	fn authorize_apply_authorized_code(c: u32, ) -> Weight {
124		// Proof Size summary in bytes:
125		//  Measured:  `1048713`
126		//  Estimated: `1052141`
127		// Minimum execution time: 245_000_000 picoseconds.
128		Weight::from_parts(266_590_631, 1052141)
129			// Standard Error: 0
130			.saturating_add(Weight::from_parts(645, 0).saturating_mul(c.into()))
131			.saturating_add(T::DbWeight::get().reads(1_u64))
132	}
133	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
134	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
135	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
136	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
137	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
138	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
139	fn receive_cancel_registration() -> Weight {
140		// Proof Size summary in bytes:
141		//  Measured:  `84`
142		//  Estimated: `1052141`
143		// Minimum execution time: 8_000_000 picoseconds.
144		Weight::from_parts(10_000_000, 1052141)
145			.saturating_add(T::DbWeight::get().reads(2_u64))
146			.saturating_add(T::DbWeight::get().writes(3_u64))
147	}
148	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:1 w:1)
149	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
150	fn on_new_head() -> Weight {
151		// Proof Size summary in bytes:
152		//  Measured:  `24`
153		//  Estimated: `3485`
154		// Minimum execution time: 3_000_000 picoseconds.
155		Weight::from_parts(4_000_000, 3485)
156			.saturating_add(T::DbWeight::get().reads(1_u64))
157			.saturating_add(T::DbWeight::get().writes(1_u64))
158	}
159	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:1 w:0)
160	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
161	fn on_new_head_already_noted() -> Weight {
162		// Proof Size summary in bytes:
163		//  Measured:  `0`
164		//  Estimated: `3485`
165		// Minimum execution time: 0_000 picoseconds.
166		Weight::from_parts(1_000_000, 3485)
167			.saturating_add(T::DbWeight::get().reads(1_u64))
168	}
169	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
170	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
171	fn receive_deregister() -> Weight {
172		// Proof Size summary in bytes:
173		//  Measured:  `0`
174		//  Estimated: `0`
175		// Minimum execution time: 3_000_000 picoseconds.
176		Weight::from_parts(4_000_000, 0)
177			.saturating_add(T::DbWeight::get().writes(1_u64))
178	}
179}
180
181// For backwards compatibility and tests.
182impl WeightInfo for () {
183	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
184	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
185	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
186	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
187	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
188	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
189	/// The range of component `h` is `[0, 1048576]`.
190	fn receive_register(h: u32, ) -> Weight {
191		// Proof Size summary in bytes:
192		//  Measured:  `0`
193		//  Estimated: `1052141`
194		// Minimum execution time: 9_000_000 picoseconds.
195		Weight::from_parts(13_912_216, 1052141)
196			// Standard Error: 1
197			.saturating_add(Weight::from_parts(347, 0).saturating_mul(h.into()))
198			.saturating_add(RocksDbWeight::get().reads(2_u64))
199			.saturating_add(RocksDbWeight::get().writes(3_u64))
200	}
201	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
202	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
203	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
204	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
205	/// The range of component `c` is `[0, 3145728]`.
206	fn apply_authorized_code(c: u32, ) -> Weight {
207		// Proof Size summary in bytes:
208		//  Measured:  `1048713`
209		//  Estimated: `1052141`
210		// Minimum execution time: 263_000_000 picoseconds.
211		Weight::from_parts(266_557_186, 1052141)
212			// Standard Error: 1
213			.saturating_add(Weight::from_parts(837, 0).saturating_mul(c.into()))
214			.saturating_add(RocksDbWeight::get().reads(2_u64))
215			.saturating_add(RocksDbWeight::get().writes(2_u64))
216	}
217	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:0)
218	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
219	/// The range of component `c` is `[0, 3145728]`.
220	fn authorize_apply_authorized_code(c: u32, ) -> Weight {
221		// Proof Size summary in bytes:
222		//  Measured:  `1048713`
223		//  Estimated: `1052141`
224		// Minimum execution time: 245_000_000 picoseconds.
225		Weight::from_parts(266_590_631, 1052141)
226			// Standard Error: 0
227			.saturating_add(Weight::from_parts(645, 0).saturating_mul(c.into()))
228			.saturating_add(RocksDbWeight::get().reads(1_u64))
229	}
230	/// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
231	/// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
232	/// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
233	/// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
234	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
235	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
236	fn receive_cancel_registration() -> Weight {
237		// Proof Size summary in bytes:
238		//  Measured:  `84`
239		//  Estimated: `1052141`
240		// Minimum execution time: 8_000_000 picoseconds.
241		Weight::from_parts(10_000_000, 1052141)
242			.saturating_add(RocksDbWeight::get().reads(2_u64))
243			.saturating_add(RocksDbWeight::get().writes(3_u64))
244	}
245	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:1 w:1)
246	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
247	fn on_new_head() -> Weight {
248		// Proof Size summary in bytes:
249		//  Measured:  `24`
250		//  Estimated: `3485`
251		// Minimum execution time: 3_000_000 picoseconds.
252		Weight::from_parts(4_000_000, 3485)
253			.saturating_add(RocksDbWeight::get().reads(1_u64))
254			.saturating_add(RocksDbWeight::get().writes(1_u64))
255	}
256	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:1 w:0)
257	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
258	fn on_new_head_already_noted() -> Weight {
259		// Proof Size summary in bytes:
260		//  Measured:  `0`
261		//  Estimated: `3485`
262		// Minimum execution time: 0_000 picoseconds.
263		Weight::from_parts(1_000_000, 3485)
264			.saturating_add(RocksDbWeight::get().reads(1_u64))
265	}
266	/// Storage: `RegistrarRelay::AwaitingFirstHead` (r:0 w:1)
267	/// Proof: `RegistrarRelay::AwaitingFirstHead` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
268	fn receive_deregister() -> Weight {
269		// Proof Size summary in bytes:
270		//  Measured:  `0`
271		//  Estimated: `0`
272		// Minimum execution time: 3_000_000 picoseconds.
273		Weight::from_parts(4_000_000, 0)
274			.saturating_add(RocksDbWeight::get().writes(1_u64))
275	}
276}