diff --git a/Cargo.lock b/Cargo.lock index 1ea9866dc826e0913ac775a02b563a1ce960654f..5a6ed3919b56ee1618c2e58b6fd4ff7bb77f9f2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2051,7 +2051,6 @@ version = "0.16.2" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", - "bp-bridge-hub-polkadot", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", "bp-header-chain", @@ -2353,7 +2352,6 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-test-utils", - "bp-xcm-bridge-hub", "frame-support", "frame-system", "log", @@ -5139,7 +5137,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", diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index def35c5cc2ad701dce94c990a14521b62bca366e..e426bab245b9c60d974e6b206caead6780135fd7 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -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 @@ -52,7 +51,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", diff --git a/bridges/bin/runtime-common/src/integrity.rs b/bridges/bin/runtime-common/src/integrity.rs index 535f1a26e5e8989e59b36e65d1c1948111c81b33..a400df1c2a5a074b24476c183ec345ab7c312122 100644 --- a/bridges/bin/runtime-common/src/integrity.rs +++ b/bridges/bin/runtime-common/src/integrity.rs @@ -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, ); } ); diff --git a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml index 741741bab02490e3566713506f0a92448a959d3f..78380385b45b508edd1a80182aff4b231808bbbe 100644 --- a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml @@ -62,5 +62,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 diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 80750ca00c7b6938cee85b344b169570fd8a6deb..f45b3b1f9a0b34934f9e5bc8cbfc1999bb4c8677 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -79,7 +79,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 @@ -123,7 +122,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", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs index ea927534e71d2605114d892015b3ab396fd00885..39b5fa85c81f18c69b5011d85dc541749f4b144d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs @@ -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 diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs index 97a28f99af0a10dc05ddfeb00af3ec2cfa6eaf66..067eb214ffaa911d15a501eac4d16dd4edd9e929 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs @@ -292,6 +292,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::< diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs index 39f64a82aceb721b725406a3c1c79713390d84ad..47b628a8aeb05438de8ffb29928ae920f4ba3b3e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs @@ -320,6 +320,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::< diff --git a/polkadot/xcm/xcm-builder/src/barriers.rs b/polkadot/xcm/xcm-builder/src/barriers.rs index 5d95005eb663097b8130cd01640d6dd29a4f2307..6e29c173ce96d23ac83d9d666191a6ffceb7825a 100644 --- a/polkadot/xcm/xcm-builder/src/barriers.rs +++ b/polkadot/xcm/xcm-builder/src/barriers.rs @@ -484,7 +484,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(())) diff --git a/prdoc/pr_7307.prdoc b/prdoc/pr_7307.prdoc new file mode 100644 index 0000000000000000000000000000000000000000..b27aace0bd1391338477d104ef23772d844881e1 --- /dev/null +++ b/prdoc/pr_7307.prdoc @@ -0,0 +1,16 @@ +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