pallet-xcm: fix weights for all XTs and deprecate unlimited weight ones (#3927)

Fix "double-weights" for extrinsics, use only the ones benchmarked in
the runtime.

Deprecate extrinsics that don't specify WeightLimit, remove their usage
across the repo.

---------

Signed-off-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
Adrian Catangiu
2024-04-02 10:57:35 +03:00
committed by GitHub
parent 9a62de27a9
commit d0ebb850ed
10 changed files with 103 additions and 512 deletions
@@ -17,9 +17,9 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-04-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-h2rr8wx7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-f3xfxtob-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
// Executed Command:
@@ -64,8 +64,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 21_722_000 picoseconds.
Weight::from_parts(22_253_000, 0)
// Minimum execution time: 21_050_000 picoseconds.
Weight::from_parts(21_834_000, 0)
.saturating_add(Weight::from_parts(0, 3610))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
@@ -86,8 +86,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 21_694_000 picoseconds.
Weight::from_parts(22_326_000, 0)
// Minimum execution time: 21_164_000 picoseconds.
Weight::from_parts(21_656_000, 0)
.saturating_add(Weight::from_parts(0, 3610))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
@@ -112,8 +112,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 94_422_000 picoseconds.
Weight::from_parts(96_997_000, 0)
// Minimum execution time: 92_497_000 picoseconds.
Weight::from_parts(95_473_000, 0)
.saturating_add(Weight::from_parts(0, 3610))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(3))
@@ -140,8 +140,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `367`
// Estimated: `6196`
// Minimum execution time: 123_368_000 picoseconds.
Weight::from_parts(125_798_000, 0)
// Minimum execution time: 120_059_000 picoseconds.
Weight::from_parts(122_894_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(5))
@@ -170,8 +170,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `496`
// Estimated: `6208`
// Minimum execution time: 142_033_000 picoseconds.
Weight::from_parts(145_702_000, 0)
// Minimum execution time: 141_977_000 picoseconds.
Weight::from_parts(145_981_000, 0)
.saturating_add(Weight::from_parts(0, 6208))
.saturating_add(T::DbWeight::get().reads(12))
.saturating_add(T::DbWeight::get().writes(7))
@@ -180,16 +180,16 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_558_000 picoseconds.
Weight::from_parts(7_916_000, 0)
// Minimum execution time: 7_426_000 picoseconds.
Weight::from_parts(7_791_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn execute_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_978_000 picoseconds.
Weight::from_parts(8_210_000, 0)
// Minimum execution time: 7_585_000 picoseconds.
Weight::from_parts(7_897_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
@@ -198,8 +198,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_439_000 picoseconds.
Weight::from_parts(6_711_000, 0)
// Minimum execution time: 6_224_000 picoseconds.
Weight::from_parts(6_793_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -209,8 +209,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_982_000 picoseconds.
Weight::from_parts(2_260_000, 0)
// Minimum execution time: 1_812_000 picoseconds.
Weight::from_parts(2_008_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -236,8 +236,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 27_120_000 picoseconds.
Weight::from_parts(28_048_000, 0)
// Minimum execution time: 26_586_000 picoseconds.
Weight::from_parts(27_181_000, 0)
.saturating_add(Weight::from_parts(0, 3610))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(5))
@@ -262,8 +262,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `363`
// Estimated: `3828`
// Minimum execution time: 29_354_000 picoseconds.
Weight::from_parts(30_205_000, 0)
// Minimum execution time: 28_295_000 picoseconds.
Weight::from_parts(29_280_000, 0)
.saturating_add(Weight::from_parts(0, 3828))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
@@ -274,8 +274,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_926_000 picoseconds.
Weight::from_parts(2_013_000, 0)
// Minimum execution time: 1_803_000 picoseconds.
Weight::from_parts(1_876_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -285,8 +285,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `159`
// Estimated: `13524`
// Minimum execution time: 18_611_000 picoseconds.
Weight::from_parts(19_120_000, 0)
// Minimum execution time: 18_946_000 picoseconds.
Weight::from_parts(19_456_000, 0)
.saturating_add(Weight::from_parts(0, 13524))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -297,8 +297,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `163`
// Estimated: `13528`
// Minimum execution time: 18_373_000 picoseconds.
Weight::from_parts(18_945_000, 0)
// Minimum execution time: 19_080_000 picoseconds.
Weight::from_parts(19_498_000, 0)
.saturating_add(Weight::from_parts(0, 13528))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -309,8 +309,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `173`
// Estimated: `16013`
// Minimum execution time: 20_459_000 picoseconds.
Weight::from_parts(20_951_000, 0)
// Minimum execution time: 20_637_000 picoseconds.
Weight::from_parts(21_388_000, 0)
.saturating_add(Weight::from_parts(0, 16013))
.saturating_add(T::DbWeight::get().reads(6))
}
@@ -332,8 +332,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `6152`
// Minimum execution time: 26_003_000 picoseconds.
Weight::from_parts(26_678_000, 0)
// Minimum execution time: 25_701_000 picoseconds.
Weight::from_parts(26_269_000, 0)
.saturating_add(Weight::from_parts(0, 6152))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(3))
@@ -344,8 +344,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `206`
// Estimated: `11096`
// Minimum execution time: 11_557_000 picoseconds.
Weight::from_parts(11_868_000, 0)
// Minimum execution time: 11_949_000 picoseconds.
Weight::from_parts(12_249_000, 0)
.saturating_add(Weight::from_parts(0, 11096))
.saturating_add(T::DbWeight::get().reads(4))
}
@@ -355,8 +355,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `170`
// Estimated: `13535`
// Minimum execution time: 18_710_000 picoseconds.
Weight::from_parts(19_240_000, 0)
// Minimum execution time: 19_278_000 picoseconds.
Weight::from_parts(19_538_000, 0)
.saturating_add(Weight::from_parts(0, 13535))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -379,8 +379,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `13577`
// Minimum execution time: 34_393_000 picoseconds.
Weight::from_parts(35_138_000, 0)
// Minimum execution time: 35_098_000 picoseconds.
Weight::from_parts(35_871_000, 0)
.saturating_add(Weight::from_parts(0, 13577))
.saturating_add(T::DbWeight::get().reads(11))
.saturating_add(T::DbWeight::get().writes(4))
@@ -393,8 +393,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `1588`
// Minimum execution time: 4_043_000 picoseconds.
Weight::from_parts(4_216_000, 0)
// Minimum execution time: 3_862_000 picoseconds.
Weight::from_parts(4_082_000, 0)
.saturating_add(Weight::from_parts(0, 1588))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
@@ -405,8 +405,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `7740`
// Estimated: `11205`
// Minimum execution time: 25_410_000 picoseconds.
Weight::from_parts(26_019_000, 0)
// Minimum execution time: 25_423_000 picoseconds.
Weight::from_parts(25_872_000, 0)
.saturating_add(Weight::from_parts(0, 11205))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -417,8 +417,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 38_850_000 picoseconds.
Weight::from_parts(39_593_000, 0)
// Minimum execution time: 37_148_000 picoseconds.
Weight::from_parts(37_709_000, 0)
.saturating_add(Weight::from_parts(0, 3625))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))