diff --git a/Cargo.lock b/Cargo.lock index 1236573cb..b2855c4ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2634,6 +2634,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", + "pallet-xcm-benchmarks", "parachain-info", "parity-scale-codec", "polkadot-parachain", diff --git a/Cargo.toml b/Cargo.toml index dad21b162..03e399451 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -145,6 +145,7 @@ try-runtime-cli = { git = "https://github.com/moondance-labs/substrate", branch # Polkadot (wasm) pallet-xcm = { git = "https://github.com/moondance-labs/polkadot", branch = "tanssi-polkadot-v0.9.43", default-features = false } +pallet-xcm-benchmarks = { git = "https://github.com/moondance-labs/polkadot", branch = "tanssi-polkadot-v0.9.43", default-features = false } polkadot-parachain = { git = "https://github.com/moondance-labs/polkadot", branch = "tanssi-polkadot-v0.9.43", default-features = false } polkadot-runtime-common = { git = "https://github.com/moondance-labs/polkadot", branch = "tanssi-polkadot-v0.9.43", default-features = false } polkadot-runtime-parachains = { git = "https://github.com/moondance-labs/polkadot", branch = "tanssi-polkadot-v0.9.43", default-features = false } diff --git a/runtime/dancebox/Cargo.toml b/runtime/dancebox/Cargo.toml index 462dfecb4..a4c160387 100644 --- a/runtime/dancebox/Cargo.toml +++ b/runtime/dancebox/Cargo.toml @@ -71,6 +71,7 @@ tp-traits = { workspace = true } # Polkadot pallet-xcm = { workspace = true } +pallet-xcm-benchmarks = { workspace = true, optional = true } polkadot-parachain = { workspace = true } polkadot-runtime-common = { workspace = true } xcm = { workspace = true } @@ -195,6 +196,7 @@ runtime-benchmarks = [ "pallet-registrar/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", ] diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 59c612b56..f41ba5256 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -31,6 +31,7 @@ use sp_version::NativeVersion; pub use sp_runtime::BuildStorage; pub mod migrations; +pub mod weights; use { cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases, @@ -929,6 +930,19 @@ construct_runtime!( } ); +#[cfg(feature = "runtime-benchmarks")] +mod benches { + frame_benchmarking::define_benchmarks!( + [frame_system, frame_system_benchmarking::Pallet::] + [pallet_author_noting, AuthorNoting] + [pallet_configuration, Configuration] + [pallet_registrar, Registrar] + [pallet_invulnerables, Invulnerables] + [pallet_pooled_staking, PooledStaking] + [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + ); +} + impl_runtime_apis! { impl sp_consensus_aura::AuraApi for Runtime { fn slot_duration() -> sp_consensus_aura::SlotDuration { @@ -1051,67 +1065,81 @@ impl_runtime_apis! { Vec, Vec, ) { - use frame_benchmarking::{list_benchmark, BenchmarkList, Benchmarking}; + use frame_benchmarking::{Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; - use frame_system_benchmarking::Pallet as SystemBench; - use pallet_author_noting::Pallet as PalletAuthorNotingBench; - use pallet_configuration::Pallet as PalletConfigurationBench; - use pallet_registrar::Pallet as PalletRegistrarBench; - use pallet_invulnerables::Pallet as PalletInvulnerablesBench; - use pallet_pooled_staking::Pallet as PalledPooledStaking; let mut list = Vec::::new(); - - list_benchmark!(list, extra, frame_system, SystemBench::); - list_benchmark!( - list, - extra, - pallet_configuration, - PalletConfigurationBench:: - ); - list_benchmark!( - list, - extra, - pallet_author_noting, - PalletAuthorNotingBench:: - ); - list_benchmark!( - list, - extra, - pallet_registrar, - PalletRegistrarBench:: - ); - list_benchmark!( - list, - extra, - pallet_invulnerables, - PalletInvulnerablesBench:: - ); - - list_benchmark!( - list, - extra, - pallet_pooled_staking, - PalledPooledStaking:: - ); + list_benchmarks!(list, extra); let storage_info = AllPalletsWithSystem::storage_info(); - (list, storage_info) } fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig, ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{add_benchmark, BenchmarkBatch, Benchmarking, TrackedStorageKey}; + use frame_benchmarking::{BenchmarkBatch, Benchmarking, TrackedStorageKey}; - use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime {} - use pallet_author_noting::Pallet as PalletAuthorNotingBench; - use pallet_configuration::Pallet as PalletConfigurationBench; - use pallet_registrar::Pallet as PalletRegistrarBench; - use pallet_invulnerables::Pallet as PalletInvulnerablesBench; - use pallet_pooled_staking::Pallet as PalletPooledStaking; + + use xcm::latest::prelude::*; + use frame_benchmarking::BenchmarkError; + + impl pallet_xcm_benchmarks::Config for Runtime { + type XcmConfig = xcm_config::XcmConfig; + type AccountIdConverter = xcm_config::LocationToAccountId; + fn valid_destination() -> Result { + Ok(MultiLocation::parent()) + } + fn worst_case_holding(_depositable_count: u32) -> MultiAssets { + // We only care for native asset until we support others + // TODO: refactor this case once other assets are supported + vec![MultiAsset{ + id: Concrete(MultiLocation::here()), + fun: Fungible(u128::MAX), + }].into() + } + } + + impl pallet_xcm_benchmarks::generic::Config for Runtime { + type RuntimeCall = RuntimeCall; + + fn worst_case_response() -> (u64, Response) { + (0u64, Response::Version(Default::default())) + } + + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((MultiLocation::parent(), frame_system::Call::remark_with_event { remark: vec![] }.into())) + } + + fn subscribe_origin() -> Result { + Ok(MultiLocation::parent()) + } + + fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { + let origin = MultiLocation::parent(); + let assets: MultiAssets = (Concrete(MultiLocation::parent()), 1_000u128).into(); + let ticket = MultiLocation { parents: 0, interior: Here }; + Ok((origin, ticket, assets)) + } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn export_message_origin_and_destination( + ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { + Err(BenchmarkError::Skip) + } + } let whitelist: Vec = vec![ // Block Number @@ -1148,40 +1176,8 @@ impl_runtime_apis! { let mut batches = Vec::::new(); let params = (&config, &whitelist); - add_benchmark!(params, batches, frame_system, SystemBench::); - add_benchmark!( - params, - batches, - pallet_configuration, - PalletConfigurationBench:: - ); - add_benchmark!( - params, - batches, - pallet_author_noting, - PalletAuthorNotingBench:: - ); - add_benchmark!( - params, - batches, - pallet_registrar, - PalletRegistrarBench:: - ); - add_benchmark!( - params, - batches, - pallet_invulnerables, - PalletInvulnerablesBench:: - ); - add_benchmark!( - params, - batches, - pallet_pooled_staking, - PalletPooledStaking:: - ); - if batches.is_empty() { - return Err("Benchmark not found for this pallet.".into()); - } + add_benchmarks!(params, batches); + Ok(batches) } } diff --git a/runtime/dancebox/src/weights/mod.rs b/runtime/dancebox/src/weights/mod.rs new file mode 100644 index 000000000..522db697e --- /dev/null +++ b/runtime/dancebox/src/weights/mod.rs @@ -0,0 +1,17 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +pub mod xcm; diff --git a/runtime/dancebox/src/weights/xcm/mod.rs b/runtime/dancebox/src/weights/xcm/mod.rs new file mode 100644 index 000000000..27ec74684 --- /dev/null +++ b/runtime/dancebox/src/weights/xcm/mod.rs @@ -0,0 +1,241 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +pub mod pallet_xcm_benchmarks_generic; + +use crate::weights::xcm::pallet_xcm_benchmarks_generic::WeightInfo; +use crate::Runtime; +use frame_support::weights::Weight; +use pallet_xcm_benchmarks_generic::SubstrateWeight as XcmGeneric; +use sp_std::prelude::*; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + DoubleEncoded, +}; + +trait WeighMultiAssets { + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; +} + +impl WeighMultiAssets for MultiAssets { + fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { + weight.saturating_mul(self.inner().into_iter().count() as u64) + } +} + +// Values copied from statemint benchmarks +const ASSET_BURN_MAX_PROOF_SIZE: u64 = 7242; +const ASSET_MINT_MAX_PROOF_SIZE: u64 = 7242; +const ASSET_TRANSFER_MAX_PROOF_SIZE: u64 = 13412; + +// For now we are returning benchmarked weights only for generic XCM instructions. +// Fungible XCM instructions will return a fixed weight value of +// 200_000_000 ref_time and its proper PoV weight taken from statemint benchmarks. +// +// TODO: add the fungible benchmarked values once these are calculated. +pub struct XcmWeight(core::marker::PhantomData); +impl XcmWeightInfo for XcmWeight +where + Runtime: frame_system::Config, +{ + fn withdraw_asset(_assets: &MultiAssets) -> XCMWeight { + XCMWeight::from_parts(200_000_000u64, ASSET_BURN_MAX_PROOF_SIZE) + } + fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { + XCMWeight::from_parts(200_000_000u64, 0) + } + fn receive_teleported_asset(_assets: &MultiAssets) -> XCMWeight { + XCMWeight::MAX + } + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> XCMWeight { + XcmGeneric::::query_response() + } + fn transfer_asset(_assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + XCMWeight::from_parts(200_000_000u64, ASSET_TRANSFER_MAX_PROOF_SIZE) + } + fn transfer_reserve_asset( + _assets: &MultiAssets, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> XCMWeight { + XCMWeight::from_parts(200_000_000u64, ASSET_TRANSFER_MAX_PROOF_SIZE) + } + fn transact( + _origin_type: &OriginKind, + _require_weight_at_most: &Weight, + _call: &DoubleEncoded, + ) -> XCMWeight { + XcmGeneric::::transact() + } + fn hrmp_new_channel_open_request( + _sender: &u32, + _max_message_size: &u32, + _max_capacity: &u32, + ) -> XCMWeight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + // XCM Executor does not currently support HRMP channel operations + Weight::MAX + } + fn clear_origin() -> XCMWeight { + XcmGeneric::::clear_origin() + } + fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { + XcmGeneric::::descend_origin() + } + fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::report_error() + } + fn deposit_asset(_assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight { + Weight::from_parts(200_000_000u64, ASSET_MINT_MAX_PROOF_SIZE) + } + fn deposit_reserve_asset( + _assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> XCMWeight { + Weight::from_parts(200_000_000u64, ASSET_MINT_MAX_PROOF_SIZE) + } + fn exchange_asset( + _give: &MultiAssetFilter, + _receive: &MultiAssets, + _maximal: &bool, + ) -> XCMWeight { + Weight::MAX + } + fn initiate_reserve_withdraw( + _assets: &MultiAssetFilter, + _reserve: &MultiLocation, + _xcm: &Xcm<()>, + ) -> XCMWeight { + XcmGeneric::::initiate_reserve_withdraw() + } + fn initiate_teleport( + _assets: &MultiAssetFilter, + _dest: &MultiLocation, + _xcm: &Xcm<()>, + ) -> XCMWeight { + XCMWeight::MAX + } + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> XCMWeight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> XCMWeight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> XCMWeight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> XCMWeight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> XCMWeight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> XCMWeight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight { + XcmGeneric::::expect_transact_status() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX + } + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() + } + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() + } + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() + } + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX + } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() + } +} diff --git a/runtime/dancebox/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/runtime/dancebox/src/weights/xcm/pallet_xcm_benchmarks_generic.rs new file mode 100644 index 000000000..2def75bc3 --- /dev/null +++ b/runtime/dancebox/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -0,0 +1,666 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_xcm_benchmarks::generic +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `COV0768`, CPU: `AMD Ryzen 9 7950X 16-Core Processor` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 + +// Executed Command: +// ./target/release/tanssi-node +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --pallet=pallet_xcm_benchmarks::generic +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --output=./runtime/dancebox/src/weights/pallet_xcm_benchmarks.rs +// --template=./benchmarking/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_xcm_benchmarks::generic. +pub trait WeightInfo { + fn report_holding() -> Weight; + fn buy_execution() -> Weight; + fn query_response() -> Weight; + fn transact() -> Weight; + fn refund_surplus() -> Weight; + fn set_error_handler() -> Weight; + fn set_appendix() -> Weight; + fn clear_error() -> Weight; + fn descend_origin() -> Weight; + fn clear_origin() -> Weight; + fn report_error() -> Weight; + fn claim_asset() -> Weight; + fn trap() -> Weight; + fn subscribe_version() -> Weight; + fn unsubscribe_version() -> Weight; + fn initiate_reserve_withdraw() -> Weight; + fn burn_asset() -> Weight; + fn expect_asset() -> Weight; + fn expect_origin() -> Weight; + fn expect_error() -> Weight; + fn expect_transact_status() -> Weight; + fn query_pallet() -> Weight; + fn expect_pallet() -> Weight; + fn report_transact_status() -> Weight; + fn clear_transact_status() -> Weight; + fn set_topic() -> Weight; + fn clear_topic() -> Weight; + fn set_fees_mode() -> Weight; + fn unpaid_execution() -> Weight; +} + +/// Weights for pallet_xcm_benchmarks::generic using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_holding() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 25_280_000 picoseconds. + Weight::from_parts(25_700_000, 3610) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + fn buy_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_640_000, 0) + } + /// Storage: PolkadotXcm Queries (r:1 w:0) + /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + fn query_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3568` + // Minimum execution time: 9_680_000 picoseconds. + Weight::from_parts(9_860_000, 3568) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) + /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) + fn transact() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 11_380_000 picoseconds. + Weight::from_parts(11_750_000, 1561) + .saturating_add(T::DbWeight::get().reads(1_u64)) + } + fn refund_surplus() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_610_000 picoseconds. + Weight::from_parts(2_680_000, 0) + } + fn set_error_handler() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_410_000 picoseconds. + Weight::from_parts(2_490_000, 0) + } + fn set_appendix() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_410_000 picoseconds. + Weight::from_parts(2_510_000, 0) + } + fn clear_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_390_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + fn descend_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_840_000 picoseconds. + Weight::from_parts(2_910_000, 0) + } + fn clear_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_490_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 20_289_000 picoseconds. + Weight::from_parts(20_590_000, 3610) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: PolkadotXcm AssetTraps (r:1 w:1) + /// Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) + fn claim_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `160` + // Estimated: `3625` + // Minimum execution time: 13_400_000 picoseconds. + Weight::from_parts(13_640_000, 3625) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + fn trap() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn subscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 24_800_000 picoseconds. + Weight::from_parts(25_270_000, 3610) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn unsubscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_250_000 picoseconds. + Weight::from_parts(4_390_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn initiate_reserve_withdraw() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 22_600_000 picoseconds. + Weight::from_parts(23_030_000, 3610) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + fn burn_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_140_000 picoseconds. + Weight::from_parts(3_340_000, 0) + } + fn expect_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_540_000 picoseconds. + Weight::from_parts(2_620_000, 0) + } + fn expect_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_470_000 picoseconds. + Weight::from_parts(2_530_000, 0) + } + fn expect_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_400_000 picoseconds. + Weight::from_parts(2_450_000, 0) + } + fn expect_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_620_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn query_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 24_889_000 picoseconds. + Weight::from_parts(25_359_000, 3610) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + fn expect_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_100_000 picoseconds. + Weight::from_parts(6_310_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 20_170_000 picoseconds. + Weight::from_parts(20_620_000, 3610) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + fn clear_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_440_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + fn set_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_400_000 picoseconds. + Weight::from_parts(2_480_000, 0) + } + fn clear_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_380_000 picoseconds. + Weight::from_parts(2_470_000, 0) + } + fn set_fees_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_340_000 picoseconds. + Weight::from_parts(2_420_000, 0) + } + fn unpaid_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_holding() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 25_280_000 picoseconds. + Weight::from_parts(25_700_000, 3610) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + fn buy_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_640_000, 0) + } + /// Storage: PolkadotXcm Queries (r:1 w:0) + /// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured) + fn query_response() -> Weight { + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `3568` + // Minimum execution time: 9_680_000 picoseconds. + Weight::from_parts(9_860_000, 3568) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + /// Storage: MaintenanceMode MaintenanceMode (r:1 w:0) + /// Proof Skipped: MaintenanceMode MaintenanceMode (max_values: Some(1), max_size: None, mode: Measured) + fn transact() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `1561` + // Minimum execution time: 11_380_000 picoseconds. + Weight::from_parts(11_750_000, 1561) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + } + fn refund_surplus() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_610_000 picoseconds. + Weight::from_parts(2_680_000, 0) + } + fn set_error_handler() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_410_000 picoseconds. + Weight::from_parts(2_490_000, 0) + } + fn set_appendix() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_410_000 picoseconds. + Weight::from_parts(2_510_000, 0) + } + fn clear_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_390_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + fn descend_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_840_000 picoseconds. + Weight::from_parts(2_910_000, 0) + } + fn clear_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_490_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 20_289_000 picoseconds. + Weight::from_parts(20_590_000, 3610) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + /// Storage: PolkadotXcm AssetTraps (r:1 w:1) + /// Proof Skipped: PolkadotXcm AssetTraps (max_values: None, max_size: None, mode: Measured) + fn claim_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `160` + // Estimated: `3625` + // Minimum execution time: 13_400_000 picoseconds. + Weight::from_parts(13_640_000, 3625) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + fn trap() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn subscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 24_800_000 picoseconds. + Weight::from_parts(25_270_000, 3610) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(3_u64)) + } + /// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) + /// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured) + fn unsubscribe_version() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_250_000 picoseconds. + Weight::from_parts(4_390_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn initiate_reserve_withdraw() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 22_600_000 picoseconds. + Weight::from_parts(23_030_000, 3610) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + fn burn_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_140_000 picoseconds. + Weight::from_parts(3_340_000, 0) + } + fn expect_asset() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_540_000 picoseconds. + Weight::from_parts(2_620_000, 0) + } + fn expect_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_470_000 picoseconds. + Weight::from_parts(2_530_000, 0) + } + fn expect_error() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_400_000 picoseconds. + Weight::from_parts(2_450_000, 0) + } + fn expect_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_550_000 picoseconds. + Weight::from_parts(2_620_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn query_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 24_889_000 picoseconds. + Weight::from_parts(25_359_000, 3610) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + fn expect_pallet() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_100_000 picoseconds. + Weight::from_parts(6_310_000, 0) + } + /// Storage: PolkadotXcm SupportedVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured) + /// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + /// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + /// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem HostConfiguration (r:1 w:0) + /// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + /// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured) + fn report_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `145` + // Estimated: `3610` + // Minimum execution time: 20_170_000 picoseconds. + Weight::from_parts(20_620_000, 3610) + .saturating_add(RocksDbWeight::get().reads(5_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } + fn clear_transact_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_440_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } + fn set_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_400_000 picoseconds. + Weight::from_parts(2_480_000, 0) + } + fn clear_topic() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_380_000 picoseconds. + Weight::from_parts(2_470_000, 0) + } + fn set_fees_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_340_000 picoseconds. + Weight::from_parts(2_420_000, 0) + } + fn unpaid_execution() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_420_000 picoseconds. + Weight::from_parts(2_520_000, 0) + } +} diff --git a/runtime/dancebox/src/xcm_config.rs b/runtime/dancebox/src/xcm_config.rs index 6e5f7370a..5b9f0f7a9 100644 --- a/runtime/dancebox/src/xcm_config.rs +++ b/runtime/dancebox/src/xcm_config.rs @@ -16,8 +16,9 @@ use { super::{ - AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + weights::xcm::XcmWeight as XcmGenericWeights, AccountId, AllPalletsWithSystem, Balances, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmpQueue, }, frame_support::{ parameter_types, @@ -30,10 +31,10 @@ use { xcm::latest::prelude::*, xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WithComputedOrigin, + AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, IsConcrete, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, + TakeWeightCredit, UsingComponents, WeightInfoBounds, WithComputedOrigin, }, xcm_executor::XcmExecutor, }; @@ -146,7 +147,8 @@ pub type XcmOriginToTransactDispatchOrigin = ( /// Means for transacting assets on this chain. pub type AssetTransactors = CurrencyTransactor; -pub type XcmWeigher = FixedWeightBounds; +pub type XcmWeigher = + WeightInfoBounds, RuntimeCall, MaxInstructions>; /// The means for routing XCM messages which are not for local execution into the right message /// queues.