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_xcm
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
// pallet_xcm
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/pallet_xcm.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_xcm using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_xcm::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
58
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
59
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
60
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
61
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
62
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
63
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
64
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
65
	fn send() -> Weight {
66
		// Proof Size summary in bytes:
67
		//  Measured:  `76`
68
		//  Estimated: `3541`
69
		// Minimum execution time: 35_689_000 picoseconds.
70
		Weight::from_parts(36_463_000, 3541)
71
			.saturating_add(T::DbWeight::get().reads(4_u64))
72
			.saturating_add(T::DbWeight::get().writes(2_u64))
73
	}
74
	/// Storage: `System::Account` (r:1 w:1)
75
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
76
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
77
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
78
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
79
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
80
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
81
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
82
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
83
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
84
	fn teleport_assets() -> Weight {
85
		// Proof Size summary in bytes:
86
		//  Measured:  `76`
87
		//  Estimated: `3593`
88
		// Minimum execution time: 155_895_000 picoseconds.
89
		Weight::from_parts(158_000_000, 3593)
90
			.saturating_add(T::DbWeight::get().reads(5_u64))
91
			.saturating_add(T::DbWeight::get().writes(3_u64))
92
	}
93
	/// Storage: `System::Account` (r:1 w:1)
94
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
95
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
96
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
97
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
98
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
99
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
100
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
101
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
102
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
103
	fn reserve_transfer_assets() -> Weight {
104
		// Proof Size summary in bytes:
105
		//  Measured:  `128`
106
		//  Estimated: `3593`
107
		// Minimum execution time: 152_618_000 picoseconds.
108
		Weight::from_parts(155_242_000, 3593)
109
			.saturating_add(T::DbWeight::get().reads(5_u64))
110
			.saturating_add(T::DbWeight::get().writes(3_u64))
111
	}
112
	/// Storage: `System::Account` (r:1 w:1)
113
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
114
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
115
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
116
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
117
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
118
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
119
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
120
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
121
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
122
	fn transfer_assets() -> Weight {
123
		// Proof Size summary in bytes:
124
		//  Measured:  `76`
125
		//  Estimated: `3593`
126
		// Minimum execution time: 155_847_000 picoseconds.
127
		Weight::from_parts(158_738_000, 3593)
128
			.saturating_add(T::DbWeight::get().reads(5_u64))
129
			.saturating_add(T::DbWeight::get().writes(3_u64))
130
	}
131
	fn execute() -> Weight {
132
		// Proof Size summary in bytes:
133
		//  Measured:  `0`
134
		//  Estimated: `0`
135
		// Minimum execution time: 13_073_000 picoseconds.
136
		Weight::from_parts(13_526_000, 0)
137
	}
138
	/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
139
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
	fn force_xcm_version() -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `0`
143
		//  Estimated: `0`
144
		// Minimum execution time: 10_120_000 picoseconds.
145
		Weight::from_parts(10_367_000, 0)
146
			.saturating_add(T::DbWeight::get().writes(1_u64))
147
	}
148
	fn force_default_xcm_version() -> Weight {
149
		// Proof Size summary in bytes:
150
		//  Measured:  `0`
151
		//  Estimated: `0`
152
		// Minimum execution time: 3_176_000 picoseconds.
153
		Weight::from_parts(3_284_000, 0)
154
	}
155
	/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
156
	/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
157
	/// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
158
	/// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
159
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
160
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
161
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
162
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
163
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
164
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
165
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
166
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
167
	/// Storage: `XcmPallet::Queries` (r:0 w:1)
168
	/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
169
	fn force_subscribe_version_notify() -> Weight {
170
		// Proof Size summary in bytes:
171
		//  Measured:  `76`
172
		//  Estimated: `3541`
173
		// Minimum execution time: 43_624_000 picoseconds.
174
		Weight::from_parts(44_388_000, 3541)
175
			.saturating_add(T::DbWeight::get().reads(6_u64))
176
			.saturating_add(T::DbWeight::get().writes(5_u64))
177
	}
178
	/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
179
	/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
180
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
181
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
182
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
183
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
184
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
185
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
186
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
187
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
188
	/// Storage: `XcmPallet::Queries` (r:0 w:1)
189
	/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
190
	fn force_unsubscribe_version_notify() -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `256`
193
		//  Estimated: `3721`
194
		// Minimum execution time: 50_082_000 picoseconds.
195
		Weight::from_parts(51_071_000, 3721)
196
			.saturating_add(T::DbWeight::get().reads(5_u64))
197
			.saturating_add(T::DbWeight::get().writes(4_u64))
198
	}
199
	/// Storage: `XcmPallet::XcmExecutionSuspended` (r:0 w:1)
200
	/// Proof: `XcmPallet::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
201
	fn force_suspension() -> Weight {
202
		// Proof Size summary in bytes:
203
		//  Measured:  `0`
204
		//  Estimated: `0`
205
		// Minimum execution time: 3_426_000 picoseconds.
206
		Weight::from_parts(3_512_000, 0)
207
			.saturating_add(T::DbWeight::get().writes(1_u64))
208
	}
209
	/// Storage: `XcmPallet::SupportedVersion` (r:5 w:2)
210
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
211
	fn migrate_supported_version() -> Weight {
212
		// Proof Size summary in bytes:
213
		//  Measured:  `22`
214
		//  Estimated: `13387`
215
		// Minimum execution time: 22_495_000 picoseconds.
216
		Weight::from_parts(22_947_000, 13387)
217
			.saturating_add(T::DbWeight::get().reads(5_u64))
218
			.saturating_add(T::DbWeight::get().writes(2_u64))
219
	}
220
	/// Storage: `XcmPallet::VersionNotifiers` (r:5 w:2)
221
	/// Proof: `XcmPallet::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
222
	fn migrate_version_notifiers() -> Weight {
223
		// Proof Size summary in bytes:
224
		//  Measured:  `26`
225
		//  Estimated: `13391`
226
		// Minimum execution time: 22_679_000 picoseconds.
227
		Weight::from_parts(23_134_000, 13391)
228
			.saturating_add(T::DbWeight::get().reads(5_u64))
229
			.saturating_add(T::DbWeight::get().writes(2_u64))
230
	}
231
	/// Storage: `XcmPallet::VersionNotifyTargets` (r:6 w:0)
232
	/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
233
	fn already_notified_target() -> Weight {
234
		// Proof Size summary in bytes:
235
		//  Measured:  `78`
236
		//  Estimated: `15918`
237
		// Minimum execution time: 25_382_000 picoseconds.
238
		Weight::from_parts(25_776_000, 15918)
239
			.saturating_add(T::DbWeight::get().reads(6_u64))
240
	}
241
	/// Storage: `XcmPallet::VersionNotifyTargets` (r:2 w:1)
242
	/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
243
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
244
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
245
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
246
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
247
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
248
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
249
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
250
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
251
	fn notify_current_targets() -> Weight {
252
		// Proof Size summary in bytes:
253
		//  Measured:  `112`
254
		//  Estimated: `6052`
255
		// Minimum execution time: 42_901_000 picoseconds.
256
		Weight::from_parts(43_738_000, 6052)
257
			.saturating_add(T::DbWeight::get().reads(6_u64))
258
			.saturating_add(T::DbWeight::get().writes(3_u64))
259
	}
260
	/// Storage: `XcmPallet::VersionNotifyTargets` (r:4 w:0)
261
	/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
262
	fn notify_target_migration_fail() -> Weight {
263
		// Proof Size summary in bytes:
264
		//  Measured:  `36`
265
		//  Estimated: `10926`
266
		// Minimum execution time: 15_642_000 picoseconds.
267
		Weight::from_parts(16_104_000, 10926)
268
			.saturating_add(T::DbWeight::get().reads(4_u64))
269
	}
270
	/// Storage: `XcmPallet::VersionNotifyTargets` (r:5 w:2)
271
	/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
272
	fn migrate_version_notify_targets() -> Weight {
273
		// Proof Size summary in bytes:
274
		//  Measured:  `33`
275
		//  Estimated: `13398`
276
		// Minimum execution time: 22_735_000 picoseconds.
277
		Weight::from_parts(23_077_000, 13398)
278
			.saturating_add(T::DbWeight::get().reads(5_u64))
279
			.saturating_add(T::DbWeight::get().writes(2_u64))
280
	}
281
	/// Storage: `XcmPallet::VersionNotifyTargets` (r:5 w:2)
282
	/// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
283
	/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
284
	/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
285
	/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
286
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
287
	/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
288
	/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
289
	/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
290
	/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
291
	fn migrate_and_notify_old_targets() -> Weight {
292
		// Proof Size summary in bytes:
293
		//  Measured:  `112`
294
		//  Estimated: `13477`
295
		// Minimum execution time: 54_552_000 picoseconds.
296
		Weight::from_parts(55_708_000, 13477)
297
			.saturating_add(T::DbWeight::get().reads(9_u64))
298
			.saturating_add(T::DbWeight::get().writes(4_u64))
299
	}
300
	/// Storage: `XcmPallet::QueryCounter` (r:1 w:1)
301
	/// Proof: `XcmPallet::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
302
	/// Storage: `XcmPallet::Queries` (r:0 w:1)
303
	/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
304
	fn new_query() -> Weight {
305
		// Proof Size summary in bytes:
306
		//  Measured:  `0`
307
		//  Estimated: `1485`
308
		// Minimum execution time: 3_190_000 picoseconds.
309
		Weight::from_parts(3_301_000, 1485)
310
			.saturating_add(T::DbWeight::get().reads(1_u64))
311
			.saturating_add(T::DbWeight::get().writes(2_u64))
312
	}
313
	/// Storage: `XcmPallet::Queries` (r:1 w:1)
314
	/// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
315
	fn take_response() -> Weight {
316
		// Proof Size summary in bytes:
317
		//  Measured:  `7576`
318
		//  Estimated: `11041`
319
		// Minimum execution time: 29_285_000 picoseconds.
320
		Weight::from_parts(29_963_000, 11041)
321
			.saturating_add(T::DbWeight::get().reads(1_u64))
322
			.saturating_add(T::DbWeight::get().writes(1_u64))
323
	}
324
	/// Storage: `XcmPallet::AssetTraps` (r:1 w:1)
325
	/// Proof: `XcmPallet::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
326
	fn claim_assets() -> Weight {
327
		// Proof Size summary in bytes:
328
		//  Measured:  `23`
329
		//  Estimated: `3488`
330
		// Minimum execution time: 47_894_000 picoseconds.
331
		Weight::from_parts(48_743_000, 3488)
332
			.saturating_add(T::DbWeight::get().reads(1_u64))
333
			.saturating_add(T::DbWeight::get().writes(1_u64))
334
	}
335
}