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 49.1.0
21
//! DATE: 2025-11-03, 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: 84_756_000 picoseconds.
75
		Weight::from_parts(86_223_000, 3731)
76
			// Standard Error: 1
77
			.saturating_add(Weight::from_parts(1_218, 0).saturating_mul(x.into()))
78
			// Standard Error: 545_835
79
			.saturating_add(Weight::from_parts(424_031, 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::RegistrarDeposit` (r:1 w:1)
93
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
94
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:0)
95
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
96
	/// Storage: `System::Account` (r:1 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
	fn poke_deposit() -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `5000508`
103
		//  Estimated: `5003973`
104
		// Minimum execution time: 7_514_287_000 picoseconds.
105
		Weight::from_parts(7_728_233_000, 5003973)
106
			.saturating_add(T::DbWeight::get().reads(4_u64))
107
			.saturating_add(T::DbWeight::get().writes(3_u64))
108
	}
109
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
110
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
111
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:1)
112
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
113
	/// Storage: `System::Account` (r:2 w:1)
114
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
115
	/// Storage: `Balances::Holds` (r:1 w:1)
116
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
117
	/// Storage: `Registrar::BufferedParasToDeregister` (r:1 w:1)
118
	/// Proof: `Registrar::BufferedParasToDeregister` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
119
	/// Storage: `ServicesPayment::MaxTip` (r:0 w:1)
120
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
121
	/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
122
	/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
123
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:0 w:1)
124
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
125
	/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
126
	/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
127
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
128
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
129
	/// Storage: `Registrar::ParaGenesisData` (r:0 w:1)
130
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
132
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
133
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
134
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
135
	/// Storage: `DataPreservers::Assignments` (r:0 w:1)
136
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
137
	/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
138
	/// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
139
	fn deregister_immediate() -> Weight {
140
		// Proof Size summary in bytes:
141
		//  Measured:  `2884`
142
		//  Estimated: `6196`
143
		// Minimum execution time: 179_833_000 picoseconds.
144
		Weight::from_parts(187_564_000, 6196)
145
			.saturating_add(T::DbWeight::get().reads(6_u64))
146
			.saturating_add(T::DbWeight::get().writes(15_u64))
147
	}
148
	/// Storage: `Registrar::PendingVerification` (r:1 w:0)
149
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
150
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
151
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
152
	/// Storage: `Registrar::PendingPaused` (r:1 w:0)
153
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
154
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
155
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
156
	/// Storage: `Registrar::Paused` (r:1 w:0)
157
	/// Proof: `Registrar::Paused` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
158
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
159
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160
	/// Storage: `Registrar::PendingToRemove` (r:1 w:1)
161
	/// Proof: `Registrar::PendingToRemove` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
162
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
163
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
164
	fn deregister_scheduled() -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `1250`
167
		//  Estimated: `3493`
168
		// Minimum execution time: 82_175_000 picoseconds.
169
		Weight::from_parts(84_913_000, 3493)
170
			.saturating_add(T::DbWeight::get().reads(8_u64))
171
			.saturating_add(T::DbWeight::get().writes(2_u64))
172
	}
173
	fn deregister_with_relay_proof_immediate() -> Weight {
174
		// Proof Size summary in bytes:
175
		//  Measured:  `0`
176
		//  Estimated: `0`
177
		// Minimum execution time: 0_000 picoseconds.
178
		Weight::from_parts(0, 0)
179
	}
180
	fn deregister_with_relay_proof_scheduled() -> Weight {
181
		// Proof Size summary in bytes:
182
		//  Measured:  `0`
183
		//  Estimated: `0`
184
		// Minimum execution time: 0_000 picoseconds.
185
		Weight::from_parts(0, 0)
186
	}
187
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
188
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
189
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
190
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
191
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
192
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: Some(802), added: 1297, mode: `MaxEncodedLen`)
193
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
194
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
195
	/// Storage: `DataPreservers::Assignments` (r:1 w:0)
196
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
197
	/// Storage: `DataPreservers::Profiles` (r:1 w:0)
198
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: Some(1144), added: 3619, mode: `MaxEncodedLen`)
199
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:1 w:1)
200
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
201
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:1)
202
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
203
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:1)
204
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
205
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
206
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
207
	fn mark_valid_for_collating() -> Weight {
208
		// Proof Size summary in bytes:
209
		//  Measured:  `6379`
210
		//  Estimated: `7864`
211
		// Minimum execution time: 194_862_000 picoseconds.
212
		Weight::from_parts(202_613_000, 7864)
213
			.saturating_add(T::DbWeight::get().reads(10_u64))
214
			.saturating_add(T::DbWeight::get().writes(5_u64))
215
	}
216
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
217
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
218
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
219
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
220
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
221
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
222
	fn pause_container_chain() -> Weight {
223
		// Proof Size summary in bytes:
224
		//  Measured:  `2042`
225
		//  Estimated: `3527`
226
		// Minimum execution time: 67_568_000 picoseconds.
227
		Weight::from_parts(70_489_000, 3527)
228
			.saturating_add(T::DbWeight::get().reads(3_u64))
229
			.saturating_add(T::DbWeight::get().writes(2_u64))
230
	}
231
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
232
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
233
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
234
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
235
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
236
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
237
	fn unpause_container_chain() -> Weight {
238
		// Proof Size summary in bytes:
239
		//  Measured:  `2042`
240
		//  Estimated: `3527`
241
		// Minimum execution time: 66_742_000 picoseconds.
242
		Weight::from_parts(69_066_000, 3527)
243
			.saturating_add(T::DbWeight::get().reads(3_u64))
244
			.saturating_add(T::DbWeight::get().writes(2_u64))
245
	}
246
	/// Storage: `System::Account` (r:1 w:1)
247
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
248
	/// Storage: `Balances::Holds` (r:1 w:1)
249
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
250
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
251
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
252
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
253
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
254
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
255
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
256
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
257
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
258
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
259
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
260
	/// The range of component `x` is `[100, 3000000]`.
261
	/// The range of component `z` is `[1, 10]`.
262
	fn register_parathread(x: u32, _z: u32, ) -> Weight {
263
		// Proof Size summary in bytes:
264
		//  Measured:  `266`
265
		//  Estimated: `3731`
266
		// Minimum execution time: 86_243_000 picoseconds.
267
		Weight::from_parts(85_328_791, 3731)
268
			// Standard Error: 3
269
			.saturating_add(Weight::from_parts(1_231, 0).saturating_mul(x.into()))
270
			.saturating_add(T::DbWeight::get().reads(4_u64))
271
			.saturating_add(T::DbWeight::get().writes(7_u64))
272
	}
273
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
274
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
275
	/// Storage: `Registrar::PendingParathreadParams` (r:1 w:1)
276
	/// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
277
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
278
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
279
	fn set_parathread_params() -> Weight {
280
		// Proof Size summary in bytes:
281
		//  Measured:  `1742`
282
		//  Estimated: `3493`
283
		// Minimum execution time: 66_613_000 picoseconds.
284
		Weight::from_parts(70_934_000, 3493)
285
			.saturating_add(T::DbWeight::get().reads(3_u64))
286
			.saturating_add(T::DbWeight::get().writes(1_u64))
287
	}
288
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:0)
289
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
290
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
291
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
292
	fn set_para_manager() -> Weight {
293
		// Proof Size summary in bytes:
294
		//  Measured:  `237`
295
		//  Estimated: `3533`
296
		// Minimum execution time: 17_496_000 picoseconds.
297
		Weight::from_parts(18_433_000, 3533)
298
			.saturating_add(T::DbWeight::get().reads(1_u64))
299
			.saturating_add(T::DbWeight::get().writes(1_u64))
300
	}
301
}