XCMv3 fixes (#1710)

* Fixes XCMv3 related
Fixes XCMv3 (removed query_holding)
Fixes XCMv3 - should use _depositable_count?
Fixes XCMv3 - removed TrustedReserve
Fixes - missing weights for statemine/statemint/westmint
[DO-NOT-CHERRY-PICK] tmp return query_holding to aviod conficts to master
Fixes - missing functions for pallet_xcm_benchmarks::generic::Config
Fixes for XCMv3 benchmarking
Fix xcm - removed query_holding

* ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic

* ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic

* ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic

* Fix imports
This commit is contained in:
Branislav Kontur
2022-10-03 14:51:39 +02:00
committed by GitHub
parent 5efee4c47e
commit 483b20c699
18 changed files with 515 additions and 160 deletions
@@ -849,7 +849,7 @@ impl_runtime_apis! {
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
Ok(KsmLocation::get())
}
fn worst_case_holding() -> MultiAssets {
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
// A mix of fungible, non-fungible, and concrete assets.
const HOLDING_FUNGIBLES: u32 = 100;
const HOLDING_NON_FUNGIBLES: u32 = 100;
@@ -882,7 +882,6 @@ impl_runtime_apis! {
KsmLocation::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(KsmLocation::get()) },
));
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
pub const CheckedAccount: Option<AccountId> = None;
}
@@ -892,7 +891,6 @@ impl_runtime_apis! {
type CheckedAccount = CheckedAccount;
type TrustedTeleporter = TrustedTeleporter;
type TrustedReserve = TrustedReserve;
fn get_multi_asset() -> MultiAsset {
MultiAsset {
@@ -909,6 +907,14 @@ impl_runtime_apis! {
(0u64, Response::Version(Default::default()))
}
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn universal_alias() -> Result<Junction, BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn transact_origin() -> Result<MultiLocation, BenchmarkError> {
Ok(KsmLocation::get())
}
@@ -923,6 +929,10 @@ impl_runtime_apis! {
let ticket = MultiLocation { parents: 0, interior: Here };
Ok((origin, ticket, assets))
}
fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
}
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
@@ -62,7 +62,12 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
}
fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight {
fn query_response(
_query_id: &u64,
_response: &Response,
_max_weight: &u64,
_querier: &Option<MultiLocation>,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_response().ref_time()
}
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight {
@@ -104,19 +109,11 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight {
XcmGeneric::<Runtime>::descend_origin().ref_time()
}
fn report_error(
_query_id: &QueryId,
_dest: &MultiLocation,
_max_response_weight: &u64,
) -> XCMWeight {
fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_error().ref_time()
}
fn deposit_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight {
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
@@ -124,13 +121,16 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
_xcm: &Xcm<()>,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
}
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight {
fn exchange_asset(
_give: &MultiAssetFilter,
_receive: &MultiAssets,
_maximal: &bool,
) -> XCMWeight {
Weight::MAX.ref_time()
}
fn initiate_reserve_withdraw(
@@ -150,13 +150,8 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
cmp::min(hardcoded_weight, weight)
}
fn query_holding(
_query_id: &u64,
_dest: &MultiLocation,
_assets: &MultiAssetFilter,
_max_response_weight: &u64,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_holding().ref_time()
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight {
XcmGeneric::<Runtime>::report_holding().ref_time()
}
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight {
XcmGeneric::<Runtime>::buy_execution().ref_time()
@@ -185,4 +180,65 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
fn unsubscribe_version() -> XCMWeight {
XcmGeneric::<Runtime>::unsubscribe_version().ref_time()
}
fn burn_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
}
fn expect_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
}
fn expect_origin(_origin: &Option<MultiLocation>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_origin().ref_time()
}
fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_error().ref_time()
}
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::query_pallet().ref_time()
}
fn expect_pallet(
_index: &u32,
_name: &Vec<u8>,
_module_name: &Vec<u8>,
_crate_major: &u32,
_min_crate_minor: &u32,
) -> XCMWeight {
XcmGeneric::<Runtime>::expect_pallet().ref_time()
}
fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_transact_status().ref_time()
}
fn clear_transact_status() -> XCMWeight {
XcmGeneric::<Runtime>::clear_transact_status().ref_time()
}
fn universal_origin(_: &Junction) -> XCMWeight {
Weight::MAX.ref_time()
}
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight {
Weight::MAX.ref_time()
}
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn set_fees_mode(_: &bool) -> XCMWeight {
XcmGeneric::<Runtime>::set_fees_mode().ref_time()
}
fn set_topic(_topic: &[u8; 32]) -> XCMWeight {
XcmGeneric::<Runtime>::set_topic().ref_time()
}
fn clear_topic() -> XCMWeight {
XcmGeneric::<Runtime>::clear_topic().ref_time()
}
fn alias_origin(_: &MultiLocation) -> XCMWeight {
// XCM Executor does not currently support alias origin operations
Weight::MAX.ref_time()
}
}
@@ -18,7 +18,8 @@
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
// Executed Command:
@@ -36,7 +37,7 @@
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --header=./file_header.txt
// --template=./templates/xcm-bench-template.hbs
// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -54,58 +55,59 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_holding() -> Weight {
Weight::from_ref_time(694_466_000 as u64)
pub(crate) fn report_holding() -> Weight {
Weight::from_ref_time(1_303_495_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn buy_execution() -> Weight {
Weight::from_ref_time(7_095_000 as u64)
Weight::from_ref_time(8_667_000 as u64)
}
// Storage: PolkadotXcm Queries (r:1 w:0)
pub(crate) fn query_response() -> Weight {
Weight::from_ref_time(13_270_000 as u64)
Weight::from_ref_time(19_292_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
pub(crate) fn transact() -> Weight {
Weight::from_ref_time(16_375_000 as u64)
Weight::from_ref_time(37_996_000 as u64)
}
pub(crate) fn refund_surplus() -> Weight {
Weight::from_ref_time(7_319_000 as u64)
Weight::from_ref_time(9_076_000 as u64)
}
pub(crate) fn set_error_handler() -> Weight {
Weight::from_ref_time(3_515_000 as u64)
Weight::from_ref_time(6_410_000 as u64)
}
pub(crate) fn set_appendix() -> Weight {
Weight::from_ref_time(3_501_000 as u64)
Weight::from_ref_time(6_412_000 as u64)
}
pub(crate) fn clear_error() -> Weight {
Weight::from_ref_time(3_459_000 as u64)
Weight::from_ref_time(6_311_000 as u64)
}
pub(crate) fn descend_origin() -> Weight {
Weight::from_ref_time(4_319_000 as u64)
Weight::from_ref_time(7_355_000 as u64)
}
pub(crate) fn clear_origin() -> Weight {
Weight::from_ref_time(3_511_000 as u64)
Weight::from_ref_time(6_389_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_error() -> Weight {
Weight::from_ref_time(13_284_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
Weight::from_ref_time(23_020_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PolkadotXcm AssetTraps (r:1 w:1)
pub(crate) fn claim_asset() -> Weight {
Weight::from_ref_time(7_985_000 as u64)
Weight::from_ref_time(13_613_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
pub(crate) fn trap() -> Weight {
Weight::from_ref_time(3_515_000 as u64)
Weight::from_ref_time(6_457_000 as u64)
}
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -114,13 +116,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn subscribe_version() -> Weight {
Weight::from_ref_time(16_657_000 as u64)
Weight::from_ref_time(31_677_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1)
pub(crate) fn unsubscribe_version() -> Weight {
Weight::from_ref_time(5_622_000 as u64)
Weight::from_ref_time(9_613_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
@@ -130,8 +132,57 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn initiate_reserve_withdraw() -> Weight {
Weight::from_ref_time(878_786_000 as u64)
Weight::from_ref_time(1_588_580_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn burn_asset() -> Weight {
Weight::from_ref_time(497_452_000 as u64)
}
pub(crate) fn expect_asset() -> Weight {
Weight::from_ref_time(38_502_000 as u64)
}
pub(crate) fn expect_origin() -> Weight {
Weight::from_ref_time(6_427_000 as u64)
}
pub(crate) fn expect_error() -> Weight {
Weight::from_ref_time(6_303_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_pallet() -> Weight {
Weight::from_ref_time(25_510_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn expect_pallet() -> Weight {
Weight::from_ref_time(7_909_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_transact_status() -> Weight {
Weight::from_ref_time(22_949_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn clear_transact_status() -> Weight {
Weight::from_ref_time(6_491_000 as u64)
}
pub(crate) fn set_topic() -> Weight {
Weight::from_ref_time(6_527_000 as u64)
}
pub(crate) fn clear_topic() -> Weight {
Weight::from_ref_time(6_440_000 as u64)
}
pub(crate) fn set_fees_mode() -> Weight {
Weight::from_ref_time(6_426_000 as u64)
}
}
@@ -14,8 +14,9 @@
// limitations under the License.
use super::{
AccountId, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem,
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee,
XcmpQueue,
};
use frame_support::{
match_types, parameter_types,
@@ -202,7 +203,7 @@ impl xcm_executor::Config for XcmConfig {
type AssetTrap = PolkadotXcm;
type AssetClaims = PolkadotXcm;
type SubscriptionService = PolkadotXcm;
type PalletInstancesInfo = ();
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type AssetLocker = ();
type AssetExchanger = ();
@@ -878,7 +878,7 @@ impl_runtime_apis! {
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
Ok(DotLocation::get())
}
fn worst_case_holding() -> MultiAssets {
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
// A mix of fungible, non-fungible, and concrete assets.
const HOLDING_FUNGIBLES: u32 = 100;
const HOLDING_NON_FUNGIBLES: u32 = 100;
@@ -911,7 +911,6 @@ impl_runtime_apis! {
DotLocation::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(DotLocation::get()) },
));
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
pub const CheckedAccount: Option<AccountId> = None;
}
@@ -920,7 +919,6 @@ impl_runtime_apis! {
type CheckedAccount = CheckedAccount;
type TrustedTeleporter = TrustedTeleporter;
type TrustedReserve = TrustedReserve;
fn get_multi_asset() -> MultiAsset {
MultiAsset {
@@ -937,6 +935,14 @@ impl_runtime_apis! {
(0u64, Response::Version(Default::default()))
}
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn universal_alias() -> Result<Junction, BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn transact_origin() -> Result<MultiLocation, BenchmarkError> {
Ok(DotLocation::get())
}
@@ -951,6 +957,10 @@ impl_runtime_apis! {
let ticket = MultiLocation { parents: 0, interior: Here };
Ok((origin, ticket, assets))
}
fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
}
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
@@ -62,7 +62,12 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
}
fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight {
fn query_response(
_query_id: &u64,
_response: &Response,
_max_weight: &u64,
_querier: &Option<MultiLocation>,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_response().ref_time()
}
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight {
@@ -104,19 +109,11 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight {
XcmGeneric::<Runtime>::descend_origin().ref_time()
}
fn report_error(
_query_id: &QueryId,
_dest: &MultiLocation,
_max_response_weight: &u64,
) -> XCMWeight {
fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_error().ref_time()
}
fn deposit_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight {
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
@@ -124,13 +121,16 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
_xcm: &Xcm<()>,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
}
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight {
fn exchange_asset(
_give: &MultiAssetFilter,
_receive: &MultiAssets,
_maximal: &bool,
) -> XCMWeight {
Weight::MAX.ref_time()
}
fn initiate_reserve_withdraw(
@@ -150,13 +150,8 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
cmp::min(hardcoded_weight, weight)
}
fn query_holding(
_query_id: &u64,
_dest: &MultiLocation,
_assets: &MultiAssetFilter,
_max_response_weight: &u64,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_holding().ref_time()
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight {
XcmGeneric::<Runtime>::report_holding().ref_time()
}
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight {
XcmGeneric::<Runtime>::buy_execution().ref_time()
@@ -185,4 +180,65 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
fn unsubscribe_version() -> XCMWeight {
XcmGeneric::<Runtime>::unsubscribe_version().ref_time()
}
fn burn_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
}
fn expect_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
}
fn expect_origin(_origin: &Option<MultiLocation>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_origin().ref_time()
}
fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_error().ref_time()
}
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::query_pallet().ref_time()
}
fn expect_pallet(
_index: &u32,
_name: &Vec<u8>,
_module_name: &Vec<u8>,
_crate_major: &u32,
_min_crate_minor: &u32,
) -> XCMWeight {
XcmGeneric::<Runtime>::expect_pallet().ref_time()
}
fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_transact_status().ref_time()
}
fn clear_transact_status() -> XCMWeight {
XcmGeneric::<Runtime>::clear_transact_status().ref_time()
}
fn universal_origin(_: &Junction) -> XCMWeight {
Weight::MAX.ref_time()
}
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight {
Weight::MAX.ref_time()
}
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn set_fees_mode(_: &bool) -> XCMWeight {
XcmGeneric::<Runtime>::set_fees_mode().ref_time()
}
fn set_topic(_topic: &[u8; 32]) -> XCMWeight {
XcmGeneric::<Runtime>::set_topic().ref_time()
}
fn clear_topic() -> XCMWeight {
XcmGeneric::<Runtime>::clear_topic().ref_time()
}
fn alias_origin(_: &MultiLocation) -> XCMWeight {
// XCM Executor does not currently support alias origin operations
Weight::MAX.ref_time()
}
}
@@ -18,7 +18,7 @@
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
@@ -37,7 +37,7 @@
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --header=./file_header.txt
// --template=./templates/xcm-bench-template.hbs
// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -55,58 +55,59 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_holding() -> Weight {
Weight::from_ref_time(682_639_000 as u64)
pub(crate) fn report_holding() -> Weight {
Weight::from_ref_time(1_305_689_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn buy_execution() -> Weight {
Weight::from_ref_time(9_272_000 as u64)
Weight::from_ref_time(8_843_000 as u64)
}
// Storage: PolkadotXcm Queries (r:1 w:0)
pub(crate) fn query_response() -> Weight {
Weight::from_ref_time(17_084_000 as u64)
Weight::from_ref_time(19_216_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
pub(crate) fn transact() -> Weight {
Weight::from_ref_time(20_265_000 as u64)
Weight::from_ref_time(22_708_000 as u64)
}
pub(crate) fn refund_surplus() -> Weight {
Weight::from_ref_time(9_422_000 as u64)
Weight::from_ref_time(9_040_000 as u64)
}
pub(crate) fn set_error_handler() -> Weight {
Weight::from_ref_time(5_545_000 as u64)
Weight::from_ref_time(6_222_000 as u64)
}
pub(crate) fn set_appendix() -> Weight {
Weight::from_ref_time(5_450_000 as u64)
Weight::from_ref_time(6_411_000 as u64)
}
pub(crate) fn clear_error() -> Weight {
Weight::from_ref_time(5_519_000 as u64)
Weight::from_ref_time(6_222_000 as u64)
}
pub(crate) fn descend_origin() -> Weight {
Weight::from_ref_time(6_398_000 as u64)
Weight::from_ref_time(7_112_000 as u64)
}
pub(crate) fn clear_origin() -> Weight {
Weight::from_ref_time(5_498_000 as u64)
Weight::from_ref_time(6_340_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_error() -> Weight {
Weight::from_ref_time(15_784_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
Weight::from_ref_time(22_943_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PolkadotXcm AssetTraps (r:1 w:1)
pub(crate) fn claim_asset() -> Weight {
Weight::from_ref_time(11_861_000 as u64)
Weight::from_ref_time(13_178_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
pub(crate) fn trap() -> Weight {
Weight::from_ref_time(5_462_000 as u64)
Weight::from_ref_time(6_333_000 as u64)
}
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -115,13 +116,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn subscribe_version() -> Weight {
Weight::from_ref_time(18_997_000 as u64)
Weight::from_ref_time(31_798_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1)
pub(crate) fn unsubscribe_version() -> Weight {
Weight::from_ref_time(8_684_000 as u64)
Weight::from_ref_time(9_728_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
@@ -131,8 +132,57 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn initiate_reserve_withdraw() -> Weight {
Weight::from_ref_time(883_121_000 as u64)
Weight::from_ref_time(1_583_652_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn burn_asset() -> Weight {
Weight::from_ref_time(497_448_000 as u64)
}
pub(crate) fn expect_asset() -> Weight {
Weight::from_ref_time(38_383_000 as u64)
}
pub(crate) fn expect_origin() -> Weight {
Weight::from_ref_time(6_308_000 as u64)
}
pub(crate) fn expect_error() -> Weight {
Weight::from_ref_time(6_327_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_pallet() -> Weight {
Weight::from_ref_time(26_011_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn expect_pallet() -> Weight {
Weight::from_ref_time(8_008_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_transact_status() -> Weight {
Weight::from_ref_time(22_963_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn clear_transact_status() -> Weight {
Weight::from_ref_time(6_378_000 as u64)
}
pub(crate) fn set_topic() -> Weight {
Weight::from_ref_time(6_313_000 as u64)
}
pub(crate) fn clear_topic() -> Weight {
Weight::from_ref_time(6_324_000 as u64)
}
pub(crate) fn set_fees_mode() -> Weight {
Weight::from_ref_time(6_336_000 as u64)
}
}
@@ -14,8 +14,9 @@
// limitations under the License.
use super::{
AccountId, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem,
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee,
XcmpQueue,
};
use frame_support::{
match_types, parameter_types,
@@ -31,11 +32,10 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex,
ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter,
IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
WeightInfoBounds,
ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete,
NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds,
};
use xcm_executor::{traits::JustTry, XcmExecutor};
@@ -179,7 +179,7 @@ impl xcm_executor::Config for XcmConfig {
type AssetTrap = PolkadotXcm;
type AssetClaims = PolkadotXcm;
type SubscriptionService = PolkadotXcm;
type PalletInstancesInfo = ();
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type AssetLocker = ();
type AssetExchanger = ();
+13 -3
View File
@@ -838,7 +838,7 @@ impl_runtime_apis! {
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
Ok(WestendLocation::get())
}
fn worst_case_holding() -> MultiAssets {
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
// A mix of fungible, non-fungible, and concrete assets.
const HOLDING_FUNGIBLES: u32 = 100;
const HOLDING_NON_FUNGIBLES: u32 = 100;
@@ -871,7 +871,6 @@ impl_runtime_apis! {
WestendLocation::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(WestendLocation::get()) },
));
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
pub const CheckedAccount: Option<AccountId> = None;
}
@@ -881,7 +880,6 @@ impl_runtime_apis! {
type CheckedAccount = CheckedAccount;
type TrustedTeleporter = TrustedTeleporter;
type TrustedReserve = TrustedReserve;
fn get_multi_asset() -> MultiAsset {
MultiAsset {
@@ -898,6 +896,14 @@ impl_runtime_apis! {
(0u64, Response::Version(Default::default()))
}
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn universal_alias() -> Result<Junction, BenchmarkError> {
Err(BenchmarkError::Skip)
}
fn transact_origin() -> Result<MultiLocation, BenchmarkError> {
Ok(WestendLocation::get())
}
@@ -912,6 +918,10 @@ impl_runtime_apis! {
let ticket = MultiLocation { parents: 0, interior: Here };
Ok((origin, ticket, assets))
}
fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
}
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
@@ -62,7 +62,12 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
}
fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight {
fn query_response(
_query_id: &u64,
_response: &Response,
_max_weight: &u64,
_querier: &Option<MultiLocation>,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_response().ref_time()
}
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight {
@@ -104,19 +109,11 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight {
XcmGeneric::<Runtime>::descend_origin().ref_time()
}
fn report_error(
_query_id: &QueryId,
_dest: &MultiLocation,
_max_response_weight: &u64,
) -> XCMWeight {
fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_error().ref_time()
}
fn deposit_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight {
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
@@ -124,13 +121,16 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
_max_assets: &u32,
_dest: &MultiLocation,
_xcm: &Xcm<()>,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
}
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight {
fn exchange_asset(
_give: &MultiAssetFilter,
_receive: &MultiAssets,
_maximal: &bool,
) -> XCMWeight {
Weight::MAX.ref_time()
}
fn initiate_reserve_withdraw(
@@ -150,13 +150,8 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
cmp::min(hardcoded_weight, weight)
}
fn query_holding(
_query_id: &u64,
_dest: &MultiLocation,
_assets: &MultiAssetFilter,
_max_response_weight: &u64,
) -> XCMWeight {
XcmGeneric::<Runtime>::query_holding().ref_time()
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight {
XcmGeneric::<Runtime>::report_holding().ref_time()
}
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight {
XcmGeneric::<Runtime>::buy_execution().ref_time()
@@ -185,4 +180,65 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
fn unsubscribe_version() -> XCMWeight {
XcmGeneric::<Runtime>::unsubscribe_version().ref_time()
}
fn burn_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
}
fn expect_asset(assets: &MultiAssets) -> XCMWeight {
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
}
fn expect_origin(_origin: &Option<MultiLocation>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_origin().ref_time()
}
fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight {
XcmGeneric::<Runtime>::expect_error().ref_time()
}
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::query_pallet().ref_time()
}
fn expect_pallet(
_index: &u32,
_name: &Vec<u8>,
_module_name: &Vec<u8>,
_crate_major: &u32,
_min_crate_minor: &u32,
) -> XCMWeight {
XcmGeneric::<Runtime>::expect_pallet().ref_time()
}
fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight {
XcmGeneric::<Runtime>::report_transact_status().ref_time()
}
fn clear_transact_status() -> XCMWeight {
XcmGeneric::<Runtime>::clear_transact_status().ref_time()
}
fn universal_origin(_: &Junction) -> XCMWeight {
Weight::MAX.ref_time()
}
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight {
Weight::MAX.ref_time()
}
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight {
Weight::MAX.ref_time()
}
fn set_fees_mode(_: &bool) -> XCMWeight {
XcmGeneric::<Runtime>::set_fees_mode().ref_time()
}
fn set_topic(_topic: &[u8; 32]) -> XCMWeight {
XcmGeneric::<Runtime>::set_topic().ref_time()
}
fn clear_topic() -> XCMWeight {
XcmGeneric::<Runtime>::clear_topic().ref_time()
}
fn alias_origin(_: &MultiLocation) -> XCMWeight {
// XCM Executor does not currently support alias origin operations
Weight::MAX.ref_time()
}
}
@@ -18,7 +18,8 @@
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
// Executed Command:
@@ -36,7 +37,7 @@
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --header=./file_header.txt
// --template=./templates/xcm-bench-template.hbs
// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -54,58 +55,59 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_holding() -> Weight {
Weight::from_ref_time(676_316_000 as u64)
pub(crate) fn report_holding() -> Weight {
Weight::from_ref_time(1_324_853_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn buy_execution() -> Weight {
Weight::from_ref_time(7_030_000 as u64)
Weight::from_ref_time(8_533_000 as u64)
}
// Storage: PolkadotXcm Queries (r:1 w:0)
pub(crate) fn query_response() -> Weight {
Weight::from_ref_time(12_574_000 as u64)
Weight::from_ref_time(19_435_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
pub(crate) fn transact() -> Weight {
Weight::from_ref_time(15_764_000 as u64)
Weight::from_ref_time(22_656_000 as u64)
}
pub(crate) fn refund_surplus() -> Weight {
Weight::from_ref_time(7_200_000 as u64)
Weight::from_ref_time(8_900_000 as u64)
}
pub(crate) fn set_error_handler() -> Weight {
Weight::from_ref_time(3_310_000 as u64)
Weight::from_ref_time(6_255_000 as u64)
}
pub(crate) fn set_appendix() -> Weight {
Weight::from_ref_time(3_260_000 as u64)
Weight::from_ref_time(6_268_000 as u64)
}
pub(crate) fn clear_error() -> Weight {
Weight::from_ref_time(3_277_000 as u64)
Weight::from_ref_time(6_304_000 as u64)
}
pub(crate) fn descend_origin() -> Weight {
Weight::from_ref_time(3_913_000 as u64)
Weight::from_ref_time(7_279_000 as u64)
}
pub(crate) fn clear_origin() -> Weight {
Weight::from_ref_time(3_354_000 as u64)
Weight::from_ref_time(6_297_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_error() -> Weight {
Weight::from_ref_time(13_028_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
Weight::from_ref_time(23_025_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PolkadotXcm AssetTraps (r:1 w:1)
pub(crate) fn claim_asset() -> Weight {
Weight::from_ref_time(7_739_000 as u64)
Weight::from_ref_time(13_001_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
pub(crate) fn trap() -> Weight {
Weight::from_ref_time(3_351_000 as u64)
Weight::from_ref_time(6_266_000 as u64)
}
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -114,13 +116,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn subscribe_version() -> Weight {
Weight::from_ref_time(16_051_000 as u64)
Weight::from_ref_time(31_348_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1)
pub(crate) fn unsubscribe_version() -> Weight {
Weight::from_ref_time(5_477_000 as u64)
Weight::from_ref_time(9_534_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
@@ -130,8 +132,57 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn initiate_reserve_withdraw() -> Weight {
Weight::from_ref_time(874_435_000 as u64)
Weight::from_ref_time(1_558_814_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn burn_asset() -> Weight {
Weight::from_ref_time(496_802_000 as u64)
}
pub(crate) fn expect_asset() -> Weight {
Weight::from_ref_time(38_299_000 as u64)
}
pub(crate) fn expect_origin() -> Weight {
Weight::from_ref_time(6_354_000 as u64)
}
pub(crate) fn expect_error() -> Weight {
Weight::from_ref_time(6_234_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_pallet() -> Weight {
Weight::from_ref_time(25_150_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn expect_pallet() -> Weight {
Weight::from_ref_time(7_969_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_transact_status() -> Weight {
Weight::from_ref_time(23_099_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn clear_transact_status() -> Weight {
Weight::from_ref_time(6_366_000 as u64)
}
pub(crate) fn set_topic() -> Weight {
Weight::from_ref_time(6_422_000 as u64)
}
pub(crate) fn clear_topic() -> Weight {
Weight::from_ref_time(6_405_000 as u64)
}
pub(crate) fn set_fees_mode() -> Weight {
Weight::from_ref_time(6_392_000 as u64)
}
}
@@ -14,8 +14,9 @@
// limitations under the License.
use super::{
AccountId, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem,
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue,
AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee,
XcmpQueue,
};
use frame_support::{
match_types, parameter_types,
@@ -198,7 +199,7 @@ impl xcm_executor::Config for XcmConfig {
type AssetTrap = PolkadotXcm;
type AssetClaims = PolkadotXcm;
type SubscriptionService = PolkadotXcm;
type PalletInstancesInfo = ();
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type AssetLocker = ();
type AssetExchanger = ();