mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 03:38:00 +00:00
Change Fixed to WeightInfoBounds for Polkadot (#7077)
* Add polkadot XCM benchmarks * Add temp * ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::generic * Add weights to XCM on Polkadot * Make CI fail on old files Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update template Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add reserve_asset_deposited benchmark * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic * Update weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Change initiate_reserve_deposit in runtime weights * Update weights Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove trusted reserves from runtimes * Fix pallet-xcm-benchmarks mock * Fix test * Change pallet xcm weigher in kusama * Fix * Remove merge conflict artifact * Remove initiate_reserve_withdraw from generic benchmarks * Add missing implementation to XCM benchmark * Fix failing karura test * Remove dbg! Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Fix fmt * Revert "Fix fmt" This reverts commit 676f2d8db07d7427750c79f95494d4988d06fda5. * Fix fmt * Remove duplicated template code * Add back part of the template * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible * Don't skip reserve asset deposited benchmark * Remove call to non-generated benchmark yet * Underscore unused parameter * Skip not supported benchmarks and hardcode value * Remove ReserveAssetDeposited benchmark * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible * Add back ReserveAssetDeposited * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible * Use default benchmark for ReserveAssetDeposited * Add missing parameter * Revert reserve asset deposited benchmark * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm kusama pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm westend pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible * Add 'real' benchmarks * Add TrustedReserve to actual XcmConfig * Add TrustedReserve to actual XcmConfig (fix) * Whitelist from benchmarking XCM storage keys read each block (#6871) * Whitelist from benchmarking XCM storage keys read each block * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm * Remove XcmPallet SupportedVersion from the benchmark whitelist * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime kusama pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm * WIP * Add necessary traits, remove unnecessary whitelisted keys * Fix tests * Remove unused file * Remove unused import --------- Co-authored-by: command-bot <> * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::fungible * Fix spellchecker issues * Remove unused migration code --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c63b557e50
commit
cc9f8129af
Generated
+1
@@ -7983,6 +7983,7 @@ dependencies = [
|
||||
"pallet-vesting",
|
||||
"pallet-whitelist",
|
||||
"pallet-xcm",
|
||||
"pallet-xcm-benchmarks",
|
||||
"parity-scale-codec",
|
||||
"polkadot-primitives",
|
||||
"polkadot-runtime-common",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//! * Determine if the para is scheduled on any core by fetching the `availability_cores` Runtime API.
|
||||
//! * Use the Runtime API subsystem to fetch the full validation data.
|
||||
//! * Invoke the `collator`, and use its outputs to produce a [`CandidateReceipt`], signed with the configuration's `key`.
|
||||
//! * Dispatch a [`CollatorProtocolMessage::DistributeCollation`](receipt, pov)`.
|
||||
//! * Dispatch a [`CollatorProtocolMessage::DistributeCollation`]`(receipt, pov)`.
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ pub struct InitialData {
|
||||
pub(crate) struct Initialized {
|
||||
keystore: Arc<LocalKeystore>,
|
||||
runtime_info: RuntimeInfo,
|
||||
/// This is the highest `SessionIndex` seen via `ActiveLeavesUpdate`. It doen't matter if it was
|
||||
/// This is the highest `SessionIndex` seen via `ActiveLeavesUpdate`. It doesn't matter if it was
|
||||
/// cached successfully or not. It is used to detect ancient disputes.
|
||||
highest_session_seen: SessionIndex,
|
||||
/// Will be set to `true` if an error occured during the last caching attempt
|
||||
|
||||
@@ -123,14 +123,14 @@ impl Metrics {
|
||||
.map(|metrics| metrics.participation_pipeline_durations.start_timer())
|
||||
}
|
||||
|
||||
/// Set the priority_queue_size metric
|
||||
/// Set the `priority_queue_size` metric
|
||||
pub fn report_priority_queue_size(&self, size: u64) {
|
||||
if let Some(metrics) = &self.0 {
|
||||
metrics.participation_priority_queue_size.set(size);
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the best_effort_queue_size metric
|
||||
/// Set the `best_effort_queue_size` metric
|
||||
pub fn report_best_effort_queue_size(&self, size: u64) {
|
||||
if let Some(metrics) = &self.0 {
|
||||
metrics.participation_best_effort_queue_size.set(size);
|
||||
|
||||
@@ -38,9 +38,9 @@ fn make_dummy_comparator(
|
||||
CandidateComparator::new_dummy(relay_parent, *req.candidate_hash())
|
||||
}
|
||||
|
||||
/// Make a partial clone of the given ParticipationRequest, just missing
|
||||
/// the request_timer field. We prefer this helper to implementing Clone
|
||||
/// for ParticipationRequest, since we only clone requests in tests.
|
||||
/// Make a partial clone of the given `ParticipationRequest`, just missing
|
||||
/// the `request_timer` field. We prefer this helper to implementing Clone
|
||||
/// for `ParticipationRequest`, since we only clone requests in tests.
|
||||
fn clone_request(request: &ParticipationRequest) -> ParticipationRequest {
|
||||
ParticipationRequest {
|
||||
candidate_receipt: request.candidate_receipt.clone(),
|
||||
|
||||
@@ -57,13 +57,13 @@ const LRU_OBSERVED_BLOCKS_CAPACITY: NonZeroUsize = match NonZeroUsize::new(20) {
|
||||
None => panic!("Observed blocks cache size must be non-zero"),
|
||||
};
|
||||
|
||||
/// ScrapedUpdates
|
||||
/// `ScrapedUpdates`
|
||||
///
|
||||
/// Updates to on_chain_votes and included receipts for new active leaf and its unprocessed
|
||||
/// Updates to `on_chain_votes` and included receipts for new active leaf and its unprocessed
|
||||
/// ancestors.
|
||||
///
|
||||
/// on_chain_votes: New votes as seen on chain
|
||||
/// included_receipts: Newly included parachain block candidate receipts as seen on chain
|
||||
/// `on_chain_votes`: New votes as seen on chain
|
||||
/// `included_receipts`: Newly included parachain block candidate receipts as seen on chain
|
||||
pub struct ScrapedUpdates {
|
||||
pub on_chain_votes: Vec<ScrapedOnChainVotes>,
|
||||
pub included_receipts: Vec<CandidateReceipt>,
|
||||
|
||||
@@ -178,7 +178,7 @@ pub fn stringify_panic_payload(payload: Box<dyn Any + Send + 'static>) -> String
|
||||
|
||||
/// In case of node and worker version mismatch (as a result of in-place upgrade), send `SIGTERM`
|
||||
/// to the node to tear it down and prevent it from raising disputes on valid candidates. Node
|
||||
/// restart should be handled by the node owner. As node exits, unix sockets opened to workers
|
||||
/// restart should be handled by the node owner. As node exits, Unix sockets opened to workers
|
||||
/// get closed by the OS and other workers receive error on socket read and also exit. Preparation
|
||||
/// jobs are written to the temporary files that are renamed to real artifacts on the node side, so
|
||||
/// no leftover artifacts are possible.
|
||||
|
||||
@@ -94,7 +94,7 @@ pub mod landlock {
|
||||
}
|
||||
}
|
||||
|
||||
/// Basaed on the given `status`, returns a single bool indicating whether the given landlock
|
||||
/// Based on the given `status`, returns a single bool indicating whether the given landlock
|
||||
/// ABI is fully enabled on the current Linux environment.
|
||||
pub fn status_is_fully_enabled(
|
||||
status: &Result<RulesetStatus, Box<dyn std::error::Error>>,
|
||||
|
||||
@@ -186,7 +186,7 @@ struct State {
|
||||
/// Config for aggression.
|
||||
aggression_config: AggressionConfig,
|
||||
|
||||
/// HashMap from active leaves to spans
|
||||
/// `HashMap` from active leaves to spans
|
||||
spans: HashMap<Hash, jaeger::PerLeafSpan>,
|
||||
|
||||
/// Current approval checking finality lag.
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Provides "fake" runtime api implementations
|
||||
//! Provides "fake" runtime API implementations
|
||||
//!
|
||||
//! These are used to provide a type that implements these runtime apis without requiring to import the native runtimes.
|
||||
//! These are used to provide a type that implements these runtime APIs without requiring to import the native runtimes.
|
||||
|
||||
use beefy_primitives::crypto::{AuthorityId as BeefyId, Signature as BeefySignature};
|
||||
use grandpa_primitives::AuthorityId as GrandpaId;
|
||||
@@ -40,7 +40,7 @@ use sp_weights::Weight;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
/// This runtime api is only implemented for the test runtime!
|
||||
/// This runtime API is only implemented for the test runtime!
|
||||
pub trait GetLastTimestamp {
|
||||
/// Returns the last timestamp of a runtime.
|
||||
fn get_last_timestamp() -> u64;
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
//! this approach to put back pressure on only a single source (as all are the same). If a module
|
||||
//! has a task that requires this, it indeed has to spawn a long running task which can do the
|
||||
//! back-pressure on that message source or we make it its own subsystem. This is just one of the
|
||||
//! situations that justifies the complexity of asynchronism.
|
||||
//! situations that justifies the complexity of asynchrony.
|
||||
|
||||
use std::{convert::identity, sync::Arc};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ impl Default for ReputationAggregator {
|
||||
}
|
||||
|
||||
impl ReputationAggregator {
|
||||
/// New ReputationAggregator
|
||||
/// New `ReputationAggregator`
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
|
||||
@@ -2094,6 +2094,7 @@ sp_api::impl_runtime_apis! {
|
||||
Vec<frame_benchmarking::BenchmarkBatch>,
|
||||
sp_runtime::RuntimeString,
|
||||
> {
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError};
|
||||
// Trying to add benchmarks directly to some pallets caused cyclic dependency issues.
|
||||
// To get around that, we separated the benchmarks into its own crate.
|
||||
@@ -2136,6 +2137,7 @@ sp_api::impl_runtime_apis! {
|
||||
Statemine::get(),
|
||||
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) },
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
|
||||
@@ -2143,6 +2145,7 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
type CheckedAccount = LocalCheckAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
MultiAsset {
|
||||
@@ -2201,24 +2204,9 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
|
||||
// Total Issuance
|
||||
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
|
||||
// Execution Phase
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
|
||||
// Event Count
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
|
||||
// System Events
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
||||
// Treasury Account
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
||||
// Configuration ActiveConfig
|
||||
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
||||
// The transactional storage limit.
|
||||
hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
|
||||
];
|
||||
let mut whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
let treasury_key = frame_system::Account::<Runtime>::hashed_key_for(Treasury::account_id());
|
||||
whitelist.push(treasury_key.to_vec().into());
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
|
||||
@@ -17,13 +17,17 @@
|
||||
//! Tests for the Kusama Runtime Configuration
|
||||
|
||||
use crate::*;
|
||||
use frame_support::{dispatch::GetDispatchInfo, weights::WeightToFee as WeightToFeeT};
|
||||
use frame_support::{
|
||||
dispatch::GetDispatchInfo, traits::WhitelistedStorageKeys, weights::WeightToFee as WeightToFeeT,
|
||||
};
|
||||
use keyring::Sr25519Keyring::Charlie;
|
||||
use pallet_transaction_payment::Multiplier;
|
||||
use parity_scale_codec::Encode;
|
||||
use runtime_common::MinimumMultiplier;
|
||||
use separator::Separatable;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
use sp_runtime::FixedPointNumber;
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[test]
|
||||
fn nis_hold_reason_encoding_is_correct() {
|
||||
@@ -146,3 +150,28 @@ fn nominator_limit() {
|
||||
fn call_size() {
|
||||
RuntimeCall::assert_size_under(230);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac"));
|
||||
// Total issuance
|
||||
assert!(whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80"));
|
||||
// Execution phase
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a"));
|
||||
// Event count
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850"));
|
||||
// System events
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"));
|
||||
// Configuration ActiveConfig
|
||||
assert!(whitelist.contains("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"));
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1"));
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4"));
|
||||
}
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
@@ -36,6 +35,10 @@
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm
|
||||
// --chain=kusama-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
@@ -56,10 +59,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -109,8 +108,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
@@ -118,7 +115,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Minimum execution time: 2_939_000 picoseconds.
|
||||
Weight::from_parts(3_022_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
@@ -130,10 +126,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -158,10 +150,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -232,10 +220,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -281,10 +265,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
|
||||
@@ -1,393 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/pallet_xcm_benchmarks_generic.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_benchmarks::generic`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_benchmarks::generic::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_holding() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 34_471_000 picoseconds.
|
||||
Weight::from_parts(35_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn buy_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_115_000 picoseconds.
|
||||
Weight::from_parts(3_227_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: XcmPallet Queries (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured)
|
||||
fn query_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 11_905_000 picoseconds.
|
||||
Weight::from_parts(12_199_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
fn transact() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 12_426_000 picoseconds.
|
||||
Weight::from_parts(12_740_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_099_000 picoseconds.
|
||||
Weight::from_parts(3_200_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_960_000 picoseconds.
|
||||
Weight::from_parts(3_060_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_947_000 picoseconds.
|
||||
Weight::from_parts(3_048_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_861_000 picoseconds.
|
||||
Weight::from_parts(2_990_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_843_000 picoseconds.
|
||||
Weight::from_parts(4_005_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_915_000 picoseconds.
|
||||
Weight::from_parts(3_037_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 29_177_000 picoseconds.
|
||||
Weight::from_parts(29_561_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: XcmPallet AssetTraps (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured)
|
||||
fn claim_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `226`
|
||||
// Estimated: `3691`
|
||||
// Minimum execution time: 16_170_000 picoseconds.
|
||||
Weight::from_parts(16_629_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3691))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn trap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_881_000 picoseconds.
|
||||
Weight::from_parts(3_014_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifyTargets (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn subscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 35_499_000 picoseconds.
|
||||
Weight::from_parts(36_678_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifyTargets (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet 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: 5_005_000 picoseconds.
|
||||
Weight::from_parts(5_176_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 33_017_000 picoseconds.
|
||||
Weight::from_parts(33_514_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_645_000 picoseconds.
|
||||
Weight::from_parts(4_827_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_116_000 picoseconds.
|
||||
Weight::from_parts(3_239_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_930_000 picoseconds.
|
||||
Weight::from_parts(3_118_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_871_000 picoseconds.
|
||||
Weight::from_parts(2_990_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_136_000 picoseconds.
|
||||
Weight::from_parts(3_240_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn query_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 36_940_000 picoseconds.
|
||||
Weight::from_parts(37_766_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn expect_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_735_000 picoseconds.
|
||||
Weight::from_parts(8_957_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 28_967_000 picoseconds.
|
||||
Weight::from_parts(29_937_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn clear_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_907_000 picoseconds.
|
||||
Weight::from_parts(3_023_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_866_000 picoseconds.
|
||||
Weight::from_parts(2_960_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_872_000 picoseconds.
|
||||
Weight::from_parts(3_022_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_fees_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_936_000 picoseconds.
|
||||
Weight::from_parts(3_021_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_063_000 picoseconds.
|
||||
Weight::from_parts(3_153_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for KusamaXcmWeight<RuntimeCall> {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
fn reserve_asset_deposited(assets: &MultiAssets) -> Weight {
|
||||
// Kusama doesn't support ReserveAssetDeposited, so this benchmark has a default weight
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
@@ -166,7 +167,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for KusamaXcmWeight<RuntimeCall> {
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
|
||||
@@ -17,96 +17,163 @@
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-03-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
//! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-gghbxkbs-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// --chain=kusama-dev
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --chain=kusama-dev
|
||||
// --header=./file_header.txt
|
||||
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
|
||||
// --output=./runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
|
||||
// --output=./runtime/kusama/src/weights/xcm/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::fungible`.
|
||||
/// Weight functions for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn withdraw_asset() -> Weight {
|
||||
Weight::from_parts(20_385_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_950_000 picoseconds.
|
||||
Weight::from_parts(24_720_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn transfer_asset() -> Weight {
|
||||
Weight::from_parts(32_756_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 51_687_000 picoseconds.
|
||||
Weight::from_parts(52_490_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn transfer_reserve_asset() -> Weight {
|
||||
Weight::from_parts(50_645_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `177`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 75_438_000 picoseconds.
|
||||
Weight::from_parts(77_495_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Storage: `Benchmark::Override` (r:0 w:0)
|
||||
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn reserve_asset_deposited() -> Weight {
|
||||
Weight::from_parts(2_000_000_000_000 as u64, 0)
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_000_000_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000_000_000, 0)
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3541`
|
||||
// Minimum execution time: 28_370_000 picoseconds.
|
||||
Weight::from_parts(29_100_000, 3541)
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn receive_teleported_asset() -> Weight {
|
||||
Weight::from_parts(19_595_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_041_000 picoseconds.
|
||||
Weight::from_parts(23_433_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn deposit_asset() -> Weight {
|
||||
Weight::from_parts(21_763_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 25_386_000 picoseconds.
|
||||
Weight::from_parts(25_904_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn deposit_reserve_asset() -> Weight {
|
||||
Weight::from_parts(40_930_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 50_645_000 picoseconds.
|
||||
Weight::from_parts(51_719_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_teleport() -> Weight {
|
||||
Weight::from_parts(40_788_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 53_055_000 picoseconds.
|
||||
Weight::from_parts(54_214_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
@@ -215,29 +215,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
|
||||
Weight::from_parts(5_155_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 30_858_000 picoseconds.
|
||||
Weight::from_parts(31_858_000, 3676)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
pub(crate) fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
|
||||
@@ -39,8 +39,8 @@ use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
||||
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
||||
CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete,
|
||||
MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
|
||||
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
|
||||
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
|
||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||
};
|
||||
@@ -400,7 +400,11 @@ impl pallet_xcm::Config for Runtime {
|
||||
// Anyone is able to use reserve transfers regardless of who they are and what they want to
|
||||
// transfer.
|
||||
type XcmReserveTransferFilter = Everything;
|
||||
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::KusamaXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
@@ -437,7 +441,7 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() {
|
||||
|
||||
// Test that the weigher gives us a sensible weight but don't exactly hard-code it, otherwise it
|
||||
// will be out of date after each re-run.
|
||||
assert!(weight.all_lte(Weight::from_parts(30_313_281_000, 65536)));
|
||||
assert!(weight.all_lte(Weight::from_parts(30_313_281_000, 72_722)));
|
||||
|
||||
let Some(Transact { require_weight_at_most, call, .. }) =
|
||||
xcm.inner_mut().into_iter().find(|inst| matches!(inst, Transact { .. })) else {
|
||||
|
||||
@@ -501,6 +501,7 @@ pub mod pallet {
|
||||
|
||||
/// The active configuration for the current session.
|
||||
#[pallet::storage]
|
||||
#[pallet::whitelist_storage]
|
||||
#[pallet::getter(fn config)]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<_, HostConfiguration<BlockNumberFor<T>>, ValueQuery>;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
//! A module exporting runtime API implementation functions for all runtime APIs using v5
|
||||
//! A module exporting runtime API implementation functions for all runtime APIs using `v5`
|
||||
//! primitives.
|
||||
//!
|
||||
//! Runtimes implementing the v2 runtime API are recommended to forward directly to these
|
||||
|
||||
@@ -81,6 +81,7 @@ pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "ma
|
||||
pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false, features=["experimental"] }
|
||||
pallet-xcm-benchmarks = { path = "../../xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
|
||||
|
||||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
@@ -241,6 +242,7 @@ runtime-benchmarks = [
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"frame-election-provider-support/runtime-benchmarks",
|
||||
"runtime-parachains/runtime-benchmarks",
|
||||
"pallet-xcm-benchmarks/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-executive/try-runtime",
|
||||
|
||||
@@ -1591,6 +1591,8 @@ mod benches {
|
||||
[pallet_whitelist, Whitelist]
|
||||
// XCM
|
||||
[pallet_xcm, XcmPallet]
|
||||
[pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::<Runtime>]
|
||||
[pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::<Runtime>]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2071,7 +2073,8 @@ sp_api::impl_runtime_apis! {
|
||||
Vec<frame_benchmarking::BenchmarkBatch>,
|
||||
sp_runtime::RuntimeString,
|
||||
> {
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError};
|
||||
// Trying to add benchmarks directly to some pallets caused cyclic dependency issues.
|
||||
// To get around that, we separated the benchmarks into its own crate.
|
||||
use pallet_session_benchmarking::Pallet as SessionBench;
|
||||
@@ -2080,6 +2083,8 @@ sp_api::impl_runtime_apis! {
|
||||
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_config::{XcmConfig, StatemintLocation, TokenLocation, LocalCheckAccount, SovereignAccountOf};
|
||||
|
||||
impl pallet_session_benchmarking::Config for Runtime {}
|
||||
impl pallet_offences_benchmarking::Config for Runtime {}
|
||||
@@ -2089,20 +2094,93 @@ sp_api::impl_runtime_apis! {
|
||||
impl pallet_nomination_pools_benchmarking::Config for Runtime {}
|
||||
impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {}
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
|
||||
// Total Issuance
|
||||
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
|
||||
// Execution Phase
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
|
||||
// Event Count
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
|
||||
// System Events
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
||||
// Treasury Account
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
||||
];
|
||||
let mut whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
let treasury_key = frame_system::Account::<Runtime>::hashed_key_for(Treasury::account_id());
|
||||
whitelist.push(treasury_key.to_vec().into());
|
||||
|
||||
impl pallet_xcm_benchmarks::Config for Runtime {
|
||||
type XcmConfig = XcmConfig;
|
||||
type AccountIdConverter = SovereignAccountOf;
|
||||
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(StatemintLocation::get())
|
||||
}
|
||||
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
|
||||
// Polkadot only knows about DOT
|
||||
vec![MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1_000_000 * UNITS) }].into()
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some((
|
||||
StatemintLocation::get(),
|
||||
MultiAsset { id: Concrete(TokenLocation::get()), fun: Fungible(1 * UNITS) }
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
|
||||
type TransactAsset = Balances;
|
||||
|
||||
type CheckedAccount = LocalCheckAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
MultiAsset {
|
||||
id: Concrete(TokenLocation::get()),
|
||||
fun: Fungible(1 * UNITS)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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> {
|
||||
// Polkadot doesn't support asset exchanges
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||
// The XCM executor of Polkadot doesn't have a configured `UniversalAliases`
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> {
|
||||
Ok((StatemintLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
}
|
||||
|
||||
fn subscribe_origin() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(StatemintLocation::get())
|
||||
}
|
||||
|
||||
fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> {
|
||||
let origin = StatemintLocation::get();
|
||||
let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into();
|
||||
let ticket = MultiLocation { parents: 0, interior: Here };
|
||||
Ok((origin, ticket, assets))
|
||||
}
|
||||
|
||||
fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
|
||||
// Polkadot doesn't support asset locking
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn export_message_origin_and_destination(
|
||||
) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> {
|
||||
// Polkadot doesn't support exporting messages
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
|
||||
fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> {
|
||||
// The XCM executor of Polkadot doesn't have a configured `Aliasers`
|
||||
Err(BenchmarkError::Skip)
|
||||
}
|
||||
}
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
@@ -2292,7 +2370,11 @@ mod test_fees {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::collections::HashSet;
|
||||
|
||||
use super::*;
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
|
||||
#[test]
|
||||
fn call_size() {
|
||||
@@ -2303,6 +2385,43 @@ mod test {
|
||||
If the limit is too strong, maybe consider increase the limit",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac")
|
||||
);
|
||||
// Total issuance
|
||||
assert!(
|
||||
whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80")
|
||||
);
|
||||
// Execution phase
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a")
|
||||
);
|
||||
// Event count
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850")
|
||||
);
|
||||
// System events
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7")
|
||||
);
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(
|
||||
whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1")
|
||||
);
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(
|
||||
whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -61,3 +61,4 @@ pub mod runtime_parachains_inclusion;
|
||||
pub mod runtime_parachains_initializer;
|
||||
pub mod runtime_parachains_paras;
|
||||
pub mod runtime_parachains_paras_inherent;
|
||||
pub mod xcm;
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=polkadot-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
@@ -36,6 +35,10 @@
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm
|
||||
// --chain=polkadot-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/polkadot/src/weights/
|
||||
|
||||
@@ -56,10 +59,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -111,8 +110,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
@@ -120,7 +117,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Minimum execution time: 2_769_000 picoseconds.
|
||||
Weight::from_parts(3_001_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
@@ -132,10 +128,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -160,10 +152,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -234,10 +222,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -283,10 +267,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
mod pallet_xcm_benchmarks_fungible;
|
||||
mod pallet_xcm_benchmarks_generic;
|
||||
|
||||
use crate::Runtime;
|
||||
use frame_support::weights::Weight;
|
||||
use sp_std::prelude::*;
|
||||
use xcm::{latest::prelude::*, DoubleEncoded};
|
||||
|
||||
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmBalancesWeight;
|
||||
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||
|
||||
/// Types of asset supported by the Polkadot runtime.
|
||||
pub enum AssetTypes {
|
||||
/// An asset backed by `pallet-balances`.
|
||||
Balances,
|
||||
/// Unknown asset.
|
||||
Unknown,
|
||||
}
|
||||
|
||||
impl From<&MultiAsset> for AssetTypes {
|
||||
fn from(asset: &MultiAsset) -> Self {
|
||||
match asset {
|
||||
MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), .. } =>
|
||||
AssetTypes::Balances,
|
||||
_ => AssetTypes::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trait WeighMultiAssets {
|
||||
fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight;
|
||||
}
|
||||
|
||||
// Polkadot only knows about one asset, the balances pallet.
|
||||
const MAX_ASSETS: u64 = 1;
|
||||
|
||||
impl WeighMultiAssets for MultiAssetFilter {
|
||||
fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight {
|
||||
match self {
|
||||
Self::Definite(assets) => assets
|
||||
.inner()
|
||||
.into_iter()
|
||||
.map(From::from)
|
||||
.map(|t| match t {
|
||||
AssetTypes::Balances => balances_weight,
|
||||
AssetTypes::Unknown => Weight::MAX,
|
||||
})
|
||||
.fold(Weight::zero(), |acc, x| acc.saturating_add(x)),
|
||||
// We don't support any NFTs on Polkadot, so these two variants will always match
|
||||
// only 1 kind of fungible asset.
|
||||
Self::Wild(AllOf { .. } | AllOfCounted { .. }) => balances_weight,
|
||||
Self::Wild(AllCounted(count)) =>
|
||||
balances_weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
|
||||
Self::Wild(All) => balances_weight.saturating_mul(MAX_ASSETS),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WeighMultiAssets for MultiAssets {
|
||||
fn weigh_multi_assets(&self, balances_weight: Weight) -> Weight {
|
||||
self.inner()
|
||||
.into_iter()
|
||||
.map(|m| <AssetTypes as From<&MultiAsset>>::from(m))
|
||||
.map(|t| match t {
|
||||
AssetTypes::Balances => balances_weight,
|
||||
AssetTypes::Unknown => Weight::MAX,
|
||||
})
|
||||
.fold(Weight::zero(), |acc, x| acc.saturating_add(x))
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PolkadotXcmWeight<RuntimeCall>(core::marker::PhantomData<RuntimeCall>);
|
||||
impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for PolkadotXcmWeight<RuntimeCall> {
|
||||
fn withdraw_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
fn reserve_asset_deposited(assets: &MultiAssets) -> Weight {
|
||||
// Polkadot doesn't support ReserveAssetDeposited, so this benchmark has a default weight
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::receive_teleported_asset())
|
||||
}
|
||||
fn query_response(
|
||||
_query_id: &u64,
|
||||
_response: &Response,
|
||||
_max_weight: &Weight,
|
||||
_querier: &Option<MultiLocation>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_response()
|
||||
}
|
||||
fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::transfer_asset())
|
||||
}
|
||||
fn transfer_reserve_asset(
|
||||
assets: &MultiAssets,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::transfer_reserve_asset())
|
||||
}
|
||||
fn transact(
|
||||
_origin_kind: &OriginKind,
|
||||
_require_weight_at_most: &Weight,
|
||||
_call: &DoubleEncoded<RuntimeCall>,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::transact()
|
||||
}
|
||||
fn hrmp_new_channel_open_request(
|
||||
_sender: &u32,
|
||||
_max_message_size: &u32,
|
||||
_max_capacity: &u32,
|
||||
) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn hrmp_channel_accepted(_recipient: &u32) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight {
|
||||
// XCM Executor does not currently support HRMP channel operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn clear_origin() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_origin()
|
||||
}
|
||||
fn descend_origin(_who: &InteriorMultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::descend_origin()
|
||||
}
|
||||
fn report_error(_query_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_error()
|
||||
}
|
||||
|
||||
fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::deposit_asset())
|
||||
}
|
||||
fn deposit_reserve_asset(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::deposit_reserve_asset())
|
||||
}
|
||||
fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight {
|
||||
// Polkadot does not currently support exchange asset operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn initiate_reserve_withdraw(
|
||||
assets: &MultiAssetFilter,
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
_dest: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_teleport())
|
||||
}
|
||||
fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_holding()
|
||||
}
|
||||
fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight {
|
||||
XcmGeneric::<Runtime>::buy_execution()
|
||||
}
|
||||
fn refund_surplus() -> Weight {
|
||||
XcmGeneric::<Runtime>::refund_surplus()
|
||||
}
|
||||
fn set_error_handler(_xcm: &Xcm<RuntimeCall>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_error_handler()
|
||||
}
|
||||
fn set_appendix(_xcm: &Xcm<RuntimeCall>) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_appendix()
|
||||
}
|
||||
fn clear_error() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_error()
|
||||
}
|
||||
fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight {
|
||||
XcmGeneric::<Runtime>::claim_asset()
|
||||
}
|
||||
fn trap(_code: &u64) -> Weight {
|
||||
XcmGeneric::<Runtime>::trap()
|
||||
}
|
||||
fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight {
|
||||
XcmGeneric::<Runtime>::subscribe_version()
|
||||
}
|
||||
fn unsubscribe_version() -> Weight {
|
||||
XcmGeneric::<Runtime>::unsubscribe_version()
|
||||
}
|
||||
fn burn_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::burn_asset())
|
||||
}
|
||||
fn expect_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::expect_asset())
|
||||
}
|
||||
fn expect_origin(_origin: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_origin()
|
||||
}
|
||||
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_error()
|
||||
}
|
||||
fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_transact_status()
|
||||
}
|
||||
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::query_pallet()
|
||||
}
|
||||
fn expect_pallet(
|
||||
_index: &u32,
|
||||
_name: &Vec<u8>,
|
||||
_module_name: &Vec<u8>,
|
||||
_crate_major: &u32,
|
||||
_min_crate_minor: &u32,
|
||||
) -> Weight {
|
||||
XcmGeneric::<Runtime>::expect_pallet()
|
||||
}
|
||||
fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight {
|
||||
XcmGeneric::<Runtime>::report_transact_status()
|
||||
}
|
||||
fn clear_transact_status() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_transact_status()
|
||||
}
|
||||
fn universal_origin(_: &Junction) -> Weight {
|
||||
// Polkadot does not currently support universal origin operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight {
|
||||
// Polkadot relay should not support export message operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
// Polkadot does not currently support asset locking operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
// Polkadot does not currently support asset locking operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
// Polkadot does not currently support asset locking operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight {
|
||||
// Polkadot does not currently support asset locking operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn set_fees_mode(_: &bool) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_fees_mode()
|
||||
}
|
||||
fn set_topic(_topic: &[u8; 32]) -> Weight {
|
||||
XcmGeneric::<Runtime>::set_topic()
|
||||
}
|
||||
fn clear_topic() -> Weight {
|
||||
XcmGeneric::<Runtime>::clear_topic()
|
||||
}
|
||||
fn alias_origin(_: &MultiLocation) -> Weight {
|
||||
// XCM Executor does not currently support alias origin operations
|
||||
Weight::MAX
|
||||
}
|
||||
fn unpaid_execution(_: &WeightLimit, _: &Option<MultiLocation>) -> Weight {
|
||||
XcmGeneric::<Runtime>::unpaid_execution()
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_counted_has_a_sane_weight_upper_limit() {
|
||||
let assets = MultiAssetFilter::Wild(AllCounted(4294967295));
|
||||
let weight = Weight::from_parts(1000, 1000);
|
||||
|
||||
assert_eq!(assets.weigh_multi_assets(weight), weight * MAX_ASSETS);
|
||||
}
|
||||
+78
-53
@@ -17,27 +17,27 @@
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-06-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-e8ezs4ez-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-xerhrdyb-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --chain=polkadot-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/pallet_xcm_benchmarks_fungible.rs
|
||||
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
|
||||
// --output=./runtime/polkadot/src/weights/xcm/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -49,35 +49,33 @@ use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo<T> {
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn withdraw_asset() -> Weight {
|
||||
pub(crate) fn withdraw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 24_725_000 picoseconds.
|
||||
Weight::from_parts(25_253_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Minimum execution time: 24_801_000 picoseconds.
|
||||
Weight::from_parts(25_567_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn transfer_asset() -> Weight {
|
||||
pub(crate) fn transfer_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 53_699_000 picoseconds.
|
||||
Weight::from_parts(54_162_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Minimum execution time: 53_090_000 picoseconds.
|
||||
Weight::from_parts(54_157_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
@@ -90,46 +88,75 @@ impl<T: frame_system::Config> pallet_xcm_benchmarks::fungible::WeightInfo for We
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn transfer_reserve_asset() -> Weight {
|
||||
pub(crate) fn transfer_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `312`
|
||||
// Measured: `628`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 79_408_000 picoseconds.
|
||||
Weight::from_parts(81_430_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Minimum execution time: 80_084_000 picoseconds.
|
||||
Weight::from_parts(81_110_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
|
||||
pub(crate) fn reserve_asset_deposited() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_000_000_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000_000_000, 0)
|
||||
}
|
||||
/// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `527`
|
||||
// Estimated: `3992`
|
||||
// Minimum execution time: 32_535_000 picoseconds.
|
||||
Weight::from_parts(33_276_000, 3992)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:1)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
fn receive_teleported_asset() -> Weight {
|
||||
pub(crate) fn receive_teleported_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_619_000 picoseconds.
|
||||
Weight::from_parts(24_055_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Minimum execution time: 24_283_000 picoseconds.
|
||||
Weight::from_parts(25_042_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn deposit_asset() -> Weight {
|
||||
pub(crate) fn deposit_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_405_000 picoseconds.
|
||||
Weight::from_parts(26_700_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Minimum execution time: 25_002_000 picoseconds.
|
||||
Weight::from_parts(25_816_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
@@ -142,22 +169,21 @@ impl<T: frame_system::Config> pallet_xcm_benchmarks::fungible::WeightInfo for We
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn deposit_reserve_asset() -> Weight {
|
||||
pub(crate) fn deposit_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 55_304_000 picoseconds.
|
||||
Weight::from_parts(56_324_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
// Measured: `527`
|
||||
// Estimated: `3992`
|
||||
// Minimum execution time: 55_355_000 picoseconds.
|
||||
Weight::from_parts(56_410_000, 3992)
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:1)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
@@ -170,14 +196,13 @@ impl<T: frame_system::Config> pallet_xcm_benchmarks::fungible::WeightInfo for We
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn initiate_teleport() -> Weight {
|
||||
pub(crate) fn initiate_teleport() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `211`
|
||||
// Estimated: `3676`
|
||||
// Minimum execution time: 57_377_000 picoseconds.
|
||||
Weight::from_parts(58_420_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3676))
|
||||
// Measured: `527`
|
||||
// Estimated: `3992`
|
||||
// Minimum execution time: 57_258_000 picoseconds.
|
||||
Weight::from_parts(58_205_000, 3992)
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-04-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --chain=polkadot-dev
|
||||
// --header=./file_header.txt
|
||||
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
|
||||
// --output=./runtime/polkadot/src/weights/xcm/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::generic`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn report_holding() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `17934`
|
||||
// Minimum execution time: 33_813_000 picoseconds.
|
||||
Weight::from_parts(34_357_000, 17934)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
pub fn buy_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_067_000 picoseconds.
|
||||
Weight::from_parts(3_153_000, 0)
|
||||
}
|
||||
// Storage: XcmPallet Queries (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn query_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 12_236_000 picoseconds.
|
||||
Weight::from_parts(12_725_000, 3634)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
pub fn transact() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 13_193_000 picoseconds.
|
||||
Weight::from_parts(13_427_000, 0)
|
||||
}
|
||||
pub fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_393_000 picoseconds.
|
||||
Weight::from_parts(3_464_000, 0)
|
||||
}
|
||||
pub fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_955_000 picoseconds.
|
||||
Weight::from_parts(3_068_000, 0)
|
||||
}
|
||||
pub fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_004_000 picoseconds.
|
||||
Weight::from_parts(3_107_000, 0)
|
||||
}
|
||||
pub fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_981_000 picoseconds.
|
||||
Weight::from_parts(3_039_000, 0)
|
||||
}
|
||||
pub fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_814_000 picoseconds.
|
||||
Weight::from_parts(3_897_000, 0)
|
||||
}
|
||||
pub fn clear_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_921_000 picoseconds.
|
||||
Weight::from_parts(3_010_000, 0)
|
||||
}
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn report_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `17934`
|
||||
// Minimum execution time: 28_324_000 picoseconds.
|
||||
Weight::from_parts(28_690_000, 17934)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: XcmPallet AssetTraps (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn claim_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `226`
|
||||
// Estimated: `3691`
|
||||
// Minimum execution time: 16_430_000 picoseconds.
|
||||
Weight::from_parts(16_774_000, 3691)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
pub fn trap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_916_000 picoseconds.
|
||||
Weight::from_parts(3_035_000, 0)
|
||||
}
|
||||
// Storage: XcmPallet VersionNotifyTargets (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn subscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `21913`
|
||||
// Minimum execution time: 35_915_000 picoseconds.
|
||||
Weight::from_parts(36_519_000, 21913)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: XcmPallet VersionNotifyTargets (r:0 w:1)
|
||||
// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn unsubscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 5_344_000 picoseconds.
|
||||
Weight::from_parts(5_487_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
pub fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_684_000 picoseconds.
|
||||
Weight::from_parts(4_801_000, 0)
|
||||
}
|
||||
pub fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_228_000 picoseconds.
|
||||
Weight::from_parts(3_325_000, 0)
|
||||
}
|
||||
pub fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_059_000 picoseconds.
|
||||
Weight::from_parts(3_153_000, 0)
|
||||
}
|
||||
pub fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_037_000 picoseconds.
|
||||
Weight::from_parts(3_128_000, 0)
|
||||
}
|
||||
pub fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_287_000 picoseconds.
|
||||
Weight::from_parts(3_360_000, 0)
|
||||
}
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn query_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `17934`
|
||||
// Minimum execution time: 35_467_000 picoseconds.
|
||||
Weight::from_parts(36_011_000, 17934)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
pub fn expect_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_630_000 picoseconds.
|
||||
Weight::from_parts(8_870_000, 0)
|
||||
}
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub fn report_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `514`
|
||||
// Estimated: `17934`
|
||||
// Minimum execution time: 28_630_000 picoseconds.
|
||||
Weight::from_parts(29_085_000, 17934)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
pub fn clear_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_997_000 picoseconds.
|
||||
Weight::from_parts(3_096_000, 0)
|
||||
}
|
||||
pub fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_984_000 picoseconds.
|
||||
Weight::from_parts(3_059_000, 0)
|
||||
}
|
||||
pub fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_969_000 picoseconds.
|
||||
Weight::from_parts(3_006_000, 0)
|
||||
}
|
||||
pub fn set_fees_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_045_000 picoseconds.
|
||||
Weight::from_parts(3_087_000, 0)
|
||||
}
|
||||
pub fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_141_000 picoseconds.
|
||||
Weight::from_parts(3_251_000, 0)
|
||||
}
|
||||
}
|
||||
@@ -42,9 +42,9 @@ use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality,
|
||||
ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter,
|
||||
FixedWeightBounds, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
||||
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
|
||||
WithComputedOrigin,
|
||||
WeightInfoBounds, WithComputedOrigin,
|
||||
};
|
||||
use xcm_executor::traits::WithOriginFilter;
|
||||
|
||||
@@ -109,9 +109,6 @@ type LocalOriginConverter = (
|
||||
parameter_types! {
|
||||
/// The amount of weight an XCM operation takes. This is a safe overestimate.
|
||||
pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 1024);
|
||||
/// A temporary weight value for each XCM instruction.
|
||||
/// NOTE: This should be removed after we account for PoV weights.
|
||||
pub const TempFixedXcmWeight: Weight = Weight::from_parts(1_000_000_000, 0);
|
||||
/// Maximum number of instructions in a single XCM fragment. A sanity check against weight
|
||||
/// calculations getting too crazy.
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
@@ -134,7 +131,8 @@ pub type XcmRouter = (
|
||||
|
||||
parameter_types! {
|
||||
pub const Dot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) });
|
||||
pub const DotForStatemint: (MultiAssetFilter, MultiLocation) = (Dot::get(), Parachain(STATEMINT_ID).into_location());
|
||||
pub const StatemintLocation: MultiLocation = Parachain(STATEMINT_ID).into_location();
|
||||
pub const DotForStatemint: (MultiAssetFilter, MultiLocation) = (Dot::get(), StatemintLocation::get());
|
||||
pub const CollectivesLocation: MultiLocation = Parachain(COLLECTIVES_ID).into_location();
|
||||
pub const DotForCollectives: (MultiAssetFilter, MultiLocation) = (Dot::get(), CollectivesLocation::get());
|
||||
pub const MaxAssetsIntoHolding: u32 = 64;
|
||||
@@ -326,7 +324,11 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = TrustedTeleporters;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = FixedWeightBounds<TempFixedXcmWeight, RuntimeCall, MaxInstructions>;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::PolkadotXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
// The weight trader piggybacks on the existing transaction-fee conversion logic.
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, TokenLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
||||
@@ -407,7 +409,11 @@ impl pallet_xcm::Config for Runtime {
|
||||
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything; // == Allow All
|
||||
type XcmReserveTransferFilter = Everything; // == Allow All
|
||||
type Weigher = FixedWeightBounds<BaseXcmWeight, RuntimeCall, MaxInstructions>;
|
||||
type Weigher = WeightInfoBounds<
|
||||
crate::weights::xcm::PolkadotXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
|
||||
@@ -2086,12 +2086,13 @@ sp_api::impl_runtime_apis! {
|
||||
Vec<frame_benchmarking::BenchmarkBatch>,
|
||||
sp_runtime::RuntimeString,
|
||||
> {
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError};
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_config::{
|
||||
LocalCheckAccount, LocationConverter, Statemine, TokenLocation, XcmConfig,
|
||||
LocalCheckAccount, LocationConverter, Rockmine, TokenLocation, XcmConfig,
|
||||
};
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
@@ -2100,7 +2101,7 @@ sp_api::impl_runtime_apis! {
|
||||
type XcmConfig = XcmConfig;
|
||||
type AccountIdConverter = LocationConverter;
|
||||
fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(Statemine::get())
|
||||
Ok(Rockmine::get())
|
||||
}
|
||||
fn worst_case_holding(_depositable_count: u32) -> MultiAssets {
|
||||
// Rococo only knows about ROC
|
||||
@@ -2113,13 +2114,10 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
parameter_types! {
|
||||
pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some((
|
||||
Statemine::get(),
|
||||
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) },
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some((
|
||||
Statemine::get(),
|
||||
Rockmine::get(),
|
||||
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) },
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
|
||||
@@ -2127,6 +2125,7 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
type CheckedAccount = LocalCheckAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
MultiAsset {
|
||||
@@ -2154,15 +2153,15 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
|
||||
fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> {
|
||||
Ok((Statemine::get(), frame_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
Ok((Rockmine::get(), frame_system::Call::remark_with_event { remark: vec![] }.into()))
|
||||
}
|
||||
|
||||
fn subscribe_origin() -> Result<MultiLocation, BenchmarkError> {
|
||||
Ok(Statemine::get())
|
||||
Ok(Rockmine::get())
|
||||
}
|
||||
|
||||
fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> {
|
||||
let origin = Statemine::get();
|
||||
let origin = Rockmine::get();
|
||||
let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into();
|
||||
let ticket = MultiLocation { parents: 0, interior: Here };
|
||||
Ok((origin, ticket, assets))
|
||||
@@ -2185,20 +2184,9 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
|
||||
// Total Issuance
|
||||
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
|
||||
// Execution Phase
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
|
||||
// Event Count
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
|
||||
// System Events
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
||||
// Treasury Account
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
||||
];
|
||||
let mut whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
let treasury_key = frame_system::Account::<Runtime>::hashed_key_for(Treasury::account_id());
|
||||
whitelist.push(treasury_key.to_vec().into());
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
@@ -2210,6 +2198,52 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::collections::HashSet;
|
||||
|
||||
use super::*;
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac")
|
||||
);
|
||||
// Total issuance
|
||||
assert!(
|
||||
whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80")
|
||||
);
|
||||
// Execution phase
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a")
|
||||
);
|
||||
// Event count
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850")
|
||||
);
|
||||
// System events
|
||||
assert!(
|
||||
whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7")
|
||||
);
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(
|
||||
whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1")
|
||||
);
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(
|
||||
whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod encoding_tests {
|
||||
use super::*;
|
||||
|
||||
@@ -23,16 +23,18 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=rococo-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_xcm
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm
|
||||
// --chain=rococo-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/rococo/src/weights/
|
||||
|
||||
@@ -53,10 +55,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -106,8 +104,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
@@ -115,7 +111,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Minimum execution time: 3_163_000 picoseconds.
|
||||
Weight::from_parts(3_298_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
@@ -127,10 +122,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -155,10 +146,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -229,10 +216,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -278,10 +261,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
|
||||
@@ -91,6 +91,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for RococoXcmWeight<RuntimeCall> {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
fn reserve_asset_deposited(assets: &MultiAssets) -> Weight {
|
||||
// Rococo doesn't support ReserveAssetDeposited, so this benchmark has a default weight
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
@@ -166,7 +167,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for RococoXcmWeight<RuntimeCall> {
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
|
||||
@@ -17,96 +17,163 @@
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-03-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
//! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-gghbxkbs-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// --chain=rococo-dev
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --chain=rococo-dev
|
||||
// --header=./file_header.txt
|
||||
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
|
||||
// --output=./runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
|
||||
// --output=./runtime/rococo/src/weights/xcm/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::fungible`.
|
||||
/// Weight functions for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn withdraw_asset() -> Weight {
|
||||
Weight::from_parts(20_385_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 24_892_000 picoseconds.
|
||||
Weight::from_parts(25_219_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn transfer_asset() -> Weight {
|
||||
Weight::from_parts(32_756_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 52_112_000 picoseconds.
|
||||
Weight::from_parts(53_104_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn transfer_reserve_asset() -> Weight {
|
||||
Weight::from_parts(50_645_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `210`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 76_459_000 picoseconds.
|
||||
Weight::from_parts(79_152_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Storage: `Benchmark::Override` (r:0 w:0)
|
||||
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn reserve_asset_deposited() -> Weight {
|
||||
Weight::from_parts(2_000_000_000_000 as u64, 0)
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_000_000_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000_000_000, 0)
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3574`
|
||||
// Minimum execution time: 29_734_000 picoseconds.
|
||||
Weight::from_parts(30_651_000, 3574)
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn receive_teleported_asset() -> Weight {
|
||||
Weight::from_parts(19_595_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_028_000 picoseconds.
|
||||
Weight::from_parts(23_687_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn deposit_asset() -> Weight {
|
||||
Weight::from_parts(21_763_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_399_000 picoseconds.
|
||||
Weight::from_parts(27_262_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn deposit_reserve_asset() -> Weight {
|
||||
Weight::from_parts(40_930_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 52_015_000 picoseconds.
|
||||
Weight::from_parts(53_498_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_teleport() -> Weight {
|
||||
Weight::from_parts(40_788_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `109`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 53_833_000 picoseconds.
|
||||
Weight::from_parts(55_688_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --steps=50
|
||||
@@ -221,31 +221,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
|
||||
Weight::from_parts(5_128_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Configuration ActiveConfig (r:1 w:0)
|
||||
/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `565`
|
||||
// Estimated: `4030`
|
||||
// Minimum execution time: 35_068_000 picoseconds.
|
||||
Weight::from_parts(36_124_000, 4030)
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
pub(crate) fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
|
||||
@@ -107,7 +107,7 @@ pub type XcmRouter = WithUniqueTopic<(
|
||||
|
||||
parameter_types! {
|
||||
pub const Roc: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) });
|
||||
pub const Statemine: MultiLocation = Parachain(1000).into_location();
|
||||
pub const Rockmine: MultiLocation = Parachain(1000).into_location();
|
||||
pub const Contracts: MultiLocation = Parachain(1002).into_location();
|
||||
pub const Encointer: MultiLocation = Parachain(1003).into_location();
|
||||
pub const Tick: MultiLocation = Parachain(100).into_location();
|
||||
@@ -116,7 +116,7 @@ parameter_types! {
|
||||
pub const RocForTick: (MultiAssetFilter, MultiLocation) = (Roc::get(), Tick::get());
|
||||
pub const RocForTrick: (MultiAssetFilter, MultiLocation) = (Roc::get(), Trick::get());
|
||||
pub const RocForTrack: (MultiAssetFilter, MultiLocation) = (Roc::get(), Track::get());
|
||||
pub const RocForStatemine: (MultiAssetFilter, MultiLocation) = (Roc::get(), Statemine::get());
|
||||
pub const RocForRockmine: (MultiAssetFilter, MultiLocation) = (Roc::get(), Rockmine::get());
|
||||
pub const RocForContracts: (MultiAssetFilter, MultiLocation) = (Roc::get(), Contracts::get());
|
||||
pub const RocForEncointer: (MultiAssetFilter, MultiLocation) = (Roc::get(), Encointer::get());
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
@@ -126,7 +126,7 @@ pub type TrustedTeleporters = (
|
||||
xcm_builder::Case<RocForTick>,
|
||||
xcm_builder::Case<RocForTrick>,
|
||||
xcm_builder::Case<RocForTrack>,
|
||||
xcm_builder::Case<RocForStatemine>,
|
||||
xcm_builder::Case<RocForRockmine>,
|
||||
xcm_builder::Case<RocForContracts>,
|
||||
xcm_builder::Case<RocForEncointer>,
|
||||
);
|
||||
|
||||
@@ -1836,6 +1836,7 @@ sp_api::impl_runtime_apis! {
|
||||
Vec<frame_benchmarking::BenchmarkBatch>,
|
||||
sp_runtime::RuntimeString,
|
||||
> {
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError};
|
||||
// Trying to add benchmarks directly to some pallets caused cyclic dependency issues.
|
||||
// To get around that, we separated the benchmarks into its own crate.
|
||||
@@ -1878,6 +1879,7 @@ sp_api::impl_runtime_apis! {
|
||||
Westmint::get(),
|
||||
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) },
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None;
|
||||
}
|
||||
|
||||
impl pallet_xcm_benchmarks::fungible::Config for Runtime {
|
||||
@@ -1885,6 +1887,7 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
type CheckedAccount = xcm_config::LocalCheckAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
MultiAsset {
|
||||
@@ -1946,28 +1949,7 @@ sp_api::impl_runtime_apis! {
|
||||
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(),
|
||||
// Total Issuance
|
||||
hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
|
||||
// Execution Phase
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
|
||||
// Event Count
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
|
||||
// System Events
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
||||
// Treasury Account
|
||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
||||
// Dmp DownwardMessageQueueHeads
|
||||
hex_literal::hex!("63f78c98723ddc9073523ef3beefda0c4d7fefc408aac59dbfe80a72ac8e3ce5").to_vec().into(),
|
||||
// Dmp DownwardMessageQueues
|
||||
hex_literal::hex!("63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57").to_vec().into(),
|
||||
// Configuration ActiveConfig
|
||||
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
||||
// The transactional storage limit.
|
||||
hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
|
||||
];
|
||||
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let params = (&config, &whitelist);
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
|
||||
//! Tests for the Westend Runtime Configuration
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use crate::*;
|
||||
use frame_support::traits::WhitelistedStorageKeys;
|
||||
use sp_core::hexdisplay::HexDisplay;
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
#[test]
|
||||
@@ -67,3 +71,28 @@ fn sanity_check_teleport_assets_weight() {
|
||||
|
||||
assert!((weight * 50).all_lt(BlockWeights::get().max_block));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_whitelist() {
|
||||
let whitelist: HashSet<String> = AllPalletsWithSystem::whitelisted_storage_keys()
|
||||
.iter()
|
||||
.map(|e| HexDisplay::from(&e.key).to_string())
|
||||
.collect();
|
||||
|
||||
// Block number
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac"));
|
||||
// Total issuance
|
||||
assert!(whitelist.contains("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80"));
|
||||
// Execution phase
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a"));
|
||||
// Event count
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850"));
|
||||
// System events
|
||||
assert!(whitelist.contains("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"));
|
||||
// Configuration ActiveConfig
|
||||
assert!(whitelist.contains("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"));
|
||||
// XcmPallet VersionDiscoveryQueue
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d194a222ba0333561192e474c59ed8e30e1"));
|
||||
// XcmPallet SafeXcmVersion
|
||||
assert!(whitelist.contains("1405f2411d0af5a7ff397e7c9dc68d196323ae84c43568be0d1394d5d0d522c4"));
|
||||
}
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=westend-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
@@ -36,6 +35,10 @@
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm
|
||||
// --chain=westend-dev
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
|
||||
@@ -56,10 +59,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -111,8 +110,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
fn force_default_xcm_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
@@ -120,7 +117,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Minimum execution time: 2_824_000 picoseconds.
|
||||
Weight::from_parts(2_935_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifiers (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifiers (max_values: None, max_size: None, mode: Measured)
|
||||
@@ -132,10 +128,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -160,10 +152,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -234,10 +222,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
@@ -283,10 +267,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=westend-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/pallet_xcm_benchmarks_fungible.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_benchmarks::fungible::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn withdraw_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 24_885_000 picoseconds.
|
||||
Weight::from_parts(25_316_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn transfer_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 51_715_000 picoseconds.
|
||||
Weight::from_parts(53_006_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:2 w:2)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn transfer_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `270`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 76_546_000 picoseconds.
|
||||
Weight::from_parts(78_742_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:1)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
fn receive_teleported_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_106_000 picoseconds.
|
||||
Weight::from_parts(23_848_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
fn deposit_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_306_000 picoseconds.
|
||||
Weight::from_parts(26_875_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn deposit_reserve_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 53_271_000 picoseconds.
|
||||
Weight::from_parts(54_820_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: System Account (r:1 w:1)
|
||||
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
|
||||
/// Storage: Balances InactiveIssuance (r:1 w:1)
|
||||
/// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn initiate_teleport() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 55_312_000 picoseconds.
|
||||
Weight::from_parts(56_390_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
}
|
||||
@@ -1,393 +0,0 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/production/polkadot
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=westend-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/pallet_xcm_benchmarks_generic.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_xcm_benchmarks::generic`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_benchmarks::generic::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_holding() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 32_591_000 picoseconds.
|
||||
Weight::from_parts(33_164_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn buy_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_080_000 picoseconds.
|
||||
Weight::from_parts(3_205_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: XcmPallet Queries (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet Queries (max_values: None, max_size: None, mode: Measured)
|
||||
fn query_response() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 11_799_000 picoseconds.
|
||||
Weight::from_parts(12_129_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
fn transact() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 12_576_000 picoseconds.
|
||||
Weight::from_parts(12_996_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_113_000 picoseconds.
|
||||
Weight::from_parts(3_197_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_872_000 picoseconds.
|
||||
Weight::from_parts(2_992_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_946_000 picoseconds.
|
||||
Weight::from_parts(3_044_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_818_000 picoseconds.
|
||||
Weight::from_parts(2_988_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_819_000 picoseconds.
|
||||
Weight::from_parts(3_944_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_880_000 picoseconds.
|
||||
Weight::from_parts(2_990_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 27_570_000 picoseconds.
|
||||
Weight::from_parts(28_178_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: XcmPallet AssetTraps (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet AssetTraps (max_values: None, max_size: None, mode: Measured)
|
||||
fn claim_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `226`
|
||||
// Estimated: `3691`
|
||||
// Minimum execution time: 16_109_000 picoseconds.
|
||||
Weight::from_parts(16_476_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3691))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
fn trap() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_871_000 picoseconds.
|
||||
Weight::from_parts(2_965_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifyTargets (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn subscribe_version() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 33_914_000 picoseconds.
|
||||
Weight::from_parts(34_693_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: XcmPallet VersionNotifyTargets (r:0 w:1)
|
||||
/// Proof Skipped: XcmPallet 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_940_000 picoseconds.
|
||||
Weight::from_parts(5_245_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 31_121_000 picoseconds.
|
||||
Weight::from_parts(32_053_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_527_000 picoseconds.
|
||||
Weight::from_parts(4_706_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_057_000 picoseconds.
|
||||
Weight::from_parts(3_137_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_977_000 picoseconds.
|
||||
Weight::from_parts(3_089_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_877_000 picoseconds.
|
||||
Weight::from_parts(3_031_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_155_000 picoseconds.
|
||||
Weight::from_parts(3_259_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn query_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 34_206_000 picoseconds.
|
||||
Weight::from_parts(34_798_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn expect_pallet() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_946_000 picoseconds.
|
||||
Weight::from_parts(8_154_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
fn report_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 27_990_000 picoseconds.
|
||||
Weight::from_parts(28_458_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3634))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
fn clear_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_899_000 picoseconds.
|
||||
Weight::from_parts(3_068_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_828_000 picoseconds.
|
||||
Weight::from_parts(2_900_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_879_000 picoseconds.
|
||||
Weight::from_parts(2_998_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn set_fees_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_849_000 picoseconds.
|
||||
Weight::from_parts(2_945_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_975_000 picoseconds.
|
||||
Weight::from_parts(3_104_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for WestendXcmWeight<RuntimeCall> {
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
fn reserve_asset_deposited(assets: &MultiAssets) -> Weight {
|
||||
// Westend doesn't support ReserveAssetDeposited, so this benchmark has a default weight
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
@@ -169,7 +170,7 @@ impl<RuntimeCall> XcmWeightInfo<RuntimeCall> for WestendXcmWeight<RuntimeCall> {
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
|
||||
assets.weigh_multi_assets(XcmBalancesWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
|
||||
@@ -17,93 +17,163 @@
|
||||
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-03-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||
//! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-gghbxkbs-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/production/polkadot
|
||||
// benchmark
|
||||
// --chain=westend-dev
|
||||
// pallet
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_benchmarks::fungible
|
||||
// --chain=westend-dev
|
||||
// --header=./file_header.txt
|
||||
// --template=./xcm/pallet-xcm-benchmarks/template.hbs
|
||||
// --output=./runtime/westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
|
||||
// --output=./runtime/westend/src/weights/xcm/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// Weights for `pallet_xcm_benchmarks::fungible`.
|
||||
/// Weight functions for `pallet_xcm_benchmarks::fungible`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo<T> {
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn withdraw_asset() -> Weight {
|
||||
Weight::from_parts(20_308_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 24_887_000 picoseconds.
|
||||
Weight::from_parts(25_361_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn transfer_asset() -> Weight {
|
||||
Weight::from_parts(32_193_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `101`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 52_408_000 picoseconds.
|
||||
Weight::from_parts(53_387_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
// Storage: System Account (r:2 w:2)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:2 w:2)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn transfer_reserve_asset() -> Weight {
|
||||
Weight::from_parts(50_731_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(7 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `177`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 74_753_000 picoseconds.
|
||||
Weight::from_parts(76_838_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
// Storage: Benchmark Override (r:0 w:0)
|
||||
/// Storage: `Benchmark::Override` (r:0 w:0)
|
||||
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn reserve_asset_deposited() -> Weight {
|
||||
Weight::from_parts(2_000_000_000_000 as u64, 0)
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 2_000_000_000_000 picoseconds.
|
||||
Weight::from_parts(2_000_000_000_000, 0)
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3541`
|
||||
// Minimum execution time: 29_272_000 picoseconds.
|
||||
Weight::from_parts(30_061_000, 3541)
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn receive_teleported_asset() -> Weight {
|
||||
Weight::from_parts(19_622_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `103`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 23_112_000 picoseconds.
|
||||
Weight::from_parts(23_705_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
pub(crate) fn deposit_asset() -> Weight {
|
||||
Weight::from_parts(22_433_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 26_077_000 picoseconds.
|
||||
Weight::from_parts(26_486_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn deposit_reserve_asset() -> Weight {
|
||||
Weight::from_parts(41_765_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 51_022_000 picoseconds.
|
||||
Weight::from_parts(52_498_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
|
||||
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
|
||||
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
pub(crate) fn initiate_teleport() -> Weight {
|
||||
Weight::from_parts(41_204_000 as u64, 0)
|
||||
.saturating_add(T::DbWeight::get().reads(6 as u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as u64))
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `76`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 53_062_000 picoseconds.
|
||||
Weight::from_parts(54_300_000, 3593)
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
|
||||
// --pallet=pallet_xcm_benchmarks::generic
|
||||
// --chain=westend-dev
|
||||
// --header=./file_header.txt
|
||||
@@ -215,29 +214,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
|
||||
Weight::from_parts(5_132_000, 0)
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Proof Skipped: unknown `0x3a696e747261626c6f636b5f656e74726f7079` (r:1 w:1)
|
||||
/// Storage: Dmp DeliveryFeeFactor (r:1 w:0)
|
||||
/// Proof Skipped: Dmp DeliveryFeeFactor (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SupportedVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
|
||||
/// Proof Skipped: XcmPallet VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
|
||||
/// Proof Skipped: XcmPallet SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueues (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueues (max_values: None, max_size: None, mode: Measured)
|
||||
/// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
|
||||
/// Proof Skipped: Dmp DownwardMessageQueueHeads (max_values: None, max_size: None, mode: Measured)
|
||||
pub(crate) fn initiate_reserve_withdraw() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `169`
|
||||
// Estimated: `3634`
|
||||
// Minimum execution time: 29_375_000 picoseconds.
|
||||
Weight::from_parts(30_320_000, 3634)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
pub(crate) fn burn_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
|
||||
@@ -21,7 +21,14 @@ transform_regex = [
|
||||
# single char `=` `>` `%` ..
|
||||
"^=|>|<|%$",
|
||||
# 22_100
|
||||
"^(?:[0-9]+_)+[0-9]+$"
|
||||
"^(?:[0-9]+_)+[0-9]+$",
|
||||
# V5, v5, P1.2, etc
|
||||
"[A-Za-z][0-9]",
|
||||
# ~50
|
||||
"~[0-9]+",
|
||||
"ABI",
|
||||
"bool",
|
||||
"sigil",
|
||||
]
|
||||
allow_concatenation = true
|
||||
allow_dashes = true
|
||||
|
||||
@@ -131,6 +131,38 @@ benchmarks_instance_pallet! {
|
||||
// TODO: Check sender queue is not empty. #4426
|
||||
}
|
||||
|
||||
reserve_asset_deposited {
|
||||
let (trusted_reserve, transferable_reserve_asset) = T::TrustedReserve::get()
|
||||
.ok_or(BenchmarkError::Override(
|
||||
BenchmarkResult::from_weight(T::BlockWeights::get().max_block)
|
||||
))?;
|
||||
|
||||
let assets: MultiAssets = vec![ transferable_reserve_asset ].into();
|
||||
|
||||
let mut executor = new_executor::<T>(trusted_reserve);
|
||||
let instruction = Instruction::ReserveAssetDeposited(assets.clone());
|
||||
let xcm = Xcm(vec![instruction]);
|
||||
}: {
|
||||
executor.bench_process(xcm)?;
|
||||
} verify {
|
||||
assert!(executor.holding().ensure_contains(&assets).is_ok());
|
||||
}
|
||||
|
||||
initiate_reserve_withdraw {
|
||||
let holding = T::worst_case_holding(1);
|
||||
let assets_filter = MultiAssetFilter::Definite(holding.clone());
|
||||
let reserve = T::valid_destination().map_err(|_| BenchmarkError::Skip)?;
|
||||
let mut executor = new_executor::<T>(Default::default());
|
||||
executor.set_holding(holding.into());
|
||||
let instruction = Instruction::InitiateReserveWithdraw { assets: assets_filter, reserve, xcm: Xcm(vec![]) };
|
||||
let xcm = Xcm(vec![instruction]);
|
||||
}: {
|
||||
executor.bench_process(xcm)?;
|
||||
} verify {
|
||||
// The execute completing successfully is as good as we can check.
|
||||
// TODO: Potentially add new trait to XcmSender to detect a queued outgoing message. #4426
|
||||
}
|
||||
|
||||
receive_teleported_asset {
|
||||
// If there is no trusted teleporter, then we skip this benchmark.
|
||||
let (trusted_teleporter, teleportable_asset) = T::TrustedTeleporter::get()
|
||||
|
||||
@@ -132,7 +132,7 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type XcmSender = DevNull;
|
||||
type AssetTransactor = AssetTransactor;
|
||||
type OriginConverter = ();
|
||||
type IsReserve = ();
|
||||
type IsReserve = TrustedReserves;
|
||||
type IsTeleporter = TrustedTeleporters;
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type Barrier = AllowUnpaidExecutionFrom<Everything>;
|
||||
@@ -171,7 +171,8 @@ impl crate::Config for Test {
|
||||
}
|
||||
}
|
||||
|
||||
pub type TrustedTeleporters = (xcm_builder::Case<TeleportConcreteFungible>,);
|
||||
pub type TrustedTeleporters = xcm_builder::Case<TeleportConcreteFungible>;
|
||||
pub type TrustedReserves = xcm_builder::Case<ReserveConcreteFungible>;
|
||||
|
||||
parameter_types! {
|
||||
pub const CheckingAccount: Option<(u64, MintLocation)> = Some((100, MintLocation::Local));
|
||||
@@ -180,6 +181,10 @@ parameter_types! {
|
||||
ChildTeleporter::get(),
|
||||
MultiAsset { id: Concrete(Here.into_location()), fun: Fungible(100) },
|
||||
));
|
||||
pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = Some((
|
||||
ChildTeleporter::get(),
|
||||
MultiAsset { id: Concrete(Here.into_location()), fun: Fungible(100) },
|
||||
));
|
||||
pub const TeleportConcreteFungible: (MultiAssetFilter, MultiLocation) =
|
||||
(Wild(AllOf { fun: WildFungible, id: Concrete(Here.into_location()) }), ChildTeleporter::get());
|
||||
pub const ReserveConcreteFungible: (MultiAssetFilter, MultiLocation) =
|
||||
@@ -190,6 +195,7 @@ impl xcm_balances_benchmark::Config for Test {
|
||||
type TransactAsset = Balances;
|
||||
type CheckedAccount = CheckingAccount;
|
||||
type TrustedTeleporter = TrustedTeleporter;
|
||||
type TrustedReserve = TrustedReserve;
|
||||
|
||||
fn get_multi_asset() -> MultiAsset {
|
||||
let amount =
|
||||
|
||||
@@ -39,6 +39,10 @@ pub mod pallet {
|
||||
/// A trusted location which we allow teleports from, and the asset we allow to teleport.
|
||||
type TrustedTeleporter: Get<Option<(xcm::latest::MultiLocation, xcm::latest::MultiAsset)>>;
|
||||
|
||||
/// A trusted location where reserve assets are stored, and the asset we allow to be
|
||||
/// reserves.
|
||||
type TrustedReserve: Get<Option<(xcm::latest::MultiLocation, xcm::latest::MultiAsset)>>;
|
||||
|
||||
/// Give me a fungible asset that your asset transactor is going to accept.
|
||||
fn get_multi_asset() -> xcm::latest::MultiAsset;
|
||||
}
|
||||
|
||||
@@ -281,21 +281,6 @@ benchmarks! {
|
||||
assert!(!<T::XcmConfig as xcm_executor::Config>::SubscriptionService::is_subscribed(&origin));
|
||||
}
|
||||
|
||||
initiate_reserve_withdraw {
|
||||
let holding = T::worst_case_holding(1);
|
||||
let assets_filter = MultiAssetFilter::Definite(holding.clone());
|
||||
let reserve = T::valid_destination().map_err(|_| BenchmarkError::Skip)?;
|
||||
let mut executor = new_executor::<T>(Default::default());
|
||||
executor.set_holding(holding.into());
|
||||
let instruction = Instruction::InitiateReserveWithdraw { assets: assets_filter, reserve, xcm: Xcm(vec![]) };
|
||||
let xcm = Xcm(vec![instruction]);
|
||||
}: {
|
||||
executor.bench_process(xcm)?;
|
||||
} verify {
|
||||
// The execute completing successfully is as good as we can check.
|
||||
// TODO: Potentially add new trait to XcmSender to detect a queued outgoing message. #4426
|
||||
}
|
||||
|
||||
burn_asset {
|
||||
let holding = T::worst_case_holding(0);
|
||||
let assets = holding.clone();
|
||||
|
||||
@@ -521,6 +521,7 @@ pub mod pallet {
|
||||
/// Default version to encode XCM when latest version of destination is unknown. If `None`,
|
||||
/// then the destinations whose XCM version is unknown are considered unreachable.
|
||||
#[pallet::storage]
|
||||
#[pallet::whitelist_storage]
|
||||
pub(super) type SafeXcmVersion<T: Config> = StorageValue<_, XcmVersion, OptionQuery>;
|
||||
|
||||
/// The Latest versions that we know various locations support.
|
||||
@@ -571,6 +572,7 @@ pub mod pallet {
|
||||
/// the `u32` counter is the number of times that a send to the destination has been attempted,
|
||||
/// which is used as a prioritization.
|
||||
#[pallet::storage]
|
||||
#[pallet::whitelist_storage]
|
||||
pub(super) type VersionDiscoveryQueue<T: Config> = StorageValue<
|
||||
_,
|
||||
BoundedVec<(VersionedMultiLocation, u32), VersionDiscoveryQueueSize<T>>,
|
||||
|
||||
@@ -337,12 +337,12 @@ impl TryFrom<OldWeightLimit> for WeightLimit {
|
||||
/// Contextual data pertaining to a specific list of XCM instructions.
|
||||
#[derive(Clone, Eq, PartialEq, Encode, Decode, Debug)]
|
||||
pub struct XcmContext {
|
||||
/// The current value of the Origin register of the XCVM.
|
||||
/// The current value of the Origin register of the `XCVM`.
|
||||
pub origin: Option<MultiLocation>,
|
||||
/// The identity of the XCM; this may be a hash of its versioned encoding but could also be
|
||||
/// a high-level identity set by an appropriate barrier.
|
||||
pub message_id: XcmHash,
|
||||
/// The current value of the Topic register of the XCVM.
|
||||
/// The current value of the Topic register of the `XCVM`.
|
||||
pub topic: Option<[u8; 32]>,
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ pub struct MultiAsset {
|
||||
/// The overall asset identity (aka *class*, in the case of a non-fungible).
|
||||
pub id: AssetId,
|
||||
/// The fungibility of the asset, which contains either the amount (in the case of a fungible
|
||||
/// asset) or the *insance ID`, the secondary asset identifier.
|
||||
/// asset) or the *instance ID`, the secondary asset identifier.
|
||||
pub fun: Fungibility,
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ pub type SendResult<T> = result::Result<(T, MultiAssets), SendError>;
|
||||
/// # }
|
||||
/// ```
|
||||
pub trait SendXcm {
|
||||
/// Intermediate value which connects the two phaases of the send operation.
|
||||
/// Intermediate value which connects the two phases of the send operation.
|
||||
type Ticket;
|
||||
|
||||
/// Check whether the given `_message` is deliverable to the given `_destination` and if so
|
||||
|
||||
@@ -255,7 +255,7 @@ where
|
||||
|
||||
/// Allows execution from any origin that is contained in `T` (i.e. `T::Contains(origin)`).
|
||||
///
|
||||
/// Use only for executions from completely trusted origins, from which no unpermissioned messages
|
||||
/// Use only for executions from completely trusted origins, from which no permissionless messages
|
||||
/// can be sent.
|
||||
pub struct AllowUnpaidExecutionFrom<T>(PhantomData<T>);
|
||||
impl<T: Contains<MultiLocation>> ShouldExecute for AllowUnpaidExecutionFrom<T> {
|
||||
|
||||
@@ -192,7 +192,7 @@ impl LegacyDescribeForeignChainAccount {
|
||||
}
|
||||
}
|
||||
|
||||
/// This is deprecated in favour of the more modular `HashedDescription` converter. If
|
||||
/// This is deprecated in favor of the more modular `HashedDescription` converter. If
|
||||
/// your chain has previously used this, then you can retain backwards compatibility using
|
||||
/// `HashedDescription` and a tuple with `LegacyDescribeForeignChainAccount` as the first
|
||||
/// element. For example:
|
||||
@@ -235,12 +235,12 @@ impl LegacyDescribeForeignChainAccount {
|
||||
/// same plane. So, it is important which chain account A acts from.
|
||||
/// E.g.
|
||||
/// * From P1.2 A will act as
|
||||
/// * hash(ParaPrefix, A, 1, 1) on P1.2
|
||||
/// * hash(ParaPrefix, A, 1, 0) on P1
|
||||
/// * hash(`ParaPrefix`, A, 1, 1) on P1.2
|
||||
/// * hash(`ParaPrefix`, A, 1, 0) on P1
|
||||
/// * From P1 A will act as
|
||||
/// * hash(RelayPrefix, A, 1) on P1.2 & P1.1
|
||||
/// * hash(ParaPrefix, A, 1, 1) on P2
|
||||
/// * hash(ParaPrefix, A, 1, 0) on R
|
||||
/// * hash(`RelayPrefix`, A, 1) on P1.2 & P1.1
|
||||
/// * hash(`ParaPrefix`, A, 1, 1) on P2
|
||||
/// * hash(`ParaPrefix`, A, 1, 0) on R
|
||||
///
|
||||
/// Note that the alias accounts have overlaps but never on the same
|
||||
/// chain when the sender comes from different chains.
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Implementation for ContainsPair<MultiLocation, MultiLocation>.
|
||||
//! Implementation for `ContainsPair<MultiLocation, MultiLocation>`.
|
||||
|
||||
use frame_support::traits::{Contains, ContainsPair};
|
||||
use sp_std::marker::PhantomData;
|
||||
use xcm::latest::prelude::*;
|
||||
|
||||
/// Alias a Foreign AccountId32 with a local AccountId32 if the Foreign AccountId32 matches the `Prefix` pattern.
|
||||
/// Alias a Foreign `AccountId32` with a local `AccountId32` if the foreign `AccountId32` matches the `Prefix` pattern.
|
||||
///
|
||||
/// Requires that the prefixed origin AccountId32 matches the target AccountId32.
|
||||
/// Requires that the prefixed origin `AccountId32` matches the target `AccountId32`.
|
||||
pub struct AliasForeignAccountId32<Prefix>(PhantomData<Prefix>);
|
||||
impl<Prefix: Contains<MultiLocation>> ContainsPair<MultiLocation, MultiLocation>
|
||||
for AliasForeignAccountId32<Prefix>
|
||||
|
||||
@@ -151,10 +151,10 @@ impl<
|
||||
}
|
||||
}
|
||||
|
||||
/// Specialization of the [PayOverXcm] trait to allow `[u8; 32]`-based `AccountId` values to be
|
||||
/// Specialization of the [`PayOverXcm`] trait to allow `[u8; 32]`-based `AccountId` values to be
|
||||
/// paid on a remote chain.
|
||||
///
|
||||
/// Implementation of the [frame_support::traits::tokens::Pay] trait, to allow
|
||||
/// Implementation of the [`frame_support::traits::tokens::Pay`] trait, to allow
|
||||
/// for XCM payments of a given `Balance` of `AssetKind` existing on a `DestinationChain` under
|
||||
/// ownership of some `Interior` location of the local chain to a particular `Beneficiary`.
|
||||
///
|
||||
@@ -184,7 +184,7 @@ pub type PayAccountId32OnChainOverXcm<
|
||||
FixedLocation<DestinationChain>,
|
||||
>;
|
||||
|
||||
/// Simple struct which contains both an XCM `location` and `asset_id` to identift an asset which
|
||||
/// Simple struct which contains both an XCM `location` and `asset_id` to identify an asset which
|
||||
/// exists on some chain.
|
||||
pub struct LocatableAssetId {
|
||||
/// The asset's ID.
|
||||
@@ -193,7 +193,7 @@ pub struct LocatableAssetId {
|
||||
pub location: MultiLocation,
|
||||
}
|
||||
|
||||
/// Adapter `struct` which implements a conversion from any `AssetKind` into a [LocatableAsset]
|
||||
/// Adapter `struct` which implements a conversion from any `AssetKind` into a [`LocatableAsset`]
|
||||
/// value using a fixed `Location` for the `location` field.
|
||||
pub struct FixedLocation<Location>(sp_std::marker::PhantomData<Location>);
|
||||
impl<Location: Get<MultiLocation>, AssetKind: Into<AssetId>> Convert<AssetKind, LocatableAssetId>
|
||||
|
||||
@@ -26,7 +26,7 @@ use sp_std::{fmt::Debug, marker::PhantomData};
|
||||
use sp_weights::{Weight, WeightMeter};
|
||||
use xcm::prelude::*;
|
||||
|
||||
/// A message processor that delegates execution to an [XcmExecutor].
|
||||
/// A message processor that delegates execution to an [`XcmExecutor`].
|
||||
pub struct ProcessXcmMessage<MessageOrigin, XcmExecutor, Call>(
|
||||
PhantomData<(MessageOrigin, XcmExecutor, Call)>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user