Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

(do-not-merge) gav xcm v3 bench #1965

Closed
wants to merge 85 commits into from
Closed
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
4d9574e
Patched deps - Cargo.toml
bkontur Dec 7, 2022
95da773
Patched deps - Cargo.lock
bkontur Dec 7, 2022
b4237d5
Fix
bkontur Dec 7, 2022
619c3aa
Fix
bkontur Dec 7, 2022
12ce519
Patched deps - Cargo.lock
bkontur Dec 7, 2022
ca0a784
Fix
bkontur Dec 7, 2022
f14b37c
Fix
bkontur Dec 7, 2022
f512758
Fixes for transact benchmark
bkontur Dec 7, 2022
689cabb
Fixes add pallet_xcm to benchmarks
bkontur Dec 7, 2022
bf01789
Patched deps - Cargo.lock
bkontur Dec 8, 2022
39ee3eb
Revert remark_with_event
bkontur Dec 8, 2022
1f5e792
Patched deps - Cargo.lock
bkontur Dec 8, 2022
8a0fc29
Merge branch 'gav-xcm-v3' of https://github.com/paritytech/cumulus in…
Dec 8, 2022
d0cb237
".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmar…
Dec 8, 2022
379de9b
Patched deps - Cargo.lock
bkontur Dec 8, 2022
1cb142d
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 8, 2022
9a06bd1
Fixes
bkontur Dec 8, 2022
d053805
Patched deps - Cargo.lock
bkontur Dec 8, 2022
ffaa3ab
Patched deps - Cargo.lock
bkontur Dec 8, 2022
822b970
TMP
bkontur Dec 8, 2022
367768e
Patched deps - Cargo.toml (polkadot/substrate)
bkontur Dec 8, 2022
1409fd7
Patched deps - Cargo.toml (polkadot/substrate)
bkontur Dec 8, 2022
887fa0c
Fix for reserve_asset_deposited
bkontur Dec 8, 2022
808a8a5
".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm
Dec 8, 2022
cfdd2a5
".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm
Dec 8, 2022
42e330d
Fix
bkontur Dec 8, 2022
1e5c480
Fix
bkontur Dec 8, 2022
594f1ee
".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm
Dec 8, 2022
f961915
".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmar…
Dec 8, 2022
6203abc
Fix westmint
bkontur Dec 8, 2022
72a138a
Fix
bkontur Dec 8, 2022
bc05ae9
".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmark…
Dec 8, 2022
4c5162d
".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmar…
Dec 8, 2022
e218cc1
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 11, 2022
95f134c
Patched deps - Cargo.lock/toml
bkontur Dec 11, 2022
3569955
Merge branch 'gav-xcm-v3' into bko-gav-xcm-v3-bench
bkontur Dec 11, 2022
53c72dd
".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives …
Dec 11, 2022
4ad7904
".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pal…
Dec 11, 2022
7e8239f
".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pal…
Dec 11, 2022
a4c27bc
Fix for collectives
bkontur Dec 11, 2022
773bb34
Fixes for bridge-hubs
bkontur Dec 11, 2022
bf2ffcd
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 12, 2022
13da29e
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 12, 2022
d835493
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 13, 2022
48bc0d8
Patched deps - cargo.lock
bkontur Dec 13, 2022
48d23cc
Fixes - return back Weightless
bkontur Dec 13, 2022
cc4ff12
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 13, 2022
7e3c11c
Fix - removed MigrateToTrackInactive for contracts-rococo
bkontur Dec 13, 2022
1ff26fc
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 13, 2022
6e1f11e
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 13, 2022
5f77204
Patched deps - Cargo.lock
bkontur Dec 13, 2022
b1dd176
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 14, 2022
9f9fc93
Fix
bkontur Dec 14, 2022
17274e4
".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmar…
Dec 14, 2022
6f96409
".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmar…
Dec 14, 2022
757c41a
".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmark…
Dec 14, 2022
8eb1c44
Patched deps - Cargo.lock
bkontur Dec 14, 2022
bc2fe14
".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmar…
Dec 14, 2022
7c6c77e
".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmar…
Dec 14, 2022
97444f2
".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmark…
Dec 14, 2022
7bb408d
".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm
Dec 14, 2022
4b36642
".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm
Dec 14, 2022
f3c64fc
".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm
Dec 14, 2022
75a6fe1
".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives …
Dec 14, 2022
b3dfa7b
".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pal…
Dec 14, 2022
ff0e40a
".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pal…
Dec 14, 2022
0653c51
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 14, 2022
02a2711
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 22, 2022
341059a
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Dec 22, 2022
c7aee74
Dumy weights to get compile
bkontur Dec 22, 2022
d735e35
Change UniversalLocation according to https://github.com/paritytech/p…
bkontur Dec 22, 2022
8c89878
Fix bridge-hubs weights
bkontur Dec 22, 2022
9bc4cef
".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm
Dec 22, 2022
77936d2
".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm
Dec 22, 2022
9ab92b2
".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives …
Dec 22, 2022
1c83371
".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm
Dec 22, 2022
0d6a935
".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet…
Dec 22, 2022
3d230c2
".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet…
Dec 22, 2022
6e5db14
".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pal…
Dec 22, 2022
9f2414a
".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pal…
Dec 22, 2022
37c54dd
".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet…
Dec 22, 2022
e16273a
".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet…
Dec 22, 2022
959ffc3
Merge remote-tracking branch 'origin/gav-xcm-v3' into bko-gav-xcm-v3-…
bkontur Jan 2, 2023
cafc41e
Merge branch 'gav-xcm-v3' into bko-gav-xcm-v3-bench
bkontur Jan 13, 2023
35df5fb
Bump version
bkontur Jan 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
522 changes: 268 additions & 254 deletions Cargo.lock

Large diffs are not rendered by default.

254 changes: 254 additions & 0 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pallets/xcmp-queue/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use frame_system::RawOrigin;

benchmarks! {
set_config_with_u32 {}: update_resume_threshold(RawOrigin::Root, 100)
set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, 3_000_000)
set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_ref_time(3_000_000))
}

impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);
5 changes: 3 additions & 2 deletions parachains/runtimes/assets/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ mod benches {
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_xcmp_queue, XcmpQueue]
// XCM
[pallet_xcm, PolkadotXcm]
// NOTE: Make sure you point to the individual modules below.
[pallet_xcm_benchmarks::fungible, XcmBalances]
[pallet_xcm_benchmarks::generic, XcmGeneric]
Expand Down Expand Up @@ -859,7 +860,7 @@ impl_runtime_apis! {
impl cumulus_pallet_session_benchmarking::Config for Runtime {}

use xcm::latest::prelude::*;
use xcm_config::{KsmLocation, MaxAssetsIntoHolding};
use xcm_config::{LocalCheckAccount, KsmLocation, MaxAssetsIntoHolding};
use pallet_xcm_benchmarks::asset_instance_from;

impl pallet_xcm_benchmarks::Config for Runtime {
Expand Down Expand Up @@ -908,7 +909,7 @@ impl_runtime_apis! {
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
type TransactAsset = Balances;

type CheckedAccount = CheckedAccount;
type CheckedAccount = LocalCheckAccount;
type TrustedTeleporter = TrustedTeleporter;

fn get_multi_asset() -> MultiAsset {
Expand Down
1 change: 1 addition & 0 deletions parachains/runtimes/assets/statemine/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub mod pallet_session;
pub mod pallet_timestamp;
pub mod pallet_uniques;
pub mod pallet_utility;
pub mod pallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod xcm;
Expand Down
117 changes: 117 additions & 0 deletions parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.

// Cumulus 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.

// Cumulus 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 Cumulus. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-12-08, 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:
// /home/benchbot/cargo_target_dir/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --pallet=pallet_xcm
// --chain=statemine-dev
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;

/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// 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)
fn send() -> Weight {
// Minimum execution time: 25_562 nanoseconds.
Weight::from_ref_time(26_177_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
fn teleport_assets() -> Weight {
// Minimum execution time: 31_555 nanoseconds.
Weight::from_ref_time(32_297_000)
.saturating_add(T::DbWeight::get().reads(1))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
fn reserve_transfer_assets() -> Weight {
// Minimum execution time: 24_516 nanoseconds.
Weight::from_ref_time(25_126_000)
.saturating_add(T::DbWeight::get().reads(1))
}
// Storage: Benchmark Override (r:0 w:0)
fn execute() -> Weight {
// Minimum execution time: 18_446_744_073_709_551 nanoseconds.
Weight::from_ref_time(18_446_744_073_709_551_000)
}
// Storage: PolkadotXcm SupportedVersion (r:0 w:1)
fn force_xcm_version() -> Weight {
// Minimum execution time: 14_521 nanoseconds.
Weight::from_ref_time(14_865_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1)
fn force_default_xcm_version() -> Weight {
// Minimum execution time: 4_325 nanoseconds.
Weight::from_ref_time(4_578_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: PolkadotXcm VersionNotifiers (r:1 w:1)
// Storage: PolkadotXcm QueryCounter (r:1 w:1)
// 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)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn force_subscribe_version_notify() -> Weight {
// Minimum execution time: 29_836 nanoseconds.
Weight::from_ref_time(30_213_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: PolkadotXcm VersionNotifiers (r:1 w:1)
// 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)
// Storage: PolkadotXcm Queries (r:0 w:1)
fn force_unsubscribe_version_notify() -> Weight {
// Minimum execution time: 31_333 nanoseconds.
Weight::from_ref_time(31_808_000)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
}
3 changes: 2 additions & 1 deletion parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
}
// Currently there is no trusted reserve
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
Weight::MAX
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
Weight::from_ref_time(1_000_000_000 as u64)
}
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-12-08, 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:
// ./artifacts/polkadot-parachain
// /home/benchbot/cargo_target_dir/production/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=statemine-dev
// --steps=50
// --repeat=20
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --pallet=pallet_xcm_benchmarks::generic
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --chain=statemine-dev
// --header=./file_header.txt
// --template=./templates/xcm-bench-template.hbs
// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/
Expand All @@ -56,38 +56,40 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_holding() -> Weight {
Weight::from_ref_time(1_303_495_000 as u64)
Weight::from_ref_time(1_007_454_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(8_667_000 as u64)
Weight::from_ref_time(8_069_000 as u64)
}
// Storage: PolkadotXcm Queries (r:1 w:0)
pub(crate) fn query_response() -> Weight {
Weight::from_ref_time(19_292_000 as u64)
Weight::from_ref_time(17_719_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: Session NextKeys (r:1 w:0)
pub(crate) fn transact() -> Weight {
Weight::from_ref_time(37_996_000 as u64)
Weight::from_ref_time(15_102_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
pub(crate) fn refund_surplus() -> Weight {
Weight::from_ref_time(9_076_000 as u64)
Weight::from_ref_time(8_103_000 as u64)
}
pub(crate) fn set_error_handler() -> Weight {
Weight::from_ref_time(6_410_000 as u64)
Weight::from_ref_time(5_803_000 as u64)
}
pub(crate) fn set_appendix() -> Weight {
Weight::from_ref_time(6_412_000 as u64)
Weight::from_ref_time(5_761_000 as u64)
}
pub(crate) fn clear_error() -> Weight {
Weight::from_ref_time(6_311_000 as u64)
Weight::from_ref_time(5_665_000 as u64)
}
pub(crate) fn descend_origin() -> Weight {
Weight::from_ref_time(7_355_000 as u64)
Weight::from_ref_time(6_640_000 as u64)
}
pub(crate) fn clear_origin() -> Weight {
Weight::from_ref_time(6_389_000 as u64)
Weight::from_ref_time(5_832_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
Expand All @@ -96,18 +98,18 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_error() -> Weight {
Weight::from_ref_time(23_020_000 as u64)
Weight::from_ref_time(21_808_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(13_613_000 as u64)
Weight::from_ref_time(21_743_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(6_457_000 as u64)
Weight::from_ref_time(5_793_000 as u64)
}
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
Expand All @@ -116,13 +118,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(31_677_000 as u64)
Weight::from_ref_time(27_736_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(9_613_000 as u64)
Weight::from_ref_time(7_913_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
Expand All @@ -132,21 +134,21 @@ 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(1_588_580_000 as u64)
Weight::from_ref_time(1_181_673_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)
Weight::from_ref_time(415_651_000 as u64)
}
pub(crate) fn expect_asset() -> Weight {
Weight::from_ref_time(38_502_000 as u64)
Weight::from_ref_time(38_939_000 as u64)
}
pub(crate) fn expect_origin() -> Weight {
Weight::from_ref_time(6_427_000 as u64)
Weight::from_ref_time(5_918_000 as u64)
}
pub(crate) fn expect_error() -> Weight {
Weight::from_ref_time(6_303_000 as u64)
Weight::from_ref_time(5_829_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
Expand All @@ -155,12 +157,12 @@ impl<T: frame_system::Config> WeightInfo<T> {
// 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)
Weight::from_ref_time(24_557_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)
Weight::from_ref_time(7_407_000 as u64)
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
Expand All @@ -169,21 +171,23 @@ impl<T: frame_system::Config> WeightInfo<T> {
// 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)
Weight::from_ref_time(21_839_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)
Weight::from_ref_time(5_796_000 as u64)
}
pub(crate) fn set_topic() -> Weight {
Weight::from_ref_time(6_527_000 as u64)
Weight::from_ref_time(5_808_000 as u64)
}
pub(crate) fn clear_topic() -> Weight {
Weight::from_ref_time(6_440_000 as u64)
Weight::from_ref_time(5_790_000 as u64)
}
pub(crate) fn set_fees_mode() -> Weight {
Weight::from_ref_time(6_426_000 as u64)
Weight::from_ref_time(5_774_000 as u64)
}
pub(crate) fn unpaid_execution() -> Weight {
Weight::from_ref_time(5_930_000 as u64)
}
pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) }
}
12 changes: 7 additions & 5 deletions parachains/runtimes/assets/statemine/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ use xcm_builder::{
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex,
ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint,
NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds,
MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
WeightInfoBounds,
};
use xcm_executor::{
traits::{JustTry, WithOriginFilter},
Expand All @@ -54,6 +55,8 @@ parameter_types! {
pub AssetsPalletLocation: MultiLocation =
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
/// The check account that is allowed to mint assets locally.
pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local);
}

/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
Expand Down Expand Up @@ -362,8 +365,7 @@ impl pallet_xcm::Config for Runtime {
type TrustedLockers = ();
type SovereignAccountOf = LocationToAccountId;
type MaxLockers = ConstU32<8>;
// FIXME: Replace with benchmarked weight info
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = crate::weights::pallet_xcm::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type ReachableDest = ReachableDest;
}
Expand Down
Loading