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 32.0.0
21
//! DATE: 2025-05-02, 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
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_registrar
34
// --extrinsic
35
// *
36
// --chain=flashbox_dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/flashbox_weights/pallet_registrar.rs
46

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

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

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