mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Ensure xcm versions over bridge (on sending chains) (#2481)
## Summary This pull request proposes a solution for improved control of the versioned XCM flow over the bridge (across different consensus chains) and resolves the situation where the sending chain/consensus has already migrated to a higher XCM version than the receiving chain/consensus. ## Problem/Motivation The current flow over the bridge involves a transfer from AssetHubRococo (AHR) to BridgeHubRococo (BHR) to BridgeHubWestend (BHW) and finally to AssetHubWestend (AHW), beginning with a reserve-backed transfer on AHR. In this process: 1. AHR sends XCM `ExportMessage` through `XcmpQueue`, incorporating XCM version checks using the `WrapVersion` feature, influenced by `pallet_xcm::SupportedVersion` (managed by `pallet_xcm::force_xcm_version` or version discovery). 2. BHR handles the `ExportMessage` instruction, utilizing the latest XCM version. The `HaulBlobExporter` converts the inner XCM to [`VersionedXcm::from`](https://github.com/paritytech/polkadot-sdk/blob/63ac2471aa0210f0ac9903bdd7d8f9351f9a635f/polkadot/xcm/xcm-builder/src/universal_exports.rs#L465-L467), also using the latest XCM version. However, challenges arise: - Incompatibility when BHW uses a different version than BHR. For instance, if BHR migrates to **XCMv4** while BHW remains on **XCMv3**, BHR's `VersionedXcm::from` uses `VersionedXcm::V4` variant, causing encoding issues for BHW. ``` /// Just a simulation of possible error, which could happen on BHW /// (this code is based on actual master without XCMv4) let encoded = hex_literal::hex!("0400"); println!("{:?}", VersionedXcm::<()>::decode(&mut &encoded[..])); Err(Error { cause: None, desc: "Could not decode `VersionedXcm`, variant doesn't exist" }) ``` - Similar compatibility issues exist between AHR and AHW. ## Solution This pull request introduces the following solutions: 1. **New trait `CheckVersion`** - added to the `xcm` module and exposing `pallet_xcm::SupportedVersion`. This enhancement allows checking the actual XCM version for desired destinations outside of the `pallet_xcm` module. 2. **Version Check in `HaulBlobExporter`** uses `CheckVersion` to check known/configured destination versions, ensuring compatibility. For example, in the scenario mentioned, BHR can store the version `3` for BHW. If BHR is on XCMv4, it will attempt to downgrade the message to version `3` instead of using the latest version `4`. 3. **Version Check in `pallet-xcm-bridge-hub-router`** - this check ensures compatibility with the real destination's XCM version, preventing the unnecessary sending of messages to the local bridge hub if versions are incompatible. These additions aim to improve the control and compatibility of XCM flows over the bridge and addressing issues related to version mismatches. ## Possible alternative solution _(More investigation is needed, and at the very least, it should extend to XCMv4/5. If this proves to be a viable option, I can open an RFC for XCM.)._ Add the `XcmVersion` attribute to the `ExportMessage` so that the sending chain can determine, based on what is stored in `pallet_xcm::SupportedVersion`, the version the destination is using. This way, we may not need to handle the version in `HaulBlobExporter`. ``` ExportMessage { network: NetworkId, destination: InteriorMultiLocation, xcm: Xcm<()> destination_xcm_version: Version, // <- new attritbute }, ``` ``` pub trait ExportXcm { fn validate( network: NetworkId, channel: u32, universal_source: &mut Option<InteriorMultiLocation>, destination: &mut Option<InteriorMultiLocation>, message: &mut Option<Xcm<()>>, destination_xcm_version: Version, , // <- new attritbute ) -> SendResult<Self::Ticket>; ``` ## Future Directions This PR does not fix version discovery over bridge, further investigation will be conducted here: https://github.com/paritytech/polkadot-sdk/issues/2417. ## TODO - [x] `pallet_xcm` mock for tests uses hard-coded XCM version `2` - change to 3 or lastest? - [x] fix `pallet-xcm-bridge-hub-router` - [x] fix HaulBlobExporter with version determination [here](https://github.com/paritytech/polkadot-sdk/blob/2183669d05f9b510f979a0cc3c7847707bacba2e/polkadot/xcm/xcm-builder/src/universal_exports.rs#L465) - [x] add unit-tests to the runtimes - [x] run benchmarks for `ExportMessage` - [x] extend local run scripts about `force_xcm_version(dest, version)` - [ ] when merged, prepare governance calls for Rococo/Westend - [ ] add PRDoc Part of: https://github.com/paritytech/parity-bridges-common/issues/2719 --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -846,6 +846,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToWestendXcmRouterInstance> for Runtim
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_westend::WestendNetwork;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
type DestinationVersion = PolkadotXcm;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
@@ -1416,11 +1417,26 @@ impl_runtime_apis! {
|
||||
xcm_config::bridging::SiblingBridgeHubParaId::get().into()
|
||||
);
|
||||
}
|
||||
fn ensure_bridged_target_destination() -> MultiLocation {
|
||||
fn ensure_bridged_target_destination() -> Result<MultiLocation, BenchmarkError> {
|
||||
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(
|
||||
xcm_config::bridging::SiblingBridgeHubParaId::get().into()
|
||||
);
|
||||
xcm_config::bridging::to_westend::AssetHubWestend::get()
|
||||
let bridged_asset_hub = xcm_config::bridging::to_westend::AssetHubWestend::get();
|
||||
let _ = PolkadotXcm::force_xcm_version(
|
||||
RuntimeOrigin::root(),
|
||||
Box::new(bridged_asset_hub),
|
||||
XCM_VERSION,
|
||||
).map_err(|e| {
|
||||
log::error!(
|
||||
"Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}",
|
||||
RuntimeOrigin::root(),
|
||||
bridged_asset_hub,
|
||||
XCM_VERSION,
|
||||
e
|
||||
);
|
||||
BenchmarkError::Stop("XcmVersion was not stored!")
|
||||
})?;
|
||||
Ok(bridged_asset_hub)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1439,7 +1455,7 @@ impl_runtime_apis! {
|
||||
type XcmConfig = xcm_config::XcmConfig;
|
||||
type AccountIdConverter = xcm_config::LocationToAccountId;
|
||||
type DeliveryHelper = cumulus_primitives_utility::ToParentDeliveryHelper<
|
||||
xcm_config::XcmConfig,
|
||||
xcm_config::XcmConfig,
|
||||
ExistentialDepositMultiAsset,
|
||||
xcm_config::PriceForParentDelivery,
|
||||
>;
|
||||
|
||||
+16
-16
@@ -17,9 +17,9 @@
|
||||
//! Autogenerated weights for `pallet_xcm_bridge_hub_router`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-11-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-11-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! HOSTNAME: `runner-r43aesjn-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-rococo-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -58,8 +58,8 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `154`
|
||||
// Estimated: `1639`
|
||||
// Minimum execution time: 7_924_000 picoseconds.
|
||||
Weight::from_parts(8_199_000, 0)
|
||||
// Minimum execution time: 8_110_000 picoseconds.
|
||||
Weight::from_parts(8_373_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1639))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
@@ -72,8 +72,8 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `144`
|
||||
// Estimated: `1629`
|
||||
// Minimum execution time: 4_265_000 picoseconds.
|
||||
Weight::from_parts(4_417_000, 0)
|
||||
// Minimum execution time: 4_459_000 picoseconds.
|
||||
Weight::from_parts(4_663_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1629))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
@@ -83,12 +83,14 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `150`
|
||||
// Estimated: `1502`
|
||||
// Minimum execution time: 10_292_000 picoseconds.
|
||||
Weight::from_parts(10_797_000, 0)
|
||||
// Minimum execution time: 10_153_000 picoseconds.
|
||||
Weight::from_parts(10_737_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1502))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0)
|
||||
@@ -99,8 +101,6 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
/// Proof: `ToWestendXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `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)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
@@ -115,12 +115,12 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn send_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `387`
|
||||
// Estimated: `3852`
|
||||
// Minimum execution time: 61_995_000 picoseconds.
|
||||
Weight::from_parts(65_137_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3852))
|
||||
.saturating_add(T::DbWeight::get().reads(11))
|
||||
// Measured: `448`
|
||||
// Estimated: `6388`
|
||||
// Minimum execution time: 61_258_000 picoseconds.
|
||||
Weight::from_parts(63_679_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6388))
|
||||
.saturating_add(T::DbWeight::get().reads(12))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,9 +673,16 @@ fn limited_reserve_transfer_assets_for_native_asset_over_bridge_works(
|
||||
|
||||
mod asset_hub_rococo_tests {
|
||||
use super::*;
|
||||
use asset_hub_rococo_runtime::{PolkadotXcm, RuntimeOrigin};
|
||||
|
||||
fn bridging_to_asset_hub_westend() -> TestBridgingConfig {
|
||||
asset_test_utils::test_cases_over_bridge::TestBridgingConfig {
|
||||
let _ = PolkadotXcm::force_xcm_version(
|
||||
RuntimeOrigin::root(),
|
||||
Box::new(bridging::to_westend::AssetHubWestend::get()),
|
||||
XCM_VERSION,
|
||||
)
|
||||
.expect("version saved!");
|
||||
TestBridgingConfig {
|
||||
bridged_network: bridging::to_westend::WestendNetwork::get(),
|
||||
local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(),
|
||||
local_bridge_hub_location: bridging::SiblingBridgeHub::get(),
|
||||
|
||||
@@ -822,6 +822,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToRococoXcmRouterInstance> for Runtime
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_rococo::RococoNetwork;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
type DestinationVersion = PolkadotXcm;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
@@ -1493,11 +1494,26 @@ impl_runtime_apis! {
|
||||
xcm_config::bridging::SiblingBridgeHubParaId::get().into()
|
||||
);
|
||||
}
|
||||
fn ensure_bridged_target_destination() -> MultiLocation {
|
||||
fn ensure_bridged_target_destination() -> Result<MultiLocation, BenchmarkError> {
|
||||
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(
|
||||
xcm_config::bridging::SiblingBridgeHubParaId::get().into()
|
||||
);
|
||||
xcm_config::bridging::to_rococo::AssetHubRococo::get()
|
||||
let bridged_asset_hub = xcm_config::bridging::to_rococo::AssetHubRococo::get();
|
||||
let _ = PolkadotXcm::force_xcm_version(
|
||||
RuntimeOrigin::root(),
|
||||
Box::new(bridged_asset_hub),
|
||||
XCM_VERSION,
|
||||
).map_err(|e| {
|
||||
log::error!(
|
||||
"Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}",
|
||||
RuntimeOrigin::root(),
|
||||
bridged_asset_hub,
|
||||
XCM_VERSION,
|
||||
e
|
||||
);
|
||||
BenchmarkError::Stop("XcmVersion was not stored!")
|
||||
})?;
|
||||
Ok(bridged_asset_hub)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+24
-22
@@ -17,9 +17,9 @@
|
||||
//! Autogenerated weights for `pallet_xcm_bridge_hub_router`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-11-29, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! HOSTNAME: `runner-r43aesjn-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-westend-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -48,8 +48,8 @@ use core::marker::PhantomData;
|
||||
/// Weight functions for `pallet_xcm_bridge_hub_router`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ToRococoXcmRouter::Bridge` (r:1 w:1)
|
||||
@@ -58,22 +58,22 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `193`
|
||||
// Estimated: `1678`
|
||||
// Minimum execution time: 8_157_000 picoseconds.
|
||||
Weight::from_parts(8_481_000, 0)
|
||||
// Minimum execution time: 8_460_000 picoseconds.
|
||||
Weight::from_parts(8_730_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1678))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn on_initialize_when_congested() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `111`
|
||||
// Estimated: `1596`
|
||||
// Minimum execution time: 3_319_000 picoseconds.
|
||||
Weight::from_parts(3_445_000, 0)
|
||||
// Minimum execution time: 3_469_000 picoseconds.
|
||||
Weight::from_parts(3_696_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1596))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
}
|
||||
@@ -83,22 +83,24 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `117`
|
||||
// Estimated: `1502`
|
||||
// Minimum execution time: 10_396_000 picoseconds.
|
||||
Weight::from_parts(10_914_000, 0)
|
||||
// Minimum execution time: 10_315_000 picoseconds.
|
||||
Weight::from_parts(10_651_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1502))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0)
|
||||
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
|
||||
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0)
|
||||
/// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0)
|
||||
/// Storage: `ToRococoXcmRouter::Bridge` (r:1 w:1)
|
||||
/// Proof: `ToRococoXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `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)
|
||||
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
|
||||
@@ -107,18 +109,18 @@ impl<T: frame_system::Config> pallet_xcm_bridge_hub_router::WeightInfo for Weigh
|
||||
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpStatus` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn send_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `426`
|
||||
// Estimated: `3891`
|
||||
// Minimum execution time: 45_902_000 picoseconds.
|
||||
Weight::from_parts(46_887_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3891))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
// Measured: `487`
|
||||
// Estimated: `6427`
|
||||
// Minimum execution time: 64_532_000 picoseconds.
|
||||
Weight::from_parts(66_901_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6427))
|
||||
.saturating_add(T::DbWeight::get().reads(12))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ use asset_hub_westend_runtime::{
|
||||
WestendLocation, XcmConfig,
|
||||
},
|
||||
AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets,
|
||||
ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime,
|
||||
RuntimeCall, RuntimeEvent, SessionKeys, ToRococoXcmRouterInstance, TrustBackedAssetsInstance,
|
||||
XcmpQueue,
|
||||
ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem,
|
||||
PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys,
|
||||
ToRococoXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue,
|
||||
};
|
||||
use asset_test_utils::{
|
||||
test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder,
|
||||
@@ -635,6 +635,12 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p
|
||||
);
|
||||
|
||||
fn bridging_to_asset_hub_rococo() -> TestBridgingConfig {
|
||||
let _ = PolkadotXcm::force_xcm_version(
|
||||
RuntimeOrigin::root(),
|
||||
Box::new(bridging::to_rococo::AssetHubRococo::get()),
|
||||
XCM_VERSION,
|
||||
)
|
||||
.expect("version saved!");
|
||||
TestBridgingConfig {
|
||||
bridged_network: bridging::to_rococo::RococoNetwork::get(),
|
||||
local_bridge_hub_para_id: bridging::SiblingBridgeHubParaId::get(),
|
||||
|
||||
Reference in New Issue
Block a user