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-08-20, 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 authorize_code(h: u32, ) -> Weight;
75 fn apply_authorized_code(c: u32, ) -> Weight;
76 fn authorize_apply_authorized_code(c: u32, ) -> Weight;
77 fn cancel_authorization() -> Weight;
78}
79
80/// Weights for `pallet_registrar_relay` using the Substrate node and recommended hardware.
81pub struct SubstrateWeight<T>(PhantomData<T>);
82impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
83 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
84 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
85 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
86 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
87 /// The range of component `h` is `[0, 1048576]`.
88 fn authorize_code(h: u32, ) -> Weight {
89 // Proof Size summary in bytes:
90 // Measured: `0`
91 // Estimated: `1052141`
92 // Minimum execution time: 7_000_000 picoseconds.
93 Weight::from_parts(16_585_558, 1052141)
94 // Standard Error: 0
95 .saturating_add(Weight::from_parts(309, 0).saturating_mul(h.into()))
96 .saturating_add(T::DbWeight::get().reads(2_u64))
97 .saturating_add(T::DbWeight::get().writes(2_u64))
98 }
99 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
100 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
101 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
102 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
103 /// The range of component `c` is `[0, 3145728]`.
104 fn apply_authorized_code(c: u32, ) -> Weight {
105 // Proof Size summary in bytes:
106 // Measured: `1048713`
107 // Estimated: `1052141`
108 // Minimum execution time: 239_000_000 picoseconds.
109 Weight::from_parts(257_852_462, 1052141)
110 // Standard Error: 1
111 .saturating_add(Weight::from_parts(801, 0).saturating_mul(c.into()))
112 .saturating_add(T::DbWeight::get().reads(2_u64))
113 .saturating_add(T::DbWeight::get().writes(2_u64))
114 }
115 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:0)
116 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
117 /// The range of component `c` is `[0, 3145728]`.
118 fn authorize_apply_authorized_code(c: u32, ) -> Weight {
119 // Proof Size summary in bytes:
120 // Measured: `1048713`
121 // Estimated: `1052141`
122 // Minimum execution time: 229_000_000 picoseconds.
123 Weight::from_parts(250_581_206, 1052141)
124 // Standard Error: 0
125 .saturating_add(Weight::from_parts(611, 0).saturating_mul(c.into()))
126 .saturating_add(T::DbWeight::get().reads(1_u64))
127 }
128 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
129 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
130 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
131 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
132 fn cancel_authorization() -> Weight {
133 // Proof Size summary in bytes:
134 // Measured: `84`
135 // Estimated: `1052141`
136 // Minimum execution time: 7_000_000 picoseconds.
137 Weight::from_parts(9_000_000, 1052141)
138 .saturating_add(T::DbWeight::get().reads(2_u64))
139 .saturating_add(T::DbWeight::get().writes(2_u64))
140 }
141}
142
143// For backwards compatibility and tests.
144impl WeightInfo for () {
145 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
146 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
147 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
148 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
149 /// The range of component `h` is `[0, 1048576]`.
150 fn authorize_code(h: u32, ) -> Weight {
151 // Proof Size summary in bytes:
152 // Measured: `0`
153 // Estimated: `1052141`
154 // Minimum execution time: 7_000_000 picoseconds.
155 Weight::from_parts(16_585_558, 1052141)
156 // Standard Error: 0
157 .saturating_add(Weight::from_parts(309, 0).saturating_mul(h.into()))
158 .saturating_add(RocksDbWeight::get().reads(2_u64))
159 .saturating_add(RocksDbWeight::get().writes(2_u64))
160 }
161 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
162 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
163 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
164 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
165 /// The range of component `c` is `[0, 3145728]`.
166 fn apply_authorized_code(c: u32, ) -> Weight {
167 // Proof Size summary in bytes:
168 // Measured: `1048713`
169 // Estimated: `1052141`
170 // Minimum execution time: 239_000_000 picoseconds.
171 Weight::from_parts(257_852_462, 1052141)
172 // Standard Error: 1
173 .saturating_add(Weight::from_parts(801, 0).saturating_mul(c.into()))
174 .saturating_add(RocksDbWeight::get().reads(2_u64))
175 .saturating_add(RocksDbWeight::get().writes(2_u64))
176 }
177 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:0)
178 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
179 /// The range of component `c` is `[0, 3145728]`.
180 fn authorize_apply_authorized_code(c: u32, ) -> Weight {
181 // Proof Size summary in bytes:
182 // Measured: `1048713`
183 // Estimated: `1052141`
184 // Minimum execution time: 229_000_000 picoseconds.
185 Weight::from_parts(250_581_206, 1052141)
186 // Standard Error: 0
187 .saturating_add(Weight::from_parts(611, 0).saturating_mul(c.into()))
188 .saturating_add(RocksDbWeight::get().reads(1_u64))
189 }
190 /// Storage: `RegistrarRelay::PendingRegistrations` (r:1 w:1)
191 /// Proof: `RegistrarRelay::PendingRegistrations` (`max_values`: None, `max_size`: Some(1048676), added: 1051151, mode: `MaxEncodedLen`)
192 /// Storage: `RegistrarRelay::CounterForPendingRegistrations` (r:1 w:1)
193 /// Proof: `RegistrarRelay::CounterForPendingRegistrations` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
194 fn cancel_authorization() -> Weight {
195 // Proof Size summary in bytes:
196 // Measured: `84`
197 // Estimated: `1052141`
198 // Minimum execution time: 7_000_000 picoseconds.
199 Weight::from_parts(9_000_000, 1052141)
200 .saturating_add(RocksDbWeight::get().reads(2_u64))
201 .saturating_add(RocksDbWeight::get().writes(2_u64))
202 }
203}