1
// Copyright 2024 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam 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
// Moonbeam 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 Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17
//! Autogenerated weights for `pallet_xcm`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
20
//! DATE: 2024-11-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonriver-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonriver-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_xcm
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/moonriver/src/weights/
38

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

            
43
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
44
use sp_std::marker::PhantomData;
45

            
46
/// Weights for `pallet_xcm`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
49
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
50
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
51
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
52
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
53
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
54
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
55
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
56
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
57
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
58
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
59
	fn send() -> Weight {
60
		// Proof Size summary in bytes:
61
		//  Measured:  `145`
62
		//  Estimated: `3610`
63
		// Minimum execution time: 18_285_000 picoseconds.
64
		Weight::from_parts(18_895_000, 3610)
65
			.saturating_add(T::DbWeight::get().reads(5_u64))
66
			.saturating_add(T::DbWeight::get().writes(2_u64))
67
	}
68
	/// Storage: `Benchmark::Override` (r:0 w:0)
69
	/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
70
	fn teleport_assets() -> Weight {
71
		// Proof Size summary in bytes:
72
		//  Measured:  `0`
73
		//  Estimated: `0`
74
		// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
75
		Weight::from_parts(18_446_744_073_709_551_000, 0)
76
	}
77
	/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
78
	/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
79
	/// Storage: `System::Account` (r:1 w:1)
80
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
81
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
82
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
83
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
84
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
85
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
86
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
87
	/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
88
	/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
89
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
90
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
91
	/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
92
	/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
93
	fn reserve_transfer_assets() -> Weight {
94
		// Proof Size summary in bytes:
95
		//  Measured:  `420`
96
		//  Estimated: `3885`
97
		// Minimum execution time: 85_788_000 picoseconds.
98
		Weight::from_parts(86_958_000, 3885)
99
			.saturating_add(T::DbWeight::get().reads(7_u64))
100
			.saturating_add(T::DbWeight::get().writes(4_u64))
101
	}
102
	/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
103
	/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
104
	/// Storage: `System::Account` (r:1 w:1)
105
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
106
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
107
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
108
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
109
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
111
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
112
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
113
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
114
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
115
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
116
16
	fn transfer_assets() -> Weight {
117
16
		// Proof Size summary in bytes:
118
16
		//  Measured:  `217`
119
16
		//  Estimated: `3682`
120
16
		// Minimum execution time: 79_382_000 picoseconds.
121
16
		Weight::from_parts(81_266_000, 3682)
122
16
			.saturating_add(T::DbWeight::get().reads(7_u64))
123
16
			.saturating_add(T::DbWeight::get().writes(3_u64))
124
16
	}
125
	/// Storage: `Benchmark::Override` (r:0 w:0)
126
	/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
127
	fn execute() -> Weight {
128
		// Proof Size summary in bytes:
129
		//  Measured:  `0`
130
		//  Estimated: `0`
131
		// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
132
		Weight::from_parts(18_446_744_073_709_551_000, 0)
133
	}
134
	/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
135
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
136
	fn force_xcm_version() -> Weight {
137
		// Proof Size summary in bytes:
138
		//  Measured:  `0`
139
		//  Estimated: `0`
140
		// Minimum execution time: 6_545_000 picoseconds.
141
		Weight::from_parts(6_941_000, 0)
142
			.saturating_add(T::DbWeight::get().writes(1_u64))
143
	}
144
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:0 w:1)
145
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146
	fn force_default_xcm_version() -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `0`
149
		//  Estimated: `0`
150
		// Minimum execution time: 2_053_000 picoseconds.
151
		Weight::from_parts(2_215_000, 0)
152
			.saturating_add(T::DbWeight::get().writes(1_u64))
153
	}
154
	/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
155
	/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
156
	/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
157
	/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
159
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
160
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
161
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
162
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
163
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
164
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
165
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
166
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
167
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
168
	/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
169
	/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
170
	fn force_subscribe_version_notify() -> Weight {
171
		// Proof Size summary in bytes:
172
		//  Measured:  `145`
173
		//  Estimated: `3610`
174
		// Minimum execution time: 24_179_000 picoseconds.
175
		Weight::from_parts(24_790_000, 3610)
176
			.saturating_add(T::DbWeight::get().reads(7_u64))
177
			.saturating_add(T::DbWeight::get().writes(5_u64))
178
	}
179
	/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
180
	/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
181
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
182
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
183
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
184
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
185
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
186
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
187
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
188
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
189
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
190
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
191
	/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
192
	/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
193
	fn force_unsubscribe_version_notify() -> Weight {
194
		// Proof Size summary in bytes:
195
		//  Measured:  `328`
196
		//  Estimated: `3793`
197
		// Minimum execution time: 25_479_000 picoseconds.
198
		Weight::from_parts(26_343_000, 3793)
199
			.saturating_add(T::DbWeight::get().reads(6_u64))
200
			.saturating_add(T::DbWeight::get().writes(4_u64))
201
	}
202
	/// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1)
203
	/// Proof: `PolkadotXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
204
	fn force_suspension() -> Weight {
205
		// Proof Size summary in bytes:
206
		//  Measured:  `0`
207
		//  Estimated: `0`
208
		// Minimum execution time: 2_034_000 picoseconds.
209
		Weight::from_parts(2_162_000, 0)
210
			.saturating_add(T::DbWeight::get().writes(1_u64))
211
	}
212
	/// Storage: `PolkadotXcm::SupportedVersion` (r:5 w:2)
213
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
214
	fn migrate_supported_version() -> Weight {
215
		// Proof Size summary in bytes:
216
		//  Measured:  `125`
217
		//  Estimated: `13490`
218
		// Minimum execution time: 25_603_000 picoseconds.
219
		Weight::from_parts(26_123_000, 13490)
220
			.saturating_add(T::DbWeight::get().reads(5_u64))
221
			.saturating_add(T::DbWeight::get().writes(2_u64))
222
	}
223
	/// Storage: `PolkadotXcm::VersionNotifiers` (r:5 w:2)
224
	/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
225
	fn migrate_version_notifiers() -> Weight {
226
		// Proof Size summary in bytes:
227
		//  Measured:  `129`
228
		//  Estimated: `13494`
229
		// Minimum execution time: 25_769_000 picoseconds.
230
		Weight::from_parts(26_211_000, 13494)
231
			.saturating_add(T::DbWeight::get().reads(5_u64))
232
			.saturating_add(T::DbWeight::get().writes(2_u64))
233
	}
234
	/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:6 w:0)
235
	/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
236
	fn already_notified_target() -> Weight {
237
		// Proof Size summary in bytes:
238
		//  Measured:  `178`
239
		//  Estimated: `16018`
240
		// Minimum execution time: 32_731_000 picoseconds.
241
		Weight::from_parts(33_335_000, 16018)
242
			.saturating_add(T::DbWeight::get().reads(6_u64))
243
	}
244
	/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1)
245
	/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
246
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
247
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
248
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
249
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
250
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
251
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
252
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
253
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
254
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
255
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
256
	fn notify_current_targets() -> Weight {
257
		// Proof Size summary in bytes:
258
		//  Measured:  `212`
259
		//  Estimated: `6152`
260
		// Minimum execution time: 25_727_000 picoseconds.
261
		Weight::from_parts(26_304_000, 6152)
262
			.saturating_add(T::DbWeight::get().reads(7_u64))
263
			.saturating_add(T::DbWeight::get().writes(3_u64))
264
	}
265
	/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0)
266
	/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
267
	fn notify_target_migration_fail() -> Weight {
268
		// Proof Size summary in bytes:
269
		//  Measured:  `139`
270
		//  Estimated: `11029`
271
		// Minimum execution time: 18_532_000 picoseconds.
272
		Weight::from_parts(19_170_000, 11029)
273
			.saturating_add(T::DbWeight::get().reads(4_u64))
274
	}
275
	/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
276
	/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
277
	fn migrate_version_notify_targets() -> Weight {
278
		// Proof Size summary in bytes:
279
		//  Measured:  `136`
280
		//  Estimated: `13501`
281
		// Minimum execution time: 26_085_000 picoseconds.
282
		Weight::from_parts(26_868_000, 13501)
283
			.saturating_add(T::DbWeight::get().reads(5_u64))
284
			.saturating_add(T::DbWeight::get().writes(2_u64))
285
	}
286
	/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2)
287
	/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
288
	/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
289
	/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
290
	/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
291
	/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
292
	/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
293
	/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
294
	/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
295
	/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
296
	/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
297
	/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
298
	fn migrate_and_notify_old_targets() -> Weight {
299
		// Proof Size summary in bytes:
300
		//  Measured:  `212`
301
		//  Estimated: `13577`
302
		// Minimum execution time: 40_192_000 picoseconds.
303
		Weight::from_parts(41_115_000, 13577)
304
			.saturating_add(T::DbWeight::get().reads(10_u64))
305
			.saturating_add(T::DbWeight::get().writes(4_u64))
306
	}
307
	/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
308
	/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
309
	/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
310
	/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
311
	fn new_query() -> Weight {
312
		// Proof Size summary in bytes:
313
		//  Measured:  `69`
314
		//  Estimated: `1554`
315
		// Minimum execution time: 4_161_000 picoseconds.
316
		Weight::from_parts(4_391_000, 1554)
317
			.saturating_add(T::DbWeight::get().reads(1_u64))
318
			.saturating_add(T::DbWeight::get().writes(2_u64))
319
	}
320
	/// Storage: `PolkadotXcm::Queries` (r:1 w:1)
321
	/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
322
	fn take_response() -> Weight {
323
		// Proof Size summary in bytes:
324
		//  Measured:  `7706`
325
		//  Estimated: `11171`
326
		// Minimum execution time: 25_991_000 picoseconds.
327
		Weight::from_parts(26_401_000, 11171)
328
			.saturating_add(T::DbWeight::get().reads(1_u64))
329
			.saturating_add(T::DbWeight::get().writes(1_u64))
330
	}
331
	/// Storage: `PolkadotXcm::ShouldRecordXcm` (r:1 w:0)
332
	/// Proof: `PolkadotXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
333
	/// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1)
334
	/// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
335
	fn claim_assets() -> Weight {
336
		// Proof Size summary in bytes:
337
		//  Measured:  `126`
338
		//  Estimated: `3591`
339
		// Minimum execution time: 37_823_000 picoseconds.
340
		Weight::from_parts(38_713_000, 3591)
341
			.saturating_add(T::DbWeight::get().reads(2_u64))
342
			.saturating_add(T::DbWeight::get().writes(1_u64))
343
	}
344
}