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 42.0.0
20
//! DATE: 2024-12-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: 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_moonbeam_lazy_migrations
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/moonriver/src/weights/pallet_moonbeam_lazy_migrations.rs
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_moonbeam_lazy_migrations`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_moonbeam_lazy_migrations::WeightInfo for WeightInfo<T> {
49
	/// Storage: `Assets::Asset` (r:100 w:0)
50
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
51
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:100)
52
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
53
	/// The range of component `n` is `[1, 100]`.
54
	fn approve_assets_to_migrate(n: u32, ) -> Weight {
55
		// Proof Size summary in bytes:
56
		//  Measured:  `73 + n * (69 ±0)`
57
		//  Estimated: `990 + n * (2649 ±0)`
58
		// Minimum execution time: 6_883_000 picoseconds.
59
		Weight::from_parts(2_637_044, 990)
60
			// Standard Error: 3_597
61
			.saturating_add(Weight::from_parts(3_692_945, 0).saturating_mul(n.into()))
62
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
63
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
64
			.saturating_add(Weight::from_parts(0, 2649).saturating_mul(n.into()))
65
	}
66
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
67
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
68
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:1 w:0)
69
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
70
	/// Storage: `Assets::Asset` (r:1 w:1)
71
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
72
	/// Storage: `Assets::Metadata` (r:1 w:0)
73
	/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
74
	/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
75
	/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
76
	/// Storage: `EvmForeignAssets::AssetsById` (r:1 w:1)
77
	/// Proof: `EvmForeignAssets::AssetsById` (`max_values`: None, `max_size`: None, mode: `Measured`)
78
	/// Storage: `EvmForeignAssets::AssetsByLocation` (r:1 w:1)
79
	/// Proof: `EvmForeignAssets::AssetsByLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
80
	/// Storage: `EvmForeignAssets::CounterForAssetsById` (r:1 w:1)
81
	/// Proof: `EvmForeignAssets::CounterForAssetsById` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
82
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
83
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
85
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
87
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
88
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
89
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
90
	/// Storage: `EVM::AccountCodesMetadata` (r:1 w:1)
91
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
92
	/// Storage: `System::Account` (r:2 w:2)
93
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
94
	/// Storage: `EVM::AccountStorages` (r:11 w:11)
95
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
96
	/// Storage: `EVM::Suicided` (r:1 w:0)
97
	/// Proof: `EVM::Suicided` (`max_values`: None, `max_size`: None, mode: `Measured`)
98
	/// Storage: `Ethereum::Pending` (r:1 w:1)
99
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
100
	/// Storage: `EVM::AccountCodes` (r:0 w:1)
101
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
102
	fn start_foreign_assets_migration() -> Weight {
103
		// Proof Size summary in bytes:
104
		//  Measured:  `1788`
105
		//  Estimated: `30003`
106
		// Minimum execution time: 695_179_000 picoseconds.
107
		Weight::from_parts(706_457_000, 30003)
108
			.saturating_add(T::DbWeight::get().reads(28_u64))
109
			.saturating_add(T::DbWeight::get().writes(23_u64))
110
	}
111
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
112
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
113
	/// Storage: `Assets::Account` (r:1001 w:1000)
114
	/// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`)
115
	/// Storage: `System::Account` (r:1001 w:1001)
116
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
117
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
118
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
119
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
120
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
121
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
122
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
124
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
125
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
126
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
127
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
128
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
129
	/// Storage: `System::Digest` (r:1 w:0)
130
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
131
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
132
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
133
	/// Storage: `Assets::Asset` (r:1 w:0)
134
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
135
	/// Storage: `EVM::AccountStorages` (r:1002 w:1001)
136
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
137
	/// Storage: `Ethereum::Pending` (r:1 w:1)
138
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
139
	/// The range of component `n` is `[1, 1000]`.
140
	fn migrate_foreign_asset_balances(n: u32, ) -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `23977 + n * (215 ±0)`
143
		//  Estimated: `32580 + n * (2691 ±0)`
144
		// Minimum execution time: 401_500_000 picoseconds.
145
		Weight::from_parts(405_068_000, 32580)
146
			// Standard Error: 8_522_073
147
			.saturating_add(Weight::from_parts(870_643_639, 0).saturating_mul(n.into()))
148
			.saturating_add(T::DbWeight::get().reads(19_u64))
149
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
150
			.saturating_add(T::DbWeight::get().writes(8_u64))
151
			.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into())))
152
			.saturating_add(Weight::from_parts(0, 2691).saturating_mul(n.into()))
153
	}
154
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
155
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
156
	/// Storage: `Assets::Approvals` (r:1000 w:999)
157
	/// Proof: `Assets::Approvals` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
158
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
159
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160
	/// Storage: `EthereumXcm::EthereumXcmSuspended` (r:1 w:0)
161
	/// Proof: `EthereumXcm::EthereumXcmSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
162
	/// Storage: `EthereumXcm::Nonce` (r:1 w:1)
163
	/// Proof: `EthereumXcm::Nonce` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
164
	/// Storage: `EthereumChainId::ChainId` (r:1 w:0)
165
	/// Proof: `EthereumChainId::ChainId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
166
	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
167
	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
168
	/// Storage: `EVM::AccountCodesMetadata` (r:2 w:0)
169
	/// Proof: `EVM::AccountCodesMetadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
170
	/// Storage: `System::Account` (r:1 w:1)
171
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
172
	/// Storage: `System::Digest` (r:1 w:0)
173
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
174
	/// Storage: `EVM::AccountCodes` (r:1 w:0)
175
	/// Proof: `EVM::AccountCodes` (`max_values`: None, `max_size`: None, mode: `Measured`)
176
	/// Storage: `Assets::Asset` (r:1 w:0)
177
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
178
	/// Storage: `EVM::AccountStorages` (r:1000 w:999)
179
	/// Proof: `EVM::AccountStorages` (`max_values`: None, `max_size`: None, mode: `Measured`)
180
	/// Storage: `Ethereum::Pending` (r:1 w:1)
181
	/// Proof: `Ethereum::Pending` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
182
	/// The range of component `n` is `[1, 1000]`.
183
	fn migrate_foreign_asset_approvals(n: u32, ) -> Weight {
184
		// Proof Size summary in bytes:
185
		//  Measured:  `26544 + n * (1367 ±0)`
186
		//  Estimated: `32451 + n * (3843 ±0)`
187
		// Minimum execution time: 206_481_000 picoseconds.
188
		Weight::from_parts(207_264_000, 32451)
189
			// Standard Error: 25_525_292
190
			.saturating_add(Weight::from_parts(2_298_282_967, 0).saturating_mul(n.into()))
191
			.saturating_add(T::DbWeight::get().reads(15_u64))
192
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into())))
193
			.saturating_add(T::DbWeight::get().writes(4_u64))
194
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
195
			.saturating_add(Weight::from_parts(0, 3843).saturating_mul(n.into()))
196
	}
197
	/// Storage: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (r:1 w:1)
198
	/// Proof: `MoonbeamLazyMigrations::ForeignAssetMigrationStatusValue` (`max_values`: Some(1), `max_size`: Some(25), added: 520, mode: `MaxEncodedLen`)
199
	/// Storage: `Assets::Asset` (r:1 w:1)
200
	/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(174), added: 2649, mode: `MaxEncodedLen`)
201
	/// Storage: `Assets::Metadata` (r:1 w:1)
202
	/// Proof: `Assets::Metadata` (`max_values`: None, `max_size`: Some(152), added: 2627, mode: `MaxEncodedLen`)
203
	/// Storage: `System::Account` (r:1 w:1)
204
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
205
	/// Storage: `MoonbeamLazyMigrations::ApprovedForeignAssets` (r:0 w:1)
206
	/// Proof: `MoonbeamLazyMigrations::ApprovedForeignAssets` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`)
207
	fn finish_foreign_assets_migration() -> Weight {
208
		// Proof Size summary in bytes:
209
		//  Measured:  `830`
210
		//  Estimated: `3639`
211
		// Minimum execution time: 46_686_000 picoseconds.
212
		Weight::from_parts(47_551_000, 3639)
213
			.saturating_add(T::DbWeight::get().reads(4_u64))
214
			.saturating_add(T::DbWeight::get().writes(5_u64))
215
	}
216
}