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

Commit 9299364

Browse files
authored
XCM: Implement a blocking barrier (#7098)
* Move XCM matcher to xcm-builder * Use ProcessMessageError as the error type in MatchXcm and ShouldExecute * Implement a blocking barrier * Fixes * Add benchmarking for force_suspension * ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm * ".git/.scripts/commands/bench/bench.sh" runtime kusama 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 --------- Co-authored-by: command-bot <>
1 parent 32a52ef commit 9299364

File tree

18 files changed

+644
-444
lines changed

18 files changed

+644
-444
lines changed

runtime/kusama/src/weights/pallet_xcm.rs

Lines changed: 60 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,28 @@
1313

1414
// You should have received a copy of the GNU General Public License
1515
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
16+
1617
//! Autogenerated weights for `pallet_xcm`
1718
//!
1819
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
19-
//! DATE: 2023-03-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20+
//! DATE: 2023-04-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
2021
//! WORST CASE MAP SIZE: `1000000`
21-
//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
22+
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
2223
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
2324
2425
// Executed Command:
25-
// ./target/production/polkadot
26+
// target/production/polkadot
2627
// benchmark
2728
// pallet
28-
// --chain=kusama-dev
2929
// --steps=50
3030
// --repeat=20
31-
// --pallet=pallet_xcm
3231
// --extrinsic=*
3332
// --execution=wasm
3433
// --wasm-execution=compiled
34+
// --heap-pages=4096
35+
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
36+
// --pallet=pallet_xcm
37+
// --chain=kusama-dev
3538
// --header=./file_header.txt
3639
// --output=./runtime/kusama/src/weights/
3740

@@ -40,7 +43,7 @@
4043
#![allow(unused_imports)]
4144

4245
use frame_support::{traits::Get, weights::Weight};
43-
use sp_std::marker::PhantomData;
46+
use core::marker::PhantomData;
4447

4548
/// Weight functions for `pallet_xcm`.
4649
pub struct WeightInfo<T>(PhantomData<T>);
@@ -58,35 +61,35 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
5861
fn send() -> Weight {
5962
// Proof Size summary in bytes:
6063
// Measured: `211`
61-
// Estimated: `14420`
62-
// Minimum execution time: 32_211_000 picoseconds.
63-
Weight::from_parts(32_864_000, 0)
64-
.saturating_add(Weight::from_parts(0, 14420))
64+
// Estimated: `3676`
65+
// Minimum execution time: 32_058_000 picoseconds.
66+
Weight::from_parts(32_630_000, 0)
67+
.saturating_add(Weight::from_parts(0, 3676))
6568
.saturating_add(T::DbWeight::get().reads(5))
6669
.saturating_add(T::DbWeight::get().writes(3))
6770
}
6871
fn teleport_assets() -> Weight {
6972
// Proof Size summary in bytes:
7073
// Measured: `0`
7174
// Estimated: `0`
72-
// Minimum execution time: 21_186_000 picoseconds.
73-
Weight::from_parts(21_501_000, 0)
75+
// Minimum execution time: 21_569_000 picoseconds.
76+
Weight::from_parts(21_969_000, 0)
7477
.saturating_add(Weight::from_parts(0, 0))
7578
}
7679
fn reserve_transfer_assets() -> Weight {
7780
// Proof Size summary in bytes:
7881
// Measured: `0`
7982
// Estimated: `0`
80-
// Minimum execution time: 20_009_000 picoseconds.
81-
Weight::from_parts(20_431_000, 0)
83+
// Minimum execution time: 20_667_000 picoseconds.
84+
Weight::from_parts(21_006_000, 0)
8285
.saturating_add(Weight::from_parts(0, 0))
8386
}
8487
fn execute() -> Weight {
8588
// Proof Size summary in bytes:
8689
// Measured: `0`
8790
// Estimated: `0`
88-
// Minimum execution time: 10_031_000 picoseconds.
89-
Weight::from_parts(10_350_000, 0)
91+
// Minimum execution time: 9_993_000 picoseconds.
92+
Weight::from_parts(10_278_000, 0)
9093
.saturating_add(Weight::from_parts(0, 0))
9194
}
9295
/// Storage: XcmPallet SupportedVersion (r:0 w:1)
@@ -95,8 +98,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
9598
// Proof Size summary in bytes:
9699
// Measured: `0`
97100
// Estimated: `0`
98-
// Minimum execution time: 10_202_000 picoseconds.
99-
Weight::from_parts(10_401_000, 0)
101+
// Minimum execution time: 10_234_000 picoseconds.
102+
Weight::from_parts(10_498_000, 0)
100103
.saturating_add(Weight::from_parts(0, 0))
101104
.saturating_add(T::DbWeight::get().writes(1))
102105
}
@@ -106,8 +109,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
106109
// Proof Size summary in bytes:
107110
// Measured: `0`
108111
// Estimated: `0`
109-
// Minimum execution time: 3_042_000 picoseconds.
110-
Weight::from_parts(3_161_000, 0)
112+
// Minimum execution time: 3_272_000 picoseconds.
113+
Weight::from_parts(3_469_000, 0)
111114
.saturating_add(Weight::from_parts(0, 0))
112115
.saturating_add(T::DbWeight::get().writes(1))
113116
}
@@ -130,10 +133,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
130133
fn force_subscribe_version_notify() -> Weight {
131134
// Proof Size summary in bytes:
132135
// Measured: `211`
133-
// Estimated: `20003`
134-
// Minimum execution time: 37_152_000 picoseconds.
135-
Weight::from_parts(37_637_000, 0)
136-
.saturating_add(Weight::from_parts(0, 20003))
136+
// Estimated: `3676`
137+
// Minimum execution time: 36_157_000 picoseconds.
138+
Weight::from_parts(36_777_000, 0)
139+
.saturating_add(Weight::from_parts(0, 3676))
137140
.saturating_add(T::DbWeight::get().reads(7))
138141
.saturating_add(T::DbWeight::get().writes(6))
139142
}
@@ -154,21 +157,32 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
154157
fn force_unsubscribe_version_notify() -> Weight {
155158
// Proof Size summary in bytes:
156159
// Measured: `483`
157-
// Estimated: `20211`
158-
// Minimum execution time: 40_068_000 picoseconds.
159-
Weight::from_parts(40_408_000, 0)
160-
.saturating_add(Weight::from_parts(0, 20211))
160+
// Estimated: `3948`
161+
// Minimum execution time: 39_613_000 picoseconds.
162+
Weight::from_parts(39_905_000, 0)
163+
.saturating_add(Weight::from_parts(0, 3948))
161164
.saturating_add(T::DbWeight::get().reads(6))
162165
.saturating_add(T::DbWeight::get().writes(5))
163166
}
167+
/// Storage: XcmPallet XcmExecutionSuspended (r:0 w:1)
168+
/// Proof Skipped: XcmPallet XcmExecutionSuspended (max_values: Some(1), max_size: None, mode: Measured)
169+
fn force_suspension() -> Weight {
170+
// Proof Size summary in bytes:
171+
// Measured: `0`
172+
// Estimated: `0`
173+
// Minimum execution time: 3_296_000 picoseconds.
174+
Weight::from_parts(3_485_000, 0)
175+
.saturating_add(Weight::from_parts(0, 0))
176+
.saturating_add(T::DbWeight::get().writes(1))
177+
}
164178
/// Storage: XcmPallet SupportedVersion (r:4 w:2)
165179
/// Proof Skipped: XcmPallet SupportedVersion (max_values: None, max_size: None, mode: Measured)
166180
fn migrate_supported_version() -> Weight {
167181
// Proof Size summary in bytes:
168182
// Measured: `229`
169183
// Estimated: `11119`
170-
// Minimum execution time: 16_679_000 picoseconds.
171-
Weight::from_parts(17_372_000, 0)
184+
// Minimum execution time: 16_201_000 picoseconds.
185+
Weight::from_parts(16_681_000, 0)
172186
.saturating_add(Weight::from_parts(0, 11119))
173187
.saturating_add(T::DbWeight::get().reads(4))
174188
.saturating_add(T::DbWeight::get().writes(2))
@@ -179,8 +193,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
179193
// Proof Size summary in bytes:
180194
// Measured: `233`
181195
// Estimated: `11123`
182-
// Minimum execution time: 17_113_000 picoseconds.
183-
Weight::from_parts(17_539_000, 0)
196+
// Minimum execution time: 16_157_000 picoseconds.
197+
Weight::from_parts(16_674_000, 0)
184198
.saturating_add(Weight::from_parts(0, 11123))
185199
.saturating_add(T::DbWeight::get().reads(4))
186200
.saturating_add(T::DbWeight::get().writes(2))
@@ -191,8 +205,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
191205
// Proof Size summary in bytes:
192206
// Measured: `243`
193207
// Estimated: `13608`
194-
// Minimum execution time: 17_831_000 picoseconds.
195-
Weight::from_parts(18_222_000, 0)
208+
// Minimum execution time: 17_502_000 picoseconds.
209+
Weight::from_parts(18_000_000, 0)
196210
.saturating_add(Weight::from_parts(0, 13608))
197211
.saturating_add(T::DbWeight::get().reads(5))
198212
}
@@ -211,10 +225,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
211225
fn notify_current_targets() -> Weight {
212226
// Proof Size summary in bytes:
213227
// Measured: `281`
214-
// Estimated: `20991`
215-
// Minimum execution time: 34_239_000 picoseconds.
216-
Weight::from_parts(34_714_000, 0)
217-
.saturating_add(Weight::from_parts(0, 20991))
228+
// Estimated: `6221`
229+
// Minimum execution time: 33_198_000 picoseconds.
230+
Weight::from_parts(33_742_000, 0)
231+
.saturating_add(Weight::from_parts(0, 6221))
218232
.saturating_add(T::DbWeight::get().reads(7))
219233
.saturating_add(T::DbWeight::get().writes(4))
220234
}
@@ -224,8 +238,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
224238
// Proof Size summary in bytes:
225239
// Measured: `272`
226240
// Estimated: `8687`
227-
// Minimum execution time: 9_813_000 picoseconds.
228-
Weight::from_parts(10_050_000, 0)
241+
// Minimum execution time: 8_989_000 picoseconds.
242+
Weight::from_parts(9_241_000, 0)
229243
.saturating_add(Weight::from_parts(0, 8687))
230244
.saturating_add(T::DbWeight::get().reads(3))
231245
}
@@ -235,8 +249,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
235249
// Proof Size summary in bytes:
236250
// Measured: `240`
237251
// Estimated: `11130`
238-
// Minimum execution time: 17_449_000 picoseconds.
239-
Weight::from_parts(17_898_000, 0)
252+
// Minimum execution time: 16_709_000 picoseconds.
253+
Weight::from_parts(17_237_000, 0)
240254
.saturating_add(Weight::from_parts(0, 11130))
241255
.saturating_add(T::DbWeight::get().reads(4))
242256
.saturating_add(T::DbWeight::get().writes(2))
@@ -256,10 +270,10 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
256270
fn migrate_and_notify_old_targets() -> Weight {
257271
// Proof Size summary in bytes:
258272
// Measured: `285`
259-
// Estimated: `25965`
260-
// Minimum execution time: 41_651_000 picoseconds.
261-
Weight::from_parts(42_184_000, 0)
262-
.saturating_add(Weight::from_parts(0, 25965))
273+
// Estimated: `11175`
274+
// Minimum execution time: 40_749_000 picoseconds.
275+
Weight::from_parts(41_154_000, 0)
276+
.saturating_add(Weight::from_parts(0, 11175))
263277
.saturating_add(T::DbWeight::get().reads(9))
264278
.saturating_add(T::DbWeight::get().writes(5))
265279
}

0 commit comments

Comments
 (0)