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: 2024-08-05, 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`: None, mode: `Measured`)
65
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
66
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
67
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
68
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
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: 73_791_000 picoseconds.
76
		Weight::from_parts(52_500_989, 3731)
77
			// Standard Error: 10
78
			.saturating_add(Weight::from_parts(1_580, 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`: None, mode: `Measured`)
93
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:1)
94
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
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: `ServicesPayment::MaxTip` (r:0 w:1)
100
	/// Proof: `ServicesPayment::MaxTip` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
101
	/// Storage: `ServicesPayment::RefundAddress` (r:0 w:1)
102
	/// Proof: `ServicesPayment::RefundAddress` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
103
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:0 w:1)
104
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
105
	/// Storage: `ServicesPayment::MaxCorePrice` (r:0 w:1)
106
	/// Proof: `ServicesPayment::MaxCorePrice` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
107
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:0 w:1)
108
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
109
	/// Storage: `Registrar::ParaGenesisData` (r:0 w:1)
110
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
111
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
112
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`)
113
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
114
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
115
	/// Storage: `DataPreservers::Assignments` (r:0 w:1)
116
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
117
	/// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1)
118
	/// Proof: `AuthorNoting::LatestAuthor` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
119
	fn deregister_immediate() -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `3075`
122
		//  Estimated: `6540`
123
		// Minimum execution time: 163_972_000 picoseconds.
124
		Weight::from_parts(171_850_000, 6540)
125
			.saturating_add(T::DbWeight::get().reads(5_u64))
126
			.saturating_add(T::DbWeight::get().writes(14_u64))
127
	}
128
	/// Storage: `Registrar::PendingVerification` (r:1 w:0)
129
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: None, mode: `Measured`)
130
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
131
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
132
	/// Storage: `Registrar::PendingPaused` (r:1 w:0)
133
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
134
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
135
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
136
	/// Storage: `Registrar::Paused` (r:1 w:0)
137
	/// Proof: `Registrar::Paused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
138
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
139
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
140
	/// Storage: `Registrar::PendingToRemove` (r:1 w:1)
141
	/// Proof: `Registrar::PendingToRemove` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
142
	fn deregister_scheduled() -> Weight {
143
		// Proof Size summary in bytes:
144
		//  Measured:  `1222`
145
		//  Estimated: `4687`
146
		// Minimum execution time: 68_017_000 picoseconds.
147
		Weight::from_parts(73_227_000, 4687)
148
			.saturating_add(T::DbWeight::get().reads(7_u64))
149
			.saturating_add(T::DbWeight::get().writes(2_u64))
150
	}
151
	fn deregister_with_relay_proof_immediate() -> Weight {
152
		// Proof Size summary in bytes:
153
		//  Measured:  `0`
154
		//  Estimated: `0`
155
		// Minimum execution time: 0_000 picoseconds.
156
		Weight::from_parts(0, 0)
157
	}
158
	fn deregister_with_relay_proof_scheduled() -> Weight {
159
		// Proof Size summary in bytes:
160
		//  Measured:  `0`
161
		//  Estimated: `0`
162
		// Minimum execution time: 0_000 picoseconds.
163
		Weight::from_parts(0, 0)
164
	}
165
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
166
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: None, mode: `Measured`)
167
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
168
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
169
	/// Storage: `Registrar::RegisteredParaIds` (r:1 w:0)
170
	/// Proof: `Registrar::RegisteredParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
171
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
172
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
173
	/// Storage: `DataPreservers::Assignments` (r:1 w:0)
174
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
175
	/// Storage: `DataPreservers::Profiles` (r:1 w:0)
176
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
177
	/// Storage: `ServicesPayment::GivenFreeCredits` (r:1 w:1)
178
	/// Proof: `ServicesPayment::GivenFreeCredits` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
179
	/// Storage: `ServicesPayment::BlockProductionCredits` (r:1 w:1)
180
	/// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
181
	/// Storage: `ServicesPayment::CollatorAssignmentCredits` (r:1 w:1)
182
	/// Proof: `ServicesPayment::CollatorAssignmentCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
183
	fn mark_valid_for_collating() -> Weight {
184
		// Proof Size summary in bytes:
185
		//  Measured:  `5956`
186
		//  Estimated: `9421`
187
		// Minimum execution time: 151_521_000 picoseconds.
188
		Weight::from_parts(165_166_000, 9421)
189
			.saturating_add(T::DbWeight::get().reads(9_u64))
190
			.saturating_add(T::DbWeight::get().writes(5_u64))
191
	}
192
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
193
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
194
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
195
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
196
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
197
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
198
	fn pause_container_chain() -> Weight {
199
		// Proof Size summary in bytes:
200
		//  Measured:  `2042`
201
		//  Estimated: `3527`
202
		// Minimum execution time: 60_592_000 picoseconds.
203
		Weight::from_parts(69_721_000, 3527)
204
			.saturating_add(T::DbWeight::get().reads(3_u64))
205
			.saturating_add(T::DbWeight::get().writes(2_u64))
206
	}
207
	/// Storage: `Registrar::PendingParaIds` (r:1 w:1)
208
	/// Proof: `Registrar::PendingParaIds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
209
	/// Storage: `Registrar::PendingPaused` (r:1 w:1)
210
	/// Proof: `Registrar::PendingPaused` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
211
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
212
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
213
	fn unpause_container_chain() -> Weight {
214
		// Proof Size summary in bytes:
215
		//  Measured:  `2042`
216
		//  Estimated: `3527`
217
		// Minimum execution time: 59_451_000 picoseconds.
218
		Weight::from_parts(66_485_000, 3527)
219
			.saturating_add(T::DbWeight::get().reads(3_u64))
220
			.saturating_add(T::DbWeight::get().writes(2_u64))
221
	}
222
	/// Storage: `System::Account` (r:1 w:1)
223
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
224
	/// Storage: `Balances::Holds` (r:1 w:1)
225
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(121), added: 2596, mode: `MaxEncodedLen`)
226
	/// Storage: `Registrar::ParaGenesisData` (r:1 w:1)
227
	/// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`)
228
	/// Storage: `Registrar::PendingVerification` (r:1 w:1)
229
	/// Proof: `Registrar::PendingVerification` (`max_values`: None, `max_size`: None, mode: `Measured`)
230
	/// Storage: `Registrar::ParathreadParams` (r:0 w:1)
231
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`)
232
	/// Storage: `Registrar::RegistrarDeposit` (r:0 w:1)
233
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
234
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
235
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
236
	/// The range of component `x` is `[100, 3000000]`.
237
	/// The range of component `z` is `[1, 10]`.
238
	fn register_parathread(x: u32, _z: u32, ) -> Weight {
239
		// Proof Size summary in bytes:
240
		//  Measured:  `266`
241
		//  Estimated: `3731`
242
		// Minimum execution time: 75_449_000 picoseconds.
243
		Weight::from_parts(202_753_396, 3731)
244
			// Standard Error: 2
245
			.saturating_add(Weight::from_parts(1_229, 0).saturating_mul(x.into()))
246
			.saturating_add(T::DbWeight::get().reads(4_u64))
247
			.saturating_add(T::DbWeight::get().writes(7_u64))
248
	}
249
	/// Storage: `Registrar::ParathreadParams` (r:1 w:0)
250
	/// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`)
251
	/// Storage: `Registrar::PendingParathreadParams` (r:1 w:1)
252
	/// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
253
	/// Storage: `Session::CurrentIndex` (r:1 w:0)
254
	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
255
	fn set_parathread_params() -> Weight {
256
		// Proof Size summary in bytes:
257
		//  Measured:  `1770`
258
		//  Estimated: `5235`
259
		// Minimum execution time: 58_927_000 picoseconds.
260
		Weight::from_parts(63_351_000, 5235)
261
			.saturating_add(T::DbWeight::get().reads(3_u64))
262
			.saturating_add(T::DbWeight::get().writes(1_u64))
263
	}
264
	/// Storage: `Registrar::RegistrarDeposit` (r:1 w:0)
265
	/// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`)
266
	/// Storage: `Registrar::ParaManager` (r:0 w:1)
267
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
268
	fn set_para_manager() -> Weight {
269
		// Proof Size summary in bytes:
270
		//  Measured:  `237`
271
		//  Estimated: `3702`
272
		// Minimum execution time: 14_699_000 picoseconds.
273
		Weight::from_parts(15_113_000, 3702)
274
			.saturating_add(T::DbWeight::get().reads(1_u64))
275
			.saturating_add(T::DbWeight::get().writes(1_u64))
276
	}
277
}