Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contracts: Add XCM traits to interface with contracts #2086

Merged
merged 45 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
582467d
Contracts: Add XCM traits to interface with contracts
pgherveou Oct 30, 2023
79535cb
Update polkadot/xcm/xcm-executor/src/traits/controller.rs
pgherveou Oct 30, 2023
0a02451
Update doc
pgherveou Oct 30, 2023
18c6bb4
Use outcome in controller
pgherveou Oct 31, 2023
198d692
add docstring
pgherveou Oct 31, 2023
e3ce2e0
Event consistency
pgherveou Oct 31, 2023
6342962
Add more docs
pgherveou Oct 31, 2023
a2fde63
Update polkadot/xcm/xcm-executor/src/traits/controller.rs
pgherveou Oct 31, 2023
0ae8763
fix doc
pgherveou Oct 31, 2023
034150c
fix CI
pgherveou Oct 31, 2023
7848e2f
move to xcm-builder
pgherveou Nov 1, 2023
b7155b6
move to pallet-xcm
pgherveou Nov 1, 2023
34329e5
Update doc links
pgherveou Nov 1, 2023
07439dd
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 1, 2023
b37d169
wip
pgherveou Nov 1, 2023
8ac21da
Bench compile fix
pgherveou Nov 1, 2023
7ee5d08
add missing use
pgherveou Nov 2, 2023
f3cbdc4
fix test
pgherveou Nov 2, 2023
f3bd197
fix lint
pgherveou Nov 2, 2023
de8500f
Add prdoc
pgherveou Nov 2, 2023
9536755
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 2, 2023
abb196b
Move to xcm_builder
pgherveou Nov 6, 2023
df789aa
missing trait doc
pgherveou Nov 6, 2023
2c01af3
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 6, 2023
2fd1928
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 6, 2023
fd958af
Update polkadot/xcm/xcm-builder/src/controller.rs
pgherveou Nov 7, 2023
2517c73
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 7, 2023
65d3bf9
fix build
pgherveou Nov 7, 2023
9a29e87
zepter fix
pgherveou Nov 7, 2023
94055be
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 7, 2023
18aacb3
".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtim…
Nov 7, 2023
af5dd47
remove temp weightinfo impl
pgherveou Nov 7, 2023
56a5449
Merge branch 'master' into pg/xcm_contracts_update
pgherveou Nov 7, 2023
49e45d8
Revert "remove temp weightinfo impl"
pgherveou Nov 7, 2023
7ee9145
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 7, 2023
02a3f4c
Add benchmark
pgherveou Nov 8, 2023
9f48c00
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 9, 2023
de42120
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Nov 9, 2023
eb4a904
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 10, 2023
fc09597
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Nov 10, 2023
443aff6
update weights
pgherveou Nov 10, 2023
0c308db
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Nov 10, 2023
2029223
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Nov 10, 2023
639c64f
westend weights
pgherveou Nov 10, 2023
105d9f5
remove default weights
pgherveou Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-polkadot-dev")`, DB CACHE: 1024
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-polkadot-dev")`, DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=asset-hub-polkadot-dev
// --wasm-execution=compiled
// --pallet=pallet_xcm
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_xcm
// --chain=asset-hub-polkadot-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -49,6 +48,8 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand All @@ -63,10 +64,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `75`
// Estimated: `3540`
// Minimum execution time: 28_284_000 picoseconds.
Weight::from_parts(29_186_000, 0)
// Minimum execution time: 25_203_000 picoseconds.
Weight::from_parts(25_927_000, 0)
.saturating_add(Weight::from_parts(0, 3540))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
Expand All @@ -75,8 +76,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1489`
// Minimum execution time: 24_830_000 picoseconds.
Weight::from_parts(26_312_000, 0)
// Minimum execution time: 20_113_000 picoseconds.
Weight::from_parts(20_439_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1))
}
Expand All @@ -86,8 +87,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1489`
// Minimum execution time: 18_584_000 picoseconds.
Weight::from_parts(19_083_000, 0)
// Minimum execution time: 14_959_000 picoseconds.
Weight::from_parts(15_264_000, 0)
.saturating_add(Weight::from_parts(0, 1489))
.saturating_add(T::DbWeight::get().reads(1))
}
Expand All @@ -107,8 +108,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_415_000 picoseconds.
Weight::from_parts(9_821_000, 0)
// Minimum execution time: 7_399_000 picoseconds.
Weight::from_parts(7_674_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
Expand All @@ -118,15 +119,17 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_902_000 picoseconds.
Weight::from_parts(3_377_000, 0)
// Minimum execution time: 2_388_000 picoseconds.
Weight::from_parts(2_522_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand All @@ -143,14 +146,16 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `75`
// Estimated: `3540`
// Minimum execution time: 32_730_000 picoseconds.
Weight::from_parts(33_879_000, 0)
// Minimum execution time: 28_791_000 picoseconds.
Weight::from_parts(29_443_000, 0)
.saturating_add(Weight::from_parts(0, 3540))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand All @@ -165,12 +170,12 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `257`
// Estimated: `3722`
// Minimum execution time: 34_053_000 picoseconds.
Weight::from_parts(34_506_000, 0)
.saturating_add(Weight::from_parts(0, 3722))
.saturating_add(T::DbWeight::get().reads(6))
// Measured: `292`
// Estimated: `3757`
// Minimum execution time: 30_880_000 picoseconds.
Weight::from_parts(31_675_000, 0)
.saturating_add(Weight::from_parts(0, 3757))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1)
Expand All @@ -179,8 +184,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_824_000 picoseconds.
Weight::from_parts(2_986_000, 0)
// Minimum execution time: 2_365_000 picoseconds.
Weight::from_parts(2_550_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
Expand All @@ -190,8 +195,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `129`
// Estimated: `11019`
// Minimum execution time: 17_011_000 picoseconds.
Weight::from_parts(17_488_000, 0)
// Minimum execution time: 17_185_000 picoseconds.
Weight::from_parts(17_680_000, 0)
.saturating_add(Weight::from_parts(0, 11019))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -202,8 +207,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `133`
// Estimated: `11023`
// Minimum execution time: 17_191_000 picoseconds.
Weight::from_parts(17_784_000, 0)
// Minimum execution time: 16_974_000 picoseconds.
Weight::from_parts(17_660_000, 0)
.saturating_add(Weight::from_parts(0, 11023))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
Expand All @@ -214,13 +219,15 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `13505`
// Minimum execution time: 18_625_000 picoseconds.
Weight::from_parts(19_177_000, 0)
// Minimum execution time: 18_536_000 picoseconds.
Weight::from_parts(19_292_000, 0)
.saturating_add(Weight::from_parts(0, 13505))
.saturating_add(T::DbWeight::get().reads(5))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand All @@ -235,10 +242,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `6082`
// Minimum execution time: 30_762_000 picoseconds.
Weight::from_parts(31_481_000, 0)
// Minimum execution time: 27_368_000 picoseconds.
Weight::from_parts(28_161_000, 0)
.saturating_add(Weight::from_parts(0, 6082))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:3 w:0)
Expand All @@ -247,8 +254,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `172`
// Estimated: `8587`
// Minimum execution time: 9_025_000 picoseconds.
Weight::from_parts(9_423_000, 0)
// Minimum execution time: 9_553_000 picoseconds.
Weight::from_parts(9_899_000, 0)
.saturating_add(Weight::from_parts(0, 8587))
.saturating_add(T::DbWeight::get().reads(3))
}
Expand All @@ -258,14 +265,16 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `140`
// Estimated: `11030`
// Minimum execution time: 17_550_000 picoseconds.
Weight::from_parts(17_939_000, 0)
// Minimum execution time: 17_445_000 picoseconds.
Weight::from_parts(18_206_000, 0)
.saturating_add(Weight::from_parts(0, 11030))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:2)
/// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
Expand All @@ -280,10 +289,36 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `146`
// Estimated: `11036`
// Minimum execution time: 36_922_000 picoseconds.
Weight::from_parts(37_709_000, 0)
// Minimum execution time: 34_200_000 picoseconds.
Weight::from_parts(35_198_000, 0)
.saturating_add(Weight::from_parts(0, 11036))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1)
/// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::Queries` (r:0 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn new_query() -> Weight {
// Proof Size summary in bytes:
// Measured: `69`
// Estimated: `1554`
// Minimum execution time: 4_679_000 picoseconds.
Weight::from_parts(4_841_000, 0)
.saturating_add(Weight::from_parts(0, 1554))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PolkadotXcm::Queries` (r:1 w:1)
/// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn take_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `7706`
// Estimated: `11171`
// Minimum execution time: 27_281_000 picoseconds.
Weight::from_parts(27_694_000, 0)
.saturating_add(Weight::from_parts(0, 11171))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
Loading