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