diff --git a/relay/polkadot/src/ah_migration/mod.rs b/relay/polkadot/src/ah_migration/mod.rs
index 2a8cd25096..d3ccdf8d54 100644
--- a/relay/polkadot/src/ah_migration/mod.rs
+++ b/relay/polkadot/src/ah_migration/mod.rs
@@ -17,3 +17,4 @@
//! Asset Hub Migration.
pub mod phase1;
+pub mod weights;
diff --git a/relay/polkadot/src/ah_migration/weights.rs b/relay/polkadot/src/ah_migration/weights.rs
new file mode 100644
index 0000000000..655761fd80
--- /dev/null
+++ b/relay/polkadot/src/ah_migration/weights.rs
@@ -0,0 +1,42 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Polkadot.
+
+// Polkadot is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Polkadot is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Polkadot. If not, see .
+
+use crate::*;
+use frame_support::{
+ parameter_types,
+ weights::{constants, RuntimeDbWeight},
+};
+
+/// DB Weight config trait adapter for AH migrator pallet weights.
+pub trait DbConfig {
+ type DbWeight: Get;
+}
+
+/// DB Weight config type adapter for AH migrator pallet weights.
+pub struct AhDbConfig;
+impl DbConfig for AhDbConfig {
+ type DbWeight = RocksDbWeight;
+}
+
+parameter_types! {
+ /// Asset Hub DB Weights.
+ ///
+ /// Copied from `asset_hub_polkadot::weights::RocksDbWeight`.
+ pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
+ read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
+ write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
+ };
+}
diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs
index 26ba07bb48..754af10e21 100644
--- a/relay/polkadot/src/lib.rs
+++ b/relay/polkadot/src/lib.rs
@@ -1547,8 +1547,7 @@ impl pallet_rc_migrator::Config for Runtime {
type AhExistentialDeposit = AhExistentialDeposit;
// TODO: weights::pallet_rc_migrator::WeightInfo
type RcWeightInfo = ();
- // TODO: weights::pallet_ah_migrator::WeightInfo
- type AhWeightInfo = ();
+ type AhWeightInfo = weights::pallet_ah_migrator::WeightInfo;
type RcIntraMigrationCalls = ahm_phase1::CallsEnabledDuringMigration;
type RcPostMigrationCalls = ahm_phase1::CallsEnabledAfterMigration;
}
diff --git a/relay/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs
index 15cf054a74..828d2dd6a2 100644
--- a/relay/polkadot/src/weights/mod.rs
+++ b/relay/polkadot/src/weights/mod.rs
@@ -17,6 +17,7 @@
pub mod frame_election_provider_support;
pub mod frame_system;
+pub mod pallet_ah_migrator;
pub mod pallet_asset_rate;
pub mod pallet_bags_list;
pub mod pallet_balances;
diff --git a/relay/polkadot/src/weights/pallet_ah_migrator.rs b/relay/polkadot/src/weights/pallet_ah_migrator.rs
new file mode 100644
index 0000000000..dbb6e0a156
--- /dev/null
+++ b/relay/polkadot/src/weights/pallet_ah_migrator.rs
@@ -0,0 +1,195 @@
+// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md
+// for a list of specific contributors.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! Autogenerated weights for `pallet_ah_migrator`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 46.0.0
+//! DATE: 2025-03-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `59a913dd07aa`, CPU: `QEMU Virtual CPU version 2.5+`
+//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
+
+// Executed Command:
+// frame-omni-bencher
+// v1
+// benchmark
+// pallet
+// --extrinsic=*
+// --runtime=target/production/wbuild/asset-hub-polkadot-runtime/asset_hub_polkadot_runtime.wasm
+// --pallet=pallet_ah_migrator
+// --header=/_work/fellowship-001/runtimes/runtimes/.github/scripts/cmd/file_header.txt
+// --output=./system-parachains/asset-hubs/asset-hub-polkadot/src/weights
+// --wasm-execution=compiled
+// --steps=50
+// --repeat=20
+// --heap-pages=4096
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+
+use frame_support::{traits::Get, weights::Weight};
+use core::marker::PhantomData;
+
+/// Weight functions for `pallet_ah_migrator`.
+pub struct WeightInfo(PhantomData);
+impl pallet_ah_migrator::WeightInfo for WeightInfo {
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:0)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
+ /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
+ /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
+ /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
+ /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
+ /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ fn on_finalize() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `217`
+ // Estimated: `3682`
+ // Minimum execution time: 32_550_000 picoseconds.
+ Weight::from_parts(34_241_000, 0)
+ .saturating_add(Weight::from_parts(0, 3682))
+ .saturating_add(T::DbWeight::get().reads(5))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: `System::Account` (r:255 w:255)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_multisigs(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `52 + n * (135 ±0)`
+ // Estimated: `1534 + n * (2603 ±0)`
+ // Minimum execution time: 39_871_000 picoseconds.
+ Weight::from_parts(5_172_456, 0)
+ .saturating_add(Weight::from_parts(0, 1534))
+ // Standard Error: 37_542
+ .saturating_add(Weight::from_parts(17_662_478, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
+ }
+ /// Storage: `System::Account` (r:255 w:255)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `Balances::Holds` (r:255 w:255)
+ /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
+ /// Storage: `Balances::Freezes` (r:255 w:255)
+ /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
+ /// Storage: `Balances::Locks` (r:255 w:255)
+ /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_accounts(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `52 + n * (135 ±0)`
+ // Estimated: `1534 + n * (3774 ±0)`
+ // Minimum execution time: 141_751_000 picoseconds.
+ Weight::from_parts(143_951_000, 0)
+ .saturating_add(Weight::from_parts(0, 1534))
+ // Standard Error: 55_463
+ .saturating_add(Weight::from_parts(118_126_332, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 3774).saturating_mul(n.into()))
+ }
+ /// Storage: `System::Account` (r:255 w:255)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_liquid_accounts(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `52 + n * (135 ±0)`
+ // Estimated: `1534 + n * (2603 ±0)`
+ // Minimum execution time: 51_299_000 picoseconds.
+ Weight::from_parts(16_363_234, 0)
+ .saturating_add(Weight::from_parts(0, 1534))
+ // Standard Error: 38_061
+ .saturating_add(Weight::from_parts(28_400_583, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
+ }
+ /// Storage: `Claims::Vesting` (r:255 w:255)
+ /// Proof: `Claims::Vesting` (`max_values`: None, `max_size`: None, mode: `Measured`)
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_claims(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `152`
+ // Estimated: `1637 + n * (2475 ±0)`
+ // Minimum execution time: 27_860_000 picoseconds.
+ Weight::from_parts(20_269_880, 0)
+ .saturating_add(Weight::from_parts(0, 1637))
+ // Standard Error: 6_969
+ .saturating_add(Weight::from_parts(3_374_479, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 2475).saturating_mul(n.into()))
+ }
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `Proxy::Proxies` (r:0 w:255)
+ /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_proxy_proxies(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `109`
+ // Estimated: `1594`
+ // Minimum execution time: 25_060_000 picoseconds.
+ Weight::from_parts(20_752_482, 0)
+ .saturating_add(Weight::from_parts(0, 1594))
+ // Standard Error: 4_221
+ .saturating_add(Weight::from_parts(3_178_177, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ }
+ /// Storage: `System::Account` (r:255 w:255)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `AhMigrator::DmpDataMessageCounts` (r:1 w:1)
+ /// Proof: `AhMigrator::DmpDataMessageCounts` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// The range of component `n` is `[1, 255]`.
+ fn receive_proxy_announcements(n: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `52 + n * (135 ±0)`
+ // Estimated: `1534 + n * (2603 ±0)`
+ // Minimum execution time: 42_390_000 picoseconds.
+ Weight::from_parts(44_649_000, 0)
+ .saturating_add(Weight::from_parts(0, 1534))
+ // Standard Error: 13_985
+ .saturating_add(Weight::from_parts(19_096_595, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
+ }
+}