moonbeam_runtime/weights/pallet_moonbeam_lazy_migrations.rs
1// Copyright 2025 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
18//! Autogenerated weights for `pallet_moonbeam_lazy_migrations`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2025-05-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25
26// Executed Command:
27// ./frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
32// --genesis-builder=runtime
33// --genesis-builder-preset=development
34// --steps=50
35// --repeat=20
36// --pallet=pallet_moonbeam_lazy_migrations
37// --extrinsic=*
38// --wasm-execution=compiled
39// --header=./file_header.txt
40// --template=./benchmarking/frame-weight-template.hbs
41// --output=./runtime/moonbeam/src/weights
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use sp_std::marker::PhantomData;
49
50/// Weights for `pallet_moonbeam_lazy_migrations`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_moonbeam_lazy_migrations::WeightInfo for WeightInfo<T> {
53 /// Storage: `Assets::Asset` (r:100 w:0)
54 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
55 /// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:100)
56 /// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
57 /// The range of component `n` is `[1, 100]`.
58 fn approve_assets_to_migrate(n: u32, ) -> Weight {
59 // Proof Size summary in bytes:
60 // Measured: `73 + n * (69 ±0)`
61 // Estimated: `990 + n * (2649 ±0)`
62 // Minimum execution time: 8_798_000 picoseconds.
63 Weight::from_parts(8_989_000, 990)
64 // Standard Error: 5_835
65 .saturating_add(Weight::from_parts(4_548_360, 0).saturating_mul(n.into()))
66 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
67 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
68 .saturating_add(Weight::from_parts(0, 2649).saturating_mul(n.into()))
69 }
70 /// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
71 /// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
72 /// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:1 w:0)
73 /// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
74 /// Storage: `Assets::Asset` (r:1 w:1)
75 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
76 /// Storage: `Assets::Metadata` (r:1 w:0)
77 /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
78 /// Storage: `AssetManager::AssetIdType` (r:1 w:1)
79 /// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
80 /// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
81 /// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
82 /// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
83 /// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
84 /// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
85 /// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
86 /// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
87 /// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
88 /// Storage: `EthereumXcm::Nonce` (r:1 w:1)
89 /// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
90 /// Storage: `EthereumChainId::ChainId` (r:1 w:0)
91 /// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
92 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
93 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
94 /// Storage: `EVM::AccountCodesMetadata` (r:1 w:1)
95 /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
96 /// Storage: `System::Account` (r:2 w:2)
97 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
98 /// Storage: `EVM::AccountStorages` (r:11 w:11)
99 /// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
100 /// Storage: `Ethereum::CounterForPending` (r:1 w:1)
101 /// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
102 /// Storage: `Ethereum::Pending` (r:1 w:1)
103 /// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
104 /// Storage: `EVM::AccountCodes` (r:0 w:1)
105 /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
106 fn start_foreign_assets_migration() -> Weight {
107 // Proof Size summary in bytes:
108 // Measured: `1854`
109 // Estimated: `30069`
110 // Minimum execution time: 732_958_000 picoseconds.
111 Weight::from_parts(758_582_000, 30069)
112 .saturating_add(T::DbWeight::get().reads(28_u64))
113 .saturating_add(T::DbWeight::get().writes(24_u64))
114 }
115 /// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
116 /// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
117 /// Storage: `Assets::Account` (r:1001 w:1000)
118 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
119 /// Storage: `System::Account` (r:1001 w:1001)
120 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
121 /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
122 /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123 /// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
124 /// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125 /// Storage: `EthereumXcm::Nonce` (r:1 w:1)
126 /// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
127 /// Storage: `EthereumChainId::ChainId` (r:1 w:0)
128 /// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
129 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
130 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
131 /// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
132 /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
133 /// Storage: `System::Digest` (r:1 w:0)
134 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
135 /// Storage: `EVM::AccountCodes` (r:1 w:0)
136 /// Proof: `EVM::AccountCodes` (`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 /// Storage: `EVM::AccountStorages` (r:1002 w:1001)
140 /// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
141 /// Storage: `Ethereum::CounterForPending` (r:1 w:1)
142 /// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
143 /// Storage: `Ethereum::Pending` (r:1001 w:1000)
144 /// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
145 /// The range of component `n` is `[1, 1000]`.
146 fn migrate_foreign_asset_balances(n: u32, ) -> Weight {
147 // Proof Size summary in bytes:
148 // Measured: `24020 + n * (215 ±0)`
149 // Estimated: `32619 + n * (2690 ±0)`
150 // Minimum execution time: 438_654_000 picoseconds.
151 Weight::from_parts(450_282_000, 32619)
152 // Standard Error: 48_701
153 .saturating_add(Weight::from_parts(172_547_057, 0).saturating_mul(n.into()))
154 .saturating_add(T::DbWeight::get().reads(21_u64))
155 .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
156 .saturating_add(T::DbWeight::get().writes(9_u64))
157 .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
158 .saturating_add(Weight::from_parts(0, 2690).saturating_mul(n.into()))
159 }
160 /// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
161 /// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
162 /// Storage: `Assets::Approvals` (r:1000 w:999)
163 /// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
164 /// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
165 /// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
166 /// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
167 /// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
168 /// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
169 /// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
170 /// Storage: `EthereumXcm::Nonce` (r:1 w:1)
171 /// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
172 /// Storage: `EthereumChainId::ChainId` (r:1 w:0)
173 /// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
174 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
175 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
176 /// Storage: `System::Account` (r:1 w:1)
177 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
178 /// Storage: `System::Digest` (r:1 w:0)
179 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
180 /// Storage: `EVM::AccountCodes` (r:1 w:0)
181 /// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
182 /// Storage: `Assets::Asset` (r:1 w:0)
183 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
184 /// Storage: `EVM::AccountStorages` (r:1000 w:999)
185 /// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
186 /// Storage: `Ethereum::CounterForPending` (r:1 w:1)
187 /// Proof: `Ethereum::CounterForPending` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
188 /// Storage: `Ethereum::Pending` (r:1000 w:999)
189 /// Proof: `Ethereum::Pending` (`max_values`: None, `max_size`: None, mode: `Measured`)
190 /// The range of component `n` is `[1, 1000]`.
191 fn migrate_foreign_asset_approvals(n: u32, ) -> Weight {
192 // Proof Size summary in bytes:
193 // Measured: `14369 + n * (150 ±0)`
194 // Estimated: `18804 + n * (2627 ±0)`
195 // Minimum execution time: 237_823_000 picoseconds.
196 Weight::from_parts(240_635_000, 18804)
197 // Standard Error: 49_122
198 .saturating_add(Weight::from_parts(146_293_752, 0).saturating_mul(n.into()))
199 .saturating_add(T::DbWeight::get().reads(16_u64))
200 .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
201 .saturating_add(T::DbWeight::get().writes(4_u64))
202 .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
203 .saturating_add(Weight::from_parts(0, 2627).saturating_mul(n.into()))
204 }
205 /// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
206 /// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
207 /// Storage: `Assets::Asset` (r:1 w:1)
208 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
209 /// Storage: `Assets::Metadata` (r:1 w:1)
210 /// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
211 /// Storage: `System::Account` (r:1 w:1)
212 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
213 /// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:1)
214 /// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
215 fn finish_foreign_assets_migration() -> Weight {
216 // Proof Size summary in bytes:
217 // Measured: `863`
218 // Estimated: `3639`
219 // Minimum execution time: 67_613_000 picoseconds.
220 Weight::from_parts(74_318_000, 3639)
221 .saturating_add(T::DbWeight::get().reads(4_u64))
222 .saturating_add(T::DbWeight::get().writes(5_u64))
223 }
224}