mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 16:51:03 +00:00
pallet-xcm: Deprecate execute and send in favor of execute_blob and send_blob (#3749)
`execute` and `send` try to decode the xcm in the parameters before reaching the filter line. The new extrinsics decode only after the filter line. These should be used instead of the old ones. ## TODO - [x] Tests - [x] Generate weights - [x] Deprecation issue -> https://github.com/paritytech/polkadot-sdk/issues/3771 - [x] PRDoc - [x] Handle error in pallet-contracts This would make writing XCMs in PJS Apps more difficult, but here's the fix for that: https://github.com/polkadot-js/apps/pull/10350. Already deployed! https://polkadot.js.org/apps/#/utilities/xcm Supersedes https://github.com/paritytech/polkadot-sdk/pull/1798/ --------- Co-authored-by: PG Herveou <pgherveou@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
committed by
GitHub
parent
66051adb61
commit
feee773d15
@@ -167,11 +167,16 @@ where
|
||||
},
|
||||
]);
|
||||
|
||||
let encoded_versioned_xcm =
|
||||
VersionedXcm::V4(program).encode().try_into().map_err(|error| {
|
||||
log::error!(target: "runtime::on_reap_identity", "XCM too large, error: {:?}", error);
|
||||
pallet_xcm::Error::<Runtime>::XcmTooLarge
|
||||
})?;
|
||||
// send
|
||||
let _ = <pallet_xcm::Pallet<Runtime>>::send(
|
||||
let _ = <pallet_xcm::Pallet<Runtime>>::send_blob(
|
||||
RawOrigin::Root.into(),
|
||||
Box::new(VersionedLocation::V4(destination)),
|
||||
Box::new(VersionedXcm::V4(program)),
|
||||
encoded_versioned_xcm,
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//! Autogenerated weights for `pallet_xcm`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2024-02-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2024-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! HOSTNAME: `runner-h2rr8wx7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -60,8 +60,26 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `180`
|
||||
// Estimated: `3645`
|
||||
// Minimum execution time: 25_043_000 picoseconds.
|
||||
Weight::from_parts(25_682_000, 0)
|
||||
// Minimum execution time: 24_724_000 picoseconds.
|
||||
Weight::from_parts(25_615_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3645))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// 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`)
|
||||
fn send_blob() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `180`
|
||||
// Estimated: `3645`
|
||||
// Minimum execution time: 24_709_000 picoseconds.
|
||||
Weight::from_parts(25_326_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3645))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -80,8 +98,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `180`
|
||||
// Estimated: `3645`
|
||||
// Minimum execution time: 107_570_000 picoseconds.
|
||||
Weight::from_parts(109_878_000, 0)
|
||||
// Minimum execution time: 106_600_000 picoseconds.
|
||||
Weight::from_parts(110_781_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3645))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -100,8 +118,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `232`
|
||||
// Estimated: `3697`
|
||||
// Minimum execution time: 106_341_000 picoseconds.
|
||||
Weight::from_parts(109_135_000, 0)
|
||||
// Minimum execution time: 103_030_000 picoseconds.
|
||||
Weight::from_parts(106_018_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3697))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -120,8 +138,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `180`
|
||||
// Estimated: `3645`
|
||||
// Minimum execution time: 108_372_000 picoseconds.
|
||||
Weight::from_parts(112_890_000, 0)
|
||||
// Minimum execution time: 107_017_000 picoseconds.
|
||||
Weight::from_parts(109_214_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3645))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -130,8 +148,16 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_957_000 picoseconds.
|
||||
Weight::from_parts(7_417_000, 0)
|
||||
// Minimum execution time: 6_864_000 picoseconds.
|
||||
Weight::from_parts(7_135_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn execute_blob() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_955_000 picoseconds.
|
||||
Weight::from_parts(7_165_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
|
||||
@@ -140,8 +166,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_053_000 picoseconds.
|
||||
Weight::from_parts(7_462_000, 0)
|
||||
// Minimum execution time: 6_827_000 picoseconds.
|
||||
Weight::from_parts(7_211_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -149,8 +175,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_918_000 picoseconds.
|
||||
Weight::from_parts(2_037_000, 0)
|
||||
// Minimum execution time: 1_788_000 picoseconds.
|
||||
Weight::from_parts(2_021_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
|
||||
@@ -171,8 +197,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `180`
|
||||
// Estimated: `3645`
|
||||
// Minimum execution time: 30_417_000 picoseconds.
|
||||
Weight::from_parts(31_191_000, 0)
|
||||
// Minimum execution time: 30_627_000 picoseconds.
|
||||
Weight::from_parts(31_350_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3645))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
@@ -193,8 +219,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `360`
|
||||
// Estimated: `3825`
|
||||
// Minimum execution time: 36_666_000 picoseconds.
|
||||
Weight::from_parts(37_779_000, 0)
|
||||
// Minimum execution time: 36_688_000 picoseconds.
|
||||
Weight::from_parts(37_345_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3825))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
@@ -205,8 +231,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_869_000 picoseconds.
|
||||
Weight::from_parts(2_003_000, 0)
|
||||
// Minimum execution time: 1_829_000 picoseconds.
|
||||
Weight::from_parts(1_986_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
@@ -216,8 +242,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `22`
|
||||
// Estimated: `13387`
|
||||
// Minimum execution time: 16_188_000 picoseconds.
|
||||
Weight::from_parts(16_435_000, 0)
|
||||
// Minimum execution time: 16_104_000 picoseconds.
|
||||
Weight::from_parts(16_464_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13387))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -228,8 +254,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `26`
|
||||
// Estimated: `13391`
|
||||
// Minimum execution time: 16_431_000 picoseconds.
|
||||
Weight::from_parts(16_935_000, 0)
|
||||
// Minimum execution time: 16_267_000 picoseconds.
|
||||
Weight::from_parts(16_675_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13391))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -240,8 +266,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `40`
|
||||
// Estimated: `15880`
|
||||
// Minimum execution time: 18_460_000 picoseconds.
|
||||
Weight::from_parts(18_885_000, 0)
|
||||
// Minimum execution time: 18_487_000 picoseconds.
|
||||
Weight::from_parts(19_102_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 15880))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
}
|
||||
@@ -259,8 +285,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `216`
|
||||
// Estimated: `6156`
|
||||
// Minimum execution time: 29_623_000 picoseconds.
|
||||
Weight::from_parts(30_661_000, 0)
|
||||
// Minimum execution time: 29_603_000 picoseconds.
|
||||
Weight::from_parts(31_002_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6156))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -271,8 +297,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `69`
|
||||
// Estimated: `10959`
|
||||
// Minimum execution time: 12_043_000 picoseconds.
|
||||
Weight::from_parts(12_360_000, 0)
|
||||
// Minimum execution time: 12_183_000 picoseconds.
|
||||
Weight::from_parts(12_587_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 10959))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
}
|
||||
@@ -282,8 +308,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `33`
|
||||
// Estimated: `13398`
|
||||
// Minimum execution time: 16_511_000 picoseconds.
|
||||
Weight::from_parts(17_011_000, 0)
|
||||
// Minimum execution time: 16_372_000 picoseconds.
|
||||
Weight::from_parts(16_967_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13398))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -302,8 +328,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `216`
|
||||
// Estimated: `13581`
|
||||
// Minimum execution time: 39_041_000 picoseconds.
|
||||
Weight::from_parts(39_883_000, 0)
|
||||
// Minimum execution time: 38_904_000 picoseconds.
|
||||
Weight::from_parts(39_983_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 13581))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
@@ -316,8 +342,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `1485`
|
||||
// Minimum execution time: 2_030_000 picoseconds.
|
||||
Weight::from_parts(2_150_000, 0)
|
||||
// Minimum execution time: 2_067_000 picoseconds.
|
||||
Weight::from_parts(2_195_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1485))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -328,8 +354,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `7576`
|
||||
// Estimated: `11041`
|
||||
// Minimum execution time: 22_615_000 picoseconds.
|
||||
Weight::from_parts(23_008_000, 0)
|
||||
// Minimum execution time: 23_982_000 picoseconds.
|
||||
Weight::from_parts(24_409_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11041))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
@@ -340,8 +366,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `23`
|
||||
// Estimated: `3488`
|
||||
// Minimum execution time: 34_438_000 picoseconds.
|
||||
Weight::from_parts(35_514_000, 0)
|
||||
// Minimum execution time: 33_430_000 picoseconds.
|
||||
Weight::from_parts(34_433_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3488))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
|
||||
Reference in New Issue
Block a user