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 runtime_parachains::paras
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
21
//! DATE: 2024-09-25, 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("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// runtime_parachains::paras
34
// --extrinsic
35
// *
36
// --chain=starlight-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/starlight_weights/runtime_parachains::paras.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 runtime_parachains::paras using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> runtime_parachains::paras::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
58
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
59
	/// Storage: `Paras::CurrentCodeHash` (r:1 w:1)
60
	/// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `System::Digest` (r:1 w:1)
62
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63
	/// Storage: `Paras::PastCodeMeta` (r:1 w:1)
64
	/// Proof: `Paras::PastCodeMeta` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	/// Storage: `Paras::PastCodePruning` (r:1 w:1)
66
	/// Proof: `Paras::PastCodePruning` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
67
	/// Storage: `Paras::PastCodeHash` (r:0 w:1)
68
	/// Proof: `Paras::PastCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
69
	/// Storage: `Paras::CodeByHash` (r:0 w:1)
70
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
71
	/// The range of component `c` is `[9, 3145728]`.
72
	fn force_set_current_code(c: u32, ) -> Weight {
73
		// Proof Size summary in bytes:
74
		//  Measured:  `8309`
75
		//  Estimated: `11774`
76
		// Minimum execution time: 39_768_000 picoseconds.
77
		Weight::from_parts(40_240_000, 11774)
78
			// Standard Error: 7
79
			.saturating_add(Weight::from_parts(2_325, 0).saturating_mul(c.into()))
80
			.saturating_add(T::DbWeight::get().reads(5_u64))
81
			.saturating_add(T::DbWeight::get().writes(7_u64))
82
	}
83
	/// Storage: `Paras::Heads` (r:0 w:1)
84
	/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
85
	/// The range of component `s` is `[9, 1048576]`.
86
	fn force_set_current_head(s: u32, ) -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `0`
89
		//  Estimated: `0`
90
		// Minimum execution time: 8_520_000 picoseconds.
91
		Weight::from_parts(9_672_534, 0)
92
			// Standard Error: 0
93
			.saturating_add(Weight::from_parts(892, 0).saturating_mul(s.into()))
94
			.saturating_add(T::DbWeight::get().writes(1_u64))
95
	}
96
	/// Storage: `Paras::MostRecentContext` (r:0 w:1)
97
	/// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`)
98
	fn force_set_most_recent_context() -> Weight {
99
		// Proof Size summary in bytes:
100
		//  Measured:  `0`
101
		//  Estimated: `0`
102
		// Minimum execution time: 4_621_000 picoseconds.
103
		Weight::from_parts(4_849_000, 0)
104
			.saturating_add(T::DbWeight::get().writes(1_u64))
105
	}
106
	/// Storage: `Paras::FutureCodeHash` (r:1 w:1)
107
	/// Proof: `Paras::FutureCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
108
	/// Storage: `Paras::CurrentCodeHash` (r:1 w:0)
109
	/// Proof: `Paras::CurrentCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
110
	/// Storage: `Paras::UpgradeCooldowns` (r:1 w:1)
111
	/// Proof: `Paras::UpgradeCooldowns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
112
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
113
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
114
	/// Storage: `Paras::CodeByHash` (r:1 w:1)
115
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
116
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
117
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
118
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
119
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
120
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:1)
121
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
122
	/// Storage: `Paras::UpgradeRestrictionSignal` (r:0 w:1)
123
	/// Proof: `Paras::UpgradeRestrictionSignal` (`max_values`: None, `max_size`: None, mode: `Measured`)
124
	/// The range of component `c` is `[9, 3145728]`.
125
	fn force_schedule_code_upgrade(c: u32, ) -> Weight {
126
		// Proof Size summary in bytes:
127
		//  Measured:  `8519`
128
		//  Estimated: `11984`
129
		// Minimum execution time: 53_441_000 picoseconds.
130
		Weight::from_parts(54_128_000, 11984)
131
			// Standard Error: 9
132
			.saturating_add(Weight::from_parts(2_396, 0).saturating_mul(c.into()))
133
			.saturating_add(T::DbWeight::get().reads(8_u64))
134
			.saturating_add(T::DbWeight::get().writes(7_u64))
135
	}
136
	/// Storage: `Paras::FutureCodeUpgrades` (r:1 w:0)
137
	/// Proof: `Paras::FutureCodeUpgrades` (`max_values`: None, `max_size`: None, mode: `Measured`)
138
	/// Storage: `Registrar::Paras` (r:1 w:0)
139
	/// Proof: `Registrar::Paras` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	/// Storage: `Paras::Heads` (r:0 w:1)
141
	/// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`)
142
	/// Storage: `Paras::UpgradeGoAheadSignal` (r:0 w:1)
143
	/// Proof: `Paras::UpgradeGoAheadSignal` (`max_values`: None, `max_size`: None, mode: `Measured`)
144
	/// Storage: `Paras::MostRecentContext` (r:0 w:1)
145
	/// Proof: `Paras::MostRecentContext` (`max_values`: None, `max_size`: None, mode: `Measured`)
146
	/// The range of component `s` is `[9, 1048576]`.
147
	fn force_note_new_head(s: u32, ) -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `337`
150
		//  Estimated: `3802`
151
		// Minimum execution time: 21_254_000 picoseconds.
152
		Weight::from_parts(27_017_008, 3802)
153
			// Standard Error: 0
154
			.saturating_add(Weight::from_parts(890, 0).saturating_mul(s.into()))
155
			.saturating_add(T::DbWeight::get().reads(2_u64))
156
			.saturating_add(T::DbWeight::get().writes(3_u64))
157
	}
158
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
159
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160
	/// Storage: `Paras::ActionsQueue` (r:1 w:1)
161
	/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
162
	fn force_queue_action() -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `4379`
165
		//  Estimated: `7844`
166
		// Minimum execution time: 20_663_000 picoseconds.
167
		Weight::from_parts(21_420_000, 7844)
168
			.saturating_add(T::DbWeight::get().reads(2_u64))
169
			.saturating_add(T::DbWeight::get().writes(1_u64))
170
	}
171
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
172
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
173
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
174
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
175
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
176
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
177
	/// Storage: `Paras::ActionsQueue` (r:1 w:1)
178
	/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
179
	/// The range of component `c` is `[9, 3145728]`.
180
	fn add_trusted_validation_code(c: u32, ) -> Weight {
181
		// Proof Size summary in bytes:
182
		//  Measured:  `750`
183
		//  Estimated: `4215`
184
		// Minimum execution time: 95_369_000 picoseconds.
185
		Weight::from_parts(36_010_229, 4215)
186
			// Standard Error: 3
187
			.saturating_add(Weight::from_parts(1_778, 0).saturating_mul(c.into()))
188
			.saturating_add(T::DbWeight::get().reads(4_u64))
189
			.saturating_add(T::DbWeight::get().writes(3_u64))
190
	}
191
	/// Storage: `Paras::CodeByHashRefs` (r:1 w:0)
192
	/// Proof: `Paras::CodeByHashRefs` (`max_values`: None, `max_size`: None, mode: `Measured`)
193
	/// Storage: `Paras::CodeByHash` (r:0 w:1)
194
	/// Proof: `Paras::CodeByHash` (`max_values`: None, `max_size`: None, mode: `Measured`)
195
	fn poke_unused_validation_code() -> Weight {
196
		// Proof Size summary in bytes:
197
		//  Measured:  `28`
198
		//  Estimated: `3493`
199
		// Minimum execution time: 7_670_000 picoseconds.
200
		Weight::from_parts(8_024_000, 3493)
201
			.saturating_add(T::DbWeight::get().reads(1_u64))
202
			.saturating_add(T::DbWeight::get().writes(1_u64))
203
	}
204
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
205
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
206
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
207
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
208
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
209
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
210
	fn include_pvf_check_statement() -> Weight {
211
		// Proof Size summary in bytes:
212
		//  Measured:  `26773`
213
		//  Estimated: `30238`
214
		// Minimum execution time: 115_167_000 picoseconds.
215
		Weight::from_parts(117_966_000, 30238)
216
			.saturating_add(T::DbWeight::get().reads(3_u64))
217
			.saturating_add(T::DbWeight::get().writes(1_u64))
218
	}
219
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
220
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
221
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
222
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
223
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
224
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
225
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
226
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
227
	/// Storage: `Paras::UpcomingUpgrades` (r:1 w:1)
228
	/// Proof: `Paras::UpcomingUpgrades` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
229
	/// Storage: `System::Digest` (r:1 w:1)
230
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
231
	/// Storage: `Paras::FutureCodeUpgrades` (r:0 w:100)
232
	/// Proof: `Paras::FutureCodeUpgrades` (`max_values`: None, `max_size`: None, mode: `Measured`)
233
	fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
234
		// Proof Size summary in bytes:
235
		//  Measured:  `27427`
236
		//  Estimated: `30892`
237
		// Minimum execution time: 872_841_000 picoseconds.
238
		Weight::from_parts(954_922_000, 30892)
239
			.saturating_add(T::DbWeight::get().reads(6_u64))
240
			.saturating_add(T::DbWeight::get().writes(104_u64))
241
	}
242
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
243
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
244
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
245
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
246
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
247
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
248
	fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
249
		// Proof Size summary in bytes:
250
		//  Measured:  `27405`
251
		//  Estimated: `30870`
252
		// Minimum execution time: 109_657_000 picoseconds.
253
		Weight::from_parts(115_436_000, 30870)
254
			.saturating_add(T::DbWeight::get().reads(3_u64))
255
			.saturating_add(T::DbWeight::get().writes(1_u64))
256
	}
257
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
258
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
259
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
260
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
261
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
262
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
263
	/// Storage: `Paras::PvfActiveVoteList` (r:1 w:1)
264
	/// Proof: `Paras::PvfActiveVoteList` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
265
	/// Storage: `Paras::ActionsQueue` (r:1 w:1)
266
	/// Proof: `Paras::ActionsQueue` (`max_values`: None, `max_size`: None, mode: `Measured`)
267
	fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
268
		// Proof Size summary in bytes:
269
		//  Measured:  `26795`
270
		//  Estimated: `30260`
271
		// Minimum execution time: 676_891_000 picoseconds.
272
		Weight::from_parts(690_864_000, 30260)
273
			.saturating_add(T::DbWeight::get().reads(5_u64))
274
			.saturating_add(T::DbWeight::get().writes(3_u64))
275
	}
276
	/// Storage: `ParasShared::ActiveValidatorKeys` (r:1 w:0)
277
	/// Proof: `ParasShared::ActiveValidatorKeys` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
278
	/// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0)
279
	/// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
280
	/// Storage: `Paras::PvfActiveVoteMap` (r:1 w:1)
281
	/// Proof: `Paras::PvfActiveVoteMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
282
	fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
283
		// Proof Size summary in bytes:
284
		//  Measured:  `26773`
285
		//  Estimated: `30238`
286
		// Minimum execution time: 105_411_000 picoseconds.
287
		Weight::from_parts(110_733_000, 30238)
288
			.saturating_add(T::DbWeight::get().reads(3_u64))
289
			.saturating_add(T::DbWeight::get().writes(1_u64))
290
	}
291
}