diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 52952d47dd22e..50629d3af15ba 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -101,7 +101,7 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; #[cfg(feature = "runtime-benchmarks")] use xcm::latest::prelude::{ Asset, Assets as XcmAssets, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, - NetworkId, NonFungible, Parent, ParentThen, Response, XCM_VERSION, + NetworkId, NonFungible, Parent, ParentThen, Response, WeightLimit, XCM_VERSION, }; use xcm::{ latest::prelude::{AssetId, BodyId}, @@ -1989,11 +1989,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 4cf540a2f8b19..f754094bbd831 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -112,7 +112,7 @@ use frame_support::traits::PalletInfoAccess; #[cfg(feature = "runtime-benchmarks")] use xcm::latest::prelude::{ Asset, Assets as XcmAssets, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, - NetworkId, NonFungible, Parent, ParentThen, Response, XCM_VERSION, + NetworkId, NonFungible, Parent, ParentThen, Response, WeightLimit, XCM_VERSION, }; use xcm_runtime_apis::{ @@ -2260,11 +2260,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(WestendLocation::get()), fun: Fungible(1_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index e2710b494626b..16ad43529bf89 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3c24194516f3`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -66,17 +66,21 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 100_738_000 picoseconds. - Weight::from_parts(102_746_000, 6196) + // Minimum execution time: 103_614_000 picoseconds. + Weight::from_parts(107_306_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 653_000 picoseconds. - Weight::from_parts(721_000, 0) + // Estimated: `3593` + // Minimum execution time: 7_998_000 picoseconds. + Weight::from_parts(8_489_000, 3593) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -84,8 +88,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 6_108_000 picoseconds. - Weight::from_parts(6_562_000, 3593) + // Minimum execution time: 6_293_000 picoseconds. + Weight::from_parts(6_672_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -93,8 +97,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 658_000 picoseconds. - Weight::from_parts(706_000, 0) + // Minimum execution time: 782_000 picoseconds. + Weight::from_parts(839_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -102,51 +106,51 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 5_712_000 picoseconds. - Weight::from_parts(5_871_000, 3465) + // Minimum execution time: 5_635_000 picoseconds. + Weight::from_parts(5_973_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_836_000 picoseconds. - Weight::from_parts(7_253_000, 0) + // Minimum execution time: 7_331_000 picoseconds. + Weight::from_parts(7_532_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_778_000 picoseconds. - Weight::from_parts(2_969_000, 0) + // Minimum execution time: 2_839_000 picoseconds. + Weight::from_parts(3_034_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 651_000 picoseconds. - Weight::from_parts(717_000, 0) + // Minimum execution time: 747_000 picoseconds. + Weight::from_parts(802_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 654_000 picoseconds. - Weight::from_parts(715_000, 0) + // Minimum execution time: 727_000 picoseconds. + Weight::from_parts(787_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 635_000 picoseconds. - Weight::from_parts(688_000, 0) + // Minimum execution time: 717_000 picoseconds. + Weight::from_parts(771_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 708_000 picoseconds. - Weight::from_parts(742_000, 0) + // Minimum execution time: 757_000 picoseconds. + Weight::from_parts(822_000, 0) } // Storage: `Benchmark::Override` (r:0 w:0) // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -161,8 +165,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 694_000 picoseconds. - Weight::from_parts(731_000, 0) + // Minimum execution time: 735_000 picoseconds. + Weight::from_parts(788_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -180,8 +184,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 67_336_000 picoseconds. - Weight::from_parts(69_034_000, 6196) + // Minimum execution time: 68_640_000 picoseconds. + Weight::from_parts(70_050_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -191,8 +195,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `23` // Estimated: `3488` - // Minimum execution time: 8_830_000 picoseconds. - Weight::from_parts(9_038_000, 3488) + // Minimum execution time: 8_891_000 picoseconds. + Weight::from_parts(9_210_000, 3488) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -200,8 +204,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_234_000 picoseconds. - Weight::from_parts(3_353_000, 0) + // Minimum execution time: 3_247_000 picoseconds. + Weight::from_parts(3_479_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -217,8 +221,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 22_885_000 picoseconds. - Weight::from_parts(23_427_000, 3507) + // Minimum execution time: 22_866_000 picoseconds. + Weight::from_parts(23_629_000, 3507) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -228,44 +232,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_729_000 picoseconds. - Weight::from_parts(2_904_000, 0) + // Minimum execution time: 2_928_000 picoseconds. + Weight::from_parts(3_033_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_298_000 picoseconds. - Weight::from_parts(23_607_000, 0) + // Minimum execution time: 23_095_000 picoseconds. + Weight::from_parts(23_613_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_698_000 picoseconds. - Weight::from_parts(6_845_000, 0) + // Minimum execution time: 6_766_000 picoseconds. + Weight::from_parts(6_918_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_110_000 picoseconds. - Weight::from_parts(3_347_000, 0) + // Minimum execution time: 3_339_000 picoseconds. + Weight::from_parts(3_560_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_211_000 picoseconds. - Weight::from_parts(3_368_000, 0) + // Minimum execution time: 3_337_000 picoseconds. + Weight::from_parts(3_543_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 759_000 picoseconds. - Weight::from_parts(853_000, 0) + // Minimum execution time: 875_000 picoseconds. + Weight::from_parts(944_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -283,8 +287,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 73_562_000 picoseconds. - Weight::from_parts(76_153_000, 6196) + // Minimum execution time: 74_710_000 picoseconds. + Weight::from_parts(77_414_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -292,8 +296,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_209_000 picoseconds. - Weight::from_parts(5_363_000, 0) + // Minimum execution time: 5_491_000 picoseconds. + Weight::from_parts(5_699_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -311,8 +315,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 67_567_000 picoseconds. - Weight::from_parts(69_822_000, 6196) + // Minimum execution time: 68_452_000 picoseconds. + Weight::from_parts(70_643_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -320,22 +324,22 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 696_000 picoseconds. - Weight::from_parts(747_000, 0) + // Minimum execution time: 760_000 picoseconds. + Weight::from_parts(832_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 631_000 picoseconds. - Weight::from_parts(685_000, 0) + // Minimum execution time: 727_000 picoseconds. + Weight::from_parts(778_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 617_000 picoseconds. - Weight::from_parts(689_000, 0) + // Minimum execution time: 729_000 picoseconds. + Weight::from_parts(776_000, 0) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -349,8 +353,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `498` // Estimated: `4273` - // Minimum execution time: 81_324_000 picoseconds. - Weight::from_parts(83_920_000, 4273) + // Minimum execution time: 83_321_000 picoseconds. + Weight::from_parts(86_103_000, 4273) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -360,29 +364,29 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1489` - // Minimum execution time: 5_200_000 picoseconds. - Weight::from_parts(5_384_000, 1489) + // Minimum execution time: 5_230_000 picoseconds. + Weight::from_parts(5_429_000, 1489) .saturating_add(T::DbWeight::get().reads(1)) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 642_000 picoseconds. - Weight::from_parts(691_000, 0) + // Minimum execution time: 737_000 picoseconds. + Weight::from_parts(780_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 666_000 picoseconds. - Weight::from_parts(718_000, 0) + // Minimum execution time: 759_000 picoseconds. + Weight::from_parts(825_000, 0) } pub fn alias_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 676_000 picoseconds. - Weight::from_parts(738_000, 0) + // Minimum execution time: 780_000 picoseconds. + Weight::from_parts(854_000, 0) } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 5aca100e1646f..aaacda6d383c7 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -1248,11 +1248,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/src/lib.rs index d1bf57111184a..090a9d9b9795e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/src/lib.rs @@ -93,7 +93,7 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Westend /// BridgeHub. /// (initially was calculated by test `BridgeHubWestend::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 18_191_740_000; + pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 22_962_450_000; /// Transaction fee that is paid at the Westend BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`) diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 4b65b3789a338..fb341bf74e97d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -1188,11 +1188,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(WestendLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { @@ -1265,7 +1265,11 @@ impl_runtime_apis! { } fn alias_origin() -> Result<(Location, Location), BenchmarkError> { - Err(BenchmarkError::Skip) + // Any location can alias to an internal location. + // Here parachain 1000 aliases to an internal account. + let origin = Location::new(1, [Parachain(1000)]); + let target = Location::new(1, [Parachain(1000), AccountId32 { id: [128u8; 32], network: None }]); + Ok((origin, target)) } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 041afda4493bd..7004d985ed8f5 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `d3b41be4aae8`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -64,19 +64,23 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `176` + // Measured: `212` // Estimated: `6196` - // Minimum execution time: 71_221_000 picoseconds. - Weight::from_parts(73_924_000, 6196) + // Minimum execution time: 71_915_000 picoseconds. + Weight::from_parts(74_472_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_052_000 picoseconds. - Weight::from_parts(1_120_000, 0) + // Estimated: `3593` + // Minimum execution time: 4_181_000 picoseconds. + Weight::from_parts(4_432_000, 3593) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -84,8 +88,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 4_387_000 picoseconds. - Weight::from_parts(5_090_000, 3593) + // Minimum execution time: 4_176_000 picoseconds. + Weight::from_parts(4_299_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -93,8 +97,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_105_000 picoseconds. - Weight::from_parts(1_205_000, 0) + // Minimum execution time: 1_215_000 picoseconds. + Weight::from_parts(1_295_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -102,65 +106,67 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 5_995_000 picoseconds. - Weight::from_parts(6_329_000, 3465) + // Minimum execution time: 6_138_000 picoseconds. + Weight::from_parts(6_316_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_751_000 picoseconds. - Weight::from_parts(9_103_000, 0) + // Minimum execution time: 8_645_000 picoseconds. + Weight::from_parts(9_000_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_867_000 picoseconds. - Weight::from_parts(1_997_000, 0) + // Minimum execution time: 1_928_000 picoseconds. + Weight::from_parts(2_022_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_062_000 picoseconds. - Weight::from_parts(1_135_000, 0) + // Minimum execution time: 1_150_000 picoseconds. + Weight::from_parts(1_213_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_067_000 picoseconds. - Weight::from_parts(1_140_000, 0) + // Minimum execution time: 1_173_000 picoseconds. + Weight::from_parts(1_215_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_069_000 picoseconds. - Weight::from_parts(1_131_000, 0) + // Minimum execution time: 1_181_000 picoseconds. + Weight::from_parts(1_220_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_066_000 picoseconds. - Weight::from_parts(1_134_000, 0) + // Minimum execution time: 1_212_000 picoseconds. + Weight::from_parts(1_288_000, 0) } + // Storage: `Benchmark::Override` (r:0 w:0) + // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_140_000 picoseconds. - Weight::from_parts(1_203_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_046_000 picoseconds. - Weight::from_parts(1_115_000, 0) + // Minimum execution time: 1_207_000 picoseconds. + Weight::from_parts(1_241_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -176,10 +182,10 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `176` + // Measured: `212` // Estimated: `6196` - // Minimum execution time: 67_527_000 picoseconds. - Weight::from_parts(68_949_000, 6196) + // Minimum execution time: 67_573_000 picoseconds. + Weight::from_parts(70_052_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -189,8 +195,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `24` // Estimated: `3489` - // Minimum execution time: 9_746_000 picoseconds. - Weight::from_parts(9_957_000, 3489) + // Minimum execution time: 9_485_000 picoseconds. + Weight::from_parts(9_788_000, 3489) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,8 +204,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_060_000 picoseconds. - Weight::from_parts(1_129_000, 0) + // Minimum execution time: 3_887_000 picoseconds. + Weight::from_parts(4_032_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -213,10 +219,10 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `6` - // Estimated: `3471` - // Minimum execution time: 22_674_000 picoseconds. - Weight::from_parts(23_712_000, 3471) + // Measured: `42` + // Estimated: `3507` + // Minimum execution time: 23_434_000 picoseconds. + Weight::from_parts(24_003_000, 3507) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -226,44 +232,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_258_000 picoseconds. - Weight::from_parts(3_546_000, 0) + // Minimum execution time: 3_365_000 picoseconds. + Weight::from_parts(3_514_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_455_000 picoseconds. - Weight::from_parts(1_574_000, 0) + // Minimum execution time: 1_552_000 picoseconds. + Weight::from_parts(1_639_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_201_000 picoseconds. - Weight::from_parts(1_263_000, 0) + // Minimum execution time: 1_249_000 picoseconds. + Weight::from_parts(1_298_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_060_000 picoseconds. - Weight::from_parts(1_150_000, 0) + // Minimum execution time: 3_847_000 picoseconds. + Weight::from_parts(3_996_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_043_000 picoseconds. - Weight::from_parts(1_150_000, 0) + // Minimum execution time: 3_879_000 picoseconds. + Weight::from_parts(3_995_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_214_000 picoseconds. - Weight::from_parts(1_323_000, 0) + // Minimum execution time: 1_310_000 picoseconds. + Weight::from_parts(1_390_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -279,10 +285,10 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `176` + // Measured: `212` // Estimated: `6196` - // Minimum execution time: 71_761_000 picoseconds. - Weight::from_parts(73_890_000, 6196) + // Minimum execution time: 73_840_000 picoseconds. + Weight::from_parts(75_771_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -290,8 +296,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_553_000 picoseconds. - Weight::from_parts(4_745_000, 0) + // Minimum execution time: 4_945_000 picoseconds. + Weight::from_parts(5_099_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -307,10 +313,10 @@ impl WeightInfo { // Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `176` + // Measured: `212` // Estimated: `6196` - // Minimum execution time: 67_301_000 picoseconds. - Weight::from_parts(68_652_000, 6196) + // Minimum execution time: 68_779_000 picoseconds. + Weight::from_parts(70_590_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -318,22 +324,22 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_105_000 picoseconds. - Weight::from_parts(1_201_000, 0) + // Minimum execution time: 1_226_000 picoseconds. + Weight::from_parts(1_281_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_032_000 picoseconds. - Weight::from_parts(1_100_000, 0) + // Minimum execution time: 1_157_000 picoseconds. + Weight::from_parts(1_237_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_016_000 picoseconds. - Weight::from_parts(1_100_000, 0) + // Minimum execution time: 1_160_000 picoseconds. + Weight::from_parts(1_218_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -352,10 +358,10 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `546` // Estimated: `6486` - // Minimum execution time: 56_823_000 picoseconds. - Weight::from_parts(57_247_777, 6486) - // Standard Error: 319 - .saturating_add(Weight::from_parts(57_303, 0).saturating_mul(x.into())) + // Minimum execution time: 59_944_000 picoseconds. + Weight::from_parts(63_325_816, 6486) + // Standard Error: 326 + .saturating_add(Weight::from_parts(58_420, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -363,15 +369,15 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_045_000 picoseconds. - Weight::from_parts(1_157_000, 0) + // Minimum execution time: 1_122_000 picoseconds. + Weight::from_parts(1_201_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_074_000 picoseconds. - Weight::from_parts(1_225_000, 0) + // Minimum execution time: 1_187_000 picoseconds. + Weight::from_parts(1_237_000, 0) } pub fn alias_origin() -> Weight { // Proof Size summary in bytes: diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 721a513b607d4..8c1ad33ccea55 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -1270,11 +1270,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(WndLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 3b5a6322c51e6..3b1bee00033ae 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -66,17 +66,21 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 72_819_000 picoseconds. - Weight::from_parts(74_704_000, 6196) + // Minimum execution time: 73_783_000 picoseconds. + Weight::from_parts(75_788_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 589_000 picoseconds. - Weight::from_parts(671_000, 0) + // Estimated: `3593` + // Minimum execution time: 3_801_000 picoseconds. + Weight::from_parts(4_034_000, 3593) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -84,8 +88,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 3_626_000 picoseconds. - Weight::from_parts(3_890_000, 3593) + // Minimum execution time: 3_592_000 picoseconds. + Weight::from_parts(3_830_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -93,8 +97,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 700_000 picoseconds. - Weight::from_parts(754_000, 0) + // Minimum execution time: 665_000 picoseconds. + Weight::from_parts(730_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -102,65 +106,67 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 6_117_000 picoseconds. - Weight::from_parts(6_391_000, 3465) + // Minimum execution time: 5_922_000 picoseconds. + Weight::from_parts(6_123_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_512_000 picoseconds. - Weight::from_parts(7_742_000, 0) + // Minimum execution time: 7_420_000 picoseconds. + Weight::from_parts(7_787_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_295_000 picoseconds. - Weight::from_parts(1_417_000, 0) + // Minimum execution time: 1_346_000 picoseconds. + Weight::from_parts(1_443_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 644_000 picoseconds. - Weight::from_parts(724_000, 0) + // Minimum execution time: 636_000 picoseconds. + Weight::from_parts(686_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 600_000 picoseconds. - Weight::from_parts(673_000, 0) + // Minimum execution time: 620_000 picoseconds. + Weight::from_parts(696_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 594_000 picoseconds. - Weight::from_parts(643_000, 0) + // Minimum execution time: 618_000 picoseconds. + Weight::from_parts(669_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 684_000 picoseconds. - Weight::from_parts(745_000, 0) + // Minimum execution time: 635_000 picoseconds. + Weight::from_parts(715_000, 0) } + // Storage: `Benchmark::Override` (r:0 w:0) + // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 692_000 picoseconds. - Weight::from_parts(786_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 621_000 picoseconds. - Weight::from_parts(694_000, 0) + // Minimum execution time: 643_000 picoseconds. + Weight::from_parts(691_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -178,8 +184,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 68_951_000 picoseconds. - Weight::from_parts(70_476_000, 6196) + // Minimum execution time: 68_952_000 picoseconds. + Weight::from_parts(71_917_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -189,8 +195,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `23` // Estimated: `3488` - // Minimum execution time: 9_417_000 picoseconds. - Weight::from_parts(9_945_000, 3488) + // Minimum execution time: 9_130_000 picoseconds. + Weight::from_parts(9_449_000, 3488) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -198,8 +204,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 577_000 picoseconds. - Weight::from_parts(645_000, 0) + // Minimum execution time: 3_571_000 picoseconds. + Weight::from_parts(3_670_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -215,8 +221,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 24_004_000 picoseconds. - Weight::from_parts(24_737_000, 3507) + // Minimum execution time: 23_180_000 picoseconds. + Weight::from_parts(23_872_000, 3507) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -226,44 +232,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_761_000 picoseconds. - Weight::from_parts(2_905_000, 0) + // Minimum execution time: 2_747_000 picoseconds. + Weight::from_parts(2_902_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_028_000 picoseconds. - Weight::from_parts(1_104_000, 0) + // Minimum execution time: 1_020_000 picoseconds. + Weight::from_parts(1_112_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 705_000 picoseconds. - Weight::from_parts(800_000, 0) + // Minimum execution time: 711_000 picoseconds. + Weight::from_parts(799_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 668_000 picoseconds. - Weight::from_parts(714_000, 0) + // Minimum execution time: 3_579_000 picoseconds. + Weight::from_parts(3_689_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 618_000 picoseconds. - Weight::from_parts(705_000, 0) + // Minimum execution time: 3_571_000 picoseconds. + Weight::from_parts(3_754_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 755_000 picoseconds. - Weight::from_parts(850_000, 0) + // Minimum execution time: 752_000 picoseconds. + Weight::from_parts(827_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -281,8 +287,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 76_492_000 picoseconds. - Weight::from_parts(78_503_000, 6196) + // Minimum execution time: 76_043_000 picoseconds. + Weight::from_parts(78_165_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -290,8 +296,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_142_000 picoseconds. - Weight::from_parts(6_313_000, 0) + // Minimum execution time: 5_431_000 picoseconds. + Weight::from_parts(5_633_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -309,8 +315,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `212` // Estimated: `6196` - // Minimum execution time: 70_348_000 picoseconds. - Weight::from_parts(71_566_000, 6196) + // Minimum execution time: 70_282_000 picoseconds. + Weight::from_parts(71_620_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -318,42 +324,42 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 624_000 picoseconds. - Weight::from_parts(683_000, 0) + // Minimum execution time: 664_000 picoseconds. + Weight::from_parts(738_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 565_000 picoseconds. - Weight::from_parts(632_000, 0) + // Minimum execution time: 639_000 picoseconds. + Weight::from_parts(694_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 570_000 picoseconds. - Weight::from_parts(628_000, 0) + // Minimum execution time: 631_000 picoseconds. + Weight::from_parts(675_000, 0) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 587_000 picoseconds. - Weight::from_parts(637_000, 0) + // Minimum execution time: 631_000 picoseconds. + Weight::from_parts(665_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 634_000 picoseconds. - Weight::from_parts(699_000, 0) + // Minimum execution time: 655_000 picoseconds. + Weight::from_parts(701_000, 0) } pub fn alias_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 659_000 picoseconds. - Weight::from_parts(707_000, 0) + // Minimum execution time: 743_000 picoseconds. + Weight::from_parts(768_000, 0) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 89345846acc5d..afc223570dadb 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -1133,11 +1133,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(RocRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index c2c49067d877a..421ded32ab08f 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -1159,11 +1159,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenRelayLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index cafae1833cb5b..7e992557aa12e 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `050e4dc4313a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -62,17 +62,21 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 24_313_000 picoseconds. - Weight::from_parts(25_346_000, 3539) + // Minimum execution time: 26_029_000 picoseconds. + Weight::from_parts(27_109_000, 3539) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 641_000 picoseconds. - Weight::from_parts(672_000, 0) + // Estimated: `3593` + // Minimum execution time: 3_640_000 picoseconds. + Weight::from_parts(3_872_000, 3593) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -80,8 +84,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 3_673_000 picoseconds. - Weight::from_parts(3_945_000, 3593) + // Minimum execution time: 3_636_000 picoseconds. + Weight::from_parts(3_814_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -89,8 +93,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 676_000 picoseconds. - Weight::from_parts(730_000, 0) + // Minimum execution time: 646_000 picoseconds. + Weight::from_parts(684_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -98,65 +102,67 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 5_566_000 picoseconds. - Weight::from_parts(5_856_000, 3465) + // Minimum execution time: 5_587_000 picoseconds. + Weight::from_parts(5_812_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_042_000 picoseconds. - Weight::from_parts(7_363_000, 0) + // Minimum execution time: 6_965_000 picoseconds. + Weight::from_parts(7_196_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_384_000 picoseconds. - Weight::from_parts(1_475_000, 0) + // Minimum execution time: 1_340_000 picoseconds. + Weight::from_parts(1_447_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 637_000 picoseconds. - Weight::from_parts(706_000, 0) + // Minimum execution time: 588_000 picoseconds. + Weight::from_parts(647_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 651_000 picoseconds. - Weight::from_parts(690_000, 0) + // Minimum execution time: 620_000 picoseconds. + Weight::from_parts(679_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 614_000 picoseconds. - Weight::from_parts(684_000, 0) + // Minimum execution time: 592_000 picoseconds. + Weight::from_parts(640_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 678_000 picoseconds. - Weight::from_parts(727_000, 0) + // Minimum execution time: 616_000 picoseconds. + Weight::from_parts(670_000, 0) } + // Storage: `Benchmark::Override` (r:0 w:0) + // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 726_000 picoseconds. - Weight::from_parts(756_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 635_000 picoseconds. - Weight::from_parts(679_000, 0) + // Minimum execution time: 609_000 picoseconds. + Weight::from_parts(700_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -170,8 +176,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 21_393_000 picoseconds. - Weight::from_parts(22_666_000, 3539) + // Minimum execution time: 23_154_000 picoseconds. + Weight::from_parts(23_824_000, 3539) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -181,8 +187,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `24` // Estimated: `3489` - // Minimum execution time: 8_969_000 picoseconds. - Weight::from_parts(9_242_000, 3489) + // Minimum execution time: 8_757_000 picoseconds. + Weight::from_parts(9_076_000, 3489) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,8 +196,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 621_000 picoseconds. - Weight::from_parts(675_000, 0) + // Minimum execution time: 3_185_000 picoseconds. + Weight::from_parts(3_350_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -205,8 +211,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3507` - // Minimum execution time: 21_278_000 picoseconds. - Weight::from_parts(22_088_000, 3507) + // Minimum execution time: 21_112_000 picoseconds. + Weight::from_parts(21_763_000, 3507) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -216,44 +222,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_683_000 picoseconds. - Weight::from_parts(2_765_000, 0) + // Minimum execution time: 2_667_000 picoseconds. + Weight::from_parts(2_844_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_024_000 picoseconds. - Weight::from_parts(1_096_000, 0) + // Minimum execution time: 1_060_000 picoseconds. + Weight::from_parts(1_129_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 676_000 picoseconds. - Weight::from_parts(773_000, 0) + // Minimum execution time: 666_000 picoseconds. + Weight::from_parts(764_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 632_000 picoseconds. - Weight::from_parts(713_000, 0) + // Minimum execution time: 3_214_000 picoseconds. + Weight::from_parts(3_380_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 619_000 picoseconds. - Weight::from_parts(688_000, 0) + // Minimum execution time: 3_253_000 picoseconds. + Weight::from_parts(3_355_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 761_000 picoseconds. - Weight::from_parts(847_000, 0) + // Minimum execution time: 776_000 picoseconds. + Weight::from_parts(856_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -267,8 +273,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 26_107_000 picoseconds. - Weight::from_parts(26_743_000, 3539) + // Minimum execution time: 26_994_000 picoseconds. + Weight::from_parts(28_092_000, 3539) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -276,8 +282,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_633_000 picoseconds. - Weight::from_parts(3_735_000, 0) + // Minimum execution time: 3_381_000 picoseconds. + Weight::from_parts(3_566_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -291,8 +297,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `74` // Estimated: `3539` - // Minimum execution time: 22_062_000 picoseconds. - Weight::from_parts(22_869_000, 3539) + // Minimum execution time: 23_632_000 picoseconds. + Weight::from_parts(24_243_000, 3539) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -300,42 +306,42 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 652_000 picoseconds. - Weight::from_parts(714_000, 0) + // Minimum execution time: 651_000 picoseconds. + Weight::from_parts(697_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 589_000 picoseconds. - Weight::from_parts(657_000, 0) + // Minimum execution time: 597_000 picoseconds. + Weight::from_parts(677_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 628_000 picoseconds. - Weight::from_parts(686_000, 0) + // Minimum execution time: 599_000 picoseconds. + Weight::from_parts(651_000, 0) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 611_000 picoseconds. - Weight::from_parts(671_000, 0) + // Minimum execution time: 605_000 picoseconds. + Weight::from_parts(662_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 619_000 picoseconds. - Weight::from_parts(704_000, 0) + // Minimum execution time: 635_000 picoseconds. + Weight::from_parts(667_000, 0) } pub fn alias_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 661_000 picoseconds. - Weight::from_parts(713_000, 0) + // Minimum execution time: 650_000 picoseconds. + Weight::from_parts(695_000, 0) } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 0e3189a1dc4d9..fdadbacfc1a88 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -1048,11 +1048,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(RelayLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 3997707ed2a96..dc415b7c1b7b0 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -1070,11 +1070,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(RelayLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 69a2bb180b94e..7ff82ed3da2f5 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `b9a9df1fcddf`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -62,17 +62,21 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 25_286_000 picoseconds. - Weight::from_parts(26_171_000, 3540) + // Minimum execution time: 25_916_000 picoseconds. + Weight::from_parts(27_426_000, 3540) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } + // Storage: `System::Account` (r:1 w:1) + // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` - // Estimated: `0` - // Minimum execution time: 705_000 picoseconds. - Weight::from_parts(767_000, 0) + // Estimated: `3593` + // Minimum execution time: 3_791_000 picoseconds. + Weight::from_parts(3_968_000, 3593) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: `System::Account` (r:1 w:1) // Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) @@ -80,8 +84,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 3_660_000 picoseconds. - Weight::from_parts(3_841_000, 3593) + // Minimum execution time: 3_527_000 picoseconds. + Weight::from_parts(3_784_000, 3593) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -89,8 +93,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 703_000 picoseconds. - Weight::from_parts(794_000, 0) + // Minimum execution time: 658_000 picoseconds. + Weight::from_parts(711_000, 0) } // Storage: `PolkadotXcm::Queries` (r:1 w:0) // Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -98,65 +102,67 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 5_726_000 picoseconds. - Weight::from_parts(5_980_000, 3465) + // Minimum execution time: 5_846_000 picoseconds. + Weight::from_parts(6_441_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_130_000 picoseconds. - Weight::from_parts(7_418_000, 0) + // Minimum execution time: 7_229_000 picoseconds. + Weight::from_parts(7_593_000, 0) } pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_387_000 picoseconds. - Weight::from_parts(1_491_000, 0) + // Minimum execution time: 1_418_000 picoseconds. + Weight::from_parts(1_545_000, 0) } pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 670_000 picoseconds. - Weight::from_parts(738_000, 0) + // Minimum execution time: 664_000 picoseconds. + Weight::from_parts(730_000, 0) } pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 693_000 picoseconds. - Weight::from_parts(766_000, 0) + // Minimum execution time: 667_000 picoseconds. + Weight::from_parts(708_000, 0) } pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 653_000 picoseconds. - Weight::from_parts(730_000, 0) + // Minimum execution time: 627_000 picoseconds. + Weight::from_parts(678_000, 0) } pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 709_000 picoseconds. - Weight::from_parts(771_000, 0) + // Minimum execution time: 691_000 picoseconds. + Weight::from_parts(734_000, 0) } + // Storage: `Benchmark::Override` (r:0 w:0) + // Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) pub fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 713_000 picoseconds. - Weight::from_parts(799_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 675_000 picoseconds. - Weight::from_parts(755_000, 0) + // Minimum execution time: 674_000 picoseconds. + Weight::from_parts(732_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -170,8 +176,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 21_571_000 picoseconds. - Weight::from_parts(22_451_000, 3540) + // Minimum execution time: 23_383_000 picoseconds. + Weight::from_parts(24_336_000, 3540) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -181,8 +187,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `24` // Estimated: `3489` - // Minimum execution time: 8_963_000 picoseconds. - Weight::from_parts(9_294_000, 3489) + // Minimum execution time: 8_950_000 picoseconds. + Weight::from_parts(9_106_000, 3489) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,8 +196,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 622_000 picoseconds. - Weight::from_parts(707_000, 0) + // Minimum execution time: 3_294_000 picoseconds. + Weight::from_parts(3_447_000, 0) } // Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) // Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -205,8 +211,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3471` - // Minimum execution time: 20_830_000 picoseconds. - Weight::from_parts(21_690_000, 3471) + // Minimum execution time: 20_463_000 picoseconds. + Weight::from_parts(20_877_000, 3471) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -216,44 +222,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_611_000 picoseconds. - Weight::from_parts(2_894_000, 0) + // Minimum execution time: 2_772_000 picoseconds. + Weight::from_parts(2_979_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_082_000 picoseconds. - Weight::from_parts(1_160_000, 0) + // Minimum execution time: 1_066_000 picoseconds. + Weight::from_parts(1_142_000, 0) } pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 727_000 picoseconds. - Weight::from_parts(830_000, 0) + // Minimum execution time: 762_000 picoseconds. + Weight::from_parts(809_000, 0) } pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 664_000 picoseconds. - Weight::from_parts(744_000, 0) + // Minimum execution time: 3_253_000 picoseconds. + Weight::from_parts(3_443_000, 0) } pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 652_000 picoseconds. - Weight::from_parts(712_000, 0) + // Minimum execution time: 3_340_000 picoseconds. + Weight::from_parts(3_520_000, 0) } pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 849_000 picoseconds. - Weight::from_parts(910_000, 0) + // Minimum execution time: 786_000 picoseconds. + Weight::from_parts(853_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -267,8 +273,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 26_471_000 picoseconds. - Weight::from_parts(27_177_000, 3540) + // Minimum execution time: 27_622_000 picoseconds. + Weight::from_parts(28_593_000, 3540) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -276,8 +282,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_638_000 picoseconds. - Weight::from_parts(3_777_000, 0) + // Minimum execution time: 3_515_000 picoseconds. + Weight::from_parts(3_711_000, 0) } // Storage: `ParachainInfo::ParachainId` (r:1 w:0) // Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) @@ -291,8 +297,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `75` // Estimated: `3540` - // Minimum execution time: 22_733_000 picoseconds. - Weight::from_parts(24_026_000, 3540) + // Minimum execution time: 23_615_000 picoseconds. + Weight::from_parts(24_619_000, 3540) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -300,42 +306,42 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 717_000 picoseconds. - Weight::from_parts(760_000, 0) + // Minimum execution time: 697_000 picoseconds. + Weight::from_parts(753_000, 0) } pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 624_000 picoseconds. - Weight::from_parts(705_000, 0) + // Minimum execution time: 654_000 picoseconds. + Weight::from_parts(703_000, 0) } pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 632_000 picoseconds. - Weight::from_parts(702_000, 0) + // Minimum execution time: 643_000 picoseconds. + Weight::from_parts(688_000, 0) } pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 616_000 picoseconds. - Weight::from_parts(703_000, 0) + // Minimum execution time: 634_000 picoseconds. + Weight::from_parts(695_000, 0) } pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 707_000 picoseconds. - Weight::from_parts(748_000, 0) + // Minimum execution time: 668_000 picoseconds. + Weight::from_parts(725_000, 0) } pub fn alias_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 698_000 picoseconds. - Weight::from_parts(781_000, 0) + // Minimum execution time: 671_000 picoseconds. + Weight::from_parts(727_000, 0) } } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 950723d451e2b..5a455806fee13 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2646,11 +2646,11 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 8e8490885766e..219046f05c2de 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -2990,11 +2990,11 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/polkadot/runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/polkadot/runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index fe19146393ef3..c39914e90b8e0 100644 --- a/polkadot/runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/polkadot/runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,9 +17,9 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-04-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `0af6a34749d7`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -66,10 +66,10 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `416` + // Measured: `449` // Estimated: `6196` - // Minimum execution time: 85_049_000 picoseconds. - Weight::from_parts(86_990_000, 6196) + // Minimum execution time: 83_407_000 picoseconds. + Weight::from_parts(85_820_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -77,22 +77,22 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 765_000 picoseconds. - Weight::from_parts(843_000, 0) + // Minimum execution time: 3_288_000 picoseconds. + Weight::from_parts(3_491_000, 0) } pub(crate) fn pay_fees() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_417_000 picoseconds. - Weight::from_parts(3_570_000, 0) + // Minimum execution time: 3_201_000 picoseconds. + Weight::from_parts(3_358_000, 0) } pub(crate) fn asset_claimer() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 758_000 picoseconds. - Weight::from_parts(827_000, 0) + // Minimum execution time: 794_000 picoseconds. + Weight::from_parts(843_000, 0) } /// Storage: `XcmPallet::Queries` (r:1 w:0) /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -100,65 +100,67 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 6_326_000 picoseconds. - Weight::from_parts(6_588_000, 3465) + // Minimum execution time: 6_120_000 picoseconds. + Weight::from_parts(6_334_000, 3465) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_872_000 picoseconds. - Weight::from_parts(8_163_000, 0) + // Minimum execution time: 7_772_000 picoseconds. + Weight::from_parts(8_025_000, 0) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_361_000 picoseconds. - Weight::from_parts(1_477_000, 0) + // Minimum execution time: 1_309_000 picoseconds. + Weight::from_parts(1_418_000, 0) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 723_000 picoseconds. - Weight::from_parts(827_000, 0) + // Minimum execution time: 738_000 picoseconds. + Weight::from_parts(804_000, 0) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 752_000 picoseconds. - Weight::from_parts(817_000, 0) + // Minimum execution time: 755_000 picoseconds. + Weight::from_parts(800_000, 0) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 729_000 picoseconds. - Weight::from_parts(774_000, 0) + // Minimum execution time: 746_000 picoseconds. + Weight::from_parts(790_000, 0) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 784_000 picoseconds. - Weight::from_parts(834_000, 0) + // Minimum execution time: 748_000 picoseconds. + Weight::from_parts(816_000, 0) } + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 836_000 picoseconds. - Weight::from_parts(907_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 753_000 picoseconds. - Weight::from_parts(808_000, 0) + // Minimum execution time: 772_000 picoseconds. + Weight::from_parts(835_000, 0) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -174,10 +176,10 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `416` + // Measured: `449` // Estimated: `6196` - // Minimum execution time: 82_051_000 picoseconds. - Weight::from_parts(84_513_000, 6196) + // Minimum execution time: 80_474_000 picoseconds. + Weight::from_parts(82_450_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -187,8 +189,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `23` // Estimated: `3488` - // Minimum execution time: 9_753_000 picoseconds. - Weight::from_parts(10_101_000, 3488) + // Minimum execution time: 9_550_000 picoseconds. + Weight::from_parts(9_797_000, 3488) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -196,8 +198,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 762_000 picoseconds. - Weight::from_parts(825_000, 0) + // Minimum execution time: 3_711_000 picoseconds. + Weight::from_parts(3_936_000, 0) } /// Storage: `XcmPallet::VersionNotifyTargets` (r:1 w:1) /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -213,10 +215,10 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `3677` - // Minimum execution time: 42_745_000 picoseconds. - Weight::from_parts(44_123_000, 3677) + // Measured: `245` + // Estimated: `3710` + // Minimum execution time: 40_080_000 picoseconds. + Weight::from_parts(41_850_000, 3710) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -226,44 +228,44 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_198_000 picoseconds. - Weight::from_parts(3_356_000, 0) + // Minimum execution time: 3_142_000 picoseconds. + Weight::from_parts(3_421_000, 0) .saturating_add(T::DbWeight::get().writes(1)) } pub(crate) fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_122_000 picoseconds. - Weight::from_parts(1_255_000, 0) + // Minimum execution time: 1_113_000 picoseconds. + Weight::from_parts(1_219_000, 0) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 865_000 picoseconds. - Weight::from_parts(911_000, 0) + // Minimum execution time: 788_000 picoseconds. + Weight::from_parts(869_000, 0) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 748_000 picoseconds. - Weight::from_parts(815_000, 0) + // Minimum execution time: 3_718_000 picoseconds. + Weight::from_parts(3_909_000, 0) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 724_000 picoseconds. - Weight::from_parts(783_000, 0) + // Minimum execution time: 3_889_000 picoseconds. + Weight::from_parts(4_643_000, 0) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 885_000 picoseconds. - Weight::from_parts(973_000, 0) + // Minimum execution time: 887_000 picoseconds. + Weight::from_parts(962_000, 0) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -279,10 +281,10 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `416` + // Measured: `449` // Estimated: `6196` - // Minimum execution time: 92_780_000 picoseconds. - Weight::from_parts(94_883_000, 6196) + // Minimum execution time: 90_787_000 picoseconds. + Weight::from_parts(95_039_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -290,8 +292,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_284_000 picoseconds. - Weight::from_parts(8_505_000, 0) + // Minimum execution time: 8_838_000 picoseconds. + Weight::from_parts(9_070_000, 0) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -307,10 +309,10 @@ impl WeightInfo { /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `416` + // Measured: `449` // Estimated: `6196` - // Minimum execution time: 82_598_000 picoseconds. - Weight::from_parts(86_748_000, 6196) + // Minimum execution time: 80_560_000 picoseconds. + Weight::from_parts(83_776_000, 6196) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -318,42 +320,42 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 801_000 picoseconds. - Weight::from_parts(853_000, 0) + // Minimum execution time: 781_000 picoseconds. + Weight::from_parts(851_000, 0) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 703_000 picoseconds. + // Minimum execution time: 751_000 picoseconds. Weight::from_parts(782_000, 0) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 674_000 picoseconds. - Weight::from_parts(759_000, 0) + // Minimum execution time: 729_000 picoseconds. + Weight::from_parts(792_000, 0) } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 712_000 picoseconds. - Weight::from_parts(793_000, 0) + // Minimum execution time: 714_000 picoseconds. + Weight::from_parts(772_000, 0) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 745_000 picoseconds. - Weight::from_parts(812_000, 0) + // Minimum execution time: 739_000 picoseconds. + Weight::from_parts(817_000, 0) } pub(crate) fn alias_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 757_000 picoseconds. - Weight::from_parts(799_000, 0) + // Minimum execution time: 782_000 picoseconds. + Weight::from_parts(832_000, 0) } } diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index 6daa1ea425d5b..aefbada7429dd 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -102,11 +102,13 @@ mod benchmarks { let mut executor = new_executor::(Default::default()); executor.set_holding(holding); - let fee_asset = AssetId(Here.into()); + // The worst case we want for buy execution in terms of + // fee asset and weight + let (fee_asset, weight_limit) = T::worst_case_for_trader()?; let instruction = Instruction::>::BuyExecution { - fees: (fee_asset, 100_000_000u128).into(), // should be something inside of holding - weight_limit: WeightLimit::Unlimited, + fees: fee_asset, + weight_limit: weight_limit.into(), }; let xcm = Xcm(vec![instruction]); @@ -127,7 +129,7 @@ mod benchmarks { // Set some weight to be paid for. executor.set_message_weight(Weight::from_parts(100_000_000, 100_000)); - let fee_asset: Asset = T::fee_asset().unwrap(); + let (fee_asset, _): (Asset, WeightLimit) = T::worst_case_for_trader().unwrap(); let instruction = Instruction::>::PayFees { asset: fee_asset }; @@ -207,7 +209,8 @@ mod benchmarks { let mut executor = new_executor::(Default::default()); let holding_assets = T::worst_case_holding(1); // We can already buy execution since we'll load the holding register manually - let asset_for_fees = T::fee_asset().unwrap(); + let (asset_for_fees, _): (Asset, WeightLimit) = T::worst_case_for_trader().unwrap(); + let previous_xcm = Xcm(vec![BuyExecution { fees: asset_for_fees, weight_limit: Limited(Weight::from_parts(1337, 1337)), diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 1eeafaa7f5e97..6368ca0e9c3f5 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -173,8 +173,8 @@ impl generic::Config for Test { Ok((Default::default(), ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { id: AssetId(Here.into()), fun: Fungible(1_000_000) }) + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(Here.into()), fun: Fungible(1_000_000) }, WeightLimit::Unlimited)) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs index b514eaa472727..d7471b02368fa 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs @@ -26,7 +26,9 @@ pub mod pallet { use frame_benchmarking::BenchmarkError; use frame_support::{dispatch::GetDispatchInfo, pallet_prelude::Encode}; use sp_runtime::traits::Dispatchable; - use xcm::latest::{Asset, Assets, InteriorLocation, Junction, Location, NetworkId, Response}; + use xcm::latest::{ + Asset, Assets, InteriorLocation, Junction, Location, NetworkId, Response, WeightLimit, + }; #[pallet::config] pub trait Config: frame_system::Config + crate::Config { @@ -73,9 +75,11 @@ pub mod pallet { /// Return an origin, ticket, and assets that can be trapped and claimed. fn claimable_asset() -> Result<(Location, Location, Assets), BenchmarkError>; - /// Asset used to pay for fees. Used to buy weight in benchmarks, for example in + /// The worst case buy execution weight limit and + /// asset to trigger the Trader::buy_execution in the XCM executor + /// Used to buy weight in benchmarks, for example in /// `refund_surplus`. - fn fee_asset() -> Result; + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError>; /// Return an unlocker, owner and assets that can be locked and unlocked. fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError>; diff --git a/prdoc/pr_7944.prdoc b/prdoc/pr_7944.prdoc new file mode 100644 index 0000000000000..db92ea365de50 --- /dev/null +++ b/prdoc/pr_7944.prdoc @@ -0,0 +1,43 @@ +title: Allow to set a worst case buy execution fee asset and weight +doc: +- audience: Runtime Dev + description: |- + Allows to set a worst case for the `BuyExecution` XCM instruction + benchmark. Currently the benchmark assumes best case scenario (i.e.) + the case where does not even need to go into the Trader. This PR allows + developers to set the worst-case scenario as they wish. + + Breaking changes: + - Change `fee_asset` in the benchmarking helper to `worst_case_for_trader` which + now should return both the `fee_asset` and the weight to use +crates: + - name: pallet-xcm-benchmarks + bump: major + - name: rococo-runtime + bump: patch + - name: westend-runtime + bump: patch + - name: asset-hub-rococo-runtime + bump: patch + - name: asset-hub-westend-runtime + bump: patch + - name: bridge-hub-rococo-runtime + bump: patch + - name: bridge-hub-westend-runtime + bump: patch + - name: collectives-westend-runtime + bump: patch + - name: coretime-rococo-runtime + bump: patch + - name: coretime-westend-runtime + bump: patch + - name: people-rococo-runtime + bump: patch + - name: people-westend-runtime + bump: patch + - name: bp-bridge-hub-westend + bump: patch + - name: pallet-staking-async-parachain-runtime + bump: patch + - name: pallet-staking-async-rc-runtime + bump: patch diff --git a/substrate/frame/staking-async/runtimes/parachain/src/lib.rs b/substrate/frame/staking-async/runtimes/parachain/src/lib.rs index d8612cd0021e1..cb2a33af15a0a 100644 --- a/substrate/frame/staking-async/runtimes/parachain/src/lib.rs +++ b/substrate/frame/staking-async/runtimes/parachain/src/lib.rs @@ -1839,6 +1839,7 @@ impl_runtime_apis! { use sp_storage::TrackedStorageKey; use frame_system_benchmarking::Pallet as SystemBench; use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench; + use xcm::prelude::WeightLimit; // add a few custom keys to benchmarks. frame_benchmarking::benchmarking::add_to_whitelist( @@ -2115,11 +2116,11 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(WestendLocation::get()), fun: Fungible(1_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> { diff --git a/substrate/frame/staking-async/runtimes/rc/src/lib.rs b/substrate/frame/staking-async/runtimes/rc/src/lib.rs index d2e0a68f98a31..f06dc15a6a07e 100644 --- a/substrate/frame/staking-async/runtimes/rc/src/lib.rs +++ b/substrate/frame/staking-async/runtimes/rc/src/lib.rs @@ -2793,11 +2793,11 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } - fn fee_asset() -> Result { - Ok(Asset { + fn worst_case_for_trader() -> Result<(Asset, WeightLimit), BenchmarkError> { + Ok((Asset { id: AssetId(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS), - }) + }, WeightLimit::Limited(Weight::from_parts(5000, 5000)))) } fn unlockable_asset() -> Result<(Location, Location, Asset), BenchmarkError> {