1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8

            
9
// Tanssi is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13

            
14
// You should have received a copy of the GNU General Public License
15
// along with Tanssi.  If not, see <http://www.gnu.org/licenses/>
16

            
17

            
18
//! Autogenerated weights for pallet_registrar
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 47.0.0
21
//! DATE: 2025-09-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("flashbox_dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./target/release/tanssi-node
28
// benchmark
29
// pallet
30
// --wasm-execution=compiled
31
// --pallet
32
// pallet_registrar
33
// --extrinsic
34
// *
35
// --chain=flashbox_dev
36
// --steps
37
// 50
38
// --repeat
39
// 20
40
// --template=benchmarking/frame-weight-runtime-template.hbs
41
// --json-file
42
// raw.json
43
// --output
44
// tmp/flashbox_weights/pallet_registrar.rs
45

            
46
#![cfg_attr(rustfmt, rustfmt_skip)]
47
#![allow(unused_parens)]
48
#![allow(unused_imports)]
49

            
50
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51
use core::marker::PhantomData;
52

            
53
/// Weights for pallet_registrar using the Substrate node and recommended hardware.
54
pub struct SubstrateWeight<T>(PhantomData<T>);
55
impl<T: frame_system::Config> pallet_registrar::WeightInfo for SubstrateWeight<T> {
56
	/// Storage: `System::Account` (r:1 w:1)
57
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
58
	/// Storage: `Balances::Holds` (r:1 w:1)
59
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
60
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
61
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
62
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
63
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
64
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
65
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
66
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
67
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
68
	/// The range of component `x` is `[100, 3000000]`.
69
	/// The range of component `z` is `[1, 10]`.
70
	fn register(x: u32, z: u32, ) -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `266`
73
		//  Estimated: `3731`
74
		// Minimum execution time: 82_041_000 picoseconds.
75
		Weight::from_parts(52_301_438, 3731)
76
			// Standard Error: 2
77
			.saturating_add(Weight::from_parts(1_238, 0).saturating_mul(x.into()))
78
			// Standard Error: 661_611
79
			.saturating_add(Weight::from_parts(1_403_126, 0).saturating_mul(z.into()))
80
			.saturating_add(T::DbWeight::get().reads(4_u64))
81
			.saturating_add(T::DbWeight::get().writes(6_u64))
82
	}
83
	/// The range of component `x` is `[100, 3000000]`.
84
	/// The range of component `z` is `[1, 10]`.
85
	fn register_with_relay_proof(_x: u32, _z: u32, ) -> Weight {
86
		// Proof Size summary in bytes:
87
		//  Measured:  `0`
88
		//  Estimated: `0`
89
		// Minimum execution time: 0_000 picoseconds.
90
		Weight::from_parts(0, 0)
91
	}
92
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
93
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
94
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:1)
95
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
96
	/// Storage: `System::Account` (r:2 w:1)
97
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
98
	/// Storage: `Balances::Holds` (r:1 w:1)
99
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
100
	/// Storage: `Registrar::BufferedParasToDeregister` (r:1 w:1)
101
	/// Proof: `Registrar::BufferedParasToDeregister` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
102
	/// Storage: `ServicesPayment::MaxTip` (r:0 w:1)
103
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
104
	/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
105
	/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
106
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:0 w:1)
107
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
108
	/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
109
	/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
110
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
111
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
112
	/// Storage: `Registrar::ParaGenesisData` (r:0 w:1)
113
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
114
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
115
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
116
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
117
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
118
	/// Storage: `DataPreservers::Assignments` (r:0 w:1)
119
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
120
	/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
121
	/// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
122
	fn deregister_immediate() -> Weight {
123
		// Proof Size summary in bytes:
124
		//  Measured:  `2884`
125
		//  Estimated: `6196`
126
		// Minimum execution time: 176_600_000 picoseconds.
127
		Weight::from_parts(179_603_000, 6196)
128
			.saturating_add(T::DbWeight::get().reads(6_u64))
129
			.saturating_add(T::DbWeight::get().writes(15_u64))
130
	}
131
	/// Storage: `Registrar::PendingVerification` (r:1 w:0)
132
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
133
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
134
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
135
	/// Storage: `Registrar::PendingPaused` (r:1 w:0)
136
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
137
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
138
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
139
	/// Storage: `Registrar::Paused` (r:1 w:0)
140
	/// Proof: `Registrar::Paused` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
141
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
142
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
143
	/// Storage: `Registrar::PendingToRemove` (r:1 w:1)
144
	/// Proof: `Registrar::PendingToRemove` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
145
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
146
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
147
	fn deregister_scheduled() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `1250`
150
		//  Estimated: `3493`
151
		// Minimum execution time: 76_835_000 picoseconds.
152
		Weight::from_parts(80_832_000, 3493)
153
			.saturating_add(T::DbWeight::get().reads(8_u64))
154
			.saturating_add(T::DbWeight::get().writes(2_u64))
155
	}
156
	fn deregister_with_relay_proof_immediate() -> Weight {
157
		// Proof Size summary in bytes:
158
		//  Measured:  `0`
159
		//  Estimated: `0`
160
		// Minimum execution time: 0_000 picoseconds.
161
		Weight::from_parts(0, 0)
162
	}
163
	fn deregister_with_relay_proof_scheduled() -> Weight {
164
		// Proof Size summary in bytes:
165
		//  Measured:  `0`
166
		//  Estimated: `0`
167
		// Minimum execution time: 0_000 picoseconds.
168
		Weight::from_parts(0, 0)
169
	}
170
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
171
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
172
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
173
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
174
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
175
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
176
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
177
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
178
	/// Storage: `DataPreservers::Assignments` (r:1 w:0)
179
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
180
	/// Storage: `DataPreservers::Profiles` (r:1 w:0)
181
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: Some(1144), added: 3619, mode: `MaxEncodedLen`)
182
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:1 w:1)
183
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
184
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:1)
185
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
186
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:1)
187
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
188
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
189
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
190
	fn mark_valid_for_collating() -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `6379`
193
		//  Estimated: `7864`
194
		// Minimum execution time: 186_289_000 picoseconds.
195
		Weight::from_parts(193_071_000, 7864)
196
			.saturating_add(T::DbWeight::get().reads(10_u64))
197
			.saturating_add(T::DbWeight::get().writes(5_u64))
198
	}
199
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
200
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
201
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
202
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
203
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
204
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
205
	fn pause_container_chain() -> Weight {
206
		// Proof Size summary in bytes:
207
		//  Measured:  `2042`
208
		//  Estimated: `3527`
209
		// Minimum execution time: 64_446_000 picoseconds.
210
		Weight::from_parts(67_154_000, 3527)
211
			.saturating_add(T::DbWeight::get().reads(3_u64))
212
			.saturating_add(T::DbWeight::get().writes(2_u64))
213
	}
214
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
215
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
216
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
217
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
218
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
219
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
220
	fn unpause_container_chain() -> Weight {
221
		// Proof Size summary in bytes:
222
		//  Measured:  `2042`
223
		//  Estimated: `3527`
224
		// Minimum execution time: 62_923_000 picoseconds.
225
		Weight::from_parts(66_575_000, 3527)
226
			.saturating_add(T::DbWeight::get().reads(3_u64))
227
			.saturating_add(T::DbWeight::get().writes(2_u64))
228
	}
229
	/// Storage: `System::Account` (r:1 w:1)
230
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
231
	/// Storage: `Balances::Holds` (r:1 w:1)
232
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
233
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
234
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
235
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
236
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
237
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
238
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
239
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
240
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
241
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
242
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
243
	/// The range of component `x` is `[100, 3000000]`.
244
	/// The range of component `z` is `[1, 10]`.
245
	fn register_parathread(x: u32, z: u32, ) -> Weight {
246
		// Proof Size summary in bytes:
247
		//  Measured:  `266`
248
		//  Estimated: `3731`
249
		// Minimum execution time: 83_890_000 picoseconds.
250
		Weight::from_parts(42_792_838, 3731)
251
			// Standard Error: 2
252
			.saturating_add(Weight::from_parts(1_241, 0).saturating_mul(x.into()))
253
			// Standard Error: 697_509
254
			.saturating_add(Weight::from_parts(2_255_441, 0).saturating_mul(z.into()))
255
			.saturating_add(T::DbWeight::get().reads(4_u64))
256
			.saturating_add(T::DbWeight::get().writes(7_u64))
257
	}
258
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
259
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
260
	/// Storage: `Registrar::PendingParathreadParams` (r:1 w:1)
261
	/// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
262
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
263
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
264
	fn set_parathread_params() -> Weight {
265
		// Proof Size summary in bytes:
266
		//  Measured:  `1742`
267
		//  Estimated: `3493`
268
		// Minimum execution time: 62_977_000 picoseconds.
269
		Weight::from_parts(66_929_000, 3493)
270
			.saturating_add(T::DbWeight::get().reads(3_u64))
271
			.saturating_add(T::DbWeight::get().writes(1_u64))
272
	}
273
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:0)
274
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
275
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
276
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
277
	fn set_para_manager() -> Weight {
278
		// Proof Size summary in bytes:
279
		//  Measured:  `237`
280
		//  Estimated: `3533`
281
		// Minimum execution time: 17_064_000 picoseconds.
282
		Weight::from_parts(17_693_000, 3533)
283
			.saturating_add(T::DbWeight::get().reads(1_u64))
284
			.saturating_add(T::DbWeight::get().writes(1_u64))
285
	}
286
}