pallet_xcm_transactor/weights.rs
1// Copyright 2019-2025 PureStake Inc.
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
18//! Autogenerated weights for xcm_transactor
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `benchmarker`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
24//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25
26// Executed Command:
27// ./target/release/moonbeam
28// benchmark
29// pallet
30// --execution=wasm
31// --wasm-execution=compiled
32// --pallet
33// *
34// --extrinsic
35// *
36// --steps
37// 50
38// --repeat
39// 20
40// --template=./benchmarking/frame-weight-template.hbs
41// --json-file
42// raw.json
43// --output
44// weights/
45
46#![cfg_attr(rustfmt, rustfmt_skip)]
47#![allow(unused_parens)]
48#![allow(unused_imports)]
49
50use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51use sp_std::marker::PhantomData;
52
53/// Weight functions needed for xcm_transactor.
54pub trait WeightInfo {
55 fn register() -> Weight;
56 fn deregister() -> Weight;
57 fn set_transact_info() -> Weight;
58 fn remove_transact_info() -> Weight;
59 fn transact_through_derivative() -> Weight;
60 fn transact_through_sovereign() -> Weight;
61 fn transact_through_signed() -> Weight;
62 fn hrmp_manage() -> Weight;
63}
64
65/// Weights for xcm_transactor using the Substrate node and recommended hardware.
66pub struct SubstrateWeight<T>(PhantomData<T>);
67impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
68 /// Storage: XcmTransactor IndexToAccount (r:1 w:1)
69 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
70 fn register() -> Weight {
71 // Proof Size summary in bytes:
72 // Measured: `76`
73 // Estimated: `3541`
74 // Minimum execution time: 17_609_000 picoseconds.
75 Weight::from_parts(18_079_000, 3541)
76 .saturating_add(T::DbWeight::get().reads(1_u64))
77 .saturating_add(T::DbWeight::get().writes(1_u64))
78 }
79 /// Storage: XcmTransactor IndexToAccount (r:0 w:1)
80 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
81 fn deregister() -> Weight {
82 // Proof Size summary in bytes:
83 // Measured: `0`
84 // Estimated: `0`
85 // Minimum execution time: 12_958_000 picoseconds.
86 Weight::from_parts(13_219_000, 0)
87 .saturating_add(T::DbWeight::get().writes(1_u64))
88 }
89 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
90 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
91 fn set_transact_info() -> Weight {
92 // Proof Size summary in bytes:
93 // Measured: `0`
94 // Estimated: `0`
95 // Minimum execution time: 16_396_000 picoseconds.
96 Weight::from_parts(16_967_000, 0)
97 .saturating_add(T::DbWeight::get().writes(1_u64))
98 }
99 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
100 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
101 fn remove_transact_info() -> Weight {
102 // Proof Size summary in bytes:
103 // Measured: `0`
104 // Estimated: `0`
105 // Minimum execution time: 15_457_000 picoseconds.
106 Weight::from_parts(15_752_000, 0)
107 .saturating_add(T::DbWeight::get().writes(1_u64))
108 }
109 /// Storage: AssetManager AssetIdType (r:1 w:0)
110 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
111 /// Storage: XcmTransactor IndexToAccount (r:1 w:0)
112 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
113 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
114 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
115 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
116 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
117 /// Storage: AssetManager AssetTypeId (r:1 w:0)
118 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
119 /// Storage: Assets Asset (r:1 w:0)
120 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
121 fn transact_through_derivative() -> Weight {
122 // Proof Size summary in bytes:
123 // Measured: `443`
124 // Estimated: `23179`
125 // Minimum execution time: 37_628_000 picoseconds.
126 Weight::from_parts(38_250_000, 23179)
127 .saturating_add(T::DbWeight::get().reads(6_u64))
128 }
129 /// Storage: AssetManager AssetIdType (r:1 w:0)
130 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
131 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
132 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
133 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
134 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
135 /// Storage: AssetManager AssetTypeId (r:1 w:0)
136 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
137 /// Storage: Assets Asset (r:1 w:0)
138 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
139 fn transact_through_sovereign() -> Weight {
140 // Proof Size summary in bytes:
141 // Measured: `381`
142 // Estimated: `19023`
143 // Minimum execution time: 31_621_000 picoseconds.
144 Weight::from_parts(32_023_000, 19023)
145 .saturating_add(T::DbWeight::get().reads(5_u64))
146 }
147 /// Storage: AssetManager AssetIdType (r:1 w:0)
148 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
149 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
150 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
151 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
152 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
153 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
154 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
155 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
156 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
157 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
158 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
159 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
160 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
161 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
162 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
163 fn transact_through_signed() -> Weight {
164 // Proof Size summary in bytes:
165 // Measured: `425`
166 // Estimated: `23200`
167 // Minimum execution time: 67_658_000 picoseconds.
168 Weight::from_parts(68_448_000, 23200)
169 .saturating_add(T::DbWeight::get().reads(8_u64))
170 .saturating_add(T::DbWeight::get().writes(2_u64))
171 }
172 /// Storage: AssetManager AssetIdType (r:1 w:0)
173 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
174 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
175 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
176 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
177 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
178 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
179 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
180 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
181 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
182 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
183 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
184 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
185 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
186 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
187 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
188 fn hrmp_manage() -> Weight {
189 // Proof Size summary in bytes:
190 // Measured: `425`
191 // Estimated: `23200`
192 // Minimum execution time: 69_320_000 picoseconds.
193 Weight::from_parts(69_951_000, 23200)
194 .saturating_add(T::DbWeight::get().reads(8_u64))
195 .saturating_add(T::DbWeight::get().writes(2_u64))
196 }
197}
198
199// For backwards compatibility and tests
200impl WeightInfo for () {
201 /// Storage: XcmTransactor IndexToAccount (r:1 w:1)
202 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
203 fn register() -> Weight {
204 // Proof Size summary in bytes:
205 // Measured: `76`
206 // Estimated: `3541`
207 // Minimum execution time: 17_609_000 picoseconds.
208 Weight::from_parts(18_079_000, 3541)
209 .saturating_add(RocksDbWeight::get().reads(1_u64))
210 .saturating_add(RocksDbWeight::get().writes(1_u64))
211 }
212 /// Storage: XcmTransactor IndexToAccount (r:0 w:1)
213 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
214 fn deregister() -> Weight {
215 // Proof Size summary in bytes:
216 // Measured: `0`
217 // Estimated: `0`
218 // Minimum execution time: 12_958_000 picoseconds.
219 Weight::from_parts(13_219_000, 0)
220 .saturating_add(RocksDbWeight::get().writes(1_u64))
221 }
222 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
223 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
224 fn set_transact_info() -> Weight {
225 // Proof Size summary in bytes:
226 // Measured: `0`
227 // Estimated: `0`
228 // Minimum execution time: 16_396_000 picoseconds.
229 Weight::from_parts(16_967_000, 0)
230 .saturating_add(RocksDbWeight::get().writes(1_u64))
231 }
232 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1)
233 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
234 fn remove_transact_info() -> Weight {
235 // Proof Size summary in bytes:
236 // Measured: `0`
237 // Estimated: `0`
238 // Minimum execution time: 15_457_000 picoseconds.
239 Weight::from_parts(15_752_000, 0)
240 .saturating_add(RocksDbWeight::get().writes(1_u64))
241 }
242 /// Storage: AssetManager AssetIdType (r:1 w:0)
243 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
244 /// Storage: XcmTransactor IndexToAccount (r:1 w:0)
245 /// Proof Skipped: XcmTransactor IndexToAccount (max_values: None, max_size: None, mode: Measured)
246 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
247 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
248 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
249 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
250 /// Storage: AssetManager AssetTypeId (r:1 w:0)
251 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
252 /// Storage: Assets Asset (r:1 w:0)
253 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
254 fn transact_through_derivative() -> Weight {
255 // Proof Size summary in bytes:
256 // Measured: `443`
257 // Estimated: `23179`
258 // Minimum execution time: 37_628_000 picoseconds.
259 Weight::from_parts(38_250_000, 23179)
260 .saturating_add(RocksDbWeight::get().reads(6_u64))
261 }
262 /// Storage: AssetManager AssetIdType (r:1 w:0)
263 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
264 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
265 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
266 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
267 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
268 /// Storage: AssetManager AssetTypeId (r:1 w:0)
269 /// Proof Skipped: AssetManager AssetTypeId (max_values: None, max_size: None, mode: Measured)
270 /// Storage: Assets Asset (r:1 w:0)
271 /// Proof: Assets Asset (max_values: None, max_size: Some(174), added: 2649, mode: MaxEncodedLen)
272 fn transact_through_sovereign() -> Weight {
273 // Proof Size summary in bytes:
274 // Measured: `381`
275 // Estimated: `19023`
276 // Minimum execution time: 31_621_000 picoseconds.
277 Weight::from_parts(32_023_000, 19023)
278 .saturating_add(RocksDbWeight::get().reads(5_u64))
279 }
280 /// Storage: AssetManager AssetIdType (r:1 w:0)
281 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
282 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
283 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
284 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
285 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
286 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
287 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
288 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
289 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
290 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
291 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
292 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
293 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
294 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
295 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
296 fn transact_through_signed() -> Weight {
297 // Proof Size summary in bytes:
298 // Measured: `425`
299 // Estimated: `23200`
300 // Minimum execution time: 67_658_000 picoseconds.
301 Weight::from_parts(68_448_000, 23200)
302 .saturating_add(RocksDbWeight::get().reads(8_u64))
303 .saturating_add(RocksDbWeight::get().writes(2_u64))
304 }
305 /// Storage: AssetManager AssetIdType (r:1 w:0)
306 /// Proof Skipped: AssetManager AssetIdType (max_values: None, max_size: None, mode: Measured)
307 /// Storage: XcmTransactor TransactInfoWithWeightLimit (r:1 w:0)
308 /// Proof Skipped: XcmTransactor TransactInfoWithWeightLimit (max_values: None, max_size: None, mode: Measured)
309 /// Storage: XcmWeightTrader SupportedAssets (r:1 w:0)
310 /// Note: This now reads from pallet-xcm-weight-trader instead of local storage
311 /// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
312 /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
313 /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
314 /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
315 /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
316 /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
317 /// Storage: ParachainSystem HostConfiguration (r:1 w:0)
318 /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
319 /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
320 /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
321 fn hrmp_manage() -> Weight {
322 // Proof Size summary in bytes:
323 // Measured: `425`
324 // Estimated: `23200`
325 // Minimum execution time: 69_320_000 picoseconds.
326 Weight::from_parts(69_951_000, 23200)
327 .saturating_add(RocksDbWeight::get().reads(8_u64))
328 .saturating_add(RocksDbWeight::get().writes(2_u64))
329 }
330}