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_moonbeam_lazy_migrations`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, 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: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_moonbeam_lazy_migrations
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonbeam/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

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

            
48
/// Weights for `pallet_moonbeam_lazy_migrations`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_moonbeam_lazy_migrations::WeightInfo for WeightInfo<T> {
51
	/// Storage: `Assets::Asset` (r:100 w:0)
52
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
53
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:100)
54
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
55
	/// The range of component `n` is `[1, 100]`.
56
	fn approve_assets_to_migrate(n: u32, ) -> Weight {
57
		// Proof Size summary in bytes:
58
		//  Measured:  `73 + n * (69 ±0)`
59
		//  Estimated: `990 + n * (2649 ±0)`
60
		// Minimum execution time: 8_695_000 picoseconds.
61
		Weight::from_parts(3_127_876, 990)
62
			// Standard Error: 4_209
63
			.saturating_add(Weight::from_parts(4_331_879, 0).saturating_mul(n.into()))
64
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
65
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
66
			.saturating_add(Weight::from_parts(0, 2649).saturating_mul(n.into()))
67
	}
68
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
69
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
70
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:1 w:0)
71
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
72
	/// Storage: `Assets::Asset` (r:1 w:1)
73
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
74
	/// Storage: `Assets::Metadata` (r:1 w:0)
75
	/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
76
	/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
77
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
78
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
79
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
80
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
81
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
82
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
83
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
84
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
85
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
87
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
88
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
89
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
90
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
91
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
92
	/// Storage: `EVM::AccountCodesMetadata` (r:1 w:1)
93
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
94
	/// Storage: `System::Account` (r:2 w:2)
95
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
96
	/// Storage: `EVM::AccountStorages` (r:11 w:11)
97
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
98
	/// Storage: `EVM::Suicided` (r:1 w:0)
99
	/// Proof: `EVM::Suicided` (`max_values`: None, `max_size`: None, mode: `Measured`)
100
	/// Storage: `Ethereum::Pending` (r:1 w:1)
101
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
102
	/// Storage: `EVM::AccountCodes` (r:0 w:1)
103
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
104
	fn start_foreign_assets_migration() -> Weight {
105
		// Proof Size summary in bytes:
106
		//  Measured:  `1854`
107
		//  Estimated: `30069`
108
		// Minimum execution time: 721_848_000 picoseconds.
109
		Weight::from_parts(731_107_000, 30069)
110
			.saturating_add(T::DbWeight::get().reads(28_u64))
111
			.saturating_add(T::DbWeight::get().writes(23_u64))
112
	}
113
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
114
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
115
	/// Storage: `Assets::Account` (r:1001 w:1000)
116
	/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
117
	/// Storage: `System::Account` (r:1001 w:1001)
118
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
119
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
120
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
122
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
124
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
126
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
127
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
128
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
129
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
130
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// Storage: `System::Digest` (r:1 w:0)
132
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
133
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
134
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
135
	/// Storage: `Assets::Asset` (r:1 w:0)
136
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
137
	/// Storage: `EVM::AccountStorages` (r:1002 w:1001)
138
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
139
	/// Storage: `Ethereum::Pending` (r:1 w:1)
140
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
141
	/// The range of component `n` is `[1, 1000]`.
142
	fn migrate_foreign_asset_balances(n: u32, ) -> Weight {
143
		// Proof Size summary in bytes:
144
		//  Measured:  `23991 + n * (215 ±0)`
145
		//  Estimated: `32590 + n * (2690 ±0)`
146
		// Minimum execution time: 424_726_000 picoseconds.
147
		Weight::from_parts(431_643_000, 32590)
148
			// Standard Error: 8_330_314
149
			.saturating_add(Weight::from_parts(850_913_157, 0).saturating_mul(n.into()))
150
			.saturating_add(T::DbWeight::get().reads(19_u64))
151
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
152
			.saturating_add(T::DbWeight::get().writes(8_u64))
153
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
154
			.saturating_add(Weight::from_parts(0, 2690).saturating_mul(n.into()))
155
	}
156
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
157
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
158
	/// Storage: `Assets::Approvals` (r:1000 w:999)
159
	/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
160
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
161
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
162
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
163
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
164
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
165
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
166
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
167
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
168
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
169
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
170
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
171
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
172
	/// Storage: `System::Account` (r:1 w:1)
173
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
174
	/// Storage: `System::Digest` (r:1 w:0)
175
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
176
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
177
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
178
	/// Storage: `Assets::Asset` (r:1 w:0)
179
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
180
	/// Storage: `EVM::AccountStorages` (r:1000 w:999)
181
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
182
	/// Storage: `Ethereum::Pending` (r:1 w:1)
183
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
184
	/// The range of component `n` is `[1, 1000]`.
185
	fn migrate_foreign_asset_approvals(n: u32, ) -> Weight {
186
		// Proof Size summary in bytes:
187
		//  Measured:  `26587 + n * (1367 ±0)`
188
		//  Estimated: `32500 + n * (3843 ±0)`
189
		// Minimum execution time: 226_303_000 picoseconds.
190
		Weight::from_parts(229_253_000, 32500)
191
			// Standard Error: 25_422_991
192
			.saturating_add(Weight::from_parts(2_264_085_101, 0).saturating_mul(n.into()))
193
			.saturating_add(T::DbWeight::get().reads(15_u64))
194
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into())))
195
			.saturating_add(T::DbWeight::get().writes(4_u64))
196
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
197
			.saturating_add(Weight::from_parts(0, 3843).saturating_mul(n.into()))
198
	}
199
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
200
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
201
	/// Storage: `Assets::Asset` (r:1 w:1)
202
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
203
	/// Storage: `Assets::Metadata` (r:1 w:1)
204
	/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
205
	/// Storage: `System::Account` (r:1 w:1)
206
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
207
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:1)
208
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
209
	fn finish_foreign_assets_migration() -> Weight {
210
		// Proof Size summary in bytes:
211
		//  Measured:  `863`
212
		//  Estimated: `3639`
213
		// Minimum execution time: 52_690_000 picoseconds.
214
		Weight::from_parts(53_905_000, 3639)
215
			.saturating_add(T::DbWeight::get().reads(4_u64))
216
			.saturating_add(T::DbWeight::get().writes(5_u64))
217
	}
218
}