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
2799
	fn send() -> Weight {
66
2799
		// Proof Size summary in bytes:
67
2799
		//  Measured:  `76`
68
2799
		//  Estimated: `3541`
69
2799
		// Minimum execution time: 35_689_000 picoseconds.
70
2799
		Weight::from_parts(36_463_000, 3541)
71
2799
			.saturating_add(T::DbWeight::get().reads(4_u64))
72
2799
			.saturating_add(T::DbWeight::get().writes(2_u64))
73
2799
	}
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
498
	fn teleport_assets() -> Weight {
85
498
		// Proof Size summary in bytes:
86
498
		//  Measured:  `76`
87
498
		//  Estimated: `3593`
88
498
		// Minimum execution time: 155_895_000 picoseconds.
89
498
		Weight::from_parts(158_000_000, 3593)
90
498
			.saturating_add(T::DbWeight::get().reads(5_u64))
91
498
			.saturating_add(T::DbWeight::get().writes(3_u64))
92
498
	}
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
141
	fn reserve_transfer_assets() -> Weight {
104
141
		// Proof Size summary in bytes:
105
141
		//  Measured:  `128`
106
141
		//  Estimated: `3593`
107
141
		// Minimum execution time: 152_618_000 picoseconds.
108
141
		Weight::from_parts(155_242_000, 3593)
109
141
			.saturating_add(T::DbWeight::get().reads(5_u64))
110
141
			.saturating_add(T::DbWeight::get().writes(3_u64))
111
141
	}
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
114
	fn transfer_assets() -> Weight {
123
114
		// Proof Size summary in bytes:
124
114
		//  Measured:  `76`
125
114
		//  Estimated: `3593`
126
114
		// Minimum execution time: 155_847_000 picoseconds.
127
114
		Weight::from_parts(158_738_000, 3593)
128
114
			.saturating_add(T::DbWeight::get().reads(5_u64))
129
114
			.saturating_add(T::DbWeight::get().writes(3_u64))
130
114
	}
131
45183
	fn execute() -> Weight {
132
45183
		// Proof Size summary in bytes:
133
45183
		//  Measured:  `0`
134
45183
		//  Estimated: `0`
135
45183
		// Minimum execution time: 13_073_000 picoseconds.
136
45183
		Weight::from_parts(13_526_000, 0)
137
45183
	}
138
	/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
139
	/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
140
345
	fn force_xcm_version() -> Weight {
141
345
		// Proof Size summary in bytes:
142
345
		//  Measured:  `0`
143
345
		//  Estimated: `0`
144
345
		// Minimum execution time: 10_120_000 picoseconds.
145
345
		Weight::from_parts(10_367_000, 0)
146
345
			.saturating_add(T::DbWeight::get().writes(1_u64))
147
345
	}
148
573
	fn force_default_xcm_version() -> Weight {
149
573
		// Proof Size summary in bytes:
150
573
		//  Measured:  `0`
151
573
		//  Estimated: `0`
152
573
		// Minimum execution time: 3_176_000 picoseconds.
153
573
		Weight::from_parts(3_284_000, 0)
154
573
	}
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
1776
	fn force_subscribe_version_notify() -> Weight {
170
1776
		// Proof Size summary in bytes:
171
1776
		//  Measured:  `76`
172
1776
		//  Estimated: `3541`
173
1776
		// Minimum execution time: 43_624_000 picoseconds.
174
1776
		Weight::from_parts(44_388_000, 3541)
175
1776
			.saturating_add(T::DbWeight::get().reads(6_u64))
176
1776
			.saturating_add(T::DbWeight::get().writes(5_u64))
177
1776
	}
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
1698
	fn force_unsubscribe_version_notify() -> Weight {
191
1698
		// Proof Size summary in bytes:
192
1698
		//  Measured:  `256`
193
1698
		//  Estimated: `3721`
194
1698
		// Minimum execution time: 50_082_000 picoseconds.
195
1698
		Weight::from_parts(51_071_000, 3721)
196
1698
			.saturating_add(T::DbWeight::get().reads(5_u64))
197
1698
			.saturating_add(T::DbWeight::get().writes(4_u64))
198
1698
	}
199
	/// Storage: `XcmPallet::XcmExecutionSuspended` (r:0 w:1)
200
	/// Proof: `XcmPallet::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
201
51
	fn force_suspension() -> Weight {
202
51
		// Proof Size summary in bytes:
203
51
		//  Measured:  `0`
204
51
		//  Estimated: `0`
205
51
		// Minimum execution time: 3_426_000 picoseconds.
206
51
		Weight::from_parts(3_512_000, 0)
207
51
			.saturating_add(T::DbWeight::get().writes(1_u64))
208
51
	}
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
69
	fn claim_assets() -> Weight {
327
69
		// Proof Size summary in bytes:
328
69
		//  Measured:  `23`
329
69
		//  Estimated: `3488`
330
69
		// Minimum execution time: 47_894_000 picoseconds.
331
69
		Weight::from_parts(48_743_000, 3488)
332
69
			.saturating_add(T::DbWeight::get().reads(1_u64))
333
69
			.saturating_add(T::DbWeight::get().writes(1_u64))
334
69
	}
335
}