Skip to content
Snippets Groups Projects
Unverified Commit 63411588 authored by Branislav Kontur's avatar Branislav Kontur
Browse files

Bridges small nits/improvements (#7307)

This PR contains small fixes identified during work on the larger PR:
https://github.com/paritytech/polkadot-sdk/issues/6906.

---------

Co-authored-by: command-bot <>
(cherry picked from commit 085da479)
parent 64fe4435
No related merge requests found
Pipeline #513595 waiting for manual action with stages
in 2 minutes and 38 seconds
......@@ -2202,7 +2202,6 @@ version = "0.18.0"
dependencies = [
"bp-asset-hub-rococo",
"bp-asset-hub-westend",
"bp-bridge-hub-polkadot",
"bp-bridge-hub-rococo",
"bp-bridge-hub-westend",
"bp-header-chain",
......@@ -2503,7 +2502,6 @@ dependencies = [
"bp-relayers",
"bp-runtime",
"bp-test-utils",
"bp-xcm-bridge-hub",
"frame-support",
"frame-system",
"log",
......@@ -5518,7 +5516,6 @@ dependencies = [
"asset-test-utils",
"bp-messages",
"bp-xcm-bridge-hub",
"bridge-runtime-common",
"cumulus-pallet-parachain-system",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
......
......@@ -22,7 +22,6 @@ bp-parachains.workspace = true
bp-polkadot-core.workspace = true
bp-relayers.workspace = true
bp-runtime.workspace = true
bp-xcm-bridge-hub.workspace = true
pallet-bridge-grandpa.workspace = true
pallet-bridge-messages.workspace = true
pallet-bridge-parachains.workspace = true
......@@ -53,7 +52,6 @@ std = [
"bp-polkadot-core/std",
"bp-relayers/std",
"bp-runtime/std",
"bp-xcm-bridge-hub/std",
"codec/std",
"frame-support/std",
"frame-system/std",
......
......@@ -30,7 +30,6 @@ use pallet_bridge_messages::WeightInfoExt as _;
// Re-export to avoid include all dependencies everywhere.
#[doc(hidden)]
pub mod __private {
pub use bp_xcm_bridge_hub;
pub use static_assertions;
}
......@@ -66,9 +65,9 @@ macro_rules! assert_bridge_messages_pallet_types(
with_bridged_chain_messages_instance: $i:path,
this_chain: $this:path,
bridged_chain: $bridged:path,
expected_payload_type: $payload:path,
) => {
{
use $crate::integrity::__private::bp_xcm_bridge_hub::XcmAsPlainPayload;
use $crate::integrity::__private::static_assertions::assert_type_eq_all;
use bp_messages::ChainWithMessages;
use bp_runtime::Chain;
......@@ -81,8 +80,8 @@ macro_rules! assert_bridge_messages_pallet_types(
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::ThisChain, $this);
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::BridgedChain, $bridged);
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::OutboundPayload, XcmAsPlainPayload);
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::InboundPayload, XcmAsPlainPayload);
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::OutboundPayload, $payload);
assert_type_eq_all!(<$r as BridgeMessagesConfig<$i>>::InboundPayload, $payload);
}
}
);
......@@ -97,6 +96,7 @@ macro_rules! assert_complete_bridge_types(
with_bridged_chain_messages_instance: $mi:path,
this_chain: $this:path,
bridged_chain: $bridged:path,
expected_payload_type: $payload:path,
) => {
$crate::assert_chain_types!(runtime: $r, this_chain: $this);
$crate::assert_bridge_messages_pallet_types!(
......@@ -104,6 +104,7 @@ macro_rules! assert_complete_bridge_types(
with_bridged_chain_messages_instance: $mi,
this_chain: $this,
bridged_chain: $bridged,
expected_payload_type: $payload,
);
}
);
......
......@@ -64,5 +64,3 @@ pallet-bridge-messages.workspace = true
pallet-bridge-messages.default-features = true
pallet-xcm-bridge-hub.workspace = true
pallet-xcm-bridge-hub.default-features = true
bridge-runtime-common.workspace = true
bridge-runtime-common.default-features = true
......@@ -76,7 +76,6 @@ parachains-common.workspace = true
testnet-parachains-constants = { features = ["rococo"], workspace = true }
bp-asset-hub-rococo.workspace = true
bp-asset-hub-westend.workspace = true
bp-bridge-hub-polkadot.workspace = true
bp-bridge-hub-rococo.workspace = true
bp-bridge-hub-westend.workspace = true
bp-header-chain.workspace = true
......@@ -118,7 +117,6 @@ default = ["std"]
std = [
"bp-asset-hub-rococo/std",
"bp-asset-hub-westend/std",
"bp-bridge-hub-polkadot/std",
"bp-bridge-hub-rococo/std",
"bp-bridge-hub-westend/std",
"bp-header-chain/std",
......
......@@ -204,6 +204,7 @@ mod tests {
with_bridged_chain_messages_instance: WithRococoBulletinMessagesInstance,
this_chain: bp_bridge_hub_rococo::BridgeHubRococo,
bridged_chain: bp_polkadot_bulletin::PolkadotBulletin,
expected_payload_type: XcmAsPlainPayload,
);
// we can't use `assert_complete_bridge_constants` here, because there's a trick with
......
......@@ -295,6 +295,7 @@ mod tests {
with_bridged_chain_messages_instance: WithBridgeHubWestendMessagesInstance,
this_chain: bp_bridge_hub_rococo::BridgeHubRococo,
bridged_chain: bp_bridge_hub_westend::BridgeHubWestend,
expected_payload_type: XcmAsPlainPayload,
);
assert_complete_with_parachain_bridge_constants::<
......
......@@ -323,6 +323,7 @@ mod tests {
with_bridged_chain_messages_instance: WithBridgeHubRococoMessagesInstance,
this_chain: bp_bridge_hub_westend::BridgeHubWestend,
bridged_chain: bp_bridge_hub_rococo::BridgeHubRococo,
expected_payload_type: XcmAsPlainPayload,
);
assert_complete_with_parachain_bridge_constants::<
......
......@@ -490,7 +490,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
if matches!(origin, Location { parents: 1, interior: Here }) =>
{
log::warn!(
target: "xcm::barrier",
target: "xcm::barriers",
"Unexpected ReserveAssetDeposited from the Relay Chain",
);
Ok(ControlFlow::Continue(()))
......
title: Bridges small nits/improvements
doc:
- audience: Runtime Dev
description: |
This PR introduces a new `expected_payload_type` parameter to the Bridges `assert_complete_bridge_types` macro.
crates:
- name: bridge-runtime-common
bump: patch
- name: bridge-hub-rococo-runtime
bump: patch
- name: bridge-hub-westend-runtime
bump: patch
- name: staging-xcm-builder
bump: patch
- name: emulated-integration-tests-common
bump: patch
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment