Revert execute_blob and send_blob (#4266)

Revert "pallet-xcm: Deprecate `execute` and `send` in favor of
`execute_blob` and `send_blob` (#3749)"

This reverts commit feee773d15.

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Javier Bullrich <javier@bullrich.dev>
This commit is contained in:
Francisco Aguirre
2024-04-24 17:49:33 +02:00
committed by GitHub
parent d29c3636fa
commit 4f3d43a0c4
36 changed files with 602 additions and 1047 deletions
+2 -7
View File
@@ -167,16 +167,11 @@ 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_blob(
let _ = <pallet_xcm::Pallet<Runtime>>::send(
RawOrigin::Root.into(),
Box::new(VersionedLocation::V4(destination)),
encoded_versioned_xcm,
Box::new(VersionedXcm::V4(program)),
)?;
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-03-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-02-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-h2rr8wx7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-bn-ce5rx-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024
// Executed Command:
@@ -60,26 +60,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `147`
// Estimated: `3612`
// Minimum execution time: 24_535_000 picoseconds.
Weight::from_parts(25_618_000, 0)
.saturating_add(Weight::from_parts(0, 3612))
.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: `147`
// Estimated: `3612`
// Minimum execution time: 25_376_000 picoseconds.
Weight::from_parts(26_180_000, 0)
// Minimum execution time: 25_725_000 picoseconds.
Weight::from_parts(26_174_000, 0)
.saturating_add(Weight::from_parts(0, 3612))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
@@ -98,8 +80,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `250`
// Estimated: `6196`
// Minimum execution time: 108_786_000 picoseconds.
Weight::from_parts(112_208_000, 0)
// Minimum execution time: 113_140_000 picoseconds.
Weight::from_parts(116_204_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
@@ -118,8 +100,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `302`
// Estimated: `6196`
// Minimum execution time: 105_190_000 picoseconds.
Weight::from_parts(107_140_000, 0)
// Minimum execution time: 108_571_000 picoseconds.
Weight::from_parts(110_650_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
@@ -138,8 +120,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `250`
// Estimated: `6196`
// Minimum execution time: 109_027_000 picoseconds.
Weight::from_parts(111_404_000, 0)
// Minimum execution time: 111_836_000 picoseconds.
Weight::from_parts(114_435_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
@@ -154,24 +136,14 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn execute_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_668_000 picoseconds.
Weight::from_parts(7_013_000, 0)
// Minimum execution time: 7_160_000 picoseconds.
Weight::from_parts(7_477_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -179,8 +151,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_740_000 picoseconds.
Weight::from_parts(1_884_000, 0)
// Minimum execution time: 1_934_000 picoseconds.
Weight::from_parts(2_053_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
@@ -201,8 +173,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `147`
// Estimated: `3612`
// Minimum execution time: 30_200_000 picoseconds.
Weight::from_parts(30_768_000, 0)
// Minimum execution time: 31_123_000 picoseconds.
Weight::from_parts(31_798_000, 0)
.saturating_add(Weight::from_parts(0, 3612))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
@@ -223,8 +195,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `327`
// Estimated: `3792`
// Minimum execution time: 33_928_000 picoseconds.
Weight::from_parts(35_551_000, 0)
// Minimum execution time: 35_175_000 picoseconds.
Weight::from_parts(36_098_000, 0)
.saturating_add(Weight::from_parts(0, 3792))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
@@ -235,8 +207,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_759_000 picoseconds.
Weight::from_parts(1_880_000, 0)
// Minimum execution time: 1_974_000 picoseconds.
Weight::from_parts(2_096_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -246,8 +218,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_507_000 picoseconds.
Weight::from_parts(17_219_000, 0)
// Minimum execution time: 16_626_000 picoseconds.
Weight::from_parts(17_170_000, 0)
.saturating_add(Weight::from_parts(0, 13387))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -258,8 +230,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_633_000 picoseconds.
Weight::from_parts(16_889_000, 0)
// Minimum execution time: 16_937_000 picoseconds.
Weight::from_parts(17_447_000, 0)
.saturating_add(Weight::from_parts(0, 13391))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -270,8 +242,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `15880`
// Minimum execution time: 19_297_000 picoseconds.
Weight::from_parts(19_820_000, 0)
// Minimum execution time: 19_157_000 picoseconds.
Weight::from_parts(19_659_000, 0)
.saturating_add(Weight::from_parts(0, 15880))
.saturating_add(T::DbWeight::get().reads(6))
}
@@ -289,8 +261,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `183`
// Estimated: `6123`
// Minimum execution time: 30_364_000 picoseconds.
Weight::from_parts(31_122_000, 0)
// Minimum execution time: 30_699_000 picoseconds.
Weight::from_parts(31_537_000, 0)
.saturating_add(Weight::from_parts(0, 6123))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
@@ -301,8 +273,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `69`
// Estimated: `10959`
// Minimum execution time: 11_997_000 picoseconds.
Weight::from_parts(12_392_000, 0)
// Minimum execution time: 12_303_000 picoseconds.
Weight::from_parts(12_670_000, 0)
.saturating_add(Weight::from_parts(0, 10959))
.saturating_add(T::DbWeight::get().reads(4))
}
@@ -312,8 +284,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_894_000 picoseconds.
Weight::from_parts(17_452_000, 0)
// Minimum execution time: 17_129_000 picoseconds.
Weight::from_parts(17_668_000, 0)
.saturating_add(Weight::from_parts(0, 13398))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -332,8 +304,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `183`
// Estimated: `13548`
// Minimum execution time: 39_864_000 picoseconds.
Weight::from_parts(40_859_000, 0)
// Minimum execution time: 39_960_000 picoseconds.
Weight::from_parts(41_068_000, 0)
.saturating_add(Weight::from_parts(0, 13548))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
@@ -346,8 +318,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_363_000 picoseconds.
Weight::from_parts(2_519_000, 0)
// Minimum execution time: 2_333_000 picoseconds.
Weight::from_parts(2_504_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
@@ -358,8 +330,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_409_000 picoseconds.
Weight::from_parts(22_776_000, 0)
// Minimum execution time: 22_932_000 picoseconds.
Weight::from_parts(23_307_000, 0)
.saturating_add(Weight::from_parts(0, 11041))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -370,8 +342,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `3488`
// Minimum execution time: 33_551_000 picoseconds.
Weight::from_parts(34_127_000, 0)
// Minimum execution time: 34_558_000 picoseconds.
Weight::from_parts(35_299_000, 0)
.saturating_add(Weight::from_parts(0, 3488))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))